com.atlassian.bamboo.build
Interface BuildDefinition

All Superinterfaces:
BuildPlanDefinition, java.io.Serializable
All Known Implementing Classes:
BuildObjectForTests, DefaultBuildDefinition, TestBuildObjectForTests

public interface BuildDefinition
extends BuildPlanDefinition

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


Method Summary
 void addArtifact(Artifact artifact)
          Add a new artifact to the existing build artifacts
 void addBuildDependency(java.lang.String buildKey)
           
 java.util.Map<java.lang.String,Artifact> getArtifacts()
          Get the custom Artifacts.
 java.util.List 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 getBuildDependencies()
          Deprecated. use Build.getChildBuilds() instead.
 Builder getBuilder()
          Obtain the build's Builder.
 BuildStrategy getBuildStrategy()
          Returns to BuildStrategy that the user actually selects
 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.
 int getPollingPeriod()
          How long should we wait between checking the build to see if it need building?
 Repository getRepository()
          Obtain the build's Repository.
 XmppMessageSender getXmppMessageSender()
          The build's option IM message server configuration
 boolean hasBuildDependency(java.lang.String buildKey)
           
 void removeBuildDependency(java.lang.String buildKey)
           
 void setArtifacts(java.util.Map<java.lang.String,Artifact> artifacts)
          Replace the build's artifacts with these ones.
 void setBuildChangedEmails(java.lang.String emailAddress)
          Define who is notified of build results by email
 void setBuildDependencies(java.util.Set buildDependencies)
          Set of String represneting the build keys
 void setBuilder(Builder builder)
          Set the build's builder.
 void setBuildStrategy(BuildStrategy buildStrategy)
          Set the strategy to override the default build strategy.
 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 setPollingPeriod(int pollingPeriod)
          How long should we wait between checking the build to see if it need building?
 void setRepository(Repository repository)
          Set the build's source code repository.
 void setWorkingDirectory(java.lang.String buildDirectory)
          Deprecated.  
 void setXmppMessageSender(XmppMessageSender xmppMessageSender)
          The build's option IM message server configuration
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildPlanDefinition
getArtifactDefinitions, getBuilderV2, getRepositoryV2
 

Method Detail

getBuildStrategy

BuildStrategy getBuildStrategy()
Returns to BuildStrategy that the user actually selects

Returns:
the selected BuildStrategy

setBuildStrategy

void setBuildStrategy(BuildStrategy buildStrategy)
Set the strategy to override the default build strategy.

Parameters:
buildStrategy - The next build strategy to use.

getRepository

@Nullable
Repository getRepository()
Obtain the build's Repository.

Returns:
The Repository

setRepository

void setRepository(Repository repository)
Set the build's source code repository.

Parameters:
repository - The source repoisitory

getPollingPeriod

int getPollingPeriod()
How long should we wait between checking the build to see if it need building?

Returns:
the time in seconds

setPollingPeriod

void setPollingPeriod(int pollingPeriod)
How long should we wait between checking the build to see if it need building?

Parameters:
pollingPeriod - The time in seconds

getBuilder

@Nullable
Builder getBuilder()
Obtain the build's Builder. Returns null if builder plugin module not found.

Returns:
The builder

setBuilder

void setBuilder(Builder builder)
Set the build's builder.

Parameters:
builder - the builder

getBuildChangedEmails

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

Returns:
The build email addresses

getBuildChangedEmailList

java.util.List getBuildChangedEmailList()
Who wants to know when the build changes? A list of individual email addresses.

Returns:
The collection of emails.

setBuildChangedEmails

void setBuildChangedEmails(java.lang.String emailAddress)
Define who is notified of build results by email

Parameters:
emailAddress - The build email address

addBuildDependency

void addBuildDependency(java.lang.String buildKey)

removeBuildDependency

void removeBuildDependency(java.lang.String buildKey)

hasBuildDependency

boolean hasBuildDependency(java.lang.String buildKey)

setBuildDependencies

void setBuildDependencies(java.util.Set buildDependencies)
Set of String represneting the build keys

Parameters:
buildDependencies -

getBuildDependencies

java.util.List getBuildDependencies()
Deprecated. use Build.getChildBuilds() instead.

The keys of the builds that need to be build when this build is built?

Returns:
The keys of the builds that need building

getArtifacts

java.util.Map<java.lang.String,Artifact> getArtifacts()
Get the custom Artifacts.

Returns:
The collection of artifacts, null, if the build does not have any artifacts

addArtifact

void addArtifact(Artifact artifact)
Add a new artifact to the existing build artifacts

Parameters:
artifact -

setArtifacts

void setArtifacts(java.util.Map<java.lang.String,Artifact> artifacts)
Replace the build's artifacts with these ones.

Parameters:
artifacts -

setWorkingDirectory

void setWorkingDirectory(java.lang.String buildDirectory)
Deprecated. 

Parameters:
buildDirectory -

getXmppMessageSender

XmppMessageSender getXmppMessageSender()
The build's option IM message server configuration


setXmppMessageSender

void setXmppMessageSender(XmppMessageSender xmppMessageSender)
The build's option IM message server configuration


getCustomConfiguration

@Nullable
java.util.Map<java.lang.String,java.lang.String> getCustomConfiguration()
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
Returns:
May be null

setCustomConfiguration

void setCustomConfiguration(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

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.

Returns:
A Map with a String as a key and an arbritary objects as the value.

setConfigObjects

void setConfigObjects(java.util.Map<java.lang.String,java.lang.Object> configObjects)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.