Class SessionUtil


  • public class SessionUtil
    extends Object
    Various methods related to the user session
    Since:
    6.0
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • SessionUtil

        public SessionUtil()
    • Method Detail

      • validateSession

        public static com.logicaldoc.core.security.Session validateSession​(javax.servlet.http.HttpServletRequest request)
                                                                    throws com.logicaldoc.gui.common.client.InvalidSessionException
        Throws:
        com.logicaldoc.gui.common.client.InvalidSessionException
      • validateSession

        public static com.logicaldoc.core.security.Session validateSession​(String sid)
                                                                    throws com.logicaldoc.gui.common.client.InvalidSessionException
        Throws a runtime exception id the given session is invalid
        Parameters:
        sid - identifier of the session
        Returns:
        the session
        Throws:
        com.logicaldoc.gui.common.client.InvalidSessionException - the session is not valid
      • currentLocale

        public static Locale currentLocale​(com.logicaldoc.core.security.Session session)
                                    throws com.logicaldoc.gui.common.client.ServerException
        Throws:
        com.logicaldoc.gui.common.client.ServerException
      • currentLocale

        public static Locale currentLocale​(String sid)
                                    throws com.logicaldoc.gui.common.client.ServerException
        Throws:
        com.logicaldoc.gui.common.client.ServerException