Package org.apache.struts2.validator
Class DefaultValidatorFactory
java.lang.Object
org.apache.struts2.validator.DefaultValidatorFactory
- All Implemented Interfaces:
Initializable,ValidatorFactory
Default validator factory
- Version:
- $Date$ $Id$
- Author:
- Jason Carreira, James House
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultValidatorFactory(ObjectFactory objectFactory, ValidatorFileParser parser) -
Method Summary
Modifier and TypeMethodDescriptionGet a Validator that matches the given configuration.voidinit()Use this method to initialise your bean, the whole dependency graph was already builtLookup to get the FQ classname of the given validator name.voidregisterValidator(String name, String className) Registers the given validator to the existing map of validators.
-
Field Details
-
validators
-
objectFactory
-
validatorFileParser
-
-
Constructor Details
-
DefaultValidatorFactory
-
-
Method Details
-
init
public void init()Description copied from interface:InitializableUse this method to initialise your bean, the whole dependency graph was already built- Specified by:
initin interfaceInitializable
-
getValidator
Description copied from interface:ValidatorFactoryGet a Validator that matches the given configuration.- Specified by:
getValidatorin interfaceValidatorFactory- Parameters:
cfg- the configurator.- Returns:
- the validator.
-
registerValidator
Description copied from interface:ValidatorFactoryRegisters the given validator to the existing map of validators. This will add to the existing list.- Specified by:
registerValidatorin interfaceValidatorFactory- Parameters:
name- name of validator to add.className- the FQ classname of the validator.
-
lookupRegisteredValidatorType
Description copied from interface:ValidatorFactoryLookup to get the FQ classname of the given validator name.- Specified by:
lookupRegisteredValidatorTypein interfaceValidatorFactory- Parameters:
name- name of validator to lookup.- Returns:
- the found FQ classname
-