| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.commons.DefaultValidatorFactory
public class DefaultValidatorFactory
| Field Summary | |
|---|---|
static String | 
ERRORS_KEY
Key used to store the Spring Errors instance in the Validator | 
| Constructor Summary | |
|---|---|
DefaultValidatorFactory()
 | 
|
| Method Summary | |
|---|---|
 void | 
afterPropertiesSet()
Checks that the ValidatorResources exists and has been configured with resources
 via a call to setValidationConfigLocations. | 
 org.apache.commons.validator.Validator | 
getValidator(String beanName,
             Object bean,
             Errors errors)
Gets a new instance of a org.apache.commons.validator.Validator for the given bean. | 
 org.apache.commons.validator.ValidatorResources | 
getValidatorResources()
Gets the managed instance of ValidatorResources. | 
 boolean | 
hasRulesForBean(String beanName,
                Locale locale)
Returns true if this validator factory can create a validator that supports the given beanName and locale. | 
 void | 
setValidationConfigLocations(Resource[] validationConfigLocations)
Sets the locations of the validation configuration files from which to load validation rules.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String ERRORS_KEY
Errors instance in the Validator
| Constructor Detail | 
|---|
public DefaultValidatorFactory()
| Method Detail | 
|---|
public void afterPropertiesSet()
                        throws Exception
ValidatorResources exists and has been configured with resources
 via a call to setValidationConfigLocations.
afterPropertiesSet in interface InitializingBeanFatalBeanException - if setValidationConfigLocations() has not been called.
Exceptionpublic void setValidationConfigLocations(Resource[] validationConfigLocations)
ValidatorResources from the specified configuration files.
Resource, 
ValidatorResources
public org.apache.commons.validator.Validator getValidator(String beanName,
                                                           Object bean,
                                                           Errors errors)
org.apache.commons.validator.Validator for the given bean.
getValidator in interface ValidatorFactorybeanName - The name of the bean for which this Validator will be createdValidator
public boolean hasRulesForBean(String beanName,
                               Locale locale)
beanName and locale.
hasRulesForBean in interface ValidatorFactorybeanName - name of the bean to be validated.locale - Locale to search under.
true if this validator factory can create a validator for
         the given bean name, false otherwise.public org.apache.commons.validator.ValidatorResources getValidatorResources()
ValidatorResources.
getValidatorResources in interface ValidatorFactory
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||