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

## com.opensymphony.xwork2
Class DefaultActionProxy

    java.lang.Object
      com.opensymphony.xwork2.DefaultActionProxy

All Implemented Interfaces:
  ActionProxy, java.io.Serializable

    public class DefaultActionProxy

extends java.lang.Object
implements ActionProxy, java.io.Serializable

The Default ActionProxy implementation

Since:
  2005-8-6
Version:
  $Date: 2011-03-02 22:01:01 +0100 (Wed, 02 Mar 2011) $ $Id: DefaultActionProxy.java 1076372 2011-03-02 21:01:01Z lukaszlenart $
Author:
  Rainer Hermanns, Revised by Henry Hu, tmjee
See Also:
  Serialized Form

Field Summary
`protected ActionEventListener` | `actionEventListener`
`protected java.lang.String` | `actionName`
`protected boolean` | `cleanupContext`
`protected ActionConfig` | `config`
`protected Configuration` | `configuration`
`protected boolean` | `executeResult`
`protected ActionInvocation` | `invocation`
`protected java.lang.String` | `method`
`protected java.lang.String` | `namespace`
`protected ObjectFactory` | `objectFactory`
`protected UnknownHandlerManager` | `unknownHandlerManager`

Constructor Summary
`protected` | `DefaultActionProxy(ActionInvocation inv, java.lang.String namespace, java.lang.String actionName, java.lang.String methodName, boolean executeResult, boolean cleanupContext)` This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy.

Method Summary
`java.lang.String` | `execute()` Execute this ActionProxy.
`java.lang.Object` | `getAction()` Gets the Action instance for this Proxy.
`java.lang.String` | `getActionName()` Gets the alias name this ActionProxy is mapped to.
`ActionConfig` | `getConfig()` Gets the ActionConfig this ActionProxy is built from.
`boolean` | `getExecuteResult()` Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.
`ActionInvocation` | `getInvocation()` Gets the ActionInvocation associated with this ActionProxy.
`java.lang.String` | `getMethod()` Gets the method name to execute, or `null` if no method has been specified (meaning `execute` will be invoked).
`java.lang.String` | `getNamespace()` Gets the namespace the ActionConfig for this ActionProxy is mapped to.
`protected void` | `prepare()`
`void` | `setActionEventListener(ActionEventListener listener)`
`void` | `setConfiguration(Configuration config)`
`void` | `setExecuteResult(boolean executeResult)` Sets whether this ActionProxy should also execute the Result after executing the Action.
`void` | `setObjectFactory(ObjectFactory factory)`
`void` | `setUnknownHandler(UnknownHandlerManager unknownHandlerManager)`

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

Field Detail

### configuration

    protected Configuration configuration

### config

    protected ActionConfig config

### invocation

    protected ActionInvocation invocation

### unknownHandlerManager

    protected UnknownHandlerManager unknownHandlerManager

### actionName

    protected java.lang.String actionName

### namespace

    protected java.lang.String namespace

### method

    protected java.lang.String method

### executeResult

    protected boolean executeResult

### cleanupContext

    protected boolean cleanupContext

### objectFactory

    protected ObjectFactory objectFactory

### actionEventListener

    protected ActionEventListener actionEventListener

Constructor Detail

### DefaultActionProxy

    protected DefaultActionProxy(ActionInvocation inv,
                                 java.lang.String namespace,
                                 java.lang.String actionName,
                                 java.lang.String methodName,
                                 boolean executeResult,
                                 boolean cleanupContext)

  This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy.

  The reason for the builder methods is so that you can use a subclass to create your own DefaultActionProxy instance (like a RMIActionProxy).

Method Detail

### setObjectFactory

    public void setObjectFactory(ObjectFactory factory)

### setConfiguration

    public void setConfiguration(Configuration config)

### setUnknownHandler

    public void setUnknownHandler(UnknownHandlerManager unknownHandlerManager)

### setActionEventListener

    public void setActionEventListener(ActionEventListener listener)

### getAction

    public java.lang.Object getAction()

  Description copied from interface: `ActionProxy`
  Gets the Action instance for this Proxy.

  Specified by:
    `getAction` in interface `ActionProxy`
  Returns:
    the Action instance

### getActionName

    public java.lang.String getActionName()

  Description copied from interface: `ActionProxy`
  Gets the alias name this ActionProxy is mapped to.

  Specified by:
    `getActionName` in interface `ActionProxy`
  Returns:
    the alias name

### getConfig

    public ActionConfig getConfig()

  Description copied from interface: `ActionProxy`
  Gets the ActionConfig this ActionProxy is built from.

  Specified by:
    `getConfig` in interface `ActionProxy`
  Returns:
    the ActionConfig

### setExecuteResult

    public void setExecuteResult(boolean executeResult)

  Description copied from interface: `ActionProxy`
  Sets whether this ActionProxy should also execute the Result after executing the Action.

  Specified by:
    `setExecuteResult` in interface `ActionProxy`
  Parameters:
    `executeResult` - `true` to also execute the Result.

### getExecuteResult

    public boolean getExecuteResult()

  Description copied from interface: `ActionProxy`
  Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.

  Specified by:
    `getExecuteResult` in interface `ActionProxy`
  Returns:
    the status

### getInvocation

    public ActionInvocation getInvocation()

  Description copied from interface: `ActionProxy`
  Gets the ActionInvocation associated with this ActionProxy.

  Specified by:
    `getInvocation` in interface `ActionProxy`
  Returns:
    the ActionInvocation

### getNamespace

    public java.lang.String getNamespace()

  Description copied from interface: `ActionProxy`
  Gets the namespace the ActionConfig for this ActionProxy is mapped to.

  Specified by:
    `getNamespace` in interface `ActionProxy`
  Returns:
    the namespace

### execute

    public java.lang.String execute()
                             throws java.lang.Exception

  Description copied from interface: `ActionProxy`
  Execute this ActionProxy. This will set the ActionContext from the ActionInvocation into the ActionContext ThreadLocal before invoking the ActionInvocation, then set the old ActionContext back into the ThreadLocal.

  Specified by:
    `execute` in interface `ActionProxy`
  Returns:
    the result code returned from executing the ActionInvocation
  Throws:
    `java.lang.Exception` - can be thrown.
  See Also:
    `ActionInvocation`

### getMethod

    public java.lang.String getMethod()

  Description copied from interface: `ActionProxy`
  Gets the method name to execute, or `null` if no method has been specified (meaning `execute` will be invoked).

  Specified by:
    `getMethod` in interface `ActionProxy`
  Returns:
    the method to execute

### prepare

    protected void prepare()

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-2011 Apache Software Foundation. All Rights Reserved.