|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springmodules.validation.commons.AbstractBeanValidator
public abstract class AbstractBeanValidator
Constructor Summary | |
---|---|
AbstractBeanValidator()
|
Method Summary | |
---|---|
protected void |
cleanupValidator(org.apache.commons.validator.Validator validator)
A callback method that is called just after the validate() method is called on the given validator. |
protected abstract String |
getFormName(Class aClass)
Returns the name of the Commons Validator Form used to
validate instances of the supplied class. |
protected Locale |
getLocale()
Gets the Locale used to lookup Validator instances. |
protected void |
initValidator(org.apache.commons.validator.Validator validator)
A callback method that is called just before the validate() method is called on the given validator. |
void |
setValidatorFactory(ValidatorFactory validatorFactory)
|
boolean |
supports(Class clazz)
Checks if the validatorFactory is configured to handle this class. |
void |
validate(Object obj,
Errors errors)
Validates the supplied object using a org.apache.commons.validator.Validator loaded from
the configured ValidatorFactory . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBeanValidator()
Method Detail |
---|
public boolean supports(Class clazz)
supports
in interface Validator
true
if the validatorFactory supports the class,
or false
if notgetFormName(Class)
public void validate(Object obj, Errors errors)
org.apache.commons.validator.Validator
loaded from
the configured ValidatorFactory
.
validate
in interface Validator
ValidatorFactory
public void setValidatorFactory(ValidatorFactory validatorFactory)
protected Locale getLocale()
Locale
used to lookup Validator
instances. Default implementation
returns the value of Locale.getDefault()
. Subclasses can override this to change
Locale
-handling behavior.
protected void initValidator(org.apache.commons.validator.Validator validator)
validator
- protected void cleanupValidator(org.apache.commons.validator.Validator validator)
initValidator(org.apache.commons.validator.Validator)
method.
validator
- protected abstract String getFormName(Class aClass)
Form
used to
validate instances of the supplied class.
aClass
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |