com.ervacon.springframework.web.servlet.mvc.webflow
Class WebFlowMemento

java.lang.Object
  extended bycom.ervacon.springframework.web.servlet.mvc.webflow.WebFlowMemento
All Implemented Interfaces:
java.io.Serializable

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

Externalized state of a web flow. A web flow memento holds the state associated with a certain web flow on behalf of a particular client. This state consist of the flow name, the current state of the flow and the model data associated with the flow instance.

Objects of this class are serializable, so they can be safely stored in the HTTP session.

One way of looking at objects of this class is as activation frames: they hold state associated with a flow invokation.

There should be little need to work directly with this class from inside web application code.

Author:
Erwin Vervaet
See Also:
Serialized Form

Constructor Summary
WebFlowMemento(java.lang.String flowName)
          Create a new memento for named web flow.
 
Method Summary
 java.lang.String getCurrentState()
          Get the current state of the flow associated with this memento.
 WebFlow getFlow(org.springframework.context.ApplicationContext appCtx)
          Convenience method to get the flow object associated with this memento from given application context.
 java.lang.String getFlowName()
          Get the name of the flow associated with this memento.
 java.util.Map getModel()
          Get the flow model data maintained by this memento.
 void setCurrentState(java.lang.String state)
          Set the current state of the flow associated with this memento.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebFlowMemento

public WebFlowMemento(java.lang.String flowName)

Create a new memento for named web flow.

Method Detail

getFlowName

public java.lang.String getFlowName()

Get the name of the flow associated with this memento. This name can be used to obtain the flow object from an application context.


getFlow

public WebFlow getFlow(org.springframework.context.ApplicationContext appCtx)
                throws org.springframework.beans.BeansException

Convenience method to get the flow object associated with this memento from given application context.

Throws:
org.springframework.beans.BeansException

getCurrentState

public java.lang.String getCurrentState()

Get the current state of the flow associated with this memento.


setCurrentState

public void setCurrentState(java.lang.String state)

Set the current state of the flow associated with this memento.


getModel

public java.util.Map getModel()

Get the flow model data maintained by this memento.