Class ViewWidgetRegistry
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.integration.modules.views.ViewWidgetRegistry
-
@Service public class ViewWidgetRegistry extends Object
Widgets with object-related views exposed by modules are to be registered here, so they can be embedded or added to context menus at will.- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description ViewWidgetRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AbstractObjectRelatedViewWidget>
getViewWidgets()
Returns all registered widgets.List<AbstractObjectRelatedViewWidget>
getViewWidgetsApplicableTo(String filter)
Checks what object-related widgets are associated to a given inventory class.void
registerWidget(AbstractObjectRelatedViewWidget widget)
Adds a object-related widget to the registry.
-
-
-
Method Detail
-
getViewWidgetsApplicableTo
public List<AbstractObjectRelatedViewWidget> getViewWidgetsApplicableTo(String filter)
Checks what object-related widgets are associated to a given inventory class. For example, ObjectView to any ViewableObject or RackView to Rack.- Parameters:
filter
- The class to be evaluated.- Returns:
- The actions that can be executed from an instance of the given class or superclass.
-
registerWidget
public void registerWidget(AbstractObjectRelatedViewWidget widget)
Adds a object-related widget to the registry. This method also feeds the detailed view map cache structure, which is a hash map which keys are all the possible super classes the detailed views are applicable to and the keys are the corresponding detailed views.- Parameters:
widget
- The widget to be added. Duplicated view ids are not allowed.
-
getViewWidgets
public List<AbstractObjectRelatedViewWidget> getViewWidgets()
Returns all registered widgets.- Returns:
- All registered widgets.
-
-