ActionConfig (Apache Struts API Documentation)
Keywords: org.apache.struts.config.ActionConfig,ActionConfig class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.config
Class ActionConfig

    java.lang.Object
      |
      +--org.apache.struts.config.ActionConfig

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  ActionMapping

public class ActionConfig
extends java.lang.Object
implements java.io.Serializable

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

Since:
  Struts 1.1
Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:14:33 +0100 (Fri, 22 Aug 2003) $
Author:
  Craig R. McClanahan
See Also:
  Serialized Form

Field Summary
`protected java.lang.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` | `configured` Indicates if configuration of this component been completed.
`protected java.util.HashMap` | `exceptions` The set of exception handling configurations for this action, if any, keyed by the `type` property.
`protected java.lang.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 java.util.HashMap` | `forwards` The set of local forward configurations for this action, if any, keyed by the `name` property.
`protected java.lang.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 java.lang.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 java.lang.String` | `multipartClass` Fully qualified Java class name of the `MultipartRequestHandler` implementation class used to process multi-part request data for this Action.
`protected java.lang.String` | `name` Name of the form bean, if any, associated with this Action.
`protected java.lang.String` | `parameter` General purpose configuration parameter that can be used to pass extra information to the Action instance selected by this Action.
`protected java.lang.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 java.lang.String` | `prefix` Prefix used to match request parameter names to form bean property names, if any.
`protected java.lang.String[]` | `roleNames` The set of security role names used to authorize access to this Action, as an array for faster access.
`protected java.lang.String` | `roles` Comma-delimited list of security role names allowed to request this Action.
`protected java.lang.String` | `scope` Identifier of the scope ("request" or "session") within which our form bean is accessed, if any.
`protected java.lang.String` | `suffix` Suffix used to match request parameter names to form bean property names, if any.
`protected java.lang.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 application, when true.
`protected boolean` | `validate` Should the `validate()` method of the form bean associated with this action be called?

Constructor Summary
`ActionConfig()`

Method Summary
`void` | `addExceptionConfig(ExceptionConfig config)` Add a new `ExceptionConfig` instance to the set associated with this action.
`void` | `addForwardConfig(ForwardConfig config)` Add a new `ForwardConfig` instance to the set of global forwards associated with this action.
`ExceptionConfig` | `findExceptionConfig(java.lang.String type)` Return the exception configuration for the specified type, if any; otherwise return `null`.
`ExceptionConfig[]` | `findExceptionConfigs()` Return the exception configurations for this action.
`ForwardConfig` | `findForwardConfig(java.lang.String name)` Return the forward configuration for the specified key, if any; otherwise return `null`.
`ForwardConfig[]` | `findForwardConfigs()` Return the form bean configurations for this application.
`void` | `freeze()` Freeze the configuration of this action.
`ModuleConfig` | `getApplicationConfig()` Deprecated. `getModuleConfig()`
`java.lang.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`.
`java.lang.String` | `getForward()` Returns context-relative path of the web application resource that will process this request.
`java.lang.String` | `getInclude()` Context-relative path of the web application resource that will process this request.
`java.lang.String` | `getInput()` Get the context-relative path of the input form to which control should be returned if a validation error is encountered.
`ModuleConfig` | `getModuleConfig()` The module configuration with which we are associated.
`java.lang.String` | `getMultipartClass()` Return the fully qualified Java class name of the `MultipartRequestHandler` implementation class used to process multi-part request data for this Action.
`java.lang.String` | `getName()` Return name of the form bean, if any, associated with this Action.
`java.lang.String` | `getParameter()` Return general purpose configuration parameter that can be used to pass extra information to the Action instance selected by this Action.
`java.lang.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.
`java.lang.String` | `getPrefix()` Retruns prefix used to match request parameter names to form bean property names, if any.
`java.lang.String[]` | `getRoleNames()` Get array of security role names used to authorize access to this Action.
`java.lang.String` | `getRoles()`
`java.lang.String` | `getScope()` Get the scope ("request" or "session") within which our form bean is accessed, if any.
`java.lang.String` | `getSuffix()` Return suffix used to match request parameter names to form bean property names, if any.
`java.lang.String` | `getType()`
`boolean` | `getUnknown()` Determine whether Action is configured as the default one for this application.
`boolean` | `getValidate()`
`void` | `removeExceptionConfig(ExceptionConfig config)` Remove the specified exception configuration instance.
`void` | `removeForwardConfig(ForwardConfig config)` Remove the specified forward configuration instance.
`void` | `setApplicationConfig(ModuleConfig moduleConfig)` Deprecated. `setModuleConfig(ModuleConfig)`
`void` | `setAttribute(java.lang.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`.
`void` | `setForward(java.lang.String forward)` Set the context-relative path of the web application resource that will process this request.
`void` | `setInclude(java.lang.String include)` Set context-relative path of the web application resource that will process this request.
`void` | `setInput(java.lang.String input)` Set the context-relative path of the input form to which control should be returned if a validation error is encountered.
`void` | `setModuleConfig(ModuleConfig moduleConfig)` The module configuration with which we are associated.
`void` | `setMultipartClass(java.lang.String multipartClass)` Set the fully qualified Java class name of the `MultipartRequestHandler` implementation class used to process multi-part request data for this Action.
`void` | `setName(java.lang.String name)`
`void` | `setParameter(java.lang.String parameter)` General purpose configuration parameter that can be used to pass extra information to the Action instance selected by this Action.
`void` | `setPath(java.lang.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.
`void` | `setPrefix(java.lang.String prefix)`
`void` | `setRoles(java.lang.String roles)`
`void` | `setScope(java.lang.String scope)`
`void` | `setSuffix(java.lang.String suffix)`
`void` | `setType(java.lang.String type)`
`void` | `setUnknown(boolean unknown)`
`void` | `setValidate(boolean validate)`
`java.lang.String` | `toString()` Return a String representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### configured

    protected boolean configured

  Indicates if configuration of this component been completed.

### exceptions

    protected java.util.HashMap exceptions

  The set of exception handling configurations for this action, if any, keyed by the `type` property.

### forwards

    protected java.util.HashMap forwards

  The set of local forward configurations for this action, if any, keyed by the `name` property.

### moduleConfig

    protected ModuleConfig moduleConfig

  The module configuration with which we are associated.

### attribute

    protected java.lang.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`.

