Class FlowContext

java.lang.Object
com.aquima.interactions.portal.model.tx.FlowContext
All Implemented Interfaces:
IInstanceContext, Serializable

public class FlowContext extends Object implements IInstanceContext
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 Details

    • FlowContext

      public FlowContext(IInstanceContext parent, String flowName)
      Constructs the flow context with the specified parent context and flow name.
      Parameters:
      parent - The parent context
      flowName - The name of the flow the context is created for.
  • Method Details

    • getParentContext

      public IInstanceContext 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 interface IInstanceContext
      Returns:
      the parent context of this context.
    • getInstanceStack

      public InstanceStack 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

      public String 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 interface IInstanceContext
      Returns:
      a unique ID for the instance context.
    • getActiveInstance

      public IEntityInstance getActiveInstance(String entityName)
      Description copied from interface: IInstanceContext
      This method returns the active instance for the specified entity type.
      Specified by:
      getActiveInstance in interface IInstanceContext
      Parameters:
      entityName - The entity type for which the active instance is requested.
      Returns:
      The active instance for the specified entity type.
    • pushActiveInstance

      public void pushActiveInstance(IEntityInstance instance)
      Description copied from interface: IInstanceContext
      This method will activate the specified instance within this context.
      Specified by:
      pushActiveInstance in interface IInstanceContext
      Parameters:
      instance - The instance that should be made active.
    • popActiveInstance

      public IEntityInstance popActiveInstance()
      Description copied from interface: IInstanceContext
      This method will de-activate the last activated instance.
      Specified by:
      popActiveInstance in interface IInstanceContext
      Returns:
      The instance that was de-actived.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateInstances

      protected void updateInstances(IProfile profile)