org.springmodules.validation.bean.rule
Class ExpressionValidationRule
java.lang.Object
org.springmodules.validation.bean.rule.AbstractValidationRule
org.springmodules.validation.bean.rule.ExpressionValidationRule
- All Implemented Interfaces:
- ValidationRule
public class ExpressionValidationRule
- extends AbstractValidationRule
An AbstractValidationRule
implementation that validates and checks a value based on a condition expression
(See package org.springmodules.validation.util.cel).
- Author:
- Uri Boness
Method Summary |
Condition |
getCondition()
Returns the condition of this validation rule. |
protected boolean |
supportsNullValues()
This rule supports null values as the expression may operate on null values. |
Methods inherited from class org.springmodules.validation.bean.rule.AbstractValidationRule |
checkContexts, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, getDefaultErrorMessage, getErrorArguments, getErrorCode, isApplicable, setApplicabilityCondition, setContextTokens, setDefaultErrorMessage, setErrorArgumentsResolver, setErrorCode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ERROR_CODE
public static final String DEFAULT_ERROR_CODE
- See Also:
- Constant Field Values
ExpressionValidationRule
public ExpressionValidationRule(ConditionExpressionParser parser,
String expression)
- Constructs a new ExpressionValidationRule with given expression and expression parser.
- Parameters:
parser
- The expression parser to use when parsing the given expression.expression
- The condition expression.
getCondition
public Condition getCondition()
- Returns the condition of this validation rule.
- Returns:
- The condition of this validation rule.
- See Also:
ValidationRule.getCondition()
supportsNullValues
protected boolean supportsNullValues()
- This rule supports null values as the expression may operate on null values.
- Overrides:
supportsNullValues
in class AbstractValidationRule
- Returns:
- true.
Copyright © 2009. All Rights Reserved.