public abstract class AbstractChangeUpdate extends VersionedMetaData
VersionedMetaData.BatchMetaDataUpdate
Modifier and Type | Field and Description |
---|---|
protected ChangeControl |
ctl |
protected NotesMigration |
migration |
protected com.google.gerrit.reviewdb.client.PatchSet.Id |
psId |
protected GitRepositoryManager |
repoManager |
protected org.eclipse.jgit.lib.PersonIdent |
serverIdent |
protected MetaDataUpdate.User |
updateFactory |
protected java.util.Date |
when |
inserter, newTree, reader
Modifier and Type | Method and Description |
---|---|
org.eclipse.jgit.revwalk.RevCommit |
commit(MetaDataUpdate md)
Update this metadata branch, recording a new commit on its reference.
|
com.google.gerrit.reviewdb.client.Change |
getChange() |
protected abstract com.google.gerrit.reviewdb.client.Project.NameKey |
getProjectName() |
IdentifiedUser |
getUser() |
java.util.Date |
getWhen() |
protected org.eclipse.jgit.lib.PersonIdent |
newIdent(com.google.gerrit.reviewdb.client.Account author,
java.util.Date when) |
protected void |
onLoad()
Set up the metadata, parsing any state from the loaded revision.
|
VersionedMetaData.BatchMetaDataUpdate |
openUpdate() |
VersionedMetaData.BatchMetaDataUpdate |
openUpdate(MetaDataUpdate update) |
void |
setPatchSetId(com.google.gerrit.reviewdb.client.PatchSet.Id psId) |
commitToNewRef, getObjectId, getRefName, getRevision, load, load, load, load, onSave, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
protected final NotesMigration migration
protected final GitRepositoryManager repoManager
protected final MetaDataUpdate.User updateFactory
protected final ChangeControl ctl
protected final org.eclipse.jgit.lib.PersonIdent serverIdent
protected final java.util.Date when
protected com.google.gerrit.reviewdb.client.PatchSet.Id psId
public com.google.gerrit.reviewdb.client.Change getChange()
public java.util.Date getWhen()
public IdentifiedUser getUser()
public void setPatchSetId(com.google.gerrit.reviewdb.client.PatchSet.Id psId)
public VersionedMetaData.BatchMetaDataUpdate openUpdate(MetaDataUpdate update) throws java.io.IOException
openUpdate
in class VersionedMetaData
java.io.IOException
public VersionedMetaData.BatchMetaDataUpdate openUpdate() throws java.io.IOException
java.io.IOException
public org.eclipse.jgit.revwalk.RevCommit commit(MetaDataUpdate md) throws java.io.IOException
VersionedMetaData
commit
in class VersionedMetaData
md
- helper information to define the update that will occur.java.io.IOException
- if there is a storage problem and the update cannot be
executed as requested or if it failed because of a concurrent
update to the same referenceprotected void onLoad() throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaData
onLoad
in class VersionedMetaData
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
protected org.eclipse.jgit.lib.PersonIdent newIdent(com.google.gerrit.reviewdb.client.Account author, java.util.Date when)
protected abstract com.google.gerrit.reviewdb.client.Project.NameKey getProjectName()