Package org.ametys.runtime.model
Class ViewElement
- java.lang.Object
-
- org.ametys.runtime.model.ViewElement
-
- All Implemented Interfaces:
ModelViewItem<ElementDefinition>
,ViewItem
- Direct Known Subclasses:
CompareView.CompareViewElement
public class ViewElement extends Object implements ModelViewItem<ElementDefinition>
View reference to an element definition
-
-
Field Summary
Fields Modifier and Type Field Description private ElementDefinition
_definition
-
Constructor Summary
Constructors Constructor Description ViewElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementDefinition
getDefinition()
Retrieves the referenced model item definitionString
getName()
Retrieves the name of the view itemvoid
setDefinition(ElementDefinition definition)
Sets the referenced model item definitionMap<String,Object>
toJSON()
Converts the view item in a JSON map
-
-
-
Field Detail
-
_definition
private ElementDefinition _definition
-
-
Constructor Detail
-
ViewElement
public ViewElement()
-
-
Method Detail
-
getDefinition
public ElementDefinition getDefinition()
Description copied from interface:ModelViewItem
Retrieves the referenced model item definition- Specified by:
getDefinition
in interfaceModelViewItem<ElementDefinition>
- Returns:
- the referenced definition
-
setDefinition
public void setDefinition(ElementDefinition definition)
Description copied from interface:ModelViewItem
Sets the referenced model item definition- Specified by:
setDefinition
in interfaceModelViewItem<ElementDefinition>
- Parameters:
definition
- the referenced definition
-
getName
public String getName()
Description copied from interface:ViewItem
Retrieves the name of the view item
-
toJSON
public Map<String,Object> toJSON() throws ProcessingException
Description copied from interface:ViewItem
Converts the view item in a JSON map- Specified by:
toJSON
in interfaceViewItem
- Returns:
- The view item as a JSON map
- Throws:
ProcessingException
- If an error occurs when converting the view item
-
-