Package com.atlassian.jira.issue.index
Class DefaultCommentRetriever
java.lang.Object
com.atlassian.jira.issue.index.DefaultCommentRetriever
- All Implemented Interfaces:
DefaultIssueIndexer.CommentRetriever,DefaultIssueIndexer.EntityRetriever<Comment>,CommentRetriever
public class DefaultCommentRetriever
extends Object
implements DefaultIssueIndexer.CommentRetriever, CommentRetriever
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCommentRetriever(JiraProperties jiraProperties, CommentManager commentManager, EntityVersioningManager entityVersioningManager, IndexingLimitsStats indexingLimitsStats) -
Method Summary
Modifier and TypeMethodDescriptionretrieve(EntityWithVersion<Issue> issueWithVersion) Retrieves comments for the given issue.retrieveById(Long commentId) Retrieves a comment by its ID.
-
Constructor Details
-
DefaultCommentRetriever
public DefaultCommentRetriever(@Nonnull JiraProperties jiraProperties, @Nonnull CommentManager commentManager, @Nonnull EntityVersioningManager entityVersioningManager, @Nonnull IndexingLimitsStats indexingLimitsStats)
-
-
Method Details
-
retrieve
- Specified by:
retrievein interfaceDefaultIssueIndexer.EntityRetriever<Comment>
-
retrieveById
Description copied from interface:CommentRetrieverRetrieves a comment by its ID.- Specified by:
retrieveByIdin interfaceCommentRetriever- Specified by:
retrieveByIdin interfaceDefaultIssueIndexer.CommentRetriever- Parameters:
commentId- the ID of the comment to retrieve- Returns:
- an Optional containing the comment if found, or empty if not found
-
retrieve
Description copied from interface:CommentRetrieverRetrieves comments for the given issue.- Specified by:
retrievein interfaceCommentRetriever- Parameters:
issue- the issue for which comments are to be retrieved- Returns:
- a list of comments associated with the issue, sorted by creation date in descending order
-