@PublicApi
public interface MentionService
MentionIssueEvent
when a user has mentioned
other users on an issue.Modifier and Type | Interface and Description |
---|---|
static class |
MentionService.MentionResult
Represents a result of sending a mention, i.e.
|
static class |
MentionService.Mentions
Contains mentioned users divided by mention source (issue description, issue comment).
|
Modifier and Type | Method and Description |
---|---|
MentionService.Mentions |
getMentionedUsers(IssueEvent issueEvent)
Returns mentioned users calculated from passed
issueEvent . |
boolean |
isUserAbleToMention(ApplicationUser remoteUser)
Whether the specified user is able to mention other users in a Jira issue.
|
void |
sendCommentMentions(ApplicationUser remoteUser,
Set<NotificationRecipient> currentRecipients,
Comment comment,
Comment originalComment)
Deprecated.
Use
sendCommentMentions(Set, ApplicationUser, Comment, Comment) instead. Since v8.9. |
MentionService.MentionResult |
sendCommentMentions(Set<NotificationRecipient> currentRecipients,
ApplicationUser remoteUser,
Comment comment,
Comment originalComment)
Given a comment object this method will look for any mentions using the
MentionFinder and send e-mails to
all users mentioned. |
void |
sendIssueCreateMentions(ApplicationUser remoteUser,
Set<NotificationRecipient> currentRecipients,
Issue issue)
Deprecated.
Use
sendIssueCreateMentions(Set, ApplicationUser, Issue) instead. Since v8.9. |
MentionService.MentionResult |
sendIssueCreateMentions(Set<NotificationRecipient> currentRecipients,
ApplicationUser remoteUser,
Issue issue)
Given an issue object this method will look for any mentions in the description field using the
MentionFinder and send e-mails to
all users mentioned. |
void |
sendIssueEditMentions(ApplicationUser remoteUser,
Set<NotificationRecipient> currentRecipients,
Issue issue,
Comment comment)
Deprecated.
Use
sendIssueEditMentions(Set, ApplicationUser, Issue, Comment) instead. Since v8.9. |
MentionService.MentionResult |
sendIssueEditMentions(Set<NotificationRecipient> currentRecipients,
ApplicationUser remoteUser,
Issue issue,
Comment comment)
Given an issue that has just been edited and an optional edit comment this method sends mention e-mails
to all users mentioned in either the new issue description or option edit comment.
|
@Deprecated void sendCommentMentions(@Nullable ApplicationUser remoteUser, @Nullable Set<NotificationRecipient> currentRecipients, @Nullable Comment comment, @Nullable Comment originalComment)
sendCommentMentions(Set, ApplicationUser, Comment, Comment)
instead. Since v8.9.MentionFinder
and send e-mails to
all users mentioned.
Sending mentions can not be performed by anonymous users. The user sending the mentions must have browse users permission and all users mentioned must have permission to browse the issue. Otherwise no e-mails will be sent.
remoteUser
- The currently logged in user performing this operation.currentRecipients
- A set of recipients already being notified for this issue event bundle.comment
- The comment to scan for text.originalComment
- If a comment was edited provide the original comment so that a comparison can be carried out to only send mentions to new users. May be null@Nonnull MentionService.MentionResult sendCommentMentions(@Nullable Set<NotificationRecipient> currentRecipients, @Nullable ApplicationUser remoteUser, @Nullable Comment comment, @Nullable Comment originalComment)
MentionFinder
and send e-mails to
all users mentioned.
Sending mentions can not be performed by anonymous users. The user sending the mentions must have browse users permission and all users mentioned must have permission to browse the issue. Otherwise no e-mails will be sent.
currentRecipients
- A set of recipients already being notified for this issue event bundle.remoteUser
- The currently logged in user performing this operation.comment
- The comment to scan for text.originalComment
- If a comment was edited provide the original comment so that a comparison can be carried out to only send mentions to new users. May be null@Deprecated void sendIssueCreateMentions(@Nullable ApplicationUser remoteUser, @Nullable Set<NotificationRecipient> currentRecipients, @Nonnull Issue issue)
sendIssueCreateMentions(Set, ApplicationUser, Issue)
instead. Since v8.9.MentionFinder
and send e-mails to
all users mentioned.
Sending mentions can not be performed by anonymous users. The user sending the mentions must have browse users permission and all users mentioned must have permission to browse the issue. Otherwise no e-mails will be sent.
remoteUser
- The currently logged in user performing this operation.currentRecipients
- A set of recipients already being notified for this issue event bundle.issue
- The issue whose description will be scanned for mentions.@Nonnull MentionService.MentionResult sendIssueCreateMentions(@Nullable Set<NotificationRecipient> currentRecipients, @Nullable ApplicationUser remoteUser, @Nonnull Issue issue)
MentionFinder
and send e-mails to
all users mentioned.
Sending mentions can not be performed by anonymous users. The user sending the mentions must have browse users permission and all users mentioned must have permission to browse the issue. Otherwise no e-mails will be sent.
currentRecipients
- A set of recipients already being notified for this issue event bundle.remoteUser
- The currently logged in user performing this operation.issue
- The issue whose description will be scanned for mentions.@Deprecated void sendIssueEditMentions(@Nullable ApplicationUser remoteUser, @Nullable Set<NotificationRecipient> currentRecipients, @Nonnull Issue issue, @Nullable Comment comment)
sendIssueEditMentions(Set, ApplicationUser, Issue, Comment)
instead. Since v8.9.Mentions will only be sent for users if the description field was edited (as determined by the latest change history for this issue) and only to users that weren't mentioned in the description text previously.
remoteUser
- The currently logged in user performing this operation.currentRecipients
- A set of recipients already being notified for this issue event bundle.issue
- The issue whose description will be scanned for mentions.comment
- An optional comment for the edit@Nonnull MentionService.MentionResult sendIssueEditMentions(@Nullable Set<NotificationRecipient> currentRecipients, @Nullable ApplicationUser remoteUser, @Nonnull Issue issue, @Nullable Comment comment)
Mentions will only be sent for users if the description field was edited (as determined by the latest change history for this issue) and only to users that weren't mentioned in the description text previously.
currentRecipients
- A set of recipients already being notified for this issue event bundle.remoteUser
- The currently logged in user performing this operation.issue
- The issue whose description will be scanned for mentions.comment
- An optional comment for the editboolean isUserAbleToMention(@Nullable ApplicationUser remoteUser)
remoteUser
- The user to check mention permissions for.@Nonnull MentionService.Mentions getMentionedUsers(@Nonnull IssueEvent issueEvent)
issueEvent
.
Sending mentions can not be performed by anonymous users.
The user sending the mentions must have browse users permission and all users mentioned must have permission to browse the issue.issueEvent
- Event to find mentions forissueEvent
.Copyright © 2002-2022 Atlassian. All Rights Reserved.