public class AlertWebServiceImpl extends BaseDriverWebService<eu.dnetlib.api.functionality.AlertService> implements AlertWebService
AlertWebService,
AlertService,
AlertWebServiceExceptionservice| Constructor and Description |
|---|
AlertWebServiceImpl() |
| 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 a page of 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 alertMode,
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, setService, startpublic SortedSet<String> getSupportedAlertModes()
AlertWebServicegetSupportedAlertModes in interface AlertWebServicepublic eu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertTemplate> getTemplates(int pageNumber,
int pageSize)
throws AlertWebServiceException
AlertWebServicegetTemplates in interface AlertWebServicepageNumber - the number of the page to retrievepageSize - the size of the page to retrieveAlertWebServiceException - if any errors occurpublic void addTemplate(eu.dnetlib.domain.functionality.AlertTemplate template)
throws AlertWebServiceException
AlertWebServiceaddTemplate in interface AlertWebServicetemplate - the template to addAlertWebServiceException - if any errors occurpublic void removeTemplate(String templateId) throws AlertWebServiceException
AlertWebServiceremoveTemplate in interface AlertWebServicetemplateId - the unique identifier of the template to removeAlertWebServiceException - if any errors occurpublic eu.dnetlib.domain.functionality.ObjectPage<eu.dnetlib.domain.functionality.AlertSubscription> getSubscriptions(int pageNumber,
int pageSize)
throws AlertWebServiceException
AlertWebServicegetSubscriptions in interface AlertWebServicepageNumber - the number of the page to retrievepageSize - the size of the page to retrieveAlertWebServiceException - if any errors occurpublic SortedSet<eu.dnetlib.domain.functionality.AlertSubscription> getSubscriptions(String alertMode, String subscriber, int limit, int offset) throws AlertWebServiceException
AlertWebServicegetSubscriptions in interface AlertWebServicealertMode - part of the alert mode to matchsubscriber - part of the subscriber URI to matchlimit - the maximum number of subscriptions to retrieveoffset - the offset to start atAlertWebServiceException - if any errors occurpublic void addSubscription(eu.dnetlib.domain.functionality.AlertSubscription subscription)
throws AlertWebServiceException
AlertWebServiceaddSubscription in interface AlertWebServicesubscription - the subscription to addAlertWebServiceException - if any errors occurpublic void enableSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertWebServiceException
AlertWebServiceenableSubscription in interface AlertWebServicetemplateId - 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 enableAlertWebServiceException - if any errors occurpublic void disableSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertWebServiceException
AlertWebServicedisableSubscription in interface AlertWebServicetemplateId - the unique identifier of the template of 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 disableAlertWebServiceException - if any errors occurpublic void removeSubscription(String templateId, URL notificationService, String queryId, String resultId, String alertMode, URI subscriber) throws AlertWebServiceException
AlertWebServiceremoveSubscription in interface AlertWebServicetemplateId - 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 removeAlertWebServiceException - if any errors occurpublic int countAlertResults(URL notificationService, String queryId, Date date, String resultId) throws AlertWebServiceException
AlertWebServicecountAlertResults in interface AlertWebServicenotificationService - 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 countAlertWebServiceExceptionpublic eu.dnetlib.domain.functionality.ResultPage getAlertResults(URL notificationService, String queryId, String resultId, Date fromDate, Date toDate, int limit, int offset) throws AlertWebServiceException
AlertWebServicegetAlertResults in interface AlertWebServicenotificationService - 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 atAlertWebServiceException - if any errors occurpublic void alert(URL notificationService, eu.dnetlib.domain.functionality.NotificationEvent event) throws AlertWebServiceException
AlertWebServicealert in interface AlertWebServicenotificationService - the URL of the notification serviceevent - the notification eventAlertWebServiceException - if any errors occurCopyright © 2017. All rights reserved.