Class ThemeHome


  • public final class ThemeHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Theme objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static fr.paris.lutece.portal.business.style.Theme create​(fr.paris.lutece.portal.business.style.Theme theme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Creation of an instance of a theme
      static fr.paris.lutece.portal.business.style.Theme findByPrimaryKey​(java.lang.String strCodeTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of an theme whose identifier is specified in parameter
      static fr.paris.lutece.portal.business.style.Theme getGlobalTheme​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the global theme
      static fr.paris.lutece.util.ReferenceList getThemes​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns a reference list which contains all the themes
      static java.util.Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the list of all the themes
      static boolean isValidTheme​(java.lang.String strCodeTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Checks if the theme is among existing themes
      static void remove​(java.lang.String strCodeTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the theme whose identifier is specified in parameter
      static void setGlobalTheme​(java.lang.String strGlobalTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Sets the global theme
      static fr.paris.lutece.portal.business.style.Theme update​(fr.paris.lutece.portal.business.style.Theme theme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update of the theme which is specified
      • Methods inherited from class java.lang.Object

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

      • create

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

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

        public static void remove​(java.lang.String strCodeTheme,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove the theme whose identifier is specified in parameter
        Parameters:
        strCodeTheme - The identifier of the theme to remove
        plugin - Plugin
      • findByPrimaryKey

        public static fr.paris.lutece.portal.business.style.Theme findByPrimaryKey​(java.lang.String strCodeTheme,
                                                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns an instance of an theme whose identifier is specified in parameter
        Parameters:
        strCodeTheme - The theme primary key
        plugin - Plugin
        Returns:
        an instance of a theme
      • getThemesList

        public static java.util.Collection<fr.paris.lutece.portal.business.style.Theme> getThemesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Return the list of all the themes
        Parameters:
        plugin - Plugin
        Returns:
        A collection of themes objects
      • getThemes

        public static fr.paris.lutece.util.ReferenceList getThemes​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns a reference list which contains all the themes
        Parameters:
        plugin - Plugin
        Returns:
        a reference list
      • isValidTheme

        public static boolean isValidTheme​(java.lang.String strCodeTheme,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Checks if the theme is among existing themes
        Parameters:
        strCodeTheme - The theme to check
        plugin - Plugin
        Returns:
        True if the theme is valid
      • setGlobalTheme

        public static void setGlobalTheme​(java.lang.String strGlobalTheme,
                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Sets the global theme
        Parameters:
        strGlobalTheme - The Global Theme
        plugin - Plugin
      • getGlobalTheme

        public static fr.paris.lutece.portal.business.style.Theme getGlobalTheme​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the global theme
        Parameters:
        plugin - Plugin
        Returns:
        The Global Theme