public class MailThreadManagerImpl extends Object implements MailThreadManager
MailThreadManager.MailAction| Constructor and Description |
|---|
MailThreadManagerImpl(OfBizDelegator ofBizDelegator,
IssueManager issueManager) |
| Modifier and Type | Method and Description |
|---|---|
Issue |
findIssueFromMessageId(String messageId)
Looks for an issue associated with the given message by inspecting the "Message-ID" header of the message.
|
Issue |
getAssociatedIssueObject(javax.mail.Message message)
Looks for an issue associated with the given message by inspecting the "In-Reply-To" header of the message.
|
int |
removeAssociatedEntries(Long issueId)
Removes rows from NotificationInstance table associated with the given issue.
|
void |
storeIncomingMessageId(String messageId,
String senderAddress,
Issue issue,
MailThreadManager.MailAction action)
Remembers the given incoming MessageID.
|
void |
threadNotificationEmail(Email email,
Issue issue)
Thread the given email which is related to the given issue.
|
public MailThreadManagerImpl(OfBizDelegator ofBizDelegator, IssueManager issueManager)
public void storeIncomingMessageId(String messageId, String senderAddress, Issue issue, MailThreadManager.MailAction action)
MailThreadManagerThis is used when someone emails JIRA and CCs some else, and that person in turn does a reply-all. Such an email will not have the Issue Key in the subject.
storeIncomingMessageId in interface MailThreadManagermessageId - The incoming Message-IDsenderAddress - The senderissue - the issue that was affected (created or commented)action - Issue created or Issue commentedpublic void threadNotificationEmail(Email email, Issue issue)
MailThreadManagerthreadNotificationEmail in interface MailThreadManageremail - the email to be sentissue - the issue that the email is about@Nullable public Issue getAssociatedIssueObject(javax.mail.Message message)
MailThreadManagerNotifications sent from JIRA have a special form that allows us to parse out the Issue ID. We also remember the incoming Message-IDs so we can tell if another recipient replies to that message.
getAssociatedIssueObject in interface MailThreadManagermessage - message to analysepublic Issue findIssueFromMessageId(String messageId)
MailThreadManagerfindIssueFromMessageId in interface MailThreadManagermessageId - Message-ID to be checkedpublic int removeAssociatedEntries(Long issueId)
MailThreadManagerremoveAssociatedEntries in interface MailThreadManagerissueId - the issueCopyright © 2002-2015 Atlassian. All Rights Reserved.