Class SkinModel

java.lang.Object
org.ametys.web.skin.SkinModel

public class SkinModel extends Object
A skin Do not mistake with SkinParametersModel
  • Field Details

  • Constructor Details

    • SkinModel

      public SkinModel(String id, Path file, boolean modifiable)
      Creates a skin
      Parameters:
      id - The id of the skin (e.g. the directory name)
      file - The skin file
      modifiable - Is this model modifiable?
  • Method Details

    • _defaultValues

      protected void _defaultValues()
      The configuration default values (if configuration file does not exist or is unreadable)
    • isModifiable

      public boolean isModifiable()
      Is the model modifiable?
      Returns:
      true if modifiable
    • refreshValues

      public void refreshValues()
      Refresh the conf values
    • getDefaultColorTheme

      Get the default color theme
      Returns:
      The default color theme or null
    • getThemes

      Get color themes of this model
      Returns:
      color themes of this model
    • getTheme

      public SkinModel.Theme getTheme(String themeId)
      Get a theme of this model
      Parameters:
      themeId - the theme id
      Returns:
      the theme
    • getDefaultColors

      Get the default colors of this model
      Returns:
      The default colors of this model
    • getColors

      public List<String> getColors(String themeId)
      Get the default colors of this theme
      Parameters:
      themeId - The theme id
      Returns:
      the default colors of this theme
    • getStyleItems

      Get all style items of this model
      Returns:
      the list of items of css style
    • getStyleItems

      Get the items of this css style
      Parameters:
      styleId - The css style id
      Returns:
      the list of items of css style
    • getDefaultValues

      Get model default values
      Returns:
      The default values
    • getId

      public String getId()
      The skin id
      Returns:
      the id
    • getLabel

      The skin label
      Returns:
      The label
    • getDescription

      The skin description
      Returns:
      The description. Can not be null but can be empty
    • getSmallImage

      The small image file uri
      Returns:
      The small image file uri
    • getMediumImage

      The medium image file uri
      Returns:
      The medium image file uri
    • getLargeImage

      The large image file uri
      Returns:
      The large image file uri
    • getPath

      public Path getPath()
      Get the skin's file directory
      Returns:
      the skin's file directory