com.atlassian.confluence.mail.notification.listeners
Class AbstractNotificationsListener

java.lang.Object
  extended by com.atlassian.confluence.mail.notification.listeners.AbstractNotificationsListener
All Implemented Interfaces:
com.atlassian.event.EventListener
Direct Known Subclasses:
AttachmentNotificationsListener, BlogPostNotificationsListener, CommentNotificationsListener, FollowNotificationListener, PageNotificationsListener, SpaceNotificationsListener, UserSignUpNotificationsListener, UserStatusNotificationsListener

public abstract class AbstractNotificationsListener
extends Object
implements com.atlassian.event.EventListener


Field Summary
protected  DataSourceFactory dataSourceFactory
           
protected  NotificationManager notificationManager
           
protected  com.atlassian.core.task.MultiQueueTaskManager taskManager
           
protected  UserAccessor userAccessor
           
protected  Renderer viewRenderer
           
 
Constructor Summary
AbstractNotificationsListener()
           
 
Method Summary
protected  void attachAvatar(NotificationData notificationData)
           
protected  com.atlassian.mail.queue.MailQueueItem createNotificationTask(com.atlassian.user.User toUser, NotificationData notificationData, String renderedSubject, Map contextMap)
           
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)
           
protected  void sendNetworkNotifications(NotificationData notificationData)
           
protected  void sendNotification(Notification notification, NotificationData notificationData)
          Sends content-based notifications.
protected  void sendNotification(String recipient, PerNotificationData perNotificationData, 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.
protected  void sendPageNotifications(AbstractPage page, NotificationData notificationData)
           
protected  void sendSpaceNotifications(Space space, NotificationData notificationData)
           
 void setDataSourceFactory(DataSourceFactory dataSourceFactory)
           
 void setFormatSettingsManager(FormatSettingsManager formatSettingsManager)
           
 void setHtmlDiffer(Differ differ)
           
 void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
           
 void setLocaleManager(LocaleManager localeManager)
           
 void setNotificationManager(NotificationManager notificationManager)
           
 void setPermissionManagerTarget(DefaultPermissionManager permissionManager)
           
 void setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 void setViewRenderer(Renderer renderer)
           
 void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.event.EventListener
getHandledEventClasses, handleEvent
 

Field Detail

userAccessor

protected UserAccessor userAccessor

taskManager

protected com.atlassian.core.task.MultiQueueTaskManager taskManager

notificationManager

protected NotificationManager notificationManager

viewRenderer

protected Renderer viewRenderer

dataSourceFactory

protected DataSourceFactory dataSourceFactory
Constructor Detail

AbstractNotificationsListener

public AbstractNotificationsListener()
Method Detail

sendNotification

protected final void sendNotification(Notification notification,
                                      NotificationData notificationData)
Sends content-based notifications. Generates link to stop watching a notification and adds a link to manage content notification settings

Parameters:
notification - the watch that triggered the notification being sent
notificationData - data for rendering the email

sendNotification

protected final void sendNotification(String recipient,
                                      PerNotificationData perNotificationData,
                                      NotificationData notificationData)
Sends a notification. Checks the permissions before sending.


attachAvatar

protected void attachAvatar(NotificationData notificationData)

getContentEntityObject

protected abstract ContentEntityObject getContentEntityObject(Map contextMap)
Returns the content entity used for the render context.


getConversionContext

protected ConversionContext getConversionContext(NotificationData notificationData)

createNotificationTask

protected com.atlassian.mail.queue.MailQueueItem createNotificationTask(com.atlassian.user.User toUser,
                                                                        NotificationData notificationData,
                                                                        String renderedSubject,
                                                                        Map contextMap)

sendPageNotifications

protected void sendPageNotifications(AbstractPage page,
                                     NotificationData notificationData)

sendSpaceNotifications

protected void sendSpaceNotifications(Space space,
                                      NotificationData notificationData)

sendNetworkNotifications

protected void sendNetworkNotifications(NotificationData notificationData)

sendNotifications

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.


getNotificationDataForEvent

protected final NotificationData getNotificationDataForEvent(com.atlassian.event.Event event,
                                                             ConfluenceEntityObject entity)

setPermissionManagerTarget

public void setPermissionManagerTarget(DefaultPermissionManager permissionManager)

setNotificationManager

public void setNotificationManager(NotificationManager notificationManager)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

setTaskManager

public void setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager)

setFormatSettingsManager

public void setFormatSettingsManager(FormatSettingsManager formatSettingsManager)

setWebResourceManager

public void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)

setI18NBeanFactory

public void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)

setLocaleManager

public void setLocaleManager(LocaleManager localeManager)

setViewRenderer

public void setViewRenderer(Renderer renderer)

setHtmlDiffer

public void setHtmlDiffer(Differ differ)

setDataSourceFactory

public void setDataSourceFactory(DataSourceFactory dataSourceFactory)


Copyright © 2003-2012 Atlassian. All Rights Reserved.