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

public class RequestScope extends PortalScope implements IRequestScope
This class implements the IRequestScope interface and is used to store request specific attributes.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • RequestScope

      public RequestScope(ILanguage language, Map<String,? extends Object> requestParameters)
      Constructs a new request scope.
      Parameters:
      language - The current language.
      requestParameters - The parameters that should be available on the request scope.
  • Method Details

    • 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
    • addChangedField

      public void addChangedField(ValueReference reference, IValue previousValue)
    • 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.
    • 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.
    • 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.
    • addProjectChange

      public void addProjectChange(IProjectChange projectChange)
      Description copied from interface: IRequestScope
      This method will attach a new project change object to the queue of project changes objects of the current request scope.
      Specified by:
      addProjectChange in interface IRequestScope
      Parameters:
      projectChange - The specific project change object.
    • hasNextProjectChange

      public boolean hasNextProjectChange()
      Description copied from interface: IRequestScope
      This method checks if the current request scope already has a next project change information attached to the queue of project changes.
      Specified by:
      hasNextProjectChange in interface IRequestScope
      Returns:
      A flag indicating if the current request scope object has a next project change object.
    • getNextProjectChange

      public IProjectChange getNextProjectChange()
      Description copied from interface: IRequestScope
      This method will return the next project change object attached to the queue of project changes of the request scope.
      Specified by:
      getNextProjectChange in interface IRequestScope
      Returns:
      The next project change object from the project changes queue, might be null.
    • addPortalChange

      public void addPortalChange(IPortalChange portalChange)
      Description copied from interface: IRequestScope
      This method will attach a new portal change object to the queue of portal changes objects of the current request scope.
      Specified by:
      addPortalChange in interface IRequestScope
      Parameters:
      portalChange - The specific portal change object.
    • hasNextPortalChange

      public boolean hasNextPortalChange()
      Description copied from interface: IRequestScope
      This method checks if the current request scope already has a next portal change information attached to the queue of portal changes.
      Specified by:
      hasNextPortalChange in interface IRequestScope
      Returns:
      A flag indicating if the current request scope object has a next portal change object.
    • getNextPortalChange

      public IPortalChange getNextPortalChange()
      Description copied from interface: IRequestScope
      This method will return the next portal change object attached to the queue of portal changes of the request scope.
      Specified by:
      getNextPortalChange in interface IRequestScope
      Returns:
      The next portal change object from the portal changes queue, might be null.
    • 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.