public abstract class AbstractChangeUpdate extends Object
Modifier and Type | Field and Description |
---|---|
protected com.google.gerrit.reviewdb.client.Account.Id |
accountId |
protected String |
anonymousCowardName |
protected org.eclipse.jgit.lib.PersonIdent |
authorIdent |
protected NotesMigration |
migration |
protected static org.eclipse.jgit.lib.CommitBuilder |
NO_OP_UPDATE |
protected ChangeNoteUtil |
noteUtil |
protected com.google.gerrit.reviewdb.client.PatchSet.Id |
psId |
protected Date |
when |
Modifier | Constructor and Description |
---|---|
protected |
AbstractChangeUpdate(NotesMigration migration,
ChangeControl ctl,
org.eclipse.jgit.lib.PersonIdent serverIdent,
String anonymousCowardName,
ChangeNoteUtil noteUtil,
Date when) |
protected |
AbstractChangeUpdate(NotesMigration migration,
ChangeNoteUtil noteUtil,
org.eclipse.jgit.lib.PersonIdent serverIdent,
String anonymousCowardName,
ChangeNotes notes,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account.Id accountId,
org.eclipse.jgit.lib.PersonIdent authorIdent,
Date when) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowWriteToNewRef() |
protected abstract org.eclipse.jgit.lib.CommitBuilder |
applyImpl(org.eclipse.jgit.revwalk.RevWalk rw,
org.eclipse.jgit.lib.ObjectInserter ins,
org.eclipse.jgit.lib.ObjectId curr)
Create a commit containing the contents of this update.
|
com.google.gerrit.reviewdb.client.Account.Id |
getAccountId() |
com.google.gerrit.reviewdb.client.Change |
getChange() |
com.google.gerrit.reviewdb.client.Change.Id |
getId() |
ChangeNotes |
getNotes() |
com.google.gerrit.reviewdb.client.Account.Id |
getNullableAccountId() |
com.google.gerrit.reviewdb.client.PatchSet.Id |
getPatchSetId() |
protected abstract com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
protected abstract String |
getRefName() |
Date |
getWhen() |
abstract boolean |
isEmpty()
Whether no updates have been done.
|
protected org.eclipse.jgit.lib.PersonIdent |
newIdent(com.google.gerrit.reviewdb.client.Account author,
Date when) |
void |
setPatchSetId(com.google.gerrit.reviewdb.client.PatchSet.Id psId) |
protected final NotesMigration migration
protected final ChangeNoteUtil noteUtil
protected final String anonymousCowardName
protected final com.google.gerrit.reviewdb.client.Account.Id accountId
protected final org.eclipse.jgit.lib.PersonIdent authorIdent
protected final Date when
protected com.google.gerrit.reviewdb.client.PatchSet.Id psId
protected static final org.eclipse.jgit.lib.CommitBuilder NO_OP_UPDATE
protected AbstractChangeUpdate(NotesMigration migration, ChangeControl ctl, org.eclipse.jgit.lib.PersonIdent serverIdent, String anonymousCowardName, ChangeNoteUtil noteUtil, Date when)
protected AbstractChangeUpdate(NotesMigration migration, ChangeNoteUtil noteUtil, org.eclipse.jgit.lib.PersonIdent serverIdent, String anonymousCowardName, ChangeNotes notes, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account.Id accountId, org.eclipse.jgit.lib.PersonIdent authorIdent, Date when)
public com.google.gerrit.reviewdb.client.Change.Id getId()
public ChangeNotes getNotes()
public com.google.gerrit.reviewdb.client.Change getChange()
public Date getWhen()
public com.google.gerrit.reviewdb.client.PatchSet.Id getPatchSetId()
public void setPatchSetId(com.google.gerrit.reviewdb.client.PatchSet.Id psId)
public com.google.gerrit.reviewdb.client.Account.Id getAccountId()
public com.google.gerrit.reviewdb.client.Account.Id getNullableAccountId()
protected org.eclipse.jgit.lib.PersonIdent newIdent(com.google.gerrit.reviewdb.client.Account author, Date when)
public abstract boolean isEmpty()
protected abstract com.google.gerrit.reviewdb.client.Project.NameKey getProjectName()
protected abstract String getRefName()
protected abstract org.eclipse.jgit.lib.CommitBuilder applyImpl(org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.ObjectInserter ins, org.eclipse.jgit.lib.ObjectId curr) throws com.google.gwtorm.server.OrmException, IOException
ins
- inserter to write to; callers should not flush.isEmpty()
), return the sentinel NO_OP_UPDATE
.com.google.gwtorm.server.OrmException
- if a Gerrit-level error occurred.IOException
- if a lower-level error occurred.public boolean allowWriteToNewRef()