Class PageScopeDelegate
java.lang.Object
com.aquima.interactions.portal.model.session.scope.PageScopeDelegate
- All Implemented Interfaces:
IDisposableScope
,IPageScope
,IPortalMessageScope
,IPortalScope
,Serializable
Utility class to allow for easy wrapping of a page scope implementation.
- Since:
- 6.4.1
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PageScopeDelegate
(IPageScope parent) Constructs the page scope with the object that needs to be wrapped. -
Method Summary
Modifier and TypeMethodDescriptionclearAttribute
(String key) This method will remove the value from the scope for the specified key, and returns the value that has been removed.getAttribute
(String key) This method will return the value that has been added to this scope for the specified attribute key.String[]
This method returns an array containing all the names of the attribute that have a value in this scope.This method will return an array containing the references to all the values that were changed by fields from the current page.getOriginalValue
(ValueReference reference) This method returns the value of the attribute as it was before the value got changed by the page event.getType()
This method will return the scope type of the portal scope implementation.boolean
hasAttribute
(String key) This method will check if an attribute with the specified key has been added to this scope.boolean
isChangedValue
(ValueReference reference) This method may be used to check if a specific value has been updated by an event from the current page.setAttribute
(String key, Serializable attrValue) 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.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.IPortalMessageScope
clearPortalMessageAction, getMappedPortalMessages, getPortalMessageAction, setPortalMessageAction
-
Constructor Details
-
PageScopeDelegate
Constructs the page scope with the object that needs to be wrapped.- Parameters:
parent
- The page scope that needs to be wrapped by this delegate.
-
-
Method Details
-
clearAttribute
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 interfaceIPortalScope
- 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
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 interfaceIPortalScope
- 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
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 interfaceIPortalScope
- Returns:
- array containing all the names of the attribute that have a value in this scope.
-
getChangedValues
Description copied from interface:IPageScope
This method will return an array containing the references to all the values that were changed by fields from the current page. The array will contain the references to values from the current event, but also the references to the values that were changed by previous refresh actions.- Specified by:
getChangedValues
in interfaceIPageScope
- Returns:
- an array containing the references to all the values that were changed by fields from the current page.
-
getOriginalValue
Description copied from interface:IPageScope
This method returns the value of the attribute as it was before the value got changed by the page event. If the value did not get changed by the page event, the method will return a null value. If the value got changed multiple times by subsequent refresh events, the method will still return the value as it was before the page was shown. Intermediate values from subsequent page refreshes are lost.- Specified by:
getOriginalValue
in interfaceIPageScope
- Parameters:
reference
- The reference to the attribute whose value is requested before it was modified by the page event.- Returns:
- The value of the attribute as it was before the value got changed by the page event.
-
hasAttribute
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 interfaceIPortalScope
- 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
Description copied from interface:IPageScope
This method may be used to check if a specific value has been updated by an event from the current page.- Specified by:
isChangedValue
in interfaceIPageScope
- Parameters:
reference
- Reference to the value that might have been updated.- Returns:
- Boolean indicating if the value was updated by an event from the current page.
-
setAttribute
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 interfaceIPortalScope
- 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.
-
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.
-