org.iscreen.mvel
Class MvelValidationServiceValidator
java.lang.Object
org.iscreen.impl.ValidationServiceValidator
org.iscreen.mvel.MvelValidationServiceValidator
- All Implemented Interfaces:
- ValidatorWrapper
public class MvelValidationServiceValidator
- extends ValidationServiceValidator
- Author:
- Shellman, Dan
Methods inherited from class org.iscreen.impl.ValidationServiceValidator |
createNewContext, getDoc, getIfExpression, getIterateExpression, getMapExpression, getName, isFailFast, setFailFast, setIterateExpression, setName, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAP
public static final java.lang.String DEFAULT_MAP
- See Also:
- Constant Field Values
MvelValidationServiceValidator
public MvelValidationServiceValidator(DefaultValidationService service,
ValidationService theParentService)
- Default constructor.
- Parameters:
service
- The validation service this validator representstheParentService
- The parent validation service
shouldIterate
protected boolean shouldIterate(InternalValidatorContext context,
ContextBean root,
java.lang.Object obj)
- Determines whether we're iterating over the mapped object.
- Specified by:
shouldIterate
in class ValidationServiceValidator
- Parameters:
context
- The ValidatorContextroot
- The ContextBeanobj
- The object being validated.
- Returns:
- Returns true if we should iterate.
shouldExecute
protected boolean shouldExecute(InternalValidatorContext context,
ContextBean root,
java.lang.Object obj)
- Determines whether the inclusion/call to the validation set
should occur.
- Specified by:
shouldExecute
in class ValidationServiceValidator
- Parameters:
context
- The ValidatorContextroot
- The ContextBeanobj
- The object being validated.
- Returns:
- Returns true if the validation set should be called/executed.
mapObject
protected java.lang.Object mapObject(InternalValidatorContext context,
ContextBean contextBean,
java.lang.Object obj)
- Handle the mapping of the object being validated to the property
that will be validated (may be the object, itself).
- Specified by:
mapObject
in class ValidationServiceValidator
- Parameters:
context
- The ValidatorContextcontextBean
- The ContextBeanobj
- The object being validated.
- Returns:
- Returns the object that will be forwarded to the called
validation set.
getCompiledIfExpression
protected java.io.Serializable getCompiledIfExpression()
getCompiledMapExpression
protected java.io.Serializable getCompiledMapExpression()
setIfExpression
public void setIfExpression(java.lang.String exp)
- Overrides:
setIfExpression
in class ValidationServiceValidator
setMapExpression
public void setMapExpression(java.lang.String exp)
- Overrides:
setMapExpression
in class ValidationServiceValidator