Class DefaultUploadPackFactory
- java.lang.Object
-
- org.eclipse.jgit.http.server.resolver.DefaultUploadPackFactory
-
- All Implemented Interfaces:
UploadPackFactory<javax.servlet.http.HttpServletRequest>
public class DefaultUploadPackFactory extends Object implements UploadPackFactory<javax.servlet.http.HttpServletRequest>
Create and configureUploadPack
service instance.Reading by upload-pack is permitted unless
http.uploadpack
is explicitly set to false.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jgit.transport.resolver.UploadPackFactory
DISABLED
-
-
Constructor Summary
Constructors Constructor Description DefaultUploadPackFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadPack
create(javax.servlet.http.HttpServletRequest req, Repository db)
Create and configure a new UploadPack instance for a repository.
-
-
-
Method Detail
-
create
public UploadPack create(javax.servlet.http.HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException
Create and configure a new UploadPack instance for a repository.- Specified by:
create
in interfaceUploadPackFactory<javax.servlet.http.HttpServletRequest>
- 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.
-
-