Class VEProviderGraphContainer
- java.lang.Object
-
- org.opennms.features.topology.app.internal.VEProviderGraphContainer
-
- All Implemented Interfaces:
java.util.EventListener
,DisplayState
,GraphContainer
,EdgeListener
,VertexListener
,org.osgi.framework.ServiceListener
public class VEProviderGraphContainer extends java.lang.Object implements GraphContainer, VertexListener, EdgeListener, org.osgi.framework.ServiceListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VEProviderGraphContainer.ScaleProperty
-
Nested classes/interfaces inherited from interface org.opennms.features.topology.api.GraphContainer
GraphContainer.Callback, GraphContainer.ChangeListener
-
-
Constructor Summary
Constructors Constructor Description VEProviderGraphContainer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChangeListener(GraphContainer.ChangeListener listener)
void
addCriteria(Criteria criteria)
void
clearCriteria()
void
edgeSetChanged(BackendGraph graph)
void
edgeSetChanged(BackendGraph graph, java.util.Collection<? extends Edge> added, java.util.Collection<? extends Edge> updated, java.util.Collection<java.lang.String> removedEdgeIds)
<T extends Criteria>
java.util.Set<T>findCriteria(java.lang.Class<T> criteriaType)
Allows queriing theGraphContainer
for specific types of criteria.<T extends Criteria>
TfindSingleCriteria(java.lang.Class<T> criteriaType)
Does the same asGraphContainer.findCriteria(Class)
, but only returns one Criteria.void
fireGraphChanged()
VaadinApplicationContext
getApplicationContext()
AutoRefreshSupport
getAutoRefreshSupport()
Criteria[]
getCriteria()
Graph
getGraph()
IconManager
getIconManager()
LayoutAlgorithm
getLayoutAlgorithm()
MapViewManager
getMapViewManager()
java.lang.String
getMetaTopologyId()
double
getScale()
com.vaadin.v7.data.Property<java.lang.Double>
getScaleProperty()
SelectionManager
getSelectionManager()
int
getSemanticZoomLevel()
static SemanticZoomLevelCriteria
getSemanticZoomLevelCriteriaForContainer(GraphContainer graphContainer)
java.lang.String
getSessionId()
TopologyServiceClient
getTopologyServiceClient()
java.util.Collection<VertexRef>
getVertexRefForest(java.util.Collection<VertexRef> vertexRefs)
boolean
hasAutoRefreshSupport()
void
redoLayout()
void
removeChangeListener(GraphContainer.ChangeListener listener)
void
removeCriteria(Criteria criteria)
void
saveLayout()
void
selectTopologyProvider(GraphProvider graphProvider, GraphContainer.Callback... callbacks)
Selects the specifiedGraphProvider
.void
serviceChanged(org.osgi.framework.ServiceEvent event)
void
setApplicationContext(VaadinApplicationContext applicationContext)
void
setAutoRefreshSupport(AutoRefreshSupport autoRefreshSupport)
void
setBundleContext(org.osgi.framework.BundleContext bundleContext)
void
setDirty(boolean isDirty)
void
setIconManager(IconManager iconManager)
void
setLayoutAlgorithm(LayoutAlgorithm layoutAlgorithm)
void
setLayoutManager(LayoutManager layoutManager)
void
setMetaTopologyId(java.lang.String metaTopologyId)
void
setScale(double scale)
void
setSelectedNamespace(java.lang.String namespace)
void
setSelectionManager(SelectionManager selectionManager)
void
setSemanticZoomLevel(int level)
void
setTopologyService(TopologyService topologyService)
void
vertexSetChanged(BackendGraph graph)
void
vertexSetChanged(BackendGraph graph, java.util.Collection<? extends Vertex> added, java.util.Collection<? extends Vertex> update, java.util.Collection<java.lang.String> removedVertexIds)
-
-
-
Method Detail
-
getSemanticZoomLevel
public int getSemanticZoomLevel()
- Specified by:
getSemanticZoomLevel
in interfaceDisplayState
-
setSemanticZoomLevel
public void setSemanticZoomLevel(int level)
- Specified by:
setSemanticZoomLevel
in interfaceDisplayState
-
getSemanticZoomLevelCriteriaForContainer
public static SemanticZoomLevelCriteria getSemanticZoomLevelCriteriaForContainer(GraphContainer graphContainer)
-
getScale
public double getScale()
- Specified by:
getScale
in interfaceDisplayState
-
getScaleProperty
public com.vaadin.v7.data.Property<java.lang.Double> getScaleProperty()
- Specified by:
getScaleProperty
in interfaceGraphContainer
-
setScale
public void setScale(double scale)
- Specified by:
setScale
in interfaceDisplayState
-
setLayoutAlgorithm
public void setLayoutAlgorithm(LayoutAlgorithm layoutAlgorithm)
- Specified by:
setLayoutAlgorithm
in interfaceDisplayState
-
getLayoutAlgorithm
public LayoutAlgorithm getLayoutAlgorithm()
- Specified by:
getLayoutAlgorithm
in interfaceDisplayState
-
redoLayout
public void redoLayout()
- Specified by:
redoLayout
in interfaceDisplayState
-
setMetaTopologyId
public void setMetaTopologyId(java.lang.String metaTopologyId)
- Specified by:
setMetaTopologyId
in interfaceGraphContainer
-
getMetaTopologyId
public java.lang.String getMetaTopologyId()
- Specified by:
getMetaTopologyId
in interfaceGraphContainer
-
getTopologyServiceClient
public TopologyServiceClient getTopologyServiceClient()
- Specified by:
getTopologyServiceClient
in interfaceGraphContainer
-
getSelectionManager
public SelectionManager getSelectionManager()
- Specified by:
getSelectionManager
in interfaceGraphContainer
-
setSelectionManager
public void setSelectionManager(SelectionManager selectionManager)
- Specified by:
setSelectionManager
in interfaceGraphContainer
-
getGraph
public Graph getGraph()
- Specified by:
getGraph
in interfaceGraphContainer
-
clearCriteria
public void clearCriteria()
- Specified by:
clearCriteria
in interfaceGraphContainer
-
getCriteria
public Criteria[] getCriteria()
- Specified by:
getCriteria
in interfaceGraphContainer
-
addCriteria
public void addCriteria(Criteria criteria)
- Specified by:
addCriteria
in interfaceGraphContainer
-
removeCriteria
public void removeCriteria(Criteria criteria)
- Specified by:
removeCriteria
in interfaceGraphContainer
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
setTopologyService
public void setTopologyService(TopologyService topologyService)
-
setLayoutManager
public void setLayoutManager(LayoutManager layoutManager)
-
fireGraphChanged
public void fireGraphChanged()
- Specified by:
fireGraphChanged
in interfaceGraphContainer
-
findCriteria
public <T extends Criteria> java.util.Set<T> findCriteria(java.lang.Class<T> criteriaType)
Description copied from interface:GraphContainer
Allows queriing theGraphContainer
for specific types of criteria.- Specified by:
findCriteria
in interfaceGraphContainer
- Type Parameters:
T
- The criteria class.- Parameters:
criteriaType
- The type to look for. May not be null.- Returns:
- All criteria assigned to this
GraphContainer
which are of the same type (or a sub type) ofcriteriaType
.
-
findSingleCriteria
public <T extends Criteria> T findSingleCriteria(java.lang.Class<T> criteriaType)
Description copied from interface:GraphContainer
Does the same asGraphContainer.findCriteria(Class)
, but only returns one Criteria. If multiple criteria for the same type are found, the first one is returned. No exception is thrown in that case.- Specified by:
findSingleCriteria
in interfaceGraphContainer
- Type Parameters:
T
- The criteria class.- Parameters:
criteriaType
- The type to look for.- Returns:
- The first found criteria, or null if none is found.
-
getIconManager
public IconManager getIconManager()
- Specified by:
getIconManager
in interfaceGraphContainer
-
setIconManager
public void setIconManager(IconManager iconManager)
- Specified by:
setIconManager
in interfaceGraphContainer
-
selectTopologyProvider
public void selectTopologyProvider(GraphProvider graphProvider, GraphContainer.Callback... callbacks)
Description copied from interface:GraphContainer
Selects the specifiedGraphProvider
.- Specified by:
selectTopologyProvider
in interfaceGraphContainer
- Parameters:
graphProvider
- the provider to select.callbacks
- callbacks to invoke after the provider has been selected (e.g. apply semantic zoom level, etc)
-
saveLayout
public void saveLayout()
- Specified by:
saveLayout
in interfaceGraphContainer
-
addChangeListener
public void addChangeListener(GraphContainer.ChangeListener listener)
- Specified by:
addChangeListener
in interfaceGraphContainer
-
removeChangeListener
public void removeChangeListener(GraphContainer.ChangeListener listener)
- Specified by:
removeChangeListener
in interfaceGraphContainer
-
getVertexRefForest
public java.util.Collection<VertexRef> getVertexRefForest(java.util.Collection<VertexRef> vertexRefs)
- Specified by:
getVertexRefForest
in interfaceGraphContainer
-
setSelectedNamespace
public void setSelectedNamespace(java.lang.String namespace)
- Specified by:
setSelectedNamespace
in interfaceGraphContainer
-
edgeSetChanged
public void edgeSetChanged(BackendGraph graph)
- Specified by:
edgeSetChanged
in interfaceEdgeListener
-
edgeSetChanged
public void edgeSetChanged(BackendGraph graph, java.util.Collection<? extends Edge> added, java.util.Collection<? extends Edge> updated, java.util.Collection<java.lang.String> removedEdgeIds)
- Specified by:
edgeSetChanged
in interfaceEdgeListener
-
vertexSetChanged
public void vertexSetChanged(BackendGraph graph)
- Specified by:
vertexSetChanged
in interfaceVertexListener
-
vertexSetChanged
public void vertexSetChanged(BackendGraph graph, java.util.Collection<? extends Vertex> added, java.util.Collection<? extends Vertex> update, java.util.Collection<java.lang.String> removedVertexIds)
- Specified by:
vertexSetChanged
in interfaceVertexListener
-
getMapViewManager
public MapViewManager getMapViewManager()
- Specified by:
getMapViewManager
in interfaceGraphContainer
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionId
in interfaceGraphContainer
-
getApplicationContext
public VaadinApplicationContext getApplicationContext()
- Specified by:
getApplicationContext
in interfaceGraphContainer
-
setApplicationContext
public void setApplicationContext(VaadinApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceGraphContainer
-
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent event)
- Specified by:
serviceChanged
in interfaceorg.osgi.framework.ServiceListener
-
getAutoRefreshSupport
public AutoRefreshSupport getAutoRefreshSupport()
- Specified by:
getAutoRefreshSupport
in interfaceGraphContainer
-
hasAutoRefreshSupport
public boolean hasAutoRefreshSupport()
- Specified by:
hasAutoRefreshSupport
in interfaceGraphContainer
-
setAutoRefreshSupport
public void setAutoRefreshSupport(AutoRefreshSupport autoRefreshSupport)
-
setDirty
public void setDirty(boolean isDirty)
- Specified by:
setDirty
in interfaceGraphContainer
-
-