|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DefaultValidationRule
biz.c24.io.api.data.DomainConstraint
public class DomainConstraint
A validation rule whose validation routine is dependent on an identifier looked up via an XPath statement in the object model being validated.
The XPath statment is given by the selector
attribute and should be specified relative to the parent
of the component to be validated
.
The identifier found via the XPath statement is checked against DomainConstraintManager
and the registered
validator, if one exisits, is then responsible for answering the validation call.
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.
DomainConstraintManager
,
Serialized FormConstructor Summary | |
---|---|
DomainConstraint()
Creates a new instance. |
Method Summary | |
---|---|
String |
getIdentifier()
Returns the identifier which will be used if no XPath selector is present or if the XPath selector's value is not found. |
XPathStatement |
getSelector()
Returns the XPath selector which will be used to locate an identifier within the object model. |
void |
setIdentifier(String identifier)
Sets the identifier which will be used if no XPath selector is present or if the XPath selector's value is not found. |
void |
setSelector(XPathStatement selector)
Sets the XPath selector which will be used to locate an identifier within the object model. |
String |
toString()
|
boolean |
validate(Object object,
DataComponent component,
ComplexDataObject context,
ValidationManager manager)
Validate the given object. |
Methods inherited from class biz.c24.io.api.data.DefaultValidationRule |
---|
addDependentPredicateCode, getAnnotation, getContextForPredicateChecking, getDependentPredicateCode, getDependentPredicateCodeCount, getErrorCode, getName, getPredicateCode, getSeverity, removeDependentPredicateCode, setAnnotation, setErrorCode, setName, setPredicateCode, setSeverity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DomainConstraint()
Method Detail |
---|
public XPathStatement getSelector()
public void setSelector(XPathStatement selector)
selector
- The selector.public String getIdentifier()
public void setIdentifier(String identifier)
identifier
- The identifier.public boolean validate(Object object, DataComponent component, ComplexDataObject context, ValidationManager manager) throws ValidationException
Validator
validate
in interface Validator
validate
in class DefaultValidationRule
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 DefaultValidationRule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |