| java.lang.Object org.apache.struts.config.BaseConfig org.apache.struts.config.ActionConfig
All known Subclasses: org.apache.struts.action.ActionMapping,
ActionConfig | public class ActionConfig extends BaseConfig (Code) | | A JavaBean representing the configuration information of an
<action> element from a Struts module configuration
file.
version: $Rev: 480593 $ $Date: 2006-11-29 09:17:52 -0600 (Wed, 29 Nov 2006) $ since: Struts 1.1 |
Field Summary | |
protected String | actionId The internal identification of this action mapping. | protected String | attribute The request-scope or session-scope attribute name under which our
form bean is accessed, if it is different from the form bean's
specified name . | protected boolean | cancellable Can this Action be cancelled? [false] By default, when an
Action is cancelled, validation is bypassed and the Action should not
execute the business operation. | protected String | catalog The name of a commons-chain catalog in which
command should be sought. | protected String | command The name of a commons-chain command which should be
executed as part of the processing of this action. | protected HashMap | exceptions The set of exception handling configurations for this action, if
any, keyed by the type property. | protected boolean | extensionProcessed | protected String | forward Context-relative path of the web application resource that will
process this request via RequestDispatcher.forward(), instead of
instantiating and calling the Action class specified by
"type". | protected HashMap | forwards The set of local forward configurations for this action, if any,
keyed by the name property. | protected String | include Context-relative path of the web application resource that will
process this request via RequestDispatcher.include(), instead of
instantiating and calling the Action class specified by
"type". | protected String | inherit | protected String | input Context-relative path of the input form to which control should be
returned if a validation error is encountered. | protected ModuleConfig | moduleConfig The module configuration with which we are associated. | protected String | multipartClass Fully qualified Java class name of the MultipartRequestHandler
implementation class used to process multi-part request data for this
Action. | protected String | name Name of the form bean, if any, associated with this Action. | protected String | parameter General purpose configuration parameter that can be used to pass
extra information to the Action instance selected by this Action.
Struts does not itself use this value in any way. | protected String | path Context-relative path of the submitted request, starting with a
slash ("/") character, and omitting any filename extension if extension
mapping is being used. | protected String | prefix Prefix used to match request parameter names to form bean property
names, if any. | protected String[] | roleNames The set of security role names used to authorize access to this
Action, as an array for faster access. | protected String | roles Comma-delimited list of security role names allowed to request this
Action. | protected String | scope Identifier of the scope ("request" or "session") within which our
form bean is accessed, if any. | protected String | suffix Suffix used to match request parameter names to form bean property
names, if any. | protected String | type Fully qualified Java class name of the Action class to
be used to process requests for this mapping if the
forward and include properties are not set. | protected boolean | unknown Indicates Action be configured as the default one for this module,
when true. | protected boolean | validate |
Method Summary | |
public void | addExceptionConfig(ExceptionConfig config) Add a new ExceptionConfig instance to the set
associated with this action. | public void | addForwardConfig(ForwardConfig config) Add a new ForwardConfig instance to the set of global
forwards associated with this action. | protected boolean | checkCircularInheritance(ModuleConfig moduleConfig) Traces the hierarchy of this object to check if any of the ancestors
is extending this instance.
Parameters: moduleConfig - The configuration for the module being configured. | public ExceptionConfig | findException(Class type) Find and return the ExceptionConfig instance defining
how Exceptions of the specified type should be handled.
This is performed by checking local and then global configurations for
the specified exception's class, and then looking up the superclass
chain (again checking local and then global configurations). | public ExceptionConfig | findExceptionConfig(String type) Return the exception configuration for the specified type, if any;
otherwise return null . | public ExceptionConfig[] | findExceptionConfigs() Return the exception configurations for this action. | public ForwardConfig | findForwardConfig(String name) Return the forward configuration for the specified key, if any;
otherwise return null . | public ForwardConfig[] | findForwardConfigs() Return all forward configurations for this module. | public void | freeze() Freeze the configuration of this action. | public String | getActionId() The internal name of this action mapping. | public String | getAttribute() Returns the request-scope or session-scope attribute name under
which our form bean is accessed, if it is different from the form
bean's specified name . | public boolean | getCancellable() | public String | getCatalog() Get the name of a commons-chain catalog in which a
specified command should be sought. | public String | getCommand() Get the name of a commons-chain command which should
be executed as part of the processing of this action. | public String | getExtends() | public String | getForward() Returns context-relative path of the web application resource that
will process this request. | public String | getInclude() Context-relative path of the web application resource that will
process this request. | public String | getInput() Get the context-relative path of the input form to which control
should be returned if a validation error is encountered. | public ModuleConfig | getModuleConfig() The module configuration with which we are associated. | public String | getMultipartClass() Return the fully qualified Java class name of the
MultipartRequestHandler implementation class used to
process multi-part request data for this Action. | public String | getName() Return name of the form bean, if any, associated with this Action. | public String | getParameter() Return general purpose configuration parameter that can be used to
pass extra information to the Action instance selected by this Action. | public String | getPath() Return context-relative path of the submitted request, starting
with a slash ("/") character, and omitting any filename extension if
extension mapping is being used. | public String | getPrefix() Retruns prefix used to match request parameter names to form bean
property names, if any. | public String[] | getRoleNames() Get array of security role names used to authorize access to this
Action. | public String | getRoles() | public String | getScope() Get the scope ("request" or "session") within which our form bean
is accessed, if any. | public String | getSuffix() Return suffix used to match request parameter names to form bean
property names, if any. | public String | getType() | public boolean | getUnknown() Determine whether Action is configured as the default one for this
module. | public boolean | getValidate() | protected void | inheritExceptionHandlers(ActionConfig baseConfig) | protected void | inheritForwards(ActionConfig baseConfig) | public void | inheritFrom(ActionConfig config) Inherit values that have not been overridden from the provided
config object. | public boolean | isExtensionProcessed() | public void | processExtends(ModuleConfig moduleConfig) Inherit configuration information from the ActionConfig that this
instance is extending. | public void | removeExceptionConfig(ExceptionConfig config) Remove the specified exception configuration instance. | public void | removeForwardConfig(ForwardConfig config) Remove the specified forward configuration instance. | public void | setActionId(String actionId) The internal name of this action mapping. | public void | setAttribute(String attribute) Set the request-scope or session-scope attribute name under which
our form bean is accessed, if it is different from the form bean's
specified name . | public void | setCancellable(boolean cancellable) | public void | setCatalog(String catalog) Set the name of a commons-chain catalog in which a
specified command should be sought. | public void | setCommand(String command) Set the name of a commons-chain command which should
be executed as part of the processing of this action. | public void | setExtends(String inherit) | public void | setForward(String forward) Set the context-relative path of the web application resource that
will process this request. | public void | setInclude(String include) Set context-relative path of the web application resource that will
process this request. | public void | setInput(String input) Set the context-relative path of the input form to which control
should be returned if a validation error is encountered. | public void | setModuleConfig(ModuleConfig moduleConfig) The module configuration with which we are associated. | public void | setMultipartClass(String multipartClass) Set the fully qualified Java class name of the
MultipartRequestHandler implementation class used to
process multi-part request data for this Action. | public void | setName(String name) | public void | setParameter(String parameter) General purpose configuration parameter that can be used to pass
extra information to the Action instance selected by this Action. | public void | setPath(String path) Set context-relative path of the submitted request, starting with a
slash ("/") character, and omitting any filename extension if extension
mapping is being used. | public void | setPrefix(String prefix) | public void | setRoles(String roles) | public void | setScope(String scope) | public void | setSuffix(String suffix) | public void | setType(String type) | public void | setUnknown(boolean unknown) | public void | setValidate(boolean validate) | public String | toString() Return a String representation of this object. |
actionId | protected String actionId(Code) | | The internal identification of this action mapping. Identifications are
not inheritable and must be unique within a module.
since: Struts 1.3.6 |
attribute | protected String attribute(Code) | | The request-scope or session-scope attribute name under which our
form bean is accessed, if it is different from the form bean's
specified name .
|
cancellable | protected boolean cancellable(Code) | | Can this Action be cancelled? [false] By default, when an
Action is cancelled, validation is bypassed and the Action should not
execute the business operation. If a request tries to cancel an Action
when cancellable is not set, a "InvalidCancelException" is thrown.
|
catalog | protected String catalog(Code) | | The name of a commons-chain catalog in which
command should be sought. If a command is
defined and this property is undefined, the "default" catalog will be
used. This is likely to be infrequently used after a future release of
commons-chain supports a one-string expression of a
catalog/chain combination.
since: Struts 1.3.0 |
command | protected String command(Code) | | The name of a commons-chain command which should be
executed as part of the processing of this action.
since: Struts 1.3.0 |
exceptions | protected HashMap exceptions(Code) | | The set of exception handling configurations for this action, if
any, keyed by the type property.
|
extensionProcessed | protected boolean extensionProcessed(Code) | | Have the inheritance values for this class been applied?
|
forward | protected String forward(Code) | | Context-relative path of the web application resource that will
process this request via RequestDispatcher.forward(), instead of
instantiating and calling the Action class specified by
"type". Exactly one of forward , include , or
type must be specified.
|
forwards | protected HashMap forwards(Code) | | The set of local forward configurations for this action, if any,
keyed by the name property.
|
include | protected String include(Code) | | Context-relative path of the web application resource that will
process this request via RequestDispatcher.include(), instead of
instantiating and calling the Action class specified by
"type". Exactly one of forward , include , or
type must be specified.
|
inherit | protected String inherit(Code) | | The path of the ActionConfig that this object should inherit
properties from.
|
input | protected String input(Code) | | Context-relative path of the input form to which control should be
returned if a validation error is encountered. Required if "name" is
specified and the input bean returns validation errors.
|
moduleConfig | protected ModuleConfig moduleConfig(Code) | | The module configuration with which we are associated.
|
multipartClass | protected String multipartClass(Code) | | Fully qualified Java class name of the MultipartRequestHandler
implementation class used to process multi-part request data for this
Action.
|
name | protected String name(Code) | | Name of the form bean, if any, associated with this Action.
|
parameter | protected String parameter(Code) | | General purpose configuration parameter that can be used to pass
extra information to the Action instance selected by this Action.
Struts does not itself use this value in any way.
|
path | protected String path(Code) | | Context-relative path of the submitted request, starting with a
slash ("/") character, and omitting any filename extension if extension
mapping is being used.
|
prefix | protected String prefix(Code) | | Prefix used to match request parameter names to form bean property
names, if any.
|
roleNames | protected String[] roleNames(Code) | | The set of security role names used to authorize access to this
Action, as an array for faster access.
|
roles | protected String roles(Code) | | Comma-delimited list of security role names allowed to request this
Action.
|
scope | protected String scope(Code) | | Identifier of the scope ("request" or "session") within which our
form bean is accessed, if any.
|
suffix | protected String suffix(Code) | | Suffix used to match request parameter names to form bean property
names, if any.
|
type | protected String type(Code) | | Fully qualified Java class name of the Action class to
be used to process requests for this mapping if the
forward and include properties are not set.
Exactly one of forward , include , or
type must be specified.
|
unknown | protected boolean unknown(Code) | | Indicates Action be configured as the default one for this module,
when true.
|
validate | protected boolean validate(Code) | | Should the validate() method of the form bean
associated with this action be called?
|
addExceptionConfig | public void addExceptionConfig(ExceptionConfig config)(Code) | | Add a new ExceptionConfig instance to the set
associated with this action.
Parameters: config - The new configuration instance to be added throws: IllegalStateException - if this module configuration has beenfrozen |
addForwardConfig | public void addForwardConfig(ForwardConfig config)(Code) | | Add a new ForwardConfig instance to the set of global
forwards associated with this action.
Parameters: config - The new configuration instance to be added throws: IllegalStateException - if this module configuration has beenfrozen |
checkCircularInheritance | protected boolean checkCircularInheritance(ModuleConfig moduleConfig)(Code) | | Traces the hierarchy of this object to check if any of the ancestors
is extending this instance.
Parameters: moduleConfig - The configuration for the module being configured. true if circular inheritance was detected. |
findException | public ExceptionConfig findException(Class type)(Code) | | Find and return the ExceptionConfig instance defining
how Exceptions of the specified type should be handled.
This is performed by checking local and then global configurations for
the specified exception's class, and then looking up the superclass
chain (again checking local and then global configurations). If no
handler configuration can be found, return null .
Introduced in ActionMapping in Struts 1.1, but pushed
up to ActionConfig in Struts 1.2.0.
Parameters: type - Exception class for which to find a handler since: Struts 1.2.0 |
findExceptionConfig | public ExceptionConfig findExceptionConfig(String type)(Code) | | Return the exception configuration for the specified type, if any;
otherwise return null .
Parameters: type - Exception class name to find a configuration for |
findExceptionConfigs | public ExceptionConfig[] findExceptionConfigs()(Code) | | Return the exception configurations for this action. If there are
none, a zero-length array is returned.
|
findForwardConfig | public ForwardConfig findForwardConfig(String name)(Code) | | Return the forward configuration for the specified key, if any;
otherwise return null .
Parameters: name - Name of the forward configuration to return |
findForwardConfigs | public ForwardConfig[] findForwardConfigs()(Code) | | Return all forward configurations for this module. If there are
none, a zero-length array is returned.
|
freeze | public void freeze()(Code) | | Freeze the configuration of this action.
|
getActionId | public String getActionId()(Code) | | The internal name of this action mapping. If an action has a name, it may be used
as a shortcut in a URI. For example, an action with an identification of "editPerson"
may be internally forwarded as "editPerson?id=1" which will then resolve to the
real URI path at execution time.
the actionId since: Struts 1.3.6 |
getAttribute | public String getAttribute()(Code) | | Returns the request-scope or session-scope attribute name under
which our form bean is accessed, if it is different from the form
bean's specified name .
attribute name under which our form bean is accessed. |
getCancellable | public boolean getCancellable()(Code) | | Accessor for cancellable property
True if Action can be cancelled |
getCatalog | public String getCatalog()(Code) | | Get the name of a commons-chain catalog in which a
specified command should be sought. This is likely to be infrequently
used after a future release of commons-chain supports a
one-string expression of a catalog/chain combination.
name of a commons-chain catalog in which aspecified command should be sought. since: Struts 1.3.0 |
getCommand | public String getCommand()(Code) | | Get the name of a commons-chain command which should
be executed as part of the processing of this action.
name of a commons-chain command which should beexecuted as part of the processing of this action. since: Struts 1.3.0 |
getExtends | public String getExtends()(Code) | | Returns the path of the ActionConfig that this object should inherit
properties from.
the path of the ActionConfig that this object should inheritproperties from. |
getForward | public String getForward()(Code) | | Returns context-relative path of the web application resource that
will process this request.
context-relative path of the web application resource that willprocess this request. |
getInclude | public String getInclude()(Code) | | Context-relative path of the web application resource that will
process this request.
Context-relative path of the web application resource that willprocess this request. |
getInput | public String getInput()(Code) | | Get the context-relative path of the input form to which control
should be returned if a validation error is encountered.
context-relative path of the input form to which control shouldbe returned if a validation error is encountered. |
getModuleConfig | public ModuleConfig getModuleConfig()(Code) | | The module configuration with which we are associated.
|
getMultipartClass | public String getMultipartClass()(Code) | | Return the fully qualified Java class name of the
MultipartRequestHandler implementation class used to
process multi-part request data for this Action.
|
getName | public String getName()(Code) | | Return name of the form bean, if any, associated with this Action.
|
getParameter | public String getParameter()(Code) | | Return general purpose configuration parameter that can be used to
pass extra information to the Action instance selected by this Action.
Struts does not itself use this value in any way.
|
getPath | public String getPath()(Code) | | Return context-relative path of the submitted request, starting
with a slash ("/") character, and omitting any filename extension if
extension mapping is being used.
|
getPrefix | public String getPrefix()(Code) | | Retruns prefix used to match request parameter names to form bean
property names, if any.
|
getRoleNames | public String[] getRoleNames()(Code) | | Get array of security role names used to authorize access to this
Action.
|
getScope | public String getScope()(Code) | | Get the scope ("request" or "session") within which our form bean
is accessed, if any.
|
getSuffix | public String getSuffix()(Code) | | Return suffix used to match request parameter names to form bean
property names, if any.
|
getUnknown | public boolean getUnknown()(Code) | | Determine whether Action is configured as the default one for this
module.
|
getValidate | public boolean getValidate()(Code) | | |
inheritFrom | public void inheritFrom(ActionConfig config) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException(Code) | | Inherit values that have not been overridden from the provided
config object. Subclasses overriding this method should verify that
the given parameter is of a class that contains a property it is trying
to inherit:
if (config instanceof MyCustomConfig) {
MyCustomConfig myConfig =
(MyCustomConfig) config;
if (getMyCustomProp() == null) {
setMyCustomProp(myConfig.getMyCustomProp());
}
}
If the given config is extending another object, those
extensions should be resolved before it's used as a parameter to this
method.
Parameters: config - The object that this instance will be inheriting itsvalues from. See Also: ActionConfig.processExtends(ModuleConfig) |
isExtensionProcessed | public boolean isExtensionProcessed()(Code) | | |
removeExceptionConfig | public void removeExceptionConfig(ExceptionConfig config)(Code) | | Remove the specified exception configuration instance.
Parameters: config - ExceptionConfig instance to be removed throws: IllegalStateException - if this module configuration has beenfrozen |
removeForwardConfig | public void removeForwardConfig(ForwardConfig config)(Code) | | Remove the specified forward configuration instance.
Parameters: config - ForwardConfig instance to be removed throws: IllegalStateException - if this module configuration has beenfrozen |
setActionId | public void setActionId(String actionId)(Code) | | The internal name of this action mapping. The name is not inheritable,
may not contain a forward slash, and must be unique within a module.
Parameters: actionId - the action identifier since: Struts 1.3.6 throws: IllegalStateException - if the configuration is frozen throws: IllegalArgumentException - if the identifier contains a forward slash |
setAttribute | public void setAttribute(String attribute)(Code) | | Set the request-scope or session-scope attribute name under which
our form bean is accessed, if it is different from the form bean's
specified name .
Parameters: attribute - the request-scope or session-scope attribute nameunder which our form bean is access. |
setCancellable | public void setCancellable(boolean cancellable)(Code) | | Mutator for for cancellable property
Parameters: cancellable - |
setCatalog | public void setCatalog(String catalog)(Code) | | Set the name of a commons-chain catalog in which a
specified command should be sought. This is likely to be infrequently
used after a future release of commons-chain supports a
one-string expression of a catalog/chain combination.
Parameters: catalog - name of a commons-chain catalog in which aspecified command should be sought. since: Struts 1.3.0 |
setCommand | public void setCommand(String command)(Code) | | Set the name of a commons-chain command which should
be executed as part of the processing of this action.
Parameters: command - name of a commons-chain command whichshould be executed as part of the processing of thisaction. since: Struts 1.3.0 |
setExtends | public void setExtends(String inherit)(Code) | | Set the path of the ActionConfig that this object should inherit
properties from.
Parameters: inherit - the path of the ActionConfig that this object shouldinherit properties from. |
setForward | public void setForward(String forward)(Code) | | Set the context-relative path of the web application resource that
will process this request. Exactly one of forward ,
include , or type must be specified.
Parameters: forward - context-relative path of the web application resourcethat will process this request. |
setInclude | public void setInclude(String include)(Code) | | Set context-relative path of the web application resource that will
process this request. Exactly one of forward ,
include , or type must be specified.
Parameters: include - context-relative path of the web application resourcethat will process this request. |
setInput | public void setInput(String input)(Code) | | Set the context-relative path of the input form to which control
should be returned if a validation error is encountered. Required if
"name" is specified and the input bean returns validation errors.
Parameters: input - context-relative path of the input form to which controlshould be returned if a validation error is encountered. |
setModuleConfig | public void setModuleConfig(ModuleConfig moduleConfig)(Code) | | The module configuration with which we are associated.
|
setMultipartClass | public void setMultipartClass(String multipartClass)(Code) | | Set the fully qualified Java class name of the
MultipartRequestHandler implementation class used to
process multi-part request data for this Action.
Parameters: multipartClass - fully qualified class name of theMultipartRequestHandler implementation class. |
setName | public void setName(String name)(Code) | | Parameters: name - name of the form bean associated with this Action. |
setParameter | public void setParameter(String parameter)(Code) | | General purpose configuration parameter that can be used to pass
extra information to the Action instance selected by this Action.
Struts does not itself use this value in any way.
Parameters: parameter - General purpose configuration parameter. |
setPath | public void setPath(String path)(Code) | | Set context-relative path of the submitted request, starting with a
slash ("/") character, and omitting any filename extension if extension
mapping is being used.
Parameters: path - context-relative path of the submitted request. |
setPrefix | public void setPrefix(String prefix)(Code) | | Parameters: prefix - Prefix used to match request parameter names to form beanproperty names, if any. |
setScope | public void setScope(String scope)(Code) | | Parameters: scope - scope ("request" or "session") within which our form beanis accessed, if any. |
setSuffix | public void setSuffix(String suffix)(Code) | | Parameters: suffix - Suffix used to match request parameter names to form beanproperty names, if any. |
setUnknown | public void setUnknown(boolean unknown)(Code) | | Parameters: unknown - Indicates Action is configured as the default one forthis module, when true. |
setValidate | public void setValidate(boolean validate)(Code) | | |
toString | public String toString()(Code) | | Return a String representation of this object.
|
Fields inherited from org.apache.struts.config.BaseConfig | protected boolean configured(Code)(Java Doc)
|
|
|