org.iscreen.impl
Interface ValidatorWrapper

All Known Implementing Classes:
BaseConfiguredValidator, MvelConfiguredValidator, MvelValidationServiceValidator, OgnlConfiguredValidator, OgnlValidationServiceValidator, ValidationServiceValidator

public interface ValidatorWrapper

This interface represents a wrapper around a validator. The wrapper class acts as the bridge to calling the validator.

Author:
Shellman, Dan

Method Summary
 DocumentationIterator getDoc()
          Called to retrieve the documentation for the validator.
 java.lang.String getName()
          Called to retrieve the "name" of the validator.
 boolean validate(InternalValidatorContext context, ContextBean root, ValidationTrace trace, java.lang.Object obj)
          Called to have the wrapper validate the passed object.
 

Method Detail

validate

boolean validate(InternalValidatorContext context,
                 ContextBean root,
                 ValidationTrace trace,
                 java.lang.Object obj)
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.

Parameters:
context - The validation context to pass on to the contained validator.
root - The OGNL root, to be updated as appropriate.
trace - The validation trace to track what calls what.
obj - The object to be validated.
Returns:
Returns true if validation should continue; false if it should be halted.

getName

java.lang.String getName()
Called to retrieve the "name" of the validator. The name represents some form of identification, though it does not have to be unique in any way. The name is merely associated with the configured validator, and is referenced when reporting failures.

Returns:
Returns the name of this validator.

getDoc

DocumentationIterator getDoc()
Called to retrieve the documentation for the validator.

Returns:
Returns the documentation for the validator.