Class RequestScope
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
This class implements the IRequestScope interface and is used to store request specific attributes.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequestScope
(ILanguage language, Map<String, ? extends Object> requestParameters) Constructs a new request scope. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangedField
(ValueReference reference, IValue previousValue) void
addPortalChange
(IPortalChange portalChange) This method will attach a new portal change object to the queue of portal changes objects of the current request scope.void
addProjectChange
(IProjectChange projectChange) This method will attach a new project change object to the queue of project changes objects of the current request scope.This method will return an array containing the references to all the values that were changed by fields from the current request.Retrieves the language in which the last page was submitted.This method will return the next portal change object attached to the queue of portal changes of the request scope.This method will return the next project change object attached to the queue of project changes of the request scope.getOriginalValue
(ValueReference reference) This method returns the value of the attribute as it was before the value got changed by the request.getType()
This method will return the scope type of the portal scope implementation.boolean
This method checks if the current request scope already has a next portal change information attached to the queue of portal changes.boolean
This method checks if the current request scope already has a next project change information attached to the queue of project changes.boolean
isChangedValue
(ValueReference reference) This method may be used to check if a specific value has been updated by an event in the current request.Methods inherited from class com.aquima.interactions.portal.model.session.scope.PortalScope
clearAttribute, destroyDisposableObjects, discardParent, getAttribute, getAttributeNames, getParentScope, hasAttribute, isCleared, mergeWithParent, setAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.portal.IDisposableScope
destroyDisposableObjects
Methods inherited from interface com.aquima.interactions.portal.IPortalScope
clearAttribute, getAttribute, getAttributeNames, hasAttribute, setAttribute
-
Constructor Details
-
RequestScope
Constructs a new request scope.- Parameters:
language
- The current language.requestParameters
- The parameters that should be available on the request scope.
-
-
Method Details
-
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 interfaceIRequestScope
- Returns:
- The current language object which is never null
-
addChangedField
-
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 interfaceIRequestScope
- Returns:
- an array containing the references to all the values that were changed by fields from the current request.
-
getOriginalValue
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 interfaceIRequestScope
- 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
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 interfaceIRequestScope
- 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
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 interfaceIRequestScope
- 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 interfaceIRequestScope
- Returns:
- A flag indicating if the current request scope object has a next project change object.
-
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 interfaceIRequestScope
- Returns:
- The next project change object from the project changes queue, might be
null
.
-
addPortalChange
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 interfaceIRequestScope
- 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 interfaceIRequestScope
- Returns:
- A flag indicating if the current request scope object has a next portal change object.
-
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 interfaceIRequestScope
- Returns:
- The next portal change object from the portal changes queue, might be
null
.
-
getType
Description copied from interface:IPortalScope
This method will return the scope type of the portal scope implementation.- Specified by:
getType
in interfaceIPortalScope
- Returns:
- The current scope type.
-