Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.struts.config.impl
Class ModuleConfigImpl  view ModuleConfigImpl download ModuleConfigImpl.java

java.lang.Object
  extended byorg.apache.struts.config.impl.ModuleConfigImpl
All Implemented Interfaces:
org.apache.struts.config.ModuleConfig, java.io.Serializable

public class ModuleConfigImpl
extends java.lang.Object
implements java.io.Serializable, org.apache.struts.config.ModuleConfig

The collection of static configuration information that describes a Struts-based module. Multiple modules are identified by a prefix at the beginning of the context relative portion of the request URI. If no module prefix can be matched, the default configuration (with a prefix equal to a zero-length string) is selected, which is elegantly backwards compatible with the previous Struts behavior that only supported one module.

Since:
Struts 1.1
Version:
$Rev: 170858 $ $Date: 2005-05-19 03:58:27 +0100 (Thu, 19 May 2005) $

Field Summary
protected  java.util.List actionConfigList
          The set of action configurations for this module, if any, listed in the order in which they are added.
protected  java.util.HashMap actionConfigs
          The set of action configurations for this module, if any, keyed by the path property.
protected  java.lang.String actionFormBeanClass
          The default class name to be used when creating action form bean instances.
protected  java.lang.String actionForwardClass
          The default class name to be used when creating action forward instances.
protected  java.lang.String actionMappingClass
          The default class name to be used when creating action mapping instances.
protected  boolean configured
          Has this module been completely configured yet.
protected  org.apache.struts.config.ControllerConfig controllerConfig
          The controller configuration object for this module.
protected  java.util.HashMap dataSources
          The set of JDBC data source configurations for this module, if any, keyed by the key property.
protected  java.util.HashMap exceptions
          The set of exception handling configurations for this module, if any, keyed by the type property.
protected  java.util.HashMap formBeans
          The set of form bean configurations for this module, if any, keyed by the name property.
protected  java.util.HashMap forwards
          The set of global forward configurations for this module, if any, keyed by the name property.
protected  org.apache.struts.config.ActionConfigMatcher matcher
          Matches action config paths against compiled wildcard patterns
protected  java.util.HashMap messageResources
          The set of message resources configurations for this module, if any, keyed by the key property.
protected  java.util.ArrayList plugIns
          The set of configured plug-in Actions for this module, if any, in the order they were declared and configured.
protected  java.lang.String prefix
          The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet.
 
Constructor Summary
ModuleConfigImpl()
          Constructor for ModuleConfigImpl.
ModuleConfigImpl(java.lang.String prefix)
          Construct an ModuleConfigImpl object according to the specified parameter values.
 
