T
- Type of the element valuepublic class ElementDefinition<T> extends AbstractModelItem
Modifier and Type | Field and Description |
---|---|
private T |
_defaultValue |
private DisableConditions |
_disableConditions |
private Enumerator<T> |
_enumerator |
private boolean |
_isMultiple |
private String |
_pluginName |
private ElementType<T> |
_type |
private Validator |
_validator |
private String |
_widget |
private Map<String,I18nizableText> |
_widgetParams |
ITEM_PATH_SEPARATOR
Constructor and Description |
---|
ElementDefinition() |
Modifier and Type | Method and Description |
---|---|
private Map<String,Object> |
_disableConditionstoJSON(DisableConditions disableConditions)
Converts the definition's disable conditions in a JSON map
|
private static Map<String,String> |
_disableConditiontoJSON(DisableCondition disableCondition) |
T |
getDefaultValue()
Retrieves the default value.
|
DisableConditions |
getDisableConditions()
Retrieves the disable condition.
|
Enumerator<T> |
getEnumerator()
Retrieves the enumerator.
|
String |
getPluginName()
Retrieves the name of the plugin declaring this element.
|
ElementType<T> |
getType()
Retrieves the type.
|
Validator |
getValidator()
Retrieves the validator.
|
String |
getWidget()
Retrieves the widget to use for rendering.
|
Map<String,I18nizableText> |
getWidgetParameters()
Get the widget's parameters
|
boolean |
isMultiple()
Test if the element is multiple.
|
void |
setDefaultValue(T defaultValue)
Set the default value.
|
void |
setDisableConditions(DisableConditions disableConditions)
Sets the disable condition.
|
void |
setEnumerator(Enumerator<T> enumerator)
Set the enumerator.
|
void |
setMultiple(boolean isMultiple)
Set the element multiple status.
|
void |
setPluginName(String pluginName)
Set the name of the plugin declaring this element.
|
void |
setType(ModelItemType type)
Set the type.
|
void |
setValidator(Validator validator)
Set the validator.
|
void |
setWidget(String widget)
Set the widget.
|
void |
setWidgetParameters(Map<String,I18nizableText> params)
Set the widget's parameters
|
Map<String,Object> |
toJSON()
Converts the model item in a JSON map
|
addItemChecker, compareTo, equals, getDescription, getItemCheckers, getLabel, getModel, getName, getParent, getPath, hashCode, setDescription, setLabel, setModel, setName, setParent, toString
private String _pluginName
private ElementType<T> _type
private Map<String,I18nizableText> _widgetParams
private Enumerator<T> _enumerator
private Validator _validator
private T _defaultValue
private boolean _isMultiple
private DisableConditions _disableConditions
public ElementDefinition()
public String getPluginName()
public void setPluginName(String pluginName)
pluginName
- the plugin name.public ElementType<T> getType()
ModelItem
public void setType(ModelItemType type)
ModelItem
type
- the type.public String getWidget()
null
if none is defined.public Map<String,I18nizableText> getWidgetParameters()
public void setWidgetParameters(Map<String,I18nizableText> params)
params
- the parameters to setpublic Enumerator<T> getEnumerator()
null
if none is defined.public void setEnumerator(Enumerator<T> enumerator)
enumerator
- the enumerator.public Validator getValidator()
null
if none is defined.public void setValidator(Validator validator)
validator
- the validator.public T getDefaultValue()
null
if none is defined.public void setDefaultValue(T defaultValue)
defaultValue
- the default value.public boolean isMultiple()
true
if the metadata is multiple.public void setMultiple(boolean isMultiple)
isMultiple
- the element multiple status.public DisableConditions getDisableConditions()
null
if none is defined.public void setDisableConditions(DisableConditions disableConditions)
disableConditions
- the disable condition.public Map<String,Object> toJSON() throws ProcessingException
ModelItem
toJSON
in interface ModelItem
toJSON
in class AbstractModelItem
ProcessingException
- If an error occurs when converting the model itemprivate Map<String,Object> _disableConditionstoJSON(DisableConditions disableConditions)
disableConditions
- the disable conditions to convertprivate static Map<String,String> _disableConditiontoJSON(DisableCondition disableCondition)