Class SilverpeasWebUtil


  • @Singleton
    public class SilverpeasWebUtil
    extends Object
    Author:
    ehugonnet
    • Constructor Detail

      • SilverpeasWebUtil

        protected SilverpeasWebUtil()
    • Method Detail

      • getMainSessionController

        public MainSessionController getMainSessionController​(javax.servlet.http.HttpServletRequest request)
        Accessing the MainSessionController
        Parameters:
        request - the HttpServletRequest
        Returns:
        the current MainSessionController.
      • getComponentId

        public String[] getComponentId​(javax.servlet.http.HttpServletRequest request)
        Extract the space id and the component id.
        Parameters:
        request -
        Returns:
      • getRoles

        public String[] getRoles​(javax.servlet.http.HttpServletRequest request)
      • getContentLanguage

        public String getContentLanguage​(javax.servlet.http.HttpServletRequest request)
        Gets the content language specified into the request.
        Parameters:
        request -
        Returns:
      • getUserLanguage

        public String getUserLanguage​(javax.servlet.http.HttpServletRequest request)
        Gets the user favorite language from elements of the given request.
        Parameters:
        request - an instance of HttpServletRequest.
        Returns:
        a string representing the favorite language of the user behind the session or the language of WEB browser (or default language).