Class RequestScopeDelegate

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

public abstract class RequestScopeDelegate extends Object implements IRequestScope
Utility class to allow for easy wrapping of a request scope implementation.
Since:
6.4.1
Author:
Jon van Leuven
See Also:
  • Constructor Details

    • RequestScopeDelegate

      protected RequestScopeDelegate(IRequestScope parent)
      Constructs the request scope with the object that needs to be wrapped.
      Parameters:
      parent - The request scope that needs to be wrapped by this delegate.
  • Method Details

    • 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.
    • 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.
    • getChangedValues

      public ValueReference[] getChangedValues()
      Description copied from interface: IRequestScope
      This method will return an array containing the references to all the values that were changed by fields from the current request. The array will contain the references to values from the current request.
      Specified by:
      getChangedValues in interface IRequestScope
      Returns:
      an array containing the references to all the values that were changed by fields from the current request.
    • getLanguage

      public ILanguage getLanguage()
      Description copied from interface: IRequestScope
      Retrieves the language in which the last page was submitted. Most language specific handling are part of the page-rendering mechanism, however this function is available to use the last submitted language to backend systems.
      Specified by:
      getLanguage in interface IRequestScope
      Returns:
      The current language object which is never null
    • getOriginalValue

      public IValue getOriginalValue(ValueReference reference)
      Description copied from interface: IRequestScope
      This method returns the value of the attribute as it was before the value got changed by the request. If the value did not get changed by in the request, the method will return a null value.
      Specified by:
      getOriginalValue in interface IRequestScope
      Parameters:
      reference - The reference to the attribute whose value is requested before it was modified in the request.
      Returns:
      The value of the attribute as it was before the value got changed by in the request.
    • 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.
    • isChangedValue

      public boolean isChangedValue(ValueReference reference)
      Description copied from interface: IRequestScope
      This method may be used to check if a specific value has been updated by an event in the current request.
      Specified by:
      isChangedValue in interface IRequestScope
      Parameters:
      reference - Reference to the value that might have been updated.
      Returns:
      Boolean indicating if the value was updated by an event in the current request.
    • 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.