Class MigrationHandlerModuleDescriptor

java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor<Void>
com.atlassian.bitbucket.migration.MigrationHandlerModuleDescriptor
All Implemented Interfaces:
Weighted, com.atlassian.plugin.ModuleDescriptor<Void>, com.atlassian.plugin.Resourced, com.atlassian.plugin.ScopeAware, com.atlassian.plugin.StateAware, Comparable<BaseWeightedModuleDescriptor<Void>>

public class MigrationHandlerModuleDescriptor extends BaseWeightedModuleDescriptor<Void>
Module descriptor for providing Exporter and Importer implementations.

Usage:


     <migration-handler key="customExporter" weight="120">
         <exporter class="com.example.bitbucket.internal.migration.DefaultCoreExporter" />
         <importer class="com.example.bitbucket.internal.migration.DefaultCoreImporter" />
     </migration>
 

The (optional) weight attribute defines the order in which Exporter and Importer implementations will be called. Lower weights are called earlier and the default weight is 100. Third party plugins must use a weight of 100 or higher

The key attribute on <migration> and the class attribute on <exporter> and <importer> are required.
Since:
5.13
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    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
    MigrationHandlerModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
     
     
    void
    init(com.atlassian.plugin.Plugin plugin, 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, 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, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.atlassian.plugin.ModuleDescriptor

    getDisplayName
  • Field Details

  • Constructor Details

    • MigrationHandlerModuleDescriptor

      public MigrationHandlerModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
  • Method Details

    • disabled

      public void disabled()
      Specified by:
      disabled in interface com.atlassian.plugin.StateAware
      Overrides:
      disabled in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
    • getExporter

      @Nonnull public Exporter getExporter()
    • getImporter

      @Nonnull public Optional<Importer> getImporter()
    • getModule

      public Void getModule()
      Specified by:
      getModule in interface com.atlassian.plugin.ModuleDescriptor<Void>
      Specified by:
      getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
    • 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<Void>
      Overrides:
      init in class BaseWeightedModuleDescriptor<Void>
      Throws:
      com.atlassian.plugin.PluginParseException