Class 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
    • 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 database
      java.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 path
      java.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 color
      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
      java.lang.String getPrettyCriticalPath​(int nodeID)
      Retrieve critical path by nodeid from the database
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathOutageManagerDaoImpl

        public PathOutageManagerDaoImpl()
    • Method Detail

      • 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 interface PathOutageManager
        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 interface PathOutageManager
        Parameters:
        nodeID - a int.
        Returns:
        a String object.
        Throws:
        java.sql.SQLException - if any.
      • 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 interface PathOutageManager
        Parameters:
        criticalPathIp - IP address of the critical path
        criticalPathServiceName - 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 interface PathOutageManager
        Parameters:
        nodeIDStr - a String object.
        conn - a Connection 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 interface PathOutageManager
        Parameters:
        criticalPathIp - a String object.
        criticalPathServiceName - a String 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 interface PathOutageManager
        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 interface PathOutageManager
        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