com.atlassian.bamboo.build
Interface Build

All Superinterfaces:
BambooObject
All Known Implementing Classes:
BuildObjectForTests, DefaultBuild, TestBuildObjectForTests

public interface Build
extends BambooObject

This interface describes a Bamboo Build.


Field Summary
static int MAX_NUMBER_LOG_ENTRIES
           
static int MAX_PREVIOUS_BUILD_FOR_AVE
           
static java.lang.String STATUS_CURRENTLY_BUILDING
           
static java.lang.String STATUS_FAIL
           
static java.lang.String STATUS_NO_BUILDS
           
static java.lang.String STATUS_SUCCESS
           
 
Method Summary
 void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
          Add the given build results summary to the build.
 long getAverageBuildDuration()
          Returns an average duration of the recent builds
 BuildDefinition getBuildDefinition()
          Returns the BuildDefinition that backs this buildd
 BuildDefinitionForBuild getBuildDefinitionXml()
           
 java.lang.String getBuildKey()
          Thie returns the build portion of the build key
 BuildLogger getBuildLogger()
          Returns the helper object to deal with logging
 java.lang.String getBuildName()
           
 java.util.List getBuildResultSummaries()
          Obtains the builds total collection of BuildResultsSummary objects (oldest first), one for each build.
 java.util.Set getChildBuilds()
           
 java.lang.String getCurrentStatus()
          Retuns a string key as to what the status is.
 int getFirstBuildNumber()
          What the number of the first build we have? It may not be 1 as some may have been removed!
 BuildResultsSummary getFirstBuildSummary()
           
 java.lang.String getKey()
          Obtain the build's unique key (uppercase alphanumeric).
 java.util.List getLabellings()
           
 int getLastBuildNumber()
          What was the number of the lastest build (may be being built)
 java.lang.String getLastVcsRevisionKey()
          The string value representing the last build triggered.
 ExtendedBuildResultsSummary getLatestBuildSummary()
          Get the summary from the latest build
 java.lang.String getName()
          Returns the full name for the build in the form of "projet name - build name" e.g.
 int getNextBuildNumber()
          The next build number represents the number of the next build result that's to be executed
 BuildResults getNextBuildResults(int buildNumber)
           
 NotificationSet getNotificationSet()
           
 java.util.Set getParentBuilds()
           
 BuildResults getPreviousBuildResults(int buildNumber)
          Gets the first BuildResultsImpl before the passed number
 Project getProject()
          Returns the parent Project
 RequirementSet getRequirementSet()
           
 java.io.File getSourceCodeDirectory()
          Returns a file representing the source directory from the Repository
 boolean hasBuildResults()
          Has the build got any build results to display?
 boolean isBusy()
          Does something have a lock on the build
 boolean isInBuildQueue()
          Is the build currenlty being built?
 boolean isMarkedForDeletion()
          Whether or not the build has been marked for deletion
 boolean isSuspendedFromBuilding()
          Checks if the build has been
 void markForDeletion()
          Marks the build to be deleted.
 void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
           
 void setBuildKey(java.lang.String buildKey)
          Define the build's unique key (uppercase alphanumeric)
 void setBuildName(java.lang.String buildName)
           
 void setChildBuilds(java.util.Set childBuilds)
           
 void setFirstBuildNumber(int firstBuildNumber)
           
 void setKey(java.lang.String fullKey)
           
 void setLabellings(java.util.List labellings)
           
 void setLastBuildNumber(int lastBuildNumber)
           
 void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
           
 void setNextBuildNumber(int nextBuildNumber)
           
 void setNotificationSet(NotificationSet notificationSet)
           
 void setParentBuilds(java.util.Set parentBuilds)
           
 void setProject(Project project)
           
 void setRequirementSet(RequirementSet requirementSet)
           
 void setSuspendedFromBuilding(boolean suspendFromBuilding)
          Sets the build to suspend temporarily
 void unMarkForDeletion()
          Build will no longer be marked for deletion
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Field Detail

MAX_NUMBER_LOG_ENTRIES

static final int MAX_NUMBER_LOG_ENTRIES
See Also:
Constant Field Values

MAX_PREVIOUS_BUILD_FOR_AVE

static final int MAX_PREVIOUS_BUILD_FOR_AVE
See Also:
Constant Field Values

STATUS_FAIL

static final java.lang.String STATUS_FAIL
See Also:
Constant Field Values

STATUS_SUCCESS

static final java.lang.String STATUS_SUCCESS
See Also:
Constant Field Values

STATUS_CURRENTLY_BUILDING

static final java.lang.String STATUS_CURRENTLY_BUILDING
See Also:
Constant Field Values

STATUS_NO_BUILDS

static final java.lang.String STATUS_NO_BUILDS
See Also:
Constant Field Values
Method Detail

getKey

java.lang.String getKey()
Obtain the build's unique key (uppercase alphanumeric). This includes the project prefix e.g. BAM-MAIN

Returns:
The full key

setKey

void setKey(java.lang.String fullKey)

getBuildKey

java.lang.String getBuildKey()
Thie returns the build portion of the build key

Returns:
String

