public abstract class AbstractModelItem extends Object implements ModelItem
Modifier and Type | Field and Description |
---|---|
private I18nizableText |
_description |
private Set<ItemCheckerDescriptor> |
_itemCheckers |
private I18nizableText |
_label |
private Model |
_model |
private String |
_name |
private ModelItemGroup |
_parent |
ITEM_PATH_SEPARATOR
Constructor and Description |
---|
AbstractModelItem() |
Modifier and Type | Method and Description |
---|---|
void |
addItemChecker(ItemCheckerDescriptor itemChecker)
Add an item checker to the group
|
int |
compareTo(ModelItem item) |
boolean |
equals(Object obj) |
I18nizableText |
getDescription()
Retrieves the description.
|
Set<ItemCheckerDescriptor> |
getItemCheckers()
Returns the
ItemCheckerDescriptor s associated with this group. |
I18nizableText |
getLabel()
Retrieves the label.
|
Model |
getModel()
Retrieves the model of the item
|
String |
getName()
Get the name.
|
ModelItemGroup |
getParent()
Retrieves the parent of the item
|
String |
getPath()
Retrieves the path of the model item
|
int |
hashCode() |
void |
setDescription(I18nizableText description)
Set the description.
|
void |
setLabel(I18nizableText label)
Set the label.
|
void |
setModel(Model model)
Sets the model of the element
|
void |
setName(String name)
Set the name.
|
void |
setParent(ModelItemGroup parent)
Sets the parent of the item
|
Map<String,Object> |
toJSON()
Converts the model item in a JSON map
|
String |
toString() |
private I18nizableText _label
private I18nizableText _description
private Set<ItemCheckerDescriptor> _itemCheckers
private ModelItemGroup _parent
public AbstractModelItem()
public void setName(String name)
ModifiableLabelable
setName
in interface ModifiableLabelable
name
- the name.public I18nizableText getLabel()
Labelable
public void setLabel(I18nizableText label)
ModifiableLabelable
setLabel
in interface ModifiableLabelable
label
- the label.public I18nizableText getDescription()
Labelable
getDescription
in interface Labelable
public void setDescription(I18nizableText description)
ModifiableLabelable
setDescription
in interface ModifiableLabelable
description
- the description.public void addItemChecker(ItemCheckerDescriptor itemChecker)
ModelItem
addItemChecker
in interface ModelItem
itemChecker
- the item checker to addpublic Set<ItemCheckerDescriptor> getItemCheckers()
ModelItem
ItemCheckerDescriptor
s associated with this group.getItemCheckers
in interface ModelItem
ItemCheckerDescriptor
s associated with this group.public String getPath()
ModelItem
public Model getModel()
ModelItem
public void setModel(Model model)
ModelItem
public ModelItemGroup getParent()
ModelItem
public void setParent(ModelItemGroup parent)
ModelItem
public Map<String,Object> toJSON() throws ProcessingException
ModelItem
toJSON
in interface ModelItem
ProcessingException
- If an error occurs when converting the model itempublic int compareTo(ModelItem item)
compareTo
in interface Comparable<ModelItem>