Class Overview
Configurable bean class that exposes a specific JSR-303 Validator
through its original interface as well as through the Spring
Validator
interface.
Summary
Public Methods |
void
|
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
void
|
setMessageInterpolator(MessageInterpolator messageInterpolator)
Specify a custom MessageInterpolator to use for this Validator.
|
void
|
setTraversableResolver(TraversableResolver traversableResolver)
Specify a custom TraversableResolver to use for this Validator.
|
void
|
setValidatorFactory(ValidatorFactory validatorFactory)
Set the ValidatorFactory to obtain the target Validator from.
|
[Expand]
Inherited Methods |
From class
org.springframework.validation.beanvalidation.SpringValidatorAdapter
Object[]
|
getArgumentsForConstraint(String objectName, String field, descriptor)
Return FieldError arguments for a validation error on the given field.
|
BeanDescriptor
|
getConstraintsForClass(Class<?> clazz)
|
boolean
|
supports(Class<?> clazz)
Can this Validator validate
instances of the supplied clazz ?
This method is typically implemented like so:
return Foo.class.isAssignableFrom(clazz);
(Where Foo is the class (or superclass) of the actual
object instance that is to be validated .)
|
<T>
T
|
unwrap(Class<T> type)
|
void
|
validate(Object target, Errors errors)
Validate the supplied target object, which must be
of a Class for which the supports(Class) method
typically has (or would) return true .
|
<T>
Set<>
|
validate(T object, Class...<?> groups)
|
<T>
Set<>
|
validateProperty(T object, String propertyName, Class...<?> groups)
|
<T>
Set<>
|
validateValue(Class<T> beanType, String propertyName, Object value, Class...<?> groups)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.beans.factory.InitializingBean
abstract
void
|
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
|
From interface
org.springframework.validation.Validator
abstract
boolean
|
supports(Class<?> clazz)
Can this Validator validate
instances of the supplied clazz ?
This method is typically implemented like so:
return Foo.class.isAssignableFrom(clazz);
(Where Foo is the class (or superclass) of the actual
object instance that is to be validated .)
|
abstract
void
|
validate(Object target, Errors errors)
Validate the supplied target object, which must be
of a Class for which the supports(Class) method
typically has (or would) return true .
|
|
Public Constructors
public
CustomValidatorBean
()
Public Methods
public
void
afterPropertiesSet
()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only
possible when all bean properties have been set and to throw an
exception in the event of misconfiguration.
public
void
setMessageInterpolator
(MessageInterpolator messageInterpolator)
Specify a custom MessageInterpolator to use for this Validator.
public
void
setTraversableResolver
(TraversableResolver traversableResolver)
Specify a custom TraversableResolver to use for this Validator.
public
void
setValidatorFactory
(ValidatorFactory validatorFactory)
Set the ValidatorFactory to obtain the target Validator from.
Default is javax.validation.Validation#buildDefaultValidatorFactory().