public abstract class AbstractChangeNotes<T> extends 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 |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractChangeNotes(AbstractChangeNotes.Args args,
Change.Id changeId) |
| Modifier and Type | Method and Description |
|---|---|
Change.Id |
getChangeId() |
abstract Project.NameKey |
getProjectName() |
protected abstract 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 AbstractChangeNotes(AbstractChangeNotes.Args args, Change.Id changeId)
public Change.Id getChangeId()
public org.eclipse.jgit.lib.ObjectId getRevision()
public T load()
protected org.eclipse.jgit.lib.ObjectId readRef(org.eclipse.jgit.lib.Repository repo)
throws IOException
IOExceptionprotected AbstractChangeNotes.LoadHandle openHandle(org.eclipse.jgit.lib.Repository repo) throws NoSuchChangeException, IOException
Implementations may override this method to provide auto-rebuilding behavior.
repo - open repository.NoSuchChangeException - change does not exist.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()
public org.eclipse.jgit.lib.ObjectId loadRevision()
protected abstract void loadDefaults()
public abstract Project.NameKey getProjectName()
protected abstract String getRefName()
protected abstract void onLoad(AbstractChangeNotes.LoadHandle handle) throws NoSuchChangeException, IOException, org.eclipse.jgit.errors.ConfigInvalidException
NoSuchChangeExceptionIOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionprotected final T self()