public class ChangeUpdate extends AbstractChangeUpdate
This delta will become two unique commits: one in the AllUsers repo that will contain the draft comments on this change and one in the notes branch that will contain approvals, reviewers, change status, subject, submit records, the change message, and published comments. 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
anonymousCowardName, ctl, migration, psId, repoManager, serverIdent, updateFactory, when
inserter, newTree, reader
Modifier and Type | Method and Description |
---|---|
org.eclipse.jgit.revwalk.RevCommit |
commit() |
void |
deleteComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) |
protected com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
protected java.lang.String |
getRefName() |
void |
insertComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) |
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 |
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 |
setHashtags(java.util.Set<java.lang.String> hashtags) |
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) |
void |
updateComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) |
void |
upsertComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) |
void |
writeCommit(VersionedMetaData.BatchMetaDataUpdate batch)
Writes commit to a BatchMetaDataUpdate without committing the batch.
|
commit, getChange, getChangeNotes, getPatchSetId, getUser, getWhen, newIdent, onLoad, openUpdate, openUpdate, openUpdateInBatch, setInserter, 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 insertComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void upsertComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void updateComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void deleteComment(com.google.gerrit.reviewdb.client.PatchLineComment comment) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void setHashtags(java.util.Set<java.lang.String> hashtags)
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
public void writeCommit(VersionedMetaData.BatchMetaDataUpdate batch) throws com.google.gwtorm.server.OrmException, java.io.IOException
AbstractChangeUpdate
writeCommit
in class AbstractChangeUpdate
com.google.gwtorm.server.OrmException
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