|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.bean.conf.DefaultBeanValidationConfiguration
public class DefaultBeanValidationConfiguration
A default implementation of BeanValidationConfiguration.
| Constructor Summary | |
|---|---|
DefaultBeanValidationConfiguration()
Constructs a new DefaultBeanValidationConfiguration with no rules, validatable properties, or custom validator. |
|
| Method Summary | |
|---|---|
void |
addCascadeValidation(CascadeValidation cascadeValidation)
Adds the given cascade validation to this configuration. |
void |
addCascadeValidations(CascadeValidation[] cascadeValidations)
Adds the given cascade validations to this configuration. |
void |
addCustomValidator(Validator validator)
Adds the given validator to the custom validator of this configuration. |
void |
addCustomValidators(Validator[] validators)
Adds the given validators to the custom validator of this configuration. |
void |
addGlobalRule(ValidationRule globalRule)
Adds the given rule as global rules for this configuration. |
void |
addGlobalRules(ValidationRule[] globalRules)
Adds the given rules as global rules for this configuration. |
void |
addPropertyRule(String propertyName,
ValidationRule rule)
Adds the given validation rule to the given property. |
void |
addPropertyRules(String propertyName,
ValidationRule[] extraRules)
Adds the given validation rules to the given property. |
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. |
void |
setCascadeValidations(CascadeValidation[] cascadeValidations)
Sets the cascade validations of this configuration. |
void |
setCustomValidator(Validator validator)
Sets the custom validator for this configuration. |
void |
setCustomValidators(Validator[] validators)
Sets the custom validator for this configuration. |
void |
setGlobalRules(ValidationRule[] globalRules)
Sets the global rules for this configuration. |
void |
setPropertyRules(String propertyName,
ValidationRule[] rules)
Sets the property validation rules for the given property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultBeanValidationConfiguration()
| Method Detail |
|---|
public ValidationRule[] getGlobalRules()
BeanValidationConfigurationnull. If no global rule
is defined, an empty array is returned.
getGlobalRules in interface BeanValidationConfigurationBeanValidationConfiguration.getGlobalRules()public void setGlobalRules(ValidationRule[] globalRules)
setGlobalRules in interface MutableBeanValidationConfigurationglobalRules - The global rules for this configurationpublic void addGlobalRule(ValidationRule globalRule)
addGlobalRule in interface MutableBeanValidationConfigurationglobalRule - The rule to be added as global rules for this configuration.public void addGlobalRules(ValidationRule[] globalRules)
addGlobalRules in interface MutableBeanValidationConfigurationglobalRules - The rules to be added as global rules for this configuration.public ValidationRule[] getPropertyRules(String propertyName)
BeanValidationConfigurationnull. If no rule is associated with the given property, an empty array is returned.
getPropertyRules in interface BeanValidationConfigurationpropertyName - The name of the bean property.
BeanValidationConfiguration.getPropertyRules(String).public String[] getValidatedProperties()
BeanValidationConfiguration
getValidatedProperties in interface BeanValidationConfigurationBeanValidationConfiguration.getValidatedProperties()
public void setPropertyRules(String propertyName,
ValidationRule[] rules)
setPropertyRules in interface MutableBeanValidationConfigurationpropertyName - The name of the property.rules - The validation rules for the given property.
public void addPropertyRule(String propertyName,
ValidationRule rule)
addPropertyRule in interface MutableBeanValidationConfigurationpropertyName - The name of the property.rule - The validation rule to be added to the given property.
public void addPropertyRules(String propertyName,
ValidationRule[] extraRules)
addPropertyRules in interface MutableBeanValidationConfigurationpropertyName - The name of the property.extraRules - The extra validation rules that will be added to the given property.public Validator getCustomValidator()
BeanValidationConfigurationnull if no custom validator
is associated.
getCustomValidator in interface BeanValidationConfigurationBeanValidationConfiguration.getCustomValidator()public CascadeValidation[] getCascadeValidations()
BeanValidationConfiguration
getCascadeValidations in interface BeanValidationConfigurationBeanValidationConfiguration.getCascadeValidations()public void setCustomValidator(Validator validator)
setCustomValidator in interface MutableBeanValidationConfigurationvalidator - The custom validator for this configuration.public void setCustomValidators(Validator[] validators)
setCustomValidators in interface MutableBeanValidationConfigurationvalidators - The validators that will make the custom validator of this configuration.public void addCustomValidator(Validator validator)
addCustomValidator in interface MutableBeanValidationConfigurationvalidator - The validator to be added to the custom validator of this configuration.public void addCustomValidators(Validator[] validators)
addCustomValidators in interface MutableBeanValidationConfigurationvalidators - The validators to be added to the custom validator of this configuration.public void setCascadeValidations(CascadeValidation[] cascadeValidations)
setCascadeValidations in interface MutableBeanValidationConfigurationpublic void addCascadeValidation(CascadeValidation cascadeValidation)
addCascadeValidation in interface MutableBeanValidationConfigurationcascadeValidation - The cascase validation to be added to this configuration.public void addCascadeValidations(CascadeValidation[] cascadeValidations)
addCascadeValidations in interface MutableBeanValidationConfigurationcascadeValidations - The cascade validation to be added to this configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||