org.springmodules.validation.bean.conf
Interface BeanValidationConfiguration

All Known Subinterfaces:
MutableBeanValidationConfiguration
All Known Implementing Classes:
DefaultBeanValidationConfiguration

public interface BeanValidationConfiguration

Holds the various validatoin rules of a bean. This configuration is made out of the following configuration rules:

Author:
Uri Boness

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

getGlobalRules

ValidationRule[] getGlobalRules()
Returns the global validation rules for the bean. This method never returns null. If no global rule is defined, an empty array is returned.

Returns:
The global validation rules for the bean.

getPropertyRules

ValidationRule[] getPropertyRules(String propertyName)
Returns the property validation rules for the bean that are associated with the given property name. This method never returns null. If no rule is associated with the given property, an empty array is returned.

Parameters:
propertyName - The name of the bean property.
Returns:
The property validation rules for the bean.

getValidatedProperties

String[] getValidatedProperties()
Returns a list of all properties that are associated with validation rules.

Returns:
A list of all properties that are associated with validation rules.

getCustomValidator

Validator getCustomValidator()
Returns the custom validator associated with this configuration, null if no custom validator is associated.

Returns:
The customer validator associated with this configuration.

getCascadeValidations

CascadeValidation[] getCascadeValidations()
Returns the configured cascade validations.

Returns:
The configured cascade validations.


Copyright © 2009. All Rights Reserved.