Interface SurveillanceViewService
-
- All Known Implementing Classes:
DefaultSurveillanceViewService
public interface SurveillanceViewService
Interface for the surveillance view service.- Author:
- Christian Pape
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SurveillanceViewService.NodeRtc
The class for storing node RTC calculations
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SurveillanceStatus[][]
calculateCellStatus(View view)
Computes and returns the cell status used for displaying the surveillance view.List<OnmsAlarm>
getAlarmsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of OpenNMS alarm instances for a given set of row and column categories.com.google.common.util.concurrent.ListeningExecutorService
getExecutorService()
Returns the executor pool.Map<String,String>
getGraphResultsForResourceId(ResourceId resourceId)
Returns a map of graphs for a given resource id.OnmsNode
getNodeForId(int id)
Returns a node for a given id.List<SurveillanceViewService.NodeRtc>
getNodeRtcsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of RTC calculations for a given set of row and column categories.List<OnmsNode>
getNodesForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of OpenNMS node instances for a given set of row and column categories.List<OnmsNotification>
getNotificationsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories, Map<OnmsNotification,String> customSeverity)
Returns the list og OpenNMS notification instacnes for a given set of row and column categories.List<OnmsCategory>
getOnmsCategories()
Returns a list of the existing OpenNMS categories.Set<OnmsCategory>
getOnmsCategoriesFromViewCategories(Collection<Category> viewCats)
Returns a list of OpenNMS categories for a given collection of view categoriesMap<OnmsResourceType,List<OnmsResource>>
getResourceTypeMapForNodeId(int nodeId)
Returns a map of OpenNMS resource type/resource mappings for a given node id.Map<OnmsResourceType,List<OnmsResource>>
getResourceTypeMapForNodeId(String nodeId)
Returns a map of OpenNMS resource type/resource mappings for a given node id.View
selectDefaultViewForUsername(String username)
Returns the default view for a given username.
-
-
-
Method Detail
-
getOnmsCategories
List<OnmsCategory> getOnmsCategories()
Returns a list of the existing OpenNMS categories.- Returns:
- the list of categories
-
calculateCellStatus
SurveillanceStatus[][] calculateCellStatus(View view)
Computes and returns the cell status used for displaying the surveillance view.- Parameters:
view
- the view to use- Returns:
- the array of
SurveillanceStatus
instances
-
getOnmsCategoriesFromViewCategories
Set<OnmsCategory> getOnmsCategoriesFromViewCategories(Collection<Category> viewCats)
Returns a list of OpenNMS categories for a given collection of view categories- Parameters:
viewCats
- the categories to search for- Returns:
- the set of OpenNMS categories
-
getAlarmsForCategories
List<OnmsAlarm> getAlarmsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of OpenNMS alarm instances for a given set of row and column categories.- Parameters:
rowCategories
- the row categoriescolCategories
- the column categories- Returns:
- the list of alarms found
-
getNotificationsForCategories
List<OnmsNotification> getNotificationsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories, Map<OnmsNotification,String> customSeverity)
Returns the list og OpenNMS notification instacnes for a given set of row and column categories.- Parameters:
rowCategories
- the row categoriescolCategories
- the column categoriescustomSeverity
- the custom severity to be used- Returns:
- a list of notifications found
-
getNodesForCategories
List<OnmsNode> getNodesForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of OpenNMS node instances for a given set of row and column categories.- Parameters:
rowCategories
- the row categoriescolCategories
- the column categories- Returns:
- the list of nodes found
-
getNodeRtcsForCategories
List<SurveillanceViewService.NodeRtc> getNodeRtcsForCategories(Set<OnmsCategory> rowCategories, Set<OnmsCategory> colCategories)
Returns the list of RTC calculations for a given set of row and column categories.- Parameters:
rowCategories
- the row categoriescolCategories
- the column categories- Returns:
- the list of
SurveillanceViewService.NodeRtc
-
getResourceTypeMapForNodeId
Map<OnmsResourceType,List<OnmsResource>> getResourceTypeMapForNodeId(String nodeId)
Returns a map of OpenNMS resource type/resource mappings for a given node id.- Parameters:
nodeId
- the node id to search resources for- Returns:
- the mappings of resource types and resources
-
getGraphResultsForResourceId
Map<String,String> getGraphResultsForResourceId(ResourceId resourceId)
Returns a map of graphs for a given resource id.- Parameters:
resourceId
- the resource id to search graphs for- Returns:
- the map of graphs
-
getResourceTypeMapForNodeId
Map<OnmsResourceType,List<OnmsResource>> getResourceTypeMapForNodeId(int nodeId)
Returns a map of OpenNMS resource type/resource mappings for a given node id.- Parameters:
nodeId
- the node id to search resources for- Returns:
- the mappings of resource types and resources
-
selectDefaultViewForUsername
View selectDefaultViewForUsername(String username)
Returns the default view for a given username. 1. If a view which name equals the username exists it will be returned 2. If a view which name equals the user's group exists it will be returned 3. the default view defined by the default-view attribute will be returned- Parameters:
username
- the username to be used- Returns:
- the default view for this user
-
getExecutorService
com.google.common.util.concurrent.ListeningExecutorService getExecutorService()
Returns the executor pool.- Returns:
- the executor service pool
-
getNodeForId
OnmsNode getNodeForId(int id)
Returns a node for a given id.- Parameters:
id
- the node id- Returns:
- the node
-
-