EventDao
implementation insteadpublic class EventFactory extends Object
Modifier and Type | Method and Description |
---|---|
static void |
acknowledge(Event[] events,
String user)
Deprecated.
Acknowledge a list of events with the given username and the current
time.
|
static void |
acknowledge(Event[] events,
String user,
Date time)
Deprecated.
Acknowledge a list of events with the given username and the given time.
|
static void |
acknowledge(Filter[] filters,
String user)
Deprecated.
Acknowledge with the given username and the current time all events that
match the given filter criteria.
|
static void |
acknowledge(Filter[] filters,
String user,
Date time)
Deprecated.
Acknowledge with the given username and the given time all events that
match the given filter criteria.
|
static void |
acknowledge(int[] eventIds,
String user)
Deprecated.
Acknowledge a list of events with the given username and the current
time.
|
static void |
acknowledge(int[] eventIds,
String user,
Date time)
Deprecated.
Acknowledge a list of events with the given username and the given time.
|
static void |
acknowledgeAll(String user)
Deprecated.
Acknowledge all unacknowledged events with the given username and the
given time.
|
static void |
acknowledgeAll(String user,
Date time)
Deprecated.
Acknowledge all unacknowledged events with the given username and the
given time.
|
protected static String |
getAcknowledgeTypeClause(AcknowledgeType ackType)
Deprecated.
Convenience method for getting the SQL ORDER BY clause related
to a given sort style.
|
static Event |
getEvent(int eventId)
Deprecated.
Return a specific event.
|
static int |
getEventCount()
Deprecated.
Count all outstanding (unacknowledged) events.
|
static int |
getEventCount(AcknowledgeType ackType,
Filter[] filters)
Deprecated.
Count the number of events for a given acknowledgement type.
|
static int[] |
getEventCountBySeverity(AcknowledgeType ackType,
Filter[] filters)
Deprecated.
Count the number of events for a given acknowledgement type.
|
static int |
getEventCountForInterface(int nodeId,
String ipAddress,
AcknowledgeType ackType,
javax.servlet.ServletContext servletContext)
Deprecated.
Return the number of events for this node ID, IP address, and the given
acknowledgment type.
|
static int |
getEventCountForInterface(String ipAddress,
AcknowledgeType ackType)
Deprecated.
Return the number of events for this IP address and the given
acknowledgment type.
|
static int |
getEventCountForNode(int nodeId,
AcknowledgeType ackType)
Deprecated.
Return the number of events for this node and the given acknowledgment
type.
|
static int |
getEventCountForService(int serviceId,
AcknowledgeType ackType,
javax.servlet.ServletContext servletContext)
Deprecated.
Return the number of events for this node ID, IP address, service ID, and
the given acknowledgement type.
|
static int |
getEventCountForService(int nodeId,
String ipAddress,
int serviceId,
AcknowledgeType ackType,
javax.servlet.ServletContext servletContext)
Deprecated.
Return the number of events for this node ID, IP address, service ID, and
the given acknowledgement type.
|
static Event[] |
getEvents()
Deprecated.
Return all unacknowledged events sorted by time.
|
static Event[] |
getEvents(AcknowledgeType ackType)
Deprecated.
Return all unacknowledged or acknowledged events sorted by time.
|
static Event[] |
getEvents(SortStyle sortStyle)
Deprecated.
Return all unacknowledged events sorted by the given sort style.
|
static Event[] |
getEvents(SortStyle sortStyle,
AcknowledgeType ackType)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by the
given sort style.
|
static Event[] |
getEvents(SortStyle sortStyle,
AcknowledgeType ackType,
Filter[] filters)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by the
given sort style.
|
static Event[] |
getEvents(SortStyle sortStyle,
AcknowledgeType ackType,
Filter[] filters,
int limit,
int offset)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by the
given sort style.
|
static Event[] |
getEvents(SortStyle sortStyle,
boolean includeAcknowledged)
Deprecated.
Replaced by
" #getEvents(SortStyle,AcknowledgeType) getEvents(SortStyle, AcknowledgeType)"
|
static Event[] |
getEventsForInterface(int nodeId,
int ifIndex,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset,
javax.servlet.ServletContext servletContext)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given node
and IP address.
|
static Event[] |
getEventsForInterface(int nodeId,
String ipAddress,
boolean includeAcknowledged,
javax.servlet.ServletContext servletContext)
Deprecated.
Replaced by
" #getEventsForInterface(int,String,SortStyle,AcknowledgeType) getEventsForInterface( int, String, SortStyle, AcknowledgeType )"
|
static Event[] |
getEventsForInterface(int nodeId,
String ipAddress,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all unacknowledged events sorted by event ID for the given
interface.
|
static Event[] |
getEventsForInterface(int nodeId,
String ipAddress,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset,
javax.servlet.ServletContext servletContext)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given node
and IP address.
|
static Event[] |
getEventsForInterface(String ipAddress)
Deprecated.
Return all unacknowledged events sorted by time for that have the given
IP address, regardless of what node they belong to.
|
static Event[] |
getEventsForInterface(String ipAddress,
boolean includeAcknowledged)
Deprecated.
Replaced by
" #getEventsForInterface(String,SortStyle,AcknowledgeType) getEventsForInterface( String, SortStyle, AcknowledgeType )"
|
static Event[] |
getEventsForInterface(String ipAddress,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given IP
address.
|
static Event[] |
getEventsForNode(int nodeId,
boolean includeAcknowledged,
javax.servlet.ServletContext servletContext)
Deprecated.
Replaced by
" #getEventsForNode(int,SortStyle,AcknowledgeType) getEventsForNode( int, SortStyle, AcknowledgeType )"
|
static Event[] |
getEventsForNode(int nodeId,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all unacknowledged events sorted by event ID for the given node.
|
static Event[] |
getEventsForNode(int nodeId,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset,
javax.servlet.ServletContext servletContext)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given node.
|
static Event[] |
getEventsForNode(int nodeId,
SortStyle sortStyle,
AcknowledgeType ackType,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by the
given sort style for the given node.
|
static Event[] |
getEventsForPoller(String poller)
Deprecated.
Return all unacknowledged events sorted by time for that have the given
distributed poller.
|
static Event[] |
getEventsForPoller(String poller,
boolean includeAcknowledged)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by time
that have the given distributed poller.
|
static Event[] |
getEventsForService(int serviceId,
boolean includeAcknowledged,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all events (optionally only unacknowledged events) sorted by time
for the given service type, regardless of what node or interface they
belong to.
|
static Event[] |
getEventsForService(int serviceId,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all unacknowledged events sorted by time for the given service
type, regardless of what node or interface they belong to.
|
static Event[] |
getEventsForService(int serviceId,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset,
javax.servlet.ServletContext servletContext)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given
service ID.
|
static Event[] |
getEventsForService(int nodeId,
String ipAddress,
int serviceId,
boolean includeAcknowledged,
javax.servlet.ServletContext servletContext)
Deprecated.
Replaced by
" #getEventsForService(int,String,int,SortStyle,AcknowledgeType,int,int) getEventsForService( int, String, int, SortStyle, AcknowledgeType, int, int )"
|
static Event[] |
getEventsForService(int nodeId,
String ipAddress,
int serviceId,
javax.servlet.ServletContext servletContext)
Deprecated.
Return all unacknowledged events sorted by time for the given service.
|
static Event[] |
getEventsForService(int nodeId,
String ipAddress,
int serviceId,
SortStyle sortStyle,
AcknowledgeType ackType,
int throttle,
int offset,
javax.servlet.ServletContext servletContext)
Deprecated.
Return some maximum number of events or less (optionally only
unacknowledged events) sorted by the given sort style for the given node,
IP address, and service ID.
|
static Event[] |
getEventsForSeverity(int severity)
Deprecated.
Return all unacknowledged events sorted by time for the given severity.
|
static Event[] |
getEventsForSeverity(int severity,
boolean includeAcknowledged)
Deprecated.
Replaced by
" #getEventsForSeverity(int,SortStyle,AcknowledgeType) getEventsForSeverity( int, SortStyle, AcknowledgeType )"
|
static Event[] |
getEventsForSeverity(int severity,
SortStyle sortStyle,
AcknowledgeType ackType)
Deprecated.
getEventsForSeverity
|
protected static String |
getOrderByClause(SortStyle sortStyle)
Deprecated.
Convenience method for getting the SQL ORDER BY clause related
to a given sort style.
|
static Map<String,String> |
getParmsForEventId(int eventId)
Deprecated.
|
protected static Event[] |
rs2Events(ResultSet rs)
Deprecated.
Convenience method for translating a
java.sql.ResultSet
containing event information into an array of Event
objects. |
static void |
unacknowledge(Event[] events)
Deprecated.
Unacknowledge a list of events.
|
static void |
unacknowledge(Filter[] filters)
Deprecated.
Unacknowledge events that match the given filter criteria.
|
static void |
unacknowledge(int[] eventIds)
Deprecated.
Unacknowledge a list of events.
|
static void |
unacknowledgeAll()
Deprecated.
Unacknowledge all acknowledged events.
|
public static int getEventCount() throws SQLException
SQLException
- if any.public static int getEventCount(AcknowledgeType ackType, Filter[] filters) throws SQLException
ackType
- a AcknowledgeType
object.filters
- an array of org$opennms$web$filter$Filter objects.SQLException
- if any.public static int[] getEventCountBySeverity(AcknowledgeType ackType, Filter[] filters) throws SQLException
ackType
- a AcknowledgeType
object.filters
- an array of org$opennms$web$filter$Filter objects.SQLException
- if any.public static Event getEvent(int eventId) throws SQLException
eventId
- a int.Event
object.SQLException
- if any.public static Map<String,String> getParmsForEventId(int eventId) throws SQLException
SQLException
public static Event[] getEvents() throws SQLException
Event
objects.SQLException
- if any.public static Event[] getEvents(AcknowledgeType ackType) throws SQLException
ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEvents(SortStyle sortStyle) throws SQLException
sortStyle
- a SortStyle
object.Event
objects.SQLException
- if any.public static Event[] getEvents(SortStyle sortStyle, boolean includeAcknowledged) throws SQLException
sortStyle
- a SortStyle
object.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEvents(SortStyle sortStyle, AcknowledgeType ackType) throws SQLException
sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEvents(SortStyle sortStyle, AcknowledgeType ackType, Filter[] filters) throws SQLException
sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.filters
- an array of org$opennms$web$filter$Filter objects.Event
objects.SQLException
- if any.public static Event[] getEvents(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 usedsortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.filters
- an array of org$opennms$web$filter$Filter objects.Event
objects.SQLException
- if any.public static Event[] getEventsForNode(int nodeId, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.Event
objects.SQLException
- if any.public static Event[] getEventsForNode(int nodeId, boolean includeAcknowledged, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForNode(int nodeId, SortStyle sortStyle, AcknowledgeType ackType, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEventsForNode(int nodeId, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset, javax.servlet.ServletContext servletContext) throws SQLException
throttle
- a value less than one means no throttlingnodeId
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.offset
- a int.Event
objects.SQLException
- if any.public static int getEventCountForNode(int nodeId, AcknowledgeType ackType) throws SQLException
nodeId
- a int.ackType
- a AcknowledgeType
object.SQLException
- if any.public static Event[] getEventsForInterface(int nodeId, String ipAddress, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(int nodeId, String ipAddress, boolean includeAcknowledged, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(int nodeId, String ipAddress, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset, javax.servlet.ServletContext servletContext) throws SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result listnodeId
- a int.ipAddress
- a String
object.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(int nodeId, int ifIndex, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset, javax.servlet.ServletContext servletContext) throws SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result listnodeId
- a int.ifIndex
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(String ipAddress) throws SQLException
ipAddress
- a String
object.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(String ipAddress, boolean includeAcknowledged) throws SQLException
ipAddress
- a String
object.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForInterface(String ipAddress, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset) throws SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result listipAddress
- a String
object.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static int getEventCountForInterface(int nodeId, String ipAddress, AcknowledgeType ackType, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.ackType
- a AcknowledgeType
object.SQLException
- if any.public static int getEventCountForInterface(String ipAddress, AcknowledgeType ackType) throws SQLException
ipAddress
- a String
object.ackType
- a AcknowledgeType
object.SQLException
- if any.public static Event[] getEventsForService(int nodeId, String ipAddress, int serviceId, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.serviceId
- a int.Event
objects.SQLException
- if any.public static Event[] getEventsForService(int nodeId, String ipAddress, int serviceId, boolean includeAcknowledged, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.serviceId
- a int.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForService(int nodeId, String ipAddress, int serviceId, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset, javax.servlet.ServletContext servletContext) throws SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result listnodeId
- a int.ipAddress
- a String
object.serviceId
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEventsForService(int serviceId, javax.servlet.ServletContext servletContext) throws SQLException
serviceId
- a int.Event
objects.SQLException
- if any.public static Event[] getEventsForService(int serviceId, boolean includeAcknowledged, javax.servlet.ServletContext servletContext) throws SQLException
serviceId
- a int.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForService(int serviceId, SortStyle sortStyle, AcknowledgeType ackType, int throttle, int offset, javax.servlet.ServletContext servletContext) throws SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result listserviceId
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static int getEventCountForService(int nodeId, String ipAddress, int serviceId, AcknowledgeType ackType, javax.servlet.ServletContext servletContext) throws SQLException
nodeId
- a int.ipAddress
- a String
object.serviceId
- a int.ackType
- a AcknowledgeType
object.SQLException
- if any.public static int getEventCountForService(int serviceId, AcknowledgeType ackType, javax.servlet.ServletContext servletContext) throws SQLException
serviceId
- a int.ackType
- a AcknowledgeType
object.SQLException
- if any.public static Event[] getEventsForSeverity(int severity) throws SQLException
severity
- a int.Event
objects.SQLException
- if any.public static Event[] getEventsForSeverity(int severity, boolean includeAcknowledged) throws SQLException
severity
- a int.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static Event[] getEventsForSeverity(int severity, SortStyle sortStyle, AcknowledgeType ackType) throws SQLException
getEventsForSeverity
severity
- a int.sortStyle
- a SortStyle
object.ackType
- a AcknowledgeType
object.Event
objects.SQLException
- if any.public static Event[] getEventsForPoller(String poller) throws SQLException
poller
- a String
object.Event
objects.SQLException
- if any.public static Event[] getEventsForPoller(String poller, boolean includeAcknowledged) throws SQLException
poller
- a String
object.includeAcknowledged
- a boolean.Event
objects.SQLException
- if any.public static void acknowledge(Event[] events, String user) throws SQLException
events
- an array of Event
objects.user
- a String
object.SQLException
- if any.public static void acknowledge(Event[] events, String user, Date time) throws SQLException
events
- an array of Event
objects.user
- a String
object.time
- a java$util$Date object.SQLException
- if any.public static void acknowledge(int[] eventIds, String user) throws SQLException
eventIds
- an array of int.user
- a String
object.SQLException
- if any.public static void acknowledge(int[] eventIds, String user, Date time) throws SQLException
eventIds
- an array of int.user
- a String
object.time
- a java$util$Date object.SQLException
- if any.public static void acknowledge(Filter[] filters, String user) throws SQLException
filters
- an array of org$opennms$web$filter$Filter objects.user
- a String
object.SQLException
- if any.public static void acknowledge(Filter[] filters, String user, Date time) throws SQLException
filters
- an array of org$opennms$web$filter$Filter objects.user
- a String
object.time
- a java$util$Date object.SQLException
- if any.public static void acknowledgeAll(String user) throws SQLException
user
- a String
object.SQLException
- if any.public static void acknowledgeAll(String user, Date time) throws SQLException
user
- a String
object.time
- a java$util$Date object.SQLException
- if any.public static void unacknowledge(Event[] events) throws SQLException
events
- an array of Event
objects.SQLException
- if any.public static void unacknowledge(int[] eventIds) throws SQLException
eventIds
- an array of int.SQLException
- if any.public static void unacknowledge(Filter[] filters) throws SQLException
filters
- an array of org$opennms$web$filter$Filter objects.SQLException
- if any.public static void unacknowledgeAll() throws SQLException
SQLException
- if any.protected static Event[] rs2Events(ResultSet rs) throws SQLException
java.sql.ResultSet
containing event information into an array of Event
objects.rs
- a ResultSet
object.Event
objects.SQLException
- if any.protected static String getOrderByClause(SortStyle sortStyle)
protected static String getAcknowledgeTypeClause(AcknowledgeType ackType)
ackType
- the acknowledge type to map to a clauseString
object.Copyright © 2021. All rights reserved.