Package org.ametys.runtime.model
Interface ViewItemAccessor
-
- All Known Subinterfaces:
ViewItemContainer,ViewItemGroup
- All Known Implementing Classes:
AbstractViewItemGroup,CompareView,CompareView.AbstractCompareViewItemGroup,CompareView.CompareModelViewItemGroup,CompareView.CompareSimpleViewItemGroup,ModelViewItemGroup,SimpleViewItemGroup,View,ViewElementAccessor
public interface ViewItemAccessor
Interface for objects that can access to some view items
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddViewItem(ViewItem item)Add a view item in the accessordefault voidaddViewItems(List<ViewItem> items)Add view items in the accessorvoidclear()Removes all items of this accessordefault ModelViewItemgetModelViewItem(String itemName)Retrieves the model view item with the given name If there are more than one corresponding items, the first one is retrievedList<ViewItem>getViewItems()Retrieves all the view items of this accessordefault booleanhasModelViewItem(String itemName)Checks if there is a model view item with the given namedefault booleanhasModelViewItem(ModelViewItem item)Checks if the currentViewItemAccessorcontains the given model view item Consider that the accessor contains the given item if it contains an item representing the same definition AND with the same children if it is a groupvoidinsertViewItem(ViewItem item, int index)Insert a view item in the accessor at the given indexbooleanremoveViewItem(ViewItem item)Removes the given items of this accessor
-
-
-
Method Detail
-
getViewItems
List<ViewItem> getViewItems()
Retrieves all the view items of this accessor- Returns:
- the view items
-
addViewItem
void addViewItem(ViewItem item)
Add a view item in the accessor- Parameters:
item- the item to add
-
insertViewItem
void insertViewItem(ViewItem item, int index)
Insert a view item in the accessor at the given index- Parameters:
item- the item to insertindex- index at which the item has to be inserted
-
removeViewItem
boolean removeViewItem(ViewItem item)
Removes the given items of this accessor- Parameters:
item- the item to remove- Returns:
trueif this accessor contained the given item,falseotherwise
-
clear
void clear()
Removes all items of this accessor
-
addViewItems
default void addViewItems(List<ViewItem> items)
Add view items in the accessor- Parameters:
items- the items to add
-
hasModelViewItem
default boolean hasModelViewItem(ModelViewItem item)
Checks if the currentViewItemAccessorcontains the given model view item Consider that the accessor contains the given item if it contains an item representing the same definition AND with the same children if it is a group- Parameters:
item- the item- Returns:
trueif the accessor contains the given item,falseotherwise
-
hasModelViewItem
default boolean hasModelViewItem(String itemName)
Checks if there is a model view item with the given name- Parameters:
itemName- the name of the item- Returns:
trueif the accessor can acces to an item with the given name,falseotherwise
-
getModelViewItem
default ModelViewItem getModelViewItem(String itemName)
Retrieves the model view item with the given name If there are more than one corresponding items, the first one is retrieved- Parameters:
itemName- the name of the item- Returns:
- the model view item, or
nullif none was found
-
-