org.springframework.webflow.context.portlet
Class PortletExternalContext

java.lang.Object
  extended by org.springframework.webflow.context.portlet.PortletExternalContext
All Implemented Interfaces:
ExternalContext

public class PortletExternalContext
extends java.lang.Object
implements ExternalContext

Provides contextual information about a JSR-168 Portlet environment that has called into Spring Web Flow.

Author:
Keith Donald

Constructor Summary
PortletExternalContext(javax.portlet.PortletContext context, javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
          Create an external context wrapping given Portlet context, request and response.
 
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.
 javax.portlet.PortletContext getContext()
          Returns the wrapped Portlet context.
 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.
 javax.portlet.PortletRequest getRequest()
          Returns the wrapped Portlet request.
 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.
 javax.portlet.PortletResponse getResponse()
          Returns the wrapped Portlet response.
 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.
 MutableAttributeMap getUserInfoMap()
          Returns the PortletRequest.USER_INFO map as a mutable attribute map.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortletExternalContext

public PortletExternalContext(javax.portlet.PortletContext context,
                              javax.portlet.PortletRequest request,
                              javax.portlet.PortletResponse response)
Create an external context wrapping given Portlet context, request and response.

Parameters:
context - the Portlet context
request - the Portlet request
response - the Portlet response
Method Detail

getContextPath

public java.lang.String getContextPath()
Description copied from interface: ExternalContext
Returns the path (or identifier) of the application that is executing.

Specified by:
getContextPath in interface ExternalContext
Returns:
the application context path (e.g. "/myapp")

getDispatcherPath

public java.lang.String getDispatcherPath()
Description copied from interface: ExternalContext
Returns the path (or identifier) of the dispatcher within the application that dispatched this request.

Specified by:
getDispatcherPath in interface ExternalContext
Returns:
the dispatcher path (e.g. "/dispatcher")

getRequestPathInfo

public java.lang.String getRequestPathInfo()
Description copied from interface: ExternalContext
Returns the path info of this external request. Could be null.

Specified by:
getRequestPathInfo in interface ExternalContext
Returns:
the request path info (e.g. "/flows.htm")

getRequestParameterMap

public ParameterMap getRequestParameterMap()
Description copied from interface: ExternalContext
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.

Specified by:
getRequestParameterMap in interface ExternalContext
Returns:
the immutable request parameter map

getRequestMap

public MutableAttributeMap getRequestMap()
Description copied from interface: ExternalContext
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.

Specified by:
getRequestMap in interface ExternalContext
Returns:
the mutable request attribute map

getSessionMap

public SharedAttributeMap getSessionMap()
Description copied from interface: ExternalContext
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.

Specified by:
getSessionMap in interface ExternalContext
Returns:
the mutable session attribute map

getGlobalSessionMap

public SharedAttributeMap getGlobalSessionMap()
Description copied from interface: ExternalContext
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 ExternalContext.getSessionMap().

Specified by:
getGlobalSessionMap in interface ExternalContext
Returns:
the mutable global session attribute map

getApplicationMap

public SharedAttributeMap getApplicationMap()
Description copied from interface: ExternalContext
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.

Specified by:
getApplicationMap in interface ExternalContext
Returns:
the mutable application attribute map

getUserInfoMap

public MutableAttributeMap getUserInfoMap()
Returns the PortletRequest.USER_INFO map as a mutable attribute map.

Returns:
the Portlet user info

getContext

public javax.portlet.PortletContext getContext()
Returns the wrapped Portlet context.


getRequest

public javax.portlet.PortletRequest getRequest()
Returns the wrapped Portlet request.


getResponse

public javax.portlet.PortletResponse getResponse()
Returns the wrapped Portlet response.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2007. All Rights Reserved.