org.springframework.webflow.engine.support
Class ExternalRedirectSelector

java.lang.Object
  extended by org.springframework.webflow.engine.support.ExternalRedirectSelector
All Implemented Interfaces:
java.io.Serializable, ViewSelector

public class ExternalRedirectSelector
extends java.lang.Object
implements ViewSelector, java.io.Serializable

Makes view selections requesting a client side redirect to an external URL outside of the flow.

This selector is usefull when you wish to request a redirect after conversation completion as part of entering an EndState.

This selector may also be used to redirect to an external URL from a ViewState of an active conversation. The external system redirected to will be provided the flow execution context necessary to allow it to communicate back to the executing flow at a later time.

Author:
Keith Donald, Erwin Vervaet
See Also:
ExternalRedirect, Serialized Form

Constructor Summary
ExternalRedirectSelector(org.springframework.binding.expression.Expression urlExpression)
          Create a new redirecting view selector that takes given URL expression as input.
 
Method Summary
 org.springframework.binding.expression.Expression getUrlExpression()
          Returns the expression used by this view selector.
 boolean isEntrySelectionRenderable(RequestContext context)
          Will the primary selection returned by 'makeEntrySelection' for the given request context be renderable in this request?
 ViewSelection makeEntrySelection(RequestContext context)
          Make a new "entry" view selection for the given request context.
 ViewSelection makeRefreshSelection(RequestContext context)
          Reconstitute a renderable view selection for the given request context to support a ViewState 'refresh' operation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExternalRedirectSelector

public ExternalRedirectSelector(org.springframework.binding.expression.Expression urlExpression)
Create a new redirecting view selector that takes given URL expression as input. The expression is the parsed form (expression-tokenized) of the encoded view (e.g. "/pathInfo?param0=value0¶m1=value1").

Parameters:
urlExpression - the url expression
Method Detail

getUrlExpression

public org.springframework.binding.expression.Expression getUrlExpression()
Returns the expression used by this view selector.


isEntrySelectionRenderable

public boolean isEntrySelectionRenderable(RequestContext context)
Description copied from interface: ViewSelector
Will the primary selection returned by 'makeEntrySelection' for the given request context be renderable in this request?

"Renderable" view selections typically can have 'render-actions' execute before they are created. An example would be an ApplicationView that forwards to a view template like a JSP. "Non-renderable" view selections are things like a flow execution redirect--no render actually occurs, but only a redirect--rendering happens on the new redirect request.

Specified by:
isEntrySelectionRenderable in interface ViewSelector
Parameters:
context - the current request context of the executing flow
Returns:
true if yes, false otherwise

makeEntrySelection

public ViewSelection makeEntrySelection(RequestContext context)
Description copied from interface: ViewSelector
Make a new "entry" view selection for the given request context. Called when a view-state, end-state, or other interactive state type is entered.

Specified by:
makeEntrySelection in interface ViewSelector
Parameters:
context - the current request context of the executing flow
Returns:
the entry view selection

makeRefreshSelection

public ViewSelection makeRefreshSelection(RequestContext context)
Description copied from interface: ViewSelector
Reconstitute a renderable view selection for the given request context to support a ViewState 'refresh' operation.

Specified by:
makeRefreshSelection in interface ViewSelector
Parameters:
context - the current request context of the executing flow
Returns:
the view selection

toString

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


Copyright © 2009 Spring Framework. All Rights Reserved.