com.atlassian.bamboo.plugin.descriptor
Class AbstractBambooModuleDescriptor<T>

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
      extended by com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor<T>
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<T>, com.atlassian.plugin.Resourced, com.atlassian.plugin.StateAware
Direct Known Subclasses:
AbstractBambooConfigurableModuleDescriptor, AxisStubDecoratorModuleDescriptor, BambooEventListenerModuleDescriptor, BuildAgentRequirementFilterDescriptor, BuildDefinitionTransformerModuleDescriptor, BuildTriggerConditionModuleDescriptor, CapabilityConfiguratorModuleDescriptor, CapabilityDefaultsHelperModuleDescriptor, CapabilityTypeModuleDescriptor, CustomBuildCompleteActionModuleDescriptor, CustomBuildProcessorModuleDescriptor, CustomBuildProcessorServerModuleDescriptor, CustomIndexReaderModuleDescriptor, CustomPostBuildCompletedActionModuleDescriptor, CustomPostBuildIndexModuleDescriptor, CustomPreBuildActionModuleDescriptor, CustomPreBuildQueuedActionModuleDescriptor, DecoratorMapperModuleDescriptor, DecoratorModuleDescriptor, FooterModuleDescriptor, LegacyBuilderToTaskConverterDescriptor, NotificationRecipientModuleDescriptor, NotificationTypeModuleDescriptor, PlanDeletionInterceptorActionModuleDescriptor, PlanTriggerModuleDescriptor, PostChainActionModuleDescriptor, PostChainIndexWriterModuleDescriptor, PostJobActionModuleDescriptor, PostStageActionModuleDescriptor, PreChainActionModuleDescriptor, PreJobActionModuleDescriptor, PreStageActionModuleDescriptor, ReportCollectorModuleDescriptor, RepositoryModuleDescriptor, RestartFailedStageActionModuleDescriptor, ResumeManualActionModuleDescriptor, SpringComponentModuleDescriptor, StopOnManualActionModuleDescriptor, TaskModuleDescriptorImpl, TaskProcessCommandDecoratorModuleDescriptorImpl, TopNavigationModuleDescriptor, TriggerReasonModuleDescriptor, WebRepositoryViewerModuleDescriptor, XWorkModuleDescriptor

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


Field Summary
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
moduleClass, moduleClassName, moduleFactory, plugin, resources, singleton
 
Constructor Summary
AbstractBambooModuleDescriptor()
          Needed for AbstractBambooModuleDescriptors that require a default constructor.
AbstractBambooModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
           
 
Method Summary
 void disabled()
           
protected  java.lang.String getFreeMarkerResourceLocation(java.lang.String resourceName)
           
 T getModule()
           
protected  java.lang.String getVelocityResourceLocation(java.lang.String resourceName)
           
protected
<Z> Z
instantiateClass(java.lang.Class<Z> clazz)
           
protected  boolean isMutable()
           Whether modules of this descriptor are supposed to be mutated by external components.
protected  void postInit(T module)
          Called during module initialization after InitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor) is called on module.
protected  void preInit(T module)
          Called during module initialization before InitablePluginModule.init(com.atlassian.plugin.ModuleDescriptor) is called on module.
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, destroy, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, init, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBambooModuleDescriptor

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

AbstractBambooModuleDescriptor

public AbstractBambooModuleDescriptor()
Needed for AbstractBambooModuleDescriptors that require a default constructor.

Method Detail

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

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(java.lang.Class<Z> clazz)

getFreeMarkerResourceLocation

@Nullable
protected java.lang.String getFreeMarkerResourceLocation(@NotNull
                                                                  java.lang.String resourceName)

getVelocityResourceLocation

@Nullable
protected java.lang.String getVelocityResourceLocation(@NotNull
                                                                java.lang.String resourceName)


Copyright © 2012 Atlassian. All Rights Reserved.