public class DefaultCommentReactionsService extends Object implements CommentReactionsService, Startable
| Constructor and Description |
|---|
DefaultCommentReactionsService(CommentReactionManager commentReactionManager,
UserManager userManager,
PermissionManager permissionManager,
CommentService commentService,
CommentReactionsEnabledService commentReactionsEnabledService,
CommentPermissionManager commentPermissionManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
ServiceOutcome<ReactionSummary> |
addReaction(ApplicationUser loggedInUser,
long commentId,
String emojiId)
Checks whether the user already reacted to the comment with given emoji, and if not, adds a reaction.
|
ServiceOutcome<ReactionSummary> |
deleteReaction(ApplicationUser loggedInUser,
Long commentId,
String emojiId)
Deletes a reaction.
|
ServiceOutcome<ReactionSummary> |
getDetailedReaction(ApplicationUser loggedInUser,
Long commentId,
String emoji)
Gets the details of the reaction containing Unicode of the emoji and a list of users who reacted with it.
|
ServiceOutcome<Collection<ReactionSummary>> |
getReactions(ApplicationUser loggedInUser,
Collection<Long> commentIds)
Gets all reactions for a given comment.
|
void |
onCommentDeleted(CommentDeletedEvent event) |
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
public DefaultCommentReactionsService(CommentReactionManager commentReactionManager, UserManager userManager, PermissionManager permissionManager, CommentService commentService, CommentReactionsEnabledService commentReactionsEnabledService, CommentPermissionManager commentPermissionManager, com.atlassian.event.api.EventPublisher eventPublisher)
public void start()
Startable@EventListener public void onCommentDeleted(CommentDeletedEvent event)
@Nonnull public ServiceOutcome<Collection<ReactionSummary>> getReactions(@Nonnull ApplicationUser loggedInUser, Collection<Long> commentIds)
CommentReactionsServicegetReactions in interface CommentReactionsServiceloggedInUser - the user performing operationcommentIds - comments idsReactionSummarypublic ServiceOutcome<ReactionSummary> getDetailedReaction(@Nonnull ApplicationUser loggedInUser, Long commentId, String emoji)
CommentReactionsServicegetDetailedReaction in interface CommentReactionsServiceloggedInUser - the user performing operationcommentId - the ID of the commentemoji - Unicode of the emojiReactionSummary objectpublic ServiceOutcome<ReactionSummary> addReaction(@Nonnull ApplicationUser loggedInUser, long commentId, String emojiId)
CommentReactionsServiceaddReaction in interface CommentReactionsServiceloggedInUser - the user performing operationcommentId - the ID of the commentemojiId - Unicode of the emojiReactionSummary for given emoji and given commentpublic ServiceOutcome<ReactionSummary> deleteReaction(@Nonnull ApplicationUser loggedInUser, Long commentId, String emojiId)
CommentReactionsServicedeleteReaction in interface CommentReactionsServiceloggedInUser - the user performing operationcommentId - the ID of the commentemojiId - Unicode of the emojiReactionSummary for given emoji and given commentCopyright © 2002-2024 Atlassian. All Rights Reserved.