|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.4.0) E10653-05 |
||||||||
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
oracle.jbo.rules.JboAbstractValidator
public abstract class JboAbstractValidator
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.
Field Summary | |
---|---|
protected AttributeDef |
mValidatingAttr
|
Fields inherited from class oracle.jbo.rules.AbstractValidator |
---|
mbInverse, mDescription, mErrorMessageClass, mMsgExpr, mMsgId, mMsgIds, mResourceBundleId, mTriggeringAttributeNames, mTriggeringAttributes, mValidatingAttrName |
Fields inherited from class oracle.jbo.common.NamedObjectImpl |
---|
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX |
Fields inherited from interface oracle.jbo.mom.xml.DefPersistable |
---|
XML_STATEMENT |
Constructor Summary | |
---|---|
JboAbstractValidator()
|
Method Summary | |
---|---|
JboValidatorHints |
applyValidatorPersonalization(JboValidatorHints orgVal)
|
java.lang.Object |
clone()
|
void |
closeObject()
|
abstract java.lang.String |
getDefXMLElementTag()
|
java.lang.String |
getDefXMLNameSpace()
|
java.lang.String |
getErrorMsgId()
|
protected AttributeDef |
getErrorReportAttrDef(JboValidatorContext evObj)
|
java.lang.String |
getFullName()
Gets this object's fully-qualified name. |
java.lang.String |
getImageLoc(boolean bOpen)
|
java.lang.String |
getName()
Get the name of this object. |
DefPersistable |
getOrigObject()
|
AttributeDef[] |
getTriggeringAttributeDefs()
Returns an array of attribute defs for those attributes whose change in value, should trigger this validation rule to execute. |
java.lang.String |
getValidatingAttributeName()
|
java.lang.String |
getValidatorType()
|
protected java.lang.Object |
getValueToValidate(JboValidatorContext evObj)
|
java.lang.String |
getXMLElementTag()
Returns a piece of static info for the type of object this is invoked upon. |
protected void |
initialize(JboValidatorContext evObj)
|
boolean |
isForPersonalization()
|
boolean |
isReadOnly()
|
void |
loadXMLContents(DefElement elem)
|
void |
raiseException(java.lang.Exception e,
JboValidatorContext evObj,
java.lang.String msgId,
int severity)
|
void |
resolve(ValidationManager owner,
StructureDef structDef,
PersistableDefObject defObj)
|
void |
setForPersonalization(boolean b)
|
protected void |
setInitialized()
|
void |
setName(java.lang.String name)
Name this object. |
protected void |
setNewValue(java.lang.Object newValue)
When the newValue is an Entity, get the attribute's value by using the getAttribute method on the entity. |
void |
setOrigObject(DefPersistable oldObj)
|
void |
setValidatingAttribute(AttributeDef attr)
Sets the validating attribute. |
void |
setValidatingAttribute(StructureDef beanInfo,
java.lang.String str)
Sets the validating attribute by name. |
void |
validate(JboValidatorContext evObj)
Tests the validity of the object/value as described in the validator context. |
void |
validateMany(java.util.ArrayList valCtxs)
|
abstract boolean |
validateValue(java.lang.Object value)
Validates a value. |
boolean |
validateValueWithContext(JboValidatorContext evObj,
java.lang.Object value)
Called internally by the framework with validation OnCondition is true or there is no validation OnCondition. |
void |
writeContents(DefWriter jos)
Objects should write their persistence output in this method |
void |
writeObject(DefWriter jos)
Objects should write their persistence output in this method |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jbo.rules.JboValidatorHints |
---|
getTriggeringAttributeNames, initValidatorProperties, isTransactionLevel |
Methods inherited from interface oracle.jbo.rules.JboValidatorInterface |
---|
getDescription, setDescription |
Methods inherited from interface oracle.jbo.mom.xml.DefPersistable |
---|
isDirty, isNew, setDirty, setNew |
Methods inherited from interface oracle.jbo.mom.xml.PersistentDefinition |
---|
writeChildren |
Field Detail |
---|
protected AttributeDef mValidatingAttr
Constructor Detail |
---|
public JboAbstractValidator()
Method Detail |
---|
public java.lang.Object clone()
clone
in class AbstractValidator
public java.lang.String getName()
NamedObjectImpl
getName
in interface JboValidatorHints
getName
in interface VariableManagerOwner
getName
in class AbstractValidator
public void setName(java.lang.String name)
NamedObjectImpl
setName
in interface JboValidatorHints
setName
in class NamedObjectImpl
name
- the name to be given to this object.public java.lang.String getFullName()
NamedObjectImpl
getFullName
in interface DefPersistable
getFullName
in class AbstractValidator
public boolean isReadOnly()
public void closeObject()
public java.lang.String getImageLoc(boolean bOpen)
public boolean isForPersonalization()
isForPersonalization
in interface JboValidatorHints
public void setForPersonalization(boolean b)
setForPersonalization
in interface JboValidatorHints
protected void setInitialized()
protected void initialize(JboValidatorContext evObj)
public AttributeDef[] getTriggeringAttributeDefs()
JboValidatorHints
getTriggeringAttributeDefs
in interface JboValidatorHints
getTriggeringAttributeDefs
in class AbstractValidator
public java.lang.String getErrorMsgId()
getErrorMsgId
in class AbstractValidator
public abstract boolean validateValue(java.lang.Object value)
Subclasses must implement this method.
value
- the object to be validated.
true
if the object is valid.
java.lang.Exception
- if validation cannot be performed.public boolean validateValueWithContext(JboValidatorContext evObj, java.lang.Object value)
public void validate(JboValidatorContext evObj)
JboValidatorInterface
validate
in interface JboValidatorInterface
evObj
- the validator contextpublic void validateMany(java.util.ArrayList valCtxs)
protected AttributeDef getErrorReportAttrDef(JboValidatorContext evObj)
public void raiseException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, int severity)
raiseException
in class AbstractValidator
protected void setNewValue(java.lang.Object newValue) throws java.lang.Exception
newValue
- either the attribute's value or a value to use to compare
in the validator.
java.lang.Exception
protected java.lang.Object getValueToValidate(JboValidatorContext evObj)
public void setValidatingAttribute(AttributeDef attr)
attr
- an attribute.public void setValidatingAttribute(StructureDef beanInfo, java.lang.String str)
This variant is used when the validator is attached to an entity, rather than to an attribute.
beanInfo
- the entity containing the attribute.str
- an attribute name as a string.public java.lang.String getValidatingAttributeName()
getValidatingAttributeName
in class AbstractValidator
public void loadXMLContents(DefElement elem)
loadXMLContents
in class AbstractValidator
public void resolve(ValidationManager owner, StructureDef structDef, PersistableDefObject defObj)
resolve
in interface JboValidatorHints
resolve
in class AbstractValidator
public DefPersistable getOrigObject()
getOrigObject
in interface DefPersistable
public void setOrigObject(DefPersistable oldObj)
setOrigObject
in interface DefPersistable
public void writeObject(DefWriter jos)
PersistentDefinition
writeObject
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
writeContents
in class AbstractValidator
jos
- the Output storage for persistencepublic abstract java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
public java.lang.String getXMLElementTag()
PersistentDefinition
getXMLElementTag
in interface PersistentDefinition
public java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace
in interface PersistentDefinition
public java.lang.String getValidatorType()
public JboValidatorHints applyValidatorPersonalization(JboValidatorHints orgVal)
applyValidatorPersonalization
in interface JboValidatorHints
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.4.0) E10653-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |