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 java.lang.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 java.util.List<java.lang.String[]>
getAllCriticalPaths()
Retrieve all the critical paths from the databasejava.util.Set<java.lang.Integer>
getAllNodesDependentOnAnyServiceOnInterface(java.lang.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.java.util.Set<java.lang.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)
java.lang.String[]
getCriticalPathData(java.lang.String criticalPathIp, java.lang.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 pathjava.net.InetAddress
getDefaultCriticalPathIp()
static PathOutageManager
getInstance()
java.lang.String[]
getLabelAndStatus(java.lang.String nodeIDStr, java.sql.Connection conn)
This method is responsible for determining the node label of a node, and the up/down status and status colorjava.util.Set<java.lang.Integer>
getNodesInPath(java.lang.String criticalPathIp, java.lang.String criticalPathServiceName)
Retrieve all the nodes in a critical path from the databasejava.lang.String
getPrettyCriticalPath(int nodeID)
Retrieve critical path by nodeid from the database
-
-
-
Method Detail
-
getInstance
public static PathOutageManager getInstance()
-
getAllCriticalPaths
public java.util.List<java.lang.String[]> getAllCriticalPaths() throws java.sql.SQLException
Retrieve all the critical paths from the database
- Specified by:
getAllCriticalPaths
in interfacePathOutageManager
- Returns:
- a
List
object. - Throws:
java.sql.SQLException
- if any.
-
getPrettyCriticalPath
public java.lang.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:
java.sql.SQLException
- if any.
-
getCriticalPath
public CriticalPath getCriticalPath(int nodeId)
- Specified by:
getCriticalPath
in interfacePathOutageManager
-
getNodesInPath
public java.util.Set<java.lang.Integer> getNodesInPath(java.lang.String criticalPathIp, java.lang.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:
java.sql.SQLException
- if any.
-
getLabelAndStatus
public java.lang.String[] getLabelAndStatus(java.lang.String nodeIDStr, java.sql.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:
java.sql.SQLException
- if any.
-
getCriticalPathData
public java.lang.String[] getCriticalPathData(java.lang.String criticalPathIp, java.lang.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:
java.sql.SQLException
- if any.
-
getAllNodesDependentOnAnyServiceOnInterface
public java.util.Set<java.lang.Integer> getAllNodesDependentOnAnyServiceOnInterface(java.lang.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 java.util.Set<java.lang.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 java.net.InetAddress getDefaultCriticalPathIp()
- Specified by:
getDefaultCriticalPathIp
in interfacePathOutageManager
-
-