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, resourcesFields inherited from interface com.atlassian.bitbucket.util.Weighted
COMPARABLE -
Constructor Summary
ConstructorsConstructorDescriptionAbstractScmRequestHandlerModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, int defaultWeight) -
Method Summary
Modifier and TypeMethodDescriptiongetScm()Retrieves theIDof the SCM this handler adds support for, ornullif this handler does not, of itself, add support for any specific SCM.Retrieves theScmUrlFormatterwhich should be used to format clone URLs targeting this handler.voidinit(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) protected voidvalidate(com.atlassian.plugin.module.Element element) Methods inherited from class com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor
compareTo, getWeightMethods 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
initin interfacecom.atlassian.plugin.ModuleDescriptor<T>- Overrides:
initin classBaseWeightedModuleDescriptor<T>- Throws:
com.atlassian.plugin.PluginParseException
-
getModule
-
getScm
Retrieves theIDof the SCM this handler adds support for, ornullif this handler does not, of itself, add support for any specific SCM.- Returns:
- the SCM this handler adds support for, or
null
-
getUrlFormatter
Retrieves theScmUrlFormatterwhich 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
nullto use the default URL
-
validate
protected void validate(com.atlassian.plugin.module.Element element) - Overrides:
validatein classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
-