|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.validator.AbstractActionValidatorManager
public abstract class AbstractActionValidatorManager
An abstract implementation of
ActionValidatorManager
interface that contains the logics of
validating action objects and utlity methods common to all subclass eg. method to build validator
key ( buildValidatorKey(Class, String)
) that subclass will be interested in when eg.
saving the ValidatorConfig
in a Map cache.
This class could serves as the base class for example DefaultActionValidatorManager
which reads in the validation configuration information through <action-class-name>-<action-alias>-validation.xml or
<action-class-name>-validation.xml xml file format or a custom ActionValidatorManager
that reads in the validation configuration through annotation where the diference between them is just how to get
the validation configuration information (in this example, through xml and annotation respectively).
Nested Class Summary | |
---|---|
protected class |
AbstractActionValidatorManager.InternalValidatorContextWrapper
An ValidatorContext wrapper that
returns the full field name
AbstractActionValidatorManager.InternalValidatorContextWrapper.getFullFieldName(String)
by consulting it's parent if its an VisitorFieldValidator.AppendingValidatorContext . |
Constructor Summary | |
---|---|
AbstractActionValidatorManager()
|
Method Summary | |
---|---|
protected String |
buildValidatorKey(Class clazz,
String context)
Builds a key for validators - used when caching validators. |
protected List |
buildValidatorsFromValidatorConfig(List validatorConfigs)
|
void |
validate(Object object,
List validators,
ValidatorContext validatorContext)
Validates an action through a series of validators with
the given validatorContext |
void |
validate(Object object,
String context)
Validates the given object using action and its context. |
void |
validate(Object object,
String context,
ValidatorContext validatorContext)
Validates an action give its context and a validation context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.opensymphony.xwork.validator.ActionValidatorManager |
---|
getValidators |
Constructor Detail |
---|
public AbstractActionValidatorManager()
Method Detail |
---|
public void validate(Object object, String context) throws ValidationException
validate
in interface ActionValidatorManager
object
- the action to validate.context
- the action's context.
ValidationException
- if an error happens when validating the action.public void validate(Object object, String context, ValidatorContext validatorContext) throws ValidationException
validate
in interface ActionValidatorManager
object
- the action to validate.context
- the action's context.validatorContext
-
ValidationException
- if an error happens when validating the action.public void validate(Object object, List validators, ValidatorContext validatorContext) throws ValidationException
validators
with
the given validatorContext
validate
in interface ActionValidatorManager
object
- validators
- validatorContext
-
ValidationException
protected String buildValidatorKey(Class clazz, String context)
clazz
- the action.context
- the action's context.
protected List buildValidatorsFromValidatorConfig(List validatorConfigs)
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |