Class ReadonlySessionScope
java.lang.Object
com.aquima.interactions.portal.model.session.scope.SessionScopeDelegate
com.aquima.interactions.portal.model.session.scope.ReadonlySessionScope
- All Implemented Interfaces:
IDisposableScope
,IPortalMessageScope
,IPortalScope
,ISessionLifecycle
,ISessionScope
,Serializable
Class that wraps a session scope to make it immutable (read-only).
- Since:
- 5.0
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReadonlySessionScope
(ISessionScope parent) Constructs the read-only wrapper for the specified scope. -
Method Summary
Modifier and TypeMethodDescriptionclearAttribute
(String key) Always throws an InvalidStateException: No modifications allowed on a read only session scope.void
Clears all currently pending portal messages.void
clearPortalMessageAction
(String portalMessage) Clears the current action to the specified portal message.void
Always throws an InvalidStateException: No modifications allowed on a read only session scope.void
notifyPortalMessage
(IPortalMessage message) Notifies a portal message after the current event has been processed.setAttribute
(String key, Serializable attrValue) Always throws an InvalidStateException: No modifications allowed on a read only session scope.void
setPortalMessageAction
(String portalMessage, PortalMessageAction action) Sets the action to the specified portal message.void
Always throws an InvalidStateException: No modifications allowed on a read only session scope.void
setTestPath
(String testPath) Always throws an InvalidStateException: No modifications allowed on a read only session scope.void
Always throws an InvalidStateException: No modifications allowed on a read only session scope.Methods inherited from class com.aquima.interactions.portal.model.session.scope.SessionScopeDelegate
activate, destroyDisposableObjects, getActiveChannel, getActiveUser, getAttribute, getAttributeNames, getCurrentFlowState, getMappedPortalMessages, getPendingPortalMessages, getPortalMessageAction, getSessionScope, getTestPath, getType, hasAttribute, passivate, removePendingPortalMessages
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
getMappedPortalMessages, getPortalMessageAction
Methods inherited from interface com.aquima.interactions.portal.IPortalScope
getAttribute, getAttributeNames, getType, hasAttribute
Methods inherited from interface com.aquima.interactions.portal.ISessionLifecycle
activate, passivate
Methods inherited from interface com.aquima.interactions.portal.ISessionScope
getActiveChannel, getActiveUser, getCurrentFlowState, getPendingPortalMessages, getTestPath, removePendingPortalMessages
-
Constructor Details
-
ReadonlySessionScope
Constructs the read-only wrapper for the specified scope.- Parameters:
parent
- The session scope which should be made read-only.
-
-
Method Details
-
clearAttribute
Always throws an InvalidStateException: No modifications allowed on a read only session scope.- Specified by:
clearAttribute
in interfaceIPortalScope
- Overrides:
clearAttribute
in classSessionScopeDelegate
- 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.
-
setAttribute
Always throws an InvalidStateException: No modifications allowed on a read only session scope.- Specified by:
setAttribute
in interfaceIPortalScope
- Overrides:
setAttribute
in classSessionScopeDelegate
- 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.
-
setRoles
Always throws an InvalidStateException: No modifications allowed on a read only session scope.- Parameters:
roles
- Array containing the role names.
-
setUser
Always throws an InvalidStateException: No modifications allowed on a read only session scope.- Specified by:
setUser
in interfaceISessionScope
- Overrides:
setUser
in classSessionScopeDelegate
- Parameters:
user
- Array containing the user.
-
setTestPath
Always throws an InvalidStateException: No modifications allowed on a read only session scope.- Specified by:
setTestPath
in interfaceISessionScope
- Overrides:
setTestPath
in classSessionScopeDelegate
- Parameters:
testPath
- String.
-
destroyDisposableObjects
public void destroyDisposableObjects()Always throws an InvalidStateException: No modifications allowed on a read only session scope. -
setPortalMessageAction
Description copied from interface:IPortalMessageScope
Sets the action to the specified portal message.- Specified by:
setPortalMessageAction
in interfaceIPortalMessageScope
- Overrides:
setPortalMessageAction
in classSessionScopeDelegate
- Parameters:
portalMessage
- The portal message to map, not null or empty.action
- The action to perform on the message, not null.
-
clearPortalMessageAction
Description copied from interface:IPortalMessageScope
Clears the current action to the specified portal message.- Specified by:
clearPortalMessageAction
in interfaceIPortalMessageScope
- Overrides:
clearPortalMessageAction
in classSessionScopeDelegate
- Parameters:
portalMessage
- The portal message to clear, not null or empty.
-
notifyPortalMessage
Description copied from interface:ISessionScope
Notifies a portal message after the current event has been processed.- Specified by:
notifyPortalMessage
in interfaceISessionScope
- Overrides:
notifyPortalMessage
in classSessionScopeDelegate
- Parameters:
message
- The portalmessage, not null.
-
clearPendingPortalMessages
public void clearPendingPortalMessages()Description copied from interface:ISessionScope
Clears all currently pending portal messages.- Specified by:
clearPendingPortalMessages
in interfaceISessionScope
- Overrides:
clearPendingPortalMessages
in classSessionScopeDelegate
-