com.opensymphony.xwork
Class DefaultActionProxy
java.lang.Object
com.opensymphony.xwork.DefaultActionProxy
- All Implemented Interfaces:
- ActionProxy, Serializable
- Direct Known Subclasses:
- DWRValidator.ValidatorActionProxy
public class DefaultActionProxy - extends Object
- implements ActionProxy, Serializable
The Default ActionProxy implementation
- Since:
- 2005-8-6
- Version:
- $Revision: 861 $
- Author:
- Rainer Hermanns, Revised by Henry Hu
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
DefaultActionProxy(String namespace,
String actionName,
Map extraContext,
boolean executeResult,
boolean cleanupContext)
This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
config
protected ActionConfig config
invocation
protected ActionInvocation invocation
extraContext
protected Map extraContext
actionName
protected String actionName
namespace
protected String namespace
method
protected String method
executeResult
protected boolean executeResult
cleanupContext
protected boolean cleanupContext
DefaultActionProxy
protected DefaultActionProxy(String namespace,
String actionName,
Map extraContext,
boolean executeResult,
boolean cleanupContext)
throws Exception
- 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).
- Throws:
Exception
getAction
public Object getAction()
- Specified by:
getAction in interface ActionProxy
- Returns:
- the Action instance for this Proxy
getActionName
public String getActionName()
- Specified by:
getActionName in interface ActionProxy
- Returns:
- the alias name this ActionProxy is mapped to
getConfig
public ActionConfig getConfig()
- Specified by:
getConfig in interface ActionProxy
- Returns:
- the ActionConfig this ActionProxy is built from
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
getExecuteResult
public boolean getExecuteResult()
- Specified by:
getExecuteResult in interface ActionProxy
- Returns:
- the status of whether the ActionProxy is set to execute the Result after the Action is executed
getInvocation
public ActionInvocation getInvocation()
- Specified by:
getInvocation in interface ActionProxy
- Returns:
- the ActionInvocation associated with this ActionProxy
getNamespace
public String getNamespace()
- Specified by:
getNamespace in interface ActionProxy
- Returns:
- the namespace the ActionConfig for this ActionProxy is mapped to
execute
public String execute()
throws 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:
Exception- See Also:
ActionInvocation
getMethod
public String getMethod()
- Description copied from interface:
ActionProxy
- Returns the method to execute, or null if no method has been specified (meaning "execute" will be invoked)
- Specified by:
getMethod in interface ActionProxy
setMethod
public void setMethod(String method)
- Description copied from interface:
ActionProxy
- Sets the method to execute for the action invocation. If no method is specified, the method provided by
in the action's configuration will be used.
- Specified by:
setMethod in interface ActionProxy
- Parameters:
method - the string name of the method to invoke
prepare
protected void prepare()
throws Exception
- Throws:
Exception
|