Class AbstractObjectRelatedViewWidget<C extends com.vaadin.flow.component.Component>

  • Type Parameters:
    C - The visual component
    Direct Known Subclasses:
    FiberSplitterViewWidget, ObjectViewWidget, PhysicalPathViewWidget, PhysicalTreeViewWidget, RackViewWidget, SpliceBoxViewWidget

    public abstract class AbstractObjectRelatedViewWidget<C extends com.vaadin.flow.component.Component>
    extends Object
    A view widget is composed by a view (a canvas where the graphical elements are drawn) and a container to the scene that provides tools to interact with the elements on it (create connections, launch reports, actions, etc). Subclasses of AbstractObjectRelatedViewWidget are special kind of views that are always built from a business object. They work as factories as they are registered at application startup so they can be embedded dynamically in context menus or action lists, and when the user actions occurs, it builds on the fly a component that can be embedded in the page.
    Author:
    Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
    • Constructor Detail

      • AbstractObjectRelatedViewWidget

        public AbstractObjectRelatedViewWidget()
    • Method Detail

      • getName

        public abstract String getName()
        The name of the view. This might not be important for hard-coded views, but it is relevant in custom, scripted views.
        Returns:
        A short display name of the view
      • getDescription

        public abstract String getDescription()
        More details on what the view does. This might not be important for hard-coded views, but it is relevant in custom, scripted views.
        Returns:
        The view description.
      • getVersion

        public abstract String getVersion()
        The current version of the view. This might not be important for hard-coded views, but it is relevant in custom, scripted views.
        Returns:
        The version of the view.
      • getVendor

        public abstract String getVendor()
        Who wrote the view.
        Returns:
        A string with the name of the creator of the view, and preferably a way to contact it.
      • build

        public abstract C build​(BusinessObjectLight businessObject)
                         throws InventoryException
        The factory method that builds a view (a scene + container with tools).
        Parameters:
        businessObject - The object used as input to build the view.
        Returns:
        A visual component that can be embedded in dashboards and UIs.
        Throws:
        InventoryException - In case the process of building the view raises an exception while interacting with the persistence service.
      • appliesTo

        public abstract String appliesTo()
        Indicates what inventory objects can be represented graphically using the toolkit.
        Returns:
        The class of the instances.