public abstract class

AbstractMailNotificationQueueItem

extends Object
implements Task MailQueueItem
java.lang.Object
   ↳ com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

An abstract mail notification queue item that provides default implementations of most methods.

Summary

Constants
String MIME_TYPE_HTML
String MIME_TYPE_TEXT
Fields
protected String body
protected Date dateQueued
Public Constructors
AbstractMailNotificationQueueItem(String templateContent)
AbstractMailNotificationQueueItem(String templateLocation, String templateFileName)
Public Methods
void addVelocityContextParam(String name, Object value)
void clearContext()
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()
void preRenderBody(Map<StringObject> 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)
void send()
void setBody(String body)
void setSubject(String subject)
void setTemplateContent(String templateContent)
void setTemplateFileName(String templateFileName)
void setTemplateLocation(String templateLocation)
Protected Methods
abstract Email createMailObject()
void incrementSendCount()
static boolean isRecognisedMimeType(String mimePref)
SMTPMailServer retrieveMailServer()
void setLastError(String lastError)
String transformForEmail(String input)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.core.task.Task
From interface com.atlassian.mail.queue.MailQueueItem

Constants

public static final String MIME_TYPE_HTML

Constant Value: "text/html"

public static final String MIME_TYPE_TEXT

Constant Value: "text/plain"

Fields

protected String body

protected Date dateQueued

Public Constructors

public AbstractMailNotificationQueueItem (String templateContent)

public AbstractMailNotificationQueueItem (String templateLocation, String templateFileName)

Public Methods

public void addVelocityContextParam (String name, Object value)

public void clearContext ()

public void execute ()

Throws
Exception

public String getBody ()

public Date getDateQueued ()

public String getLastError ()

public String getRenderedContent ()

public String getRenderedContent (String content)

public int getSendCount ()

public String getSubject ()

public String getTemplateContent ()

public String getTemplateFileName ()

public String getTemplateLocation ()

public Object getVelocityContextParam (String name)

public boolean hasError ()

public void preRenderBody (Map<StringObject> 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.

public Object removeVelocityContextParam (String name)

public void send ()

Throws
MailException

public void setBody (String body)

public void setSubject (String subject)

public void setTemplateContent (String templateContent)

public void setTemplateFileName (String templateFileName)

public void setTemplateLocation (String templateLocation)

Protected Methods

protected abstract Email createMailObject ()

protected void incrementSendCount ()

protected static boolean isRecognisedMimeType (String mimePref)

protected SMTPMailServer retrieveMailServer ()

Throws
MailException

protected void setLastError (String lastError)

protected String transformForEmail (String input)