com.atlassian.bamboo.build.strategy
Interface BuildStrategy

All Superinterfaces:
BambooIdProvider, ConvertibleFromConfig, java.io.Serializable
All Known Subinterfaces:
QuartzStrategy, RepositoryAwareBuildStrategy, UpdatableBuildStrategy
All Known Implementing Classes:
AbstractBuildStrategy, AbstractQuartzStrategy, AfterSuccessfulPlanTrigger, CronTriggerBuildStrategy, ManualBuildStrategy, PollingBuildStrategy, SingleDailyBuildStrategy, TriggeredBuildStrategy

public interface BuildStrategy
extends ConvertibleFromConfig, java.io.Serializable, BambooIdProvider

This interface is used to determine if a build should be built. Notes: as of 5.0 this class is "still alive". However, it is 'overloaded' with functionality (it serves as runtime, configurator and 'module descriptor') and as such is a candidate for refactoring.


Method Summary
 void addDefaultValues(BuildConfiguration buildConfiguration)
           
 boolean canTrigger(java.lang.Class<? extends Triggerable> triggerable)
           
 java.lang.String getDescription()
           
 java.lang.String getKey()
          A lowercase string key to identify the build strategy
 java.lang.String getName()
          Returns the display name of the strategy type.
 java.util.Map<java.lang.String,java.lang.String> getTriggerConditionsConfiguration()
           
 java.lang.String getUserDescription()
          Name under which this instance of build strategy appears on Plan's list of triggers.
 void init(Triggerable triggerable)
          Called whenever Bamboo starts up
 void setId(long id)
           
 void setUserDescription(java.lang.String userDescription)
           
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Takes in a BuildConfiguration and returns any errors possible
 
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Method Detail

init

void init(@NotNull
          Triggerable triggerable)
Called whenever Bamboo starts up

Parameters:
triggerable -

validate

ErrorCollection validate(BuildConfiguration buildConfiguration)
Takes in a BuildConfiguration and returns any errors possible

Parameters:
buildConfiguration - not null
Returns:
ErrorCollection. must not be null

getKey

java.lang.String getKey()
A lowercase string key to identify the build strategy

Returns:
String must not be null

getName

java.lang.String getName()
Returns the display name of the strategy type.

Returns:
String must not be null

getDescription

java.lang.String getDescription()

addDefaultValues

void addDefaultValues(BuildConfiguration buildConfiguration)

getUserDescription

@NotNull
java.lang.String getUserDescription()
Name under which this instance of build strategy appears on Plan's list of triggers.

Since:
4.3

setUserDescription

void setUserDescription(@NotNull
                        java.lang.String userDescription)
Parameters:
userDescription -
Since:
4.3

setId

void setId(long id)
Parameters:
id -
Since:
4.3

getTriggerConditionsConfiguration

java.util.Map<java.lang.String,java.lang.String> getTriggerConditionsConfiguration()
Returns:
configuration of Trigger Conditions associated with this trigger.
Since:
4.3

canTrigger

boolean canTrigger(@NotNull
                   java.lang.Class<? extends Triggerable> triggerable)
Returns:
true iff build strategy is applicable to a Triggerable type
Since:
5.0


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.