public class AnnotationActionValidatorManager extends Object implements ActionValidatorManager
| Modifier and Type | Field and Description | 
|---|---|
protected static String | 
VALIDATION_CONFIG_SUFFIX
The file suffix for any validation file. 
 | 
| Constructor and Description | 
|---|
AnnotationActionValidatorManager()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected List<ValidatorConfig> | 
buildClassValidatorConfigs(Class aClass,
                          boolean checkFile)  | 
protected String | 
buildValidatorKey(Class clazz,
                 String context)
Builds a key for validators - used when caching validators. 
 | 
List<Validator> | 
getValidators(Class clazz,
             String context)
Returns a list of validators for the given class and context. 
 | 
List<Validator> | 
getValidators(Class clazz,
             String context,
             String method)
Returns a list of validators for the given class, context, and method. 
 | 
void | 
setFileManagerFactory(FileManagerFactory fileManagerFactory)  | 
void | 
setReloadingConfigs(String reloadingConfigs)  | 
void | 
setTextProviderFactory(TextProviderFactory textProviderFactory)  | 
void | 
setValidatorFactory(ValidatorFactory fac)  | 
void | 
setValidatorFileParser(ValidatorFileParser parser)  | 
void | 
validate(Object object,
        String context)
Validates the given object using action and its context. 
 | 
void | 
validate(Object object,
        String context,
        String method)
Validates the given object using an action, its context, and the name of the method being invoked on the action. 
 | 
void | 
validate(Object object,
        String context,
        ValidatorContext validatorContext)
Validates an action give its context and a validation context. 
 | 
void | 
validate(Object object,
        String context,
        ValidatorContext validatorContext,
        String method)
Validates an action give its context and a validation context. 
 | 
protected static final String VALIDATION_CONFIG_SUFFIX
public void setValidatorFactory(ValidatorFactory fac)
public void setValidatorFileParser(ValidatorFileParser parser)
public void setFileManagerFactory(FileManagerFactory fileManagerFactory)
public void setReloadingConfigs(String reloadingConfigs)
public void setTextProviderFactory(TextProviderFactory textProviderFactory)
public List<Validator> getValidators(Class clazz, String context)
ActionValidatorManagergetValidators in interface ActionValidatorManagerclazz - the class to lookup.context - the context of the action class - can be null.public List<Validator> getValidators(Class clazz, String context, String method)
ActionValidatorManagergetValidators in interface ActionValidatorManagerclazz - the class to lookup.context - the context of the action class - can be null.method - the name of the method being invoked on the action - can be null.public void validate(Object object, String context) throws ValidationException
ActionValidatorManagervalidate in interface ActionValidatorManagerobject - 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, String method) throws ValidationException
ActionValidatorManagervalidate in interface ActionValidatorManagerobject - the action to validate.context - the action's context.method - the name of the method being invoked on the action - can be null.ValidationException - if an error happens when validating the action.public void validate(Object object, String context, ValidatorContext validatorContext) throws ValidationException
ActionValidatorManagervalidate in interface ActionValidatorManagerobject - the action to validate.context - the action's context.validatorContext - the validation context to useValidationException - if an error happens when validating the action.public void validate(Object object, String context, ValidatorContext validatorContext, String method) throws ValidationException
ActionValidatorManagervalidate in interface ActionValidatorManagerobject - the action to validate.context - the action's context.validatorContext - the validation context to usemethod - the name of the method being invoked on the action - can be null.ValidationException - if an error happens when validating the action.protected String buildValidatorKey(Class clazz, String context)
clazz - the action.context - contextprotected List<ValidatorConfig> buildClassValidatorConfigs(Class aClass, boolean checkFile)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.