|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.outage.OutageFactory
public class OutageFactory
Encapsulates all querying functionality for outages.
| Field Summary | |
|---|---|
protected static Category |
log
|
| Method Summary | |
|---|---|
static Outage |
getOutage(int outageId)
|
static int |
getOutageCount()
Return the count of current outages. |
static int |
getOutageCount(OutageType outageType,
Filter[] filters)
Count the number of outages for a given outage type. |
static Outage[] |
getOutages()
Return all unresolved outages sorted by the default sort style, outage identifier. |
static Outage[] |
getOutages(SortStyle sortStyle)
Return all unresolved outages sorted by the given sort style. |
static Outage[] |
getOutages(SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by the given sort style. |
static Outage[] |
getOutages(SortStyle sortStyle,
OutageType outType,
Filter[] filters)
Return all outages (optionally only unresolved outages) sorted by the given sort style. |
static Outage[] |
getOutages(SortStyle sortStyle,
OutageType outType,
Filter[] filters,
int limit,
int offset)
Return all notices (optionally only unacknowledged notices) sorted by the given sort style. |
static Outage[] |
getOutagesForInterface(int nodeId,
String ipAddress)
Return all unresolved notices for the given interface. |
static Outage[] |
getOutagesForInterface(int nodeId,
String ipAddress,
boolean includeResolved)
Deprecated. Replaced by " #getOutagesForInterface(int,String,SortStyle,OutageType) getOutagesForInterface(int,String,SortStyle,OutageType)" |
static Outage[] |
getOutagesForInterface(int nodeId,
String ipAddress,
SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by given sort style for the given interface. |
static Outage[] |
getOutagesForInterface(String ipAddress)
Return all unacknowledged notices sorted by time for that have the given IP address, regardless of what node they belong to. |
static Outage[] |
getOutagesForInterface(String ipAddress,
boolean includeResolved)
Deprecated. Replaced by " #getOutagesForInterface(String,SortStyle,OutageType) getOutagesForInterface(String,SortStyle,OutageType)" |
static Outage[] |
getOutagesForInterface(String ipAddress,
SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by given sort style for the given IP address. |
static Outage[] |
getOutagesForNode(int nodeId)
Return all current outages sorted by time for the given node. |
static Outage[] |
getOutagesForNode(int nodeId,
SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by given sort style for the given node. |
static Outage[] |
getOutagesForService(int serviceId)
Return all unresolved outages sorted by time for the given service type, regardless of what node or interface they belong to. |
static Outage[] |
getOutagesForService(int serviceId,
boolean includeResolved)
Deprecated. Replaced by " #getOutagesForService(int,SortStyle,OutageType) getOutagesForInterface(int,SortStyle,OutageType)" |
static Outage[] |
getOutagesForService(int serviceId,
SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by given sort style for the given service identifier. |
static Outage[] |
getOutagesForService(int nodeId,
String ipAddress,
int serviceId)
Return all unresolved outages sorted by time for the given service. |
static Outage[] |
getOutagesForService(int nodeId,
String ipAddress,
int serviceId,
boolean includeResolved)
Deprecated. Replaced by " #getOutagesForService(int,String,int,SortStyle,OutageType) getOutagesForInterface(int,String,int,SortStyle,OutageType)" |
static Outage[] |
getOutagesForService(int nodeId,
String ipAddress,
int serviceId,
SortStyle sortStyle,
OutageType outType)
Return all outages (optionally only unresolved outages) sorted by given sort style for the given service. |
protected static Outage[] |
rs2Outages(ResultSet rs)
Convenience method for translating a java.sql.ResultSet
containing outage information into an array of Outage
objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Category log
| Method Detail |
|---|
public static int getOutageCount()
throws SQLException
Note: This method has been optimized for the simplest query.
SQLException
public static int getOutageCount(OutageType outageType,
Filter[] filters)
throws SQLException
SQLException
public static Outage getOutage(int outageId)
throws SQLException
SQLException
public static Outage[] getOutages()
throws SQLException
SQLException
public static Outage[] getOutages(SortStyle sortStyle)
throws SQLException
SQLException
public static Outage[] getOutages(SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutages(SortStyle sortStyle,
OutageType outType,
Filter[] filters)
throws SQLException
SQLException
public static Outage[] getOutages(SortStyle sortStyle,
OutageType outType,
Filter[] filters,
int limit,
int offset)
throws SQLException
Note: This limit/offset code is Postgres specific! Per Shane , this is okay for now until we can come up with an Oracle alternative too.
limit - if -1 or zero, no limit or offset is usedoffset - if -1, no limit or offset if used
SQLException
public static Outage[] getOutagesForNode(int nodeId)
throws SQLException
SQLException
public static Outage[] getOutagesForNode(int nodeId,
SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(int nodeId,
String ipAddress)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(int nodeId,
String ipAddress,
SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(int nodeId,
String ipAddress,
boolean includeResolved)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(String ipAddress)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(String ipAddress,
SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutagesForInterface(String ipAddress,
boolean includeResolved)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int nodeId,
String ipAddress,
int serviceId)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int nodeId,
String ipAddress,
int serviceId,
SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int nodeId,
String ipAddress,
int serviceId,
boolean includeResolved)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int serviceId)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int serviceId,
SortStyle sortStyle,
OutageType outType)
throws SQLException
SQLException
public static Outage[] getOutagesForService(int serviceId,
boolean includeResolved)
throws SQLException
SQLException
protected static Outage[] rs2Outages(ResultSet rs)
throws SQLException
java.sql.ResultSet
containing outage information into an array of Outage
objects.
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||