Package com.cmobilecom.af.model.nav
Class BeanFlowHistory
- java.lang.Object
-
- com.cmobilecom.af.model.nav.BeanFlowHistory
-
- All Implemented Interfaces:
java.io.Serializable
public class BeanFlowHistory extends java.lang.Object implements java.io.Serializable
BeanFlowHistory: keep tracking the previous steps of EntityBackingBean flow navigations (BeanFlowNavigation based on FormDesign so that it can go back to previous steps.It is not required for bean flow form designs to define backward navigations, and the navigations will be tracked by system.
- Since:
- 5.4
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BeanFlowHistory()
Default constructor with empty historyBeanFlowHistory(java.lang.Class formDesignEntityType, java.util.List<java.lang.String> formDesignFormIds)
Constructor.BeanFlowHistory(java.util.List<FormDesign> formDesigns)
Constructor with the list of bean flow FormDesigns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<FormDesign>
getFormDesignList()
Get the list of form designs from the first step to the previous step.boolean
isEmpty()
Is this history empty without any previous steps?FormDesign
popFormDesign()
Pop the FormDesign of the previous step.void
pushFormDesign(FormDesign formDesign)
Add the current form design to the history before navigating to the next step.
-
-
-
Constructor Detail
-
BeanFlowHistory
public BeanFlowHistory()
Default constructor with empty history
-
BeanFlowHistory
public BeanFlowHistory(java.util.List<FormDesign> formDesigns)
Constructor with the list of bean flow FormDesigns. If an entity is started to be shown in a middle step of a bean flow, the bean flow can go back to previous steps with the help of the list of the form designs of previous steps.- Parameters:
formDesigns
- the list of form designs from the first step to the previous step.
-
BeanFlowHistory
public BeanFlowHistory(java.lang.Class formDesignEntityType, java.util.List<java.lang.String> formDesignFormIds)
Constructor. The history form design created will be partially initialized with only entityType and formId set. They will loaded from persistence on demand.- Parameters:
formDesignEntityType
- the entity type mapped to DataTypeAware.getEntityType()formDesignFormIds
- a list of formId(s) of FormDesigns.
-
-
Method Detail
-
popFormDesign
public FormDesign popFormDesign()
Pop the FormDesign of the previous step. It will be called for going back to the previous step.- Returns:
- FormDesign instance. return null if there is no previous steps
-
pushFormDesign
public void pushFormDesign(FormDesign formDesign)
Add the current form design to the history before navigating to the next step.- Parameters:
formDesign
- the current form design to add
-
getFormDesignList
public java.util.List<FormDesign> getFormDesignList()
Get the list of form designs from the first step to the previous step.- Returns:
- a list of FormDesign(s). return empty list if there is no previous steps.
-
isEmpty
public boolean isEmpty()
Is this history empty without any previous steps?- Returns:
- true if empty, false otherwise
-
-