com.atlassian.bamboo.upgrade.tasks
Class UpgradeTask102BuildObject

java.lang.Object
  extended by com.atlassian.bamboo.build.LegacyBuildObject
      extended by com.atlassian.bamboo.upgrade.tasks.UpgradeTask102BuildObject
All Implemented Interfaces:
Build, BuildDefinition, BuildDefinitionForBuild, BuildDefinitionXml, BambooObject, Project

public class UpgradeTask102BuildObject
extends LegacyBuildObject
implements Project, Build, BuildDefinition, BuildDefinitionForBuild

Information about a build under Continuous Integration.


Field Summary
static int MAX_NUMBER_LOG_ENTRIES
           
 
Fields inherited from interface com.atlassian.bamboo.build.Build
STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_SUCCESS
 
Constructor Summary
UpgradeTask102BuildObject()
          Simple package constructor for testing
UpgradeTask102BuildObject(Repository repository, String name, BuilderManager builderManager)
          Create a build
UpgradeTask102BuildObject(Repository repository, String name, String emailAddress, BuilderManager builderManager)
          Create a build
 
Method Summary
 void addArtifact(Artifact artifact)
          Add a new artifact to the existing build artifacts
 void addBuildDependency(String buildKey)
           
 String addBuildLogEntry(LogEntry logEntry)
          Add a new build log entry.
 String addBuildLogEntry(String entryDescription)
          Add a new entry to the build log
 void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
          Add the given build results summary to the build.
 void clearBuildLog()
          Reset the build log, ready for the next build
 boolean equals(Object o)
          We're only using the build name to compare builds
 Map getArtifacts()
          Get the custom Artifacts.
 long getAverageBuildDuration()
          Returns an average duration of the recent builds
 String getAverageBuildDurationAsString()
           
 Build getBuild()
           
 List getBuildChangedEmailList()
          Who wants to know when the build changes? A list of individual email addresses.
 String getBuildChangedEmails()
          Who wants to know when the build changes? One or more email addresses (comma separated list)
 BuildDefinition getBuildDefinition()
          Returns the BuildDefinition that backs this buildd
 List getBuildDependencies()
          The names of the builds that need to be build when this build is built?
 Set getBuildDependenciesSet()
           
 Builder getBuilder()
          Obtain the build's Builder.
 List getBuildLog()
          Provide the latest build details.
 List getBuildResultSummaries()
          Obtains the builds total collection of BuildResultsSummary objects (most recent first), one for each build.
 List getBuilds()
          Returns all Build associated with the Project.
 BuildStrategy getBuildStrategy()
          Returns to BuildStrategy that the user actually selects
 BuildStrategy getCurrentBuildStrategy()
          What is the builds current BuildStrategy?

If the build has never been built, it returns a InitialBootstapBuildStrategy otherwise it returns the build specific BuildStrategy.

 BuildDefinition getDefaultBuildDefinition()
           
 EmailStrategy getEmailStrategy()
          What email strategy does this build have?
 String getExportStatusStyle()
           
 List getFieldValueItems()
           
 int getFirstBuildNumber()
          What the number of the first build we have? It may not be 1 as some may have been removed!
 BuildResultsSummary getFirstBuildSummary()
           
 long getId()
           
 String getKey()
          Obtain the build's unique key (uppercase alphanumeric).
 int getLastBuildNumber()
          What was the number of the lastest build (may be being built)
 Date getLastBuildStartTime()
          When was the last time this build was built?
 BuildResultsSummary getLatestBuildSummary()
          Get the summary from the latest build
 String getName()
          Obtain the build's name
 BuildResults getNextBuildResults(int buildNumber)
           
 int getPollingPeriod()
          How long should we wait between checking the build to see if it need building?
 BuildResults getPreviousBuildResults(int buildNumber)
          Gets the first BuildResultsImpl before the passed number
 Project getProject()
          Returns the parent Project
 Repository getRepository()
          Obtain the build's Repository.
 File getSourceCodeDirectory()
          Returns a file representing the source directory from the Repository
 XmppMessageSender getXmppMessageSender()
          The build's option IM message server configuration
 boolean hasArtifacts()
           
 boolean hasBuildDependency(String buildKey)
           
 boolean hasBuildResults()
          Has the build got any build results to display?
 int hashCode()
          IntelliJ generated hash
 boolean isInBuildQueue()
          Is the build currenlty being built?
 boolean isMarkedForDeletion()
          Whether or not the build has been marked for deletion
 boolean isMarkedForDependencyBuild()
          Has the build been marked for a build following a dependent build having completed?
 boolean isMarkedForEditBuild()
          Has the build been marked for a build following an edit?
 boolean isMarkedForManualBuild()
          Has a manual build been requested for this build?
 boolean isSuspendedFromBuilding()
          Checks if the build has been
 void markAsNeedingBuilding(ReasonForBuild reasonForBuild)
          Mark the build to force a build next time it's checked.
 void markForDeletion()
          Marks the build to be deleted.
 void removeBuildDependency(String buildKey)
           
 void removeBuildResultSummary(long buildNumber)
          Remove the given build summary from the build
 void setArtifacts(Map artifacts)
          Replace the build's artifacts with these ones.
 void setBuild(Build build)
           
 void setBuildChangedEmails(String emailAddress)
          Define who is notified of build results by email
 void setBuildDependencies(Set buildDependencies)
          Set of String represneting the build keys
 void setBuilder(Builder builder)
          Set the build's builder.
 void setBuilderManager(BuilderManager builderManager)
           
 void setBuildKey(String buildKey)
          Define the build's unique key (uppercase alphanumeric)
 void setBuildResultSummaries(List buildResultSummaries)
          Legacy left over method (this is the extreme version of build result summaries)
 void setBuildStrategy(BuildStrategy buildStrategy)
          Set the strategy to override the default build strategy.
 void setEmailStrategy(EmailStrategy emailStrategy)
          Define when build build email need to be sent
 void setExportStatusStyle(String exportStatusStyle)
           
 void setFieldValueItems(List fieldValueItems)
           
 void setId(long id)
           
 void setInBuildQueue(boolean isBuilding)
          Set the is-building flag.
 void setLastBuildStartTime(Date lastBuildTime)
          Set the time of the last build
 void setName(String name)
           
 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 setSuspendedFromBuilding(boolean suspendFromBuilding)
          Sets the build to suspend temporarily
 void setWorkingDirectory(String buildDirectory)
           
 void setXmppMessageSender(XmppMessageSender xmppMessageSender)
          The build's option IM message server configuration
 void unmarkForManualBuild()
           
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from class com.atlassian.bamboo.build.LegacyBuildObject
getBuildDefinitionXml, getBuildKey, getBuildName, getBuildResultsSummaryManager, getChildBuilds, getCurrentStatus, getCustomConfiguration, getLabellings, getNextBuildNumber, getNumberOfBuildSummaries, getParentBuilds, getXmlData, retrieveNextBuildNumber, setBuildDefinition, setBuildDefinitionXml, setBuildName, setBuildResultsSummaryManager, setChildBuilds, setCustomConfiguration, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setNextBuildNumber, setParentBuilds, setProject, setXmlData, unmarkBuild
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.project.Project
getCurrentStatus, getLabellings, setKey, setLabellings
 
Methods inherited from interface com.atlassian.bamboo.build.Build
getBuildDefinitionXml, getBuildKey, getBuildName, getChildBuilds, getCurrentStatus, getLabellings, getNextBuildNumber, getParentBuilds, retrieveNextBuildNumber, setBuildDefinitionXml, setBuildName, setChildBuilds, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setNextBuildNumber, setParentBuilds, setProject, unmarkBuild
 
Methods inherited from interface com.atlassian.bamboo.build.BuildDefinition
getCustomConfiguration, setCustomConfiguration
 
Methods inherited from interface com.atlassian.bamboo.build.BuildDefinitionXml
getXmlData, setXmlData
 

Field Detail

MAX_NUMBER_LOG_ENTRIES

public static final int MAX_NUMBER_LOG_ENTRIES
See Also:
Constant Field Values
Constructor Detail

UpgradeTask102BuildObject

public UpgradeTask102BuildObject()
Simple package constructor for testing


UpgradeTask102BuildObject

public UpgradeTask102BuildObject(Repository repository,
                                 String name,
                                 BuilderManager builderManager)
Create a build

Parameters:
repository - The Repository containing the build
name - The name of the build
builderManager -

UpgradeTask102BuildObject

