Class Skin

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

public class Skin extends Object
A skin
  • Field Details

  • Constructor Details

    • Skin

      public Skin(String id, Path skinPath, boolean modifiable, SkinsManager skinsManager)
      Creates a skin
      Parameters:
      id - The id of the skin (e.g. the directory name)
      skinPath - The skin root path
      modifiable - Is this skin modifiable?
      skinsManager - The skins manager
  • Method Details

    • dispose

      public void dispose()
      Dispose skin component
    • isModifiable

      public boolean isModifiable()
      Is the skin modifiable?
      Returns:
      true if modifiable
    • isAbstract

      public boolean isAbstract()
      Is the skin abstract?
      Returns:
      true if abstract
    • isConfigurable

      public boolean isConfigurable()
      Is the skin modifiable?
      Returns:
      true if modifiable
    • getParents

      public List<String> getParents()
      Get the parent skins from the inheritance point of view. Consider using SkinsManager.getSkinAndParents(org.ametys.web.skin.Skin)
      Returns:
      The non null list of parents. The sooner a parent appears in the list, the stronger it is.
    • getTemplates

      public Set<String> getTemplates()
      Get the list of existing templates
      Returns:
      A set of skin names. Can be null if there is an error.
    • getTemplate

      Get a template
      Parameters:
      id - The id of the template
      Returns:
      The template or null if the template doesn't exists
    • _defaultValues

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

      public void refreshValues()
      Refresh the configuration 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
    • getRawPath

      public Path getRawPath()
      Get the skin's path. Should not be used. Use the skin:// protocol.
      Returns:
      the skin's path