Method Summary
 void addActionConfig(org.apache.struts.config.ActionConfig config)
          Add a new ActionConfig instance to the set associated with this module.
 void addDataSourceConfig(org.apache.struts.config.DataSourceConfig config)
          Add a new DataSourceConfig instance to the set associated with this module.
 void addExceptionConfig(org.apache.struts.config.ExceptionConfig config)
          Add a new ExceptionConfig instance to the set associated with this module.
 void addFormBeanConfig(org.apache.struts.config.FormBeanConfig config)
          Add a new FormBeanConfig instance to the set associated with this module.
 void addForwardConfig(org.apache.struts.config.ForwardConfig config)
          Add a new ForwardConfig instance to the set of global forwards associated with this module.
 void addMessageResourcesConfig(org.apache.struts.config.MessageResourcesConfig config)
          Add a new MessageResourcesConfig instance to the set associated with this module.
 void addPlugInConfig(org.apache.struts.config.PlugInConfig plugInConfig)
          Add a newly configured org.apache.struts.config.PlugInConfig instance to the set of plug-in Actions for this module.
 org.apache.struts.config.ActionConfig findActionConfig(java.lang.String path)
          Return the action configuration for the specified path, first looking a direct match, then if none found, a wildcard pattern match; otherwise return null.
 org.apache.struts.config.ActionConfig[] findActionConfigs()
          Return the action configurations for this module.
 org.apache.struts.config.DataSourceConfig findDataSourceConfig(java.lang.String key)
          Return the data source configuration for the specified key, if any; otherwise return null.
 org.apache.struts.config.DataSourceConfig[] findDataSourceConfigs()
          Return the data source configurations for this module.
 org.apache.struts.config.ExceptionConfig findExceptionConfig(java.lang.String type)
          Return the exception configuration for the specified type, if any; otherwise return null.
 org.apache.struts.config.ExceptionConfig[] findExceptionConfigs()
          Return the exception configurations for this module.
 org.apache.struts.config.FormBeanConfig findFormBeanConfig(java.lang.String name)
          Return the form bean configuration for the specified key, if any; otherwise return null.
 org.apache.struts.config.FormBeanConfig[] findFormBeanConfigs()
          Return the form bean configurations for this module.
 org.apache.struts.config.ForwardConfig findForwardConfig(java.lang.String name)
          Return the forward configuration for the specified key, if any; otherwise return null.
 org.apache.struts.config.ForwardConfig[] findForwardConfigs()
          Return the form bean configurations for this module.
 org.apache.struts.config.MessageResourcesConfig findMessageResourcesConfig(java.lang.String key)
          Return the message resources configuration for the specified key, if any; otherwise return null.
 org.apache.struts.config.MessageResourcesConfig[] findMessageResourcesConfigs()
          Return the message resources configurations for this module.
 org.apache.struts.config.PlugInConfig[] findPlugInConfigs()
          Return the configured plug-in actions for this module.
 void freeze()
          Freeze the configuration of this module.
 java.lang.String getActionFormBeanClass()
          The default class name to be used when creating action form bean instances.
 java.lang.String getActionForwardClass()
          The default class name to be used when creating action forward instances.
 java.lang.String getActionMappingClass()
          The default class name to be used when creating action mapping instances.
 boolean getConfigured()
          Has this module been completely configured yet.
 org.apache.struts.config.ControllerConfig getControllerConfig()
          The controller configuration object for this module.
 java.lang.String getPrefix()
          The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet.
 void removeActionConfig(org.apache.struts.config.ActionConfig config)
          Remove the specified action configuration instance.
 void removeDataSourceConfig(org.apache.struts.config.DataSourceConfig config)
          Remove the specified data source configuration instance.
 void removeExceptionConfig(org.apache.struts.config.ExceptionConfig config)
          Remove the specified exception configuration instance.
 void removeFormBeanConfig(org.apache.struts.config.FormBeanConfig config)
          Remove the specified form bean configuration instance.
 void removeForwardConfig(org.apache.struts.config.ForwardConfig config)
          Remove the specified forward configuration instance.
 void removeMessageResourcesConfig(org.apache.struts.config.MessageResourcesConfig config)
          Remove the specified message resources configuration instance.
 void setActionFormBeanClass(java.lang.String actionFormBeanClass)
          The default class name to be used when creating action form bean instances.
 void setActionForwardClass(java.lang.String actionForwardClass)
          The default class name to be used when creating action forward instances.
 void setActionMappingClass(java.lang.String actionMappingClass)
          The default class name to be used when creating action mapping instances.
 void setControllerConfig(org.apache.struts.config.ControllerConfig cc)
          The controller configuration object for this module.
 void setPrefix(java.lang.String prefix)
          The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionConfigs

protected java.util.HashMap actionConfigs
The set of action configurations for this module, if any, keyed by the path property.


actionConfigList

protected java.util.List actionConfigList
The set of action configurations for this module, if any, listed in the order in which they are added.


dataSources

protected java.util.HashMap dataSources
The set of JDBC data source configurations for this module, if any, keyed by the key property.


exceptions

protected java.util.HashMap exceptions
The set of exception handling configurations for this module, if any, keyed by the type property.


formBeans

protected java.util.HashMap formBeans
The set of form bean configurations for this module, if any, keyed by the name property.


forwards

protected java.util.HashMap forwards
The set of global forward configurations for this module, if any, keyed by the name property.


messageResources

protected java.util.HashMap messageResources
The set of message resources configurations for this module, if any, keyed by the key property.


plugIns

protected java.util.ArrayList plugIns
The set of configured plug-in Actions for this module, if any, in the order they were declared and configured.


configured

protected boolean configured
Has this module been completely configured yet. Once this flag has been set, any attempt to modify the configuration will return an IllegalStateException.


controllerConfig

protected org.apache.struts.config.ControllerConfig controllerConfig
The controller configuration object for this module.


prefix

protected java.lang.String prefix
The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet. A configuration with a prefix of a zero-length String is the default configuration for this web module.


actionFormBeanClass

protected java.lang.String actionFormBeanClass
The default class name to be used when creating action form bean instances.


actionMappingClass

protected java.lang.String actionMappingClass
The default class name to be used when creating action mapping instances.


actionForwardClass

protected java.lang.String actionForwardClass
The default class name to be used when creating action forward instances.


matcher

protected org.apache.struts.config.ActionConfigMatcher matcher
Matches action config paths against compiled wildcard patterns

Constructor Detail

ModuleConfigImpl

public ModuleConfigImpl()
Constructor for ModuleConfigImpl. Assumes default configuration.

Since:
Struts 1.2.8

ModuleConfigImpl

