java.lang.Object
com.aquima.interactions.portal.model.session.scope.FlowScope
All Implemented Interfaces:
IDisposableScope, IFlowScope, IPortalScope, Serializable

public class FlowScope extends Object implements IFlowScope
This class implements the IFlowScope interface and is used to store flow specific objects.
Since:
9.0
Author:
Jon van Leuven
See Also:
  • Constructor Details

    • FlowScope

      public FlowScope(String flowName)
      Create a flow scope with no parent and no values.
      Parameters:
      flowName - The name of the flow this scope belongs to, may not be null or empty
    • FlowScope

      public FlowScope(String flowName, CaseInsensitiveMap<Serializable> values)
    • FlowScope

      public FlowScope(FlowScope other, boolean includeParent)
      Copy constructor (shallow copy).
      Parameters:
      other - The other Scope
      includeParent - Include the parent scope if available
  • Method Details

    • getValueMap

      public CaseInsensitiveMap<Serializable> getValueMap()
    • getFlowName

      public String getFlowName()
      Description copied from interface: IFlowScope
      This method returns the name of the flow this scope belongs to.
      Specified by:
      getFlowName in interface IFlowScope
      Returns:
      The flow name, never null or empty.
    • getAttributeNames

      public String[] getAttributeNames()
      Description copied from interface: IPortalScope
      This method returns an array containing all the names of the attribute that have a value in this scope.
      Specified by:
      getAttributeNames in interface IPortalScope
      Returns:
      array containing all the names of the attribute that have a value in this scope.
    • hasAttribute

      public boolean hasAttribute(String key)
      Description copied from interface: IPortalScope
      This method will check if an attribute with the specified key has been added to this scope. The key name of the attribute is not case sensitive.
      Specified by:
      hasAttribute in interface IPortalScope
      Parameters:
      key - Name of the attribute that should be checked (mandatory).
      Returns:
      boolean indicating if a value is present for the specified attribute key.
    • getAttribute

      public Serializable getAttribute(String key)
      Description copied from interface: IPortalScope
      This method will return the value that has been added to this scope for the specified attribute key. When there is no value present for the specified key, a null value will be returned.
      Specified by:
      getAttribute in interface IPortalScope
      Parameters:
      key - Name of the attribute for which the value is requested (mandatory).
      Returns:
      The value for the specified key, or null when there is no value present.
    • clearAttribute

      public Serializable clearAttribute(String key)
      Description copied from interface: IPortalScope
      This method will remove the value from the scope for the specified key, and returns the value that has been removed. When there is no value present for the specified key, the method invocation has no effect, and a null value will be returned.
      Specified by:
      clearAttribute in interface IPortalScope
      Parameters:
      key - Name of the attribute of which the value should be removed (mandatory).
      Returns:
      The value that was removed from the scope, or null when there was no value defined for the specified key.
    • setAttribute

      public Serializable setAttribute(String key, Serializable attrValue)
      Description copied from interface: IPortalScope
      This method will set the value in the scope under the specified key, and will return the value that might have been replaced by this action. When there was no value present for the specified key, a null value will be returned.
      Specified by:
      setAttribute in interface IPortalScope
      Parameters:
      key - Name of the attribute for which the value should be set (mandatory).
      attrValue - The value that should be set for the specified key (mandatory).
      Returns:
      The value that was replaced (previously present) by the set action.
    • getParentScope

      public FlowScope getParentScope()
      Internal method to get the parent flow scope.

      This method is for internal use only and should never be exposed via the interface.

      Returns:
      The parent scope, may be null.
    • setParent

      public FlowScope setParent(FlowScope parent)
      Internal method to set the parent flow scope.

      This method is for internal use only and should never be exposed via the interface.

      Parameters:
      parent - The parent scope, may be null.
    • destroyDisposableObjects

      public void destroyDisposableObjects(IDisposeContext context)
      Description copied from interface: IDisposableScope
      This method is called when the scope is discarded.
      Specified by:
      destroyDisposableObjects in interface IDisposableScope
    • getType

      public PortalScopeType getType()
      Description copied from interface: IPortalScope
      This method will return the scope type of the portal scope implementation.
      Specified by:
      getType in interface IPortalScope
      Returns:
      The current scope type.