com.atlassian.jira.mail
Class IssueMailQueueItem

java.lang.Object
  extended bycom.atlassian.mail.queue.AbstractMailQueueItem
      extended bycom.atlassian.jira.mail.IssueMailQueueItem
All Implemented Interfaces:
com.atlassian.mail.queue.MailQueueItem, com.atlassian.core.task.Task

public class IssueMailQueueItem
extends com.atlassian.mail.queue.AbstractMailQueueItem


Field Summary
(package private)  IssueEvent event
           
(package private)  String notificationType
           
(package private)  Set recipientList
           
(package private)  Long templateId
           
 
Fields inherited from class com.atlassian.mail.queue.AbstractMailQueueItem
mailThreader
 
Constructor Summary
IssueMailQueueItem(TemplateContextFactory templateContextFactory, IssueEvent event, Long templateId, Set recipientList, String notificationType, JiraAuthenticationContext authenticationContext, MailingListCompiler mailingListCompiler, EventTypeManager eventTypeManager)
          Create an issue mail queue item.
 
Method Summary
 IssueEvent getEvent()
           
protected  Map getIssueContextParams(IssueEvent iEvent)
           
 Set getRecipientList()
          Used in testing only
 String getSubject()
          This is the subject as displayed in the Mail Queue Admin page.
 String getSubjectKey()
          Retrieve the translation key for the subject.
 Long getTemplateId()
           
 void send()
           
 String toString()
           
 
Methods inherited from class com.atlassian.mail.queue.AbstractMailQueueItem
execute, getDateQueued, getSendCount, hasError, incrementSendCount, setMailThreader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

event

IssueEvent event

templateId

Long templateId

recipientList

Set recipientList

notificationType

String notificationType
Constructor Detail

IssueMailQueueItem

public IssueMailQueueItem(TemplateContextFactory templateContextFactory,
                          IssueEvent event,
                          Long templateId,
                          Set recipientList,
                          String notificationType,
                          JiraAuthenticationContext authenticationContext,
                          MailingListCompiler mailingListCompiler,
                          EventTypeManager eventTypeManager)
Create an issue mail queue item.

Parameters:
event - the event that is the subject of this mail item.
templateId - the template ID for this mail item.
recipientList - a list of recipients for this mail item.
notificationType -
See Also:
IssueMailQueueItemFactory
Method Detail

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.

Returns:
String the subject as displayed on the mail queue admin page

getSubjectKey

public String getSubjectKey()
Retrieve the translation key for the subject. The appropriate translation will be retrieved for each recipient on sending the mail item. The final translation is determined from the final intended recipient in MailingListCompiler.

Returns:
String translation key

getEvent

public IssueEvent getEvent()

getTemplateId

public Long getTemplateId()

send

public void send()
          throws com.atlassian.mail.MailException
Throws:
com.atlassian.mail.MailException

toString

public String toString()

getIssueContextParams

protected Map getIssueContextParams(IssueEvent iEvent)
                             throws org.ofbiz.core.entity.GenericEntityException,
                                    EntityNotFoundException
Throws:
org.ofbiz.core.entity.GenericEntityException
EntityNotFoundException

getRecipientList

public Set getRecipientList()
Used in testing only

Returns:
recipientList the set of recipients to recieve this email notification


Copyright © 2002-2006 Atlassian. All Rights Reserved.