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 java.lang.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 java.util.Collection<AggregateStatus>
createAggregateStatuses(AggregateStatusView statusView)
createAggregateStatusesjava.util.Collection<AggregateStatus>
createAggregateStatuses(AggregateStatusView statusView, java.lang.String statusSite)
createAggregateStatusesjava.util.Collection<AggregateStatus>
createAggregateStatusesUsingNodeId(int nodeId, java.lang.String viewName)
createAggregateStatusesUsingNodeIdjava.util.Collection<AggregateStatus>
createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
createAggregateStatusUsingAssetColumnAggregateStatusView
createAggregateStatusView(java.lang.String statusViewName)
This method returns method returns a collection of aggregated status of nodes for each device category.AggregateStatus
getAggregateStatus(java.lang.String statusViewName, java.lang.String statusSite, java.lang.String rowLabel)
getAggregateStatusNodeDao
getNodeDao()
getNodeDaojava.util.Collection<OnmsNode>
getNodes(java.lang.String statusViewName, java.lang.String statusSite, java.lang.String rowLabel)
getNodesvoid
setCategoryDao(CategoryDao dao)
setCategoryDaovoid
setNodeDao(NodeDao nodeDao)
setNodeDaovoid
setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
setSiteStatusViewConfigDao
-
-
-
Method Detail
-
createAggregateStatusView
public AggregateStatusView createAggregateStatusView(java.lang.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 java.util.Collection<AggregateStatus> createAggregateStatusesUsingNodeId(int nodeId, java.lang.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 java.util.Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView, java.lang.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 java.util.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 java.util.Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
createAggregateStatuses
- Specified by:
createAggregateStatuses
in interfaceSiteStatusViewService
- Parameters:
statusView
- aAggregateStatusView
object.- Returns:
- a
Collection
object.
-
getAggregateStatus
public AggregateStatus getAggregateStatus(java.lang.String statusViewName, java.lang.String statusSite, java.lang.String rowLabel)
getAggregateStatus
- Specified by:
getAggregateStatus
in interfaceSiteStatusViewService
- Parameters:
statusViewName
- aString
object.statusSite
- aString
object.rowLabel
- aString
object.- Returns:
- a
AggregateStatus
object.
-
getNodes
public java.util.Collection<OnmsNode> getNodes(java.lang.String statusViewName, java.lang.String statusSite, java.lang.String rowLabel)
getNodes
- Specified by:
getNodes
in interfaceSiteStatusViewService
- Parameters:
statusViewName
- aString
object.statusSite
- aString
object.rowLabel
- aString
object.- Returns:
- a
Collection
object.
-
-