Class WebActionContext
- All Implemented Interfaces:
Map<String,
,Object> org.apache.commons.chain.Context
,ActionContext
- Direct Known Subclasses:
ServletActionContext
WebContext
.-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.struts.chain.contexts.ActionContextBase
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_KEY
Fields inherited from interface org.apache.struts.chain.contexts.ActionContext
APPLICATION_SCOPE, REQUEST_SCOPE, SESSION_SCOPE
-
Constructor Summary
ConstructorDescriptionWebActionContext
(org.apache.commons.chain.web.jakarta.WebContext context) Instantiate this composite by wrapping an instance of WebContext. -
Method Summary
Modifier and TypeMethodDescriptionReturn aMap
of Application scoped values.Indicate if the "cancel event" state is set for for this context,Return an immutable Map that maps header names to the first (or only) header value (as a String).Return an immutable Map that maps header names to the set of all values specified in the request (as a String array).Return an immutable Map that maps context application initialization parameters to their values.Get the ModuleConfig which is operative for the current request.getParam()
Return a map whose keys areString
request parameter names and whose values areString
values.Return aMap
of parameters submitted by the user as part of this request.Return a map whose keys areString
request parameter names and whose values areString[]
values.Return aMap
of request scoped values.Return aMap
of Session scoped values.void
release()
Signal to the instance that it will not be used any more, so that any resources which should be cleaned up can be cleaned up.void
setCancelled
(Boolean cancelled) Set the "cancel event" state for this context.void
setModuleConfig
(ModuleConfig moduleConfig) Set the ModuleConfig which is operative for the current request.protected org.apache.commons.chain.web.jakarta.WebContext
Provide the wrapped WebContext for this composite.Methods inherited from class org.apache.struts.chain.contexts.ActionContextBase
addActionMessages, addErrors, addMessages, findOrCreateActionForm, findOrCreateActionForm, generateToken, getAction, getActionConfig, getActionForm, getErrors, getException, getFormValid, getForwardConfig, getInclude, getLocale, getLogger, getMessageResources, getMessageResources, getMessages, getScope, getTokenGeneratorId, isTokenValid, isTokenValid, resetToken, saveActionMessages, saveActionMessages, saveErrors, saveMessages, saveMessages, saveToken, setAction, setActionConfig, setActionForm, setException, setFormValid, setForwardConfig, setInclude, setLocale, setLogger, setMessageResources
Methods inherited from class org.apache.struts.chain.contexts.ContextWrapper
clear, containsKey, containsValue, entrySet, get, getBaseContext, isEmpty, keySet, put, putAll, remove, size, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
WebActionContext
public WebActionContext(org.apache.commons.chain.web.jakarta.WebContext context) Instantiate this composite by wrapping an instance of WebContext.- Parameters:
context
- The WebContext to wrap
-
-
Method Details
-
webContext
protected org.apache.commons.chain.web.jakarta.WebContext webContext()Provide the wrapped WebContext for this composite.- Returns:
- The wrapped WebContext
-
release
public void release()Description copied from interface:ActionContext
Signal to the instance that it will not be used any more, so that any resources which should be cleaned up can be cleaned up.- Specified by:
release
in interfaceActionContext
- Overrides:
release
in classActionContextBase
-
getHeader
Return an immutable Map that maps header names to the first (or only) header value (as a String).- Returns:
- A immutable Map of web request header names
-
getHeaderValues
Return an immutable Map that maps header names to the set of all values specified in the request (as a String array). Header names must be matched in a case-insensitive manner.- Returns:
- An immutable Map of web request header values
-
getInitParam
Return an immutable Map that maps context application initialization parameters to their values.- Returns:
- An immutable Map of web context initialization parameters
-
getParam
Return a map whose keys areString
request parameter names and whose values areString
values.For parameters which were submitted with more than one value, only one value will be returned, as if one called
ServletRequest.getParameter(String)
.- Returns:
- A map of web request parameters
-
getParamValues
Return a map whose keys areString
request parameter names and whose values areString[]
values.- Returns:
- A map of web request parameter values (as an array)
-
getApplicationScope
Description copied from interface:ActionContext
Return 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.
- Specified by:
getApplicationScope
in interfaceActionContext
- Specified by:
getApplicationScope
in classActionContextBase
- Returns:
- A Map of "application scope" attributes.
-
getRequestScope
Description copied from interface:ActionContext
Return a
Map
of request scoped values. A request is understood as the fundamental motivation for any particular instance of anActionContext
.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.
- Specified by:
getRequestScope
in interfaceActionContext
- Specified by:
getRequestScope
in classActionContextBase
- Returns:
- a Map of "request scope" attributes.
-
getParameterMap
Description copied from interface:ActionContext
Return a
Map
of parameters submitted by the user as part of this request. The keys to this map will be request parameter names (of typeString
), and the values will beString[]
.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.
- Returns:
- A map of the request parameter attributes
-
getSessionScope
Description copied from interface:ActionContext
Return 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.
- Specified by:
getSessionScope
in interfaceActionContext
- Specified by:
getSessionScope
in classActionContextBase
- Returns:
- A Map of "session scope" attributes.
-
setModuleConfig
Description copied from interface:ActionContext
Set the ModuleConfig which is operative for the current request.
- Specified by:
setModuleConfig
in interfaceActionContext
- Overrides:
setModuleConfig
in classActionContextBase
- Parameters:
moduleConfig
- The ModuleConfig to be used with this request
-
getModuleConfig
Description copied from interface:ActionContext
Get the ModuleConfig which is operative for the current request.
- Specified by:
getModuleConfig
in interfaceActionContext
- Overrides:
getModuleConfig
in classActionContextBase
- Returns:
- The MooduleConfig being used with this request
- See Also:
-
setCancelled
Description copied from interface:ActionContext
Set the "cancel event" state for this context.- Specified by:
setCancelled
in interfaceActionContext
- Overrides:
setCancelled
in classActionContextBase
- Parameters:
cancelled
- On true, set the cancel event state to true. On false, set the cancel event state to false.- See Also:
-
getCancelled
Description copied from interface:ActionContext
Indicate if the "cancel event" state is set for for this context,- Specified by:
getCancelled
in interfaceActionContext
- Overrides:
getCancelled
in classActionContextBase
- See Also:
-