com.atlassian.bamboo.plugin.descriptor
Class TriggerModuleDescriptorImpl

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
      extended by com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor<TriggerActivator>
          extended by com.atlassian.bamboo.plugin.descriptor.TriggerModuleDescriptorImpl
All Implemented Interfaces:
TriggerModuleDescriptor, NameProvider, com.atlassian.plugin.ModuleDescriptor<TriggerActivator>, com.atlassian.plugin.Resourced, com.atlassian.plugin.StateAware, Serializable

public final class TriggerModuleDescriptorImpl
extends AbstractBambooModuleDescriptor<TriggerActivator>
implements TriggerModuleDescriptor, Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources, singleton
 
Constructor Summary
TriggerModuleDescriptorImpl(com.atlassian.plugin.module.ModuleFactory moduleFactory)
           
 
Method Summary
 boolean canTrigger(Triggerable triggerable)
           
 boolean canTriggerType(Class<? extends Triggerable> triggerableType)
           
 void disabled()
           
 void enabled()
           
 String getIconUrl()
           
 TriggerConfigurator getTriggerConfigurator()
          Retrieves the plugin class responsible for handling user configuration of this plugin.
 void init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)
           
protected  boolean isMutable()
           Whether modules of this descriptor are supposed to be mutated by external components.
 
Methods inherited from class com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor
getElementAsString, getFreeMarkerResourceLocation, getModule, getVelocityResourceLocation, instantiateClass, postInit, preInit
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, 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
 
Methods inherited from interface com.atlassian.plugin.ModuleDescriptor
destroy, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, hashCode, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion
 
Methods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation
 
Methods inherited from interface com.atlassian.bamboo.utils.NameProvider
getName
 

Constructor Detail

TriggerModuleDescriptorImpl

public TriggerModuleDescriptorImpl(com.atlassian.plugin.module.ModuleFactory moduleFactory)
Method Detail

init

public void init(com.atlassian.plugin.Plugin plugin,
                 org.dom4j.Element element)
          throws com.atlassian.plugin.PluginParseException
Specified by:
init in interface com.atlassian.plugin.ModuleDescriptor<TriggerActivator>
Overrides:
init in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<TriggerActivator>
Throws:
com.atlassian.plugin.PluginParseException

isMutable

protected boolean isMutable()
Description copied from class: AbstractBambooModuleDescriptor

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 AbstractBambooModuleDescriptor.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.

Overrides:
isMutable in class AbstractBambooModuleDescriptor<TriggerActivator>
Returns:
true if modules of this descriptor are mutable

disabled

public void disabled()
Specified by:
disabled in interface com.atlassian.plugin.StateAware
Overrides:
disabled in class AbstractBambooModuleDescriptor<TriggerActivator>

enabled

public void enabled()
Specified by:
enabled in interface com.atlassian.plugin.StateAware
Overrides:
enabled in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<TriggerActivator>

getIconUrl

@Nullable
public String getIconUrl()
Specified by:
getIconUrl in interface TriggerModuleDescriptor

canTrigger

public boolean canTrigger(@NotNull
                          Triggerable triggerable)
Specified by:
canTrigger in interface TriggerModuleDescriptor
Returns:
true iff build strategy is applicable to a Triggerable

canTriggerType

public boolean canTriggerType(@NotNull
                              Class<? extends Triggerable> triggerableType)
Specified by:
canTriggerType in interface TriggerModuleDescriptor
Returns:
true iff build strategy is applicable to a Triggerable of given type

getTriggerConfigurator

@Nullable
public TriggerConfigurator getTriggerConfigurator()
Description copied from interface: TriggerModuleDescriptor
Retrieves the plugin class responsible for handling user configuration of this plugin.

Specified by:
getTriggerConfigurator in interface TriggerModuleDescriptor
Returns:
TriggerConfigurator for this TaskType


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.