public final class ThemesService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GLOBAL_THEME |
| Modifier and Type | Method and Description |
|---|---|
static Theme |
create(Theme theme)
Create a new theme
|
static String |
getGlobalTheme()
Returns the global theme
|
static Theme |
getGlobalTheme(String strTheme)
Returns the global theme
|
static Theme |
getGlobalThemeObject()
Returns the global theme Object
|
static ReferenceList |
getPageThemes(Locale locale)
Returns a reference list which contains all the themes
|
static Theme |
getTheme(PageData data,
javax.servlet.http.HttpServletRequest request)
Get the theme code depending of the different priorities.
|
static ReferenceList |
getThemes()
Get the list of themes as a
ReferenceList |
static Collection<Theme> |
getThemesList()
Get a collection of themes
|
static String |
getUserTheme(javax.servlet.http.HttpServletRequest request)
Gets the theme selected by the user
|
static boolean |
isAvailable()
Check if the theme service is available.
|
static boolean |
isValidTheme(String strCodeTheme)
Check if the theme is valid
|
static void |
remove(String strCodeTheme)
Remove a theme
|
static void |
setGlobalTheme(String strGlobalTheme)
Sets the global theme
|
static void |
setUserTheme(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String strTheme)
Sets the users theme using a cookie
|
static Theme |
update(Theme theme)
Update a theme
|
public static final String GLOBAL_THEME
public static Theme getTheme(PageData data, javax.servlet.http.HttpServletRequest request)
data - The PageData objectrequest - The HttpServletRequestpublic static String getUserTheme(javax.servlet.http.HttpServletRequest request)
request - The HTTP requestpublic static void setUserTheme(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String strTheme)
request - The HTTP requestresponse - The HTTP responsestrTheme - The Theme codepublic static String getGlobalTheme()
public static Theme getGlobalThemeObject()
public static Theme getGlobalTheme(String strTheme)
strTheme - The themepublic static void setGlobalTheme(String strGlobalTheme)
strGlobalTheme - The global themepublic static ReferenceList getPageThemes(Locale locale)
locale - The Localepublic static boolean isAvailable()
plugin-theme is activatedplugin-theme is definedpublic static Theme create(Theme theme)
theme - the themepublic static Theme update(Theme theme)
theme - the theme to updatepublic static void remove(String strCodeTheme)
strCodeTheme - the code themepublic static Collection<Theme> getThemesList()
public static ReferenceList getThemes()
ReferenceListReferenceListpublic static boolean isValidTheme(String strCodeTheme)
strCodeTheme - the code themeCopyright © 2016 City of Paris. All rights reserved.