Top Description Inners Constructors Methods
org.eclipse.jgit.http.server.resolver

public Class DefaultUploadPackFactory

extends Object
implements UploadPackFactory<HttpServletRequest>
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.resolver.UploadPackFactory
Imports
java.util.Arrays, jakarta.servlet.http.HttpServletRequest, org.eclipse.jgit.lib.Config, .Repository, org.eclipse.jgit.transport.UploadPack, org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException, .ServiceNotEnabledException, .UploadPackFactory

Create and configure org.eclipse.jgit.transport.UploadPack service instance.

Reading by upload-pack is permitted unless http.uploadpack is explicitly set to false.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UploadPack
create(HttpServletRequest
current request, in case information from the request may help configure the UploadPack instance.
req
,
Repository
the repository the upload would read from.
db
)

Implements org.eclipse.jgit.transport.resolver.UploadPackFactory.create.

Create and configure a new UploadPack instance for a repository.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultUploadPackFactoryback to summary
public DefaultUploadPackFactory()

Method Detail

createback to summary
public UploadPack create(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException

Implements org.eclipse.jgit.transport.resolver.UploadPackFactory.create.

Doc from org.eclipse.jgit.transport.resolver.UploadPackFactory.create.

Create and configure a new UploadPack instance for a repository.

Parameters
req:HttpServletRequest

current request, in case information from the request may help configure the UploadPack instance.

db:Repository

the repository the upload would read from.

Returns:UploadPack

the newly configured UploadPack instance, must not be null.

Annotations
@Override
Exceptions
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.
Since
7.0
org.eclipse.jgit.http.server.resolver back to summary

private Class DefaultUploadPackFactory.ServiceConfig

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.http.server.resolver.DefaultUploadPackFactory.ServiceConfig

Field Summary

Modifier and TypeField and Description
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enabledback to summary
pack-priv final boolean enabled

Constructor Detail

ServiceConfigback to summary
pack-priv ServiceConfig(Config cfg)