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 encapsulate the configuration aspects of a build. What the actual builds look like? What should be executed?


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. Since 3.1. Use tasks getTaskDefinitions()
 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()
          Deprecated. since 2.5 use PollingBuildStrategy's polling period
 Repository getRepository()
          Obtain the build's Repository.
 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 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)
          Deprecated. Since 3.1. Use tasks getTaskDefinitions()
 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 setInheritRepository(boolean inheritRepository)
          Sets if the BuildDefinition should use the parents' Repository
 void setPollingPeriod(int pollingPeriod)
          Deprecated. since 2.5 use PollingBuildStrategy's polling period
 void setRepository(Repository repository)
          Set the build's source code repository.
 void setTaskDefinitions(java.util.List<TaskDefinition> taskDefinitions)
           
 void setWebRepositoryViewer(WebRepositoryViewer webRepositoryViewer)
          Set the module responsibile for displaying commits for this build.
 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
getBuilderV2, getRepositoryV2
 

Method Detail

isInheritRepository

boolean isInheritRepository()
Whether the BuildDefinition will use its own Repository or not or will it use its parents' Repository

Returns:

setInheritRepository

void setInheritRepository(boolean inheritRepository)
Sets if the BuildDefinition should use the parents' Repository

Parameters:
inheritRepository -

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.

Specified by:
getRepository in interface BuildPlanDefinition
Returns:
The Repository

setRepository

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

Parameters:
repository - The source repoisitory

getWebRepositoryViewer

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

Returns:
WebRepositoryViewer that will render the commits for the build result.

setWebRepositoryViewer

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

Parameters:
webRepositoryViewer - the class responsible for rendering the commits for a build result

getPollingPeriod

@Deprecated
int getPollingPeriod()
Deprecated. since 2.5 use PollingBuildStrategy's polling period

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

Returns:
the time in seconds

setPollingPeriod

@Deprecated
void setPollingPeriod(int pollingPeriod)
Deprecated. since 2.5 use PollingBuildStrategy's polling period

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

Parameters:
pollingPeriod - The time in seconds

getBuilder

@Nullable
@Deprecated
Builder getBuilder()
Deprecated. Since 3.1. Use tasks getTaskDefinitions()

Obtain the build's Builder. Returns null if builder plugin module not found.

Returns:
The builder

setBuilder

@Deprecated
void setBuilder(Builder builder)
Deprecated. Since 3.1. Use tasks getTaskDefinitions()

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

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)

getTaskDefinitions

@NotNull
java.util.List<TaskDefinition> getTaskDefinitions()
All tasks defined for this build. Contains both regular tasks and finalising tasks.

Returns:
A List of TaskDefinitions

setTaskDefinitions

void setTaskDefinitions(@NotNull
                        java.util.List<TaskDefinition> taskDefinitions)


Copyright © 2011 Atlassian. All Rights Reserved.