public class MockActionContext extends ActionContextBase
Implement ActionContext with empty maps for
applicationScope, sessionScope,
requestScope, and parameterMap properties.
ACTION_CONFIG_KEY, ACTION_FORM_KEY, ACTION_KEY, CANCEL_KEY, ERROR_ACTION_MESSAGES_KEY, EXCEPTION_KEY, FORWARD_CONFIG_KEY, INCLUDE_KEY, LOCALE_KEY, MESSAGE_ACTION_MESSAGES_KEY, MESSAGE_RESOURCES_KEY, MODULE_CONFIG_KEY, token, TOKEN_KEY, TRANSACTION_TOKEN_KEY, VALID_KEYAPPLICATION_SCOPE, REQUEST_SCOPE, SESSION_SCOPE| Constructor and Description |
|---|
MockActionContext() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map |
getApplicationScope()
Return a
Map of Application scoped values. |
java.util.Map |
getParameterMap()
Return a
Map of parameters submitted by the user as
part of this request. |
java.util.Map |
getRequestScope()
Return a
Map of request scoped values. |
java.util.Map |
getSessionScope()
Return a
Map of Session scoped values. |
void |
setApplicationScope(java.util.Map applicationScope) |
void |
setParameterMap(java.util.Map parameterMap) |
void |
setRequestScope(java.util.Map requestScope) |
void |
setSessionScope(java.util.Map sessionScope) |
addActionMessages, addErrors, addMessages, findOrCreateActionForm, findOrCreateActionForm, generateToken, getAction, getActionConfig, getActionForm, getCancelled, getErrors, getException, getFormValid, getForwardConfig, getInclude, getLocale, getLogger, getMessageResources, getMessageResources, getMessages, getModuleConfig, getScope, getTokenGeneratorId, isTokenValid, isTokenValid, release, resetToken, saveActionMessages, saveActionMessages, saveErrors, saveMessages, saveMessages, saveToken, setAction, setActionConfig, setActionForm, setCancelled, setException, setFormValid, setForwardConfig, setInclude, setLocale, setLogger, setMessageResources, setModuleConfigclear, containsKey, containsValue, entrySet, get, getBaseContext, isEmpty, keySet, put, putAll, remove, size, valuespublic java.util.Map getApplicationScope()
ActionContextReturn a Map of Application scoped values.
This is implemented in analogy with the Application scope in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.
The ultimate meaning of "application scope" is an implementation detail left unspecified by Struts.
getApplicationScope in interface ActionContextgetApplicationScope in class ActionContextBasepublic void setApplicationScope(java.util.Map applicationScope)
public java.util.Map getParameterMap()
ActionContextReturn a Map of parameters submitted by the user as
part of this request. The keys to this map will be request parameter
names (of type String), and the values will be
String[].
This is implemented in analogy with the Request parameters of the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.
public void setParameterMap(java.util.Map parameterMap)
public java.util.Map getRequestScope()
ActionContextReturn a Map of request scoped values. A request is
understood as the fundamental motivation for any particular instance of
an ActionContext.
This is implemented in analogy with the Request Context in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.
The ultimate meaning of "request scope" is an implementation detail left unspecified by Struts.
getRequestScope in interface ActionContextgetRequestScope in class ActionContextBasepublic void setRequestScope(java.util.Map requestScope)
public java.util.Map getSessionScope()
ActionContextReturn a Map of Session scoped values. A session is
understood as a sequence of requests made by the same user.
This is implemented in analogy with the Session scope in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.
The ultimate meaning of "session scope" is an implementation detail left unspecified by Struts.
getSessionScope in interface ActionContextgetSessionScope in class ActionContextBasepublic void setSessionScope(java.util.Map sessionScope)
Copyright © 2000–2025 Apache Software Foundation. All rights reserved.