Class DefaultCommentReactionManager
java.lang.Object
com.atlassian.jira.issue.comments.reactions.DefaultCommentReactionManager
- All Implemented Interfaces:
CommentReactionManager
- Since:
- 8.17
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCommentReactionManager(QueryDslAccessor dslAccessor, OfBizDelegator ofBizDelegator) -
Method Summary
Modifier and TypeMethodDescriptionCreates a database record for the reaction made by the user with given key to the given comment and given emoji.voidDeletes the user reaction with given emoji to given comment.voiddeleteAllByCommentId(long commentId) Deletes all reactions associated with the comment with given ID.booleanDetermines if the user with given key already reacted with given emoji to given comment.findByCommentAndEmoticon(long commentId, String emoticon) Returns all reactions for given emoji and given comment.findByCommentId(long commentId) Returns all the reactions for given comment.findById(long id) Returns the reaction with given ID.longgetReactionCount(long commentId, String emoticon) Returns a number of users who reacted with given emoji to given comment.
-
Constructor Details
-
DefaultCommentReactionManager
-
-
Method Details
-
create
Description copied from interface:CommentReactionManagerCreates a database record for the reaction made by the user with given key to the given comment and given emoji.- Specified by:
createin interfaceCommentReactionManager- Parameters:
commentId- the ID of the commentemoticon- Unicode of the emojiuserKey- the key of the user who reactedcreated- the timestamp of reaction- Returns:
- the
CommentReactionDTOobject
-
findById
Description copied from interface:CommentReactionManagerReturns the reaction with given ID.- Specified by:
findByIdin interfaceCommentReactionManager- Parameters:
id- the ID of the reaction- Returns:
- the
CommentReactionDTOobject
-
delete
Description copied from interface:CommentReactionManagerDeletes the user reaction with given emoji to given comment.- Specified by:
deletein interfaceCommentReactionManager- Parameters:
commentId- the ID of the commentemoticon- Unicode of the emojiuserKey- the key of the user performing the operation
-
findByCommentId
Description copied from interface:CommentReactionManagerReturns all the reactions for given comment.- Specified by:
findByCommentIdin interfaceCommentReactionManager- Parameters:
commentId- the ID of the comment- Returns:
- a collection of
CommentReactionDTO
-
getReactionCount
Description copied from interface:CommentReactionManagerReturns a number of users who reacted with given emoji to given comment.- Specified by:
getReactionCountin interfaceCommentReactionManager- Parameters:
commentId- the ID of the commentemoticon- Unicode of the emoji- Returns:
- a number of users who reacted
-
findByCommentAndEmoticon
Description copied from interface:CommentReactionManagerReturns all reactions for given emoji and given comment.- Specified by:
findByCommentAndEmoticonin interfaceCommentReactionManager- Parameters:
commentId- the ID of the commentemoticon- Unicode of the emoji- Returns:
- a collections of
CommentReactionDTO
-
exists
Description copied from interface:CommentReactionManagerDetermines if the user with given key already reacted with given emoji to given comment.- Specified by:
existsin interfaceCommentReactionManager- Parameters:
commentId- the ID of the commentemoticon- Unicode of the emojiuserKey- the key of the user performing the operation- Returns:
- true if the user reacted, or false otherwise
-
deleteAllByCommentId
public void deleteAllByCommentId(long commentId) Description copied from interface:CommentReactionManagerDeletes all reactions associated with the comment with given ID.- Specified by:
deleteAllByCommentIdin interfaceCommentReactionManager- Parameters:
commentId- the ID of the comment
-