|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.notification.NoticeFactory
public class NoticeFactory
Encapsulates all querying functionality for notices
| Method Summary | |
|---|---|
static void |
acknowledge(int[] noticeIds,
String user)
Acknowledge a list of notices with the given username and the current time. |
static void |
acknowledge(int[] noticeIds,
String user,
Date time)
Acknowledge a list of notices with the given username and the given time. |
static void |
acknowledge(Notification[] notices,
String user)
Acknowledge a list of notices with the given username |
static void |
acknowledge(Notification[] notices,
String user,
Date time)
Acknowledge a list of notices with the given username and the given time. |
static boolean |
canDisplayEvent(int eventId)
This method determines the log status of an event associated with a notification |
static Notification |
getNotice(int noticeId)
Return a specific notice. |
static int |
getNoticeCount(AcknowledgeType ackType,
Filter[] filters)
Count the number of notices for a given acknowledgement type. |
static Notification[] |
getNotices()
Return all unacknowledged notices sorted by id. |
static Notification[] |
getNotices(AcknowledgeType ackType)
Return all unacknowledged or acknowledged notices sorted by id. |
static Notification[] |
getNotices(SortStyle sortStyle)
Return all unacknowledged notices sorted by the given sort style. |
static Notification[] |
getNotices(SortStyle sortStyle,
AcknowledgeType ackType)
Return all notices (optionally only unacknowledged notices) sorted by the given sort style. |
static Notification[] |
getNotices(SortStyle sortStyle,
AcknowledgeType ackType,
Filter[] filters)
Return all notices (optionally only unacknowledged notices) sorted by the given sort style. |
static Notification[] |
getNotices(SortStyle sortStyle,
AcknowledgeType ackType,
Filter[] filters,
int limit,
int offset)
Return all notices (optionally only unacknowledged notices) sorted by the given sort style. |
static Notification[] |
getNotices(SortStyle sortStyle,
boolean includeAcknowledged)
Deprecated. Replaced by " #getNotices(SortStyle,AcknowledgeType) getNotices( SortStyle, AcknowledgeType )" |
static Notification[] |
getNoticesForInterface(int nodeId,
String ipAddress)
Return all unacknowledged notices for the given interface. |
static Notification[] |
getNoticesForInterface(int nodeId,
String ipAddress,
boolean includeAcknowledged)
Return all notices (optionally only unacknowledged notices) sorted by id for the given interface. |
static Notification[] |
getNoticesForInterface(String ipAddress)
Return all unacknowledged notices sorted by time for that have the given IP address, regardless of what node they belong to. |
static Notification[] |
getNoticesForInterface(String ipAddress,
boolean includeAcknowledged)
Return all notices (optionally only unacknowledged notices) sorted by id that have the given IP address, regardless of what node they belong to. |
static Notification[] |
getNoticesForNode(int nodeId)
Return all unacknowledged notices sorted by time for the given node. |
static Notification[] |
getNoticesForNode(int nodeId,
boolean includeAcknowledged)
Deprecated. Replaced by " #getNoticesForNode(int,SortStyle,AcknowledgeType) getNoticesForNode( int, SortStyle, AcknowledgeType )" |
static Notification[] |
getNoticesForNode(int nodeId,
SortStyle sortStyle,
AcknowledgeType ackType)
Return all notices (optionally only unacknowledged notices) sorted by given sort style for the given node. |
static Notification[] |
getNoticesForService(int serviceId)
Return all unacknowledged notices sorted by time for the given service type, regardless of what node or interface they belong to. |
static Notification[] |
getNoticesForService(int serviceId,
boolean includeAcknowledged)
Return all notices (optionally only unacknowledged notices) sorted by id for the given service type, regardless of what node or interface they belong to. |
static Notification[] |
getNoticesForService(int nodeId,
String ipAddress,
int serviceId)
Return all unacknowledged notices sorted by time for the given service. |
static Notification[] |
getNoticesForService(int nodeId,
String ipAddress,
int serviceId,
boolean includeAcknowledged)
Return all notices (optionally only unacknowledged notices) sorted by time for the given service. |
protected static Notification[] |
rs2Notices(ResultSet rs)
Convenience method for translating a java.sql.ResultSet
containing notice information into an array of Notification
objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int getNoticeCount(AcknowledgeType ackType,
Filter[] filters)
throws SQLException
SQLException
public static Notification getNotice(int noticeId)
throws SQLException
SQLExceptionpublic static boolean canDisplayEvent(int eventId)
eventId - the unique id of the event from the notice
public static Notification[] getNotices()
throws SQLException
SQLException
public static Notification[] getNotices(AcknowledgeType ackType)
throws SQLException
SQLException
public static Notification[] getNotices(SortStyle sortStyle)
throws SQLException
SQLException
public static Notification[] getNotices(SortStyle sortStyle,
boolean includeAcknowledged)
throws SQLException
SQLException
public static Notification[] getNotices(SortStyle sortStyle,
AcknowledgeType ackType)
throws SQLException
SQLException
public static Notification[] getNotices(SortStyle sortStyle,
AcknowledgeType ackType,
Filter[] filters)
throws SQLException
SQLException
public static Notification[] getNotices(SortStyle sortStyle,
AcknowledgeType ackType,
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 Notification[] getNoticesForNode(int nodeId)
throws SQLException
SQLException
public static Notification[] getNoticesForNode(int nodeId,
boolean includeAcknowledged)
throws SQLException
SQLException
public static Notification[] getNoticesForNode(int nodeId,
SortStyle sortStyle,
AcknowledgeType ackType)
throws SQLException
SQLException
public static Notification[] getNoticesForInterface(int nodeId,
String ipAddress)
throws SQLException
SQLException
public static Notification[] getNoticesForInterface(int nodeId,
String ipAddress,
boolean includeAcknowledged)
throws SQLException
SQLException
public static Notification[] getNoticesForInterface(String ipAddress)
throws SQLException
SQLException
public static Notification[] getNoticesForInterface(String ipAddress,
boolean includeAcknowledged)
throws SQLException
SQLException
public static Notification[] getNoticesForService(int nodeId,
String ipAddress,
int serviceId)
throws SQLException
SQLException
public static Notification[] getNoticesForService(int nodeId,
String ipAddress,
int serviceId,
boolean includeAcknowledged)
throws SQLException
SQLException
public static Notification[] getNoticesForService(int serviceId)
throws SQLException
SQLException
public static Notification[] getNoticesForService(int serviceId,
boolean includeAcknowledged)
throws SQLException
SQLException
public static void acknowledge(Notification[] notices,
String user)
throws SQLException
SQLException
public static void acknowledge(Notification[] notices,
String user,
Date time)
throws SQLException
SQLException
public static void acknowledge(int[] noticeIds,
String user)
throws SQLException
SQLException
public static void acknowledge(int[] noticeIds,
String user,
Date time)
throws SQLException
SQLException
protected static Notification[] rs2Notices(ResultSet rs)
throws SQLException
java.sql.ResultSet
containing notice information into an array of Notification
objects.
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||