Class SilverpeasWebUtil
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.SilverpeasWebUtil
-
@Singleton public class SilverpeasWebUtil extends Object
- Author:
- ehugonnet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SilverpeasWebUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SilverpeasWebUtil
get()
String[]
getComponentId(javax.servlet.http.HttpServletRequest request)
Extract the space id and the component id.String
getContentLanguage(javax.servlet.http.HttpServletRequest request)
Gets the content language specified into the request.MainSessionController
getMainSessionController(javax.servlet.http.HttpServletRequest request)
Accessing the MainSessionControllerOrganizationController
getOrganisationController()
String[]
getRoles(javax.servlet.http.HttpServletRequest request)
String
getUserLanguage(javax.servlet.http.HttpServletRequest request)
Gets the user favorite language from elements of the given request.
-
-
-
Method Detail
-
get
public static SilverpeasWebUtil get()
-
getOrganisationController
public OrganizationController getOrganisationController()
-
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 ofHttpServletRequest
.- Returns:
- a string representing the favorite language of the user behind the session or the language of WEB browser (or default language).
-
-