|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.forms.datatype.validationruleimpl.AbstractValidationRule
public abstract class AbstractValidationRule
Abstract base class providing common functionality for many ValidationRule
implementations.
Constructor Summary | |
---|---|
AbstractValidationRule()
|
Method Summary | |
---|---|
protected Object |
evaluateComparable(org.outerj.expression.Expression expression,
org.outerj.expression.ExpressionContext expressionContext,
String exprName,
String ruleName)
Helper method for evaluating expressions whose result is comparable. |
protected Object |
evaluateNumeric(org.outerj.expression.Expression expression,
org.outerj.expression.ExpressionContext expressionContext,
String exprName,
String ruleName)
Helper method for evaluating expressions whose result is numeric. |
ValidationError |
getFailMessage()
Returns the failMessage wrapped in a ValidationError object. |
boolean |
hasFailMessage()
Returns true if this validation rule has a user-defined fail message. |
void |
setFailMessage(XMLizable object)
Sets the failmessage to use for this validation rule, this will be used instead of the validation rules' built-in message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.forms.datatype.ValidationRule |
---|
supportsType, validate |
Constructor Detail |
---|
public AbstractValidationRule()
Method Detail |
---|
public void setFailMessage(XMLizable object)
public ValidationError getFailMessage()
public boolean hasFailMessage()
protected Object evaluateNumeric(org.outerj.expression.Expression expression, org.outerj.expression.ExpressionContext expressionContext, String exprName, String ruleName)
exprName
- a name for the expression that's descriptive for the user, e.g. the name of the attribute in which it was definedruleName
- a descriptive name for the validation rule, usually the rule's element name
protected Object evaluateComparable(org.outerj.expression.Expression expression, org.outerj.expression.ExpressionContext expressionContext, String exprName, String ruleName)
exprName
- a name for the expression that's descriptive for the user, e.g. the name of the attribute in which it was definedruleName
- a descriptive name for the validation rule, usually the rule's element name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |