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, setLabelprivate 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()
AbstractSkinParametergetType in class AbstractSkinParameterpublic void apply(File tempDir, File modelDir, Object value, String lang)
AbstractSkinParameterapply in class AbstractSkinParametertempDir - 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
AbstractSkinParametertoSAX in class AbstractSkinParametercontentHandler - The content handler to SAX intomodelName - The model nameSAXException - if an error occurred while SAXingpublic Map<String,Object> toJson(String modelName)
AbstractSkinParametertoJson in class AbstractSkinParametermodelName - The model namepublic String getDefaultValue(SkinModel model)
AbstractSkinParametergetDefaultValue in class AbstractSkinParametermodel - The modelpublic String getDefaultValue(SkinModel model, String lang)
AbstractSkinParametergetDefaultValue in class AbstractSkinParametermodel - The modellang - The language