Class DefaultSessionService

    • Constructor Detail

      • DefaultSessionService

        public DefaultSessionService()
    • Method Detail

      • getSession

        @Deprecated
        public Session getSession​(java.lang.String sessionID)
        Deprecated.
        since 5.5.1 session management was changed and this method always returns current session or null
        Description copied from interface: SessionService
        Get Session by given id
        Specified by:
        getSession in interface SessionService
      • executeInLocalViewWithParams

        public <T> T executeInLocalViewWithParams​(java.util.Map<java.lang.String,​java.lang.Object> localViewParameters,
                                                  SessionExecutionBody body)
        Description copied from interface: SessionService
        Executes the given SessionExecutionBody in a local SessionContext that is populated with parameters provided in the map.
        Specified by:
        executeInLocalViewWithParams in interface SessionService
        Parameters:
        localViewParameters - parameters that will be set in local view
        body - callback to be invoked
        Returns:
        callback result
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        shortcut to getCurrentSession().setAttribute(String,Object). this method is just a delegate to the Session object and it should not be overwritten.
        Specified by:
        setAttribute in interface SessionService
        Parameters:
        name - name of the attribute
        value - the value to be set
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
        Description copied from interface: SessionService
        Removes the given attribute from the current session. Do nothing if the attribute doesn't exists in the session.
        Specified by:
        removeAttribute in interface SessionService
        Parameters:
        name - the attribute name
      • getAttribute

        public <T> T getAttribute​(java.lang.String name)
        shortcut to getCurrentSession().getAttribute(String). this method is just a delegate to the Session object and it should not be overwritten
        Specified by:
        getAttribute in interface SessionService
        Parameters:
        name - the attribute name
        Returns:
        null if such attribute don't exist in the current session.
      • getAllAttributes

        public <T> java.util.Map<java.lang.String,​T> getAllAttributes()
        shortcut to getCurrentSession().getAllAttributes(). this method is just a delegate to the Session object and it should not be overwritten
        Specified by:
        getAllAttributes in interface SessionService
        Returns:
        all attributes from the current Session as Map.
      • hasCurrentSession

        public boolean hasCurrentSession()
        Description copied from interface: SessionService
        Check if current session exists and neither closed nor inactive. KAM-158: Replacement for JaloSession.hasCurrentSession()
        Specified by:
        hasCurrentSession in interface SessionService
      • setModelService

        public void setModelService​(ModelService modelService)
      • createSession

        public Session createSession()
        Must be overwritten! Use <lookup-method> in spring.
      • getBoundSession

        public Session getBoundSession​(java.lang.Object rawSession)
        Description copied from interface: SessionService
        Returns service layer session bound to given JaloSession or creates new session (if no session is bound to given JaloSession) and returns it.
        Specified by:
        getBoundSession in interface SessionService
      • getRawSession

        public java.lang.Object getRawSession​(Session session)
        Description copied from interface: SessionService
        Returns JaloSession bound to given service layer session.
        Specified by:
        getRawSession in interface SessionService