Class SessionScope
java.lang.Object
com.aquima.interactions.portal.model.session.scope.PortalScope
com.aquima.interactions.portal.model.session.scope.PortalMessageScope
com.aquima.interactions.portal.model.session.scope.SessionScope
- All Implemented Interfaces:
IDisposableScope
,IInternalSessionScope
,IPortalMessageScope
,IPortalScope
,ISessionLifecycle
,ISessionScope
,Serializable
This class implements the ISessionScope interface and is used to store session wide attributes.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSessionScope
(Channel channel) Constructs the session scope with the roles and channel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ISessionActivationContext sessionActivationContext) This method may be used for activating the objects after deserialization.void
Clears all currently pending portal messages.This functions returns the current active channel if there is a channel active, otherwise when no channel is active null is returned.This function returns the current active user for the current session.Returns the current flow state N.B.Retrieves the currently pending portal messages to process.This function returns the testPath for the current session.getType()
This method will return the scope type of the portal scope implementation.void
notifyPortalMessage
(IPortalMessage message) Notifies a portal message after the current event has been processed.void
This method may be used for preparing the objects for serialization.Retrieves and clears the currently pending portal messages to process.void
setCurrentFlowState
(IFlowState state) void
setTestPath
(String testPath) This method will set the testPath for the current session.void
This method will set the user for the current session.toString()
Methods inherited from class com.aquima.interactions.portal.model.session.scope.PortalMessageScope
clearPortalMessageAction, getMappedPortalMessages, getPortalMessageAction, setPortalMessageAction
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, 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
Methods inherited from interface com.aquima.interactions.portal.IPortalScope
clearAttribute, getAttribute, getAttributeNames, hasAttribute, setAttribute
-
Constructor Details
-
Method Details
-
setCurrentFlowState
- Specified by:
setCurrentFlowState
in interfaceIInternalSessionScope
-
getCurrentFlowState
Description copied from interface:ISessionScope
Returns the current flow state N.B. We recommend one does not use this method in services and containers.- Specified by:
getCurrentFlowState
in interfaceISessionScope
- Returns:
- A flowstate
-
getActiveChannel
Description copied from interface:ISessionScope
This functions returns the current active channel if there is a channel active, otherwise when no channel is active null is returned.- Specified by:
getActiveChannel
in interfaceISessionScope
- Returns:
- The current active channel.
-
getActiveUser
Description copied from interface:ISessionScope
This function returns the current active user for the current session.- Specified by:
getActiveUser
in interfaceISessionScope
- Returns:
- The current active user, never null.
-
setUser
Description copied from interface:ISessionScope
This method will set the user for the current session. The existing user information will be discarded.- Specified by:
setUser
in interfaceISessionScope
- Parameters:
user
- The user, may not be null.
-
getTestPath
Description copied from interface:ISessionScope
This function returns the testPath for the current session.- Specified by:
getTestPath
in interfaceISessionScope
- Returns:
- The testPath for the current session
-
setTestPath
Description copied from interface:ISessionScope
This method will set the testPath for the current session. The existing testPath will be discarded.- Specified by:
setTestPath
in interfaceISessionScope
- Parameters:
testPath
- The testpath, may be null.
-
notifyPortalMessage
Description copied from interface:ISessionScope
Notifies a portal message after the current event has been processed.- Specified by:
notifyPortalMessage
in interfaceISessionScope
- Parameters:
message
- The portalmessage, not null.
-
getPendingPortalMessages
Description copied from interface:ISessionScope
Retrieves the currently pending portal messages to process.- Specified by:
getPendingPortalMessages
in interfaceISessionScope
- Returns:
- The portalmessages, not null.
-
removePendingPortalMessages
Description copied from interface:ISessionScope
Retrieves and clears the currently pending portal messages to process.- Specified by:
removePendingPortalMessages
in interfaceISessionScope
- Returns:
- The portal messages, not null.
-
clearPendingPortalMessages
public void clearPendingPortalMessages()Description copied from interface:ISessionScope
Clears all currently pending portal messages.- Specified by:
clearPendingPortalMessages
in interfaceISessionScope
-
toString
-
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.
-
activate
Description copied from interface:ISessionLifecycle
This method may be used for activating the objects after deserialization.- Specified by:
activate
in interfaceISessionLifecycle
- Parameters:
sessionActivationContext
- the current session activation context.
-
passivate
public void passivate()Description copied from interface:ISessionLifecycle
This method may be used for preparing the objects for serialization.- Specified by:
passivate
in interfaceISessionLifecycle
-