Class AbstractChangeNotes<T>

    • Method Detail

      • getChangeId

        public Change.Id getChangeId()
      • getRevision

        public org.eclipse.jgit.lib.ObjectId getRevision()
        Returns:
        revision of the metadata that was loaded.
      • load

        public T load()
      • load

        public T load​(org.eclipse.jgit.lib.Repository repo)
      • readRef

        protected org.eclipse.jgit.lib.ObjectId readRef​(org.eclipse.jgit.lib.Repository repo)
                                                 throws IOException
        Throws:
        IOException
      • openHandle

        protected AbstractChangeNotes.LoadHandle openHandle​(org.eclipse.jgit.lib.Repository repo,
                                                            org.eclipse.jgit.lib.ObjectId id)
                                                     throws NoSuchChangeException,
                                                            IOException
        Open a handle for reading this entity from a repository.

        Implementations may override this method to provide auto-rebuilding behavior.

        Parameters:
        repo - open repository.
        id - version SHA1 of the change notes to load
        Returns:
        handle for reading the entity.
        Throws:
        NoSuchChangeException - change does not exist.
        IOException - a repo-level error occurred.
      • reload

        public T reload()
      • loadRevision

        public org.eclipse.jgit.lib.ObjectId loadRevision()
      • loadDefaults

        protected abstract void loadDefaults()
        Load default values for any instance variables when NoteDb is disabled.
      • getProjectName

        public abstract Project.NameKey getProjectName()
        Returns:
        the NameKey for the project where the notes should be stored, which is not necessarily the same as the change's project.
      • getRefName

        protected abstract String getRefName()
        Returns:
        name of the reference storing this configuration.
      • self

        protected final T self()