public class CommentsInNotesUtil extends Object
Constructor and Description |
---|
CommentsInNotesUtil(AccountCache accountCache,
org.eclipse.jgit.lib.PersonIdent serverIdent) |
Modifier and Type | Method and Description |
---|---|
byte[] |
buildNote(List<com.google.gerrit.reviewdb.client.PatchLineComment> comments)
Build a note that contains the metadata for and the contents of all of the
comments in the given list of comments.
|
static String |
formatTime(org.eclipse.jgit.lib.PersonIdent ident,
Timestamp t) |
static com.google.gerrit.reviewdb.client.PatchSet.Id |
getCommentPsId(com.google.gerrit.reviewdb.client.PatchLineComment plc) |
static org.eclipse.jgit.notes.NoteMap |
parseCommentsFromNotes(org.eclipse.jgit.lib.Repository repo,
String refName,
org.eclipse.jgit.revwalk.RevWalk walk,
com.google.gerrit.reviewdb.client.Change.Id changeId,
com.google.common.collect.Multimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> commentsForBase,
com.google.common.collect.Multimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> commentsForPs,
com.google.gerrit.reviewdb.client.PatchLineComment.Status status) |
static List<com.google.gerrit.reviewdb.client.PatchLineComment> |
parseNote(byte[] note,
com.google.gerrit.reviewdb.client.Change.Id changeId,
com.google.gerrit.reviewdb.client.PatchLineComment.Status status) |
void |
removeNote(org.eclipse.jgit.notes.NoteMap noteMap,
com.google.gerrit.reviewdb.client.RevId commitId) |
void |
writeCommentsToNoteMap(org.eclipse.jgit.notes.NoteMap noteMap,
List<com.google.gerrit.reviewdb.client.PatchLineComment> allComments,
org.eclipse.jgit.lib.ObjectInserter inserter) |
@Inject public CommentsInNotesUtil(AccountCache accountCache, org.eclipse.jgit.lib.PersonIdent serverIdent)
public static org.eclipse.jgit.notes.NoteMap parseCommentsFromNotes(org.eclipse.jgit.lib.Repository repo, String refName, org.eclipse.jgit.revwalk.RevWalk walk, com.google.gerrit.reviewdb.client.Change.Id changeId, com.google.common.collect.Multimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> commentsForBase, com.google.common.collect.Multimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> commentsForPs, com.google.gerrit.reviewdb.client.PatchLineComment.Status status) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
IOException
org.eclipse.jgit.errors.ConfigInvalidException
public static List<com.google.gerrit.reviewdb.client.PatchLineComment> parseNote(byte[] note, com.google.gerrit.reviewdb.client.Change.Id changeId, com.google.gerrit.reviewdb.client.PatchLineComment.Status status) throws org.eclipse.jgit.errors.ConfigInvalidException
org.eclipse.jgit.errors.ConfigInvalidException
public static com.google.gerrit.reviewdb.client.PatchSet.Id getCommentPsId(com.google.gerrit.reviewdb.client.PatchLineComment plc)
public byte[] buildNote(List<com.google.gerrit.reviewdb.client.PatchLineComment> comments) throws com.google.gwtorm.server.OrmException, IOException
comments
- A list of the comments to be written to the returned note
byte array.
All of the comments in this list must have the same side and
must share the same PatchSet.Id.
This list must not be empty because we cannot build a note
for no comments.com.google.gwtorm.server.OrmException
IOException
public void writeCommentsToNoteMap(org.eclipse.jgit.notes.NoteMap noteMap, List<com.google.gerrit.reviewdb.client.PatchLineComment> allComments, org.eclipse.jgit.lib.ObjectInserter inserter) throws com.google.gwtorm.server.OrmException, IOException
com.google.gwtorm.server.OrmException
IOException
public void removeNote(org.eclipse.jgit.notes.NoteMap noteMap, com.google.gerrit.reviewdb.client.RevId commitId) throws IOException
IOException