public interface ValidationProvider
Modifier and Type | Method and Description |
---|---|
void |
addValidationMetaData(MetaData metaData,
ClassLoader classLoader,
Class<?>... groups)
Based on the JSR-303 annotations of the
MetaData 's bindclass, this method adds the Validation to
the FieldDef initions. |
void |
validateBean(Object bean,
FieldProcessor fieldProcessor,
Class<?>... groups)
Validates the given bean by adding error-messages to the
FieldDef initions, using
FieldProcessor.addErrorMessage(FieldDef, String) . |
void |
validateBean(Object bean,
FieldProcessor fieldProcessor,
String[] excludeBindings,
Class<?>... groups)
Validates the given bean by adding error-messages to the
FieldDef initions, using
FieldProcessor.addErrorMessage(FieldDef, String) . |
void |
validateField(Object bean,
FieldProcessor fieldProcessor,
String fieldBinding,
Class<?>... groups)
Validates a single
FieldDef by adding error-messages to it, using
FieldProcessor.addErrorMessage(FieldDef, String) . |
void validateBean(Object bean, FieldProcessor fieldProcessor, Class<?>... groups)
FieldDef
initions, using
FieldProcessor.addErrorMessage(FieldDef, String)
.bean
- the bean to validatefieldProcessor
- the FieldProcessor
containing the MetaData
for the beangroups
- the JSR-303 validation groups to useFieldProcessor.addErrorMessage(FieldDef, String)
void validateBean(Object bean, FieldProcessor fieldProcessor, String[] excludeBindings, Class<?>... groups)
FieldDef
initions, using
FieldProcessor.addErrorMessage(FieldDef, String)
.bean
- the bean to validatefieldProcessor
- the FieldProcessor
containing the MetaData
for the beanexcludeBindings
- an array of field-bindings to ignore during validationgroups
- the JSR-303 validation groups to useFieldProcessor.addErrorMessage(FieldDef, String)
void validateField(Object bean, FieldProcessor fieldProcessor, String fieldBinding, Class<?>... groups)
FieldDef
by adding error-messages to it, using
FieldProcessor.addErrorMessage(FieldDef, String)
.bean
- the bean to validatefieldProcessor
- the FieldProcessor
containing the MetaData
for the beanfieldBinding
- the binding of the FieldDef
to validategroups
- the JSR-303 validation groups to useFieldProcessor.addErrorMessage(FieldDef, String)
void addValidationMetaData(MetaData metaData, ClassLoader classLoader, Class<?>... groups) throws ClassNotFoundException
MetaData
's bindclass, this method adds the Validation
to
the FieldDef
initions.metaData
- the MetaData
to add the Validation
s toclassLoader
- the ClassLoader
to load the MetaData
s bindClassgroups
- the JSR-303 validation groups to useClassNotFoundException
- if the bindClass can not be loadedMin
,
Max
,
Size
,
Digits
,
NotNull
,
Future
,
Past
,
Type
,
Pattern
,
FileUpload
Copyright © 2011–2017 aiticon GmbH. All rights reserved.