java.lang.Object | |||
↳ | com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T> | ||
↳ | com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor<T> | ||
↳ | com.atlassian.bitbucket.scm.ScmModuleDescriptor |
ModuleDescriptor
which interprets <scm/>
tags in atlassian-plugin.xml
.
Because this module descriptor uses the
<scm id="scm" class="com.example.scm.CustomScm" weight="100"/>
ModuleFactory
to create the Scm
instance, the "class" for the
Scm
may also reference a bean:
Using the "bean:" approach allows plugins to declare their custom
<component id="customScm" class="com.example.scm.CustomScm"/>
<scm id="scm" class="bean:customScm"/>
Scm
implementations as public components,
allowing other plugins to component-import
them and use them.
This module descriptor caches the Scm
instance it creates, and returns the same instance on subsequent calls
until the module is disabled or uninstalled. As a result, as documented on the Scm
interface, implementations
are required to be thread-safe, because the same instance will be used by multiple threads.
SCMs are weighted
, which is used to control the order they are returned in when retrieving
ScmService#getAvailable() available SCMs. The higher the weight, the later in the set they will
appear. Additionally, if multiple SCMs are registered with the same ID
, the one with the lowest
weight will be used.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | XML_ELEMENT_NAME |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.plugin.descriptors.AbstractModuleDescriptor
| |||||||||||
From interface
com.atlassian.bitbucket.util.Weighted
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears the cached
Scm . | |||||||||||
Retrieves the
Scm instance for this descriptor. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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
|