Class WebActionContext

All Implemented Interfaces:
Map<String,Object>, org.apache.commons.chain.Context, ActionContext
Direct Known Subclasses:
ServletActionContext

public class WebActionContext extends ActionContextBase
Provide a Subclass of ActionContextBase which is understood to be wrapping an instance of WebContext.
  • 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 interface ActionContext
      Overrides:
      release in class ActionContextBase
    • getHeader

      public Map<String,String> 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

      public Map<String,String[]> 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

      public Map<String,String> getInitParam()
      Return an immutable Map that maps context application initialization parameters to their values.
      Returns:
      An immutable Map of web context initialization parameters
    • getParam

      public Map<String,String> getParam()
      Return a map whose keys are String request parameter names and whose values are String 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

      public Map<String,String[]> getParamValues()
      Return a map whose keys are String request parameter names and whose values are String[] values.
      Returns:
      A map of web request parameter values (as an array)
    • getApplicationScope

      public Map<String,Object> 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 interface ActionContext
      Specified by:
      getApplicationScope in class ActionContextBase
      Returns:
      A Map of "application scope" attributes.
    • getRequestScope

      public Map<String,Object> 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 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.

      Specified by:
      getRequestScope in interface ActionContext
      Specified by:
      getRequestScope in class ActionContextBase
      Returns:
      a Map of "request scope" attributes.
    • getParameterMap

      public Map<String,String[]> 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 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.

      Returns:
      A map of the request parameter attributes
    • getSessionScope

      public Map<String,Object> 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 interface ActionContext
      Specified by:
      getSessionScope in class ActionContextBase
      Returns:
      A Map of "session scope" attributes.
    • setModuleConfig

      public void setModuleConfig(ModuleConfig moduleConfig)
      Description copied from interface: ActionContext

      Set the ModuleConfig which is operative for the current request.

      Specified by:
      setModuleConfig in interface ActionContext
      Overrides:
      setModuleConfig in class ActionContextBase
      Parameters:
      moduleConfig - The ModuleConfig to be used with this request
    • getModuleConfig

      public ModuleConfig getModuleConfig()
      Description copied from interface: ActionContext

      Get the ModuleConfig which is operative for the current request.

      Specified by:
      getModuleConfig in interface ActionContext
      Overrides:
      getModuleConfig in class ActionContextBase
      Returns:
      The MooduleConfig being used with this request
      See Also:
    • setCancelled

      public void setCancelled(Boolean cancelled)
      Description copied from interface: ActionContext
      Set the "cancel event" state for this context.
      Specified by:
      setCancelled in interface ActionContext
      Overrides:
      setCancelled in class ActionContextBase
      Parameters:
      cancelled - On true, set the cancel event state to true. On false, set the cancel event state to false.
      See Also:
    • getCancelled

      public Boolean getCancelled()
      Description copied from interface: ActionContext
      Indicate if the "cancel event" state is set for for this context,
      Specified by:
      getCancelled in interface ActionContext
      Overrides:
      getCancelled in class ActionContextBase
      See Also: