Class TestRepositoryResolver

java.lang.Object
org.eclipse.jgit.http.test.TestRepositoryResolver
All Implemented Interfaces:
RepositoryResolver<javax.servlet.http.HttpServletRequest>

public final class TestRepositoryResolver extends Object implements RepositoryResolver<javax.servlet.http.HttpServletRequest>
A simple repository resolver for tests.
  • Field Details

  • Constructor Details

  • Method Details

    • open

      public Repository open(javax.servlet.http.HttpServletRequest req, String name) throws RepositoryNotFoundException, ServiceNotEnabledException
      Locate and open a reference to a Repository.

      The caller is responsible for closing the returned Repository.

      Specified by:
      open in interface RepositoryResolver<javax.servlet.http.HttpServletRequest>
      Parameters:
      req - the current request, may be used to inspect session state including cookies or user authentication.
      name - name of the repository, as parsed out of the URL.
      Returns:
      the opened repository instance, never null.
      Throws:
      RepositoryNotFoundException - the repository does not exist or the name is incorrectly formatted as a repository name.
      ServiceNotEnabledException - the repository may exist, but HTTP access is not allowed on the target repository, for the current user.