org.eclipse.jgit.transport.resolver
Interface RepositoryResolver<C>

Type Parameters:
C - type of connection.
All Known Implementing Classes:
FileResolver

public interface RepositoryResolver<C>

Locate a Git Repository by name from the URL.


Field Summary
static RepositoryResolver<?> NONE
          Resolver configured to open nothing.
 
Method Summary
 Repository open(C req, String name)
          Locate and open a reference to a Repository.
 

Field Detail

NONE

static final RepositoryResolver<?> NONE
Resolver configured to open nothing.

Method Detail

open

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 - 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.
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.


Copyright © 2012. All Rights Reserved.