Interface UploadPackFactory<C>
- Type Parameters:
C
- the connection type
- All Known Implementing Classes:
DefaultUploadPackFactory
public interface UploadPackFactory<C>
Create and configure
UploadPack
service
instance.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UploadPackFactory<?>
A factory disabling the UploadPack service for all repositories. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(C req, Repository db) Create and configure a new UploadPack instance for a repository.
-
Field Details
-
DISABLED
A factory disabling the UploadPack service for all repositories.
-
-
Method Details
-
create
UploadPack create(C req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException Create and configure a new UploadPack instance for a repository.- Parameters:
req
- current request, in case information from the request may help configure the UploadPack instance.db
- the repository the upload would read from.- Returns:
- the newly configured UploadPack instance, must not be null.
- Throws:
ServiceNotEnabledException
- this factory refuses to create the instance because it is not allowed on the target repository, by any user.ServiceNotAuthorizedException
- this factory refuses to create the instance for this HTTP request and repository, such as due to a permission error.
-