Package org.opennms.netmgt.dao.hibernate
Class PathOutageManagerDaoImpl
- java.lang.Object
-
- org.opennms.netmgt.dao.hibernate.PathOutageManagerDaoImpl
-
- All Implemented Interfaces:
PathOutageManager
public class PathOutageManagerDaoImpl extends Object implements PathOutageManager
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
-
Fields inherited from interface org.opennms.netmgt.dao.api.PathOutageManager
NO_CRITICAL_PATH
-
-
Constructor Summary
Constructors Constructor Description PathOutageManagerDaoImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String[]>
getAllCriticalPaths()
Retrieve all the critical paths from the databaseSet<Integer>
getAllNodesDependentOnAnyServiceOnInterface(String criticalPathip)
This method is used when you are scheduling an outage for an interface so that you can have the choice of also extending the outage to all nodes that are dependent on that interface for connectivity.Set<Integer>
getAllNodesDependentOnAnyServiceOnNode(int nodeId)
This method is used when you are scheduling an outage for an entire node so that you can have the choice of also extending the outage to all nodes that are dependent on that node for connectivity.CriticalPath
getCriticalPath(int nodeId)
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 pathInetAddress
getDefaultCriticalPathIp()
static PathOutageManager
getInstance()
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 colorSet<Integer>
getNodesInPath(String criticalPathIp, String criticalPathServiceName)
Retrieve all the nodes in a critical path from the databaseString
getPrettyCriticalPath(int nodeID)
Retrieve critical path by nodeid from the database
-
-
-
Method Detail
-
getInstance
public static PathOutageManager getInstance()
-
getAllCriticalPaths
public List<String[]> getAllCriticalPaths() throws SQLException
Retrieve all the critical paths from the database
- Specified by:
getAllCriticalPaths
in interfacePathOutageManager
- Returns:
- a
List
object. - Throws:
SQLException
- if any.
-
getPrettyCriticalPath
public String getPrettyCriticalPath(int nodeID)
Retrieve critical path by nodeid from the database
- Specified by:
getPrettyCriticalPath
in interfacePathOutageManager
- Parameters:
nodeID
- a int.- Returns:
- a
String
object. - Throws:
SQLException
- if any.
-
getCriticalPath
public CriticalPath getCriticalPath(int nodeId)
- Specified by:
getCriticalPath
in interfacePathOutageManager
-
getNodesInPath
public Set<Integer> getNodesInPath(String criticalPathIp, String criticalPathServiceName)
Retrieve all the nodes in a critical path from the database
- Specified by:
getNodesInPath
in interfacePathOutageManager
- Parameters:
criticalPathIp
- IP address of the critical pathcriticalPathServiceName
- service name for the critical path- Returns:
- a
List
object. - Throws:
SQLException
- if any.
-
getLabelAndStatus
public 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- Specified by:
getLabelAndStatus
in interfacePathOutageManager
- Parameters:
nodeIDStr
- aString
object.conn
- aConnection
object.- Returns:
- an array of
String
objects. - Throws:
SQLException
- if any.
-
getCriticalPathData
public 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- Specified by:
getCriticalPathData
in interfacePathOutageManager
- Parameters:
criticalPathIp
- aString
object.criticalPathServiceName
- aString
object.- Returns:
- an array of
String
objects. - Throws:
SQLException
- if any.
-
getAllNodesDependentOnAnyServiceOnInterface
public Set<Integer> getAllNodesDependentOnAnyServiceOnInterface(String criticalPathip)
Description copied from interface:PathOutageManager
This method is used when you are scheduling an outage for an interface so that you can have the choice of also extending the outage to all nodes that are dependent on that interface for connectivity.- Specified by:
getAllNodesDependentOnAnyServiceOnInterface
in interfacePathOutageManager
- Parameters:
criticalPathip
- IP address of the interface whose outages would affect other nodes- Returns:
- List of node IDs that would be impacted by an outage on the specified interface
-
getAllNodesDependentOnAnyServiceOnNode
public Set<Integer> getAllNodesDependentOnAnyServiceOnNode(int nodeId)
Description copied from interface:PathOutageManager
This method is used when you are scheduling an outage for an entire node so that you can have the choice of also extending the outage to all nodes that are dependent on that node for connectivity.- Specified by:
getAllNodesDependentOnAnyServiceOnNode
in interfacePathOutageManager
- Parameters:
nodeId
- ID of the node whose outages would affect other nodes- Returns:
- List of node IDs that would be impacted by an outage on the specified node
-
getDefaultCriticalPathIp
public InetAddress getDefaultCriticalPathIp()
- Specified by:
getDefaultCriticalPathIp
in interfacePathOutageManager
-
-