com.atlassian.bamboo.build
Interface BuildDefinition

All Superinterfaces:
BuildPlanDefinition, PartialBuildDefinition, java.io.Serializable
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 plan's branches monitor current settings, like if it is enabled, what is the branch matching regexp and etc...
 BranchSpecificConfiguration getBranchSpecificConfiguration()
          Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.
 java.util.List<java.lang.String> getBuildChangedEmailList()
          Deprecated. since 4.0 notifications are done in a different way now
 java.lang.String getBuildChangedEmails()
          Who wants to know when the build changes? One or more email addresses (comma separated list)
 java.util.List<BuildStrategy> getBuildStrategies()
          All automatic build triggers defined for this build.
 java.util.Map<java.lang.String,java.lang.Object> getConfigObjects()
          Returns a map of objects generated by the plugins.
 java.util.Map<java.lang.String,java.lang.String> getCustomConfiguration()
          A map consisting of String key and String value pairs.
 java.lang.Long getRepositoryIdDefiningWorkingDir()
           
 java.util.List<TaskDefinition> getTaskDefinitions()
          All tasks defined for this build.
 java.lang.Boolean isCleanWorkingDirectory()
          Should the working directory be cleaned after build.
 boolean isValidValue(java.lang.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 setBuildChangedEmails(java.lang.String emailAddress)
          Deprecated. since 4.0 notifications are done in a different way now
 void setBuildStrategies(java.util.List<BuildStrategy> buildStrategies)
          Replace existing list of triggers with a new one.
 void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
          Set the working directory be cleaned or not cleaned after build
 void setConfigObjects(java.util.Map<java.lang.String,java.lang.Object> configObjects)
           
 void setCustomConfiguration(java.util.Map<java.lang.String,java.lang.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(java.util.List<TaskDefinition> taskDefinitions)
           
 
Methods inherited from interface com.atlassian.bamboo.build.PartialBuildDefinition
isMerged
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildPlanDefinition
getRepository
 

Method Detail

getBuildStrategies

@NotNull
java.util.List<BuildStrategy> getBuildStrategies()
All automatic build triggers defined for this build. If this list is empty, Plan is only triggered manually or through dependencies.

Specified by:
getBuildStrategies in interface PartialBuildDefinition
Returns:
List of BuildStrategy

setBuildStrategies

void setBuildStrategies(@Nullable
                        java.util.List<BuildStrategy> buildStrategies)
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

getBranchMonitoringConfiguration

@NotNull
BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Returns plan's branches monitor current settings, like if it is enabled, what is the branch matching regexp and etc...

Specified by:
getBranchMonitoringConfiguration in interface PartialBuildDefinition
Returns:
current BranchMonitoringConfiguration

setBranchMonitoringConfiguration

void setBranchMonitoringConfiguration(@Nullable
                                      BranchMonitoringConfiguration branchMonitoringConfiguration)

getBranchIntegrationConfiguration

@NotNull
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

@NotNull
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)

getBuildChangedEmails

java.lang.String getBuildChangedEmails()
Who wants to know when the build changes? One or more email addresses (comma separated list)

Specified by:
getBuildChangedEmails in interface PartialBuildDefinition
Returns:
The build email addresses

getBuildChangedEmailList

@NotNull
@Deprecated
java.util.List<java.lang.String> getBuildChangedEmailList()
Deprecated. since 4.0 notifications are done in a different way now

Who wants to know when the build changes? A list of individual email addresses.

Specified by:
getBuildChangedEmailList in interface PartialBuildDefinition
Returns:
The collection of emails.

setBuildChangedEmails

@Deprecated
void setBuildChangedEmails(java.lang.String emailAddress)
Deprecated. since 4.0 notifications are done in a different way now

Define who is notified of build results by email

Parameters:
emailAddress - The build email address

getCustomConfiguration

@NotNull
java.util.Map<java.lang.String,java.lang.String> getCustomConfiguration()
Description copied from interface: BuildPlanDefinition
A map consisting of String key and String value pairs. This is where fields which starts with custom (eg. custom.test.id) goes to

Specified by:
getCustomConfiguration in interface BuildPlanDefinition
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
                            java.util.Map<java.lang.String,java.lang.String> configMap)
A map of String key and String value pairs, representing custom

Parameters:
configMap - - can be null

getConfigObjects

@NotNull
java.util.Map<java.lang.String,java.lang.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
                      java.util.Map<java.lang.String,java.lang.Object> configObjects)

getTaskDefinitions

@NotNull
java.util.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
                        java.util.List<TaskDefinition> taskDefinitions)

isCleanWorkingDirectory

@NotNull
java.lang.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

@NotNull
java.lang.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
                     java.lang.Object validValue)
Whether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.

Parameters:
validValue -
Returns:


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