com.atlassian.confluence.mail.template
Class PreRenderedMailNotificationQueueItem

java.lang.Object
  extended by com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
      extended by com.atlassian.confluence.mail.template.MailNotificationQueueItem
          extended by com.atlassian.confluence.mail.template.PreRenderedMailNotificationQueueItem
All Implemented Interfaces:
com.atlassian.core.task.Task, com.atlassian.mail.queue.MailQueueItem, Serializable

public class PreRenderedMailNotificationQueueItem
extends MailNotificationQueueItem
implements com.atlassian.mail.queue.MailQueueItem

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.confluence.mail.template.MailNotificationQueueItem
TEMPLATES_LOCATION
 
Fields inherited from class com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
body, dateQueued, MIME_TYPE_HTML, MIME_TYPE_TEXT
 
Method Summary
 void addDatasources(Collection<DataSource> datasources)
           
static MailNotificationQueueItem createFromTemplateContent(com.atlassian.user.User recipient, String templateContent, String subject)
           
static MailNotificationQueueItem createFromTemplateFile(com.atlassian.user.User recipient, String templateFileName, String subject)
           
static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient, NotificationData notificationData, String subject, Map contextMap)
          Deprecated. Use createFromTemplateFileAndContext(com.atlassian.user.User, com.atlassian.confluence.mail.notification.listeners.NotificationData, String, com.atlassian.confluence.plugin.descriptor.mail.NotificationContext) instead.
static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient, NotificationData notificationData, String subject, NotificationContext contextClone)
          Creates a template from a file and a context
static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient, String templateFileName, String subject, Map contextMap, com.atlassian.user.User modifier)
          Deprecated. since 4.0
static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient, com.atlassian.user.User modifier, String templateName, String subject, Collection<DataSource> templateImageDataSources, Map contextMap)
           
static MailNotificationQueueItem createFromTemplateFileAndLocation(com.atlassian.user.User recipient, String templateLocation, String templateFileName, String subject)
           
protected  com.atlassian.mail.Email createMailObject()
           
 void render()
           
 void send()
           
 
Methods inherited from class com.atlassian.confluence.mail.template.MailNotificationQueueItem
getMimeType, getMimeTypeForUser, getTemplateLocationFromUserPreference, getUserAccessor
 
Methods inherited from class com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
addVelocityContextParam, clearContext, execute, getBody, getDateQueued, getLastError, getRenderedContent, getRenderedContent, getSendCount, getSubject, getTemplateContent, getTemplateFileName, getTemplateLocation, getVelocityContextParam, hasError, incrementSendCount, isRecognisedMimeType, preRenderBody, removeVelocityContextParam, retrieveMailServer, setBody, setLastError, setSubject, setTemplateContent, setTemplateFileName, setTemplateLocation, transformForEmail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.mail.queue.MailQueueItem
getDateQueued, getSendCount, getSubject, hasError
 
Methods inherited from interface com.atlassian.core.task.Task
execute
 

Method Detail

createFromTemplateFile

public static MailNotificationQueueItem createFromTemplateFile(com.atlassian.user.User recipient,
                                                               String templateFileName,
                                                               String subject)

createFromTemplateFileAndContext

public static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient,
                                                                                    NotificationData notificationData,
                                                                                    String subject,
                                                                                    Map contextMap)
Deprecated. Use createFromTemplateFileAndContext(com.atlassian.user.User, com.atlassian.confluence.mail.notification.listeners.NotificationData, String, com.atlassian.confluence.plugin.descriptor.mail.NotificationContext) instead.

Creates a template from a file and a context

Parameters:
recipient - the recipient
notificationData - the notification data
subject - the subject
contextMap - the context map for this email.
Returns:
the pre-rendered item

createFromTemplateFileAndContext

public static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient,
                                                                                    NotificationData notificationData,
                                                                                    String subject,
                                                                                    NotificationContext contextClone)
Creates a template from a file and a context

Parameters:
recipient - the recipient
notificationData - the notification data
subject - the subject
contextClone - a clone of the context of notificationData obtained by NotificationData.cloneContext(). Values can be overridden for one instance of notification, for example the i18n bean.
Returns:
the pre-rendered item

createFromTemplateFileAndContext

public static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient,
                                                                                    com.atlassian.user.User modifier,
                                                                                    String templateName,
                                                                                    String subject,
                                                                                    Collection<DataSource> templateImageDataSources,
                                                                                    Map contextMap)

createFromTemplateFileAndContext

@Deprecated
public static PreRenderedMailNotificationQueueItem createFromTemplateFileAndContext(com.atlassian.user.User recipient,
                                                                                               String templateFileName,
                                                                                               String subject,
                                                                                               Map contextMap,
                                                                                               com.atlassian.user.User modifier)
Deprecated. since 4.0


createFromTemplateFileAndLocation

public static MailNotificationQueueItem createFromTemplateFileAndLocation(com.atlassian.user.User recipient,
                                                                          String templateLocation,
                                                                          String templateFileName,
                                                                          String subject)

createFromTemplateContent

public static MailNotificationQueueItem createFromTemplateContent(com.atlassian.user.User recipient,
                                                                  String templateContent,
                                                                  String subject)

render

public void render()

send

public final void send()
                throws com.atlassian.mail.MailException
Specified by:
send in interface com.atlassian.mail.queue.MailQueueItem
Overrides:
send in class AbstractMailNotificationQueueItem
Throws:
com.atlassian.mail.MailException

createMailObject

protected com.atlassian.mail.Email createMailObject()
Overrides:
createMailObject in class MailNotificationQueueItem

addDatasources

public void addDatasources(Collection<DataSource> datasources)


Copyright © 2003-2012 Atlassian. All Rights Reserved.