Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.struts.config.ActionConfig
public class ActionConfig
extends java.lang.Object
implements Serializable
<action>
element from a Struts
module configuration file.
Field Summary | |
protected String |
|
protected boolean |
|
protected boolean |
|
protected HashMap |
|
protected String |
|
protected HashMap |
|
protected String |
|
protected String |
|
protected ModuleConfig |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String[] |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected boolean |
|
protected boolean |
|
Method Summary | |
void |
|
void |
|
ExceptionConfig |
|
ExceptionConfig |
|
ExceptionConfig[] |
|
ForwardConfig |
|
ForwardConfig[] |
|
void |
|
String |
|
boolean |
|
String |
|
String |
|
String |
|
ModuleConfig |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String[] |
|
String |
|
String |
|
String |
|
String |
|
boolean |
|
boolean | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
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 specifiedname
.
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. If a request tries to cancel an Action when cancellable is not set, a "InvalidCancelException" is thrown.
- Since:
- Struts 1.2.9
protected boolean configured
Indicates if configuration of this component been completed.
protected HashMap exceptions
The set of exception handling configurations for this action, if any, keyed by thetype
property.
protected String forward
Context-relative path of the web application resource that will process this request via RequestDispatcher.forward(), instead of instantiating and calling theAction
class specified by "type". Exactly one offorward
,include
, ortype
must be specified.
protected HashMap forwards
The set of local forward configurations for this action, if any, keyed by thename
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 theAction
class specified by "type". Exactly one offorward
,include
, ortype
must be specified.
protected String input
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.
protected ModuleConfig moduleConfig
The module configuration with which we are associated.
protected String multipartClass
Fully qualified Java class name of theMultipartRequestHandler
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 theAction
class to be used to process requests for this mapping if theforward
andinclude
properties are not set. Exactly one offorward
,include
, ortype
must be specified.
protected boolean unknown
Indicates Action be configured as the default one for this module, when true.
protected boolean validate
Should thevalidate()
method of the form bean associated with this action be called?
public void addExceptionConfig(ExceptionConfig config)
Add a newExceptionConfig
instance to the set associated with this action.
- Parameters:
config
- The new configuration instance to be added
public void addForwardConfig(ForwardConfig config)
Add a newForwardConfig
instance to the set of global forwards associated with this action.
- Parameters:
config
- The new configuration instance to be added
public ExceptionConfig findException(Class type)
Find and return theExceptionConfig
instance defining howExceptions
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, returnnull
. Introduced inActionMapping
in Struts 1.1, but pushed up toActionConfig
in Struts 1.2.0.
- Parameters:
type
- Exception class for which to find a handler
- Since:
- Struts 1.2.0
public ExceptionConfig findExceptionConfig(String type)
Return the exception configuration for the specified type, if any; otherwise returnnull
.
- Parameters:
type
- Exception class name to find a configuration for
public ExceptionConfig[] findExceptionConfigs()
Return the exception configurations for this action. If there are none, a zero-length array is returned.
public ForwardConfig findForwardConfig(String name)
Return the forward configuration for the specified key, if any; otherwise returnnull
.
- Parameters:
name
- Name of the forward configuration to return
public ForwardConfig[] findForwardConfigs()
Return all forward configurations for this module. If there are none, a zero-length array is returned.
public void freeze()
Freeze the configuration of this action.
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 specifiedname
.
- Returns:
- attribute name under which our form bean is accessed.
public boolean getCancellable()
Accessor for cancellable property
- Returns:
- True if Action can be cancelled
- Since:
- Struts 1.2.9
public String getForward()
Returns context-relative path of the web application resource that will process this request.
- 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.
- Returns:
- 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.
- Returns:
- 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 theMultipartRequestHandler
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. Struts does not itself use this value in any way.
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()
public void removeExceptionConfig(ExceptionConfig config)
Remove the specified exception configuration instance.
- Parameters:
config
- ExceptionConfig instance to be removed
public void removeForwardConfig(ForwardConfig config)
Remove the specified forward configuration instance.
- Parameters:
config
- ForwardConfig instance to be removed
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 specifiedname
.
- Parameters:
attribute
- the request-scope or session-scope attribute name under which our form bean is access.
public void setCancellable(boolean cancellable)
Mutator for for cancellable property
- Parameters:
cancellable
-
- Since:
- Struts 1.2.9
public void setForward(String forward)
Set the context-relative path of the web application resource that will process this request. Exactly one offorward
,include
, ortype
must be specified.
- Parameters:
forward
- 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. Exactly one offorward
,include
, ortype
must be specified.
- Parameters:
include
- 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. Required if "name" is specified and the input bean returns validation errors.
- Parameters:
input
- 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 theMultipartRequestHandler
implementation class used to process multi-part request data for this Action.
- Parameters:
multipartClass
- fully qualified class name of theMultipartRequestHandler
implementation class.
public void setName(String name)
- Parameters:
name
- name of the form bean associated with this Action.
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. Struts does not itself use this value in any way.
- Parameters:
parameter
- General purpose configuration parameter.
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.
- Parameters:
path
- context-relative path of the submitted request.
public void setPrefix(String prefix)
- Parameters:
prefix
- Prefix used to match request parameter names to form bean property names, if any.
public void setRoles(String roles)
public void setScope(String scope)
- Parameters:
scope
- scope ("request" or "session") within which our form bean is accessed, if any.
public void setSuffix(String suffix)
- Parameters:
suffix
- Suffix used to match request parameter names to form bean property names, if any.
public void setType(String type)
public void setUnknown(boolean unknown)
- Parameters:
unknown
- Indicates Action is configured as the default one for this module, when true.
public void setValidate(boolean validate)
public String toString()
Return a String representation of this object.