|
Spring Web Flow | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.webflow.context.portlet.PortletExternalContext
public class PortletExternalContext
Provides contextual information about an portlet environment that has interacted with Spring Web Flow.
| Field Summary | |
|---|---|
protected static short |
ACTION_PHASE
|
protected static short |
RENDER_PHASE
|
protected static short |
RESOURCE_PHASE
|
| Constructor Summary | |
|---|---|
PortletExternalContext(javax.portlet.PortletContext context,
javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Create a new external context wrapping given portlet action request and response and given portlet context. |
|
PortletExternalContext(javax.portlet.PortletContext context,
javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
FlowUrlHandler flowUrlHandler)
Create a new external context wrapping given portlet action request and response and given portlet context. |
|
| Method Summary | |
|---|---|
SharedAttributeMap<java.lang.Object> |
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 logical path to the application hosting this external context. |
java.security.Principal |
getCurrentUser()
Provides access to the user's principal security object. |
boolean |
getExternalRedirectRequested()
Returns the flag indicating if an external redirect response has been requested by the flow. |
java.lang.String |
getExternalRedirectUrl()
Returns the URL to redirect to. |
boolean |
getFlowDefinitionRedirectRequested()
Returns the flag indicating if a flow definition redirect response has been requested by the flow. |
boolean |
getFlowExecutionRedirectRequested()
Returns the flag indicating if a flow execution redirect response has been requested by the flow. |
java.lang.String |
getFlowExecutionUrl(java.lang.String flowId,
java.lang.String flowExecutionKey)
Get a flow execution URL for the execution with the provided key. |
java.lang.String |
getFlowRedirectFlowId()
Returns the id of the flow definition to redirect to. |
MutableAttributeMap<java.lang.Object> |
getFlowRedirectFlowInput()
Returns the input to pass the flow definition through the redirect. |
SharedAttributeMap<java.lang.Object> |
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. |
java.util.Locale |
getLocale()
Returns the client locale. |
java.lang.Object |
getNativeContext()
Provides access to the context object for the current environment. |
java.lang.Object |
getNativeRequest()
Provides access to the request object for the current environment. |
java.lang.Object |
getNativeResponse()
Provides access to the response object for the current environment. |
boolean |
getRedirectInPopup()
If a redirect response has been requested, indicates if the redirect should be issued from a popup dialog. |
MutableAttributeMap<java.lang.Object> |
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.io.Writer |
getResponseWriter()
Get a writer for writing out a response. |
SharedAttributeMap<java.lang.Object> |
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. |
boolean |
isActionPhase()
Returns true if the current request phase is the action phase |
boolean |
isAjaxRequest()
Returns true if the current request is an asynchronous Ajax request. |
boolean |
isRenderPhase()
Returns true if the current request phase is the render phase |
boolean |
isResourcePhase()
Returns true if the current request phase is the resource phase |
boolean |
isResponseAllowed()
Is a render response allowed to be written for this request? Always return false after a response has been completed. |
boolean |
isResponseComplete()
Has the response been completed? Response complete status can be achieved by: Writing out the response and calling ExternalContext.recordResponseComplete(), or
Calling one of the redirect request methods
|
boolean |
isResponseCompleteFlowExecutionRedirect()
Returns true if the response has been completed with flow execution redirect request. |
void |
recordResponseComplete()
Called by flow artifacts such as View states and end states to indicate they handled the response, typically by writing out content to the response stream. |
void |
requestExternalRedirect(java.lang.String uri)
Request a redirect to an arbitrary resource location. |
void |
requestFlowDefinitionRedirect(java.lang.String flowId,
MutableAttributeMap<?> input)
Request that a flow definition redirect be performed by the calling environment. |
void |
requestFlowExecutionRedirect()
Request that a flow execution redirect be performed by the calling environment. |
void |
requestRedirectInPopup()
Request that the current redirect requested be sent to the client in a manner that causes the client to issue the redirect from a popup dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final short ACTION_PHASE
protected static final short RENDER_PHASE
protected static final short RESOURCE_PHASE
| Constructor Detail |
|---|
public PortletExternalContext(javax.portlet.PortletContext context,
javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
context - the portal contextrequest - the portlet requestresponse - the portlet response
public PortletExternalContext(javax.portlet.PortletContext context,
javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
FlowUrlHandler flowUrlHandler)
context - the portal contextrequest - the portlet requestresponse - the portlet responseflowUrlHandler - the flow url handler| Method Detail |
|---|
public java.lang.String getContextPath()
ExternalContext
getContextPath in interface ExternalContextpublic ParameterMap getRequestParameterMap()
ExternalContext
getRequestParameterMap in interface ExternalContextpublic MutableAttributeMap<java.lang.Object> getRequestMap()
ExternalContext
getRequestMap in interface ExternalContextpublic SharedAttributeMap<java.lang.Object> getSessionMap()
ExternalContext
getSessionMap in interface ExternalContextpublic SharedAttributeMap<java.lang.Object> 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<java.lang.Object> getApplicationMap()
ExternalContext
getApplicationMap in interface ExternalContextpublic java.security.Principal getCurrentUser()
ExternalContext
getCurrentUser in interface ExternalContextpublic java.util.Locale getLocale()
ExternalContext
getLocale in interface ExternalContextpublic java.lang.Object getNativeContext()
ExternalContext
getNativeContext in interface ExternalContextpublic java.lang.Object getNativeRequest()
ExternalContext
getNativeRequest in interface ExternalContextpublic java.lang.Object getNativeResponse()
ExternalContext
getNativeResponse in interface ExternalContextpublic boolean isAjaxRequest()
ExternalContext
isAjaxRequest in interface ExternalContext
public java.lang.String getFlowExecutionUrl(java.lang.String flowId,
java.lang.String flowExecutionKey)
ExternalContext
getFlowExecutionUrl in interface ExternalContextflowId - the flow definition idflowExecutionKey - the flow execution key
public java.io.Writer getResponseWriter()
throws java.lang.IllegalStateException
ExternalContext
getResponseWriter in interface ExternalContextjava.lang.IllegalStateException - if the response has completed or is not allowedpublic boolean isResponseAllowed()
ExternalContext
isResponseAllowed in interface ExternalContextpublic boolean isResponseComplete()
ExternalContextExternalContext.recordResponseComplete(), or
isResponseComplete in interface ExternalContextExternalContext.getResponseWriter(),
ExternalContext.recordResponseComplete(),
ExternalContext.requestFlowExecutionRedirect(),
ExternalContext.requestFlowDefinitionRedirect(String, MutableAttributeMap),
ExternalContext.requestExternalRedirect(String)public void recordResponseComplete()
ExternalContext
recordResponseComplete in interface ExternalContextpublic boolean isResponseCompleteFlowExecutionRedirect()
ExternalContext
isResponseCompleteFlowExecutionRedirect in interface ExternalContextExternalContext.isResponseComplete(),
ExternalContext.requestFlowExecutionRedirect()
public void requestFlowExecutionRedirect()
throws java.lang.IllegalStateException
ExternalContext
requestFlowExecutionRedirect in interface ExternalContextjava.lang.IllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestFlowDefinitionRedirect(java.lang.String flowId,
MutableAttributeMap<?> input)
throws java.lang.IllegalStateException
ExternalContext
requestFlowDefinitionRedirect in interface ExternalContextflowId - the id of the flow definition to redirect toinput - input to pass the flow; this input is generally encoded the url to launch the flow
java.lang.IllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestExternalRedirect(java.lang.String uri)
throws java.lang.IllegalStateException
ExternalContext
requestExternalRedirect in interface ExternalContexturi - the location of the resource to redirect to
java.lang.IllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestRedirectInPopup()
throws java.lang.IllegalStateException
ExternalContext
requestRedirectInPopup in interface ExternalContextjava.lang.IllegalStateException - if a redirect has not been requestedExternalContext.requestFlowExecutionRedirect(),
ExternalContext.requestFlowDefinitionRedirect(String, MutableAttributeMap),
ExternalContext.requestExternalRedirect(String)public boolean getFlowExecutionRedirectRequested()
public boolean getFlowDefinitionRedirectRequested()
public java.lang.String getFlowRedirectFlowId()
getFlowDefinitionRedirectRequested()
returns true.
public MutableAttributeMap<java.lang.Object> getFlowRedirectFlowInput()
getFlowDefinitionRedirectRequested() returns true.
public boolean getExternalRedirectRequested()
public java.lang.String getExternalRedirectUrl()
getExternalRedirectRequested() returns true.
public boolean getRedirectInPopup()
public boolean isActionPhase()
public boolean isRenderPhase()
public boolean isResourcePhase()
|
Spring Web Flow | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||