Package com.atlassian.bitbucket.scm
Class AbstractScmRequestHandlerModuleDescriptor<T>
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor<T>
com.atlassian.bitbucket.scm.AbstractScmRequestHandlerModuleDescriptor<T>
- All Implemented Interfaces:
Weighted
,com.atlassian.plugin.ModuleDescriptor<T>
,com.atlassian.plugin.Resourced
,com.atlassian.plugin.ScopeAware
,com.atlassian.plugin.StateAware
,Comparable<BaseWeightedModuleDescriptor<T>>
- Direct Known Subclasses:
HttpScmRequestHandlerModuleDescriptor
,SshScmRequestHandlerModuleDescriptor
public abstract class AbstractScmRequestHandlerModuleDescriptor<T>
extends BaseWeightedModuleDescriptor<T>
A base class for constructing module descriptors for
ScmRequest
handlers.-
Field Summary
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources
Fields inherited from interface com.atlassian.bitbucket.util.Weighted
COMPARABLE
-
Constructor Summary
ConstructorDescriptionAbstractScmRequestHandlerModuleDescriptor
(com.atlassian.plugin.module.ModuleFactory moduleFactory, int defaultWeight) -
Method Summary
Modifier and TypeMethodDescriptiongetScm()
Retrieves theID
of the SCM this handler adds support for, ornull
if this handler does not, of itself, add support for any specific SCM.Retrieves theScmUrlFormatter
which should be used to format clone URLs targeting this handler.void
init
(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) protected void
validate
(com.atlassian.plugin.module.Element element) Methods inherited from class com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor
compareTo, getWeight
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, disabled, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, loadClass, satisfiesMinJavaVersion, setBroken, setPlugin, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.plugin.ModuleDescriptor
getDisplayName
-
Constructor Details
-
AbstractScmRequestHandlerModuleDescriptor
public AbstractScmRequestHandlerModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, int defaultWeight)
-
-
Method Details
-
init
public void init(@Nonnull com.atlassian.plugin.Plugin plugin, @Nonnull com.atlassian.plugin.module.Element element) throws com.atlassian.plugin.PluginParseException - Specified by:
init
in interfacecom.atlassian.plugin.ModuleDescriptor<T>
- Overrides:
init
in classBaseWeightedModuleDescriptor<T>
- Throws:
com.atlassian.plugin.PluginParseException
-
getModule
-
getScm
Retrieves theID
of the SCM this handler adds support for, ornull
if this handler does not, of itself, add support for any specific SCM.- Returns:
- the SCM this handler adds support for, or
null
-
getUrlFormatter
Retrieves theScmUrlFormatter
which should be used to format clone URLs targeting this handler. If no formatter is specified, a default URL will be generated.- Returns:
- a URL formatter, or
null
to use the default URL
-
validate
protected void validate(com.atlassian.plugin.module.Element element) - Overrides:
validate
in classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
-