|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.clex.util.AttributeValidator
Contains the rules for an attribute and performs the validation. Used to validate values against a particular attribute rule
Field Summary | |
static java.lang.String |
DATATYPE_DATE
The date datatype |
static java.lang.String |
DATATYPE_DECIMAL
The decimal datatype |
static java.lang.String |
DATATYPE_INT
The int datatype |
static java.lang.String |
DEFAULT_DATEFORMAT
The default date format rule. |
static java.lang.String |
DEPENDENT_RULE_DEFAULT_KEY
The default key for dependent rule |
static java.lang.String |
DEPENDENT_RULE_NULL_VALUE
The value to represent a null value for dependents. |
static java.lang.String |
DEPENDENT_RULE_REQUIRES_ONE_VALUE
The value to specify that atleast one dependent value is required. |
static java.lang.String |
RULE_DATATYPE
The tag for datatype rule |
static java.lang.String |
RULE_DATEFORMAT
The tag for the date format rule |
static java.lang.String |
RULE_LENGTH
The tag for the length rule |
static java.lang.String |
RULE_MANDATORY
The tag for the mandatory rule |
static java.lang.String |
RULE_MAX
The tag for the max rule |
static java.lang.String |
RULE_MIN
The tag for the min rule |
static java.lang.String |
RULE_REGEXP
The tag for the regexp rule |
Constructor Summary | |
AttributeValidator()
Default Constructor |
Method Summary | |
void |
addDependentRule(java.lang.String dependentRule,
java.util.Hashtable dependents)
|
protected void |
addErrorMessage(java.lang.String errorMessage)
Add a error message for the attribute |
void |
addRule(java.lang.String ruleName,
java.lang.String ruleValue)
Add a rule to the attribute |
void |
addRuleMessage(java.lang.String ruleName,
java.lang.String ruleMessage)
Add a custom rule message for attribute |
void |
clear()
|
java.lang.Object |
clone()
|
java.util.Vector |
getDependents()
|
java.lang.String |
getDescriptiveName()
Returns the descriptive name of the attribute |
java.util.Vector |
getErrorMessages()
Returns the the error messages as a result of the validating a value with the attribute rules. |
java.lang.String |
getName()
Returns the name of the attribute |
java.lang.String |
getRuleValue(java.lang.String ruleName)
Returns the value of a rule |
boolean |
hasDependentRules()
|
boolean |
hasErrors()
Returns a boolean determining if there were any error messages as a result of the validate() |
void |
setDescriptiveName(java.lang.String aDescriptiveName)
Sets the descriptive name of the attribute which will use in the error messages |
void |
setName(java.lang.String attributeName)
Sets the name of the attribute |
void |
validate(java.lang.String value,
java.util.Hashtable dependentValues)
Validates the value using the rules of the attributes If Dependent rules present, then validated against dependentValues |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String RULE_DATATYPE
public static final java.lang.String RULE_DATEFORMAT
public static final java.lang.String RULE_LENGTH
public static final java.lang.String RULE_MIN
public static final java.lang.String RULE_MAX
public static final java.lang.String RULE_MANDATORY
public static final java.lang.String RULE_REGEXP
public static final java.lang.String DEPENDENT_RULE_DEFAULT_KEY
public static final java.lang.String DEPENDENT_RULE_NULL_VALUE
public static final java.lang.String DEPENDENT_RULE_REQUIRES_ONE_VALUE
public static final java.lang.String DEFAULT_DATEFORMAT
public static final java.lang.String DATATYPE_DATE
public static final java.lang.String DATATYPE_DECIMAL
public static final java.lang.String DATATYPE_INT
Constructor Detail |
public AttributeValidator()
Method Detail |
public java.lang.String getName()
public java.lang.String getDescriptiveName()
public java.lang.String getRuleValue(java.lang.String ruleName)
public void clear()
public java.util.Vector getErrorMessages()
public java.util.Vector getDependents()
public boolean hasErrors()
public boolean hasDependentRules()
public void setName(java.lang.String attributeName)
java.lang.String
- the attribute namepublic void setDescriptiveName(java.lang.String aDescriptiveName)
java.lang.String
- The descriptive namepublic void addRule(java.lang.String ruleName, java.lang.String ruleValue)
java.lang.String
- The name of the rulejava.lang.String
- The value of the rulepublic void addRuleMessage(java.lang.String ruleName, java.lang.String ruleMessage)
java.lang.String
- The name of the rulejava.lang.String
- The value of the custom messagepublic void addDependentRule(java.lang.String dependentRule, java.util.Hashtable dependents)
protected void addErrorMessage(java.lang.String errorMessage)
java.lang.String
- The error messagepublic void validate(java.lang.String value, java.util.Hashtable dependentValues)
java.lang.String
- java.util.Hashtable
- public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |