com.atlassian.confluence.mail.template
Class PreRenderedMailNotificationQueueItem
java.lang.Object
com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
com.atlassian.confluence.mail.template.MailNotificationQueueItem
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
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.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 |
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 recipientnotificationData
- the notification datasubject
- the subjectcontextMap
- 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 recipientnotificationData
- the notification datasubject
- the subjectcontextClone
- 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)