### forward

    protected java.lang.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.

### include

    protected java.lang.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.

### input

    protected java.lang.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.

### multipartClass

    protected java.lang.String multipartClass

  Fully qualified Java class name of the `MultipartRequestHandler` implementation class used to process multi-part request data for this Action.

### name

    protected java.lang.String name

  Name of the form bean, if any, associated with this Action.

### parameter

    protected java.lang.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.

### path

    protected java.lang.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.

### prefix

    protected java.lang.String prefix

  Prefix used to match request parameter names to form bean property names, if any.

### roles

    protected java.lang.String roles

  Comma-delimited list of security role names allowed to request this Action.

### roleNames

    protected java.lang.String[] roleNames

  The set of security role names used to authorize access to this Action, as an array for faster access.

### scope

    protected java.lang.String scope

  Identifier of the scope ("request" or "session") within which our form bean is accessed, if any.

### suffix

    protected java.lang.String suffix

  Suffix used to match request parameter names to form bean property names, if any.

### type

    protected java.lang.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.

### unknown

    protected boolean unknown

  Indicates Action be configured as the default one for this application, when true.

### validate

    protected boolean validate

  Should the `validate()` method of the form bean associated with this action be called?

Constructor Detail

### ActionConfig

    public ActionConfig()

Method Detail

### getApplicationConfig

    public ModuleConfig getApplicationConfig()

  Deprecated. `getModuleConfig()`

  The module configuration with which we are associated.

### getModuleConfig

    public ModuleConfig getModuleConfig()

  The module configuration with which we are associated.

### setApplicationConfig

    public void setApplicationConfig(ModuleConfig moduleConfig)

  Deprecated. `setModuleConfig(ModuleConfig)`

  The module configuration with which we are associated.

### setModuleConfig

    public void setModuleConfig(ModuleConfig moduleConfig)

  The module configuration with which we are associated.

### getAttribute

    public java.lang.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`.

  Returns:
    attribute name under which our form bean is accessed.

### setAttribute

    public void setAttribute(java.lang.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`.

  Parameters:
    `attribute` - the request-scope or session-scope attribute name under which our form bean is access.

