public abstract class AbstractChangeUpdate extends Object
Modifier and Type | Field and Description |
---|---|
protected Account.Id |
accountId |
protected org.eclipse.jgit.lib.PersonIdent |
authorIdent |
protected static org.eclipse.jgit.lib.CommitBuilder |
NO_OP_UPDATE |
protected ChangeNoteUtil |
noteUtil |
protected PatchSet.Id |
psId |
protected Account.Id |
realAccountId |
protected boolean |
rootOnly |
protected org.eclipse.jgit.lib.PersonIdent |
serverIdent |
protected Date |
when |
Modifier | Constructor and Description |
---|---|
protected |
AbstractChangeUpdate(ChangeNotes notes,
CurrentUser user,
org.eclipse.jgit.lib.PersonIdent serverIdent,
ChangeNoteUtil noteUtil,
Date when) |
protected |
AbstractChangeUpdate(ChangeNoteUtil noteUtil,
org.eclipse.jgit.lib.PersonIdent serverIdent,
ChangeNotes notes,
Change change,
Account.Id accountId,
Account.Id realAccountId,
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.
|
Account.Id |
getAccountId() |
Change |
getChange() |
Change.Id |
getId() |
ChangeNotes |
getNotes() |
Account.Id |
getNullableAccountId() |
PatchSet.Id |
getPatchSetId() |
protected abstract Project.NameKey |
getProjectName() |
protected abstract String |
getRefName() |
Date |
getWhen() |
abstract boolean |
isEmpty()
Whether no updates have been done.
|
boolean |
isRootOnly()
Wether this update can only be a root commit.
|
protected org.eclipse.jgit.lib.PersonIdent |
newIdent(Account.Id authorId,
Date when) |
void |
setPatchSetId(PatchSet.Id psId) |
protected void |
verifyComment(Comment c) |
protected final ChangeNoteUtil noteUtil
protected final Account.Id accountId
protected final Account.Id realAccountId
protected final org.eclipse.jgit.lib.PersonIdent authorIdent
protected final Date when
protected final org.eclipse.jgit.lib.PersonIdent serverIdent
protected PatchSet.Id psId
protected boolean rootOnly
protected static final org.eclipse.jgit.lib.CommitBuilder NO_OP_UPDATE
protected AbstractChangeUpdate(ChangeNotes notes, CurrentUser user, org.eclipse.jgit.lib.PersonIdent serverIdent, ChangeNoteUtil noteUtil, Date when)
protected AbstractChangeUpdate(ChangeNoteUtil noteUtil, org.eclipse.jgit.lib.PersonIdent serverIdent, ChangeNotes notes, Change change, Account.Id accountId, Account.Id realAccountId, org.eclipse.jgit.lib.PersonIdent authorIdent, Date when)
public Change.Id getId()
public ChangeNotes getNotes()
NoteDbUpdateManager
, then this reflects the state prior to the
first update in the series. A null return value can only happen when the change is being
rebuilt from NoteDb. A change that is in the process of being created will result in a
non-null return value from this method, but a null return value from AbstractChangeNotes.getRevision()
.public Change getChange()
public Date getWhen()
public PatchSet.Id getPatchSetId()
public void setPatchSetId(PatchSet.Id psId)
public Account.Id getAccountId()
public Account.Id getNullableAccountId()
protected org.eclipse.jgit.lib.PersonIdent newIdent(Account.Id authorId, Date when)
public abstract boolean isEmpty()
public boolean isRootOnly()
protected abstract 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 IOException
ins
- inserter to write to; callers should not flush.isEmpty()
), return the
sentinel NO_OP_UPDATE
.IOException
- if a lower-level error occurred.public boolean allowWriteToNewRef()
protected void verifyComment(Comment c)