com.cafesoft.core.data
Class PropertiesValidatorMapFactory
java.lang.Object
com.cafesoft.core.data.PropertiesValidatorMapFactory
- All Implemented Interfaces:
- ValidatorMapFactory
public class PropertiesValidatorMapFactory
- extends Object
- implements ValidatorMapFactory
PropertiesValidatorMapFactory implements a
ValidatorMapFactory the creates a ValidatorMap
with Validator instances based on values provided in a
java.util.Properties object.
- Since:
- 12/29/2006
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesValidatorMapFactory
public PropertiesValidatorMapFactory(String prefix,
boolean caseSensitiveKeys,
Logger logger,
boolean debug)
- Create a PropertiesValidatorMapFactory instance.
- Parameters:
prefix - the property name prefix for validator configuration
properties. For example: validator.regex.foo=^[a-zA-Z]*$
uses prefix: "validator.regex.", the validator key is "foo", and the
regular expression associated with it is the property value.
If this value is null, then all Properties are assumed to configure
Validator instances.logger - a logger used for DEBUG, WARN, and ERROR messages.debug - a flag used to enable/disable DEBUG-level messages.
create
public ValidatorMap create(Object config)
throws ValidatorConfigException
- Create a ValidatorMap.
- Specified by:
create in interface ValidatorMapFactory
- Parameters:
config - the object providing the configuration data for
creating the ValidatorMap.
- Returns:
- a ValidatorMap instance.
- Throws:
ValidatorConfigException - if unable to create the ValidatorMap.
Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.