public class

HttpScmRequestHandlerModuleDescriptor

extends AbstractScmRequestHandlerModuleDescriptor<T>
java.lang.Object
   ↳ com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
     ↳ com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor<T>
       ↳ com.atlassian.bitbucket.scm.AbstractScmRequestHandlerModuleDescriptor<T>
         ↳ com.atlassian.bitbucket.scm.http.HttpScmRequestHandlerModuleDescriptor

Class Overview

Module descriptor for providing HttpScmRequestHandler implementations.

Usage:


     <http-request-handler
              key="gitHttpScmRequestHandler"
              class="com.example.stash.internal.scm.git.protocol.http.DefaultGitHttpScmRequestHandler"
              scm="git"
              weight="100">
         <url-formatter class="com.atlassian.stash.internal.scm.git.protocol.http.GitHttpUrlFormatter"/>
     </http-request-handler>
 
The key and class attributes are required. The scm and weight attributes, and the nested url-formatter, are optional.
  • scm: Indicates the HttpScmRequestHandler being registered adds HTTP support for the specified SCM. This value should match the ID of the associated SCM.
    • The weighted nature of handlers means it's possible to add handlers which intercept other handlers, but do not, of themselves, add HTTP support for an SCM
    • For example, the SCM cache plugin uses this ability to introduce pack caching for Git, but, of itself, it does not add HTTP support for Git; it relies on another plugin for that
  • url-formatter: Allows registering an ScmUrlFormatter which can be used to override the default HTTP URL to apply SCM-specific decorators
    • If the url-formatter element is included, the class attribute is required
  • weight: Defines the order in which HttpScmRequestHandler implementations will be queried. Lower weights are queried earlier and the default weight is 100. The first implementation that supports a given command will be used

Summary

Constants
String XML_ELEMENT_NAME
[Expand]
Inherited Fields
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
From interface com.atlassian.bitbucket.util.Weighted
Public Constructors
HttpScmRequestHandlerModuleDescriptor(ModuleFactory moduleFactory)
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.scm.AbstractScmRequestHandlerModuleDescriptor
From class com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
From class java.lang.Object
From interface com.atlassian.bitbucket.util.Weighted
From interface com.atlassian.plugin.ModuleDescriptor
From interface com.atlassian.plugin.Resourced
From interface com.atlassian.plugin.ScopeAware
From interface com.atlassian.plugin.StateAware
From interface java.lang.Comparable

Constants

public static final String XML_ELEMENT_NAME

Constant Value: "http-request-handler"

Public Constructors

public HttpScmRequestHandlerModuleDescriptor (ModuleFactory moduleFactory)