fr.paris.lutece.portal.service.portal
Class ThemesService

java.lang.Object
  extended by fr.paris.lutece.portal.service.portal.ThemesService

public final class ThemesService
extends java.lang.Object

ThemesService


Field Summary
static java.lang.String GLOBAL_THEME
           
 
Method Summary
static java.lang.String getGlobalTheme()
          Returns the global theme
static Theme getGlobalThemeObject()
          Returns the global theme Object
static ReferenceList getPageThemes(java.util.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 java.lang.String getUserTheme(javax.servlet.http.HttpServletRequest request)
          Gets the theme selected by the user
static void setGlobalTheme(java.lang.String strGlobalTheme)
          Sets the global theme
static void setUserTheme(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String strTheme)
          Sets the users theme using a cookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL_THEME

public static final java.lang.String GLOBAL_THEME
See Also:
Constant Field Values
Method Detail

getTheme

public static Theme getTheme(PageData data,
                             javax.servlet.http.HttpServletRequest request)
Get the theme code depending of the different priorities. The priorities are :
  1. the theme of test (in case you want to test a page with a specific theme)
  2. the theme choosen by the user
  3. the global theme : the one choosen in the back office for the whole site
  4. the page theme : a theme specified for a page

Parameters:
data -
request -
Returns:

getUserTheme

public static java.lang.String getUserTheme(javax.servlet.http.HttpServletRequest request)
Gets the theme selected by the user

Parameters:
request - The HTTP request
Returns:
The theme if available otherwise null

setUserTheme

public static void setUserTheme(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                java.lang.String strTheme)
Sets the users theme using a cookie

Parameters:
request - The HTTP request
response - The HTTP response
strTheme - The Theme code

getGlobalTheme

public static java.lang.String getGlobalTheme()
Returns the global theme

Returns:
the global theme

getGlobalThemeObject

public static Theme getGlobalThemeObject()
Returns the global theme Object

Returns:
the global theme Object

setGlobalTheme

public static void setGlobalTheme(java.lang.String strGlobalTheme)
Sets the global theme

Parameters:
strTheme - The global theme

getPageThemes

public static ReferenceList getPageThemes(java.util.Locale locale)
Returns a reference list which contains all the themes

Returns:
a reference list


Copyright © 2010 Mairie de Paris. All Rights Reserved.