org.iscreen.impl
Class ValidationServiceValidator

java.lang.Object
  extended by org.iscreen.impl.ValidationServiceValidator
All Implemented Interfaces:
ValidatorWrapper

public class ValidationServiceValidator
extends java.lang.Object
implements ValidatorWrapper

This is a special ValidatorWrapper that forwards validation to a different Validation Set.

Author:
Shellman, Dan

Field Summary
protected  boolean failFastFlag
           
protected  java.lang.String ifExp
           
protected  java.lang.String iterateExp
           
protected  java.lang.String mapExp
           
protected  DefaultValidationService wrappedService
           
 
Constructor Summary
ValidationServiceValidator(DefaultValidationService service)
          Default constructor.
 
Method Summary
 void setFailFast(boolean flag)
           
 void setIfExpression(java.lang.String exp)
           
 void setIterateExpression(java.lang.String exp)
           
 void setMapExpression(java.lang.String exp)
           
protected  boolean shouldIterate()
          Determines whether we're iterating over the mapped object.
 boolean validate(DefaultValidatorContext context, OgnlRoot root, java.lang.Object obj)
          Called to have the wrapper validate the passed object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wrappedService

protected DefaultValidationService wrappedService

ifExp

protected java.lang.String ifExp

iterateExp

protected java.lang.String iterateExp

mapExp

protected java.lang.String mapExp

failFastFlag

protected boolean failFastFlag
Constructor Detail

ValidationServiceValidator

public ValidationServiceValidator(DefaultValidationService service)
Default constructor.

Method Detail

validate

public boolean validate(DefaultValidatorContext context,
                        OgnlRoot root,
                        java.lang.Object obj)
Description copied from interface: ValidatorWrapper
Called to have the wrapper validate the passed object. It is expected that the wrapper will update the root object as appropriate. The context already has access to the root that is being passed in.

Specified by:
validate in interface ValidatorWrapper
Parameters:
context - The validation context to pass on to the contained validator.
root - The OGNL root, to be updated as appropriate.
obj - The object to be validated.

setIfExpression

public void setIfExpression(java.lang.String exp)

setIterateExpression

public void setIterateExpression(java.lang.String exp)

setMapExpression

public void setMapExpression(java.lang.String exp)

setFailFast

public void setFailFast(boolean flag)

shouldIterate

protected boolean shouldIterate()
Determines whether we're iterating over the mapped object.

Returns:
Returns true if we should iterate.