|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.ActionChainResult
public class ActionChainResult
This result invokes an entire other action, complete with it's own interceptor stack and result. This result type takes the following parameters:
<package name="public" extends="struts-default"> <!-- Chain creatAccount to login, using the default parameter --> <action name="createAccount" class="..."> <result type="chain">login</result> </action> <action name="login" class="..."> <!-- Chain to another namespace --> <result type="chain"> <param name="actionName">dashboard</param> <param name="namespace">/secure</param> </result> </action> </package> <package name="secure" extends="struts-default" namespace="/secure"> <action name="dashboard" class="..."> <result>dashboard.jsp</result> </action> </package>
Field Summary | |
---|---|
private String |
actionName
|
private ActionProxyFactory |
actionProxyFactory
|
private static String |
CHAIN_HISTORY
The action context key to save the chain history. |
static String |
DEFAULT_PARAM
The result parameter name to set the name of the action to chain to. |
private static Logger |
LOG
|
private String |
methodName
|
private String |
namespace
|
private ActionProxy |
proxy
|
static String |
SKIP_ACTIONS_PARAM
The result parameter name to set the name of the action to chain to. |
private String |
skipActions
The list of actions to skip. |
Constructor Summary | |
---|---|
ActionChainResult()
|
|
ActionChainResult(String namespace,
String actionName,
String methodName)
|
|
ActionChainResult(String namespace,
String actionName,
String methodName,
String skipActions)
|
Method Summary | |
---|---|
private void |
addToHistory(String namespace,
String actionName,
String methodName)
|
boolean |
equals(Object o)
|
void |
execute(ActionInvocation invocation)
Represents a generic interface for all action execution results. |
static LinkedList |
getChainHistory()
Get the XWork chain history. |
ActionProxy |
getProxy()
|
int |
hashCode()
|
private boolean |
isInChainHistory(String namespace,
String actionName,
String methodName)
|
private String |
makeKey(String namespace,
String actionName,
String methodName)
|
void |
setActionName(String actionName)
Set the action name. |
void |
setActionProxyFactory(ActionProxyFactory actionProxyFactory)
|
void |
setMethod(String method)
|
void |
setNamespace(String namespace)
sets the namespace of the Action that we're chaining to. |
void |
setSkipActions(String actions)
Set the list of actions to skip. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger LOG
public static final String DEFAULT_PARAM
private static final String CHAIN_HISTORY
public static final String SKIP_ACTIONS_PARAM
private ActionProxy proxy
private String actionName
private String namespace
private String methodName
private String skipActions
private ActionProxyFactory actionProxyFactory
Constructor Detail |
---|
public ActionChainResult()
public ActionChainResult(String namespace, String actionName, String methodName)
public ActionChainResult(String namespace, String actionName, String methodName, String skipActions)
Method Detail |
---|
public void setActionProxyFactory(ActionProxyFactory actionProxyFactory)
actionProxyFactory
- the actionProxyFactory to setpublic void setActionName(String actionName)
actionName
- The action name.public void setNamespace(String namespace)
namespace
- the name of the namespace we're chaining topublic void setSkipActions(String actions)
actions
- The list of action name separated by a white space.public void setMethod(String method)
public ActionProxy getProxy()
public static LinkedList getChainHistory()
namespace/action!method
keys.
public void execute(ActionInvocation invocation) throws Exception
Result
execute
in interface Result
invocation
- the DefaultActionInvocation calling the action call stack
Exception
- can be thrown.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
private boolean isInChainHistory(String namespace, String actionName, String methodName)
private void addToHistory(String namespace, String actionName, String methodName)
private String makeKey(String namespace, String actionName, String methodName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |