org.springmodules.validation.commons
Interface ValidatorFactory

All Known Implementing Classes:
DefaultValidatorFactory

public interface ValidatorFactory

Author:
Daniel Miller

Method Summary
 Validator getValidator(java.lang.String beanName, java.lang.Object bean, Errors errors)
          Gets a new instance of a validator for the given bean (form).
 ValidatorResources getValidatorResources()
           
 boolean hasRulesForBean(java.lang.String beanName, java.util.Locale locale)
          Returns true if this validator factory can create a validator that supports the given beanName and locale.
 

Method Detail

getValidator

Validator getValidator(java.lang.String beanName,
                       java.lang.Object bean,
                       Errors errors)
Gets a new instance of a validator for the given bean (form).

Parameters:
beanName - The name of the bean for which this validator will be created.

hasRulesForBean

boolean hasRulesForBean(java.lang.String beanName,
                        java.util.Locale locale)
Returns true if this validator factory can create a validator that supports the given beanName and locale.

Parameters:
beanName - String name of the bean to be validated.
locale - Locale of the validator to create.
Returns:
true if this validator factory can create a validator for the given bean name.

getValidatorResources

ValidatorResources getValidatorResources()
Returns:
Returns the validatorResources.


Copyright © 2005. All Rights Reserved.