public abstract class AbstractChangeUpdate
extends java.lang.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 java.util.Date |
when |
Modifier | Constructor and Description |
---|---|
protected |
AbstractChangeUpdate(ChangeNotes notes,
CurrentUser user,
org.eclipse.jgit.lib.PersonIdent serverIdent,
ChangeNoteUtil noteUtil,
java.util.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,
java.util.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 java.lang.String |
getRefName() |
java.util.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,
java.util.Date when) |
protected void |
setParentCommit(org.eclipse.jgit.lib.CommitBuilder cb,
org.eclipse.jgit.lib.ObjectId parentCommitId) |
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 java.util.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, java.util.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, java.util.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 java.util.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, java.util.Date when)
public abstract boolean isEmpty()
public boolean isRootOnly()
protected abstract Project.NameKey getProjectName()
protected abstract java.lang.String getRefName()
protected void setParentCommit(org.eclipse.jgit.lib.CommitBuilder cb, org.eclipse.jgit.lib.ObjectId parentCommitId)
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 java.io.IOException
ins
- inserter to write to; callers should not flush.isEmpty()
), return the
sentinel NO_OP_UPDATE
.java.io.IOException
- if a lower-level error occurred.public boolean allowWriteToNewRef()
protected void verifyComment(Comment c)