Methods Summary |
---|
static java.util.Map | getInvocationMap()
Map session = ActionContext.getContext().getSession();
if (session == null) {
throw new IllegalStateException("Unable to access the session.");
}
Map invocationMap = (Map) session.get(INVOCATION_MAP_KEY);
if (invocationMap == null) {
invocationMap = new HashMap();
setInvocationMap(invocationMap);
}
return invocationMap;
|
public static com.opensymphony.xwork2.ActionInvocation | loadInvocation(java.lang.String key, java.lang.String token)Checks the Map in the Session for the key and the token. If the
ActionInvocation is saved in the Session, the ValueStack from the
ActionProxy associated with the ActionInvocation is set into the
ActionContext and the ActionInvocation is returned.
InvocationContext invocationContext = (InvocationContext) getInvocationMap().get(key);
if ((invocationContext == null) || !invocationContext.token.equals(token)) {
return null;
}
ValueStack stack = invocationContext.invocation.getStack();
ActionContext.getContext().setValueStack(stack);
return invocationContext.invocation;
|
static void | setInvocationMap(java.util.Map invocationMap)
Map session = ActionContext.getContext().getSession();
if (session == null) {
throw new IllegalStateException("Unable to access the session.");
}
session.put(INVOCATION_MAP_KEY, invocationMap);
|
public static void | storeInvocation(java.lang.String key, java.lang.String token, com.opensymphony.xwork2.ActionInvocation invocation)Stores the DefaultActionInvocation and ActionContext into the Session using the provided key for loading later using
{@link #loadInvocation}
InvocationContext invocationContext = new InvocationContext(invocation, token);
Map invocationMap = getInvocationMap();
invocationMap.put(key, invocationContext);
setInvocationMap(invocationMap);
|