|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.common.NamedObjectImpl
oracle.jbo.rules.AbstractValidator
public abstract class AbstractValidator
The superclass for all pre-defined validators.
This class implements the basic functionality of storing the value
of either an attribute to be validated, or the entity or application module
reference on which validation is to be invoked.
Subclasses must provide validateValue
, which performs the actual
validation test.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface oracle.jbo.rules.ValidatorConstants |
---|
ValidatorConstants.MessageFlavor |
Field Summary | |
---|---|
protected boolean |
mbInverse
|
protected java.lang.String |
mDescription
|
protected java.lang.Class |
mErrorMessageClass
|
protected java.util.HashMap |
mMsgExpr
|
protected java.lang.String |
mMsgId
|
protected java.util.List<java.lang.String> |
mMsgIds
|
protected java.lang.String |
mResourceBundleId
|
protected java.lang.String[] |
mTriggeringAttributeNames
|
protected AttributeDef[] |
mTriggeringAttributes
|
protected java.lang.String |
mValidatingAttrName
|
Fields inherited from class oracle.jbo.common.NamedObjectImpl |
---|
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX |
Constructor Summary | |
---|---|
AbstractValidator()
|
Method Summary | |
---|---|
AbstractValidator |
applyValidatorPersonalization(AbstractValidator orgVal)
|
java.lang.Object |
clone()
|
java.lang.Object |
convertToJava(AttributeDef attrDef,
java.lang.Object val)
|
void |
copyErrorMsgInfo(AbstractValidator val)
|
protected AttrSetValException |
createAttributeException(int objType,
ResourceBundleDef resBundleDef,
java.lang.String errorCode,
java.lang.String objName,
java.lang.String attrName,
java.lang.Object newValue,
java.lang.String methodName,
java.lang.Object source)
For internal framework use only |
ValidationException |
createException(java.lang.Exception e,
JboValidatorContext evObj,
java.lang.String msgId,
AttributeDef attrDef,
java.lang.Object value,
java.lang.String methodName,
int severity)
|
protected ExprValueSupplier |
createExprValueSupplier(JboValidatorContext ctx)
For internal framework use only |
protected RowValException |
createRowException(ResourceBundleDef resBundleDef,
java.lang.String errorCode,
java.lang.String objName,
Key key,
AttributeDef[] keyCols,
java.lang.String methodName,
java.lang.Object source)
For internal framework use only |
VariableValueManager |
ensureVariableManager()
Returns this object's Variable Value Manager. |
java.lang.String |
getDescription()
Gets the textul description of this validator. |
java.lang.Class |
getErrorMessageClass()
|
java.util.Map |
getErrorMsgExpressions()
|
java.lang.String |
getErrorMsgId()
|
java.util.List |
getErrorMsgIds()
|
java.lang.String |
getExprValueSupplierType()
|
java.lang.String |
getFullName()
Gets this object's fully-qualified name. |
boolean |
getInverse()
Reports whether the logic of this validator is inverted. |
java.lang.Class |
getMessageBundleClass()
|
java.lang.String |
getName()
Get the name of this object. |
java.lang.String |
getOnCondition()
|
ValidationManager |
getOwner()
|
ResourceBundleDef |
getResourceBundleDef()
getResourceBundleDef gets the mResourceBundleDef value |
java.lang.String |
getResourceBundleId()
|
int |
getSeverity()
Returns severity as one of the constants in oracle.jbo.JboWarning :
JboWarning.SEVERITY_ERROR ,
JboWarning.SEVERITY_WARNING ,
JboWarning.SEVERITY_VETOABLE_WARNING ,
or JboWarning.SEVERITY_RECOVERABLE_ERROR |
AttributeDef[] |
getTriggeringAttributeDefs()
|
java.lang.String[] |
getTriggeringAttributeNames()
|
java.lang.String |
getValidatingAttributeName()
|
java.lang.String |
getValidatorSubType()
|
VariableValueManager |
getVariableManager()
Returns this object's current Variable Value Manager. |
boolean |
hasErrorMsg()
|
protected boolean |
hasValidationCondition()
|
boolean |
hasVariables()
Returns a flag indicating whether this object has Variables or not. |
void |
initErrMsgParms(ValidationException valEx,
JboValidatorContext evObj,
int severity)
|
void |
initTriggeringAttributeDefs(StructureDef strDef)
|
void |
initValidatorProperties(java.util.HashMap props)
|
boolean |
isDirty()
|
boolean |
isMovedToAttrLevel()
|
boolean |
isNew()
|
boolean |
isTransactionLevel()
|
boolean |
isTransactionLevel(JboValidatorContext valCtx)
|
protected boolean |
isValidatable(JboValidatorContext evObj)
|
void |
loadVariables(DefElement xmlElement)
|
void |
loadXMLContents(DefElement elem)
|
static int |
parseSeverityStr(java.lang.String severityStr)
Advanced internal method. |
protected void |
prepareException(ValidationException valEx,
JboValidatorContext evObj,
int severity)
|
void |
raiseException(java.lang.Exception e,
JboValidatorContext evObj)
|
void |
raiseException(java.lang.Exception e,
JboValidatorContext evObj,
java.lang.String msgId,
int severity)
|
protected java.util.ArrayList |
readStringArrayList(DefElement rootElem,
java.lang.String attrName,
java.lang.String arrayName,
boolean useNameAttr)
|
static ExpressionDef |
readTransientExpression(NamedObjectImpl parent,
DefElement rootElem,
java.lang.String elemName)
Deprecated. since 11.1.1.4.0 Apps should never be using this implementation method. |
java.lang.String |
readUserObject(DefElement rootElem,
java.lang.String attrName)
|
java.lang.String |
readUserObject(DefElement rootElem,
java.lang.String attrName,
boolean checkUnique)
|
java.lang.String |
readUserObjectTrim(DefElement rootElem,
java.lang.String attrName)
|
java.lang.String |
readUserObjectTrim(DefElement rootElem,
java.lang.String attrName,
boolean checkUnique)
|
java.util.HashMap |
readUserStringElementsMap(DefElement rootElem,
java.lang.String elemName)
|
void |
resolve(ValidationManager owner,
StructureDef structDef,
PersistableDefObject defObj)
|
protected void |
setDefaultDescription(java.lang.String descId)
Sets the textul description of this validator using locale message code. |
void |
setDescription(java.lang.String description)
Sets the textul description of this validator using a specified string. |
void |
setDirty(boolean b)
|
void |
setErrorMessageClass(java.lang.Class clz)
|
void |
setErrorMsgExpressions(java.util.Map map)
|
void |
setErrorMsgId(java.lang.String msgId)
|
void |
setErrorMsgIds(java.util.List msgIds)
|
void |
setExprValueSupplierType(java.lang.String s)
|
void |
setInverse(boolean bInverse)
Allows the logic of this validator to be inverted. |
void |
setNew(boolean b)
|
void |
setOnCondition(java.lang.String s)
|
void |
setResourceBundleDef(ResourceBundleDef resourceBundleDef)
setResourceBundleDef sets the mResourceBundleDef value |
void |
setResourceBundleId(java.lang.String bundleId)
|
void |
setSeverity(int severity)
severity should be one of the constants in oracle.jbo.JboWarning - one of:
JboWarning.SEVERITY_ERROR ,
JboWarning.SEVERITY_WARNING ,
JboWarning.SEVERITY_VETOABLE_WARNING ,
or JboWarning.SEVERITY_RECOVERABLE_ERROR |
void |
setTransactionLevel(boolean bTransactionLevel)
|
void |
setTriggeringAttributeNames(java.lang.String[] names)
|
void |
setValidatingAttributeName(java.lang.String name)
|
void |
writeChildren(DefWriter jos)
|
void |
writeContents(DefWriter jos)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean mbInverse
protected java.lang.String mDescription
protected java.lang.String mMsgId
protected java.util.List<java.lang.String> mMsgIds
protected java.util.HashMap mMsgExpr
protected java.lang.Class mErrorMessageClass
protected java.lang.String mValidatingAttrName
protected java.lang.String mResourceBundleId
protected java.lang.String[] mTriggeringAttributeNames
protected AttributeDef[] mTriggeringAttributes
Constructor Detail |
---|
public AbstractValidator()
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean isDirty()
public void setDirty(boolean b)
public boolean isNew()
public void setNew(boolean b)
public ValidationManager getOwner()
public java.lang.String getValidatorSubType()
public void setErrorMessageClass(java.lang.Class clz)
public java.lang.Class getErrorMessageClass()
public ResourceBundleDef getResourceBundleDef()
getResourceBundleDef
in interface VariableManagerOwnerBase
public void setResourceBundleDef(ResourceBundleDef resourceBundleDef)
resourceBundleDef
- ResourceBundleDefpublic java.lang.Object convertToJava(AttributeDef attrDef, java.lang.Object val)
public void setTransactionLevel(boolean bTransactionLevel)
public boolean isTransactionLevel()
public boolean isTransactionLevel(JboValidatorContext valCtx)
public void setInverse(boolean bInverse)
bInverse
- true
if the validation result is to be inverted,
and false
if the validation result is not to be inverted.public boolean getInverse()
true
if the validation result is inverted, and
false
if the validation result is not inverted.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- a documentation string.protected void setDefaultDescription(java.lang.String descId)
description
- a message code.public java.lang.String getErrorMsgId()
public void setErrorMsgId(java.lang.String msgId)
public boolean hasErrorMsg()
public void copyErrorMsgInfo(AbstractValidator val)
public java.lang.String getResourceBundleId()
public void setResourceBundleId(java.lang.String bundleId)
public java.util.List getErrorMsgIds()
public void setErrorMsgIds(java.util.List msgIds)
public java.util.Map getErrorMsgExpressions()
public void setErrorMsgExpressions(java.util.Map map)
public void setValidatingAttributeName(java.lang.String name)
public java.lang.String getValidatingAttributeName()
public java.lang.String[] getTriggeringAttributeNames()
public AttributeDef[] getTriggeringAttributeDefs()
public void setTriggeringAttributeNames(java.lang.String[] names)
public java.lang.String getName()
NamedObjectImpl
getName
in interface VariableManagerOwner
getName
in class NamedObjectImpl
public java.lang.String getFullName()
NamedObjectImpl
getFullName
in class NamedObjectImpl
public boolean hasVariables()
VariableManagerOwnerBase
hasVariables
in interface VariableManagerOwnerBase
public boolean isMovedToAttrLevel()
public java.lang.String getOnCondition()
public void setOnCondition(java.lang.String s)
public java.lang.String getExprValueSupplierType()
public void setExprValueSupplierType(java.lang.String s)
public VariableValueManager ensureVariableManager()
VariableManagerOwnerBase
ensureVariableManager
in interface VariableManagerOwnerBase
public VariableValueManager getVariableManager()
VariableManagerOwnerBase
null
if Variable Value Manager has
been initialized.
When a framework object is first created, its Variable Value Manager may be null. This method does not initialize (create) the Variable Value Manager.
in contrast, ensures
that the Variable Value Manager is initialized (created).
VariableManagerOwnerBase.ensureVariableManager()
getVariableManager
in interface VariableManagerOwnerBase
null
if one was not yet initialized.public java.lang.Class getMessageBundleClass()
getMessageBundleClass
in interface VariableManagerOwnerBase
public void loadVariables(DefElement xmlElement)
public void initValidatorProperties(java.util.HashMap props)
public void initTriggeringAttributeDefs(StructureDef strDef)
public void loadXMLContents(DefElement elem)
public void writeChildren(DefWriter jos)
public void writeContents(DefWriter jos)
public void resolve(ValidationManager owner, StructureDef structDef, PersistableDefObject defObj)
public void setSeverity(int severity)
oracle.jbo.JboWarning
- one of:
JboWarning.SEVERITY_ERROR
,
JboWarning.SEVERITY_WARNING
,
JboWarning.SEVERITY_VETOABLE_WARNING
,
or JboWarning.SEVERITY_RECOVERABLE_ERROR
public int getSeverity()
oracle.jbo.JboWarning
:
JboWarning.SEVERITY_ERROR
,
JboWarning.SEVERITY_WARNING
,
JboWarning.SEVERITY_VETOABLE_WARNING
,
or JboWarning.SEVERITY_RECOVERABLE_ERROR
public static int parseSeverityStr(java.lang.String severityStr)
public void initErrMsgParms(ValidationException valEx, JboValidatorContext evObj, int severity)
protected void prepareException(ValidationException valEx, JboValidatorContext evObj, int severity)
public ValidationException createException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, AttributeDef attrDef, java.lang.Object value, java.lang.String methodName, int severity)
public void raiseException(java.lang.Exception e, JboValidatorContext evObj)
public void raiseException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, int severity)
protected ExprValueSupplier createExprValueSupplier(JboValidatorContext ctx)
public AbstractValidator applyValidatorPersonalization(AbstractValidator orgVal)
protected boolean isValidatable(JboValidatorContext evObj)
protected boolean hasValidationCondition()
public java.util.HashMap readUserStringElementsMap(DefElement rootElem, java.lang.String elemName)
public static ExpressionDef readTransientExpression(NamedObjectImpl parent, DefElement rootElem, java.lang.String elemName)
public java.lang.String readUserObjectTrim(DefElement rootElem, java.lang.String attrName)
public java.lang.String readUserObjectTrim(DefElement rootElem, java.lang.String attrName, boolean checkUnique)
public java.lang.String readUserObject(DefElement rootElem, java.lang.String attrName)
public java.lang.String readUserObject(DefElement rootElem, java.lang.String attrName, boolean checkUnique)
protected java.util.ArrayList readStringArrayList(DefElement rootElem, java.lang.String attrName, java.lang.String arrayName, boolean useNameAttr)
protected RowValException createRowException(ResourceBundleDef resBundleDef, java.lang.String errorCode, java.lang.String objName, Key key, AttributeDef[] keyCols, java.lang.String methodName, java.lang.Object source)
protected AttrSetValException createAttributeException(int objType, ResourceBundleDef resBundleDef, java.lang.String errorCode, java.lang.String objName, java.lang.String attrName, java.lang.Object newValue, java.lang.String methodName, java.lang.Object source)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |