public interface NotificationManager extends ServerComponent, BatchComponent
The notification manager receives notifications and is in charge of storing them so that they are processed by the notification service.
Pico provides an instance of this class, and plugins just need to create notifications and pass them to this manager with
the scheduleForSending(Notification)
method.
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.Multimap<String,NotificationChannel> |
findNotificationSubscribers(NotificationDispatcher dispatcher,
String componentKey) |
com.google.common.collect.Multimap<String,NotificationChannel> |
findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher,
Integer resourceId)
Returns the list of users who subscribed to the given dispatcher, along with the notification channels (email, twitter, ...) that they choose
for this dispatcher.
|
void |
scheduleForSending(List<Notification> notifications)
Receives notifications and stores them so that they are processed by the notification service.
|
void |
scheduleForSending(Notification notification)
Receives a notification and stores it so that it is processed by the notification service.
|
void scheduleForSending(Notification notification)
notification
- the notification.void scheduleForSending(List<Notification> notifications)
notifications
- the notifications.com.google.common.collect.Multimap<String,NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, @Nullable Integer resourceId)
Returns the list of users who subscribed to the given dispatcher, along with the notification channels (email, twitter, ...) that they choose for this dispatcher.
The resource ID can be null in case of notifications that have nothing to do with a specific project (like system notifications).
dispatcher
- the dispatcher for which this list of users is requestedresourceId
- the optional resource which is concerned by this requestcom.google.common.collect.Multimap<String,NotificationChannel> findNotificationSubscribers(NotificationDispatcher dispatcher, @Nullable String componentKey)
Copyright © 2009–2015 SonarSource. All rights reserved.