java.lang.Object
com.aquima.interactions.portal.model.session.scope.PortalScope
All Implemented Interfaces:
IPortalScope, Serializable
Direct Known Subclasses:
PortalMessageScope, RequestScope

public abstract class PortalScope extends Object implements IPortalScope
This class provides an implementation for the basic functions of a portal scope.
Since:
5.0
Author:
o.kerpershoek
See Also:
  • Constructor Details

    • PortalScope

      protected PortalScope()
    • PortalScope

      protected PortalScope(PortalScope parent)
  • Method Details

    • getParentScope

      protected PortalScope getParentScope()
    • mergeWithParent

      public PortalScope mergeWithParent()
      This method merges this scope with the parent scope, and returns the merged scope.
      Returns:
      The merged scope containing the values from this scope and it's parent.
    • discardParent

      public PortalScope discardParent(IDisposeContext context)
      This method discards all the values from the parent scope by detaching the parent.
      Returns:
      Reference to the resulting scope without the parent values.
    • 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.
    • 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.
    • 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.
    • 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.
    • isCleared

      protected boolean isCleared(String key)
    • setAttribute

      public Serializable setAttribute(String key, Serializable objValue)
      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).
      objValue - The value that should be set for the specified key (mandatory).
      Returns:
      The value that was replaced (previously present) by the set action.
    • destroyDisposableObjects

      public void destroyDisposableObjects(IDisposeContext context)