public interface AlertService extends DriverService
AlertTemplate
,
AlertSubscription
,
NotificationEvent
,
AlertServiceException
Modifier and Type | Method and Description |
---|---|
void |
addSubscription(eu.dnetlib.domain.functionality.AlertSubscription subscription)
Add a new subscription.
|
void |
addTemplate(eu.dnetlib.domain.functionality.AlertTemplate template)
Add a template.
|
void |
alert(URL notificationService,
eu.dnetlib.domain.functionality.NotificationEvent event)
Alert this service about an event generated by a notification service.
|
int |
countAlertResults(URL notificationService,
String queryId,
Date date,
String resultId)
Count the results of an alert.
|
void |
disableSubscription(String templateId,
URL notificationService,
String queryId,
String resultId,
String alertMode,
URI subscriber)
Disable a subscription.
|
void |
enableSubscription(String templateId,
URL notificationService,
String queryId,
String resultId,
String alertMode,
URI subscriber)
Enable a subscription.
|
eu.dnetlib.domain.functionality.ResultPage |
getAlertResults(URL notificationService,
String queryId,
String resultId,
Date fromDate,
Date toDate,
int limit,
int offset)
Retrieve the results of an alert.
|
eu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertSubscription> |
getSubscriptions(int pageNumber,
int pageSize)
Retrieve a page of subscriptions.
|
SortedSet<eu.dnetlib.domain.functionality.AlertSubscription> |
getSubscriptions(String alerMode,
String subscriber,
int limit,
int offset)
Retrieve some subscriptions by alert mode and subscriber.
|
SortedSet<String> |
getSupportedAlertModes()
Retrieve all the supported modes in which alerts can be sent.
|
eu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertTemplate> |
getTemplates(int pageNumber,
int pageSize)
Retrieve a page of templates.
|
void |
removeSubscription(String templateId,
URL notificationService,
String queryId,
String resultId,
String alertMode,
URI subscriber)
Remove a subscription.
|
void |
removeTemplate(String templateId)
Remove a template.
|
identify, notify
SortedSet<String> getSupportedAlertModes()
eu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertTemplate> getTemplates(int pageNumber, int pageSize) throws AlertServiceException
pageNumber
- the number of the page to retrievepageSize
- the size of the page to retrieveAlertServiceException
- if any errors occurvoid addTemplate(eu.dnetlib.domain.functionality.AlertTemplate template) throws AlertServiceException
template
- the template to addAlertServiceException
- if any errors occurvoid removeTemplate(String templateId) throws AlertServiceException
templateId
- the unique identifier of the template to removeAlertServiceException
- if any errors occureu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertSubscription> getSubscriptions(int pageNumber, int pageSize) throws AlertServiceException
pageNumber
- the number of the page to retrievepageSize
- the size of the page to retrieveAlertServiceException
- if any errors occurSortedSet<eu.dnetlib.domain.functionality.AlertSubscription> getSubscriptions(String alerMode, String subscriber, int limit, int offset) throws AlertServiceException
alertMode
- the alert mode of the subscriptions to retrievesubscriber
- the subscriber URI of the subscriptions to retrieve (prefix match)limit
- the maximum number of subscriptions to retrieveoffset
- the offset to start atAlertServiceException
- if any errors occurvoid addSubscription(eu.dnetlib.domain.functionality.AlertSubscription subscription) throws AlertServiceException
subscription
- the subscription to addAlertServiceException
- if any errors occurvoid enableSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertServiceException
templateId
- the unique identifier of the template of the subscription to enablenotificationService
- the URL of the notification service of the subscription to enablequeryId
- the unique identifier of the notification query of the subscription to enableresultId
- the unique identifier of the result of the subscription to enablealertMode
- the alert mode of the subscription to enablesubscriber
- the URI of the subscriber of the subscription to enableAlertServiceException
- if any errors occurvoid disableSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertServiceException
templateId
- the unique identifier of the template the subscription to disablenotificationService
- the URL of the notification service of the subscription to disablequeryId
- the unique identifier of the notification query of the subscription to disableresultId
- the unique identifier of the result of the subscription to disablealertMode
- the alert mode of the subscription to disablesubscriber
- the URI of the subscriber of the subscription to disableAlertServiceException
- if any errors occurvoid removeSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertServiceException
templateId
- the unique identifier of the template of the subscription to removenotificationService
- the URL of the notification service of the subscription to removequeryId
- the unique identifier of the notification query of the subscription to removeresultId
- the unique identifier of the result of the subscription to removealertMode
- the alert mode of the subscription to removesubscriber
- the URI of the subscriber of the subscription to removeAlertServiceException
- if any errors occurint countAlertResults(URL notificationService, String queryId, Date date, String resultId) throws AlertServiceException
templateId
- the unique identifier of the template of the alert results to countnotificationService
- the URL of the notification service of the alert results to countqueryId
- the unique identifier of the notification query of the alert results to countdate
- the date that corresponds to the notification event of the alert results to countresultId
- the unique identifier of the notification result of the alert results to countAlertServiceException
- if any errors occureu.dnetlib.domain.functionality.ResultPage getAlertResults(URL notificationService, String queryId, String resultId, Date fromDate, Date toDate, int limit, int offset) throws AlertServiceException
notificationService
- the URL of the notification service of the alert results to retrievequeryId
- the unique identfier of the notification query of the alert results to retrieveresultId
- the unique identifier of the notification result of the alert results to retrievefromDate
- the date from which to retrieve alert resultstoDate
- the date up to which to retrieve alert resultslimit
- the maximum number of alert results to retrieveoffset
- the offset to start atAlertServiceException
- if any errors occurvoid alert(URL notificationService, eu.dnetlib.domain.functionality.NotificationEvent event) throws AlertServiceException
notificationService
- the URL of the notification serviceevent
- the notification eventAlertServiceException
- if any errors occurCopyright © 2020. All rights reserved.