public interface AlertService
Alert management.| Modifier and Type | Method and Description |
|---|---|
long |
alertCount()
Returns the number of alerts maintained in persistence.
|
List<Alert> |
find(AlertFilter filter,
SortSpecification<AlertSortAttribute> sortSpec)
Get a list of all
Alert objects present
in the system, based on the criteria exposed by the supplied filter,
and sorted based on the supplied sort specification. |
Page<Alert> |
find(AlertFilter filter,
SortSpecification<AlertSortAttribute> sortSpec,
PageRequest pageRequest)
Returns a page of
Alert objects present in
the system, based on the page specification, the criteria exposed by
the supplied filter, and sorted based on the supplied sort
specification |
AlertSummary |
getAlertSummary()
Produces the
AlertSummary
representation for the Alerts currently in the system. |
AlertTopic |
getTopic(String id)
Return the registered alert topic with the given id.
|
void |
importAlerts(List<Alert> alerts)
Accepts a list of
Alert objects and adds
them to the local Alert data persistence. |
List<AlertTopic> |
listTopics(String origin)
Return the list of registered alert topics.
|
Alert |
post(Severity severity,
AlertTopic topic,
String origin,
String data)
Creates a new
Alert based on the supplied parameters. |
AlertTopic |
registerTopic(String id,
String orig,
String desc)
Register a topic string representing a classification for alerts.
|
long |
updateAlerts(boolean state,
Map<String,List<String>> sysidToUidMap)
Changes the state of the alerts to the supplied new state.
|
void |
updateState(Alert alert)
Changes the state of a given
Alert |
AlertTopic registerTopic(String id, String orig, String desc)
id - the identification for this topicorig - the origin of this topicdesc - the description of this topicIllegalArgumentException - if name is null or emptyList<AlertTopic> listTopics(String origin)
origin - the origin of the Alert TopicAlertTopic getTopic(String id)
id - the Id of the Alert Topicnull otherwiseAlert post(Severity severity, AlertTopic topic, String origin, String data)
Alert based on the supplied parameters.severity - Severity associated with this alerttopic - the topic associated with this alertorigin - Originating entity for this Alertdata - The data associated with this alertNullPointerException - if any of the parameters are nullvoid importAlerts(List<Alert> alerts)
Alert objects and adds
them to the local Alert data persistence.alerts - the list of Alert objects to importlong alertCount()
List<Alert> find(AlertFilter filter, SortSpecification<AlertSortAttribute> sortSpec)
Alert objects present
in the system, based on the criteria exposed by the supplied filter,
and sorted based on the supplied sort specification.filter - AlertFilter object
expressing the desired filtering criteria to consider for
restricting the resulting list of Alert objectssortSpec - SortSpecification
defining how the data should be sorted for return. The
SortSpecification must be typed with a
AlertSortAttribute
representation.Page<Alert> find(AlertFilter filter, SortSpecification<AlertSortAttribute> sortSpec, PageRequest pageRequest)
Alert objects present in
the system, based on the page specification, the criteria exposed by
the supplied filter, and sorted based on the supplied sort
specificationfilter - AlertFilter object
expressing the desired filtering criteria to consider for
restricting the resulting list of Alert objectssortSpec - SortSpecification
defining how the alert data should be sorted for return.The
SortSpecification must be typed with a
AlertSortAttribute
representation.pageRequest - PageRequest the
definition of the desired pagePage of Alert dataAlertSummary getAlertSummary()
AlertSummary
representation for the Alerts currently in the system.void updateState(Alert alert)
Alertalert - The alert containing the updated datalong updateAlerts(boolean state,
Map<String,List<String>> sysidToUidMap)
state - the state that the alerts should be set tosysidToUidMap - the map of alert sysid to list of alert uids,
effectively grouping the alerts by they sysid of the system that
generated the alertCopyright © 2014. All Rights Reserved.