Package org.ametys.runtime.model
Interface ViewItem
-
- All Superinterfaces:
Labelable
,ModifiableLabelable
- All Known Subinterfaces:
ModelViewItem<T>
,ViewItemGroup
- All Known Implementing Classes:
AbstractViewItemGroup
,CompareView.AbstractCompareViewItemGroup
,CompareView.CompareModelViewItemGroup
,CompareView.CompareSimpleViewItemGroup
,CompareView.CompareViewElement
,ModelViewItemGroup
,SimpleViewItemGroup
,TemporaryViewReference
,ViewElement
,ViewElementAccessor
public interface ViewItem extends ModifiableLabelable
Interface for view items
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
copyTo(ViewItem item)
Copy the current view item in the given one.default void
copyTo(ViewItem item, View referenceView)
Copy the current view item in the given one.ViewItem
createInstance()
Create an instance ofViewItem
boolean
equals(Object obj, boolean checkDetails)
Indicates whether some other object is "equal to" this one.Map<String,Object>
toJSON(DefinitionContext context)
Converts the view item in a JSON map-
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
-
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
-
-
-
Method Detail
-
toJSON
Map<String,Object> toJSON(DefinitionContext context) throws ProcessingException
Converts the view item in a JSON map- Parameters:
context
- the context of the definitions referenced in this view item and/or its children- Returns:
- The view item as a JSON map
- Throws:
ProcessingException
- If an error occurs when converting the view item
-
createInstance
ViewItem createInstance()
Create an instance ofViewItem
- Returns:
- the created instance
-
copyTo
default void copyTo(ViewItem item, View referenceView)
Copy the current view item in the given one. If the view item is an accessor, its view items are copied only if they are not already present in the reference view- Parameters:
item
- the copyreferenceView
- the reference view
-
copyTo
void copyTo(ViewItem item)
Copy the current view item in the given one. If the view item is an accessor, its view items are not copied- Parameters:
item
- the copy
-
equals
boolean equals(Object obj, boolean checkDetails)
Indicates whether some other object is "equal to" this one.- Parameters:
obj
- the reference object with which to compare.checkDetails
-true
to check the view item's details during comparison (label, description, ...)- Returns:
true
if this object is the same as the given obj,false
otherwise.
-
-