org.springframework.webflow.context
Interface ExternalContext

All Known Implementing Classes:
JsfExternalContext, MockExternalContext, PortletExternalContext, ServletExternalContext, StrutsExternalContext

public interface ExternalContext

A facade that provides normalized access to an external system that has interacted with Spring Web Flow.

This context object provides a normalized interface for internal web flow artifacts to use to reason on and manipulate the state of an external actor calling into SWF to execute flows. It represents the context about a single, external client request to manipulate a flow execution.

The design of this interface was inspired by JSF's own ExternalContext abstraction and shares the same name for consistency. If a particular external client type does not support all methods defined by this interface, they can just be implemented as returning an empty map or null.

Author:
Keith Donald, Erwin Vervaet

Method Summary
 SharedAttributeMap getApplicationMap()
          Provides access to the external application map, providing a storage for data local to the current user application and accessible to both internal and external SWF artifacts.
 java.lang.String getContextPath()
          Returns the path (or identifier) of the application that is executing.
 java.lang.String getDispatcherPath()
          Returns the path (or identifier) of the dispatcher within the application that dispatched this request.
 SharedAttributeMap getGlobalSessionMap()
          Provides access to the global external session map, providing a storage for data globally accross the user session and accessible to both internal and external SWF artifacts.
 MutableAttributeMap getRequestMap()
          Provides access to the external request attribute map, providing a storage for data local to the current user request and accessible to both internal and external SWF artifacts.
 ParameterMap getRequestParameterMap()
          Provides access to the parameters associated with the user request that led to SWF being called.
 java.lang.String getRequestPathInfo()
          Returns the path info of this external request.
 SharedAttributeMap getSessionMap()
          Provides access to the external session map, providing a storage for data local to the current user session and accessible to both internal and external SWF artifacts.
 

Method Detail

getContextPath

java.lang.String getContextPath()
Returns the path (or identifier) of the application that is executing.

Returns:
the application context path (e.g. "/myapp")

getDispatcherPath

java.lang.String getDispatcherPath()
Returns the path (or identifier) of the dispatcher within the application that dispatched this request.

Returns:
the dispatcher path (e.g. "/dispatcher")

getRequestPathInfo

java.lang.String getRequestPathInfo()
Returns the path info of this external request. Could be null.

Returns:
the request path info (e.g. "/flows.htm")

getRequestParameterMap

ParameterMap getRequestParameterMap()
Provides access to the parameters associated with the user request that led to SWF being called. This map is expected to be immutable and cannot be changed.

Returns:
the immutable request parameter map

getRequestMap

MutableAttributeMap getRequestMap()
Provides access to the external request attribute map, providing a storage for data local to the current user request and accessible to both internal and external SWF artifacts.

Returns:
the mutable request attribute map

getSessionMap

SharedAttributeMap getSessionMap()
Provides access to the external session map, providing a storage for data local to the current user session and accessible to both internal and external SWF artifacts.

Returns:
the mutable session attribute map

getGlobalSessionMap

SharedAttributeMap getGlobalSessionMap()
Provides access to the global external session map, providing a storage for data globally accross the user session and accessible to both internal and external SWF artifacts.

Note: most external context implementations do not distinguish between the concept of a "local" user session scope and a "global" session scope. The Portlet world does, but not the Servlet for example. In those cases calling this method returns the same map as calling getSessionMap().

Returns:
the mutable global session attribute map

getApplicationMap

SharedAttributeMap getApplicationMap()
Provides access to the external application map, providing a storage for data local to the current user application and accessible to both internal and external SWF artifacts.

Returns:
the mutable application attribute map


Copyright © 2004-2007. All Rights Reserved.