|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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.
Method Summary | |
---|---|
void |
addActionConfig(ActionConfig config)
Add a new ActionConfig 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 PlugInConfig instance to the set of
plug-in Actions for this module. |
ActionConfig |
findActionConfig(String path)
Return the action configuration for the specified path, if any; otherwise return null . |
ActionConfig |
findActionConfigId(String actionId)
Returns the action configuration for the specifed action action identifier. |
ActionConfig[] |
findActionConfigs()
Return the action configurations for this module. |
ExceptionConfig |
findException(Class type)
Perform a recursive search for an ExceptionConfig registered for this class, or for any superclass. |
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 |
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. |
Method Detail |
---|
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.
ControllerConfig getControllerConfig()
The controller configuration object for this module.
void setControllerConfig(ControllerConfig cc)
The controller configuration object for this module.
cc
- 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. A configuration with a prefix of a zero-length String is the default configuration for this web 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. A configuration with a prefix of a zero-length String is the default configuration for this web module.
prefix
- The prefix of the context-relative portion of the request
URI.String getActionFormBeanClass()
The default class name to be used when creating action form bean instances.
void setActionFormBeanClass(String actionFormBeanClass)
The default class name to be used when creating action form bean instances.
actionFormBeanClass
- default class name to be used when creating
action form bean instances.String getActionMappingClass()
The default class name to be used when creating action mapping instances.
void setActionMappingClass(String actionMappingClass)
The default class name to be used when creating action mapping instances.
actionMappingClass
- default class name to be used when creating
action mapping instances.void addActionConfig(ActionConfig config)
Add a new ActionConfig
instance to the set associated
with this module.
config
- The new configuration instance to be added
IllegalStateException
- if this module configuration has been
frozenvoid addExceptionConfig(ExceptionConfig config)
Add a new ExceptionConfig
instance to the set
associated with this module.
config
- The new configuration instance to be added
IllegalStateException
- if this module configuration has been
frozenvoid addFormBeanConfig(FormBeanConfig config)
Add a new FormBeanConfig
instance to the set
associated with this module.
config
- The new configuration instance to be added
IllegalStateException
- if this module configuration has been
frozenString getActionForwardClass()
The default class name to be used when creating action forward instances.
void setActionForwardClass(String actionForwardClass)
The default class name to be used when creating action forward instances.
actionForwardClass
- default class name to be used when creating
action forward instances.void addForwardConfig(ForwardConfig config)
Add a new ForwardConfig
instance to the set of global
forwards associated with this module.
config
- The new configuration instance to be added
IllegalStateException
- if this module configuration has been
frozenvoid addMessageResourcesConfig(MessageResourcesConfig config)
Add a new MessageResourcesConfig
instance to the set
associated with this module.
config
- The new configuration instance to be added
IllegalStateException
- if this module configuration has been
frozenvoid addPlugInConfig(PlugInConfig plugInConfig)
Add a newly configured PlugInConfig
instance to the set of
plug-in Actions for this module.
plugInConfig
- The new configuration instance to be addedActionConfig findActionConfig(String path)
Return the action configuration for the specified path, if any;
otherwise return null
.
path
- Path of the action configuration to returnActionConfig[] findActionConfigs()
Return the action configurations for this module. If there are none, a zero-length array is returned.
ActionConfig findActionConfigId(String actionId)
Returns the action configuration for the specifed action action identifier.
actionId
- the action identifier
null
ActionConfig.getActionId()
ExceptionConfig findExceptionConfig(String type)
Return the exception configuration for the specified type, if any;
otherwise return null
.
type
- Exception class name to find a configuration forExceptionConfig findException(Class type)
Perform a recursive search for an ExceptionConfig registered for
this class, or for any superclass. This should only be used in the
case when an ActionConfig
is not available; otherwise, use
ActionConfig.findException(Class)
to preserve the search
order.
type
- Exception class name to find a configuration forfindException(Class)
ExceptionConfig[] findExceptionConfigs()
Return the exception configurations for this module. If there are none, a zero-length array is returned.
FormBeanConfig findFormBeanConfig(String name)
Return the form bean configuration for the specified key, if any;
otherwise return null
.
name
- Name of the form bean configuration to returnFormBeanConfig[] findFormBeanConfigs()
Return the form bean configurations for this module. If there are none, a zero-length array is returned.
ForwardConfig findForwardConfig(String name)
Return the forward configuration for the specified key, if any;
otherwise return null
.
name
- Name of the forward configuration to returnForwardConfig[] findForwardConfigs()
Return the form bean configurations for this module. If there are none, a zero-length array is returned.
MessageResourcesConfig findMessageResourcesConfig(String key)
Return the message resources configuration for the specified key,
if any; otherwise return null
.
key
- Key of the data source configuration to returnMessageResourcesConfig[] findMessageResourcesConfigs()
Return the message resources configurations for this module. If there are none, a zero-length array is returned.
PlugInConfig[] findPlugInConfigs()
Return the configured plug-in actions for this module. If there are none, a zero-length array is returned.
void freeze()
Freeze the configuration of this module. After this method returns, any attempt to modify the configuration will return an IllegalStateException.
void removeActionConfig(ActionConfig config)
Remove the specified action configuration instance.
config
- ActionConfig instance to be removed
IllegalStateException
- if this module configuration has been
frozenvoid removeExceptionConfig(ExceptionConfig config)
Remove the specified exception configuration instance.
config
- ActionConfig instance to be removed
IllegalStateException
- if this module configuration has been
frozenvoid removeFormBeanConfig(FormBeanConfig config)
Remove the specified form bean configuration instance.
config
- FormBeanConfig instance to be removed
IllegalStateException
- if this module configuration has been
frozenvoid removeForwardConfig(ForwardConfig config)
Remove the specified forward configuration instance.
config
- ForwardConfig instance to be removed
IllegalStateException
- if this module configuration has been
frozenvoid removeMessageResourcesConfig(MessageResourcesConfig config)
Remove the specified message resources configuration instance.
config
- MessageResourcesConfig instance to be removed
IllegalStateException
- if this module configuration has been
frozen
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |