|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springjutsu.validation.webflow.BaseWebflowValidator<T>
T - Class which this validator validatespublic class BaseWebflowValidator<T>
An extensible / parameterizable base validator for use in Spring Webflow. Currently have to use this since there's no option in webflow to inject a custom @link{ValidationHelper} instance. So, users can extend and parameterize this instead, and register it as a validator bean, and bam nifty, it'll call validation. Chose this one because it supports the Errors object. The user can also perform validation outside of what's in XML by overriding the #doManualValidation method.
Validator,
doManualValidation(String, String, Object, Errors)| Field Summary | |
|---|---|
protected Class<T> |
entityClass
The parameterization-specified class of which an instance will be validated by this validator. |
| Constructor Summary | |
|---|---|
BaseWebflowValidator()
Default constructor. |
|
| Method Summary | |
|---|---|
protected Class<T> |
calculateEntityClass()
Calculates the class specified in the parameterization. |
void |
doManualValidation(String flowId,
String stateId,
Object target,
org.springframework.validation.Errors errors)
Overload doManualValidation if it is wished to perform validation in addition to what is specified in the rules. |
boolean |
supports(Class<?> clazz)
Supports a class if this class was parameterized for it, and if the validation manager has rules for it. |
void |
validate(Object target,
org.springframework.validation.Errors errors)
Perform actual validation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Class<T> entityClass
| Constructor Detail |
|---|
public BaseWebflowValidator()
| Method Detail |
|---|
protected Class<T> calculateEntityClass()
public boolean supports(Class<?> clazz)
supports in interface org.springframework.validation.Validatorclazz - The class to check support for
public void validate(Object target,
org.springframework.validation.Errors errors)
validate in interface org.springframework.validation.Validatortarget - the base object to validateerrors - the Errors object on which to record errors.
public void doManualValidation(String flowId,
String stateId,
Object target,
org.springframework.validation.Errors errors)
flowId - Provides the Web Flow Flow ID.stateId - Provides the Web Flow State ID.target - Provides the Object being validated.errors - Provides an Errors interface for recording validation messages.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||