Package com.google.gerrit.server
Interface DraftCommentsReader
- All Known Implementing Classes:
DraftCommentsNotesReader
public interface DraftCommentsReader
-
Method Summary
Modifier and TypeMethodDescriptiongetChangesWithDrafts
(Account.Id author) Returns all changes that contain draft comments ofauthor
.getDraftComment
(ChangeNotes notes, IdentifiedUser author, Comment.Key key) Returns a single draft of the provided change, that was written byauthor
and has the givenkey
, orOptional::empty
if there is no such comment.getDraftsByChangeAndDraftAuthor
(Change.Id changeId, Account.Id author) Returns all drafts of the provided change, that were written byauthor
.getDraftsByChangeAndDraftAuthor
(ChangeNotes notes, Account.Id author) Returns all drafts of the provided change, that were written byauthor
.Returns all drafts of the provided change, regardless of the author.getDraftsByPatchSetAndDraftAuthor
(ChangeNotes notes, PatchSet.Id psId, Account.Id author) Returns all drafts of the provided patch set, that were written byauthor
.getUsersWithDrafts
(ChangeNotes changeNotes) Returns all users that have any draft comments on the provided change.
-
Method Details
-
getDraftComment
Returns a single draft of the provided change, that was written byauthor
and has the givenkey
, orOptional::empty
if there is no such comment. -
getDraftsByChangeAndDraftAuthor
Returns all drafts of the provided change, that were written byauthor
. The comments are sorted byCommentsUtil.COMMENT_ORDER
. -
getDraftsByChangeAndDraftAuthor
Returns all drafts of the provided change, that were written byauthor
. The comments are sorted byCommentsUtil.COMMENT_ORDER
.If you already have a ChangeNotes instance, consider using
getDraftsByChangeAndDraftAuthor(ChangeNotes, Account.Id)
instead. -
getDraftsByPatchSetAndDraftAuthor
List<HumanComment> getDraftsByPatchSetAndDraftAuthor(ChangeNotes notes, PatchSet.Id psId, Account.Id author) Returns all drafts of the provided patch set, that were written byauthor
. The comments are sorted byCommentsUtil.COMMENT_ORDER
. -
getDraftsByChangeForAllAuthors
Returns all drafts of the provided change, regardless of the author. The comments are sorted byCommentsUtil.COMMENT_ORDER
. -
getUsersWithDrafts
Returns all users that have any draft comments on the provided change. -
getChangesWithDrafts
Returns all changes that contain draft comments ofauthor
.
-