|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.5.0) E10653-06 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.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 AbstractValidatorpublic java.lang.String getName()
NamedObjectImplgetName in interface JboValidatorHintsgetName in interface VariableManagerOwnergetName in class AbstractValidatorpublic void setName(java.lang.String name)
NamedObjectImplsetName in interface JboValidatorHintssetName in class NamedObjectImplname - the name to be given to this object.public java.lang.String getFullName()
NamedObjectImplgetFullName in interface DefPersistablegetFullName in class AbstractValidatorpublic boolean isReadOnly()
public void closeObject()
public java.lang.String getImageLoc(boolean bOpen)
public boolean isForPersonalization()
isForPersonalization in interface JboValidatorHintspublic void setForPersonalization(boolean b)
setForPersonalization in interface JboValidatorHintsprotected void setInitialized()
protected void initialize(JboValidatorContext evObj)
public AttributeDef[] getTriggeringAttributeDefs()
JboValidatorHintsgetTriggeringAttributeDefs in interface JboValidatorHintsgetTriggeringAttributeDefs in class AbstractValidatorpublic java.lang.String getErrorMsgId()
getErrorMsgId in class AbstractValidatorpublic 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)
JboValidatorInterfacevalidate in interface JboValidatorInterfaceevObj - 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.Exceptionprotected 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 AbstractValidatorpublic void loadXMLContents(DefElement elem)
loadXMLContents in class AbstractValidator
public void resolve(ValidationManager owner,
StructureDef structDef,
PersistableDefObject defObj)
resolve in interface JboValidatorHintsresolve in class AbstractValidatorpublic DefPersistable getOrigObject()
getOrigObject in interface DefPersistablepublic void setOrigObject(DefPersistable oldObj)
setOrigObject in interface DefPersistablepublic void writeObject(DefWriter jos)
PersistentDefinitionwriteObject in interface PersistentDefinitionjos - the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionwriteContents in class AbstractValidatorjos - the Output storage for persistencepublic abstract java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitionpublic java.lang.String getXMLElementTag()
PersistentDefinitiongetXMLElementTag in interface PersistentDefinitionpublic java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace in interface PersistentDefinitionpublic 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.5.0) E10653-06 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||