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  WebRepositoryViewer webRepositoryViewer
           
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
 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)
 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
 WebRepositoryViewer getWebRepositoryViewer()
          Get the module responsible for displaying commits for this build.
 XmppMessageSender getXmppMessageSender()
          The build's option IM message server configuration
 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 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 setWebRepositoryViewer(WebRepositoryViewer webRepositoryViewer)
          Set the module responsibile for displaying commits for this build.
 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

webRepositoryViewer

protected WebRepositoryViewer webRepositoryViewer

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
Specified by:
getRepository in interface BuildPlanDefinition
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

getWebRepositoryViewer

public WebRepositoryViewer getWebRepositoryViewer()
Get the module responsible for displaying commits for this build. Includes web repository information.

Specified by:
getWebRepositoryViewer in interface BuildDefinition
Returns:
WebRepositoryViewer that will render the commits for the build result.

setWebRepositoryViewer

public void setWebRepositoryViewer(@Nullable
                                   WebRepositoryViewer webRepositoryViewer)
Set the module responsibile for displaying commits for this build. Includes web repository information.

Specified by:
setWebRepositoryViewer in interface BuildDefinition
Parameters:
webRepositoryViewer - the class responsible for rendering the commits for a build result

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.

getArtifactDefinitions

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

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

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 © 2010 Atlassian. All Rights Reserved.