com.atlassian.bamboo.build
Class DefaultBuildDefinition

java.lang.Object
  extended by com.atlassian.bamboo.build.DefaultBuildDefinition
All Implemented Interfaces:
BuildDefinition, PartialBuildDefinition, BuildPlanDefinition, java.io.Serializable
Direct Known Subclasses:
PartialBuildDefinitionImpl

public class DefaultBuildDefinition
extends java.lang.Object
implements BuildDefinition

See Also:
Serialized Form

Field Summary
protected  BranchIntegrationConfiguration branchIntegrationConfiguration
           
protected  BranchMonitoringConfiguration branchMonitoringConfiguration
           
protected  BranchSpecificConfiguration branchSpecificConfiguration
           
protected  java.lang.String buildChangedEmails
           
protected  java.util.List<BuildStrategy> buildStrategies
           
protected  java.lang.Boolean cleanWorkingDirectory
           
protected  java.util.Map<java.lang.String,java.lang.Object> configObjects
           
protected  java.util.Map<java.lang.String,java.lang.String> customConfiguration
           
protected  Repository repository
           
protected  java.lang.Long repositoryDefiningWorkingDir
           
protected  java.util.List<TaskDefinition> taskDefinitions
           
protected  java.lang.String workingDirectory
           
protected  java.lang.String xmlData
           
 
Constructor Summary
DefaultBuildDefinition(boolean merged)
           
 
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()
          Who wants to know when the build changes? A list of individual email addresses.
 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.
 Repository getRepository()
          Obtain the build's Repository.
 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 isMerged()
           
 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)
          Define who is notified of build results by email
 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> customConfiguration)
          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 repositoryDefiningWorkingDir)
           
 void setTaskDefinitions(java.util.List<TaskDefinition> taskConfigs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buildStrategies

protected java.util.List<BuildStrategy> buildStrategies

repository

protected Repository repository

cleanWorkingDirectory

protected java.lang.Boolean cleanWorkingDirectory

branchMonitoringConfiguration

protected BranchMonitoringConfiguration branchMonitoringConfiguration

branchIntegrationConfiguration

protected BranchIntegrationConfiguration branchIntegrationConfiguration

branchSpecificConfiguration

protected BranchSpecificConfiguration branchSpecificConfiguration

xmlData

protected java.lang.String xmlData

buildChangedEmails

protected java.lang.String buildChangedEmails

workingDirectory

protected java.lang.String workingDirectory

customConfiguration

protected java.util.Map<java.lang.String,java.lang.String> customConfiguration

configObjects

protected java.util.Map<java.lang.String,java.lang.Object> configObjects

taskDefinitions

protected java.util.List<TaskDefinition> taskDefinitions

repositoryDefiningWorkingDir

protected java.lang.Long repositoryDefiningWorkingDir
Constructor Detail

DefaultBuildDefinition

public DefaultBuildDefinition(boolean merged)
Method Detail

getBuildStrategies

@NotNull
public java.util.List<BuildStrategy> getBuildStrategies()
Description copied from interface: BuildDefinition
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 BuildDefinition
Specified by:
getBuildStrategies in interface PartialBuildDefinition
Returns:
List of BuildStrategy

setBuildStrategies

public void setBuildStrategies(@NotNull
                               java.util.List<BuildStrategy> buildStrategies)
Description copied from interface: BuildDefinition
Replace existing list of triggers with a new one. Setting null indicates that buildStrategies should be inherited from master chain.

Specified by:
setBuildStrategies in interface BuildDefinition
Parameters:
buildStrategies - List of BuildStrategy

getBranchMonitoringConfiguration

@NotNull
public BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Description copied from interface: BuildDefinition
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 BuildDefinition
Specified by:
getBranchMonitoringConfiguration in interface PartialBuildDefinition
Returns:
current BranchMonitoringConfiguration

setBranchMonitoringConfiguration

public void setBranchMonitoringConfiguration(@Nullable
                                             BranchMonitoringConfiguration branchMonitoringConfiguration)
Specified by:
setBranchMonitoringConfiguration in interface BuildDefinition

getBranchIntegrationConfiguration

@NotNull
public BranchIntegrationConfiguration getBranchIntegrationConfiguration()
Description copied from interface: BuildDefinition
Returns ChainBranch integration strategy settings, including the branch to merge with, and... //todo

Specified by:
getBranchIntegrationConfiguration in interface BuildDefinition
Specified by:
getBranchIntegrationConfiguration in interface PartialBuildDefinition
Returns:
current BranchIntegrationConfiguration

setBranchIntegrationConfiguration

public void setBranchIntegrationConfiguration(@Nullable
                                              BranchIntegrationConfiguration branchIntegrationConfiguration)
Specified by:
setBranchIntegrationConfiguration in interface BuildDefinition

getRepository

@Nullable
public Repository getRepository()
Description copied from interface: BuildPlanDefinition
Obtain the build's Repository.

Specified by:
getRepository in interface BuildPlanDefinition
Returns:
The Repository

getBuildChangedEmails

@Nullable
public java.lang.String getBuildChangedEmails()
Description copied from interface: BuildDefinition
Who wants to know when the build changes? One or more email addresses (comma separated list)

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

getBuildChangedEmailList

@NotNull
public java.util.List<java.lang.String> getBuildChangedEmailList()
Description copied from interface: BuildDefinition
Who wants to know when the build changes? A list of individual email addresses.

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

setBuildChangedEmails

public void setBuildChangedEmails(@Nullable
                                  java.lang.String emailAddress)
Description copied from interface: BuildDefinition
Define who is notified of build results by email

Specified by:
setBuildChangedEmails in interface BuildDefinition
Parameters:
emailAddress - The build email address

getCustomConfiguration

@NotNull
public 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 BuildDefinition
Specified by:
getCustomConfiguration in interface PartialBuildDefinition
Specified by:
getCustomConfiguration in interface BuildPlanDefinition
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

public void setCustomConfiguration(@NotNull
                                   java.util.Map<java.lang.String,java.lang.String> customConfiguration)
Description copied from interface: BuildDefinition
A map of String key and String value pairs, representing custom

Specified by:
setCustomConfiguration in interface BuildDefinition
Parameters:
customConfiguration - - can be null

getConfigObjects

@NotNull
public java.util.Map<java.lang.String,java.lang.Object> getConfigObjects()
Description copied from interface: BuildDefinition
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 BuildDefinition
Specified by:
getConfigObjects in interface PartialBuildDefinition
Returns:
A Map with a String as a key and an arbitrary objects as the value.

setConfigObjects

public void setConfigObjects(@NotNull
                             java.util.Map<java.lang.String,java.lang.Object> configObjects)
Specified by:
setConfigObjects in interface BuildDefinition

getTaskDefinitions

@NotNull
public java.util.List<TaskDefinition> getTaskDefinitions()
Description copied from interface: BuildDefinition
All tasks defined for this build. Contains both regular tasks and finalising tasks.

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

setTaskDefinitions

public void setTaskDefinitions(@NotNull
                               java.util.List<TaskDefinition> taskConfigs)
Specified by:
setTaskDefinitions in interface BuildDefinition

isCleanWorkingDirectory

@NotNull
public java.lang.Boolean isCleanWorkingDirectory()
Description copied from interface: BuildDefinition
Should the working directory be cleaned after build.

Specified by:
isCleanWorkingDirectory in interface BuildDefinition
Specified by:
isCleanWorkingDirectory in interface PartialBuildDefinition
Returns:
cleanWorkingDirectory

setCleanWorkingDirectory

public void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Description copied from interface: BuildDefinition
Set the working directory be cleaned or not cleaned after build

Specified by:
setCleanWorkingDirectory in interface BuildDefinition

getRepositoryIdDefiningWorkingDir

@NotNull
public java.lang.Long getRepositoryIdDefiningWorkingDir()
Specified by:
getRepositoryIdDefiningWorkingDir in interface BuildDefinition
Specified by:
getRepositoryIdDefiningWorkingDir in interface PartialBuildDefinition

setRepositoryIdDefiningWorkingDir

public void setRepositoryIdDefiningWorkingDir(long repositoryDefiningWorkingDir)
Specified by:
setRepositoryIdDefiningWorkingDir in interface BuildDefinition

getBranchSpecificConfiguration

@NotNull
public BranchSpecificConfiguration getBranchSpecificConfiguration()
Description copied from interface: BuildDefinition
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.

Specified by:
getBranchSpecificConfiguration in interface BuildDefinition
Specified by:
getBranchSpecificConfiguration in interface PartialBuildDefinition
Returns:

setBranchSpecificConfiguration

public void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
Specified by:
setBranchSpecificConfiguration in interface BuildDefinition

isMerged

public boolean isMerged()
Specified by:
isMerged in interface PartialBuildDefinition
Returns:
true if the configuration has been merged from multiple sources. Such configurations cannot be saved.

setMerged

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

Specified by:
setMerged in interface BuildDefinition
Parameters:
value - true if merged

isValidValue

public boolean isValidValue(@Nullable
                            java.lang.Object validValue)
Description copied from interface: BuildDefinition
Whether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.

Specified by:
isValidValue in interface BuildDefinition
Returns:


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