com.opensymphony.xwork2.validator
Class DefaultValidatorFactory
java.lang.Object
com.opensymphony.xwork2.validator.DefaultValidatorFactory
- All Implemented Interfaces:
- ValidatorFactory
public class DefaultValidatorFactory
- extends Object
- implements ValidatorFactory
Default validator factory
- Version:
- $Date: 2008-03-02 16:00:09 +0100 (So, 02 Mrz 2008) $ $Id: DefaultValidatorFactory.java 1761 2008-03-02 15:00:09Z rainerh $
- Author:
- Jason Carreira, James House
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validators
protected Map<String,String> validators
LOG
private static Logger LOG
objectFactory
protected ObjectFactory objectFactory
validatorFileParser
protected ValidatorFileParser validatorFileParser
DefaultValidatorFactory
public DefaultValidatorFactory(ObjectFactory objectFactory,
ValidatorFileParser parser)
getValidator
public Validator getValidator(ValidatorConfig cfg)
- Description copied from interface:
ValidatorFactory
- Get a Validator that matches the given configuration.
- Specified by:
getValidator
in interface ValidatorFactory
- Parameters:
cfg
- the configurator.
- Returns:
- the validator.
registerValidator
public void registerValidator(String name,
String className)
- Description copied from interface:
ValidatorFactory
- Registers the given validator to the existing map of validators.
This will add to the existing list.
- Specified by:
registerValidator
in interface ValidatorFactory
- Parameters:
name
- name of validator to add.className
- the FQ classname of the validator.
lookupRegisteredValidatorType
public String lookupRegisteredValidatorType(String name)
- Description copied from interface:
ValidatorFactory
- Lookup to get the FQ classname of the given validator name.
- Specified by:
lookupRegisteredValidatorType
in interface ValidatorFactory
- Parameters:
name
- name of validator to lookup.
- Returns:
- the found FQ classname
parseValidators
private void parseValidators()
retrieveValidatorConfiguration
private void retrieveValidatorConfiguration(String resourceName)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.