com.atlassian.bamboo.build
Interface BuildDefinition

All Superinterfaces:
PartialBuildDefinition
All Known Implementing Classes:
DefaultBuildDefinition, PartialBuildDefinitionImpl

public interface BuildDefinition
extends PartialBuildDefinition

Each build has a BuildDefinition. This class encapsulate the configuration aspects of a build. What the actual builds look like? What should be executed?


Method Summary
 BranchIntegrationConfiguration getBranchIntegrationConfiguration()
          Returns ChainBranch integration strategy settings, including the branch to merge with, and...
 BranchMonitoringConfiguration getBranchMonitoringConfiguration()
          Returns the current branch monitoring configuration of a build plan.
 BranchSpecificConfiguration getBranchSpecificConfiguration()
          Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.
 List<BuildStrategy> getBuildStrategies()
          Deprecated. since 5.8 use getTriggerDefinitions()
 Map<String,Object> getConfigObjects()
          Returns a map of objects generated by the plugins.
 Map<String,String> getCustomConfiguration()
          /**
 Long getRepositoryIdDefiningWorkingDir()
           
 List<TaskDefinition> getTaskDefinitions()
          All tasks defined for this build.
 List<TriggerDefinition> getTriggerDefinitions()
          Definitions of all automatic build triggers defined for this build.
 Boolean isCleanWorkingDirectory()
          Should the working directory be cleaned after build.
 boolean isValidValue(Object validValue)
          Whether or not a given object is a valid value for this BuildDefinition.
 void setBranchIntegrationConfiguration(BranchIntegrationConfiguration branchIntegrationConfiguration)
           
 void setBranchMonitoringConfiguration(BranchMonitoringConfiguration branchMonitoringConfiguration)
           
 void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
           
 void setBuildStrategies(List<BuildStrategy> buildStrategies)
          Deprecated. since 5.8
 void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
          Set the working directory be cleaned or not cleaned after build
 void setConfigObjects(Map<String,Object> configObjects)
           
 void setCustomConfiguration(Map<String,String> configMap)
          A map of String key and String value pairs, representing custom
 void setMerged(boolean value)
          Set whether or not this BuildDefinition has been merged from multiple sources.
 void setRepositoryIdDefiningWorkingDir(long repositoryDefininingWorkingDir)
           
 void setTaskDefinitions(List<TaskDefinition> taskDefinitions)
           
 void setTriggerDefinitions(List<TriggerDefinition> triggerDefinitions)
          Replace existing list of triggers with a new one.
 
Methods inherited from interface com.atlassian.bamboo.build.PartialBuildDefinition
isMerged
 

Method Detail

getBuildStrategies

@Deprecated
@Contract(value=" -> !null")
List<BuildStrategy> getBuildStrategies()
Deprecated. since 5.8 use getTriggerDefinitions()

Returns triggers defined for this object as BuildStrategies. The result of this function is produced by calling getTriggerDefinitions() and converting its results. Note that this conversion can be lossy, as not all trigger types are convertible to BuildStrategies. Items that cannot be converted are skipped.

Specified by:
getBuildStrategies in interface PartialBuildDefinition
Returns:
triggers defined for this object.

setBuildStrategies

@Deprecated
void setBuildStrategies(@Nullable
                                   List<BuildStrategy> buildStrategies)
Deprecated. since 5.8

Replace existing list of triggers with a new one. Setting null indicates that buildStrategies should be inherited from master chain.

Parameters:
buildStrategies - List of BuildStrategy

getTriggerDefinitions

@Contract(value=" -> !null")
List<TriggerDefinition> getTriggerDefinitions()
Definitions of all automatic build triggers defined for this build. If this list is empty, Plan is only triggered manually or through dependencies.

Specified by:
getTriggerDefinitions in interface PartialBuildDefinition
Returns:
immutable list of defined triggers

setTriggerDefinitions

void setTriggerDefinitions(@Nullable
                           List<TriggerDefinition> triggerDefinitions)
Replace existing list of triggers with a new one. Setting null indicates that triggerDefinitions should be inherited from master chain.

Parameters:
triggerDefinitions - List of TriggerDefinition

getBranchMonitoringConfiguration

@Contract(value=" -> !null")
BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Returns the current branch monitoring configuration of a build plan. This configuration includes all plan branches settings, as if plan branch creation and plan branch cleanup are enabled, for instance.

Specified by:
getBranchMonitoringConfiguration in interface PartialBuildDefinition
Returns:
BranchMonitoringConfiguration

setBranchMonitoringConfiguration

void setBranchMonitoringConfiguration(@Nullable
                                      BranchMonitoringConfiguration branchMonitoringConfiguration)

getBranchIntegrationConfiguration

@Contract(value=" -> !null")
BranchIntegrationConfiguration getBranchIntegrationConfiguration()
Returns ChainBranch integration strategy settings, including the branch to merge with, and... //todo

Specified by:
getBranchIntegrationConfiguration in interface PartialBuildDefinition
Returns:
current BranchIntegrationConfiguration

setBranchIntegrationConfiguration

void setBranchIntegrationConfiguration(BranchIntegrationConfiguration branchIntegrationConfiguration)

getBranchSpecificConfiguration

@Contract(value=" -> !null")
BranchSpecificConfiguration getBranchSpecificConfiguration()
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.

Specified by:
getBranchSpecificConfiguration in interface PartialBuildDefinition
Returns:

setBranchSpecificConfiguration

void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)

getCustomConfiguration

@Contract(value=" -> !null")
Map<String,String> getCustomConfiguration()
/**

Specified by:
getCustomConfiguration in interface PartialBuildDefinition
Returns:
a map consisting of String key and String value pairs. This is where fields which start with "custom" (eg. custom.test.id) go to

setCustomConfiguration

void setCustomConfiguration(@NotNull
                            Map<String,String> configMap)
A map of String key and String value pairs, representing custom

Parameters:
configMap - - can be null

getConfigObjects

@Contract(value=" -> !null")
Map<String,Object> getConfigObjects()
Returns a map of objects generated by the plugins. Each plugin is responsible for populating this list, so there's no final guarantee that a key is unique.

Specified by:
getConfigObjects in interface PartialBuildDefinition
Returns:
A Map with a String as a key and an arbitrary objects as the value.

setConfigObjects

void setConfigObjects(@NotNull
                      Map<String,Object> configObjects)

getTaskDefinitions

@Contract(value=" -> !null")
List<TaskDefinition> getTaskDefinitions()
All tasks defined for this build. Contains both regular tasks and finalising tasks.

Specified by:
getTaskDefinitions in interface PartialBuildDefinition
Returns:
A List of TaskDefinitions

setTaskDefinitions

void setTaskDefinitions(@NotNull
                        List<TaskDefinition> taskDefinitions)

isCleanWorkingDirectory

@Contract(value=" -> !null")
Boolean isCleanWorkingDirectory()
Should the working directory be cleaned after build.

Specified by:
isCleanWorkingDirectory in interface PartialBuildDefinition
Returns:
cleanWorkingDirectory

setCleanWorkingDirectory

void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Set the working directory be cleaned or not cleaned after build

Parameters:
cleanWorkingDirectory -

getRepositoryIdDefiningWorkingDir

@Contract(value=" -> !null")
Long getRepositoryIdDefiningWorkingDir()
Specified by:
getRepositoryIdDefiningWorkingDir in interface PartialBuildDefinition

setRepositoryIdDefiningWorkingDir

void setRepositoryIdDefiningWorkingDir(long repositoryDefininingWorkingDir)

setMerged

void setMerged(boolean value)
Set whether or not this BuildDefinition has been merged from multiple sources. Merged definitions will not be persisted.

Parameters:
value - true if merged

isValidValue

boolean isValidValue(@Nullable
                     Object validValue)
Whether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.

Parameters:
validValue -
Returns:


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