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.lang.String buildChangedEmails
           
protected  Builder builder
           
protected  BuildStrategy buildStrategy
          The project object if the
protected  boolean cleanWorkingDirectory
           
protected  java.util.Map configObjects
           
protected  java.util.Map customConfiguration
           
protected  boolean inheritRepository
           
protected  int pollingPeriod
           
protected  Repository repository
           
protected  long repositoryDefininingWorkingDir
           
protected  java.util.List<TaskDefinition> taskDefinitions
           
protected  WebRepositoryViewer webRepositoryViewer
           
protected  java.lang.String workingDirectory
           
protected  java.lang.String xmlData
           
protected  XmppMessageSender xmppMessageSender
           
 
Constructor Summary
DefaultBuildDefinition()
           
 
Method Summary
 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()
          Deprecated. 
 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<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.
 long getRepositoryIdDefiningWorkingDir()
           
 java.util.List<TaskDefinition> getTaskDefinitions()
          All tasks defined for this build.
 WebRepositoryViewer getWebRepositoryViewer()
          Get the module responsible for displaying commits for this build.
 XmppMessageSender getXmppMessageSender()
          The build's option IM message server configuration
 boolean isCleanWorkingDirectory()
          Should the working directory be cleaned after build.
 boolean isInheritRepository()
          Whether the BuildDefinition will use its own Repository or not or will it use its parents' Repository
 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 setCleanWorkingDirectory(boolean cleanWorkingDirectory)
          Set the working directory be cleaned or not cleaned after build
 void setConfigObjects(java.util.Map 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 setInheritRepository(boolean inheritRepository)
          Sets if the BuildDefinition should use the parents' Repository
 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 setRepositoryIdDefiningWorkingDir(long repositoryDefininingWorkingDir)
           
 void setTaskDefinitions(java.util.List<TaskDefinition> taskConfigs)
           
 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

inheritRepository

protected boolean inheritRepository

buildStrategy

protected BuildStrategy buildStrategy
The project object if the


repository

protected Repository repository

webRepositoryViewer

protected WebRepositoryViewer webRepositoryViewer

pollingPeriod

protected int pollingPeriod

cleanWorkingDirectory

protected boolean cleanWorkingDirectory

xmlData

protected java.lang.String xmlData

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

taskDefinitions

protected java.util.List<TaskDefinition> taskDefinitions

repositoryDefininingWorkingDir

protected long repositoryDefininingWorkingDir
Constructor Detail

DefaultBuildDefinition

public DefaultBuildDefinition()
Method Detail

isInheritRepository

public boolean isInheritRepository()
Description copied from interface: BuildDefinition
Whether the BuildDefinition will use its own Repository or not or will it use its parents' Repository

Specified by:
isInheritRepository in interface BuildDefinition
Returns:

setInheritRepository

public void setInheritRepository(boolean inheritRepository)
Description copied from interface: BuildDefinition
Sets if the BuildDefinition should use the parents' Repository

Specified by:
setInheritRepository in interface BuildDefinition

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: BuildPlanDefinition
Obtain the build's Repository.

Specified by:
getRepository in interface BuildPlanDefinition
Returns:
The Repository

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

@Deprecated
public Builder getBuilder()
Deprecated. 

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()

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

getCustomConfiguration

public java.util.Map<java.lang.String,java.lang.String> 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<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

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

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
Returns:
A List of TaskDefinitions

setTaskDefinitions

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

isCleanWorkingDirectory

public boolean isCleanWorkingDirectory()
Description copied from interface: BuildDefinition
Should the working directory be cleaned after build.

Specified by:
isCleanWorkingDirectory in interface BuildDefinition
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

public long getRepositoryIdDefiningWorkingDir()
Specified by:
getRepositoryIdDefiningWorkingDir in interface BuildDefinition

setRepositoryIdDefiningWorkingDir

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


Copyright © 2011 Atlassian. All Rights Reserved.