|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DefaultValidationRule
public class DefaultValidationRule
The default validation rule implementation.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
Constructor Summary | |
---|---|
DefaultValidationRule()
Creates a new instance. |
Method Summary | |
---|---|
void |
addDependentPredicateCode(String code)
Adds a dependent predicate code. |
Annotation |
getAnnotation()
Returns the annotation associated with this rule. |
protected ComplexDataObject |
getContextForPredicateChecking(Object object,
ComplexDataObject context)
|
String |
getDependentPredicateCode(int index)
Returns the dependent predicate code at index . |
int |
getDependentPredicateCodeCount()
Returns the number of dependent predicate codes associated with this rule. |
String |
getErrorCode()
Returns the error code associated with this rule. |
String |
getName()
Returns the name of this component. |
String |
getPredicateCode()
Returns the predicate code associated with this rule. |
ValidationSeverityEnum |
getSeverity()
Returns the severity of this rule. |
void |
removeDependentPredicateCode(String code)
Removes a dependent predicate code. |
void |
setAnnotation(Annotation annotation)
Sets the annotation. |
void |
setErrorCode(String errorCode)
Sets the error code. |
void |
setName(String name)
Sets the name. |
void |
setPredicateCode(String predicateCode)
Sets the predicate code. |
void |
setSeverity(ValidationSeverityEnum severity)
Sets the severity. |
String |
toString()
|
boolean |
validate(Object object,
DataComponent component,
ComplexDataObject context,
ValidationManager manager)
Validate the given object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultValidationRule()
Method Detail |
---|
public String getName()
ModelComponent
getName
in interface ModelComponent
public Annotation getAnnotation()
ValidationRule
getAnnotation
in interface ValidationRule
public ValidationSeverityEnum getSeverity()
ValidationRule
getSeverity
in interface ValidationRule
public String getErrorCode()
ValidationRule
getErrorCode
in interface ValidationRule
public void setName(String name)
name
- The name.public void setAnnotation(Annotation annotation)
annotation
- The annotation.public void setSeverity(ValidationSeverityEnum severity)
severity
- The severity.public void setErrorCode(String errorCode)
errorCode
- The error code.public String getPredicateCode()
ValidationRule
getPredicateCode
in interface ValidationRule
public void setPredicateCode(String predicateCode)
predicateCode
- The predicate code.public int getDependentPredicateCodeCount()
ValidationRule
getDependentPredicateCodeCount
in interface ValidationRule
public String getDependentPredicateCode(int index)
ValidationRule
index
.
getDependentPredicateCode
in interface ValidationRule
index
- the index of the code to return.
public void addDependentPredicateCode(String code)
code
- The code to add.public void removeDependentPredicateCode(String code)
code
- The code to remove.public boolean validate(Object object, DataComponent component, ComplexDataObject context, ValidationManager manager) throws ValidationException
Validator
validate
in interface Validator
object
- The object to be validated - commonly a String, Integer, Double, Date etc.component
- The Element
or Attribute
inside context
which defines object
.context
- The parent of object
- could be null
.manager
- The validation manager which is performing this validation.
ValidationException
- If the object is not valid and the validation maanger is operating in exception mode.public String toString()
toString
in class Object
protected ComplexDataObject getContextForPredicateChecking(Object object, ComplexDataObject context)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |