public class TextParameter extends AbstractSkinParameter
AbstractSkinParameter
for a i18niable textAbstractSkinParameter.SkinParameterType, AbstractSkinParameter.Widget
Modifier and Type | Field and Description |
---|---|
private String |
_defaultValue |
private File |
_xslFile |
_description, _id, _label
Constructor and Description |
---|
TextParameter(String id,
I18nizableText label,
I18nizableText description,
File xslFile,
String defaultValue)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private String |
_filetoString(File file) |
void |
apply(File tempDir,
File modelDir,
Object value,
String lang)
Apply parameter to the skin
|
String |
getDefaultValue(SkinModel model)
Get the default value
|
String |
getDefaultValue(SkinModel model,
String lang)
Get the default value
|
File |
getFile()
Get the CSS file path
|
AbstractSkinParameter.SkinParameterType |
getType()
Get type
|
Map<String,Object> |
toJson(String modelName)
Transform the parameter into a JSON object
|
void |
toSAX(ContentHandler contentHandler,
String modelName)
SAX the parameter
|
getDescription, getId, getLabel, setDescription, setLabel
private String _defaultValue
public TextParameter(String id, I18nizableText label, I18nizableText description, File xslFile, String defaultValue)
id
- the unique idlabel
- the labeldescription
- the descriptionxslFile
- the XSL filedefaultValue
- the default value in the default languagepublic AbstractSkinParameter.SkinParameterType getType()
AbstractSkinParameter
getType
in class AbstractSkinParameter
public void apply(File tempDir, File modelDir, Object value, String lang)
AbstractSkinParameter
apply
in class AbstractSkinParameter
tempDir
- the work directorymodelDir
- the model directoryvalue
- the valuelang
- The language. Can be null.private String _filetoString(File file)
public void toSAX(ContentHandler contentHandler, String modelName) throws SAXException
AbstractSkinParameter
toSAX
in class AbstractSkinParameter
contentHandler
- The content handler to SAX intomodelName
- The model nameSAXException
- if an error occurred while SAXingpublic Map<String,Object> toJson(String modelName)
AbstractSkinParameter
toJson
in class AbstractSkinParameter
modelName
- The model namepublic String getDefaultValue(SkinModel model)
AbstractSkinParameter
getDefaultValue
in class AbstractSkinParameter
model
- The modelpublic String getDefaultValue(SkinModel model, String lang)
AbstractSkinParameter
getDefaultValue
in class AbstractSkinParameter
model
- The modellang
- The language