MockActionContext (Struts 1.3.10 API)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.chain.contexts
Class MockActionContext

    java.lang.Object
      org.apache.struts.chain.contexts.ContextWrapper
          org.apache.struts.chain.contexts.ActionContextBase
              org.apache.struts.chain.contexts.MockActionContext

All Implemented Interfaces:
  Map, org.apache.commons.chain.Context, ActionContext

    public class MockActionContext

extends ActionContextBase

Implement `ActionContext` with empty maps for `applicationScope`, `sessionScope`, `requestScope`, and `parameterMap` properties.

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

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
`MockActionContext()`

Method Summary
`Map` | `getApplicationScope()` Return a `Map` of Application scoped values.
`Map` | `getParameterMap()` Return a `Map` of parameters submitted by the user as part of this request.
`Map` | `getRequestScope()` Return a `Map` of request scoped values.
`Map` | `getSessionScope()` Return a `Map` of Session scoped values.
`void` | `setApplicationScope(Map applicationScope)`
`void` | `setParameterMap(Map parameterMap)`
`void` | `setRequestScope(Map requestScope)`
`void` | `setSessionScope(Map sessionScope)`

Methods inherited from class org.apache.struts.chain.contexts.ActionContextBase
`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, setModuleConfig`

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, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

Constructor Detail

### MockActionContext

    public MockActionContext()

Method Detail

### getApplicationScope

    public Map 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.

### setApplicationScope

    public void setApplicationScope(Map applicationScope)

### getParameterMap

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

### setParameterMap

    public void setParameterMap(Map parameterMap)

### getRequestScope

    public Map 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.

### setRequestScope

    public void setRequestScope(Map requestScope)

### getSessionScope

    public Map 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.

### setSessionScope

    public void setSessionScope(Map sessionScope)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.