com.atlassian.confluence.mail.template
Class AbstractMailNotificationQueueItem

java.lang.Object
  extended by com.atlassian.confluence.mail.VelocityRenderedQueueItem
      extended by com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem
All Implemented Interfaces:
Task, MailQueueItem, Serializable
Direct Known Subclasses:
MailNotificationQueueItem, NonUserMailNotificationQueueItem

public abstract class AbstractMailNotificationQueueItem
extends VelocityRenderedQueueItem
implements MailQueueItem

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

See Also:
Serialized Form

Field Summary
protected  Date dateQueued
           
static String MIME_TYPE_HTML
           
static String MIME_TYPE_TEXT
           
 
Fields inherited from class com.atlassian.confluence.mail.VelocityRenderedQueueItem
body
 
Constructor Summary
AbstractMailNotificationQueueItem(String templateContent)
           
AbstractMailNotificationQueueItem(String templateLocation, String templateFileName)
           
 
Method Summary
protected abstract  Email createMailObject()
           
 void execute()
           
 Date getDateQueued()
           
 String getLastError()
           
 int getSendCount()
           
 String getSubject()
           
 boolean hasError()
           
protected  void incrementSendCount()
           
protected static boolean isRecognisedMimeType(String mimePref)
           
protected  SMTPMailServer retrieveMailServer()
           
 void send()
           
protected  void setLastError(String lastError)
           
 void setSubject(String subject)
           
 
Methods inherited from class com.atlassian.confluence.mail.VelocityRenderedQueueItem
addVelocityContextParam, clearContext, getBody, getRenderedContent, getRenderedContent, getTemplateContent, getTemplateFileName, getTemplateLocation, getVelocityContextParam, preRenderBody, removeVelocityContextParam, setBody, setTemplateContent, setTemplateFileName, setTemplateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateQueued

protected Date dateQueued

MIME_TYPE_HTML

public static final String MIME_TYPE_HTML
See Also:
Constant Field Values

MIME_TYPE_TEXT

public static final String MIME_TYPE_TEXT
See Also:
Constant Field Values
Constructor Detail

AbstractMailNotificationQueueItem

public AbstractMailNotificationQueueItem(String templateContent)

AbstractMailNotificationQueueItem

public AbstractMailNotificationQueueItem(String templateLocation,
                                         String templateFileName)
Method Detail

getLastError

public String getLastError()

setLastError

protected void setLastError(String lastError)

getSubject

public String getSubject()
Specified by:
getSubject in interface MailQueueItem

getDateQueued

public Date getDateQueued()
Specified by:
getDateQueued in interface MailQueueItem

getSendCount

public int getSendCount()
Specified by:
getSendCount in interface MailQueueItem

setSubject

public void setSubject(String subject)

hasError

public boolean hasError()
Specified by:
hasError in interface MailQueueItem

execute

public void execute()
             throws Exception
Specified by:
execute in interface Task
Throws:
Exception

send

public void send()
          throws MailException
Specified by:
send in interface MailQueueItem
Throws:
MailException

createMailObject

protected abstract Email createMailObject()

retrieveMailServer

protected SMTPMailServer retrieveMailServer()
                                     throws MailException
Throws:
MailException

incrementSendCount

protected void incrementSendCount()

isRecognisedMimeType

protected static boolean isRecognisedMimeType(String mimePref)


Confluence is developed by Atlassian.