com.atlassian.jira.mail
Interface MailThreadManager

All Known Implementing Classes:
MailThreadManagerImpl

@PublicApi
public interface MailThreadManager


Nested Class Summary
static class MailThreadManager.MailAction
          Indicates an action in response to an incoming email.
 
Field Summary
static String ISSUE_COMMENTED_FROM_EMAIL
          Deprecated. Use MailThreadManager.MailAction.ISSUE_COMMENTED_FROM_EMAIL instead. Since v5.2.
static String ISSUE_CREATED_FROM_EMAIL
          Deprecated. Use MailThreadManager.MailAction.ISSUE_CREATED_FROM_EMAIL instead. Since v5.2.
static String NOTIFICATION_ISSUE_ASSIGNED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_CLOSED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_COMMENT_EDITED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_COMMENTED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_CREATED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_DELETED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_GENERICEVENT
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_MOVED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_REOPENED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_RESOLVED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_UPDATED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_WORKLOG_DELETED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_WORKLOG_UPDATED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_WORKLOGGED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_WORKSTARTED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_ISSUE_WORKSTOPPED
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
static String NOTIFICATION_KEY
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
 
Method Summary
 void createMailThread(String type, Long source, String emailAddress, String messageId)
          Deprecated. Use storeIncomingMessageId(String, String, com.atlassian.jira.issue.Issue, com.atlassian.jira.mail.MailThreadManager.MailAction) instead. Since v5.2.3.
 org.ofbiz.core.entity.GenericValue getAssociatedIssue(javax.mail.Message message)
          Deprecated. use instead getAssociatedIssueObject(javax.mail.Message) method. Since 26/11/2011
 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.
 String getThreadType(Long eventTypeId)
          Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
 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.
 void threadNotificationEmail(Email email, Long issueId)
          Deprecated. Use threadNotificationEmail(Email, com.atlassian.jira.issue.Issue) instead. Since v5.2.
 

Field Detail

NOTIFICATION_KEY

static final String NOTIFICATION_KEY
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).

See Also:
Constant Field Values

NOTIFICATION_ISSUE_CREATED

static final String NOTIFICATION_ISSUE_CREATED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_UPDATED

static final String NOTIFICATION_ISSUE_UPDATED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_ASSIGNED

static final String NOTIFICATION_ISSUE_ASSIGNED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_RESOLVED

static final String NOTIFICATION_ISSUE_RESOLVED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_CLOSED

static final String NOTIFICATION_ISSUE_CLOSED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_COMMENTED

static final String NOTIFICATION_ISSUE_COMMENTED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_COMMENT_EDITED

static final String NOTIFICATION_ISSUE_COMMENT_EDITED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_REOPENED

static final String NOTIFICATION_ISSUE_REOPENED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_DELETED

static final String NOTIFICATION_ISSUE_DELETED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_WORKLOGGED

static final String NOTIFICATION_ISSUE_WORKLOGGED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_WORKLOG_UPDATED

static final String NOTIFICATION_ISSUE_WORKLOG_UPDATED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_WORKLOG_DELETED

static final String NOTIFICATION_ISSUE_WORKLOG_DELETED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_MOVED

static final String NOTIFICATION_ISSUE_MOVED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_WORKSTARTED

static final String NOTIFICATION_ISSUE_WORKSTARTED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_WORKSTOPPED

static final String NOTIFICATION_ISSUE_WORKSTOPPED
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


NOTIFICATION_ISSUE_GENERICEVENT

static final String NOTIFICATION_ISSUE_GENERICEVENT
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.
No longer used because we don't use store all outgoing notifications (see JRA-9979).


ISSUE_CREATED_FROM_EMAIL

static final String ISSUE_CREATED_FROM_EMAIL
Deprecated. Use MailThreadManager.MailAction.ISSUE_CREATED_FROM_EMAIL instead. Since v5.2.
See Also:
Constant Field Values

ISSUE_COMMENTED_FROM_EMAIL

static final String ISSUE_COMMENTED_FROM_EMAIL
Deprecated. Use MailThreadManager.MailAction.ISSUE_COMMENTED_FROM_EMAIL instead. Since v5.2.
See Also:
Constant Field Values
Method Detail

storeIncomingMessageId

void storeIncomingMessageId(String messageId,
                            String senderAddress,
                            Issue issue,
                            MailThreadManager.MailAction action)
Remembers the given incoming MessageID.

This 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.

Parameters:
messageId - The incoming Message-ID
senderAddress - The sender
issue - the issue that was affected (created or commented)
action - Issue created or Issue commented
Since:
v5.2.3

createMailThread

void createMailThread(String type,
                      Long source,
                      String emailAddress,
                      String messageId)
Deprecated. Use storeIncomingMessageId(String, String, com.atlassian.jira.issue.Issue, com.atlassian.jira.mail.MailThreadManager.MailAction) instead. Since v5.2.3.

Remembers the given incoming MessageID.

As of v5.2, this should only be used for incoming messages, outgoing "Notification" messages are ignored. Instead we craft a special Message-ID that we can parse the Issue ID out of if someone replies to the notification.

Parameters:
type -
source -
emailAddress -
messageId -

threadNotificationEmail

void threadNotificationEmail(Email email,
                             Long issueId)
Deprecated. Use threadNotificationEmail(Email, com.atlassian.jira.issue.Issue) instead. Since v5.2.

Thread the given email which is related to the given issue.

Parameters:
email - the email to be sent
issueId - the issue that the email is about

threadNotificationEmail

void threadNotificationEmail(Email email,
                             Issue issue)
Thread the given email which is related to the given issue.

Parameters:
email - the email to be sent
issue - the issue that the email is about

getThreadType

String getThreadType(Long eventTypeId)
Deprecated. No longer used because we don't use store all outgoing notifications (see JRA-9979). Since v5.2.

No longer used because we don't use store all outgoing notifications (see JRA-9979).

Parameters:
eventTypeId - eventTypeId

getAssociatedIssueObject

@Nullable
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.

Notifications 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.

Parameters:
message - message to analyse
Returns:
associated issue or null if no issue is associated with this message.

getAssociatedIssue

@Deprecated
org.ofbiz.core.entity.GenericValue getAssociatedIssue(javax.mail.Message message)
Deprecated. use instead getAssociatedIssueObject(javax.mail.Message) method. Since 26/11/2011

Looks for an issue associated with the given message.

The "In-Reply-To" header of the message is parsed to see if it was sent by this JIRA server and if so we retrieve the Issue ID from it.

Parameters:
message - message to analyse
Returns:
associated issue or null if no issue is associated with this message.

removeAssociatedEntries

int removeAssociatedEntries(Long issueId)
Removes rows from NotificationInstance table associated with the given issue. Used when we delete an issue.

Parameters:
issueId - the issue
Returns:
row count


Copyright © 2002-2013 Atlassian. All Rights Reserved.