org.loom.validator
Class MethodValidator

java.lang.Object
  extended by org.loom.validator.AbstractPropertyValidator
      extended by org.loom.validator.MethodValidator
All Implemented Interfaces:
FormInputDecorator, PropertyValidator

public class MethodValidator
extends AbstractPropertyValidator

Calls a given method to validate


Constructor Summary
MethodValidator()
           
 
Method Summary
 void decorate(FormInputTag t)
          Add attributes to the tag based on this Validator instance metadata
 void setValidateMethod(java.lang.reflect.Method validateMethod)
           
 java.lang.String toString()
           
 void validate(ValidationRequest request, java.lang.Object container)
          Calls the validation method
 
Methods inherited from class org.loom.validator.AbstractPropertyValidator
getMessagePrefix, getOverridenMessageKey, getPropertyPath, isBindMessages, isValidateCollectionContainer, pushPropertyPath, setBindMessages, setMessagePrefix, setOverridenMessageKey, setPropertyPath, setValidateCollectionContainer, validateCollectionContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodValidator

public MethodValidator()
Method Detail

validate

public void validate(ValidationRequest request,
                     java.lang.Object container)
Calls the validation method

Parameters:
container - The container of the method to be invoked

setValidateMethod

public void setValidateMethod(java.lang.reflect.Method validateMethod)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

decorate

public void decorate(FormInputTag t)
Description copied from class: AbstractPropertyValidator
Add attributes to the tag based on this Validator instance metadata

Specified by:
decorate in interface FormInputDecorator
Overrides:
decorate in class AbstractPropertyValidator
Parameters:
t - the tag to be modified