Home » Struts-1.3.10 » org.apache.struts » config » [javadoc | source]
org.apache.struts.config
public class: ActionConfig [javadoc | source]
java.lang.Object
   org.apache.struts.config.ActionConfig

All Implemented Interfaces:
    Serializable

A JavaBean representing the configuration information of an <action> element from a Struts module configuration file.

Field Summary
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 the type property. 
protected  HashMap forwards    The set of local forward configurations for this action, if any, keyed by the name property. 
protected  ModuleConfig moduleConfig    The module configuration with which we are associated. 
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  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". Exactly one of forward, include, or type must be specified. 
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". Exactly one of forward, include, or type 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  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 roles    Comma-delimited list of security role names allowed to request this Action. 
protected  String[] roleNames    The set of security role names used to authorize access to this Action, as an array for faster access. 
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. Exactly one of forward, include, or type must be specified. 
protected  boolean unknown    Indicates Action be configured as the default one for this module, when true. 
protected  boolean validate    Should the validate() method of the form bean associated with this action be called? 
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
 
Method from org.apache.struts.config.ActionConfig Summary:
addExceptionConfig,   addForwardConfig,   findException,   findExceptionConfig,   findExceptionConfigs,   findForwardConfig,   findForwardConfigs,   freeze,   getAttribute,   getCancellable,   getForward,   getInclude,   getInput,   getModuleConfig,   getMultipartClass,   getName,   getParameter,   getPath,   getPrefix,   getRoleNames,   getRoles,   getScope,   getSuffix,   getType,   getUnknown,   getValidate,   removeExceptionConfig,   removeForwardConfig,   setAttribute,   setCancellable,   setForward,   setInclude,   setInput,   setModuleConfig,   setMultipartClass,   setName,   setParameter,   setPath,   setPrefix,   setRoles,   setScope,   setSuffix,   setType,   setUnknown,   setValidate,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts.config.ActionConfig Detail:
 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.
 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). 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.

 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. 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 return null.
 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 specified name.
 public boolean getCancellable() 

    Accessor for cancellable property

 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. 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.
 public  void removeForwardConfig(ForwardConfig config) 
    Remove the specified forward configuration instance.
 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) 

    Mutator for for cancellable property

 public  void setForward(String forward) 
    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.
 public  void setInclude(String include) 
    Set context-relative path of the web application resource that will process this request. Exactly one of forward, include, or type must be specified.
 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.
 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. Struts does not itself use this value in any way.
 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.