public ModuleConfigImpl(java.lang.String prefix)
Construct an ModuleConfigImpl object according to the specified parameter values.

Method Detail

getConfigured

public boolean getConfigured()
Has this module been completely configured yet. Once this flag has been set, any attempt to modify the configuration will return an IllegalStateException.

Specified by:
getConfigured in interface org.apache.struts.config.ModuleConfig

getControllerConfig

public org.apache.struts.config.ControllerConfig getControllerConfig()
The controller configuration object for this module.

Specified by:
getControllerConfig in interface org.apache.struts.config.ModuleConfig

setControllerConfig

public void setControllerConfig(org.apache.struts.config.ControllerConfig cc)
The controller configuration object for this module.

Specified by:
setControllerConfig in interface org.apache.struts.config.ModuleConfig

getPrefix

public java.lang.String getPrefix()
The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet. A configuration with a prefix of a zero-length String is the default configuration for this web module.

Specified by:
getPrefix in interface org.apache.struts.config.ModuleConfig

setPrefix

public void setPrefix(java.lang.String prefix)
The prefix of the context-relative portion of the request URI, used to select this configuration versus others supported by the controller servlet. A configuration with a prefix of a zero-length String is the default configuration for this web module.

Specified by:
setPrefix in interface org.apache.struts.config.ModuleConfig

getActionFormBeanClass

public java.lang.String getActionFormBeanClass()
The default class name to be used when creating action form bean instances.

Specified by:
getActionFormBeanClass in interface org.apache.struts.config.ModuleConfig

setActionFormBeanClass

public void setActionFormBeanClass(java.lang.String actionFormBeanClass)
The default class name to be used when creating action form bean instances.

Specified by:
setActionFormBeanClass in interface org.apache.struts.config.ModuleConfig

getActionMappingClass

public java.lang.String getActionMappingClass()
The default class name to be used when creating action mapping instances.

Specified by:
getActionMappingClass in interface org.apache.struts.config.ModuleConfig

setActionMappingClass

public void setActionMappingClass(java.lang.String actionMappingClass)
The default class name to be used when creating action mapping instances.

Specified by:
setActionMappingClass in interface org.apache.struts.config.ModuleConfig

addActionConfig

public void addActionConfig(org.apache.struts.config.ActionConfig config)
Add a new ActionConfig instance to the set associated with this module.

Specified by:
addActionConfig in interface org.apache.struts.config.ModuleConfig

addDataSourceConfig

public void addDataSourceConfig(org.apache.struts.config.DataSourceConfig config)
Add a new DataSourceConfig instance to the set associated with this module.

Specified by:
addDataSourceConfig in interface org.apache.struts.config.ModuleConfig

addExceptionConfig

public void addExceptionConfig(org.apache.struts.config.ExceptionConfig config)
Add a new ExceptionConfig instance to the set associated with this module.

Specified by:
addExceptionConfig in interface org.apache.struts.config.ModuleConfig

addFormBeanConfig

public void addFormBeanConfig(org.apache.struts.config.FormBeanConfig config)
Add a new FormBeanConfig instance to the set associated with this module.

Specified by:
addFormBeanConfig in interface org.apache.struts.config.ModuleConfig

getActionForwardClass

public java.lang.String getActionForwardClass()
The default class name to be used when creating action forward instances.

Specified by:
getActionForwardClass in interface org.apache.struts.config.ModuleConfig

setActionForwardClass

public void setActionForwardClass(java.lang.String actionForwardClass)
The default class name to be used when creating action forward instances.

Specified by:
setActionForwardClass in interface org.apache.struts.config.ModuleConfig

addForwardConfig

public void addForwardConfig(org.apache.struts.config.ForwardConfig config)
Add a new ForwardConfig instance to the set of global forwards associated with this module.

Specified by:
addForwardConfig in interface org.apache.struts.config.ModuleConfig

addMessageResourcesConfig

public void addMessageResourcesConfig(org.apache.struts.config.MessageResourcesConfig config)
Add a new MessageResourcesConfig instance to the set associated with this module.

Specified by:
addMessageResourcesConfig in interface org.apache.struts.config.ModuleConfig

addPlugInConfig

public void addPlugInConfig(org.apache.struts.config.PlugInConfig plugInConfig)
Add a newly configured org.apache.struts.config.PlugInConfig instance to the set of plug-in Actions for this module.

Specified by:
addPlugInConfig in interface org.apache.struts.config.ModuleConfig

findActionConfig

public org.apache.struts.config.ActionConfig findActionConfig(java.lang.String path)
Return the action configuration for the specified path, first looking a direct match, then if none found, a wildcard pattern match; otherwise return null.

