org.opennms.web.svclayer.support
Class DefaultSiteStatusViewService

java.lang.Object
  extended by 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
DefaultSiteStatusViewService()
           
 
Method Summary
 Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
          createAggregateStatuses
 Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView, String statusSite)
          createAggregateStatuses
 Collection<AggregateStatus> createAggregateStatusesUsingNodeId(int nodeId, String viewName)
          createAggregateStatusesUsingNodeId
 Collection<AggregateStatus> createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
          createAggregateStatusUsingAssetColumn
 AggregateStatusView 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)
          getAggregateStatus
 NodeDao getNodeDao()
          getNodeDao
 Collection<OnmsNode> getNodes(String statusViewName, String statusSite, String rowLabel)
          getNodes
 void setCategoryDao(CategoryDao dao)
          setCategoryDao
 void setNodeDao(NodeDao nodeDao)
          setNodeDao
 void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
          setSiteStatusViewConfigDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSiteStatusViewService

public DefaultSiteStatusViewService()
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 interface SiteStatusViewService
Parameters:
statusViewName - a String 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 assciated 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 interface SiteStatusViewService
Parameters:
nodeId - a int.
viewName - a String 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 interface SiteStatusViewService
Parameters:
statusView - a AggregateStatusView object.
statusSite - a String 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 - a AggregateStatusView object.
Returns:
a Collection object.

getNodeDao

public NodeDao getNodeDao()

getNodeDao

Returns:
a NodeDao object.

setNodeDao

public void setNodeDao(NodeDao nodeDao)

setNodeDao

Parameters:
nodeDao - a NodeDao object.

setCategoryDao

public void setCategoryDao(CategoryDao dao)

setCategoryDao

Parameters:
dao - a CategoryDao object.

setSiteStatusViewConfigDao

public void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)

setSiteStatusViewConfigDao

Parameters:
dao - a SiteStatusViewConfigDao object.

createAggregateStatuses

public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)

createAggregateStatuses

Specified by:
createAggregateStatuses in interface SiteStatusViewService
Parameters:
statusView - a AggregateStatusView object.
Returns:
a Collection object.

getAggregateStatus

public AggregateStatus getAggregateStatus(String statusViewName,
                                          String statusSite,
                                          String rowLabel)

getAggregateStatus

Specified by:
getAggregateStatus in interface SiteStatusViewService
Parameters:
statusViewName - a String object.
statusSite - a String object.
rowLabel - a String object.
Returns:
a AggregateStatus object.

getNodes

public Collection<OnmsNode> getNodes(String statusViewName,
                                     String statusSite,
                                     String rowLabel)

getNodes

Specified by:
getNodes in interface SiteStatusViewService
Parameters:
statusViewName - a String object.
statusSite - a String object.
rowLabel - a String object.
Returns:
a Collection object.


Copyright © 2011. All Rights Reserved.