Applications embedding this filter should map a directory path within the
application to this filter. For a servlet version, see
org..
Applications may wish to add additional repository action URLs to this
servlet by taking advantage of its extension from
org.. Callers may register
their own URL suffix translations through serve(String), or their
regex translations through serveRegex(String). Each translation
should contain a complete filter pipeline which ends with the HttpServlet
that should handle the requested action.
| Modifier and Type | Field and Description |
|---|---|
| private AsIsFileService | |
| private volatile boolean | |
| private ReceivePackErrorHandler | |
| private ReceivePackFactory | |
| private final List | |
| private RepositoryResolver | |
| private UploadPackErrorHandler | |
| private UploadPackFactory | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addReceivePackFilter(Filter
filter to apply before any of the ReceivePack operations. The
ReceivePack instance is available in the request attribute
filter)org..Add receive-pack filter |
| public void | addUploadPackFilter(Filter
filter to apply before any of the UploadPack operations. The
UploadPack instance is available in the request attribute
filter)org..Add upload-pack filter |
| private void | |
| private static boolean | |
| private static File | |
| public void | init(FilterConfig
a filterConfig)FilterConfig object containing the filter's configuration and initialization
parametersOverrides org. Overrides default jakarta. Called by the web container to indicate to a filter that it is being placed into service. |
| protected ServletBinder | register(ServletBinder
the newly created binder. binder)Overrides org. Configure a newly created binder. |
| public void | setAsIsFileService(AsIsFileService
the filter to validate direct access to repository files
through a dumb client. If f)null then dumb client
support is completely disabled.Set AsIsFileService |
| public void | setReceivePackErrorHandler(ReceivePackErrorHandler
A custom error handler for git-receive-pack. h)Set a custom error handler for git-receive-pack. |
| public void | setReceivePackFactory(ReceivePackFactory<HttpServletRequest>
the factory to construct and configure a
f)org. session when a
push is requested by a client.Set the receive-pack factory |
| public void | setRepositoryResolver(RepositoryResolver<HttpServletRequest>
the resolver to use when matching URL to Git repository. If
null the resolver)base-path parameter will be looked for in the
parameter table during init, which usually comes from the
web.xml file of the web application.New servlet configured with a specific resolver. |
| public void | setUploadPackErrorHandler(UploadPackErrorHandler
A custom error handler for git-upload-pack. h)Set a custom error handler for git-upload-pack. |
| public void | setUploadPackFactory(UploadPackFactory<HttpServletRequest>
the factory to construct and configure an
f)org. session when a
fetch or clone is requested by a client.Set upload-pack factory |
| asIs | back to summary |
|---|---|
| private AsIsFileService asIs | |
| initialized | back to summary |
|---|---|
| private volatile boolean initialized | |
| receivePackErrorHandler | back to summary |
|---|---|
| private ReceivePackErrorHandler receivePackErrorHandler | |
| receivePackFactory | back to summary |
|---|---|
| private ReceivePackFactory<HttpServletRequest> receivePackFactory | |
| receivePackFilters | back to summary |
|---|---|
| private final List<Filter> receivePackFilters | |
| resolver | back to summary |
|---|---|
| private RepositoryResolver<HttpServletRequest> resolver | |
| uploadPackErrorHandler | back to summary |
|---|---|
| private UploadPackErrorHandler uploadPackErrorHandler | |
| uploadPackFactory | back to summary |
|---|---|
| private UploadPackFactory<HttpServletRequest> uploadPackFactory | |
| uploadPackFilters | back to summary |
|---|---|
| private final List<Filter> uploadPackFilters | |
| GitFilter | back to summary |
|---|---|
| public GitFilter() New servlet that will load its base directory from
The required parameter | |
| addReceivePackFilter | back to summary |
|---|---|
| public void addReceivePackFilter(Filter filter) Add receive-pack filter
| |
| addUploadPackFilter | back to summary |
|---|---|
| public void addUploadPackFilter(Filter filter) Add upload-pack filter
| |
| assertNotInitialized | back to summary |
|---|---|
| private void assertNotInitialized() | |
| getBoolean | back to summary |
|---|---|
| private static boolean getBoolean(FilterConfig cfg, String param) throws ServletException | |
| getFile | back to summary |
|---|---|
| private static File getFile(FilterConfig cfg, String param) throws ServletException | |
| init | back to summary |
|---|---|
| public void init(FilterConfig filterConfig) throws ServletException Overrides org. Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being placed into service.
The servlet container calls the init method exactly once after instantiating the filter. The init method must
complete successfully before the filter is asked to do any filtering work. The container will ensure that actions
performed in the The web container cannot place the filter into service if the init method either
| |
| register | back to summary |
|---|---|
| protected ServletBinder register(ServletBinder binder) Overrides org. Doc from org. Configure a newly created binder.
| |
| setAsIsFileService | back to summary |
|---|---|
| public void setAsIsFileService(AsIsFileService f) Set AsIsFileService
| |
| setReceivePackErrorHandler | back to summary |
|---|---|
| public void setReceivePackErrorHandler(ReceivePackErrorHandler h) Set a custom error handler for git-receive-pack.
| |
| setReceivePackFactory | back to summary |
|---|---|
| public void setReceivePackFactory(ReceivePackFactory<HttpServletRequest> f) Set the receive-pack factory
| |
| setRepositoryResolver | back to summary |
|---|---|
| public void setRepositoryResolver(RepositoryResolver<HttpServletRequest> resolver) New servlet configured with a specific resolver.
| |
| setUploadPackErrorHandler | back to summary |
|---|---|
| public void setUploadPackErrorHandler(UploadPackErrorHandler h) Set a custom error handler for git-upload-pack.
| |
| setUploadPackFactory | back to summary |
|---|---|
| public void setUploadPackFactory(UploadPackFactory<HttpServletRequest> f) Set upload-pack factory
| |