Package com.hybris.cockpitng.core.ui
Interface WidgetInstanceService
-
- All Known Implementing Classes:
DefaultWidgetInstanceService
public interface WidgetInstanceServiceService for managing widget instances.- See Also:
WidgetInstance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WidgetInstancecreateRootWidgetInstance(Widget widget)Creates new widget instance for the given root widget.WidgetInstancecreateWidgetInstance(Widget widget, WidgetInstance parent)Creates new widget instance as a child of the given parent.WidgetInstancecreateWidgetInstance(Widget widget, WidgetInstance parent, java.lang.Object creator)Creates new widget instance as a child of the given parent with assigned creator.java.util.List<WidgetInstance>getRootWidgetInstances(Widget widget)Returns a list of all widget instances of the given root widget.java.util.List<WidgetInstance>getWidgetInstances(WidgetInstance parent)Returns a list of all child widget instances of the given parent.java.util.List<WidgetInstance>getWidgetInstances(Widget widget, WidgetInstance parent)Returns a list of all instances of the given widget belonging to the given parent.voidremoveWidgetInstance(WidgetInstance instance)Removes given widget instance from the widget tree.
-
-
-
Method Detail
-
createRootWidgetInstance
WidgetInstance createRootWidgetInstance(Widget widget)
Creates new widget instance for the given root widget.- Parameters:
widget- a widget to create widget instance- Returns:
- created widget instance
-
createWidgetInstance
WidgetInstance createWidgetInstance(Widget widget, WidgetInstance parent)
Creates new widget instance as a child of the given parent.- Parameters:
widget- a widget to create widget instanceparent- parent widget instance- Returns:
- created widget instance
-
createWidgetInstance
WidgetInstance createWidgetInstance(Widget widget, WidgetInstance parent, java.lang.Object creator)
Creates new widget instance as a child of the given parent with assigned creator.- Parameters:
widget- a widget to create widget instanceparent- parent widget instancecreator- assigned creator- Returns:
- created widget instance
-
getRootWidgetInstances
java.util.List<WidgetInstance> getRootWidgetInstances(Widget widget)
Returns a list of all widget instances of the given root widget.- Parameters:
widget- a widget for which a list of widget instances should be returned- Returns:
- a list of widget instances for the given widget
-
getWidgetInstances
java.util.List<WidgetInstance> getWidgetInstances(WidgetInstance parent)
Returns a list of all child widget instances of the given parent.- Parameters:
parent- widget instance for which a list of child widget instances should be returned- Returns:
- a list of child widget instances for the given parent widget instance
-
getWidgetInstances
java.util.List<WidgetInstance> getWidgetInstances(Widget widget, WidgetInstance parent)
Returns a list of all instances of the given widget belonging to the given parent.- Parameters:
widget- a root widget which instances should be returnedparent- a parent widget instance for returned list of widget instances- Returns:
- a list of all instances of the given widget belonging to the given parent
-
removeWidgetInstance
void removeWidgetInstance(WidgetInstance instance)
Removes given widget instance from the widget tree. View model will be removed as well. All child instances will be removed as well.- Parameters:
instance- widget instance to remove
-
-