|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.web.outage.OutageModel
As the nonvisual logic for the Services Down (Outage) servlet and JSPs, this class queries the database for current outages and provides utility methods for manipulating that list of outages.
Constructor Summary | |
OutageModel()
Create a new OutageModel . |
Method Summary | |
int |
getCurrentOutageCount()
|
Outage[] |
getCurrentOutages()
Query the database to retrieve the current outages. |
Outage[] |
getCurrentOutagesForNode(int nodeId)
|
OutageSummary[] |
getCurrentOutageSummaries()
Return a list of IP addresses, the number of services down on each IP address, and the longest time a service has been down for each IP address. |
OutageSummary[] |
getCurrentSDSOutageSummaries()
Return a list of IP addresses, the number of services down on each IP address, and the longest time a service has been down for each IP address. |
Outage[] |
getNonCurrentOutagesForNode(int nodeId)
|
Outage[] |
getOutagesForInterface(int nodeId,
java.lang.String ipInterface)
|
Outage[] |
getOutagesForInterface(int nodeId,
java.lang.String ipAddr,
java.util.Date time)
Get all current outages and any resolved outages since the given time for the given interface. |
Outage[] |
getOutagesForNode(int nodeId)
Get all outages for a given node. |
Outage[] |
getOutagesForNode(int nodeId,
java.util.Date time)
Get all current outages and any resolved outages since the given time for the given node. |
Outage[] |
getOutagesForService(int nodeId,
java.lang.String ipInterface,
int serviceId)
|
Outage[] |
getOutagesForService(int nodeId,
java.lang.String ipAddr,
int serviceId,
java.util.Date time)
Get all current outages and any resolved outages since the given time for the given service. |
protected static Outage[] |
rs2Outages(java.sql.ResultSet rs)
|
protected static Outage[] |
rs2Outages(java.sql.ResultSet rs,
boolean includesRegainedTime)
|
protected static Outage[] |
rs2Outages(java.sql.ResultSet rs,
boolean includesRegainedTime,
boolean includesNotifications)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutageModel()
OutageModel
.
Method Detail |
public Outage[] getCurrentOutages() throws java.sql.SQLException
Outage
objects, or if there are none,
an empty array.
java.sql.SQLException
- If there is a problem getting a database connection or making
a query.public int getCurrentOutageCount() throws java.sql.SQLException
java.sql.SQLException
public Outage[] getCurrentOutagesForNode(int nodeId) throws java.sql.SQLException
java.sql.SQLException
public Outage[] getNonCurrentOutagesForNode(int nodeId) throws java.sql.SQLException
java.sql.SQLException
public Outage[] getOutagesForNode(int nodeId) throws java.sql.SQLException
java.sql.SQLException
public Outage[] getOutagesForNode(int nodeId, java.util.Date time) throws java.sql.SQLException
nodeId
- this is the node to querytime
- no resolved outages older than this time will be returned
time
.
java.sql.SQLException
public Outage[] getOutagesForInterface(int nodeId, java.lang.String ipInterface) throws java.sql.SQLException
java.sql.SQLException
public Outage[] getOutagesForInterface(int nodeId, java.lang.String ipAddr, java.util.Date time) throws java.sql.SQLException
nodeId
- this is the node to queryipAddr
- this is the interface to querytime
- no resolved outages older than this time will be returned
time
.
java.sql.SQLException
public Outage[] getOutagesForService(int nodeId, java.lang.String ipInterface, int serviceId) throws java.sql.SQLException
java.sql.SQLException
public Outage[] getOutagesForService(int nodeId, java.lang.String ipAddr, int serviceId, java.util.Date time) throws java.sql.SQLException
nodeId
- this is the node to queryipAddr
- this is the interface to queryserviceId
- this is the service to querytime
- no resolved outages older than this time will be returned
time
.
java.sql.SQLException
public OutageSummary[] getCurrentOutageSummaries() throws java.sql.SQLException
java.sql.SQLException
public OutageSummary[] getCurrentSDSOutageSummaries() throws java.sql.SQLException
java.sql.SQLException
protected static Outage[] rs2Outages(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
protected static Outage[] rs2Outages(java.sql.ResultSet rs, boolean includesRegainedTime) throws java.sql.SQLException
java.sql.SQLException
protected static Outage[] rs2Outages(java.sql.ResultSet rs, boolean includesRegainedTime, boolean includesNotifications) throws java.sql.SQLException
java.sql.SQLException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |