info.magnolia.module.form.engine
Class FormState

java.lang.Object
  extended by info.magnolia.module.form.engine.FormState
All Implemented Interfaces:
Serializable

public class FormState
extends Object
implements Serializable

State of an ongoing form execution. Stored in session. Maintains state of all submitted steps.

See Also:
Serialized Form

Constructor Summary
FormState()
           
 
Method Summary
 void addStep(FormStepState stepState)
           
 int getCurrentlyExecutingStep()
           
 FormStepState getStep(String uuid)
           
 Map<String,FormStepState> getSteps()
           
 String getToken()
           
 Map<String,Object> getValues()
           
 View getView()
           
 boolean isEnded()
           
 void setCurrentlyExecutingStep(int newStep)
           
 void setEnded(boolean ended)
           
 void setToken(String token)
           
 void setView(View view)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormState

public FormState()
Method Detail

isEnded

public boolean isEnded()

setEnded

public void setEnded(boolean ended)

getSteps

public Map<String,FormStepState> getSteps()

addStep

public void addStep(FormStepState stepState)

getStep

public FormStepState getStep(String uuid)

setToken

public void setToken(String token)

getToken

public String getToken()

getValues

public Map<String,Object> getValues()

getView

public View getView()

setView

public void setView(View view)

getCurrentlyExecutingStep

public int getCurrentlyExecutingStep()
Returns:
the currently executing step in this form. First step is 0. Please notice that it is the responsibility of the FormEngine implementations to correctly set this count, according to the actions performed on the UI (i.e. hitting the back button should decrease this count by one, unless we're on the first step) and the successful validation of data entered in the form should increase this count by one (unless we're on the last step).

setCurrentlyExecutingStep

public void setCurrentlyExecutingStep(int newStep)


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.