### getForward

    public java.lang.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.

### setForward

    public void setForward(java.lang.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.

  Parameters:
    `forward` - context-relative path of the web application resource that will process this request.

### getInclude

    public java.lang.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.

### setInclude

    public void setInclude(java.lang.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.

  Parameters:
    `include` - context-relative path of the web application resource that will process this request.

### getInput

    public java.lang.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.

### setInput

    public void setInput(java.lang.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.

### getMultipartClass

    public java.lang.String getMultipartClass()

  Return the fully qualified Java class name of the `MultipartRequestHandler` implementation class used to process multi-part request data for this Action.

### setMultipartClass

    public void setMultipartClass(java.lang.String multipartClass)

  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 the `MultipartRequestHandler` implementation class.

### getName

    public java.lang.String getName()

  Return name of the form bean, if any, associated with this Action.

### setName

    public void setName(java.lang.String name)

  Parameters:
    `name` - name of the form bean associated with this Action.

### getParameter

    public java.lang.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.

### setParameter

    public void setParameter(java.lang.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.

### getPath

    public java.lang.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.

### setPath

    public void setPath(java.lang.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.

### getPrefix

    public java.lang.String getPrefix()

  Retruns prefix used to match request parameter names to form bean property names, if any.

### setPrefix

    public void setPrefix(java.lang.String prefix)

  Parameters:
    `prefix` - Prefix used to match request parameter names to form bean property names, if any.

### getRoles

    public java.lang.String getRoles()

### setRoles

    public void setRoles(java.lang.String roles)

### getRoleNames

    public java.lang.String[] getRoleNames()

  Get array of security role names used to authorize access to this Action.

### getScope

    public java.lang.String getScope()

  Get the scope ("request" or "session") within which our form bean is accessed, if any.

### setScope

    public void setScope(java.lang.String scope)

  Parameters:
    `scope` - scope ("request" or "session") within which our form bean is accessed, if any.

### getSuffix

    public java.lang.String getSuffix()

  Return suffix used to match request parameter names to form bean property names, if any.

### setSuffix

    public void setSuffix(java.lang.String suffix)

  Parameters:
    `suffix` - Suffix used to match request parameter names to form bean property names, if any.

### getType

    public java.lang.String getType()

### setType

    public void setType(java.lang.String type)

### getUnknown

    public boolean getUnknown()

  Determine whether Action is configured as the default one for this application.

### setUnknown

    public void setUnknown(boolean unknown)

  Parameters:
    `unknown` - Indicates Action is configured as the default one for this application, when true.

### getValidate

    public boolean getValidate()

### setValidate

    public void setValidate(boolean validate)

### addExceptionConfig

    public void addExceptionConfig(ExceptionConfig config)

  Add a new `ExceptionConfig` instance to the set associated with this action.

  Parameters:
    `config` - The new configuration instance to be added
  Throws:
    `java.lang.IllegalStateException` - if this module configuration has been frozen

### addForwardConfig

    public void addForwardConfig(ForwardConfig config)

  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:
    `java.lang.IllegalStateException` - if this module configuration has been frozen

### findExceptionConfig

    public ExceptionConfig findExceptionConfig(java.lang.String type)

  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()

  Return the exception configurations for this action. If there are none, a zero-length array is returned.

### findForwardConfig

    public ForwardConfig findForwardConfig(java.lang.String name)

  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()

  Return the form bean configurations for this application. If there are none, a zero-length array is returned.

### freeze

    public void freeze()

  Freeze the configuration of this action.

### removeExceptionConfig

    public void removeExceptionConfig(ExceptionConfig config)

  Remove the specified exception configuration instance.

  Parameters:
    `config` - ExceptionConfig instance to be removed
  Throws:
    `java.lang.IllegalStateException` - if this module configuration has been frozen

### removeForwardConfig

    public void removeForwardConfig(ForwardConfig config)

  Remove the specified forward configuration instance.

  Parameters:
    `config` - ForwardConfig instance to be removed
  Throws:
    `java.lang.IllegalStateException` - if this module configuration has been frozen

### toString

    public java.lang.String toString()

  Return a String representation of this object.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 - Apache Software Foundation