org.mod4j.runtime.validation
Class BusinessRuleValidationSupport
java.lang.Object
org.mod4j.runtime.validation.BusinessRuleValidationSupport
public class BusinessRuleValidationSupport
- extends java.lang.Object
- Author:
- Eric Jan Malotaux
|
Method Summary |
void |
addValidator(org.springframework.validation.Validator validator)
Add the given validator to the collection of validators that will be executed on this object when
the validate() method is called. |
boolean |
isActive()
|
void |
setActive(boolean active)
|
void |
validate()
Validate this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validators
protected java.util.List<org.springframework.validation.Validator> validators
validationTemplate
protected final BusinessRuleValidationTemplate validationTemplate
BusinessRuleValidationSupport
public BusinessRuleValidationSupport(java.lang.Object object)
isActive
public boolean isActive()
setActive
public void setActive(boolean active)
addValidator
public void addValidator(org.springframework.validation.Validator validator)
- Add the given
validator to the collection of validators that will be executed on this object when
the validate() method is called. The validators will be invoked in the order they were added.
- Parameters:
validator - -
the validator being added.
validate
public void validate()
throws BusinessRuleException
- Validate this object.
If active, validation is performed by calling every
Validator added by the addValidator(Validator) method,
in the order they were added.
- Throws:
BusinessRuleException - -
thrown when one or more errors are found. The exception thrown has as its cause a
BindException containing information on all errors found.
Copyright © 2009. All Rights Reserved.