public abstract class JboAbstractValidator extends AbstractValidator implements JboValidatorHints
 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.
ValidatorConstants.MessageFlavor| Modifier and Type | Field and Description | 
|---|---|
| protected AttributeDef | mValidatingAttr | 
mbInverse, mDescription, mErrorMessageClass, mMsgExpr, mMsgId, mMsgIds, mResourceBundleId, mTriggeringAttributeNames, mTriggeringAttributes, mValidatingAttrNamemFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIXATTR, ATTR_STR, BETWEEN, EO, EO_STR, EQUALTO, EXPR, EXPR_STR, GREATERTHAN, GREATERTHANEQUALTO, JBO, JBO_STR, LESSTHAN, LESSTHANEQUALTO, LITERAL, LITERAL_STR, MANDATORY_STR, mCompOperTypeVals, mRhsTypeVals, mSeverityVals, NOTEQUALTO, PNAME_CompareLength, PNAME_CompareType, PNAME_CompareValue, PNAME_DataType, PNAME_Description, PNAME_ErrorMessageExpressions, PNAME_ErrorMessageId, PNAME_ErrorMessageIds, PNAME_Exposed, PNAME_ExprValueSupplier, PNAME_ForPersonalization, PNAME_Inverse, PNAME_MessageFlavor, PNAME_Name, PNAME_OnAttribute, PNAME_OnAttributes, PNAME_OnCondition, PNAME_OperandType, PNAME_Severity, PNAME_Subtype, PNAME_TransactionLevel, PNAME_TransientExpression, PNAME_Trigger, PNAME_ValidationBeanClass, PNAME_ValName, PNAME_xmlns, PRECISION_SCALE_STR, SEVERITY_ERROR, SEVERITY_RECOVERABLE_ERROR_INDEX, SEVERITY_VETOABLE_WARNING, SEVERITY_WARNING, SQL, SQL_STR, VALIDATION_XMLNS, VALIDATOR_MSG_ID_PREFIX, VO, VO_STR, VO_USAGE, VO_USAGE_STRXML_STATEMENT| Constructor and Description | 
|---|
| JboAbstractValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| JboValidatorHints | applyValidatorPersonalization(JboValidatorHints orgVal) | 
| java.lang.Object | clone() | 
| void | closeObject() | 
| ValidationException | createException(java.lang.Exception e,
               JboValidatorContext evObj,
               java.lang.String msgId,
               AttributeDef attrDef,
               java.lang.Object value,
               java.lang.String methodName,
               int severity) | 
| DifferDetails | diffContents(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails) | 
| 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) | 
| ValidatorConstants.MessageFlavor | getMessageFlavor() | 
| 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 | setMessageFlavor(ValidatorConstants.MessageFlavor mFlavor) | 
| 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 | 
applyDiffChildren, applyDiffContents, applyValidatorPersonalization, convertToJava, copyErrorMsgInfo, createAttributeException, createExprValueSupplier, createRowException, diffChildren, diffObjects, ensureDifferDetails, ensureVariableManager, getDefXMLElementTag, getDescription, getErrorMessageClass, getErrorMsgExpressions, getErrorMsgIds, getExprValueSupplierType, getInverse, getMessageBundleClass, getOnCondition, getOwner, getResourceBundleDef, getResourceBundleId, getSeverity, getTriggeringAttributeNames, getValidatorSubType, getVariableManager, hasErrorMsg, hasValidationCondition, hasVariables, initErrMsgParms, initTriggeringAttributeDefs, initValidatorProperties, isDirty, isMovedToAttrLevel, isNew, isTransactionLevel, isTransactionLevel, isValidatable, loadVariables, parseSeverityStr, prepareException, raiseException, readStringArrayList, readTransientExpression, readTransientExpression, readUserObject, readUserObject, readUserObjectTrim, readUserObjectTrim, readUserStringElementsMap, setDefaultDescription, setDescription, setDirty, setErrorMessageClass, setErrorMsgExpressions, setErrorMsgId, setErrorMsgIds, setExprValueSupplierType, setInverse, setNew, setOnCondition, setResourceBundleDef, setResourceBundleId, setSeverity, setTransactionLevel, setTriggeringAttributeNames, setValidatingAttributeName, setValidatorSubType, writeChildrenallocatePropertyMap, getAllProperties, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getPropertyMap, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, isPropertyExpression, mergePropertyMap, refreshProperty, removeProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setFullName, setParent, setPropertiesMap, setPropertiesMap2, setProperty, setProperty, setPropertyExpression, setPropertyMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTriggeringAttributeNames, initValidatorProperties, isTransactionLevelgetDescription, setDescriptionisDirty, isNew, setDirty, setNewgetDefXMLElementTag, writeChildrenprotected AttributeDef mValidatingAttr
public java.lang.Object clone()
clone in class AbstractValidatorpublic java.lang.String getName()
NamedObjectImplgetName in interface DiffMergeablegetName 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 DiffMergeablegetFullName 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 JboValidatorHintspublic ValidatorConstants.MessageFlavor getMessageFlavor()
public void setMessageFlavor(ValidatorConstants.MessageFlavor mFlavor)
protected 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 AbstractValidatorpublic ValidationException createException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, AttributeDef attrDef, java.lang.Object value, java.lang.String methodName, int severity)
createException in class AbstractValidatorprotected 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 AbstractValidatorpublic 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 DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
diffContents in interface DiffMergeablediffContents in class AbstractValidatorpublic 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