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>
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static enum
protected static enum
-
Field Summary
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources
-
Constructor Summary
ConstructorDescriptionDeprecated.AbstractBambooModuleDescriptor
(com.atlassian.plugin.module.ModuleFactory moduleFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
disabled()
protected @Nullable String
getElementAsString
(com.atlassian.plugin.module.Element element) protected @Nullable String
getFreeMarkerResourceLocation
(@NotNull String resourceName) protected @Nullable String
getVelocityResourceLocation
(@NotNull String resourceName) protected <Z> Z
instantiateClass
(Class<Z> clazz) protected <Z> Z
instantiateSubmodule
(@NotNull String submoduleName, @NotNull String submoduleClassName, @Nullable Class<Z> defaultSubmoduleClass) protected boolean
Whether modules of this descriptor are supposed to be mutated by external components.protected void
Called during module initialization afterInitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor)
is called on module.protected void
Called during module initialization beforeInitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor)
is called on module.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 existingResettableLazyReference
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 existingResettableLazyReference
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, init, 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
-
CLASS
- See Also:
-
-
Constructor Details
-
AbstractBambooModuleDescriptor
public AbstractBambooModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory) -
AbstractBambooModuleDescriptor
Deprecated.since 5.4 use the constructor which requires aModuleFactory
Needed forAbstractBambooModuleDescriptor
s that require a default constructor.
-
-
Method Details
-
preInit
Called during module initialization beforeInitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor)
is called on module.- Parameters:
module
- module to initialize
-
postInit
Called during module initialization afterInitablePluginModule.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 returnstrue
, which means a fresh module instance will be created each timegetModule()
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
-
disabled
public void disabled()- Specified by:
disabled
in interfacecom.atlassian.plugin.StateAware
- Overrides:
disabled
in classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
-
instantiateClass
-
instantiateSubmodule
@NotNull protected <Z> Z instantiateSubmodule(@NotNull @NotNull String submoduleName, @NotNull @NotNull String submoduleClassName, @Nullable @Nullable Class<Z> defaultSubmoduleClass) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
getFreeMarkerResourceLocation
-
getVelocityResourceLocation
-
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 existingResettableLazyReference
- Parameters:
element
- sub-element namereference
- of the submoduleelementName
- 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 existingResettableLazyReference
- Parameters:
element
- sub-element namereference
- of the submoduleelementName
- of the submodule- Returns:
- className
-
ModuleFactory