org.iscreen.ognl
Class OgnlValidationServiceValidator
java.lang.Object
org.iscreen.impl.ValidationServiceValidator
org.iscreen.ognl.OgnlValidationServiceValidator
- All Implemented Interfaces:
- ValidatorWrapper
public class OgnlValidationServiceValidator
- extends ValidationServiceValidator
This is the OGNL-specific validator that handles forwarding from one
validation set to another.
- Author:
- Shellman, Dan
Methods inherited from class org.iscreen.impl.ValidationServiceValidator |
createNewContext, getDoc, getIfExpression, getIterateExpression, getMapExpression, getName, isFailFast, setFailFast, setIfExpression, 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
OgnlValidationServiceValidator
public OgnlValidationServiceValidator(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.
setMapExpression
public void setMapExpression(java.lang.String exp)
- Overrides:
setMapExpression
in class ValidationServiceValidator