Package org.opennms.web.svclayer.support
Class DefaultSiteStatusViewService
- java.lang.Object
-
- org.opennms.web.svclayer.support.DefaultSiteStatusViewService
-
- All Implemented Interfaces:
SiteStatusViewService
public class DefaultSiteStatusViewService extends Object implements SiteStatusViewService
This service layer class creates a collection that represents the current status of devices per site (a column from the asset table such as building, floor, etc.) The status per site is broken down into rows of categories from the categories table. example: site: HQBLDB |Routers/Switches | 1 of 20 | |Servers | 0 of 200 | |Hubs/APs | 5 of 30 |- Since:
- 1.8.1
- Version:
- $Id: $
- Author:
- David Hustace, DJ Gregor, Jeff Gehlbach, David Hustace, DJ Gregor, Jeff Gehlbach, David Hustace, DJ Gregor, Jeff Gehlbach
-
-
Constructor Summary
Constructors Constructor Description DefaultSiteStatusViewService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<AggregateStatus>
createAggregateStatuses(AggregateStatusView statusView)
createAggregateStatusesCollection<AggregateStatus>
createAggregateStatuses(AggregateStatusView statusView, String statusSite)
createAggregateStatusesCollection<AggregateStatus>
createAggregateStatusesUsingNodeId(int nodeId, String viewName)
createAggregateStatusesUsingNodeIdCollection<AggregateStatus>
createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
createAggregateStatusUsingAssetColumnAggregateStatusView
createAggregateStatusView(String statusViewName)
This method returns method returns a collection of aggregated status of nodes for each device category.AggregateStatus
getAggregateStatus(String statusViewName, String statusSite, String rowLabel)
getAggregateStatusNodeDao
getNodeDao()
getNodeDaoCollection<OnmsNode>
getNodes(String statusViewName, String statusSite, String rowLabel)
getNodesvoid
setCategoryDao(CategoryDao dao)
setCategoryDaovoid
setNodeDao(NodeDao nodeDao)
setNodeDaovoid
setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
setSiteStatusViewConfigDao
-
-
-
Method Detail
-
createAggregateStatusView
public AggregateStatusView createAggregateStatusView(String statusViewName)
This method returns method returns a collection of aggregated status of nodes for each device category. In this case a column in the assets table is used as "site" for which to select devices. The devices are aggregated by the list of categories specified in categoryGrouping. This creator looks up a configured status view by name and calls the creator that accepts the AggregateStatusView model object.- Specified by:
createAggregateStatusView
in interfaceSiteStatusViewService
- Parameters:
statusViewName
- aString
object.- Returns:
- a
AggregateStatusView
object. - See Also:
SiteStatusViewService.createAggregateStatusView(java.lang.String)
-
createAggregateStatusesUsingNodeId
public Collection<AggregateStatus> createAggregateStatusesUsingNodeId(int nodeId, String viewName)
createAggregateStatusesUsingNodeId
Use the node id to find the value associated with column defined in the view. The view defines a column and column value to be used by default. This method determines the column value using the value associated with the asset record for the given nodeid.- Specified by:
createAggregateStatusesUsingNodeId
in interfaceSiteStatusViewService
- Parameters:
nodeId
- a int.viewName
- aString
object.- Returns:
- a
Collection
object. - See Also:
SiteStatusViewService.createAggregateStatusesUsingNodeId(int, java.lang.String)
-
createAggregateStatuses
public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView, String statusSite)
createAggregateStatuses
This creator is used when wanting to use a different value than the defined column value defined for the requested view.- Specified by:
createAggregateStatuses
in interfaceSiteStatusViewService
- Parameters:
statusView
- aAggregateStatusView
object.statusSite
- aString
object.- Returns:
- a
Collection
object. - See Also:
SiteStatusViewService.createAggregateStatuses(org.opennms.netmgt.model.AggregateStatusView, java.lang.String)
-
createAggregateStatusUsingAssetColumn
public Collection<AggregateStatus> createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
createAggregateStatusUsingAssetColumn
- Parameters:
statusView
- aAggregateStatusView
object.- Returns:
- a
Collection
object.
-
setNodeDao
public void setNodeDao(NodeDao nodeDao)
setNodeDao
- Parameters:
nodeDao
- aNodeDao
object.
-
setCategoryDao
public void setCategoryDao(CategoryDao dao)
setCategoryDao
- Parameters:
dao
- aCategoryDao
object.
-
setSiteStatusViewConfigDao
public void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
setSiteStatusViewConfigDao
- Parameters:
dao
- aSiteStatusViewConfigDao
object.
-
createAggregateStatuses
public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
createAggregateStatuses
- Specified by:
createAggregateStatuses
in interfaceSiteStatusViewService
- Parameters:
statusView
- aAggregateStatusView
object.- Returns:
- a
Collection
object.
-
getAggregateStatus
public AggregateStatus getAggregateStatus(String statusViewName, String statusSite, String rowLabel)
getAggregateStatus
- Specified by:
getAggregateStatus
in interfaceSiteStatusViewService
- Parameters:
statusViewName
- aString
object.statusSite
- aString
object.rowLabel
- aString
object.- Returns:
- a
AggregateStatus
object.
-
getNodes
public Collection<OnmsNode> getNodes(String statusViewName, String statusSite, String rowLabel)
getNodes
- Specified by:
getNodes
in interfaceSiteStatusViewService
- Parameters:
statusViewName
- aString
object.statusSite
- aString
object.rowLabel
- aString
object.- Returns:
- a
Collection
object.
-
-