org.opennms.netmgt.poller
Class DefaultQueryManager

java.lang.Object
  extended by org.opennms.netmgt.poller.DefaultQueryManager
All Implemented Interfaces:
QueryManager

public class DefaultQueryManager
extends Object
implements QueryManager

DefaultQueryManager class.

Version:
$Id: $
Author:
brozow TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
DefaultQueryManager()
           
 
Method Summary
 boolean activeServiceExists(String whichEvent, int nodeId, String ipAddr, String serviceName)
          activeServiceExists
 Timestamp convertEventTimeToTimeStamp(String time)
          convertEventTimeToTimeStamp
 List<Integer> getActiveServiceIdsForInterface(String ipaddr)
          getActiveServiceIdsForInterface
 String[] getCriticalPath(int nodeId)
          getCriticalPath
 DataSource getDataSource()
          getDataSource
 List<IfKey> getInterfacesWithService(String svcName)
          getInterfacesWithService
 int getNodeIDForInterface(String ipaddr)
          getNodeIDForInterface
 String getNodeLabel(int nodeId)
          getNodeLabel
 List<String[]> getNodeServices(int nodeId)
           
 int getServiceCountForInterface(String ipaddr)
          getServiceCountForInterface
 int getServiceID(String serviceName)
          getServiceID
 Date getServiceLostDate(int nodeId, String ipAddr, String svcName, int serviceId)
          getServiceLostDate
 void openOutage(String outageIdSQL, int nodeId, String ipAddr, String svcName, int dbId, String time)
          openOutage
 void reparentOutages(String ipAddr, int oldNodeId, int newNodeId)
          reparentOutages
 void resolveOutage(int nodeId, String ipAddr, String svcName, int dbId, String time)
          resolveOutage
 void setDataSource(DataSource dataSource)
          setDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueryManager

public DefaultQueryManager()
Method Detail

setDataSource

public void setDataSource(DataSource dataSource)

setDataSource

Specified by:
setDataSource in interface QueryManager
Parameters:
dataSource - a DataSource object.

getDataSource

public DataSource getDataSource()

getDataSource

Specified by:
getDataSource in interface QueryManager
Returns:
a DataSource object.

activeServiceExists

public boolean activeServiceExists(String whichEvent,
                                   int nodeId,
                                   String ipAddr,
                                   String serviceName)

activeServiceExists

Specified by:
activeServiceExists in interface QueryManager
Parameters:
whichEvent - a String object.
nodeId - a int.
ipAddr - a String object.
serviceName - a String object.
Returns:
a boolean.

getActiveServiceIdsForInterface

public List<Integer> getActiveServiceIdsForInterface(String ipaddr)
                                              throws SQLException

getActiveServiceIdsForInterface

Specified by:
getActiveServiceIdsForInterface in interface QueryManager
Parameters:
ipaddr - a String object.
Returns:
a List object.
Throws:
SQLException - if any.

getNodeIDForInterface

public int getNodeIDForInterface(String ipaddr)
                          throws SQLException

getNodeIDForInterface

Specified by:
getNodeIDForInterface in interface QueryManager
Parameters:
ipaddr - a String object.
Returns:
a int.
Throws:
SQLException - if any.

getNodeLabel

public String getNodeLabel(int nodeId)
                    throws SQLException

getNodeLabel

Specified by:
getNodeLabel in interface QueryManager
Parameters:
nodeId - a int.
Returns:
a String object.
Throws:
SQLException - if any.

getServiceCountForInterface

public int getServiceCountForInterface(String ipaddr)
                                throws SQLException

getServiceCountForInterface

Specified by:
getServiceCountForInterface in interface QueryManager
Parameters:
ipaddr - a String object.
Returns:
a int.
Throws:
SQLException - if any.

getInterfacesWithService

public List<IfKey> getInterfacesWithService(String svcName)
                                     throws SQLException

getInterfacesWithService

Specified by:
getInterfacesWithService in interface QueryManager
Parameters:
svcName - a String object.
Returns:
a List object.
Throws:
SQLException - if any.

getServiceLostDate

public Date getServiceLostDate(int nodeId,
                               String ipAddr,
                               String svcName,
                               int serviceId)

getServiceLostDate

Specified by:
getServiceLostDate in interface QueryManager
Parameters:
nodeId - a int.
ipAddr - a String object.
svcName - a String object.
serviceId - a int.
Returns:
a Date object.

convertEventTimeToTimeStamp

public Timestamp convertEventTimeToTimeStamp(String time)

convertEventTimeToTimeStamp

Parameters:
time - a String object.
Returns:
a Timestamp object.

openOutage

public void openOutage(String outageIdSQL,
                       int nodeId,
                       String ipAddr,
                       String svcName,
                       int dbId,
                       String time)

openOutage

Specified by:
openOutage in interface QueryManager
Parameters:
outageIdSQL - a String object.
nodeId - a int.
ipAddr - a String object.
svcName - TODO
dbId - a int.
time - a String object.

resolveOutage

public void resolveOutage(int nodeId,
                          String ipAddr,
                          String svcName,
                          int dbId,
                          String time)

resolveOutage

Specified by:
resolveOutage in interface QueryManager
Parameters:
nodeId - a int.
ipAddr - a String object.
svcName - TODO
dbId - a int.
time - a String object.

reparentOutages

public void reparentOutages(String ipAddr,
                            int oldNodeId,
                            int newNodeId)

reparentOutages

Specified by:
reparentOutages in interface QueryManager
Parameters:
ipAddr - a String object.
oldNodeId - a int.
newNodeId - a int.

getServiceID

public int getServiceID(String serviceName)

getServiceID

Parameters:
serviceName - a String object.
Returns:
a int.

getCriticalPath

public String[] getCriticalPath(int nodeId)

getCriticalPath

Specified by:
getCriticalPath in interface QueryManager
Parameters:
nodeId - a int.
Returns:
an array of String objects.

getNodeServices

public List<String[]> getNodeServices(int nodeId)
Specified by:
getNodeServices in interface QueryManager


Copyright © 2011. All Rights Reserved.