public UpgradeTask102BuildObject(Repository repository,
                                 String name,
                                 String emailAddress,
                                 BuilderManager builderManager)
Create a build

Parameters:
repository - The Repository containing the build
name - The name of the build
emailAddress - The build email notification address
builderManager -
Method Detail

setFieldValueItems

public void setFieldValueItems(List fieldValueItems)
Overrides:
setFieldValueItems in class LegacyBuildObject

setBuild

public void setBuild(Build build)
Specified by:
setBuild in interface BuildDefinitionForBuild
Overrides:
setBuild in class LegacyBuildObject

getBuildDefinition

public BuildDefinition getBuildDefinition()
Description copied from interface: Build
Returns the BuildDefinition that backs this buildd

Specified by:
getBuildDefinition in interface Build
Overrides:
getBuildDefinition in class LegacyBuildObject
Returns:
BuildDefinition object. Never null.

getId

public long getId()
Specified by:
getId in interface BambooObject
Overrides:
getId in class LegacyBuildObject

setId

public void setId(long id)
Specified by:
setId in interface BambooObject
Overrides:
setId in class LegacyBuildObject

getProject

public Project getProject()
Description copied from interface: Build
Returns the parent Project

Specified by:
getProject in interface Build
Overrides:
getProject in class LegacyBuildObject
Returns:
Project. Never null

getBuild

public Build getBuild()
Specified by:
getBuild in interface BuildDefinitionForBuild
Overrides:
getBuild in class LegacyBuildObject

getCurrentBuildStrategy

public BuildStrategy getCurrentBuildStrategy()
What is the builds current BuildStrategy?

If the build has never been built, it returns a InitialBootstapBuildStrategy otherwise it returns the build specific BuildStrategy.

Specified by:
getCurrentBuildStrategy in interface Build
Overrides:
getCurrentBuildStrategy in class LegacyBuildObject
Returns:
The currect build strategy

getBuildStrategy

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

Specified by:
getBuildStrategy in interface BuildDefinition
Overrides:
getBuildStrategy in class LegacyBuildObject
Returns:
the selected BuildStrategy

setBuildStrategy

public void setBuildStrategy(BuildStrategy buildStrategy)
Set the strategy to override the default build strategy.

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

getRepository

public Repository getRepository()
Obtain the build's Repository.

Specified by:
getRepository in interface BuildDefinition
Overrides:
getRepository in class LegacyBuildObject
Returns:
The Repository

setRepository

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

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

getPollingPeriod

public int getPollingPeriod()
How long should we wait between checking the build to see if it need building?

Specified by:
getPollingPeriod in interface BuildDefinition
Overrides:
getPollingPeriod in class LegacyBuildObject
Returns:
the time in seconds

setPollingPeriod

public void setPollingPeriod(int pollingPeriod)
How long should we wait between checking the build to see if it need building?

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

getBuilder

public Builder getBuilder()
Obtain the build's Builder.

Specified by:
getBuilder in interface BuildDefinition
Overrides:
getBuilder in class LegacyBuildObject
Returns:
The builder

setBuilder

public void setBuilder(Builder builder)
Set the build's builder.

Specified by:
setBuilder in interface BuildDefinition
Overrides:
setBuilder in class LegacyBuildObject
Parameters:
builder - the builder

getName

public String getName()
Obtain the build's name

Specified by:
getName in interface Build
Specified by:
getName in interface Project
Overrides:
getName in class LegacyBuildObject
Returns:
The build's name

setName

public void setName(String name)
Specified by:
setName in interface Project
Overrides:
setName in class LegacyBuildObject

getKey

public String getKey()
Description copied from interface: Build
Obtain the build's unique key (uppercase alphanumeric). This includes the project prefix e.g. BAM-MAIN

Specified by:
getKey in interface Build
Specified by:
getKey in interface Project
Overrides:
getKey in class LegacyBuildObject
Returns:
The full key

getDefaultBuildDefinition

public BuildDefinition getDefaultBuildDefinition()
Overrides:
getDefaultBuildDefinition in class LegacyBuildObject

getBuilds

public List getBuilds()
Description copied from interface: Project
Returns all Build associated with the Project. Returns Collections.EMPTY_LIST` if there are no Builds for the project.

Specified by:
getBuilds in interface Project
Overrides:
getBuilds in class LegacyBuildObject
Returns:
List of Builds. Collections.EMPTY_LIST` if no builds.

setBuildKey

public void setBuildKey(String buildKey)
Description copied from interface: Build
Define the build's unique key (uppercase alphanumeric)

Specified by:
setBuildKey in interface Build
Overrides:
setBuildKey in class LegacyBuildObject
Parameters:
buildKey - The value of the key

getBuildChangedEmails

public String getBuildChangedEmails()
Who wants to know when the build changes? One or more email addresses (comma separated list)

Specified by:
getBuildChangedEmails in interface BuildDefinition
Overrides:
getBuildChangedEmails in class LegacyBuildObject
Returns:
The build email addresses

setBuildChangedEmails

public void setBuildChangedEmails(String emailAddress)
Define who is notified of build results by email

Specified by:
setBuildChangedEmails in interface BuildDefinition
Overrides:
setBuildChangedEmails in class LegacyBuildObject
Parameters:
emailAddress - The build email address

getBuildChangedEmailList

public List getBuildChangedEmailList()
Who wants to know when the build changes? A list of individual email addresses.

Specified by:
getBuildChangedEmailList in interface BuildDefinition
Overrides:
getBuildChangedEmailList in class LegacyBuildObject
Returns:
The collection of emails.

getLastBuildNumber

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

Specified by:
getLastBuildNumber in interface Build
Overrides:
getLastBuildNumber in class LegacyBuildObject
Returns:
the build number, zero if the build has not been built

getFirstBuildNumber

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

Specified by:
getFirstBuildNumber in interface Build
Overrides:
getFirstBuildNumber in class LegacyBuildObject
Returns:
The number of the first build

addBuildResultSummary

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

Specified by:
addBuildResultSummary in interface Build
Overrides:
addBuildResultSummary in class LegacyBuildObject
Parameters:
buildResultsSummary - The build summary

removeBuildResultSummary

public void removeBuildResultSummary(long buildNumber)
Description copied from interface: Build
Remove the given build summary from the build

Specified by:
removeBuildResultSummary in interface Build
Overrides:
removeBuildResultSummary in class LegacyBuildObject
Parameters:
buildNumber - the number of the build to delete

setBuildResultSummaries

public void setBuildResultSummaries(List buildResultSummaries)
Description copied from class: LegacyBuildObject
Legacy left over method (this is the extreme version of build result summaries)

Overrides:
setBuildResultSummaries in class LegacyBuildObject

getBuildResultSummaries

public List getBuildResultSummaries()
Obtains the builds total collection of BuildResultsSummary objects (most recent first), one for each build.

Specified by:
getBuildResultSummaries in interface Build
Overrides:
getBuildResultSummaries in class LegacyBuildObject
Returns:
The collection of build summary objects

setInBuildQueue

public void setInBuildQueue(boolean isBuilding)
Set the is-building flag.

Specified by:
setInBuildQueue in interface Build
Overrides:
setInBuildQueue in class LegacyBuildObject
Parameters:
isBuilding - Is the build currently in the build pipeline?

isInBuildQueue

public boolean isInBuildQueue()
Is the build currenlty being built?

Specified by:
isInBuildQueue in interface Build
Overrides:
isInBuildQueue in class LegacyBuildObject
Returns:
true iff is currently in the build pipleline

getLastBuildStartTime

public Date getLastBuildStartTime()
When was the last time this build was built?

Specified by:
getLastBuildStartTime in interface Build
Overrides:
getLastBuildStartTime in class LegacyBuildObject
Returns:
The date, null if it has not been build.

setLastBuildStartTime

public void setLastBuildStartTime(Date lastBuildTime)
Set the time of the last build

Specified by:
setLastBuildStartTime in interface Build
Overrides:
setLastBuildStartTime in class LegacyBuildObject
Parameters:
lastBuildTime - the time

setWorkingDirectory

public void setWorkingDirectory(String buildDirectory)
Specified by:
setWorkingDirectory in interface BuildDefinition
Overrides:
setWorkingDirectory in class LegacyBuildObject

hasBuildResults

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

Specified by:
hasBuildResults in interface Build
Overrides:
hasBuildResults in class LegacyBuildObject
Returns:
true if the build has been built, false otherwise

getEmailStrategy

public EmailStrategy getEmailStrategy()
What email strategy does this build have?

Specified by:
getEmailStrategy in interface BuildDefinition
Overrides:
getEmailStrategy in class LegacyBuildObject

setEmailStrategy

public void setEmailStrategy(EmailStrategy emailStrategy)
Define when build build email need to be sent

Specified by:
setEmailStrategy in interface BuildDefinition
Overrides:
setEmailStrategy in class LegacyBuildObject
Parameters:
emailStrategy - the strategy to use from now on

setBuildDependencies

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

Specified by:
setBuildDependencies in interface BuildDefinition
Overrides:
setBuildDependencies in class LegacyBuildObject

getBuildDependenciesSet

public Set getBuildDependenciesSet()
Overrides:
getBuildDependenciesSet in class LegacyBuildObject

addBuildDependency

public void addBuildDependency(String buildKey)
Specified by:
addBuildDependency in interface BuildDefinition
Overrides:
addBuildDependency in class LegacyBuildObject

removeBuildDependency

public void removeBuildDependency(String buildKey)
Specified by:
removeBuildDependency in interface BuildDefinition
Overrides:
removeBuildDependency in class LegacyBuildObject

hasBuildDependency

public boolean hasBuildDependency(String buildKey)
Specified by:
hasBuildDependency in interface BuildDefinition
Overrides:
hasBuildDependency in class LegacyBuildObject

getBuildDependencies

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

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

hasArtifacts

public boolean hasArtifacts()
Overrides:
hasArtifacts in class LegacyBuildObject

getArtifacts

public Map getArtifacts()
Description copied from interface: BuildDefinition
Get the custom Artifacts.

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

setArtifacts

public void setArtifacts(Map artifacts)
Description copied from interface: BuildDefinition
Replace the build's artifacts with these ones.

Specified by:
setArtifacts in interface BuildDefinition
Overrides:
setArtifacts in class LegacyBuildObject

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
Overrides:
addArtifact in class LegacyBuildObject

getLatestBuildSummary

public BuildResultsSummary getLatestBuildSummary()
Get the summary from the latest build

Specified by:
getLatestBuildSummary in interface Build
Overrides:
getLatestBuildSummary in class LegacyBuildObject
Returns:
The summary info for the last completed build. Returns null if there are no build results for this build

getFirstBuildSummary

public BuildResultsSummary getFirstBuildSummary()
Specified by:
getFirstBuildSummary in interface Build
Overrides:
getFirstBuildSummary in class LegacyBuildObject

getXmppMessageSender

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

Specified by:
getXmppMessageSender in interface BuildDefinition
Overrides:
getXmppMessageSender in class LegacyBuildObject

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
Overrides:
setXmppMessageSender in class LegacyBuildObject

setExportStatusStyle

public void setExportStatusStyle(String exportStatusStyle)
Specified by:
setExportStatusStyle in interface BuildDefinition
Overrides:
setExportStatusStyle in class LegacyBuildObject

getExportStatusStyle

public String getExportStatusStyle()
Specified by:
getExportStatusStyle in interface BuildDefinition
Overrides:
getExportStatusStyle in class LegacyBuildObject

getBuildLog

public List getBuildLog()
Provide the latest build details. This is not persisted.

Specified by:
getBuildLog in interface Build
Overrides:
getBuildLog in class LegacyBuildObject
Returns:
The collection of log strings

addBuildLogEntry

public String addBuildLogEntry(String entryDescription)
Add a new entry to the build log

Overrides:
addBuildLogEntry in class LegacyBuildObject
Parameters:
entryDescription - The entry to add

addBuildLogEntry

public String addBuildLogEntry(LogEntry logEntry)
Description copied from interface: Build
Add a new build log entry. This will get appended to the end of the log.

Specified by:
addBuildLogEntry in interface Build
Overrides:
addBuildLogEntry in class LegacyBuildObject
Parameters:
logEntry - The data being logged
Returns:
The line of text being logged. From LogEntry.getUnstyledLog().

isMarkedForManualBuild

public boolean isMarkedForManualBuild()
Has a manual build been requested for this build?

Specified by:
isMarkedForManualBuild in interface Build
Overrides:
isMarkedForManualBuild in class LegacyBuildObject
Returns:
true iff it is has been marked for a manual build

isMarkedForDependencyBuild

public boolean isMarkedForDependencyBuild()
Description copied from interface: Build
Has the build been marked for a build following a dependent build having completed?

