Class DelegateRepository

java.lang.Object
org.eclipse.jgit.lib.Repository
com.google.gerrit.server.git.DelegateRepository
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
PermissionAwareRepository

public class DelegateRepository extends org.eclipse.jgit.lib.Repository
Wrapper around Repository that delegates all calls to the wrapped Repository.
  • Field Details

    • delegate

      protected final org.eclipse.jgit.lib.Repository delegate
  • Constructor Details

    • DelegateRepository

      protected DelegateRepository(org.eclipse.jgit.lib.Repository delegate)
  • Method Details

    • delegate

      public org.eclipse.jgit.lib.Repository delegate()
      Returns the wrapped Repository instance.
    • create

      public void create(boolean bare) throws IOException
      Specified by:
      create in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getIdentifier

      public String getIdentifier()
      Specified by:
      getIdentifier in class org.eclipse.jgit.lib.Repository
    • getObjectDatabase

      public org.eclipse.jgit.lib.ObjectDatabase getObjectDatabase()
      Specified by:
      getObjectDatabase in class org.eclipse.jgit.lib.Repository
    • getRefDatabase

      public org.eclipse.jgit.lib.RefDatabase getRefDatabase()
      Specified by:
      getRefDatabase in class org.eclipse.jgit.lib.Repository
    • getConfig

      public org.eclipse.jgit.lib.StoredConfig getConfig()
      Specified by:
      getConfig in class org.eclipse.jgit.lib.Repository
    • createAttributesNodeProvider

      public org.eclipse.jgit.attributes.AttributesNodeProvider createAttributesNodeProvider()
      Specified by:
      createAttributesNodeProvider in class org.eclipse.jgit.lib.Repository
    • scanForRepoChanges

      public void scanForRepoChanges() throws IOException
      Specified by:
      scanForRepoChanges in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • notifyIndexChanged

      public void notifyIndexChanged(boolean internal)
      Specified by:
      notifyIndexChanged in class org.eclipse.jgit.lib.Repository
    • getReflogReader

      public org.eclipse.jgit.lib.ReflogReader getReflogReader(String refName) throws IOException
      Specified by:
      getReflogReader in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getListenerList

      public org.eclipse.jgit.events.ListenerList getListenerList()
      Overrides:
      getListenerList in class org.eclipse.jgit.lib.Repository
    • fireEvent

      public void fireEvent(org.eclipse.jgit.events.RepositoryEvent<?> event)
      Overrides:
      fireEvent in class org.eclipse.jgit.lib.Repository
    • create

      public void create() throws IOException
      Overrides:
      create in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getDirectory

      public File getDirectory()
      Overrides:
      getDirectory in class org.eclipse.jgit.lib.Repository
    • newObjectInserter

      public org.eclipse.jgit.lib.ObjectInserter newObjectInserter()
      Overrides:
      newObjectInserter in class org.eclipse.jgit.lib.Repository
    • newObjectReader

      public org.eclipse.jgit.lib.ObjectReader newObjectReader()
      Overrides:
      newObjectReader in class org.eclipse.jgit.lib.Repository
    • getFS

      public org.eclipse.jgit.util.FS getFS()
      Overrides:
      getFS in class org.eclipse.jgit.lib.Repository
    • hasObject

      @Deprecated public boolean hasObject(org.eclipse.jgit.lib.AnyObjectId objectId)
      Deprecated.
      Overrides:
      hasObject in class org.eclipse.jgit.lib.Repository
    • open

      public org.eclipse.jgit.lib.ObjectLoader open(org.eclipse.jgit.lib.AnyObjectId objectId, int typeHint) throws org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, IOException
      Overrides:
      open in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.MissingObjectException
      org.eclipse.jgit.errors.IncorrectObjectTypeException
      IOException
    • incrementOpen

      public void incrementOpen()
      Overrides:
      incrementOpen in class org.eclipse.jgit.lib.Repository
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class org.eclipse.jgit.lib.Repository
    • getFullBranch

      public String getFullBranch() throws IOException
      Overrides:
      getFullBranch in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getBranch

      public String getBranch() throws IOException
      Overrides:
      getBranch in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getAllRefs

      @Deprecated public Map<String,org.eclipse.jgit.lib.Ref> getAllRefs()
      Deprecated.
      Overrides:
      getAllRefs in class org.eclipse.jgit.lib.Repository
    • getTags

      @Deprecated public Map<String,org.eclipse.jgit.lib.Ref> getTags()
      Deprecated.
      Overrides:
      getTags in class org.eclipse.jgit.lib.Repository
    • lockDirCache

      public org.eclipse.jgit.dircache.DirCache lockDirCache() throws org.eclipse.jgit.errors.NoWorkTreeException, org.eclipse.jgit.errors.CorruptObjectException, IOException
      Overrides:
      lockDirCache in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.NoWorkTreeException
      org.eclipse.jgit.errors.CorruptObjectException
      IOException
    • autoGC

      public void autoGC(org.eclipse.jgit.lib.ProgressMonitor monitor)
      Overrides:
      autoGC in class org.eclipse.jgit.lib.Repository
    • getAdditionalHaves

      public Set<org.eclipse.jgit.lib.ObjectId> getAdditionalHaves() throws IOException
      Overrides:
      getAdditionalHaves in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getAllRefsByPeeledObjectId

      public Map<org.eclipse.jgit.lib.AnyObjectId,Set<org.eclipse.jgit.lib.Ref>> getAllRefsByPeeledObjectId() throws IOException
      Overrides:
      getAllRefsByPeeledObjectId in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getIndexFile

      public File getIndexFile() throws org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      getIndexFile in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.NoWorkTreeException
    • getRepositoryState

      public org.eclipse.jgit.lib.RepositoryState getRepositoryState()
      Overrides:
      getRepositoryState in class org.eclipse.jgit.lib.Repository
    • isBare

      public boolean isBare()
      Overrides:
      isBare in class org.eclipse.jgit.lib.Repository
    • getWorkTree

      public File getWorkTree() throws org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      getWorkTree in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.NoWorkTreeException
    • getRemoteName

      public String getRemoteName(String refName)
      Overrides:
      getRemoteName in class org.eclipse.jgit.lib.Repository
    • getGitwebDescription

      public String getGitwebDescription() throws IOException
      Overrides:
      getGitwebDescription in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • getRemoteNames

      public Set<String> getRemoteNames()
      Overrides:
      getRemoteNames in class org.eclipse.jgit.lib.Repository
    • open

      public org.eclipse.jgit.lib.ObjectLoader open(org.eclipse.jgit.lib.AnyObjectId objectId) throws org.eclipse.jgit.errors.MissingObjectException, IOException
      Overrides:
      open in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.MissingObjectException
      IOException
    • updateRef

      public org.eclipse.jgit.lib.RefUpdate updateRef(String ref) throws IOException
      Overrides:
      updateRef in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • updateRef

      public org.eclipse.jgit.lib.RefUpdate updateRef(String ref, boolean detach) throws IOException
      Overrides:
      updateRef in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • renameRef

      public org.eclipse.jgit.lib.RefRename renameRef(String fromRef, String toRef) throws IOException
      Overrides:
      renameRef in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • resolve

      public org.eclipse.jgit.lib.ObjectId resolve(String revstr) throws org.eclipse.jgit.errors.AmbiguousObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, org.eclipse.jgit.errors.RevisionSyntaxException, IOException
      Overrides:
      resolve in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.AmbiguousObjectException
      org.eclipse.jgit.errors.IncorrectObjectTypeException
      org.eclipse.jgit.errors.RevisionSyntaxException
      IOException
    • simplify

      public String simplify(String revstr) throws org.eclipse.jgit.errors.AmbiguousObjectException, IOException
      Overrides:
      simplify in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.AmbiguousObjectException
      IOException
    • peel

      @Deprecated public org.eclipse.jgit.lib.Ref peel(org.eclipse.jgit.lib.Ref ref)
      Deprecated.
      Overrides:
      peel in class org.eclipse.jgit.lib.Repository
    • parseCommit

      public org.eclipse.jgit.revwalk.RevCommit parseCommit(org.eclipse.jgit.lib.AnyObjectId id) throws org.eclipse.jgit.errors.IncorrectObjectTypeException, IOException, org.eclipse.jgit.errors.MissingObjectException
      Overrides:
      parseCommit in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.IncorrectObjectTypeException
      IOException
      org.eclipse.jgit.errors.MissingObjectException
    • readDirCache

      public org.eclipse.jgit.dircache.DirCache readDirCache() throws org.eclipse.jgit.errors.NoWorkTreeException, org.eclipse.jgit.errors.CorruptObjectException, IOException
      Overrides:
      readDirCache in class org.eclipse.jgit.lib.Repository
      Throws:
      org.eclipse.jgit.errors.NoWorkTreeException
      org.eclipse.jgit.errors.CorruptObjectException
      IOException
    • shortenRemoteBranchName

      public String shortenRemoteBranchName(String refName)
      Overrides:
      shortenRemoteBranchName in class org.eclipse.jgit.lib.Repository
    • setGitwebDescription

      public void setGitwebDescription(String description) throws IOException
      Overrides:
      setGitwebDescription in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readMergeCommitMsg

      public String readMergeCommitMsg() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readMergeCommitMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • writeMergeCommitMsg

      public void writeMergeCommitMsg(String msg) throws IOException
      Overrides:
      writeMergeCommitMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readCommitEditMsg

      public String readCommitEditMsg() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readCommitEditMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • writeCommitEditMsg

      public void writeCommitEditMsg(String msg) throws IOException
      Overrides:
      writeCommitEditMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readMergeHeads

      public List<org.eclipse.jgit.lib.ObjectId> readMergeHeads() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readMergeHeads in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • writeMergeHeads

      public void writeMergeHeads(List<? extends org.eclipse.jgit.lib.ObjectId> heads) throws IOException
      Overrides:
      writeMergeHeads in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readCherryPickHead

      public org.eclipse.jgit.lib.ObjectId readCherryPickHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readCherryPickHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • readRevertHead

      public org.eclipse.jgit.lib.ObjectId readRevertHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readRevertHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • writeCherryPickHead

      public void writeCherryPickHead(org.eclipse.jgit.lib.ObjectId head) throws IOException
      Overrides:
      writeCherryPickHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • writeRevertHead

      public void writeRevertHead(org.eclipse.jgit.lib.ObjectId head) throws IOException
      Overrides:
      writeRevertHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • writeOrigHead

      public void writeOrigHead(org.eclipse.jgit.lib.ObjectId head) throws IOException
      Overrides:
      writeOrigHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readOrigHead

      public org.eclipse.jgit.lib.ObjectId readOrigHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
      Overrides:
      readOrigHead in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
      org.eclipse.jgit.errors.NoWorkTreeException
    • readSquashCommitMsg

      public String readSquashCommitMsg() throws IOException
      Overrides:
      readSquashCommitMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • writeSquashCommitMsg

      public void writeSquashCommitMsg(String msg) throws IOException
      Overrides:
      writeSquashCommitMsg in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • readRebaseTodo

      public List<org.eclipse.jgit.lib.RebaseTodoLine> readRebaseTodo(String path, boolean includeComments) throws IOException
      Overrides:
      readRebaseTodo in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • writeRebaseTodoFile

      public void writeRebaseTodoFile(String path, List<org.eclipse.jgit.lib.RebaseTodoLine> steps, boolean append) throws IOException
      Overrides:
      writeRebaseTodoFile in class org.eclipse.jgit.lib.Repository
      Throws:
      IOException
    • convertRefStorage

      public void convertRefStorage(String format, boolean writeLogs, boolean backup) throws IOException
      Converts between ref storage formats.
      Parameters:
      format - the format to convert to, either "reftable" or "refdir"
      writeLogs - whether to write reflogs
      backup - whether to make a backup of the old data
      Throws:
      IOException - on I/O problems.