com.atlassian.confluence.mail.template
Class ConfluenceMailQueueItem

java.lang.Object
  extended by com.atlassian.confluence.mail.template.ConfluenceMailQueueItem
All Implemented Interfaces:
com.atlassian.core.task.Task, com.atlassian.mail.queue.MailQueueItem, java.io.Serializable, java.lang.Comparable<com.atlassian.mail.queue.MailQueueItem>

public class ConfluenceMailQueueItem
extends java.lang.Object
implements com.atlassian.mail.queue.MailQueueItem

Simplified class to replace the somewhat confusing MailNotificationQueueItem hierarchy.

See Also:
Serialized Form

Field Summary
static java.lang.String MIME_TYPE_HTML
           
static java.lang.String MIME_TYPE_TEXT
           
 
Constructor Summary
ConfluenceMailQueueItem(java.lang.String toAddress, java.lang.String subject, java.lang.String body, java.lang.String mimeType)
           
ConfluenceMailQueueItem(java.lang.String toAddress, java.lang.String ccAddress, java.lang.String subject, java.lang.String body, java.lang.String mimeType)
           
ConfluenceMailQueueItem(java.lang.String toAddress, java.lang.String ccAddress, java.lang.String subject, java.lang.String body, java.lang.String mimeType, java.util.Collection<javax.activation.DataSource> attachedImages)
           
 
Method Summary
 int compareTo(com.atlassian.mail.queue.MailQueueItem o)
           
 void execute()
           
 java.lang.String getBody()
           
 java.util.Date getDateQueued()
           
 java.lang.String getFromAddress()
           
 java.lang.String getFromName()
           
 java.lang.String getLastError()
           
 int getSendCount()
           
 java.lang.String getSubject()
           
 boolean hasError()
           
 void send()
           
 void setFromAddress(java.lang.String fromAddress)
           
 void setFromName(java.lang.String fromName)
           
 void setLogsLocation(java.lang.String logsLocation)
           
 void setSendLogs(boolean sendLogs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_TYPE_HTML

public static final java.lang.String MIME_TYPE_HTML
See Also:
Constant Field Values

MIME_TYPE_TEXT

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

ConfluenceMailQueueItem

public ConfluenceMailQueueItem(java.lang.String toAddress,
                               java.lang.String subject,
                               java.lang.String body,
                               java.lang.String mimeType)

ConfluenceMailQueueItem

public ConfluenceMailQueueItem(java.lang.String toAddress,
                               java.lang.String ccAddress,
                               java.lang.String subject,
                               java.lang.String body,
                               java.lang.String mimeType)

ConfluenceMailQueueItem

public ConfluenceMailQueueItem(java.lang.String toAddress,
                               java.lang.String ccAddress,
                               java.lang.String subject,
                               java.lang.String body,
                               java.lang.String mimeType,
                               java.util.Collection<javax.activation.DataSource> attachedImages)
Method Detail

setSendLogs

public void setSendLogs(boolean sendLogs)

setLogsLocation

public void setLogsLocation(java.lang.String logsLocation)

compareTo

public int compareTo(com.atlassian.mail.queue.MailQueueItem o)
Specified by:
compareTo in interface java.lang.Comparable<com.atlassian.mail.queue.MailQueueItem>

send

public void send()
          throws com.atlassian.mail.MailException
Specified by:
send in interface com.atlassian.mail.queue.MailQueueItem
Throws:
com.atlassian.mail.MailException

getSubject

public java.lang.String getSubject()
Specified by:
getSubject in interface com.atlassian.mail.queue.MailQueueItem

getDateQueued

public java.util.Date getDateQueued()
Specified by:
getDateQueued in interface com.atlassian.mail.queue.MailQueueItem

getSendCount

public int getSendCount()
Specified by:
getSendCount in interface com.atlassian.mail.queue.MailQueueItem

hasError

public boolean hasError()
Specified by:
hasError in interface com.atlassian.mail.queue.MailQueueItem

execute

public void execute()
             throws java.lang.Exception
Specified by:
execute in interface com.atlassian.core.task.Task
Throws:
java.lang.Exception

getLastError

public java.lang.String getLastError()

getBody

public java.lang.String getBody()

getFromAddress

public java.lang.String getFromAddress()
Returns:
the address this mail item should appear to be from.

setFromAddress

public void setFromAddress(java.lang.String fromAddress)
Parameters:
fromAddress - the address the resultant e-mail should appear to be from

getFromName

public java.lang.String getFromName()
Returns:
the name of the sender the mail item should be from.

setFromName

public void setFromName(java.lang.String fromName)
Parameters:
fromName - the name to use for the sender of the mail item.


Copyright © 2003-2014 Atlassian. All Rights Reserved.