Specified by:
findActionConfig in interface org.apache.struts.config.ModuleConfig

findActionConfigs

public org.apache.struts.config.ActionConfig[] findActionConfigs()
Return the action configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findActionConfigs in interface org.apache.struts.config.ModuleConfig

findDataSourceConfig

public org.apache.struts.config.DataSourceConfig findDataSourceConfig(java.lang.String key)
Return the data source configuration for the specified key, if any; otherwise return null.

Specified by:
findDataSourceConfig in interface org.apache.struts.config.ModuleConfig

findDataSourceConfigs

public org.apache.struts.config.DataSourceConfig[] findDataSourceConfigs()
Return the data source configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findDataSourceConfigs in interface org.apache.struts.config.ModuleConfig

findExceptionConfig

public org.apache.struts.config.ExceptionConfig findExceptionConfig(java.lang.String type)
Return the exception configuration for the specified type, if any; otherwise return null.

Specified by:
findExceptionConfig in interface org.apache.struts.config.ModuleConfig

findExceptionConfigs

public org.apache.struts.config.ExceptionConfig[] findExceptionConfigs()
Return the exception configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findExceptionConfigs in interface org.apache.struts.config.ModuleConfig

findFormBeanConfig

public org.apache.struts.config.FormBeanConfig findFormBeanConfig(java.lang.String name)
Return the form bean configuration for the specified key, if any; otherwise return null.

Specified by:
findFormBeanConfig in interface org.apache.struts.config.ModuleConfig

findFormBeanConfigs

public org.apache.struts.config.FormBeanConfig[] findFormBeanConfigs()
Return the form bean configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findFormBeanConfigs in interface org.apache.struts.config.ModuleConfig

findForwardConfig

public org.apache.struts.config.ForwardConfig findForwardConfig(java.lang.String name)
Return the forward configuration for the specified key, if any; otherwise return null.

Specified by:
findForwardConfig in interface org.apache.struts.config.ModuleConfig

findForwardConfigs

public org.apache.struts.config.ForwardConfig[] findForwardConfigs()
Return the form bean configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findForwardConfigs in interface org.apache.struts.config.ModuleConfig

findMessageResourcesConfig

public org.apache.struts.config.MessageResourcesConfig findMessageResourcesConfig(java.lang.String key)
Return the message resources configuration for the specified key, if any; otherwise return null.

Specified by:
findMessageResourcesConfig in interface org.apache.struts.config.ModuleConfig

findMessageResourcesConfigs

public org.apache.struts.config.MessageResourcesConfig[] findMessageResourcesConfigs()
Return the message resources configurations for this module. If there are none, a zero-length array is returned.

Specified by:
findMessageResourcesConfigs in interface org.apache.struts.config.ModuleConfig

findPlugInConfigs

public org.apache.struts.config.PlugInConfig[] findPlugInConfigs()
Return the configured plug-in actions for this module. If there are none, a zero-length array is returned.

Specified by:
findPlugInConfigs in interface org.apache.struts.config.ModuleConfig

freeze

public void freeze()
Freeze the configuration of this module. After this method returns, any attempt to modify the configuration will return an IllegalStateException.

Specified by:
freeze in interface org.apache.struts.config.ModuleConfig

removeActionConfig

public void removeActionConfig(org.apache.struts.config.ActionConfig config)
Remove the specified action configuration instance.

Specified by:
removeActionConfig in interface org.apache.struts.config.ModuleConfig

removeExceptionConfig

public void removeExceptionConfig(org.apache.struts.config.ExceptionConfig config)
Remove the specified exception configuration instance.

Specified by:
removeExceptionConfig in interface org.apache.struts.config.ModuleConfig

removeDataSourceConfig

public void removeDataSourceConfig(org.apache.struts.config.DataSourceConfig config)
Remove the specified data source configuration instance.

Specified by:
removeDataSourceConfig in interface org.apache.struts.config.ModuleConfig

removeFormBeanConfig

public void removeFormBeanConfig(org.apache.struts.config.FormBeanConfig config)
Remove the specified form bean configuration instance.

Specified by:
removeFormBeanConfig in interface org.apache.struts.config.ModuleConfig

removeForwardConfig

public void removeForwardConfig(org.apache.struts.config.ForwardConfig config)
Remove the specified forward configuration instance.

Specified by:
removeForwardConfig in interface org.apache.struts.config.ModuleConfig

removeMessageResourcesConfig

public void removeMessageResourcesConfig(org.apache.struts.config.MessageResourcesConfig config)
Remove the specified message resources configuration instance.

Specified by:
removeMessageResourcesConfig in interface org.apache.struts.config.ModuleConfig