|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.webflow.test.MockExternalContext
public class MockExternalContext
Mock implementation of the ExternalContext interface.
ExternalContext| Constructor Summary | |
|---|---|
MockExternalContext()
Creates a mock external context with an empty request parameter map. |
|
MockExternalContext(ParameterMap requestParameterMap)
Creates a mock external context with the specified parameters in the request parameter map. |
|
| 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. |
MockParameterMap |
getMockRequestParameterMap()
Returns the request parameter map as a MockParameterMap for convenient access in a unit test. |
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. |
void |
putRequestParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Puts a request parameter into the mock parameter map. |
void |
putRequestParameter(java.lang.String parameterName,
java.lang.String[] parameterValues)
Puts a multi-valued request parameter into the mock parameter map. |
void |
setApplicationMap(SharedAttributeMap applicationMap)
Set the application attribute map. |
void |
setContextPath(java.lang.String contextPath)
Set the context path. |
void |
setDispatcherPath(java.lang.String dispatcherPath)
Set the dispatcher path. |
void |
setGlobalSessionMap(SharedAttributeMap globalSessionMap)
Set the global session attribute map. |
void |
setRequestMap(MutableAttributeMap requestMap)
Set the request attribute map. |
void |
setRequestParameterMap(ParameterMap requestParameterMap)
Set the request parameter map. |
void |
setRequestPathInfo(java.lang.String requestPathInfo)
Set the request path info. |
void |
setSessionMap(SharedAttributeMap sessionMap)
Set the session attribute map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockExternalContext()
public MockExternalContext(ParameterMap requestParameterMap)
requestParameterMap - the request parameters| Method Detail |
|---|
public java.lang.String getContextPath()
ExternalContext
getContextPath in interface ExternalContextpublic java.lang.String getDispatcherPath()
ExternalContext
getDispatcherPath in interface ExternalContextpublic java.lang.String getRequestPathInfo()
ExternalContext
getRequestPathInfo in interface ExternalContextpublic ParameterMap getRequestParameterMap()
ExternalContext
getRequestParameterMap in interface ExternalContextpublic MutableAttributeMap getRequestMap()
ExternalContext
getRequestMap in interface ExternalContextpublic SharedAttributeMap getSessionMap()
ExternalContext
getSessionMap in interface ExternalContextpublic SharedAttributeMap getGlobalSessionMap()
ExternalContext
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().
getGlobalSessionMap in interface ExternalContextpublic SharedAttributeMap getApplicationMap()
ExternalContext
getApplicationMap in interface ExternalContextpublic void setContextPath(java.lang.String contextPath)
ExternalContext.getContextPath()public void setDispatcherPath(java.lang.String dispatcherPath)
ExternalContext.getDispatcherPath()public void setRequestPathInfo(java.lang.String requestPathInfo)
ExternalContext.getRequestPathInfo()public void setRequestParameterMap(ParameterMap requestParameterMap)
ExternalContext.getRequestParameterMap()public void setRequestMap(MutableAttributeMap requestMap)
ExternalContext.getRequestMap()public void setSessionMap(SharedAttributeMap sessionMap)
ExternalContext.getSessionMap()public void setGlobalSessionMap(SharedAttributeMap globalSessionMap)
ExternalContext.getGlobalSessionMap()public void setApplicationMap(SharedAttributeMap applicationMap)
ExternalContext.getApplicationMap()public MockParameterMap getMockRequestParameterMap()
MockParameterMap for convenient access in a unit test.
getRequestParameterMap()
public void putRequestParameter(java.lang.String parameterName,
java.lang.String parameterValue)
parameterName - the parameter nameparameterValue - the parameter value
public void putRequestParameter(java.lang.String parameterName,
java.lang.String[] parameterValues)
parameterName - the parameter nameparameterValues - the parameter values
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||