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

public Class DefaultReceivePackFactory

extends Object
implements ReceivePackFactory<HttpServletRequest>
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.resolver.ReceivePackFactory
Imports
jakarta.servlet.http.HttpServletRequest, org.eclipse.jgit.lib.Config, .PersonIdent, .Repository, org.eclipse.jgit.transport.ReceivePack, org.eclipse.jgit.transport.resolver.ReceivePackFactory, .ServiceNotAuthorizedException, .ServiceNotEnabledException

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

Writing by receive-pack is permitted if any of the following is true:

and explicitly rejected otherwise.

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 ReceivePack
create(HttpServletRequest
current request, in case information from the request may help configure the ReceivePack instance.
req
,
Repository
the repository the receive would write into.
db
)

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

Create and configure a new ReceivePack instance for a repository.

private static ReceivePack
createFor(final HttpServletRequest req, final Repository db, final String user)

private static PersonIdent
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultReceivePackFactoryback to summary
public DefaultReceivePackFactory()

Method Detail

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

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

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

Create and configure a new ReceivePack instance for a repository.

Parameters
req:HttpServletRequest

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

db:Repository

the repository the receive would write into.

Returns:ReceivePack

the newly configured ReceivePack 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
createForback to summary
private static ReceivePack createFor(final HttpServletRequest req, final Repository db, final String user)
toPersonIdentback to summary
private static PersonIdent toPersonIdent(HttpServletRequest req, String user)
org.eclipse.jgit.http.server.resolver back to summary

private Class DefaultReceivePackFactory.ServiceConfig

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

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
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
setback to summary
pack-priv final boolean set

Constructor Detail

ServiceConfigback to summary
pack-priv ServiceConfig(Config cfg)