setBuildKey

void setBuildKey(java.lang.String buildKey)
Define the build's unique key (uppercase alphanumeric)

Parameters:
buildKey - The value of the key

getName

java.lang.String getName()
Returns the full name for the build in the form of "projet name - build name" e.g. "Confluence - HEAD"

Returns:
String @NotNull

getBuildName

java.lang.String getBuildName()

setBuildName

void setBuildName(java.lang.String buildName)

validateBuild

ErrorCollection validateBuild()
Validates the build's builder and source code locations

Returns:
and ErrorCollection with relevent error messages

getCurrentStatus

java.lang.String getCurrentStatus()
Retuns a string key as to what the status is. Can be "success", "failure" or "current". Mainly used for UI purposes.

Returns:

getAverageBuildDuration

long getAverageBuildDuration()
Returns an average duration of the recent builds

Returns:
The duration in milliseconds

getSourceCodeDirectory

java.io.File getSourceCodeDirectory()
                                    throws RepositoryException
Returns a file representing the source directory from the Repository

Returns:
file`representing the source directory. null iff an exception has been thrown
Throws:
RepositoryException

isInBuildQueue

boolean isInBuildQueue()
Is the build currenlty being built?

Returns:
true iff is currently in the build pipleline

markForDeletion

void markForDeletion()
Marks the build to be deleted.


unMarkForDeletion

void unMarkForDeletion()
Build will no longer be marked for deletion


isMarkedForDeletion

boolean isMarkedForDeletion()
Whether or not the build has been marked for deletion

Returns:

setSuspendedFromBuilding

void setSuspendedFromBuilding(boolean suspendFromBuilding)
Sets the build to suspend temporarily

Parameters:
suspendFromBuilding -

isSuspendedFromBuilding

boolean isSuspendedFromBuilding()
Checks if the build has been

Returns:

getBuildResultSummaries

java.util.List getBuildResultSummaries()
Obtains the builds total collection of BuildResultsSummary objects (oldest first), one for each build.

Returns:
The collection of build summary objects

getLatestBuildSummary

@Nullable
ExtendedBuildResultsSummary getLatestBuildSummary()
Get the summary from the latest build

Returns:
The summary info for the last completed build. Returns null if there are no build results for this build

getLastBuildNumber

int getLastBuildNumber()
What was the number of the lastest build (may be being built)

Returns:
the build number, zero if the build has not been built

getFirstBuildNumber

int getFirstBuildNumber()
What the number of the first build we have? It may not be 1 as some may have been removed!

Returns:
The number of the first build

getFirstBuildSummary

BuildResultsSummary getFirstBuildSummary()

hasBuildResults

boolean hasBuildResults()
Has the build got any build results to display?

Returns:
true if the build has been built, false otherwise

addBuildResultSummary

void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
Add the given build results summary to the build.

Parameters:
buildResultsSummary - The build summary

getPreviousBuildResults

BuildResults getPreviousBuildResults(int buildNumber)
Gets the first BuildResultsImpl before the passed number

Parameters:
buildNumber -
Returns:
BuildResultsImpl. null if no build results can be found before that number

getNextBuildResults

BuildResults getNextBuildResults(int buildNumber)

getBuildDefinition

BuildDefinition getBuildDefinition()
Returns the BuildDefinition that backs this buildd

Returns:
BuildDefinition object. Never null.

getProject

Project getProject()
Returns the parent Project

Returns:
Project. Never null

setProject

void setProject(Project project)

getNextBuildNumber

int getNextBuildNumber()
The next build number represents the number of the next build result that's to be executed

Returns:
a build number, starting with 1

setNextBuildNumber

void setNextBuildNumber(int nextBuildNumber)

setLastBuildNumber

void setLastBuildNumber(int lastBuildNumber)

setFirstBuildNumber

void setFirstBuildNumber(int firstBuildNumber)

getBuildDefinitionXml

BuildDefinitionForBuild getBuildDefinitionXml()

setBuildDefinitionXml

void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)

getLabellings

java.util.List getLabellings()

setLabellings

void setLabellings(java.util.List labellings)

getNotificationSet

NotificationSet getNotificationSet()

setNotificationSet

void setNotificationSet(NotificationSet notificationSet)

getParentBuilds

java.util.Set getParentBuilds()

setParentBuilds

void setParentBuilds(java.util.Set parentBuilds)

getChildBuilds

java.util.Set getChildBuilds()

setChildBuilds

void setChildBuilds(java.util.Set childBuilds)

getBuildLogger

BuildLogger getBuildLogger()
Returns the helper object to deal with logging

Returns:
A BuildLogger. @NotNull

getLastVcsRevisionKey

@Nullable
java.lang.String getLastVcsRevisionKey()
The string value representing the last build triggered. Will be null if nothing has been built. The value is parseable by the individual repositories

Returns:

setLastVcsRevisionKey

void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)

getRequirementSet

@NotNull
RequirementSet getRequirementSet()

setRequirementSet

void setRequirementSet(RequirementSet requirementSet)

isBusy

boolean isBusy()
Does something have a lock on the build

Returns:


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.