public abstract class AbstractNotificationsListener<T extends com.atlassian.event.Event> extends Object implements com.atlassian.event.EventListener
Modifier and Type | Field and Description |
---|---|
protected DataSourceFactory |
dataSourceFactory |
protected NotificationManager |
notificationManager |
protected NotificationsSender |
notificationsSender |
protected com.atlassian.core.task.MultiQueueTaskManager |
taskManager |
protected UserAccessor |
userAccessor |
protected Renderer |
viewRenderer |
Constructor and Description |
---|
AbstractNotificationsListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
attachAvatar(NotificationData notificationData) |
protected abstract ContentEntityObject |
getContentEntityObject(Map contextMap)
Returns the content entity used for the render context.
|
protected ConversionContext |
getConversionContext(NotificationData notificationData) |
protected NotificationData |
getNotificationDataForEvent(com.atlassian.event.Event event,
ConfluenceEntityObject entity) |
void |
handleEvent(com.atlassian.event.Event event) |
protected abstract void |
processNotifications(T event)
Generates the notifications associated with an event.
|
protected void |
sendNotification(Notification notification,
NotificationData notificationData)
Sends content-based notifications.
|
protected void |
sendNotification(String recipient,
NotificationContext context,
NotificationData notificationData)
Sends a notification.
|
protected void |
sendNotifications(List<Notification> notifications,
NotificationData notificationData)
Sends the notificationData to each user listed in
notifications , as long as they are
permitted to see it. |
void |
setDataSourceFactory(DataSourceFactory dataSourceFactory) |
void |
setFormatSettingsManager(FormatSettingsManager formatSettingsManager)
Deprecated.
since 5.2. No longer required.
|
void |
setHtmlDiffer(Differ differ)
Deprecated.
since 5.2. No longer required.
|
void |
setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
Deprecated.
since 5.2. No longer required.
|
void |
setLocaleManager(LocaleManager localeManager)
Deprecated.
since 5.2. No longer required.
|
void |
setNotificationManager(NotificationManager notificationManager) |
void |
setNotificationRenderManager(NotificationRenderManager notificationRenderManager)
Deprecated.
since 5.2. No longer required.
|
void |
setNotificationsSender(NotificationsSender notificationsSender) |
void |
setPermissionManagerTarget(DefaultPermissionManager permissionManager)
Deprecated.
since 5.2. No longer required.
|
void |
setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager) |
void |
setUserAccessor(UserAccessor userAccessor) |
void |
setViewRenderer(Renderer renderer) |
void |
setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
Deprecated.
since 5.2. No longer required.
|
protected UserAccessor userAccessor
protected com.atlassian.core.task.MultiQueueTaskManager taskManager
protected NotificationManager notificationManager
protected Renderer viewRenderer
protected DataSourceFactory dataSourceFactory
protected NotificationsSender notificationsSender
public void handleEvent(com.atlassian.event.Event event)
handleEvent
in interface com.atlassian.event.EventListener
protected abstract void processNotifications(T event)
protected final void sendNotification(Notification notification, NotificationData notificationData)
notification
- the watch that triggered the notification being sentnotificationData
- data for rendering the emailprotected final void sendNotification(String recipient, NotificationContext context, NotificationData notificationData)
notificationData
- the data template for all emails. Should not be modified.protected void attachAvatar(NotificationData notificationData)
protected abstract ContentEntityObject getContentEntityObject(Map contextMap)
protected void sendNotifications(List<Notification> notifications, NotificationData notificationData)
notifications
, as long as they are
permitted to see it.protected final NotificationData getNotificationDataForEvent(com.atlassian.event.Event event, ConfluenceEntityObject entity)
protected ConversionContext getConversionContext(NotificationData notificationData)
public void setNotificationManager(NotificationManager notificationManager)
public void setUserAccessor(UserAccessor userAccessor)
public void setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager)
public void setViewRenderer(Renderer renderer)
public void setDataSourceFactory(DataSourceFactory dataSourceFactory)
public void setNotificationsSender(NotificationsSender notificationsSender)
@Deprecated public void setPermissionManagerTarget(DefaultPermissionManager permissionManager)
@Deprecated public void setNotificationRenderManager(NotificationRenderManager notificationRenderManager)
@Deprecated public void setFormatSettingsManager(FormatSettingsManager formatSettingsManager)
@Deprecated public void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
@Deprecated public void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
@Deprecated public void setLocaleManager(LocaleManager localeManager)
@Deprecated public void setHtmlDiffer(Differ differ)
Copyright © 2003–2016 Atlassian. All rights reserved.