Class AbstractSkinParameter
java.lang.Object
org.ametys.skinfactory.parameters.AbstractSkinParameter
- Direct Known Subclasses:
CSSParameter,I18nizableTextParameter,ImageParameter,TextParameter,VariantParameter
Class representing a parameter of a skin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of supported typesclassWidget class -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSkinParameter(String id, I18nizableText label, I18nizableText description) Constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract voidApply parameter to the skinabstract ObjectgetDefaultValue(SkinModel model) Get the default valueabstract ObjectgetDefaultValue(SkinModel model, String lang) Get the default valueGet the descriptiongetId()Get the unique idgetLabel()Get the labelgetType()Get typevoidsetDescription(I18nizableText description) Set the descriptionvoidsetLabel(I18nizableText label) Set the labelTransform the parameter into a JSON objectabstract voidtoSAX(ContentHandler contentHandler, String modelName) SAX the parameter
-
Constructor Details
-
AbstractSkinParameter
Constructor- Parameters:
id- the unique idlabel- the labeldescription- the description
-
-
Method Details
-
getId
Get the unique id- Returns:
- the unique id
-
getLabel
Get the label- Returns:
- the label
-
setLabel
Set the label- Parameters:
label- the label to set
-
getDescription
Get the description- Returns:
- the description
-
setDescription
Set the description- Parameters:
description- the description to set
-
getType
Get type- Returns:
- The type
-
apply
Apply parameter to the skin- Parameters:
tempDir- the work directorymodelDir- the model directoryvalue- the valuelang- The language. Can be null.
-
toSAX
SAX the parameter- Parameters:
contentHandler- The content handler to SAX intomodelName- The model name- Throws:
SAXException- if an error occurred while SAXing
-
toJson
Transform the parameter into a JSON object- Parameters:
modelName- The model name- Returns:
- The JSON representation of the parameter
-
getDefaultValue
Get the default value- Parameters:
model- The model- Returns:
- The default value
-
getDefaultValue
Get the default value- Parameters:
model- The modellang- The language- Returns:
- The default value
-