java.lang.Object
com.aquima.interactions.portal.model.session.state.SessionState
All Implemented Interfaces:
ISessionState, Serializable

public class SessionState extends Object implements ISessionState
This class contains the information of a single portal session. The session state can be converted to and from XML using the SessionStateSerializer class.
Since:
6.3
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • SessionState

      public SessionState(TxPortalContext context, IPage currentPage)
      Constructs a session state object using the session information provided by the portal context.
      Parameters:
      context - The portal context containing the session information.
      currentPage - The current page.
      Throws:
      AppException - This exception is thrown when the session state could not be created for the specified portal context.
    • SessionState

      public SessionState(TxPortalContext context, IPage currentPage, boolean xml)
      Constructs a session state object using the session information provided by the portal context.
      Parameters:
      context - The portal context containing the session information.
      currentPage - The current page.
      xml - True for XML serialization, false for binary serialization.
      Throws:
      AppException - This exception is thrown when the session state could not be created for the specified portal context.
    • SessionState

      protected SessionState(ApplicationID appId, IFlowState flowState, String languageCode, PortalContextDump portalContext, PageScopeDump pageScope, SessionScopeDump sessionScope, FlowScopeDump flowScope, String profileXml, IPage currentPage)
  • Method Details

    • getProfileState

      public IProfileState getProfileState()
    • getApplicationId

      public ApplicationID getApplicationId()
      Description copied from interface: ISessionState
      This method returns the ID of the application for which the session was saved.
      Specified by:
      getApplicationId in interface ISessionState
      Returns:
      the ID of the application for which the session was saved.
    • getLanguageCode

      public String getLanguageCode()
      Description copied from interface: ISessionState
      This method returns the current language (code) of the session.
      Specified by:
      getLanguageCode in interface ISessionState
      Returns:
      the current language (code) of the session.
    • getFlowState

      public IFlowState getFlowState()
      Description copied from interface: ISessionState
      This method returns the flow state of the session.
      Specified by:
      getFlowState in interface ISessionState
      Returns:
      the flow state of the session.
    • getProfileXml

      protected IXmlElement getProfileXml()
    • getPageScope

      public PageScope getPageScope(ISolution application)
      Description copied from interface: ISessionState
      This method (re)creates the page scope using the definitions from the application model.
      Specified by:
      getPageScope in interface ISessionState
      Parameters:
      application - The application model containing the definitions of the application.
      Returns:
      Page scope for the session.
    • getFlowScope

      public FlowScope getFlowScope()
      Description copied from interface: ISessionState
      This method (re)creates the flow scope.
      Specified by:
      getFlowScope in interface ISessionState
      Returns:
      Flow scope for the session.
    • getSessionScope

      public SessionScope getSessionScope(ISolution application)
      Description copied from interface: ISessionState
      This method (re)creates the session scope using the definitions from the application model.
      Specified by:
      getSessionScope in interface ISessionState
      Parameters:
      application - The application model containing the definitions of the application.
      Returns:
      Session scope for the session.
    • initializeProfile

      public void initializeProfile(IModule application, IProfile profile)
      Description copied from interface: ISessionState
      This method is invoked to allow the session state to initialize the profile with the values of the saved session.
      Specified by:
      initializeProfile in interface ISessionState
      Parameters:
      application - The application model containing the definitions of the application.
      profile - The profile that should be initialized.
    • getInstanceContext

      public IInstanceContext getInstanceContext(TmsProfile tmsProfile)
      Description copied from interface: ISessionState
      This method (re)creates the instance context for the session.
      Specified by:
      getInstanceContext in interface ISessionState
      Parameters:
      tmsProfile - The profile that should be used for the root context.
      Returns:
      The instance context for the session.
    • getPageScopeDump

      protected PageScopeDump getPageScopeDump()
    • getSessionScopeDump

      protected SessionScopeDump getSessionScopeDump()
    • getPortalContextDump

      protected PortalContextDump getPortalContextDump()
    • getFlowScopeDump

      public FlowScopeDump getFlowScopeDump()
    • getCurrentPage

      public IPage getCurrentPage()
      Description copied from interface: ISessionState
      This method (re)creates the current page.
      Specified by:
      getCurrentPage in interface ISessionState
      Returns:
      The current page, may be null.