|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.formproc.FormManager
The FormManager is the central class for configuring Form objects. Form
objects must be configured before they can be used by calling this class's
configure(Form form) method.
| Field Summary | |
static java.lang.String |
CLASS_TYPE_VALIDATOR
Keyword for class type validators (the keyword is "class") |
static java.lang.String |
CONFIGURATION_FILE
The default configuration file name (formproc.xml). |
static java.lang.String |
DEFAULT_RESOURCE_LOADER
The default resource loader (com.anthonyeden.lib.resource.FileResourceLoader) |
static java.lang.String |
SHARED_TYPE_VALIDATOR
Keyword for shared validators (the keyword is "shared") |
| Constructor Summary | |
FormManager()
Construct a new FormManager. |
|
FormManager(java.io.File configurationFile)
Construct a new FormManager using the given configuration file to configure the FormManager. |
|
FormManager(org.apache.commons.vfs.FileObject configurationFile)
Construct a new FormManager using the given configuration file to configure the FormManager. |
|
FormManager(java.io.InputStream configurationStream)
Construct a new FormManager using the given InputStream to configure the FormManager. |
|
| Method Summary | |
void |
configure(Form form)
Configure the given form. |
protected java.lang.String |
findPath(com.anthonyeden.lib.config.Configuration configuration,
org.apache.commons.vfs.FileObject relativeFile)
Find the path specified in the given configuration object. |
org.apache.commons.vfs.FileSystemManager |
getFileSystemManager()
Get the FileSystemManager. |
FormConfiguration |
getFormConfiguration(java.lang.String name)
Get the FormConfiguration for the given form name. |
java.util.Map |
getSharedValidators()
Get a Map of shared validators. |
Validator |
getValidator(com.anthonyeden.lib.config.Configuration configuration)
Get the validator which is defined by the given configuration object. |
java.util.Map |
getValidatorMap()
Get the validator map. |
void |
load(java.io.InputStream in)
Deprecated. Use loadConfiguration() instead |
void |
loadConfiguration()
Load the configuration using this class's ClassLoader to locate the configuration file as a resource stream. |
void |
loadConfiguration(java.io.File file)
Load the configuration from the given file. |
void |
loadConfiguration(org.apache.commons.vfs.FileObject configurationFile)
Load the configuration from the given file. |
void |
loadConfiguration(java.io.InputStream in)
Load the configuration from the given InputStream. |
protected void |
loadForm(com.anthonyeden.lib.config.Configuration configuration)
Load the form configuration defined by the given configuration object. |
protected void |
loadInclude(com.anthonyeden.lib.config.Configuration configuration)
Load the included configuration defined by the given configuration object. |
protected void |
loadSharedValidator(com.anthonyeden.lib.config.Configuration configuration)
Load the shared validator defined by the given configuration object. |
protected void |
loadValidatorMap(com.anthonyeden.lib.config.Configuration configuration)
Load the validator map defined by the given configuration object. |
void |
reload()
Reload the configuration. |
void |
setFormConfiguration(java.lang.String name,
FormConfiguration configuration)
Set the FormConfiguration for the given form name. |
| 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 CLASS_TYPE_VALIDATOR
public static final java.lang.String SHARED_TYPE_VALIDATOR
public static final java.lang.String DEFAULT_RESOURCE_LOADER
public static final java.lang.String CONFIGURATION_FILE
| Constructor Detail |
public FormManager()
throws java.lang.Exception
java.lang.Exception - Any exception
public FormManager(java.io.File configurationFile)
throws java.lang.Exception
configurationFile - The configuration File
java.lang.Exception - Any Exception
public FormManager(org.apache.commons.vfs.FileObject configurationFile)
throws java.lang.Exception
configurationFile - The configuration File
java.lang.Exception - Any Exception
public FormManager(java.io.InputStream configurationStream)
throws java.lang.Exception
configurationStream - The configuration InputStream
java.lang.Exception - Any Exception| Method Detail |
public org.apache.commons.vfs.FileSystemManager getFileSystemManager()
throws org.apache.commons.vfs.FileSystemException
org.apache.commons.vfs.FileSystemException
public void configure(Form form)
throws java.lang.Exception
form - The Form
java.lang.Exception - Any exception
public FormConfiguration getFormConfiguration(java.lang.String name)
throws java.lang.Exception
name - The name of the form
java.lang.Exception - Any Exception
public void setFormConfiguration(java.lang.String name,
FormConfiguration configuration)
name - The form nameconfiguration - The FormConfigurationpublic java.util.Map getValidatorMap()
public java.util.Map getSharedValidators()
public Validator getValidator(com.anthonyeden.lib.config.Configuration configuration)
throws java.lang.Exception
configuration - The Configuration object
java.lang.Exception
public void loadConfiguration()
throws java.lang.Exception
java.lang.Exception - Any Exception
public void loadConfiguration(java.io.File file)
throws com.anthonyeden.lib.config.ConfigurationException
java.lang.Exception - Any Exception
com.anthonyeden.lib.config.ConfigurationException
public void loadConfiguration(org.apache.commons.vfs.FileObject configurationFile)
throws com.anthonyeden.lib.config.ConfigurationException
configurationFile - The file
java.lang.Exception - Any Exception
com.anthonyeden.lib.config.ConfigurationException
public void load(java.io.InputStream in)
throws java.lang.Exception
load in interface com.anthonyeden.lib.resource.ResourceRecipientin - The InputStream
java.lang.Exception - Any Exception
public void loadConfiguration(java.io.InputStream in)
throws java.lang.Exception
in - The InputStream
java.lang.Exception - Any Exceptionpublic void reload()
reload in interface com.anthonyeden.lib.Reloadable
protected void loadInclude(com.anthonyeden.lib.config.Configuration configuration)
throws java.lang.Exception
configuration - The Configuration object
com.anthonyeden.lib.config.ConfigurationException
java.lang.Exception
protected void loadValidatorMap(com.anthonyeden.lib.config.Configuration configuration)
throws java.lang.Exception
configuration - The Configuration object
com.anthonyeden.lib.config.ConfigurationException
java.lang.Exception
protected void loadSharedValidator(com.anthonyeden.lib.config.Configuration configuration)
throws java.lang.Exception
configuration - The Configuration object
com.anthonyeden.lib.config.ConfigurationException
java.lang.Exception
protected void loadForm(com.anthonyeden.lib.config.Configuration configuration)
throws java.lang.Exception
configuration - The Configuration object
com.anthonyeden.lib.config.ConfigurationException
java.lang.Exception
protected java.lang.String findPath(com.anthonyeden.lib.config.Configuration configuration,
org.apache.commons.vfs.FileObject relativeFile)
throws org.apache.commons.vfs.FileSystemException
configuration - The configuration objectrelativeFile - The file which the path is relative to
org.apache.commons.vfs.FileSystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||