|
|||||||||
| 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.
| 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 |
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. |
String |
getContextPath()
Returns the logical path to the application hosting this external context. |
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. |
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. |
String |
getFlowExecutionUrl(String flowId,
String flowExecutionKey)
Get a flow execution URL for the execution with the provided key. |
String |
getFlowRedirectFlowId()
Returns the id of the flow definition to redirect to. |
MutableAttributeMap |
getFlowRedirectFlowInput()
Returns the input to pass the flow definition through the redirect. |
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. |
Locale |
getLocale()
Returns the client locale. |
Object |
getNativeContext()
Provides access to the context object for the current environment. |
Object |
getNativeRequest()
Provides access to the request object for the current environment. |
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 |
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. |
Writer |
getResponseWriter()
Get a writer for writing out a 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. |
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 |
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(String uri)
Request a redirect to an arbitrary resource location. |
void |
requestFlowDefinitionRedirect(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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 String getContextPath()
ExternalContext
getContextPath 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 Principal getCurrentUser()
ExternalContext
getCurrentUser in interface ExternalContextpublic Locale getLocale()
ExternalContext
getLocale in interface ExternalContextpublic Object getNativeContext()
ExternalContext
getNativeContext in interface ExternalContextpublic Object getNativeRequest()
ExternalContext
getNativeRequest in interface ExternalContextpublic Object getNativeResponse()
ExternalContext
getNativeResponse in interface ExternalContextpublic boolean isAjaxRequest()
ExternalContext
isAjaxRequest in interface ExternalContext
public String getFlowExecutionUrl(String flowId,
String flowExecutionKey)
ExternalContext
getFlowExecutionUrl in interface ExternalContextflowId - the flow definition idflowExecutionKey - the flow execution key
public Writer getResponseWriter()
throws IllegalStateException
ExternalContext
getResponseWriter in interface ExternalContextIllegalStateException - 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 IllegalStateException
ExternalContext
requestFlowExecutionRedirect in interface ExternalContextIllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestFlowDefinitionRedirect(String flowId,
MutableAttributeMap input)
throws 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
IllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestExternalRedirect(String uri)
throws IllegalStateException
ExternalContext
requestExternalRedirect in interface ExternalContexturi - the location of the resource to redirect to
IllegalStateException - if the response has completedExternalContext.isResponseComplete()
public void requestRedirectInPopup()
throws IllegalStateException
ExternalContext
requestRedirectInPopup in interface ExternalContextIllegalStateException - if a redirect has not been requestedExternalContext.requestFlowExecutionRedirect(),
ExternalContext.requestFlowDefinitionRedirect(String, MutableAttributeMap),
ExternalContext.requestExternalRedirect(String)public boolean getFlowExecutionRedirectRequested()
public boolean getFlowDefinitionRedirectRequested()
public String getFlowRedirectFlowId()
getFlowDefinitionRedirectRequested()
returns true.
public MutableAttributeMap getFlowRedirectFlowInput()
getFlowDefinitionRedirectRequested() returns true.
public boolean getExternalRedirectRequested()
public String getExternalRedirectUrl()
getExternalRedirectRequested() returns true.
public boolean getRedirectInPopup()
public boolean isActionPhase()
public boolean isRenderPhase()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||