|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.validation.expression.ExpressionValidator
public class ExpressionValidator
A Facade to the classes that perform expression based validation. Hides the fact that we
might be using one of many implementations to actually run expression validation. When the
ExpressionExecutor
is first requested
an attempt is made to find the best working executor available. The following classes will
be tried in turn until a working instance is found:
Constructor Summary | |
---|---|
ExpressionValidator()
|
Method Summary | |
---|---|
static void |
evaluate(ActionBean bean,
ParameterName name,
List<Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors)
Run expression validation on the bean property provided with the values provided. |
static ExpressionExecutor |
getExecutor()
Gets the executor that will be used to run expression evaluation. |
static void |
initialize()
Attempts to instantiate executor classes (as described in the class level javadoc) until a working one is found. |
static void |
setExecutor(ExpressionExecutor executor)
Allows anyone who is interested to substitute a different ExpressionExecutor instance instead of the one picked by the ExpressionValidator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionValidator()
Method Detail |
---|
public static void initialize()
public static void evaluate(ActionBean bean, ParameterName name, List<Object> values, ValidationMetadata validationInfo, ValidationErrors errors)
bean
- the ActionBean being validatedname
- the ParameterName object representing the parameter being validatedvalues
- the values to be validated (zero or more)validationInfo
- the validation metadata for the named propertyerrors
- the ValidationErrors for the property, to be added topublic static ExpressionExecutor getExecutor()
initialize()
method will be run to set one up.
public static void setExecutor(ExpressionExecutor executor)
executor
- the executor to use from now on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |