Class ThemeService

java.lang.Object
fr.paris.lutece.portal.service.theme.ThemeService
All Implemented Interfaces:
IThemeService

@ApplicationScoped @Named public class ThemeService extends Object implements IThemeService
ThemeService
  • Constructor Details

    • ThemeService

      public ThemeService()
  • Method Details

    • getThemes

      public ReferenceList getThemes()
      Get the list of themes
      Specified by:
      getThemes in interface IThemeService
      Returns:
      a list of themes
    • getTheme

      public Theme getTheme(String strCodeTheme)
      Get the theme with a given code theme
      Specified by:
      getTheme in interface IThemeService
      Parameters:
      strCodeTheme - the code theme
      Returns:
      the theme
    • getGlobalTheme

      public Theme getGlobalTheme()
      Get the global theme
      Specified by:
      getGlobalTheme in interface IThemeService
      Returns:
      the global theme
    • getUserTheme

      public String getUserTheme(jakarta.servlet.http.HttpServletRequest request)
      Gets the theme selected by the user
      Specified by:
      getUserTheme in interface IThemeService
      Parameters:
      request - The HTTP request
      Returns:
      The theme if available otherwise null
    • getThemesList

      public Collection<Theme> getThemesList()
      Return the list of all the themes
      Specified by:
      getThemesList in interface IThemeService
      Returns:
      A collection of themes objects
    • setGlobalTheme

      public void setGlobalTheme(String strGlobalTheme, String strGlobalThemeVersion)
      Set the global theme
      Specified by:
      setGlobalTheme in interface IThemeService
      Parameters:
      strGlobalTheme - the code theme of the global theme
    • isValidTheme

      public boolean isValidTheme(String strCodeTheme)
      Checks if the theme is among existing themes
      Specified by:
      isValidTheme in interface IThemeService
      Parameters:
      strCodeTheme - The theme to check
      Returns:
      True if the theme is valid