public abstract class AbstractChangeNotes<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractChangeNotes.Args |
static class |
AbstractChangeNotes.LoadHandle |
Modifier and Type | Field and Description |
---|---|
protected AbstractChangeNotes.Args |
args |
protected boolean |
autoRebuild |
protected NoteDbChangeState.PrimaryStorage |
primaryStorage |
Modifier and Type | Method and Description |
---|---|
Change.Id |
getChangeId() |
abstract Project.NameKey |
getProjectName() |
protected abstract java.lang.String |
getRefName() |
org.eclipse.jgit.lib.ObjectId |
getRevision() |
T |
load() |
protected abstract void |
loadDefaults()
Load default values for any instance variables when NoteDb is disabled.
|
org.eclipse.jgit.lib.ObjectId |
loadRevision() |
protected abstract void |
onLoad(AbstractChangeNotes.LoadHandle handle)
Set up the metadata, parsing any state from the loaded revision.
|
protected AbstractChangeNotes.LoadHandle |
openHandle(org.eclipse.jgit.lib.Repository repo)
Open a handle for reading this entity from a repository.
|
protected AbstractChangeNotes.LoadHandle |
openHandle(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.lib.ObjectId id) |
protected org.eclipse.jgit.lib.ObjectId |
readRef(org.eclipse.jgit.lib.Repository repo) |
T |
reload() |
protected T |
self() |
protected final AbstractChangeNotes.Args args
protected final NoteDbChangeState.PrimaryStorage primaryStorage
protected final boolean autoRebuild
public Change.Id getChangeId()
public org.eclipse.jgit.lib.ObjectId getRevision()
public T load() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
protected org.eclipse.jgit.lib.ObjectId readRef(org.eclipse.jgit.lib.Repository repo) throws java.io.IOException
java.io.IOException
protected AbstractChangeNotes.LoadHandle openHandle(org.eclipse.jgit.lib.Repository repo) throws NoSuchChangeException, java.io.IOException
Implementations may override this method to provide auto-rebuilding behavior.
repo
- open repository.NoSuchChangeException
- change does not exist.java.io.IOException
- a repo-level error occurred.protected AbstractChangeNotes.LoadHandle openHandle(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectId id)
public T reload() throws NoSuchChangeException, com.google.gwtorm.server.OrmException
NoSuchChangeException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.ObjectId loadRevision() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
protected abstract void loadDefaults()
public abstract Project.NameKey getProjectName()
protected abstract java.lang.String getRefName()
protected abstract void onLoad(AbstractChangeNotes.LoadHandle handle) throws NoSuchChangeException, java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
NoSuchChangeException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
protected final T self()