org.opennms.web.pathOutage
Class PathOutageFactory

java.lang.Object
  extended by org.opennms.web.pathOutage.PathOutageFactory

public class PathOutageFactory
extends Object

The source for all path outage business objects (nodes, critical path IPs, critical path service names). Encapsulates all lookup functionality for these business objects in one place.

Since:
1.8.1
Version:
$Id: $
Author:
OpenNMS

Field Summary
static String NO_CRITICAL_PATH
          Constant NO_CRITICAL_PATH="Not Configured"
 
Constructor Summary
PathOutageFactory()
           
 
Method Summary
static List<String[]> getAllCriticalPaths()
           Retrieve all the critical paths from the database
static String getCriticalPath(int nodeID)
           Retrieve critical path by nodeid from the database
static String[] getCriticalPathData(String criticalPathIp, String criticalPathServiceName)
          This method is responsible for determining the data related to the critical path: node label, nodeId, the number of nodes dependent on this path, and the managed state of the path
static String[] getLabelAndStatus(String nodeIDStr, Connection conn)
          This method is responsible for determining the node label of a node, and the up/down status and status color
static List<String> getNodesInPath(String criticalPathIp, String criticalPathServiceName)
           Retrieve all the nodes in a critical path from the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CRITICAL_PATH

public static final String NO_CRITICAL_PATH
Constant NO_CRITICAL_PATH="Not Configured"

See Also:
Constant Field Values
Constructor Detail

PathOutageFactory

public PathOutageFactory()
Method Detail

getAllCriticalPaths

public static List<String[]> getAllCriticalPaths()
                                          throws SQLException

Retrieve all the critical paths from the database

Returns:
a List object.
Throws:
SQLException - if any.

getCriticalPath

public static String getCriticalPath(int nodeID)
                              throws SQLException

Retrieve critical path by nodeid from the database

Parameters:
nodeID - a int.
Returns:
a String object.
Throws:
SQLException - if any.

getNodesInPath

public static List<String> getNodesInPath(String criticalPathIp,
                                          String criticalPathServiceName)
                                   throws SQLException

Retrieve all the nodes in a critical path from the database

Parameters:
criticalPathIp - IP address of the critical path
criticalPathServiceName - service name for the critical path
Returns:
a List object.
Throws:
SQLException - if any.

getLabelAndStatus

public static String[] getLabelAndStatus(String nodeIDStr,
                                         Connection conn)
                                  throws SQLException
This method is responsible for determining the node label of a node, and the up/down status and status color

Parameters:
nodeIDStr - a String object.
conn - a Connection object.
Returns:
an array of String objects.
Throws:
SQLException - if any.

getCriticalPathData

public static String[] getCriticalPathData(String criticalPathIp,
                                           String criticalPathServiceName)
                                    throws SQLException
This method is responsible for determining the data related to the critical path: node label, nodeId, the number of nodes dependent on this path, and the managed state of the path

Parameters:
criticalPathIp - a String object.
criticalPathServiceName - a String object.
Returns:
an array of String objects.
Throws:
SQLException - if any.


Copyright © 2011. All Rights Reserved.