Specified by:
isMarkedForDependencyBuild in interface Build
Overrides:
isMarkedForDependencyBuild in class LegacyBuildObject
Returns:

isMarkedForEditBuild

public boolean isMarkedForEditBuild()
Description copied from interface: Build
Has the build been marked for a build following an edit?

Specified by:
isMarkedForEditBuild in interface Build
Overrides:
isMarkedForEditBuild in class LegacyBuildObject
Returns:
true iff it is has been marked for an edit build

markAsNeedingBuilding

public void markAsNeedingBuilding(ReasonForBuild reasonForBuild)
Description copied from interface: Build
Mark the build to force a build next time it's checked.

Specified by:
markAsNeedingBuilding in interface Build
Overrides:
markAsNeedingBuilding in class LegacyBuildObject
Parameters:
reasonForBuild - The reason we want to build the build

unmarkForManualBuild

public void unmarkForManualBuild()

validateBuild

public ErrorCollection validateBuild()
Description copied from interface: Build
Validates the build's builder and source code locations

Specified by:
validateBuild in interface Build
Overrides:
validateBuild in class LegacyBuildObject
Returns:
and ErrorCollection with relevent error messages

getFieldValueItems

public List getFieldValueItems()
Overrides:
getFieldValueItems in class LegacyBuildObject

getSourceCodeDirectory

public File getSourceCodeDirectory()
Description copied from interface: Build
Returns a file representing the source directory from the Repository

Specified by:
getSourceCodeDirectory in interface Build
Overrides:
getSourceCodeDirectory in class LegacyBuildObject
Returns:
file`representing the source directory. null iff an exception has been thrown

getAverageBuildDuration

public long getAverageBuildDuration()
Description copied from interface: Build
Returns an average duration of the recent builds

Specified by:
getAverageBuildDuration in interface Build
Overrides:
getAverageBuildDuration in class LegacyBuildObject
Returns:
The duration in milliseconds

getPreviousBuildResults

public BuildResults getPreviousBuildResults(int buildNumber)
Description copied from interface: Build
Gets the first BuildResultsImpl before the passed number

Specified by:
getPreviousBuildResults in interface Build
Overrides:
getPreviousBuildResults in class LegacyBuildObject
Returns:
BuildResultsImpl. null if no build results can be found before that number

getNextBuildResults

public BuildResults getNextBuildResults(int buildNumber)
Specified by:
getNextBuildResults in interface Build
Overrides:
getNextBuildResults in class LegacyBuildObject

markForDeletion

public void markForDeletion()
Description copied from interface: Build
Marks the build to be deleted.

Specified by:
markForDeletion in interface Build
Overrides:
markForDeletion in class LegacyBuildObject

isMarkedForDeletion

public boolean isMarkedForDeletion()
Description copied from interface: Build
Whether or not the build has been marked for deletion

Specified by:
isMarkedForDeletion in interface Build
Overrides:
isMarkedForDeletion in class LegacyBuildObject
Returns:

setSuspendedFromBuilding

public void setSuspendedFromBuilding(boolean suspendFromBuilding)
Description copied from interface: Build
Sets the build to suspend temporarily

Specified by:
setSuspendedFromBuilding in interface Build
Overrides:
setSuspendedFromBuilding in class LegacyBuildObject

isSuspendedFromBuilding

public boolean isSuspendedFromBuilding()
Description copied from interface: Build
Checks if the build has been

Specified by:
isSuspendedFromBuilding in interface Build
Overrides:
isSuspendedFromBuilding in class LegacyBuildObject
Returns:

clearBuildLog

public void clearBuildLog()
Description copied from interface: Build
Reset the build log, ready for the next build

Specified by:
clearBuildLog in interface Build
Overrides:
clearBuildLog in class LegacyBuildObject

getAverageBuildDurationAsString

public String getAverageBuildDurationAsString()

equals

public boolean equals(Object o)
We're only using the build name to compare builds

Overrides:
equals in class LegacyBuildObject
Parameters:
o - object we are comparing
Returns:
usual stuff

hashCode

public int hashCode()
IntelliJ generated hash

Overrides:
hashCode in class LegacyBuildObject
Returns:
hash

setBuilderManager

public void setBuilderManager(BuilderManager builderManager)
Overrides:
setBuilderManager in class LegacyBuildObject


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.