com.atlassian.bamboo.build
Class DefaultBuildDefinition

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

public class DefaultBuildDefinition
extends java.lang.Object
implements BuildDefinition

See Also:
Serialized Form

Field Summary
protected  java.util.Map<java.lang.String,Artifact> artifacts
           
protected  java.lang.String buildChangedEmails
           
protected  Builder builder
           
protected  BuildStrategy buildStrategy
          The project object if the
protected  java.util.Map configObjects
           
protected  java.util.Map customConfiguration
           
protected  int pollingPeriod
           
protected  Repository repository
           
protected  java.lang.String workingDirectory
           
protected  java.lang.String xmlData
           
protected  XmppMessageSender xmppMessageSender
           
 
Constructor Summary
DefaultBuildDefinition()
           
 
Method Summary
 void addArtifact(Artifact artifact)
          Add a new artifact to the existing build artifacts
 void addBuildDependency(java.lang.String buildKey)
           
 java.util.Collection<Artifact> getArtifactDefinitions()
           
 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()
          The names of the builds that need to be build when this build is built?
 Builder getBuilder()
          Obtain the build's Builder.
 BuilderV2 getBuilderV2()
           
 BuildStrategy getBuildStrategy()
          Returns to BuildStrategy that the user actually selects
 java.util.Map getConfigObjects()
          Returns a map of objects generated by the plugins.
 java.util.Map 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.
 RepositoryV2 getRepositoryV2()
          A repository object that can be used to perform
 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 configObjects)
           
 void setCustomConfiguration(java.util.Map customConfiguration)
          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)
           
 void setXmppMessageSender(XmppMessageSender xmppMessageSender)
          The build's option IM message server configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buildStrategy

protected BuildStrategy buildStrategy
The project object if the


repository

protected Repository repository

pollingPeriod

protected int pollingPeriod

xmlData

protected java.lang.String xmlData

artifacts

protected java.util.Map<java.lang.String,Artifact> artifacts

buildChangedEmails

protected java.lang.String buildChangedEmails

builder

protected Builder builder

workingDirectory

protected java.lang.String workingDirectory

xmppMessageSender

protected XmppMessageSender xmppMessageSender

customConfiguration

protected java.util.Map customConfiguration

configObjects

protected java.util.Map configObjects
Constructor Detail

DefaultBuildDefinition

public DefaultBuildDefinition()
Method Detail

getBuildStrategy

public BuildStrategy getBuildStrategy()
Description copied from interface: BuildDefinition
Returns to BuildStrategy that the user actually selects

Specified by:
getBuildStrategy in interface BuildDefinition
Returns:
the selected BuildStrategy

setBuildStrategy

public void setBuildStrategy(BuildStrategy buildStrategy)
Description copied from interface: BuildDefinition
Set the strategy to override the default build strategy.

Specified by:
setBuildStrategy in interface BuildDefinition
Parameters:
buildStrategy - The next build strategy to use.

getRepository

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

Specified by:
getRepository in interface BuildDefinition
Returns:
The Repository

getRepositoryV2

@Nullable
public RepositoryV2 getRepositoryV2()
Description copied from interface: BuildPlanDefinition
A repository object that can be used to perform

Specified by:
getRepositoryV2 in interface BuildPlanDefinition
Returns:

setRepository

public void setRepository(Repository repository)
Description copied from interface: BuildDefinition
Set the build's source code repository.

Specified by:
setRepository in interface BuildDefinition
Parameters:
repository - The source repoisitory

getPollingPeriod

public int getPollingPeriod()
Description copied from interface: BuildDefinition
How long should we wait between checking the build to see if it need building?

Specified by:
getPollingPeriod in interface BuildDefinition
Returns:
the time in seconds

setPollingPeriod

public void setPollingPeriod(int pollingPeriod)
Description copied from interface: BuildDefinition
How long should we wait between checking the build to see if it need building?

Specified by:
setPollingPeriod in interface BuildDefinition
Parameters:
pollingPeriod - The time in seconds

getBuilder

public Builder getBuilder()
Description copied from interface: BuildDefinition
Obtain the build's Builder. Returns null if builder plugin module not found.

Specified by:
getBuilder in interface BuildDefinition
Returns:
The builder

getBuilderV2

public BuilderV2 getBuilderV2()
Specified by:
getBuilderV2 in interface BuildPlanDefinition

setBuilder

public void setBuilder(Builder builder)
Description copied from interface: BuildDefinition
Set the build's builder.

Specified by:
setBuilder in interface BuildDefinition
Parameters:
builder - the builder

getBuildChangedEmails

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
Returns:
The build email addresses

getBuildChangedEmailList

public java.util.List 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
Returns:
The collection of emails.

setBuildChangedEmails

public void setBuildChangedEmails(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

addBuildDependency

public void addBuildDependency(java.lang.String buildKey)
Specified by:
addBuildDependency in interface BuildDefinition

getArtifactDefinitions

public java.util.Collection<Artifact> getArtifactDefinitions()
Specified by:
getArtifactDefinitions in interface BuildPlanDefinition

removeBuildDependency

public void removeBuildDependency(java.lang.String buildKey)
Specified by:
removeBuildDependency in interface BuildDefinition

hasBuildDependency

public boolean hasBuildDependency(java.lang.String buildKey)
Specified by:
hasBuildDependency in interface BuildDefinition

getBuildDependencies

public java.util.List getBuildDependencies()
The names of the builds that need to be build when this build is built?

Specified by:
getBuildDependencies in interface BuildDefinition
Returns:
The names of the builds that need building

setBuildDependencies

public void setBuildDependencies(java.util.Set buildDependencies)
Description copied from interface: BuildDefinition
Set of String represneting the build keys

Specified by:
setBuildDependencies in interface BuildDefinition

getArtifacts

public java.util.Map<java.lang.String,Artifact> getArtifacts()
Description copied from interface: BuildDefinition
Get the custom Artifacts.

Specified by:
getArtifacts in interface BuildDefinition
Returns:
The collection of artifacts, null, if the build does not have any artifacts

addArtifact

public void addArtifact(Artifact artifact)
Description copied from interface: BuildDefinition
Add a new artifact to the existing build artifacts

Specified by:
addArtifact in interface BuildDefinition

setArtifacts

public void setArtifacts(java.util.Map<java.lang.String,Artifact> artifacts)
Description copied from interface: BuildDefinition
Replace the build's artifacts with these ones.

Specified by:
setArtifacts in interface BuildDefinition

getCustomConfiguration

public java.util.Map getCustomConfiguration()
Description copied from interface: BuildDefinition
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 BuildPlanDefinition
Returns:
May be null

setCustomConfiguration

public void setCustomConfiguration(java.util.Map 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

public java.util.Map 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
Returns:
A Map with a String as a key and an arbritary objects as the value.

setConfigObjects

public void setConfigObjects(java.util.Map configObjects)
Specified by:
setConfigObjects in interface BuildDefinition

setWorkingDirectory

public void setWorkingDirectory(java.lang.String buildDirectory)
Specified by:
setWorkingDirectory in interface BuildDefinition

getXmppMessageSender

public XmppMessageSender getXmppMessageSender()
Description copied from interface: BuildDefinition
The build's option IM message server configuration

Specified by:
getXmppMessageSender in interface BuildDefinition

setXmppMessageSender

public void setXmppMessageSender(XmppMessageSender xmppMessageSender)
Description copied from interface: BuildDefinition
The build's option IM message server configuration

Specified by:
setXmppMessageSender in interface BuildDefinition


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.