Package com.atlassian.jira.reactions
Interface CommentReactionsService
- All Known Implementing Classes:
DefaultCommentReactionsService
@Internal
public interface CommentReactionsService
Service for manipulating comment reactions.
- Since:
- 8.17
-
Method Summary
Modifier and TypeMethodDescriptionaddReaction(ApplicationUser loggedInUser, long commentId, String emojiId) Checks whether the user already reacted to the comment with given emoji, and if not, adds a reaction.deleteReaction(ApplicationUser loggedInUser, Long commentId, String emojiId) Deletes a reaction.getDetailedReaction(ApplicationUser loggedInUser, Long commentId, String emojiId) Gets the details of the reaction containing Unicode of the emoji and a list of users who reacted with it.getReactions(ApplicationUser loggedInUser, Collection<Long> commentIds) Gets all reactions for a given comment.
-
Method Details
-
getReactions
@Nonnull ServiceOutcome<Collection<ReactionSummary>> getReactions(@Nonnull ApplicationUser loggedInUser, Collection<Long> commentIds) Gets all reactions for a given comment.- Parameters:
loggedInUser- the user performing operationcommentIds- comments ids- Returns:
- a collection of
ReactionSummary
-
getDetailedReaction
@Nonnull ServiceOutcome<ReactionSummary> getDetailedReaction(@Nonnull ApplicationUser loggedInUser, Long commentId, String emojiId) Gets the details of the reaction containing Unicode of the emoji and a list of users who reacted with it.- Parameters:
loggedInUser- the user performing operationcommentId- the ID of the commentemojiId- Unicode of the emoji- Returns:
- the
ReactionSummaryobject
-
addReaction
@Nonnull ServiceOutcome<ReactionSummary> addReaction(@Nonnull ApplicationUser loggedInUser, long commentId, String emojiId) Checks whether the user already reacted to the comment with given emoji, and if not, adds a reaction.- Parameters:
loggedInUser- the user performing operationcommentId- the ID of the commentemojiId- Unicode of the emoji- Returns:
- the updated
ReactionSummaryfor given emoji and given comment
-
deleteReaction
@Nonnull ServiceOutcome<ReactionSummary> deleteReaction(@Nonnull ApplicationUser loggedInUser, Long commentId, String emojiId) Deletes a reaction. If there are duplicated reactions in the database, all matching records will be deleted.- Parameters:
loggedInUser- the user performing operationcommentId- the ID of the commentemojiId- Unicode of the emoji- Returns:
- the updated
ReactionSummaryfor given emoji and given comment
-