Class ThemeService

  • All Implemented Interfaces:
    fr.paris.lutece.portal.service.portal.IThemeService

    public class ThemeService
    extends java.lang.Object
    implements fr.paris.lutece.portal.service.portal.IThemeService
    ThemeService
    • Constructor Summary

      Constructors 
      Constructor Description
      ThemeService()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      fr.paris.lutece.portal.business.style.Theme create​(fr.paris.lutece.portal.business.style.Theme theme)
      Creation of an instance of a theme
      fr.paris.lutece.portal.business.style.Theme getGlobalTheme()
      Get the global theme
      static ThemeService getInstance()
      Return the ThemeService singleton
      fr.paris.lutece.portal.business.style.Theme getTheme​(java.lang.String strCodeTheme)
      Get the theme with a given code theme
      fr.paris.lutece.util.ReferenceList getThemes()
      Get the list of themes
      java.util.Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList()
      Return the list of all the themes
      java.lang.String getUserTheme​(javax.servlet.http.HttpServletRequest request)
      Gets the theme selected by the user
      void init()
      Init
      boolean isValidTheme​(java.lang.String strCodeTheme)
      Checks if the theme is among existing themes
      void remove​(java.lang.String strCodeTheme)
      Remove the theme whose identifier is specified in parameter
      void setGlobalTheme​(java.lang.String strGlobalTheme)
      Set the global theme
      fr.paris.lutece.portal.business.style.Theme update​(fr.paris.lutece.portal.business.style.Theme theme)
      Update of the theme which is specified
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ThemeService

        public ThemeService()
    • Method Detail

      • getInstance

        public static ThemeService getInstance()
        Return the ThemeService singleton
        Returns:
        the ThemeService singleton
      • init

        public void init()
        Init
      • getThemes

        public fr.paris.lutece.util.ReferenceList getThemes()
        Get the list of themes
        Specified by:
        getThemes in interface fr.paris.lutece.portal.service.portal.IThemeService
        Returns:
        a list of themes
      • getTheme

        public fr.paris.lutece.portal.business.style.Theme getTheme​(java.lang.String strCodeTheme)
        Get the theme with a given code theme
        Specified by:
        getTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        strCodeTheme - the code theme
        Returns:
        the theme
      • getGlobalTheme

        public fr.paris.lutece.portal.business.style.Theme getGlobalTheme()
        Get the global theme
        Specified by:
        getGlobalTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
        Returns:
        the global theme
      • getUserTheme

        public java.lang.String getUserTheme​(javax.servlet.http.HttpServletRequest request)
        Gets the theme selected by the user
        Specified by:
        getUserTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        request - The HTTP request
        Returns:
        The theme if available otherwise null
      • getThemesList

        public java.util.Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList()
        Return the list of all the themes
        Specified by:
        getThemesList in interface fr.paris.lutece.portal.service.portal.IThemeService
        Returns:
        A collection of themes objects
      • setGlobalTheme

        public void setGlobalTheme​(java.lang.String strGlobalTheme)
        Set the global theme
        Specified by:
        setGlobalTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        strGlobalTheme - the code theme of the global theme
      • create

        public fr.paris.lutece.portal.business.style.Theme create​(fr.paris.lutece.portal.business.style.Theme theme)
        Creation of an instance of a theme
        Specified by:
        create in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        theme - An instance of a theme which contains the informations to store
        Returns:
        The instance of a theme which has been created with its primary key.
      • update

        public fr.paris.lutece.portal.business.style.Theme update​(fr.paris.lutece.portal.business.style.Theme theme)
        Update of the theme which is specified
        Specified by:
        update in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        theme - The instance of the theme which contains the data to store
        Returns:
        The instance of the theme which has been updated
      • remove

        public void remove​(java.lang.String strCodeTheme)
        Remove the theme whose identifier is specified in parameter
        Specified by:
        remove in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        strCodeTheme - The identifier of the theme to remove
      • isValidTheme

        public boolean isValidTheme​(java.lang.String strCodeTheme)
        Checks if the theme is among existing themes
        Specified by:
        isValidTheme in interface fr.paris.lutece.portal.service.portal.IThemeService
        Parameters:
        strCodeTheme - The theme to check
        Returns:
        True if the theme is valid