org.apache.struts.config.impl
public class ModuleConfigImpl extends Object implements Serializable, 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 List | actionConfigList
The set of action configurations for this module, if any,
listed in the order in which they are added. |
protected HashMap | actionConfigs
The set of action configurations for this module, if any,
keyed by the path property. |
protected String | actionFormBeanClass
The default class name to be used when creating action form bean
instances. |
protected String | actionForwardClass
The default class name to be used when creating action forward instances. |
protected 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 ControllerConfig | controllerConfig
The controller configuration object for this module. |
protected HashMap | dataSources
The set of JDBC data source configurations for this
module, if any, keyed by the key property. |
protected HashMap | exceptions
The set of exception handling configurations for this
module, if any, keyed by the type property. |
protected HashMap | formBeans
The set of form bean configurations for this module, if any,
keyed by the name property. |
protected HashMap | forwards
The set of global forward configurations for this module, if any,
keyed by the name property. |
protected ActionConfigMatcher | matcher
Matches action config paths against compiled wildcard patterns |
protected HashMap | messageResources
The set of message resources configurations for this
module, if any, keyed by the key property. |
protected ArrayList | plugIns
The set of configured plug-in Actions for this module,
if any, in the order they were declared and configured. |
protected 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(String prefix)
Construct an ModuleConfigImpl object according to the specified
parameter values.
|
Method Summary | |
---|---|
void | addActionConfig(ActionConfig config)
Add a new ActionConfig instance to the set associated
with this module.
|
void | addDataSourceConfig(DataSourceConfig config)
Add a new DataSourceConfig instance to the set associated
with this module.
|
void | addExceptionConfig(ExceptionConfig config)
Add a new ExceptionConfig instance to the set associated
with this module.
|
void | addFormBeanConfig(FormBeanConfig config)
Add a new FormBeanConfig instance to the set associated
with this module.
|
void | addForwardConfig(ForwardConfig config)
Add a new ForwardConfig instance to the set of global
forwards associated with this module.
|
void | addMessageResourcesConfig(MessageResourcesConfig config)
Add a new MessageResourcesConfig instance to the set
associated with this module.
|
void | addPlugInConfig(PlugInConfig plugInConfig)
Add a newly configured {@link org.apache.struts.config.PlugInConfig} instance to the set of
plug-in Actions for this module.
|
ActionConfig | findActionConfig(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 .
|
ActionConfig[] | findActionConfigs()
Return the action configurations for this module. |
DataSourceConfig | findDataSourceConfig(String key)
Return the data source configuration for the specified key, if any;
otherwise return null .
|
DataSourceConfig[] | findDataSourceConfigs()
Return the data source configurations for this module. |
ExceptionConfig | findExceptionConfig(String type)
Return the exception configuration for the specified type, if any;
otherwise return null .
|
ExceptionConfig[] | findExceptionConfigs()
Return the exception configurations for this module. |
FormBeanConfig | findFormBeanConfig(String name)
Return the form bean configuration for the specified key, if any;
otherwise return null .
|
FormBeanConfig[] | findFormBeanConfigs()
Return the form bean configurations for this module. |
ForwardConfig | findForwardConfig(String name)
Return the forward configuration for the specified key, if any;
otherwise return null .
|
ForwardConfig[] | findForwardConfigs()
Return the form bean configurations for this module. |
MessageResourcesConfig | findMessageResourcesConfig(String key)
Return the message resources configuration for the specified key,
if any; otherwise return null .
|
MessageResourcesConfig[] | findMessageResourcesConfigs()
Return the message resources configurations for this module.
|
PlugInConfig[] | findPlugInConfigs()
Return the configured plug-in actions for this module. |
void | freeze()
Freeze the configuration of this module. |
String | getActionFormBeanClass()
The default class name to be used when creating action form bean
instances. |
String | getActionForwardClass()
The default class name to be used when creating action forward instances. |
String | getActionMappingClass()
The default class name to be used when creating action mapping instances. |
boolean | getConfigured()
Has this module been completely configured yet. |
ControllerConfig | getControllerConfig()
The controller configuration object for this module. |
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(ActionConfig config)
Remove the specified action configuration instance.
|
void | removeDataSourceConfig(DataSourceConfig config)
Remove the specified data source configuration instance.
|
void | removeExceptionConfig(ExceptionConfig config)
Remove the specified exception configuration instance.
|
void | removeFormBeanConfig(FormBeanConfig config)
Remove the specified form bean configuration instance.
|
void | removeForwardConfig(ForwardConfig config)
Remove the specified forward configuration instance.
|
void | removeMessageResourcesConfig(MessageResourcesConfig config)
Remove the specified message resources configuration instance.
|
void | setActionFormBeanClass(String actionFormBeanClass)
The default class name to be used when creating action form bean
instances.
|
void | setActionForwardClass(String actionForwardClass)
The default class name to be used when creating action forward instances.
|
void | setActionMappingClass(String actionMappingClass)
The default class name to be used when creating action mapping instances.
|
void | setControllerConfig(ControllerConfig cc)
The controller configuration object for this module. |
void | setPrefix(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. |
path
property.key
property.type
property.name
property.name
property.key
property.Since: Struts 1.2.8
Parameters: prefix Context-relative URI prefix for this module
ActionConfig
instance to the set associated
with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
DataSourceConfig
instance to the set associated
with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
ExceptionConfig
instance to the set associated
with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
FormBeanConfig
instance to the set associated
with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
ForwardConfig
instance to the set of global
forwards associated with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
MessageResourcesConfig
instance to the set
associated with this module.
Parameters: config The new configuration instance to be added
Throws: java.lang.IllegalStateException if this module configuration has been frozen
Parameters: plugInConfig The new configuration instance to be added
null
.
Parameters: path Path of the action configuration to return
null
.
Parameters: key Key of the data source configuration to return
null
.
Parameters: type Exception class name to find a configuration for
null
.
Parameters: name Name of the form bean configuration to return
null
.
Parameters: name Name of the forward configuration to return
null
.
Parameters: key Key of the data source configuration to return
Parameters: config ActionConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: config DataSourceConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: config ActionConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: config FormBeanConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: config ForwardConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: config MessageResourcesConfig instance to be removed
Throws: IllegalStateException if this module configuration has been frozen
Parameters: actionFormBeanClass default class name to be used when creating action form bean instances.
Parameters: actionForwardClass default class name to be used when creating action forward instances.
Parameters: actionMappingClass default class name to be used when creating action mapping instances.
Parameters: cc The controller configuration object for this module.