Class AquimaSessionsMap

java.lang.Object
com.aquima.web.sessionmanager.AquimaSessionsMap
All Implemented Interfaces:
com.blueriq.component.api.IAquimaSessionsMap, Serializable, org.springframework.beans.factory.DisposableBean

public class AquimaSessionsMap extends Object implements com.blueriq.component.api.IAquimaSessionsMap, Serializable, org.springframework.beans.factory.DisposableBean
This session manager implementation is a session scoped Spring bean.
Author:
Danny Roest, Jon van Leuven
See Also:
  • Constructor Details Link icon

    • AquimaSessionsMap Link icon

      public AquimaSessionsMap(long timeout, TimeUnit unit)
      Creates a new instance without a work unit executor.
      Parameters:
      timeout - the session timeout
      unit - the units for the session timeout
    • AquimaSessionsMap Link icon

      public AquimaSessionsMap(com.blueriq.component.api.workunit.IWorkUnitExecutor executor, long timeout, TimeUnit unit)
      Creates a new instance. The optional executor will be used to close sessions within a transaction.
      Parameters:
      executor - the optional work unit executor, may be null
      timeout - the session timeout
      unit - the units for the session timeout
  • Method Details Link icon

    • getSessionTimeoutMillis Link icon

      public long getSessionTimeoutMillis()
      Specified by:
      getSessionTimeoutMillis in interface com.blueriq.component.api.IAquimaSessionsMap
    • addSession Link icon

      public void addSession(com.blueriq.component.api.IAquimaSession aquimaSession)
      Adds the webPortalSession to the httpSession and creates a new unique id for this session.
      Specified by:
      addSession in interface com.blueriq.component.api.IAquimaSessionsMap
      Parameters:
      aquimaSession - the webPortalSession to put on the http session
    • addChildSession Link icon

      public void addChildSession(String parentSessionId, com.blueriq.component.api.IAquimaSession childSession)
      Specified by:
      addChildSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • hasSession Link icon

      public boolean hasSession(String sessionId)
      Specified by:
      hasSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • closeSession Link icon

      public void closeSession(String aquimaSessionId)
      Specified by:
      closeSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • cleanIdleSessions Link icon

      public void cleanIdleSessions()
      Specified by:
      cleanIdleSessions in interface com.blueriq.component.api.IAquimaSessionsMap
    • keepAlive Link icon

      public void keepAlive(String aquimaSessionId)
      Specified by:
      keepAlive in interface com.blueriq.component.api.IAquimaSessionsMap
    • getSession Link icon

      public com.blueriq.component.api.IAquimaSession getSession(String aquimaSessionId)
      Returns the the webPortalSession belonging to the session id in the request.

      Throws an IllegalStateException when there is no web portal session found for the session id in the request

      Specified by:
      getSession in interface com.blueriq.component.api.IAquimaSessionsMap
      Parameters:
      aquimaSessionId - The requested aquima session id
      Returns:
      the webPortalSession belonging to the session id in the request.
    • getSession Link icon

      public com.blueriq.component.api.IAquimaSession getSession(String aquimaSessionId, com.blueriq.component.api.FlushMode flushMode)
      Specified by:
      getSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • getAvailableSessionIds Link icon

      public List<String> getAvailableSessionIds()
      Specified by:
      getAvailableSessionIds in interface com.blueriq.component.api.IAquimaSessionsMap
    • getMainSessionIds Link icon

      public List<String> getMainSessionIds()
      Specified by:
      getMainSessionIds in interface com.blueriq.component.api.IAquimaSessionsMap
    • updateSession Link icon

      public void updateSession(com.blueriq.component.api.IAquimaSession aquimaSession)
      Specified by:
      updateSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • flush Link icon

      public void flush()
      Specified by:
      flush in interface com.blueriq.component.api.IAquimaSessionsMap
    • destroy Link icon

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • getChildSessions Link icon

      public List<com.blueriq.component.api.IAquimaSession> getChildSessions(String sessionId)
      Specified by:
      getChildSessions in interface com.blueriq.component.api.IAquimaSessionsMap
    • getChildSessions Link icon

      public List<com.blueriq.component.api.IAquimaSession> getChildSessions(String sessionId, String pageName)
      Specified by:
      getChildSessions in interface com.blueriq.component.api.IAquimaSessionsMap
    • getRootSession Link icon

      public com.blueriq.component.api.IAquimaSession getRootSession(String sessionId)
      Specified by:
      getRootSession in interface com.blueriq.component.api.IAquimaSessionsMap
    • isSessionCircularDependent Link icon

      public boolean isSessionCircularDependent(String sessionId, String childSessionId, String pageName)
      This method checks if a session contains itself through its children.
      Parameters:
      sessionId - The session Id for the current checked session
      childSessionId - The session Id of a child session of the current checked session
      pageName - the page name
      Returns:
      false, if session does not contain itself through its children. true, if session contains itself through its children.