com.atlassian.jira.mail
Class RenderingMailQueueItem
java.lang.Object
com.atlassian.mail.queue.AbstractMailQueueItem
com.atlassian.mail.queue.SingleMailQueueItem
com.atlassian.jira.mail.RenderingMailQueueItem
- All Implemented Interfaces:
- com.atlassian.core.task.Task, com.atlassian.mail.queue.MailQueueItem, Serializable, Comparable<com.atlassian.mail.queue.MailQueueItem>
public class RenderingMailQueueItem
- extends com.atlassian.mail.queue.SingleMailQueueItem
Renders e-mails on send.
Required so that we can populate the Velocity render context from the mail-queue flushing thread rather than the
thread that triggered the sending of the mail. In turn, that is required because the thread will get things like
baseUrl incorrect (it renders as a relative rather than absolute link).
- Since:
- v5.0
- See Also:
- Serialized Form
Fields inherited from class com.atlassian.mail.queue.AbstractMailQueueItem |
mailThreader |
Method Summary |
String |
getSubject()
This is the subject as displayed in the Mail Queue Admin page. |
void |
send()
|
Methods inherited from class com.atlassian.mail.queue.SingleMailQueueItem |
getEmail, toString |
Methods inherited from class com.atlassian.mail.queue.AbstractMailQueueItem |
compareTo, execute, getDateQueued, getSendCount, hasError, incrementSendCount, setMailThreader |
RenderingMailQueueItem
public RenderingMailQueueItem(com.atlassian.mail.Email email,
String subjectTemplatePath,
String bodyTemplatePath,
Map<String,Object> params)
getSubject
public String getSubject()
- This is the subject as displayed in the Mail Queue Admin page. The subject is displayed in the preference
language of the current user viewing items to be sent (i.e. different from items CURRENTLY being sent).
The subject will be displayed in the preference language of the mail recipient once the mail is actually being
sent. When the mail is being sent, it is a SingleMailQueueItem.
- Specified by:
getSubject
in interface com.atlassian.mail.queue.MailQueueItem
- Overrides:
getSubject
in class com.atlassian.mail.queue.AbstractMailQueueItem
- Returns:
- String the subject as displayed on the mail queue admin page
send
public void send()
throws com.atlassian.mail.MailException
- Specified by:
send
in interface com.atlassian.mail.queue.MailQueueItem
- Overrides:
send
in class com.atlassian.mail.queue.SingleMailQueueItem
- Throws:
com.atlassian.mail.MailException
Copyright © 2002-2012 Atlassian. All Rights Reserved.