org.springframework.webflow.executor
Class ResponseInstruction

java.lang.Object
  extended by org.springframework.webflow.executor.ResponseInstruction
All Implemented Interfaces:
java.io.Serializable

public class ResponseInstruction
extends java.lang.Object
implements java.io.Serializable

Immutable value object that provides clients with information about a response to issue.

There are five different types of response instruction:

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

Constructor Summary
ResponseInstruction(FlowExecutionContext flowExecutionContext, ViewSelection viewSelection)
          Create a new response instruction for an ended flow execution.
ResponseInstruction(java.lang.String flowExecutionKey, FlowExecutionContext flowExecutionContext, ViewSelection viewSelection)
          Create a new response instruction for a paused flow execution.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 FlowExecutionContext getFlowExecutionContext()
          Returns the flow execution context representing the current state of the execution.
 java.lang.String getFlowExecutionKey()
          Returns the persistent identifier of the flow execution.
 ViewSelection getViewSelection()
          Returns the view selection selected by the flow execution.
 int hashCode()
           
 boolean isActiveView()
          Returns true if this is an instruction to render an application view for an "active" (in progress) flow execution.
 boolean isApplicationView()
          Returns true if this is an "application view" (forward) response instruction.
 boolean isEndingView()
          Returns true if this is an instruction to render an application view for an "ended" (inactive) flow execution from an end state.
 boolean isExternalRedirect()
          Returns true if this an instruction to perform a redirect to an external URL.
 boolean isFlowDefinitionRedirect()
          Returns true if this is an instruction to launch an entirely new (independent) flow execution.
 boolean isFlowExecutionRedirect()
          Returns true if this is an instruction to perform a redirect to the current flow execution to render an application view.
 boolean isNull()
          Returns true if this is a "null" response instruction, e.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResponseInstruction

public ResponseInstruction(java.lang.String flowExecutionKey,
                           FlowExecutionContext flowExecutionContext,
                           ViewSelection viewSelection)
Create a new response instruction for a paused flow execution.

Parameters:
flowExecutionKey - the persistent identifier of the flow execution
flowExecutionContext - the current flow execution context
viewSelection - the selected view

ResponseInstruction

public ResponseInstruction(FlowExecutionContext flowExecutionContext,
                           ViewSelection viewSelection)
Create a new response instruction for an ended flow execution. No flow execution key needs to be provided since the flow execution no longer exists and cannot be referenced any longer.

Parameters:
flowExecutionContext - the current flow execution context (inactive)
viewSelection - the selected view
Method Detail

getFlowExecutionKey

public java.lang.String getFlowExecutionKey()
Returns the persistent identifier of the flow execution.


getFlowExecutionContext

public FlowExecutionContext getFlowExecutionContext()
Returns the flow execution context representing the current state of the execution. It could be that the returned flow execution is inactive.


getViewSelection

public ViewSelection getViewSelection()
Returns the view selection selected by the flow execution.


isActiveView

public boolean isActiveView()
Returns true if this is an instruction to render an application view for an "active" (in progress) flow execution.


isEndingView

public boolean isEndingView()
Returns true if this is an instruction to render an application view for an "ended" (inactive) flow execution from an end state.


isApplicationView

public boolean isApplicationView()
Returns true if this is an "application view" (forward) response instruction.


isFlowExecutionRedirect

public boolean isFlowExecutionRedirect()
Returns true if this is an instruction to perform a redirect to the current flow execution to render an application view.


isFlowDefinitionRedirect

public boolean isFlowDefinitionRedirect()
Returns true if this is an instruction to launch an entirely new (independent) flow execution.


isExternalRedirect

public boolean isExternalRedirect()
Returns true if this an instruction to perform a redirect to an external URL.


isNull

public boolean isNull()
Returns true if this is a "null" response instruction, e.g. no response needs to be rendered.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


Copyright © 2004-2007. All Rights Reserved.