public class I18nizableTextParameter extends AbstractSkinParameter
AbstractSkinParameter
for a i18niable textAbstractSkinParameter.SkinParameterType, AbstractSkinParameter.Widget
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
_defaultValues |
private String |
_i18nKey |
_description, _id, _label
Constructor and Description |
---|
I18nizableTextParameter(String id,
I18nizableText label,
I18nizableText description,
String i18nKey,
Map<String,String> defaultValues)
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
|
Map<String,String> |
getDefaultValues()
Get default values
|
String |
geti18nKey()
Get the i18n key
|
AbstractSkinParameter.SkinParameterType |
getType()
Get type
|
void |
setKey(String i18nKey)
Set the i18n key
|
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 Map<String,String> _defaultValues
public I18nizableTextParameter(String id, I18nizableText label, I18nizableText description, String i18nKey, Map<String,String> defaultValues)
id
- the unique idlabel
- the labeldescription
- the descriptioni18nKey
- the i18n keydefaultValues
- the default valuespublic AbstractSkinParameter.SkinParameterType getType()
AbstractSkinParameter
getType
in class AbstractSkinParameter
public String geti18nKey()
public void setKey(String i18nKey)
i18nKey
- the i18n key to setpublic 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 Map<String,String> getDefaultValues()
public 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