net.sourceforge.stripes.validation.expression
Interface ExpressionExecutor

All Known Implementing Classes:
CommonsElExpressionExecutor, ExpressionExecutorSupport, Jsp20ExpressionExecutor, Jsp21ExpressionExecutor

public interface ExpressionExecutor

Simple interface that specifies how Stripes will invoke expression based validation. Generally used via the ExpressionValidator which will pick an appropriate implementation based on the current environment.

Implementations should throw an exception from their default constructor if they are unable to operate due to class versioning of availability issues.

Since:
Stripes 1.5
Author:
Tim Fennell

Field Summary
static String ERROR_DEFAULT_SCOPE
          The default scope to use when constructing errors.
static String ERROR_KEY
          The error key to use when constructing errors.
static String THIS
          The special name given to the field that the expression is annotated on.
 
Method Summary
 void evaluate(ActionBean bean, ParameterName name, List<Object> values, ValidationMetadata validationInfo, ValidationErrors errors)
          Performs validation of an ActionBean property using the expression contained within the validation metadata.
 

Field Detail

ERROR_DEFAULT_SCOPE

static final String ERROR_DEFAULT_SCOPE
The default scope to use when constructing errors.

See Also:
Constant Field Values

ERROR_KEY

static final String ERROR_KEY
The error key to use when constructing errors.

See Also:
Constant Field Values

THIS

static final String THIS
The special name given to the field that the expression is annotated on.

See Also:
Constant Field Values
Method Detail

evaluate

void evaluate(ActionBean bean,
              ParameterName name,
              List<Object> values,
              ValidationMetadata validationInfo,
              ValidationErrors errors)
Performs validation of an ActionBean property using the expression contained within the validation metadata. If the expression does not evaluate to true then an error will be added to the validation errors. Otherwise there are no side effects.

Parameters:
bean - the ActionBean instance owning the field being validated
name - the name of the field being validated
values - the List of values (post type conversion), each to be validated
validationInfo - the validation metadata for the field
errors - the ValidationErrors object into which to place any errors


? Copyright 2005-2006, Stripes Development Team.