Class AbstractSkinParameter

java.lang.Object
org.ametys.skinfactory.parameters.AbstractSkinParameter
Direct Known Subclasses:
CSSParameter, I18nizableTextParameter, ImageParameter, TextParameter, VariantParameter

public abstract class AbstractSkinParameter extends Object
Class representing a parameter of a skin.
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Get the unique id
      Returns:
      the unique id
    • getLabel

      Get the label
      Returns:
      the label
    • setLabel

      public void setLabel(I18nizableText label)
      Set the label
      Parameters:
      label - the label to set
    • getDescription

      Get the description
      Returns:
      the description
    • setDescription

      public void setDescription(I18nizableText description)
      Set the description
      Parameters:
      description - the description to set
    • getType

      Get type
      Returns:
      The type
    • apply

      public abstract void apply(Path tempDir, Path modelDir, Object value, String lang)
      Apply parameter to the skin
      Parameters:
      tempDir - the work directory
      modelDir - the model directory
      value - the value
      lang - The language. Can be null.
    • toSAX

      public abstract void toSAX(ContentHandler contentHandler, String modelName) throws SAXException
      SAX the parameter
      Parameters:
      contentHandler - The content handler to SAX into
      modelName - The model name
      Throws:
      SAXException - if an error occurred while SAXing
    • toJson

      public abstract Map<String,Object> toJson(String modelName)
      Transform the parameter into a JSON object
      Parameters:
      modelName - The model name
      Returns:
      The JSON representation of the parameter
    • getDefaultValue

      public abstract Object getDefaultValue(SkinModel model)
      Get the default value
      Parameters:
      model - The model
      Returns:
      The default value
    • getDefaultValue

      public abstract Object getDefaultValue(SkinModel model, String lang)
      Get the default value
      Parameters:
      model - The model
      lang - The language
      Returns:
      The default value