| java.lang.Object org.iscreen.ValidationFactoryConfig
ValidationFactoryConfig | public class ValidationFactoryConfig (Code) | | 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.
author: Shellman, Dan |
ValidationFactoryConfig | public ValidationFactoryConfig()(Code) | | Default constructor.
|
ValidationFactoryConfig | public ValidationFactoryConfig(String theFactoryId, String theConfigurationLocation, Locale locale, Map theServices)(Code) | | Constructor that defines all available config properties.
Parameters: theFactoryId - The id of the factory to use (it must have been previouslyregistered. Parameters: theConfigurationLocation - The location of the configuration file. Parameters: locale - The default locale. Parameters: theServices - The set of services the factory requires. |
ValidationFactoryConfig | public ValidationFactoryConfig(String theFactoryId, String theConfigurationLocation)(Code) | | Constructor that defines all available config properties except services.
Parameters: theFactoryId - The id of the factory to use (it must have been previouslyregistered. Parameters: theConfigurationLocation - The location of the configuration file. |
ValidationFactoryConfig | public ValidationFactoryConfig(String theConfigurationLocation)(Code) | | Constructor that defines only the configuration file. The factory
will be the default XML one, and no services will be defined.
Parameters: theConfigurationLocation - The location of the configuration file. |
ValidationFactoryConfig | public ValidationFactoryConfig(String theConfigurationLocation, Locale locale)(Code) | | Constructor that defines only the configuration file. The factory
will be the default XML one, and no services will be defined.
Parameters: theConfigurationLocation - The location of the configuration file. Parameters: locale - The default locale. |
ValidationFactoryConfig | public ValidationFactoryConfig(String theConfigurationLocation, Map theServices)(Code) | | Constructor that defines only the configuration file. The factory
will be the default XML one, and no services will be defined.
Parameters: theConfigurationLocation - The location of the configuration file. Parameters: theServices - The set of services the factory requires. |
addService | public void addService(String serviceId, Object value)(Code) | | Adds a service to those already defined for the factory.
Parameters: serviceId - The id of the individual service. Parameters: value - The service object, itself. |
getFactory | public ValidationFactory getFactory()(Code) | | Builds and returns the factory based upon the configuration defined
within this configuration. If some of the configuration is invalid
or missing (such as no configuration location), no exception will be
thrown, so ensure that all configuration has been set properly.
If this method is called multiple times, a new factory is NOT constructed.
The same factory returned on the first call will be returned on
subsequent calls.
Returns a built factory. |
setConfigurationLocation | public void setConfigurationLocation(String location)(Code) | | Defines the location of the configuration file. This will override the
configuration location defined in the constructor (if it was).
Parameters: location - The location of the configuration file. |
setDefaultLocale | public void setDefaultLocale(Locale locale)(Code) | | Sets the default locale for this factory.
Parameters: locale - The default locale. |
setFactoryId | public void setFactoryId(String theFactoryId)(Code) | | Sets the factory id. This will override the factory id defined in the
constructor (if it was).
Parameters: theFactoryId - The id of the factory to use. |
setServices | public void setServices(Map theServices)(Code) | | Sets the services the factory will use. This will remove any prior
defined services and replace them with those passed in.
Parameters: theServices - The services the factory requires. |
|
|