Class FlowContext
java.lang.Object
com.aquima.interactions.portal.model.tx.FlowContext
- All Implemented Interfaces:
IInstanceContext
,Serializable
This class holds the transactional data for a flow. The most important task of this class is to keep track of all the
instances that were activated during the flow.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlowContext
(IInstanceContext parent, String flowName) Constructs the flow context with the specified parent context and flow name. -
Method Summary
Modifier and TypeMethodDescriptiongetActiveInstance
(String entityName) This method returns the active instance for the specified entity type.getId()
This method returns a unique ID for the instance context.This method returns the instance stack containing the instances that were activated in the flow.This method returns the parent context of this context.This method will de-activate the last activated instance.void
pushActiveInstance
(IEntityInstance instance) This method will activate the specified instance within this context.toString()
protected void
updateInstances
(IProfile profile)
-
Constructor Details
-
FlowContext
Constructs the flow context with the specified parent context and flow name.- Parameters:
parent
- The parent contextflowName
- The name of the flow the context is created for.
-
-
Method Details
-
getParentContext
Description copied from interface:IInstanceContext
This method returns the parent context of this context. The parent context is available when nested contexts are used. For instance when the flow context will have a page context as parent.- Specified by:
getParentContext
in interfaceIInstanceContext
- Returns:
- the parent context of this context.
-
getInstanceStack
This method returns the instance stack containing the instances that were activated in the flow.- Returns:
- the instance stack containing the instances that were activated in the flow.
-
getId
Description copied from interface:IInstanceContext
This method returns a unique ID for the instance context. This ID can for instance the the name of the page of the flow the context belongs to.- Specified by:
getId
in interfaceIInstanceContext
- Returns:
- a unique ID for the instance context.
-
getActiveInstance
Description copied from interface:IInstanceContext
This method returns the active instance for the specified entity type.- Specified by:
getActiveInstance
in interfaceIInstanceContext
- Parameters:
entityName
- The entity type for which the active instance is requested.- Returns:
- The active instance for the specified entity type.
-
pushActiveInstance
Description copied from interface:IInstanceContext
This method will activate the specified instance within this context.- Specified by:
pushActiveInstance
in interfaceIInstanceContext
- Parameters:
instance
- The instance that should be made active.
-
popActiveInstance
Description copied from interface:IInstanceContext
This method will de-activate the last activated instance.- Specified by:
popActiveInstance
in interfaceIInstanceContext
- Returns:
- The instance that was de-actived.
-
toString
-
updateInstances
-