Class LinkdSelectionAware
- java.lang.Object
-
- org.opennms.features.topology.plugins.topo.linkd.internal.LinkdSelectionAware
-
- All Implemented Interfaces:
SelectionAware
public class LinkdSelectionAware extends java.lang.Object implements SelectionAware
-
-
Constructor Summary
Constructors Constructor Description LinkdSelectionAware()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contributesTo(ContentType type)
Allows theGraphProvider
to define if it contributes to a certainContentType
.protected java.util.List<java.lang.Integer>
extractNodeIds(java.util.Collection<VertexRef> vertices)
Gets the node ids from the given vertices.SelectionChangedListener.Selection
getSelection(java.util.List<VertexRef> selectedVertices, ContentType type)
Converts the providedselectedVertices
to a Selection.
-
-
-
Method Detail
-
getSelection
public SelectionChangedListener.Selection getSelection(java.util.List<VertexRef> selectedVertices, ContentType type)
Description copied from interface:SelectionAware
Converts the providedselectedVertices
to a Selection. The providedtype
represents the according browser table. This method is only invoked ifSelectionAware.contributesTo(ContentType)
returns to for the providedtype
- Specified by:
getSelection
in interfaceSelectionAware
- Parameters:
selectedVertices
- The vertices currently selected in the Topology UI.type
- The type to filter for. Represents the according browser table.- Returns:
- The selection containing the List of Restrictions. Must NOT be null.
- See Also:
SelectionChangedListener.Selection
-
contributesTo
public boolean contributesTo(ContentType type)
Description copied from interface:SelectionAware
Allows theGraphProvider
to define if it contributes to a certainContentType
. Iffalse
it is not shown in the browsers tab at all- Specified by:
contributesTo
in interfaceSelectionAware
- Parameters:
type
- The type to check ifthis
contribute to- Returns:
- true if
this
contributes to the providedtype
-
extractNodeIds
protected java.util.List<java.lang.Integer> extractNodeIds(java.util.Collection<VertexRef> vertices)
Gets the node ids from the given vertices. A node id can only be extracted from a vertex with a "nodes"' namespace. For a vertex with namespace "node" the "getId()" method always returns the node id.- Parameters:
vertices
-- Returns:
-
-