public class CommentsInNotesUtil
extends java.lang.Object
Constructor and Description |
---|
CommentsInNotesUtil(AccountCache accountCache,
org.eclipse.jgit.lib.PersonIdent serverIdent) |
Modifier and Type | Method and Description |
---|---|
byte[] |
buildNote(java.util.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 java.lang.String |
formatTime(org.eclipse.jgit.lib.PersonIdent ident,
java.sql.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,
java.lang.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 java.util.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,
java.util.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, java.lang.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 java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public static java.util.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 java.lang.String formatTime(org.eclipse.jgit.lib.PersonIdent ident, java.sql.Timestamp t)
public static com.google.gerrit.reviewdb.client.PatchSet.Id getCommentPsId(com.google.gerrit.reviewdb.client.PatchLineComment plc)
public byte[] buildNote(java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> comments) throws com.google.gwtorm.server.OrmException, java.io.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
java.io.IOException
public void writeCommentsToNoteMap(org.eclipse.jgit.notes.NoteMap noteMap, java.util.List<com.google.gerrit.reviewdb.client.PatchLineComment> allComments, org.eclipse.jgit.lib.ObjectInserter inserter) throws com.google.gwtorm.server.OrmException, java.io.IOException
com.google.gwtorm.server.OrmException
java.io.IOException
public void removeNote(org.eclipse.jgit.notes.NoteMap noteMap, com.google.gerrit.reviewdb.client.RevId commitId) throws java.io.IOException
java.io.IOException