Class AbstractBambooModuleDescriptor<T>

java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor<T>
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<T>, com.atlassian.plugin.Resourced, com.atlassian.plugin.ScopeAware, com.atlassian.plugin.StateAware
Direct Known Subclasses:
AbstractBambooConfigurableModuleDescriptor, AbstractCustomIndexModuleDescriptor, ArtifactHandlerModuleDescriptorImpl, BambooEventListenerModuleDescriptor, BuildAgentRequirementFilterDescriptor, BuildDefinitionTransformerModuleDescriptor, BuildTriggerConditionModuleDescriptorImpl, CapabilityConfiguratorModuleDescriptor, CapabilityDefaultsHelperModuleDescriptor, CapabilityTypeModuleDescriptor, CredentialTypeModuleDescriptorImpl, CustomBuildCompleteActionModuleDescriptor, CustomBuildProcessorModuleDescriptor, CustomBuildProcessorServerModuleDescriptor, CustomEnvironmentConfigPluginModuleDescriptorImpl, CustomPostBuildCompletedActionModuleDescriptor, CustomPreBuildActionModuleDescriptor, CustomPreBuildQueuedActionModuleDescriptor, CustomPreDeploymentActionModuleDescriptorImpl, DecoratorMapperModuleDescriptor, DecoratorModuleDescriptor, FooterModuleDescriptor, NoOpModuleDescriptor, NotificationRecipientModuleDescriptor, NotificationTypeModuleDescriptor, PlanDeletionInterceptorActionModuleDescriptor, PlanExecutionGuardModuleDescriptor, PlanTriggerModuleDescriptor, PostChainActionModuleDescriptor, PostJobActionModuleDescriptor, PostStageActionModuleDescriptor, PreChainActionModuleDescriptor, PreDeploymentQueuedActionModuleDescriptor, PreJobActionModuleDescriptor, PrePostTaskActionsDescriptor, PreRssExecutionActionModuleDescriptor, PreStageActionModuleDescriptor, QuickFilterRuleTypeModuleDescriptor, ReportCollectorModuleDescriptor, Repository2VcsTypeConverterModuleDescriptor, RepositoryModuleDescriptorImpl, RestartFailedStageActionModuleDescriptor, ResumeManualActionModuleDescriptor, SerializableClassWhitelistProviderModuleDescriptor, SpringComponentModuleDescriptor, StopOnManualActionModuleDescriptor, TaskConditionModuleDescriptorImpl, TaskModuleDescriptorImpl, TaskProcessCommandDecoratorModuleDescriptorImpl, TopNavigationModuleDescriptor, TriggerModuleDescriptorImpl, TriggerReasonModuleDescriptor, UserRenameHandlerModuleDescriptor, VcsRepositoryModuleDescriptorImpl, VcsRepositoryViewerModuleDescriptorImpl, Web2VcsRepositoryViewerConverterModuleDescriptor, WebRepositoryViewerModuleDescriptorImpl, XWorkModuleDescriptor

public abstract class AbstractBambooModuleDescriptor<T> extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
  • Field Details

  • Constructor Details

    • AbstractBambooModuleDescriptor

      public AbstractBambooModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
    • AbstractBambooModuleDescriptor

      @Deprecated public AbstractBambooModuleDescriptor()
      Deprecated.
      since 5.4 use the constructor which requires a ModuleFactory
      Needed for AbstractBambooModuleDescriptors that require a default constructor.
  • Method Details

    • preInit

      protected void preInit(T module)
      Called during module initialization before InitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor) is called on module.
      Parameters:
      module - module to initialize
    • postInit

      protected void postInit(T module)
      Called during module initialization after InitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor) is called on module.
      Parameters:
      module - module to initialize
    • isMutable

      protected boolean isMutable()
      Whether modules of this descriptor are supposed to be mutated by external components. By default this returns true, which means a fresh module instance will be created each time getModule() is called.

      Subclasses that are safe to cache a singleton instance of module throughout the life span of this descriptor can override this method and return false.

      Returns:
      true if modules of this descriptor are mutable
    • getModule

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

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

      protected <Z> Z instantiateClass(Class<Z> clazz)
    • instantiateSubmodule

      @NotNull protected <Z> Z instantiateSubmodule(@NotNull @NotNull String submoduleName, @NotNull @NotNull String submoduleClassName, @Nullable @Nullable Class<Z> defaultSubmoduleClass) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getFreeMarkerResourceLocation

      @Nullable protected @Nullable String getFreeMarkerResourceLocation(@NotNull @NotNull String resourceName)
    • getVelocityResourceLocation

      @Nullable protected @Nullable String getVelocityResourceLocation(@NotNull @NotNull String resourceName)
    • getElementAsString

      @Nullable protected @Nullable String getElementAsString(com.atlassian.plugin.module.Element element)
    • prepareSubModuleConfiguration

      protected String prepareSubModuleConfiguration(String pluginType, com.atlassian.plugin.module.Element element, io.atlassian.util.concurrent.ResettableLazyReference<?> reference, String elementName, boolean optional, AbstractBambooModuleDescriptor.ModuleAvailability moduleAvailability, AbstractBambooModuleDescriptor.ClassNameSource classNameSource)
      Prepares a submodule by finding its class name and resetting its existing ResettableLazyReference
      Parameters:
      element - sub-element name
      reference - of the submodule
      elementName - of the submodule
      Returns:
      className
    • prepareSubModuleConfiguration

      protected String prepareSubModuleConfiguration(String pluginType, com.atlassian.plugin.module.Element element, io.atlassian.util.concurrent.ResettableLazyReference<?> reference, String elementName, boolean optional, AbstractBambooModuleDescriptor.ModuleAvailability moduleAvailability)
      Prepares a submodule by finding its class name and resetting its existing ResettableLazyReference
      Parameters:
      element - sub-element name
      reference - of the submodule
      elementName - of the submodule
      Returns:
      className