public class ChangeNotes extends AbstractChangeNotes<ChangeNotes>
Change
based on the log of its notes branch.Modifier and Type | Class and Description |
---|---|
static class |
ChangeNotes.Factory |
VersionedMetaData.BatchMetaDataUpdate
Modifier and Type | Field and Description |
---|---|
static com.google.common.collect.Ordering<com.google.gerrit.reviewdb.client.ChangeMessage> |
MESSAGE_BY_TIME |
static java.util.Comparator<com.google.gerrit.reviewdb.client.PatchLineComment> |
PLC_ORDER |
migration, repoManager
inserter, newTree, reader
Constructor and Description |
---|
ChangeNotes(GitRepositoryManager repoManager,
NotesMigration migration,
AllUsersNameProvider allUsersProvider,
com.google.gerrit.reviewdb.client.Change change) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsComment(com.google.gerrit.reviewdb.client.PatchLineComment c) |
boolean |
containsCommentPublished(com.google.gerrit.reviewdb.client.PatchLineComment c) |
com.google.common.collect.ImmutableList<com.google.gerrit.reviewdb.client.Account.Id> |
getAllPastReviewers() |
com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchSetApproval> |
getApprovals() |
com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> |
getBaseComments() |
com.google.gerrit.reviewdb.client.Change |
getChange() |
com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.ChangeMessage> |
getChangeMessages() |
com.google.common.collect.Table<com.google.gerrit.reviewdb.client.PatchSet.Id,java.lang.String,com.google.gerrit.reviewdb.client.PatchLineComment> |
getDraftBaseComments(com.google.gerrit.reviewdb.client.Account.Id author) |
com.google.common.collect.Table<com.google.gerrit.reviewdb.client.PatchSet.Id,java.lang.String,com.google.gerrit.reviewdb.client.PatchLineComment> |
getDraftPsComments(com.google.gerrit.reviewdb.client.Account.Id author) |
com.google.common.collect.ImmutableSet<java.lang.String> |
getHashtags() |
com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> |
getPatchSetComments() |
protected com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
protected java.lang.String |
getRefName() |
com.google.common.collect.ImmutableSetMultimap<ReviewerState,com.google.gerrit.reviewdb.client.Account.Id> |
getReviewers() |
com.google.common.collect.ImmutableList<com.google.gerrit.common.data.SubmitRecord> |
getSubmitRecords() |
protected void |
loadDefaults()
Load default values for any instance variables when notedb is disabled.
|
protected void |
onLoad()
Set up the metadata, parsing any state from the loaded revision.
|
protected boolean |
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.
|
static org.eclipse.jgit.errors.ConfigInvalidException |
parseException(com.google.gerrit.reviewdb.client.Change.Id changeId,
java.lang.String fmt,
java.lang.Object... args) |
static com.google.gerrit.reviewdb.client.Account.Id |
parseIdent(org.eclipse.jgit.lib.PersonIdent ident,
com.google.gerrit.reviewdb.client.Change.Id changeId) |
getChangeId, load, loadRevision, self
commit, commitToNewRef, getObjectId, getRevision, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
public static final com.google.common.collect.Ordering<com.google.gerrit.reviewdb.client.ChangeMessage> MESSAGE_BY_TIME
public static final java.util.Comparator<com.google.gerrit.reviewdb.client.PatchLineComment> PLC_ORDER
public ChangeNotes(GitRepositoryManager repoManager, NotesMigration migration, AllUsersNameProvider allUsersProvider, com.google.gerrit.reviewdb.client.Change change)
public static org.eclipse.jgit.errors.ConfigInvalidException parseException(com.google.gerrit.reviewdb.client.Change.Id changeId, java.lang.String fmt, java.lang.Object... args)
public static com.google.gerrit.reviewdb.client.Account.Id parseIdent(org.eclipse.jgit.lib.PersonIdent ident, com.google.gerrit.reviewdb.client.Change.Id changeId) throws org.eclipse.jgit.errors.ConfigInvalidException
org.eclipse.jgit.errors.ConfigInvalidException
public com.google.gerrit.reviewdb.client.Change getChange()
public com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchSetApproval> getApprovals()
public com.google.common.collect.ImmutableSetMultimap<ReviewerState,com.google.gerrit.reviewdb.client.Account.Id> getReviewers()
public com.google.common.collect.ImmutableSet<java.lang.String> getHashtags()
public com.google.common.collect.ImmutableList<com.google.gerrit.reviewdb.client.Account.Id> getAllPastReviewers()
public com.google.common.collect.ImmutableList<com.google.gerrit.common.data.SubmitRecord> getSubmitRecords()
public com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.ChangeMessage> getChangeMessages()
public com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> getBaseComments()
public com.google.common.collect.ImmutableListMultimap<com.google.gerrit.reviewdb.client.PatchSet.Id,com.google.gerrit.reviewdb.client.PatchLineComment> getPatchSetComments()
public com.google.common.collect.Table<com.google.gerrit.reviewdb.client.PatchSet.Id,java.lang.String,com.google.gerrit.reviewdb.client.PatchLineComment> getDraftBaseComments(com.google.gerrit.reviewdb.client.Account.Id author) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.Table<com.google.gerrit.reviewdb.client.PatchSet.Id,java.lang.String,com.google.gerrit.reviewdb.client.PatchLineComment> getDraftPsComments(com.google.gerrit.reviewdb.client.Account.Id author) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean containsComment(com.google.gerrit.reviewdb.client.PatchLineComment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean containsCommentPublished(com.google.gerrit.reviewdb.client.PatchLineComment c)
protected java.lang.String getRefName()
getRefName
in class VersionedMetaData
protected void onLoad() throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaData
onLoad
in class VersionedMetaData
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
protected void loadDefaults()
AbstractChangeNotes
loadDefaults
in class AbstractChangeNotes<ChangeNotes>
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit)
VersionedMetaData
onSave
in class VersionedMetaData
protected com.google.gerrit.reviewdb.client.Project.NameKey getProjectName()
getProjectName
in class AbstractChangeNotes<ChangeNotes>