|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.ValidationFactoryConfig
public class ValidationFactoryConfig
This JavaBean is purely for configuration. It's used to retrieve an instance of the ValidationFactory via a getter, as opposed to getting/building one directly by calling the ValidationFactory.buildFactory() method. Either use the appropriate constructor, or call the appropriate setters, and then retrieve the factory by calling the getFactory() method. Note that the default factory is the default XML one (so, you don't need to set that if you plan to use the XML factory). The location of the configuration file is required, so if it's not set, an exception will be thrown. Since services are optional, they do not need to be set.
Field Summary | |
---|---|
protected java.lang.String |
configLocation
|
protected java.util.Locale |
defaultLocale
|
protected ValidationFactory |
factory
|
protected java.lang.String |
factoryId
|
protected java.util.Map |
services
|
Constructor Summary | |
---|---|
ValidationFactoryConfig()
Default constructor. |
|
ValidationFactoryConfig(java.lang.String theConfigurationLocation)
Constructor that defines only the configuration file. |
|
ValidationFactoryConfig(java.lang.String theConfigurationLocation,
java.util.Locale locale)
Constructor that defines only the configuration file. |
|
ValidationFactoryConfig(java.lang.String theConfigurationLocation,
java.util.Map theServices)
Constructor that defines only the configuration file. |
|
ValidationFactoryConfig(java.lang.String theFactoryId,
java.lang.String theConfigurationLocation)
Constructor that defines all available config properties except services. |
|
ValidationFactoryConfig(java.lang.String theFactoryId,
java.lang.String theConfigurationLocation,
java.util.Locale locale,
java.util.Map theServices)
Constructor that defines all available config properties. |
Method Summary | |
---|---|
void |
addService(java.lang.String serviceId,
java.lang.Object value)
Adds a service to those already defined for the factory. |
ValidationFactory |
getFactory()
Builds and returns the factory based upon the configuration defined within this configuration. |
void |
setConfigurationLocation(java.lang.String location)
Defines the location of the configuration file. |
void |
setDefaultLocale(java.util.Locale locale)
Sets the default locale for this factory. |
void |
setFactoryId(java.lang.String theFactoryId)
Sets the factory id. |
void |
setServices(java.util.Map theServices)
Sets the services the factory will use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String factoryId
protected java.lang.String configLocation
protected java.util.Locale defaultLocale
protected java.util.Map services
protected ValidationFactory factory
Constructor Detail |
---|
public ValidationFactoryConfig()
public ValidationFactoryConfig(java.lang.String theFactoryId, java.lang.String theConfigurationLocation, java.util.Locale locale, java.util.Map theServices)
theFactoryId
- The id of the factory to use (it must have been previously
registered.theConfigurationLocation
- The location of the configuration file.locale
- The default locale.theServices
- The set of services the factory requires.public ValidationFactoryConfig(java.lang.String theFactoryId, java.lang.String theConfigurationLocation)
theFactoryId
- The id of the factory to use (it must have been previously
registered.theConfigurationLocation
- The location of the configuration file.public ValidationFactoryConfig(java.lang.String theConfigurationLocation)
theConfigurationLocation
- The location of the configuration file.public ValidationFactoryConfig(java.lang.String theConfigurationLocation, java.util.Locale locale)
theConfigurationLocation
- The location of the configuration file.locale
- The default locale.public ValidationFactoryConfig(java.lang.String theConfigurationLocation, java.util.Map theServices)
theConfigurationLocation
- The location of the configuration file.theServices
- The set of services the factory requires.Method Detail |
---|
public void setConfigurationLocation(java.lang.String location)
location
- The location of the configuration file.public void setFactoryId(java.lang.String theFactoryId)
theFactoryId
- The id of the factory to use.public void setDefaultLocale(java.util.Locale locale)
locale
- The default locale.public void setServices(java.util.Map theServices)
theServices
- The services the factory requires.public void addService(java.lang.String serviceId, java.lang.Object value)
serviceId
- The id of the individual service.value
- The service object, itself.public ValidationFactory getFactory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |