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

    Constructors
    Constructor
    Description
    AbstractScmRequestHandlerModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, int defaultWeight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Retrieves the ID of the SCM this handler adds support for, or null if this handler does not, of itself, add support for any specific SCM.
    Retrieves the ScmUrlFormatter 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 interface com.atlassian.plugin.ModuleDescriptor<T>
      Overrides:
      init in class BaseWeightedModuleDescriptor<T>
      Throws:
      com.atlassian.plugin.PluginParseException
    • getModule

      @Nonnull public T getModule()
      Specified by:
      getModule in interface com.atlassian.plugin.ModuleDescriptor<T>
      Specified by:
      getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
    • getScm

      @Nullable public String getScm()
      Retrieves the ID of the SCM this handler adds support for, or null if this handler does not, of itself, add support for any specific SCM.
      Returns:
      the SCM this handler adds support for, or null
    • getUrlFormatter

      @Nullable public ScmUrlFormatter getUrlFormatter()
      Retrieves the ScmUrlFormatter 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 class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>