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)createAggregateStatusUsingAssetColumnAggregateStatusViewcreateAggregateStatusView(String statusViewName)This method returns method returns a collection of aggregated status of nodes for each device category.AggregateStatusgetAggregateStatus(String statusViewName, String statusSite, String rowLabel)getAggregateStatusNodeDaogetNodeDao()getNodeDaoCollection<OnmsNode>getNodes(String statusViewName, String statusSite, String rowLabel)getNodesvoidsetCategoryDao(CategoryDao dao)setCategoryDaovoidsetNodeDao(NodeDao nodeDao)setNodeDaovoidsetSiteStatusViewConfigDao(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:
createAggregateStatusViewin interfaceSiteStatusViewService- Parameters:
statusViewName- aStringobject.- Returns:
- a
AggregateStatusViewobject. - 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:
createAggregateStatusesUsingNodeIdin interfaceSiteStatusViewService- Parameters:
nodeId- a int.viewName- aStringobject.- Returns:
- a
Collectionobject. - 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:
createAggregateStatusesin interfaceSiteStatusViewService- Parameters:
statusView- aAggregateStatusViewobject.statusSite- aStringobject.- Returns:
- a
Collectionobject. - See Also:
SiteStatusViewService.createAggregateStatuses(org.opennms.netmgt.model.AggregateStatusView, java.lang.String)
-
createAggregateStatusUsingAssetColumn
public Collection<AggregateStatus> createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
createAggregateStatusUsingAssetColumn
- Parameters:
statusView- aAggregateStatusViewobject.- Returns:
- a
Collectionobject.
-
setNodeDao
public void setNodeDao(NodeDao nodeDao)
setNodeDao
- Parameters:
nodeDao- aNodeDaoobject.
-
setCategoryDao
public void setCategoryDao(CategoryDao dao)
setCategoryDao
- Parameters:
dao- aCategoryDaoobject.
-
setSiteStatusViewConfigDao
public void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
setSiteStatusViewConfigDao
- Parameters:
dao- aSiteStatusViewConfigDaoobject.
-
createAggregateStatuses
public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
createAggregateStatuses
- Specified by:
createAggregateStatusesin interfaceSiteStatusViewService- Parameters:
statusView- aAggregateStatusViewobject.- Returns:
- a
Collectionobject.
-
getAggregateStatus
public AggregateStatus getAggregateStatus(String statusViewName, String statusSite, String rowLabel)
getAggregateStatus
- Specified by:
getAggregateStatusin interfaceSiteStatusViewService- Parameters:
statusViewName- aStringobject.statusSite- aStringobject.rowLabel- aStringobject.- Returns:
- a
AggregateStatusobject.
-
getNodes
public Collection<OnmsNode> getNodes(String statusViewName, String statusSite, String rowLabel)
getNodes
- Specified by:
getNodesin interfaceSiteStatusViewService- Parameters:
statusViewName- aStringobject.statusSite- aStringobject.rowLabel- aStringobject.- Returns:
- a
Collectionobject.
-
-