public class ChangeUpdate extends AbstractChangeUpdate
This delta becomes a single commit on the notes branch, so there are limitations on the set of modifications that can be handled in a single update. In particular, there is a single author and timestamp for each update.
This class is not thread-safe.
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeUpdate.Factory |
VersionedMetaData.BatchMetaDataUpdate
ctl, migration, psId, repoManager, serverIdent, updateFactory, when
inserter, newTree, reader
Modifier and Type | Method and Description |
---|---|
org.eclipse.jgit.revwalk.RevCommit |
commit() |
protected com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
protected java.lang.String |
getRefName() |
protected boolean |
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.
|
void |
putApproval(java.lang.String label,
short value) |
void |
putComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) |
void |
putReviewer(com.google.gerrit.reviewdb.client.Account.Id reviewer,
ReviewerState type) |
void |
removeApproval(java.lang.String label) |
void |
removeReviewer(com.google.gerrit.reviewdb.client.Account.Id reviewer) |
void |
setChangeMessage(java.lang.String changeMessage) |
void |
setStatus(com.google.gerrit.reviewdb.client.Change.Status status) |
void |
setSubject(java.lang.String subject) |
void |
submit(java.lang.Iterable<com.google.gerrit.common.data.SubmitRecord> submitRecords) |
commit, getChange, getUser, getWhen, newIdent, onLoad, openUpdate, openUpdate, setPatchSetId
commitToNewRef, getObjectId, getRevision, load, load, load, load, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
public void setStatus(com.google.gerrit.reviewdb.client.Change.Status status)
public void putApproval(java.lang.String label, short value)
public void removeApproval(java.lang.String label)
public void submit(java.lang.Iterable<com.google.gerrit.common.data.SubmitRecord> submitRecords)
public void setSubject(java.lang.String subject)
public void setChangeMessage(java.lang.String changeMessage)
public void putComment(com.google.gerrit.reviewdb.client.PatchLineComment comment)
public void putReviewer(com.google.gerrit.reviewdb.client.Account.Id reviewer, ReviewerState type)
public void removeReviewer(com.google.gerrit.reviewdb.client.Account.Id reviewer)
public org.eclipse.jgit.revwalk.RevCommit commit() throws java.io.IOException
java.io.IOException
protected java.lang.String getRefName()
getRefName
in class VersionedMetaData
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 AbstractChangeUpdate