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
Modifier and TypeClassDescriptionstatic enum
Enumeration of supported typesclass
Widget class -
Constructor Summary
ConstructorDescriptionAbstractSkinParameter
(String id, I18nizableText label, I18nizableText description) Constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Apply parameter to the skinabstract Object
getDefaultValue
(SkinModel model) Get the default valueabstract Object
getDefaultValue
(SkinModel model, String lang) Get the default valueGet the descriptiongetId()
Get the unique idgetLabel()
Get the labelgetType()
Get typevoid
setDescription
(I18nizableText description) Set the descriptionvoid
setLabel
(I18nizableText label) Set the labelTransform the parameter into a JSON objectabstract void
toSAX
(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
-