|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.ValidationFactory
public class ValidationFactory
This class represents factories that can generate validation services from configuration files (or however the factory generates them). The static portion of this factory implementation is thread-safe.
Field Summary | |
---|---|
protected java.lang.String |
configLocation
|
protected java.util.Locale |
defaultLocale
|
static java.lang.String |
FACTORY_DEFAULT_XML
Deprecated. This is no longer used for version 1.1 or later. For OGNL, use FACTORY_OGNL_XML. For MVEL, use FACTORY_MVEL_XML. |
static java.lang.String |
FACTORY_MVEL_XML
|
static java.lang.String |
FACTORY_OGNL_XML
|
protected java.util.Map |
serviceMap
|
Constructor Summary | |
---|---|
protected |
ValidationFactory()
Protected constructor. |
Method Summary | |
---|---|
static ValidationFactory |
buildFactory(java.lang.String factoryId,
java.lang.String configLocation,
java.util.Locale theDefaultLocale,
java.util.Map services)
Builds a registered factory. |
static ValidationFactory |
buildFactory(java.lang.String factoryId,
java.lang.String configLocation,
java.util.Map services)
Builds a registered factory. |
protected java.lang.String |
getConfigLocation()
Retrieves the configuration file location for this validation factory. |
protected java.util.Locale |
getDefaultLocale()
Retrieves the default locale for this factory. |
protected java.util.Map |
getServices()
Retrieves the map of services available to this factory. |
ValidationService |
getValidationService(java.lang.String serviceName)
Retrieves a validation service with the given service name. |
ValidationService |
getValidationService(java.lang.String metaPropertyName,
java.lang.String metaValue)
Retrieves a validation service with the given meta property and value. |
protected void |
loadConfig()
This method is called to initialize the factory. |
static void |
registerFactory(java.lang.Class factoryClass,
java.lang.String factoryId)
Registers a factory with a given factory id. |
protected void |
setConfigLocation(java.lang.String location)
This is called right after the validation factory is instantiated and the services call (setServices()) has been called. |
protected void |
setDefaultLocale(java.util.Locale locale)
Sets the default locale for this factory. |
protected void |
setServices(java.util.Map theServices)
This is called right after the validation factory is instantiated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FACTORY_DEFAULT_XML
public static final java.lang.String FACTORY_OGNL_XML
public static final java.lang.String FACTORY_MVEL_XML
protected java.util.Map serviceMap
protected java.lang.String configLocation
protected java.util.Locale defaultLocale
Constructor Detail |
---|
protected ValidationFactory()
Method Detail |
---|
public static ValidationFactory buildFactory(java.lang.String factoryId, java.lang.String configLocation, java.util.Locale theDefaultLocale, java.util.Map services)
factoryId
- The id of the factory to retrieve.configLocation
- Classpath location of the configurationtheDefaultLocale
- The default localeservices
- Services that are necessary for the factory
public static ValidationFactory buildFactory(java.lang.String factoryId, java.lang.String configLocation, java.util.Map services)
factoryId
- The id of the factory to retrieve.configLocation
- Classpath location of the configurationservices
- Services that are necessary for the factory
public static void registerFactory(java.lang.Class factoryClass, java.lang.String factoryId)
factoryClass
- The class of the factory to registerfactoryId
- The id of the factory (used to retrieve it later)public ValidationService getValidationService(java.lang.String serviceName)
serviceName
- The name of the validation service.
public ValidationService getValidationService(java.lang.String metaPropertyName, java.lang.String metaValue)
metaPropertyName
- The meta name or id (i.e. className).metaValue
- The value of the meta data (i.e. com.something.someBean)
protected void setConfigLocation(java.lang.String location)
location
- The location of the configuration file for the factory.
The location is classpath-based.protected java.lang.String getConfigLocation()
protected void setDefaultLocale(java.util.Locale locale)
locale
- The default locale for this factory.protected java.util.Locale getDefaultLocale()
protected void setServices(java.util.Map theServices)
theServices
- The services to provide to the factory.protected java.util.Map getServices()
protected void loadConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |