public abstract class AbstractMailNotificationQueueItem extends Object implements com.atlassian.mail.queue.MailQueueItem, com.atlassian.core.task.Task
Modifier and Type | Field and Description |
---|---|
protected String |
body |
protected Date |
dateQueued |
static String |
MIME_TYPE_HTML |
static String |
MIME_TYPE_TEXT |
Constructor and Description |
---|
AbstractMailNotificationQueueItem(String templateContent) |
AbstractMailNotificationQueueItem(String templateLocation,
String templateFileName) |
Modifier and Type | Method and Description |
---|---|
void |
addVelocityContextParam(String name,
Object value) |
void |
clearContext() |
int |
compareTo(com.atlassian.mail.queue.MailQueueItem that) |
protected abstract com.atlassian.mail.Email |
createMailObject() |
void |
execute() |
String |
getBody() |
Date |
getDateQueued() |
String |
getLastError() |
String |
getRenderedContent() |
String |
getRenderedContent(String content) |
int |
getSendCount() |
String |
getSubject() |
String |
getTemplateContent() |
String |
getTemplateFileName() |
String |
getTemplateLocation() |
Object |
getVelocityContextParam(String name) |
boolean |
hasError() |
protected void |
incrementSendCount() |
protected static boolean |
isRecognisedMimeType(String mimePref) |
void |
preRenderBody(Map<String,Object> contextMap)
This method will not retain a local copy of the contextMap - making it advantageous for pre-rendering templates
with contexts comprising of transient or session-based data.
|
Object |
removeVelocityContextParam(String name) |
protected String |
renderTemplate(String templateLocation,
String templateName,
Map<String,Object> contextMap) |
protected com.atlassian.mail.server.SMTPMailServer |
retrieveMailServer() |
void |
send() |
void |
setBody(String body) |
protected void |
setLastError(String lastError) |
void |
setSubject(String subject) |
void |
setTemplateContent(String templateContent) |
void |
setTemplateFileName(String templateFileName) |
void |
setTemplateLocation(String templateLocation) |
protected String |
transformForEmail(String input) |
protected Date dateQueued
public static final String MIME_TYPE_HTML
public static final String MIME_TYPE_TEXT
protected String body
public AbstractMailNotificationQueueItem(String templateContent)
public int compareTo(com.atlassian.mail.queue.MailQueueItem that)
compareTo
in interface Comparable<com.atlassian.mail.queue.MailQueueItem>
public String getLastError()
protected void setLastError(String lastError)
public String getSubject()
getSubject
in interface com.atlassian.mail.queue.MailQueueItem
public Date getDateQueued()
getDateQueued
in interface com.atlassian.mail.queue.MailQueueItem
public int getSendCount()
getSendCount
in interface com.atlassian.mail.queue.MailQueueItem
public void setSubject(String subject)
public boolean hasError()
hasError
in interface com.atlassian.mail.queue.MailQueueItem
public void execute() throws Exception
execute
in interface com.atlassian.core.task.Task
Exception
public void send() throws com.atlassian.mail.MailException
send
in interface com.atlassian.mail.queue.MailQueueItem
com.atlassian.mail.MailException
protected abstract com.atlassian.mail.Email createMailObject()
protected com.atlassian.mail.server.SMTPMailServer retrieveMailServer() throws com.atlassian.mail.MailException
com.atlassian.mail.MailException
protected void incrementSendCount()
protected static boolean isRecognisedMimeType(String mimePref)
public void clearContext()
public void preRenderBody(Map<String,Object> contextMap)
public String getRenderedContent()
public String getTemplateFileName()
public void setTemplateFileName(String templateFileName)
public String getTemplateContent()
public void setTemplateContent(String templateContent)
public String getTemplateLocation()
public void setTemplateLocation(String templateLocation)
public String getBody()
public void setBody(String body)
Copyright © 2003–2020 Atlassian. All rights reserved.