com.atlassian.bamboo.builder
Class DefaultBuilderManager

java.lang.Object
  extended by com.atlassian.bamboo.builder.DefaultBuilderManager
All Implemented Interfaces:
BuilderManager

public class DefaultBuilderManager
extends java.lang.Object
implements BuilderManager


Constructor Summary
DefaultBuilderManager()
           
DefaultBuilderManager(com.atlassian.plugin.PluginAccessor pluginAccessor, CapabilitySetManager capabilitySetManager, ElasticAccountBean elasticAccountBean)
           
 
Method Summary
 CapabilitySet addDefaultBuilderToCapabilitySet(CapabilitySet capabilitySet)
          Adds default builder and paths to the given CapabilitySet
 java.util.List<Builder> getAllBuilders()
          A list of Builder objects available to the system with default configuration.
 java.util.Map<java.lang.String,Builder> getAllBuildersAsMap()
           
 java.util.List<Builder> getAllConfigurableBuilders()
          Returns all builders with Builder.isLabelPathMapConfigurable() returning true
 Builder getBuilder(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> params)
          Creates a new builder with the specified key, instantiated with the given params
 Builder getBuilderByShortKey(java.lang.String shortKey)
          Gets a builder by a short key representation.
 Builder getBuilderFromLabel(java.lang.String selectedBuildLabel)
          Gets the Builder object from a given label
 java.util.Map<java.lang.String,java.lang.String> getBuilderLabelTypeMap()
          Returns a map of currently available "configured" builders - uniquely identified by a label.
 void init()
          Starts up and initialises the builder manager
 void setCapabilitySetManager(CapabilitySetManager capabilitySetManager)
           
 void setElasticAccountBean(ElasticAccountBean elasticAccountBean)
           
 void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBuilderManager

public DefaultBuilderManager()

DefaultBuilderManager

public DefaultBuilderManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
                             CapabilitySetManager capabilitySetManager,
                             ElasticAccountBean elasticAccountBean)
Method Detail

init

public void init()
Description copied from interface: BuilderManager
Starts up and initialises the builder manager

Specified by:
init in interface BuilderManager

getBuilderLabelTypeMap

public java.util.Map<java.lang.String,java.lang.String> getBuilderLabelTypeMap()
Returns a map of currently available "configured" builders - uniquely identified by a label.

Maps label -> builder.getKey().

The builders are backed by available capabilities system wide, filtered by builders which are actually activated in the plugin system.

Specified by:
getBuilderLabelTypeMap in interface BuilderManager
Returns:

getAllConfigurableBuilders

public java.util.List<Builder> getAllConfigurableBuilders()
Description copied from interface: BuilderManager
Returns all builders with Builder.isLabelPathMapConfigurable() returning true

Specified by:
getAllConfigurableBuilders in interface BuilderManager
Returns:
List of Builder. Collections.EMPTY_LIST if none available

getBuilder

public Builder getBuilder(java.lang.String key,
                          java.util.Map<java.lang.String,java.lang.String> params)
Description copied from interface: BuilderManager
Creates a new builder with the specified key, instantiated with the given params

Specified by:
getBuilder in interface BuilderManager
Parameters:
key - - full plugin key of the build e.g com.atlassian.bamboo.plugin.system.builder:ant
params - - params that the builder will be instantiated with. Can be null
Returns:
a constructed Builder

getAllBuilders

public java.util.List<Builder> getAllBuilders()
Description copied from interface: BuilderManager
A list of Builder objects available to the system with default configuration.

Specified by:
getAllBuilders in interface BuilderManager
Returns:
List of Builders. Collections.EMPTY_LIST if none available

getAllBuildersAsMap

public java.util.Map<java.lang.String,Builder> getAllBuildersAsMap()
Specified by:
getAllBuildersAsMap in interface BuilderManager

getBuilderByShortKey

public Builder getBuilderByShortKey(java.lang.String shortKey)
Description copied from interface: BuilderManager
Gets a builder by a short key representation.

Specified by:
getBuilderByShortKey in interface BuilderManager
Returns:

addDefaultBuilderToCapabilitySet

@NotNull
public CapabilitySet addDefaultBuilderToCapabilitySet(@NotNull
                                                              CapabilitySet capabilitySet)
Description copied from interface: BuilderManager
Adds default builder and paths to the given CapabilitySet

Specified by:
addDefaultBuilderToCapabilitySet in interface BuilderManager

getBuilderFromLabel

@Nullable
public Builder getBuilderFromLabel(java.lang.String selectedBuildLabel)
Description copied from interface: BuilderManager
Gets the Builder object from a given label

Specified by:
getBuilderFromLabel in interface BuilderManager
Returns:

setPluginAccessor

public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)

setCapabilitySetManager

public void setCapabilitySetManager(CapabilitySetManager capabilitySetManager)

setElasticAccountBean

public void setElasticAccountBean(ElasticAccountBean elasticAccountBean)


Copyright © 2011 Atlassian. All Rights Reserved.