org.springmodules.validation.bean.rule
Class ExpressionValidationRule

java.lang.Object
  extended by org.springmodules.validation.bean.rule.AbstractValidationRule
      extended by 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

Field Summary
static String DEFAULT_ERROR_CODE
           
 
Constructor Summary
ExpressionValidationRule(ConditionExpressionParser parser, String expression)
          Constructs a new ExpressionValidationRule with given expression and expression parser.
 
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
 

Field Detail

DEFAULT_ERROR_CODE

public static final String DEFAULT_ERROR_CODE
See Also:
Constant Field Values
Constructor Detail

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.
Method Detail

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.