Class TextParameter
- java.lang.Object
-
- org.ametys.skinfactory.parameters.AbstractSkinParameter
-
- org.ametys.skinfactory.parameters.TextParameter
-
public class TextParameter extends AbstractSkinParameter
Implementation ofAbstractSkinParameter
for a i18niable text
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.skinfactory.parameters.AbstractSkinParameter
AbstractSkinParameter.SkinParameterType, AbstractSkinParameter.Widget
-
-
Constructor Summary
Constructors Constructor Description TextParameter(String id, I18nizableText label, I18nizableText description, Path xslFile, String defaultValue)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Path tempDir, Path modelDir, Object value, String lang)
Apply parameter to the skinString
getDefaultValue(SkinModel model)
Get the default valueString
getDefaultValue(SkinModel model, String lang)
Get the default valuePath
getPath()
Get the CSS file pathAbstractSkinParameter.SkinParameterType
getType()
Get typeMap<String,Object>
toJson(String modelName)
Transform the parameter into a JSON objectvoid
toSAX(ContentHandler contentHandler, String modelName)
SAX the parameter-
Methods inherited from class org.ametys.skinfactory.parameters.AbstractSkinParameter
getDescription, getId, getLabel, setDescription, setLabel
-
-
-
-
Constructor Detail
-
TextParameter
public TextParameter(String id, I18nizableText label, I18nizableText description, Path xslFile, String defaultValue)
Constructor- Parameters:
id
- the unique idlabel
- the labeldescription
- the descriptionxslFile
- the XSL filedefaultValue
- the default value in the default language
-
-
Method Detail
-
getType
public AbstractSkinParameter.SkinParameterType getType()
Description copied from class:AbstractSkinParameter
Get type- Specified by:
getType
in classAbstractSkinParameter
- Returns:
- The type
-
apply
public void apply(Path tempDir, Path modelDir, Object value, String lang)
Description copied from class:AbstractSkinParameter
Apply parameter to the skin- Specified by:
apply
in classAbstractSkinParameter
- Parameters:
tempDir
- the work directorymodelDir
- the model directoryvalue
- the valuelang
- The language. Can be null.
-
toSAX
public void toSAX(ContentHandler contentHandler, String modelName) throws SAXException
Description copied from class:AbstractSkinParameter
SAX the parameter- Specified by:
toSAX
in classAbstractSkinParameter
- Parameters:
contentHandler
- The content handler to SAX intomodelName
- The model name- Throws:
SAXException
- if an error occurred while SAXing
-
toJson
public Map<String,Object> toJson(String modelName)
Description copied from class:AbstractSkinParameter
Transform the parameter into a JSON object- Specified by:
toJson
in classAbstractSkinParameter
- Parameters:
modelName
- The model name- Returns:
- The JSON representation of the parameter
-
getDefaultValue
public String getDefaultValue(SkinModel model)
Description copied from class:AbstractSkinParameter
Get the default value- Specified by:
getDefaultValue
in classAbstractSkinParameter
- Parameters:
model
- The model- Returns:
- The default value
-
getDefaultValue
public String getDefaultValue(SkinModel model, String lang)
Description copied from class:AbstractSkinParameter
Get the default value- Specified by:
getDefaultValue
in classAbstractSkinParameter
- Parameters:
model
- The modellang
- The language- Returns:
- The default value
-
-