|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BeanValidationConfiguration
Holds the various validatoin rules of a bean. This configuration is made out of the following configuration rules:
Global Rules
- Rules that are associated with the bean itself. Validation error of this rule will
be associated with the bean as well (see Errors.getGlobalError()
).
Property Rules
- Rules that are associated with a specific property of the bean. Validation error
of this rule will be associated with the property as well
(see Errors.getFieldError(String)
). Note that the condition of these
rules however sould still be applied on the bean itself.
Custom Validator
- This is not a validation rule per se, but a custom validator that can be
associated with the bean. This enables associating already exsiting or perhaps very complex validators with
the bean.
Required Validatable Properties
- These are all the bean properties that need to be valid on their
own in order for the bean itself to be valid. A simple example can be a collection property, where in order
for the bean to be valid, all elements in the collection need to be valid as well.
Method Summary | |
---|---|
CascadeValidation[] |
getCascadeValidations()
Returns the configured cascade validations. |
Validator |
getCustomValidator()
Returns the custom validator associated with this configuration, null if no custom validator
is associated. |
ValidationRule[] |
getGlobalRules()
Returns the global validation rules for the bean. |
ValidationRule[] |
getPropertyRules(String propertyName)
Returns the property validation rules for the bean that are associated with the given property name. |
String[] |
getValidatedProperties()
Returns a list of all properties that are associated with validation rules. |
Method Detail |
---|
ValidationRule[] getGlobalRules()
null
. If no global rule
is defined, an empty array is returned.
ValidationRule[] getPropertyRules(String propertyName)
null
. If no rule is associated with the given property, an empty array is returned.
propertyName
- The name of the bean property.
String[] getValidatedProperties()
Validator getCustomValidator()
null
if no custom validator
is associated.
CascadeValidation[] getCascadeValidations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |