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 |

Author:
David Hustace, DJ Gregor, Jeff Gehlbach

Constructor Summary
DefaultSiteStatusViewService()
           
 
Method Summary
 Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
           
 Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView, String statusSite)
          This creator is used when wanting to use a different value than the defined column value defined for the requested view.
 Collection<AggregateStatus> createAggregateStatusesUsingNodeId(int nodeId, String viewName)
          Use the node id to find the value assciated with column defined in the view.
 Collection<AggregateStatus> createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)
           
 AggregateStatusView createAggregateStatusView(String statusViewName)
          This creator looks up a configured status view by name and calls the creator that accepts the AggregateStatusView model object.
 AggregateStatus getAggregateStatus(String statusViewName, String statusSite, String rowLabel)
           
 NodeDao getNodeDao()
           
 Collection<OnmsNode> getNodes(String statusViewName, String statusSite, String rowLabel)
           
 void setCategoryDao(CategoryDao dao)
           
 void setNodeDao(NodeDao nodeDao)
           
 void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)
           
 
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 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
Returns:
See Also:
SiteStatusViewService.createAggregateStatusView(java.lang.String)

createAggregateStatusesUsingNodeId

public Collection<AggregateStatus> createAggregateStatusesUsingNodeId(int nodeId,
                                                                      String viewName)
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
See Also:
SiteStatusViewService.createAggregateStatusesUsingNodeId(int, java.lang.String)

createAggregateStatuses

public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView,
                                                           String statusSite)
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
See Also:
SiteStatusViewService.createAggregateStatuses(org.opennms.netmgt.model.AggregateStatusView, java.lang.String)

createAggregateStatusUsingAssetColumn

public Collection<AggregateStatus> createAggregateStatusUsingAssetColumn(AggregateStatusView statusView)

getNodeDao

public NodeDao getNodeDao()

setNodeDao

public void setNodeDao(NodeDao nodeDao)

setCategoryDao

public void setCategoryDao(CategoryDao dao)

setSiteStatusViewConfigDao

public void setSiteStatusViewConfigDao(SiteStatusViewConfigDao dao)

createAggregateStatuses

public Collection<AggregateStatus> createAggregateStatuses(AggregateStatusView statusView)
Specified by:
createAggregateStatuses in interface SiteStatusViewService

getAggregateStatus

public AggregateStatus getAggregateStatus(String statusViewName,
                                          String statusSite,
                                          String rowLabel)
Specified by:
getAggregateStatus in interface SiteStatusViewService

getNodes

public Collection<OnmsNode> getNodes(String statusViewName,
                                     String statusSite,
                                     String rowLabel)
Specified by:
getNodes in interface SiteStatusViewService


Copyright © 2009. All Rights Reserved.