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 ElementDefinitiongetDefinition()Retrieves the referenced model item definitionStringgetName()Retrieves the name of the view itemvoidsetDefinition(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:ModelViewItemRetrieves the referenced model item definition- Specified by:
getDefinitionin interfaceModelViewItem<ElementDefinition>- Returns:
- the referenced definition
-
setDefinition
public void setDefinition(ElementDefinition definition)
Description copied from interface:ModelViewItemSets the referenced model item definition- Specified by:
setDefinitionin interfaceModelViewItem<ElementDefinition>- Parameters:
definition- the referenced definition
-
getName
public String getName()
Description copied from interface:ViewItemRetrieves the name of the view item
-
toJSON
public Map<String,Object> toJSON() throws ProcessingException
Description copied from interface:ViewItemConverts the view item in a JSON map- Specified by:
toJSONin interfaceViewItem- Returns:
- The view item as a JSON map
- Throws:
ProcessingException- If an error occurs when converting the view item
-
-