Class ThemesService
java.lang.Object
fr.paris.lutece.portal.service.portal.ThemesService
ThemesService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the global themestatic ThemegetGlobalTheme(String strTheme) Returns the global themestatic ThemeReturns the global theme Objectstatic ReferenceListgetPageThemes(Locale locale) Returns a reference list which contains all the themesstatic ThemeGet the theme code depending of the different priorities.static ReferenceListGet the list of themes as aReferenceListstatic Collection<Theme>Get a collection of themesstatic StringgetUserTheme(jakarta.servlet.http.HttpServletRequest request) Gets the theme selected by the userstatic booleanisValidTheme(String strCodeTheme) Check if the theme is validstatic voidsetGlobalTheme(String strGlobalTheme, String strGlobalThemeVersion) Sets the global themestatic voidsetUserTheme(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String strTheme) Sets the users theme using a cookie
-
Field Details
-
GLOBAL_THEME
- See Also:
-
-
Method Details
-
getTheme
Get the theme code depending of the different priorities. The priorities are :- the theme of test (in case you want to test a page with a specific theme)
- the theme choosen by the user
- the global theme : the one choosen in the back office for the whole site
- the page theme : a theme specified for a page
- Parameters:
data- The PageData objectrequest- The HttpServletRequest- Returns:
- the theme
-
getUserTheme
Gets the theme selected by the user- Parameters:
request- The HTTP request- Returns:
- The theme if available otherwise null
-
setUserTheme
public static void setUserTheme(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String strTheme) Sets the users theme using a cookie- Parameters:
request- The HTTP requestresponse- The HTTP responsestrTheme- The Theme code
-
getGlobalTheme
Returns the global theme- Returns:
- the global theme
-
getGlobalThemeObject
Returns the global theme Object- Returns:
- the global theme Object
-
getGlobalTheme
Returns the global theme- Parameters:
strTheme- The theme- Returns:
- the global theme
-
setGlobalTheme
Sets the global theme- Parameters:
strGlobalTheme- The global theme
-
getPageThemes
Returns a reference list which contains all the themes- Parameters:
locale- The Locale- Returns:
- a reference list
-
getThemesList
Get a collection of themes- Returns:
- a collection of themes
-
getThemes
Get the list of themes as aReferenceList- Returns:
- a
ReferenceList
-
isValidTheme
Check if the theme is valid- Parameters:
strCodeTheme- the code theme- Returns:
- true if it is valid, false otherwise
-