Class DefaultTopologyServiceClient
- java.lang.Object
-
- org.opennms.features.topology.app.internal.DefaultTopologyServiceClient
-
- All Implemented Interfaces:
SelectionAware
,TopologyServiceClient
public class DefaultTopologyServiceClient extends java.lang.Object implements TopologyServiceClient
-
-
Constructor Summary
Constructors Constructor Description DefaultTopologyServiceClient(TopologyService topologyService)
-
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
.BreadcrumbStrategy
getBreadcrumbStrategy()
GraphProvider
getDefaultGraphProvider()
Defaults
getDefaults()
int
getEdgeTotalCount()
Graph
getGraph(Criteria[] criteria, int semanticZoomLevel)
GraphProvider
getGraphProviderBy(java.lang.String namespace)
java.util.Collection<GraphProvider>
getGraphProviders()
TopologyProviderInfo
getInfo()
java.lang.String
getMetaTopologyId()
java.lang.String
getNamespace()
java.util.Collection<VertexRef>
getOppositeVertices(VertexRef vertexRef)
LayoutAlgorithm
getPreferredLayoutAlgorithm()
SelectionChangedListener.Selection
getSelection(java.util.List<VertexRef> selectedVertices, ContentType type)
Converts the providedselectedVertices
to a Selection.Vertex
getVertex(java.lang.String namespace, java.lang.String vertexId)
Vertex
getVertex(VertexRef target, Criteria... criteria)
int
getVertexTotalCount()
void
setMetaTopologyId(java.lang.String metaTopologyId)
void
setNamespace(java.lang.String namespace)
-
-
-
Constructor Detail
-
DefaultTopologyServiceClient
public DefaultTopologyServiceClient(TopologyService topologyService)
-
-
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
-
getVertex
public Vertex getVertex(VertexRef target, Criteria... criteria)
- Specified by:
getVertex
in interfaceTopologyServiceClient
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceTopologyServiceClient
-
getVertex
public Vertex getVertex(java.lang.String namespace, java.lang.String vertexId)
- Specified by:
getVertex
in interfaceTopologyServiceClient
-
getVertexTotalCount
public int getVertexTotalCount()
- Specified by:
getVertexTotalCount
in interfaceTopologyServiceClient
-
getEdgeTotalCount
public int getEdgeTotalCount()
- Specified by:
getEdgeTotalCount
in interfaceTopologyServiceClient
-
getInfo
public TopologyProviderInfo getInfo()
- Specified by:
getInfo
in interfaceTopologyServiceClient
-
getDefaults
public Defaults getDefaults()
- Specified by:
getDefaults
in interfaceTopologyServiceClient
-
getGraphProviders
public java.util.Collection<GraphProvider> getGraphProviders()
- Specified by:
getGraphProviders
in interfaceTopologyServiceClient
-
getOppositeVertices
public java.util.Collection<VertexRef> getOppositeVertices(VertexRef vertexRef)
- Specified by:
getOppositeVertices
in interfaceTopologyServiceClient
-
getGraphProviderBy
public GraphProvider getGraphProviderBy(java.lang.String namespace)
- Specified by:
getGraphProviderBy
in interfaceTopologyServiceClient
-
getDefaultGraphProvider
public GraphProvider getDefaultGraphProvider()
- Specified by:
getDefaultGraphProvider
in interfaceTopologyServiceClient
-
getPreferredLayoutAlgorithm
public LayoutAlgorithm getPreferredLayoutAlgorithm()
- Specified by:
getPreferredLayoutAlgorithm
in interfaceTopologyServiceClient
-
getBreadcrumbStrategy
public BreadcrumbStrategy getBreadcrumbStrategy()
- Specified by:
getBreadcrumbStrategy
in interfaceTopologyServiceClient
-
getMetaTopologyId
public java.lang.String getMetaTopologyId()
- Specified by:
getMetaTopologyId
in interfaceTopologyServiceClient
-
setMetaTopologyId
public void setMetaTopologyId(java.lang.String metaTopologyId)
- Specified by:
setMetaTopologyId
in interfaceTopologyServiceClient
-
setNamespace
public void setNamespace(java.lang.String namespace)
- Specified by:
setNamespace
in interfaceTopologyServiceClient
-
getGraph
public Graph getGraph(Criteria[] criteria, int semanticZoomLevel)
- Specified by:
getGraph
in interfaceTopologyServiceClient
-
-