com.atlassian.confluence.plugin.descriptor.mail
Class NotificationContext

java.lang.Object
  extended by com.atlassian.confluence.plugin.descriptor.mail.NotificationContext

public class NotificationContext
extends Object

Contains data about an email Notification that is specific to a single Email sent to a single User.

Since:
4.2

Constructor Summary
NotificationContext()
           
NotificationContext(NotificationContext context)
           
NotificationContext(NotificationContext context, Set<DataSource> dataSources)
           
 
Method Summary
 void addTemplateImage(DataSource dataSource)
          Adds a datasource to the current set of datasources for 1 instance of notification.
 Object get(String key)
           
 ConfluenceEntityObject getContent()
          Return the context's Content.
 com.atlassian.event.Event getEvent()
           
 Map<String,Object> getMap()
          Returns a map for the renderer.
 com.atlassian.user.User getRecipient()
           
 Collection<DataSource> getTemplateImageDataSources()
           
 Notification.WatchType getWatchType()
           
 boolean isManageNotificationOverridden()
           
 void put(String key, Object value)
           
 void putAll(Map<? extends String,? extends Object> map)
           
 void setContent(ConfluenceEntityObject entity)
          Sets the entity that the notification is being sent regarding.
 void setEvent(com.atlassian.event.Event event)
           
 void setI18n(I18NBean i18NBean)
           
 void setManageNotificationOverridden(boolean isOverridden)
           
 void setRecipient(com.atlassian.user.User recipient)
          Sets the recipient for a notification.
 void setSpace(Space space)
           
 void setWatchType(Notification.WatchType watchType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationContext

public NotificationContext()

NotificationContext

public NotificationContext(NotificationContext context)

NotificationContext

public NotificationContext(NotificationContext context,
                           Set<DataSource> dataSources)
Method Detail

getMap

public Map<String,Object> getMap()
Returns a map for the renderer. It aims at being rendered by the template engine, so no modification is allowed. Do not use it to modify values of the map.

Returns:
an immutable map

get

public Object get(String key)

put

public void put(String key,
                Object value)

putAll

public void putAll(Map<? extends String,? extends Object> map)

getContent

public ConfluenceEntityObject getContent()
Return the context's Content.


setContent

public void setContent(ConfluenceEntityObject entity)
Sets the entity that the notification is being sent regarding.


getEvent

public com.atlassian.event.Event getEvent()

setEvent

public void setEvent(com.atlassian.event.Event event)

isManageNotificationOverridden

public boolean isManageNotificationOverridden()

setManageNotificationOverridden

public void setManageNotificationOverridden(boolean isOverridden)

getWatchType

public Notification.WatchType getWatchType()

setWatchType

public void setWatchType(Notification.WatchType watchType)

setSpace

public void setSpace(Space space)

setRecipient

public void setRecipient(com.atlassian.user.User recipient)
Sets the recipient for a notification. This should be only ever be called on a per-email NotificationContext instance, never on the common one inside the NotificationData object.


getRecipient

public com.atlassian.user.User getRecipient()

setI18n

public void setI18n(I18NBean i18NBean)

addTemplateImage

public void addTemplateImage(DataSource dataSource)
Adds a datasource to the current set of datasources for 1 instance of notification.

Parameters:
dataSource - the datasource for the image.
See Also:
if you intend to add the image to all notification.

getTemplateImageDataSources

public Collection<DataSource> getTemplateImageDataSources()


Copyright © 2003-2012 Atlassian. All Rights Reserved.