|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.outage.OutageModel
public class 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 | |
|---|---|
Node[] |
filterNodesWithCurrentOutages(Node[] nodes)
|
OutageSummary[] |
getAllOutageSummaries(Date date)
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. |
int |
getCurrentOutageCount()
|
Outage[] |
getCurrentOutages()
Query the database to retrieve the current outages. |
Outage[] |
getCurrentOutagesForNode(int nodeId)
|
Collection<Integer> |
getCurrentOutagesIdsForNode(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,
String ipInterface)
|
Outage[] |
getOutagesForInterface(int nodeId,
String ipAddr,
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,
Date time)
Get all current outages and any resolved outages since the given time for the given node. |
Outage[] |
getOutagesForService(int nodeId,
String ipInterface,
int serviceId)
|
Outage[] |
getOutagesForService(int nodeId,
String ipAddr,
int serviceId,
Date time)
Get all current outages and any resolved outages since the given time for the given service. |
int |
getSuppressedOutageCount()
|
Outage[] |
getSuppressedOutages()
|
protected static Outage[] |
rs2Outages(ResultSet rs)
|
protected static Outage[] |
rs2Outages(ResultSet rs,
boolean includesRegainedTime)
|
protected static Outage[] |
rs2Outages(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 SQLException
Outageobjects, or if there are none,
an empty array.
SQLException - If there is a problem getting a database connection or making
a query.
public Outage[] getSuppressedOutages()
throws SQLException
SQLException
public int getCurrentOutageCount()
throws SQLException
SQLException
public int getSuppressedOutageCount()
throws SQLException
SQLException
public Outage[] getCurrentOutagesForNode(int nodeId)
throws SQLException
SQLException
public Collection<Integer> getCurrentOutagesIdsForNode(int nodeId)
throws SQLException
SQLException
public Node[] filterNodesWithCurrentOutages(Node[] nodes)
throws SQLException
SQLException
public Outage[] getNonCurrentOutagesForNode(int nodeId)
throws SQLException
SQLException
public Outage[] getOutagesForNode(int nodeId)
throws SQLException
SQLException
public Outage[] getOutagesForNode(int nodeId,
Date time)
throws SQLException
nodeId - this is the node to querytime - no resolved outages older than this time will be returned
time.
SQLException
public Outage[] getOutagesForInterface(int nodeId,
String ipInterface)
throws SQLException
SQLException
public Outage[] getOutagesForInterface(int nodeId,
String ipAddr,
Date time)
throws 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.
SQLException
public Outage[] getOutagesForService(int nodeId,
String ipInterface,
int serviceId)
throws SQLException
SQLException
public Outage[] getOutagesForService(int nodeId,
String ipAddr,
int serviceId,
Date time)
throws 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.
SQLException
public OutageSummary[] getCurrentOutageSummaries()
throws SQLException
SQLException
public OutageSummary[] getAllOutageSummaries(Date date)
throws SQLException
date - the starting date for the query
SQLException
public OutageSummary[] getCurrentSDSOutageSummaries()
throws SQLException
SQLException
protected static Outage[] rs2Outages(ResultSet rs)
throws SQLException
SQLException
protected static Outage[] rs2Outages(ResultSet rs,
boolean includesRegainedTime)
throws SQLException
SQLException
protected static Outage[] rs2Outages(ResultSet rs,
boolean includesRegainedTime,
boolean includesNotifications)
throws SQLException
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||