| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.valang.predicates.BasicValidationRule
public class BasicValidationRule
Validation rule implementation that will validate a target bean an return an error message is the validation fails.
| Constructor Summary | |
|---|---|
BasicValidationRule(String defaultPropertyName,
                    org.apache.commons.collections.Predicate predicate,
                    org.apache.commons.collections.Predicate wherePredicate,
                    String errorKey,
                    String errorMessage,
                    Collection<Function> errorArgs)
Constructor.  | 
|
BasicValidationRule(String defaultPropertyName,
                    org.apache.commons.collections.Predicate predicate,
                    String errorMessage)
Constructor.  | 
|
| Method Summary | |
|---|---|
 Collection<Function> | 
getErrorArgs()
Get error args.  | 
 String | 
getErrorKey()
Gets error key.  | 
 String | 
getErrorMessage()
Gets error message.  | 
 String | 
getField()
Gets field.  | 
 org.apache.commons.collections.Predicate | 
getPredicate()
Gets predicate.  | 
 void | 
validate(Object target,
         Errors errors)
Validates bean and records any errors.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BasicValidationRule(String defaultPropertyName,
                           org.apache.commons.collections.Predicate predicate,
                           String errorMessage)
field - Default property/field name.predicate - Predicate used for comparison.errorMessage - Default error message.
public BasicValidationRule(String defaultPropertyName,
                           org.apache.commons.collections.Predicate predicate,
                           org.apache.commons.collections.Predicate wherePredicate,
                           String errorKey,
                           String errorMessage,
                           Collection<Function> errorArgs)
field - Default property/field name.predicate - Predicate used for comparison.wherePredicate - Where predicate used for whether or not validation should be performed.errorKey - Message resource key for the error.errorMessage - Default error message.errorArgs - Error message argument.| Method Detail | 
|---|
public org.apache.commons.collections.Predicate getPredicate()
public String getErrorMessage()
public String getField()
public String getErrorKey()
public Collection<Function> getErrorArgs()
public void validate(Object target,
                     Errors errors)
validate in interface ValidationRule
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||