public class ChangeDraftUpdate extends AbstractChangeUpdate
This delta contains only draft comments on a single patch set of a change by a single author. This delta will become a single commit in the All-Users repository.
This class is not thread safe.
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeDraftUpdate.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 c) |
void |
deleteCommentIfPresent(com.google.gerrit.reviewdb.client.PatchLineComment c)
Deletes a PatchLineComment from the list of drafts only if it existed
previously as a draft.
|
protected com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
protected java.lang.String |
getRefName() |
void |
insertComment(com.google.gerrit.reviewdb.client.PatchLineComment c) |
protected boolean |
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.
|
void |
updateComment(com.google.gerrit.reviewdb.client.PatchLineComment c) |
void |
upsertComment(com.google.gerrit.reviewdb.client.PatchLineComment c) |
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 insertComment(com.google.gerrit.reviewdb.client.PatchLineComment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void upsertComment(com.google.gerrit.reviewdb.client.PatchLineComment c)
public void updateComment(com.google.gerrit.reviewdb.client.PatchLineComment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void deleteComment(com.google.gerrit.reviewdb.client.PatchLineComment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void deleteCommentIfPresent(com.google.gerrit.reviewdb.client.PatchLineComment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
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 com.google.gerrit.reviewdb.client.Project.NameKey getProjectName()
getProjectName
in class AbstractChangeUpdate
protected java.lang.String getRefName()
getRefName
in class VersionedMetaData
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaData
onSave
in class VersionedMetaData
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException