Top Description Fields Methods
org.eclipse.jgit.transport.resolver

public Interface RepositoryResolver<C>

Known Direct Implementers
org.eclipse.jgit.transport.resolver.FileResolver
Type Parameters
<C>
type of connection.
Imports
org.eclipse.jgit.errors.RepositoryNotFoundException, org.eclipse.jgit.lib.Repository, org.eclipse.jgit.transport.ServiceMayNotContinueException

Locate a Git org.eclipse.jgit.lib.Repository by name from the URL.

Field Summary

Modifier and TypeField and Description
public static final RepositoryResolver<?>
NONE

Resolver configured to open nothing.

Method Summary

Modifier and TypeMethod and Description
public Repository

Returns:

the opened repository instance, never null.
open
(C
the current request, may be used to inspect session state including cookies or user authentication.
req
,
String
name of the repository, as parsed out of the URL.
name
)

Locate and open a reference to a Repository.

Field Detail

NONEback to summary
public static final RepositoryResolver<?> NONE

Resolver configured to open nothing.

Method Detail

openback to summary
public Repository open(C req, String name) throws RepositoryNotFoundException, ServiceNotAuthorizedException, ServiceNotEnabledException, ServiceMayNotContinueException

Locate and open a reference to a Repository.

The caller is responsible for closing the returned Repository.

Parameters
req:C

the current request, may be used to inspect session state including cookies or user authentication.

name:String

name of the repository, as parsed out of the URL.

Returns:Repository

the opened repository instance, never null.

Exceptions
RepositoryNotFoundException:
the repository does not exist or the name is incorrectly formatted as a repository name.
ServiceNotAuthorizedException:
the repository may exist, but HTTP access is not allowed without authentication, i.e. this corresponds to an HTTP 401 Unauthorized.
ServiceNotEnabledException:
the repository may exist, but HTTP access is not allowed on the target repository, for the current user.
ServiceMayNotContinueException:
the repository may exist, but HTTP access is not allowed for the current request. The exception message contains a detailed message that should be shown to the user.