com.atlassian.bamboo.build
Class BuildObjectForTests

java.lang.Object
  extended by com.atlassian.bamboo.build.BuildObjectForTests
All Implemented Interfaces:
Build, BuildDefinition, BuildDefinitionForBuild, BuildDefinitionXml, BambooObject, Describable, Plan, Project, DescriptionProvider, NameProvider, BuildPlanDefinition, java.io.Serializable
Direct Known Subclasses:
TestBuildObjectForTests

public class BuildObjectForTests
extends java.lang.Object
implements Project, Build, BuildDefinition, BuildDefinitionForBuild

Information about a build under Continuous Integration.

See Also:
Serialized Form

Field Summary
protected  java.util.List myBuildResultSummaries
           
 
Fields inherited from interface com.atlassian.bamboo.plan.Plan
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
 
Constructor Summary
BuildObjectForTests()
          Simple package constructor for testing
BuildObjectForTests(Repository repository, java.lang.String name)
          Create a build
BuildObjectForTests(Repository repository, java.lang.String name, java.lang.String emailAddress)
          Create a build
 
Method Summary
 void accept(PlanVisitor planVisitor)
           
 void addArtifact(Artifact artifact)
          Add a new artifact to the existing build artifacts
 java.lang.String addBuildLogEntry(LogEntry logEntry)
           
 java.lang.String addBuildLogEntry(java.lang.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()
           
 boolean equals(java.lang.Object o)
          We're only using the build name to compare builds
 java.util.Collection<Artifact> getArtifactDefinitions()
           
 java.util.Map getArtifacts()
          Get the custom Artifacts.
 long getAverageBuildDuration()
          Returns an average duration of the recent builds
 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)
 BuildDefinition getBuildDefinition()
          Returns the BuildDefinition that backs this buildd
 BuildDefinitionForBuild getBuildDefinitionXml()
           
 Builder getBuilder()
          Obtain the build's Builder.
 BuilderManager getBuilderManager()
           
 BuilderV2 getBuilderV2()
           
 java.lang.String getBuildKey()
          Thie returns the build portion of the build key
 java.util.Collection getBuildLog()
          Provide the latest build details.
 BuildLogger getBuildLogger()
          Returns the helper object to deal with logging
 java.lang.String getBuildName()
          Returns the name for the build in the form of "build name" e.g.
 BuildResultsSummaryManager getBuildResultsSummaryManager()
           
 java.util.List getBuildResultSummaries()
          Obtains the builds total collection of BuildResultsSummary objects (most recent first), one for each build.
 java.util.List<Build> getBuilds()
          Returns all Build associated with the Project.
 BuildStrategy getBuildStrategy()
          Returns to BuildStrategy that the user actually selects
 java.util.List<Chain> getChains()
          Returns all the Chain associated with the Project
 java.util.Map getConfigObjects()
          Returns a map of objects generated by the plugins.
 BuildStrategy getCurrentBuildStrategy()
           
 java.lang.String getCurrentStatus()
          Returns the string representatioin the current status of a build.
 java.util.Map getCustomConfiguration()
          A map consisting of String key and String value pairs.
 BuildDefinition getDefaultBuildDefinition()
           
 java.lang.String getDescription()
           
 java.util.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()
          Get the first build result
 long getId()
           
 java.lang.String getKey()
          Returns key of the project.
 java.util.List<Labelling> getLabellings()
           
 int getLastBuildNumber()
          What was the number of the lastest build (may be being built)
 java.util.Date getLastBuildStartTime()
          When was the last time this build was 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()
          Obtain the build's name
 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()
           
 long getNumberOfBuildSummaries()
           
 Plan getPlan()
           
 PlanKey getPlanKey()
          Get the PlanKey identifier for this Plan
 java.util.List<Plan> getPlans()
          Returns all Plan associated with the Project.
 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
 java.util.List<Labelling> getRelatedLabellings()
           
 Repository getRepository()
          Obtain the build's Repository.
 RepositoryV2 getRepositoryV2()
          A repository object that can be used to perform
 RequirementSet getRequirementSet()
           
 java.io.File getSourceCodeDirectory()
          Returns a file representing the source directory from the Repository
 java.util.List<TestClass> getTestClasses()
           
 WebRepositoryViewer getWebRepositoryViewer()
          Get the module responsible for displaying commits for this build.
 java.lang.String getXmlData()
           
 XmppMessageSender getXmppMessageSender()
          The build's option IM message server configuration
 boolean hasArtifacts()
           
 boolean hasBuildResults()
          Has the build got any build results to display?
 int hashCode()
          IntelliJ generated hash
 boolean isBusy()
          Does something have a lock on the build
 boolean isExecuting()
          Is the build currenlty being executed?
 boolean isInBuildQueue()
          Is the build currenlty being built?
 boolean isMarkedForDeletion()
          Whether or not the build has been marked for deletion
 boolean isMarkedForEditBuild()
           
 boolean isMarkedForManualBuild()
          Has a manual build been requested for this build?
 boolean isSuspendedFromBuilding()
          Checks if the build has been
 void markAsNeedingBuilding(ReasonForBuild reasonForBuild)
           
 void markForDeletion()
          Marks the build to be deleted.
 void removeBuildResultSummary(int buildNumber)
          Remove buildResultSummary and all persisted files for given build number
 void save()
           
 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 setBuildDefinition(BuildDefinitionForBuild buildDefinition)
           
 void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
           
 void setBuilder(Builder builder)
          Set the build's builder.
 void setBuilderManager(BuilderManager builderManager)
           
 void setBuildKey(java.lang.String buildKey)
          Define the build's unique key (uppercase alphanumeric)
 void setBuildName(java.lang.String buildName)
           
 void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
           
 void setBuildResultSummaries(java.util.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 setConfigObjects(java.util.Map configObjects)
           
 void setCustomConfiguration(java.util.Map configMap)
          A map of String key and String value pairs, representing custom
 void setDescription(java.lang.String description)
           
 void setFieldValueItems(java.util.List fieldValueItems)
           
 void setFirstBuildNumber(int firstBuildNumber)
           
 void setId(long id)
           
 void setInBuildQueue(boolean isBuilding)
          Set the is-building flag.
 void setKey(java.lang.String key)
          Sets the key for the project.
 void setLabellings(java.util.List labellings)
           
 void setLastBuildNumber(int lastBuildNumber)
           
 void setLastBuildStartTime(java.util.Date lastBuildTime)
          Set the time of the last build
 void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
           
 void setName(java.lang.String name)
           
 void setNextBuildNumber(int nextBuildNumber)
           
 void setNotificationSet(NotificationSet notificationSet)
           
 void setPlan(Plan build)
           
 void setPollingPeriod(int pollingPeriod)
          How long should we wait between checking the build to see if it need building?
 void setProject(Project project)
           
 void setRepository(Repository repository)
          Set the build's source code repository.
 void setRequirementSet(RequirementSet requirementSet)
           
 void setSuspendedFromBuilding(boolean suspendFromBuilding)
          Sets the build to suspend temporarily
 void setWebRepositoryViewer(WebRepositoryViewer webRepositoryViewer)
          Set the module responsibile for displaying commits for this build.
 void setWorkingDirectory(java.lang.String buildDirectory)
           
 void setXmlData(java.lang.String xmlData)
           
 void setXmppMessageSender(XmppMessageSender xmppMessageSender)
          The build's option IM message server configuration
 void unmarkBuild()
           
 void unMarkForDeletion()
          Build will no longer be marked for deletion
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myBuildResultSummaries

protected java.util.List myBuildResultSummaries
Constructor Detail

BuildObjectForTests

public BuildObjectForTests()
Simple package constructor for testing


BuildObjectForTests

public BuildObjectForTests(Repository repository,
                           java.lang.String name)
Create a build

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

BuildObjectForTests

public BuildObjectForTests(Repository repository,
                           java.lang.String name,
                           java.lang.String emailAddress)
Create a build

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

getLastVcsRevisionKey

public java.lang.String getLastVcsRevisionKey()
Description copied from interface: Plan
The string value representing the last build triggered. Will be null if nothing has been built. The value is parseable by the individual repositories

Specified by:
getLastVcsRevisionKey in interface Plan
Returns:

setLastVcsRevisionKey

public void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
Specified by:
setLastVcsRevisionKey in interface Plan

getBuildLogger

public BuildLogger getBuildLogger()
Description copied from interface: Plan
Returns the helper object to deal with logging

Specified by:
getBuildLogger in interface Plan
Returns:
A BuildLogger. @NotNull

getBuilderV2

public BuilderV2 getBuilderV2()
Specified by:
getBuilderV2 in interface BuildPlanDefinition

getRepositoryV2

public RepositoryV2 getRepositoryV2()
Description copied from interface: BuildPlanDefinition
A repository object that can be used to perform

Specified by:
getRepositoryV2 in interface BuildPlanDefinition
Returns:

getArtifactDefinitions

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

getCurrentStatus

public java.lang.String getCurrentStatus()
Description copied from interface: Project
Returns the string representatioin the current status of a build. Mirrors Build@getCurrentStatus. It will return "current" if any plan is building, and "fail" if any plan is failing.

Specified by:
getCurrentStatus in interface Plan
Specified by:
getCurrentStatus in interface Project
Returns:
a String

getBuildName

public java.lang.String getBuildName()
Description copied from interface: Plan
Returns the name for the build in the form of "build name" e.g. if the full name was "Confluence - HEAD" the build name would be HEAD

Specified by:
getBuildName in interface Plan
Returns:
String

setBuildName

public void setBuildName(java.lang.String buildName)
Specified by:
setBuildName in interface Plan

getBuildDefinitionXml

public BuildDefinitionForBuild getBuildDefinitionXml()
Specified by:
getBuildDefinitionXml in interface Plan

setBuildDefinitionXml

public void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
Specified by:
setBuildDefinitionXml in interface Plan

setFieldValueItems

public void setFieldValueItems(java.util.List fieldValueItems)

setNextBuildNumber

public void setNextBuildNumber(int nextBuildNumber)
Specified by:
setNextBuildNumber in interface Plan

setLastBuildNumber

public void setLastBuildNumber(int lastBuildNumber)
Specified by:
setLastBuildNumber in interface Plan

setFirstBuildNumber

public void setFirstBuildNumber(int firstBuildNumber)
Specified by:
setFirstBuildNumber in interface Plan

getNextBuildNumber

public int getNextBuildNumber()
Description copied from interface: Plan
The next build number represents the number of the next build result that's to be executed

Specified by:
getNextBuildNumber in interface Plan
Returns:
a build number, starting with 1

setKey

public void setKey(java.lang.String key)
Description copied from interface: Project
Sets the key for the project. Must not be null

Specified by:
setKey in interface Plan
Specified by:
setKey in interface Project

getPlans

public java.util.List<Plan> getPlans()
Description copied from interface: Project
Returns all Plan associated with the Project. Returns Collections.EMPTY_LIST` if there are no Plans for the project.

Specified by:
getPlans in interface Project
Returns:
List of Plans. Collections.EMPTY_LIST` if no plans.

getPlanKey

@NotNull
public PlanKey getPlanKey()
Description copied from interface: Plan
Get the PlanKey identifier for this Plan

Specified by:
getPlanKey in interface Plan
Returns:
planKey

getBuildKey

public java.lang.String getBuildKey()
Description copied from interface: Plan
Thie returns the build portion of the build key

Specified by:
getBuildKey in interface Plan
Returns:
String

setProject

public void setProject(Project project)
Specified by:
setProject in interface Plan

setPlan

public void setPlan(Plan build)
Specified by:
setPlan in interface BuildDefinitionForBuild

setBuildDefinition

public void setBuildDefinition(BuildDefinitionForBuild buildDefinition)

getXmlData

public java.lang.String getXmlData()
Specified by:
getXmlData in interface BuildDefinitionXml

setXmlData

public void setXmlData(java.lang.String xmlData)
Specified by:
setXmlData in interface BuildDefinitionXml

getBuildDefinition

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

Specified by:
getBuildDefinition in interface Plan
Returns:
BuildDefinition object. Never null.

getId

public long getId()
Specified by:
getId in interface BambooObject

setId

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

getProject

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

Specified by:
getProject in interface Plan
Returns:
Project. Never null

getPlan

public Plan getPlan()
Specified by:
getPlan in interface BuildDefinitionForBuild

getCurrentBuildStrategy

public BuildStrategy getCurrentBuildStrategy()

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

save

public void save()

setBuildStrategy

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

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

getRepository

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

Specified by:
getRepository in interface BuildDefinition
Specified by:
getRepository in interface BuildPlanDefinition
Returns:
The Repository

setRepository

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

Specified by:
setRepository in interface BuildDefinition
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
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
Parameters:
pollingPeriod - The time in seconds

getBuilder

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

Specified by:
getBuilder in interface BuildDefinition
Returns:
The builder

setBuilder

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

Specified by:
setBuilder in interface BuildDefinition
Parameters:
builder - the builder

getName

public java.lang.String getName()
Obtain the build's name

Specified by:
getName in interface Plan
Specified by:
getName in interface Project
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
The build's name

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Describable
Specified by:
setName in interface Project

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface DescriptionProvider

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface Describable

getKey

public java.lang.String getKey()
Description copied from interface: Project
Returns key of the project. Keys are capital, alphanumeric strings.

Specified by:
getKey in interface Plan
Specified by:
getKey in interface Project
Returns:
key of project. Must not be null.

getDefaultBuildDefinition

public BuildDefinition getDefaultBuildDefinition()

getBuilds

@NotNull
public java.util.List<Build> 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
Returns:
List of Builds. Collections.EMPTY_LIST` if no builds.

getChains

public java.util.List<Chain> getChains()
Description copied from interface: Project
Returns all the Chain associated with the Project

Specified by:
getChains in interface Project
Returns:
projects or empty collection if none found

getLabellings

public java.util.List<Labelling> getLabellings()
Specified by:
getLabellings in interface Plan
Specified by:
getLabellings in interface Project

getRelatedLabellings

public java.util.List<Labelling> getRelatedLabellings()
Specified by:
getRelatedLabellings in interface Plan
Specified by:
getRelatedLabellings in interface Project

setLabellings

public void setLabellings(java.util.List labellings)
Specified by:
setLabellings in interface Plan
Specified by:
setLabellings in interface Project

setBuildKey

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

Specified by:
setBuildKey in interface Plan
Parameters:
buildKey - The value of the key

getBuildChangedEmails

public java.lang.String getBuildChangedEmails()
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

setBuildChangedEmails

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

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

getBuildChangedEmailList

public java.util.List getBuildChangedEmailList()
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.

getLastBuildNumber

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

Specified by:
getLastBuildNumber in interface Plan
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 Plan
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
Parameters:
buildResultsSummary - The build summary

setBuildResultSummaries

public void setBuildResultSummaries(java.util.List buildResultSummaries)
Legacy left over method (this is the extreme version of build result summaries)

Parameters:
buildResultSummaries -

getBuildResultSummaries

public java.util.List getBuildResultSummaries()
Obtains the builds total collection of BuildResultsSummary objects (most recent first), one for each build. EW 01/11/2006 - Moved to a hibernated source for build result summaries.

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

setInBuildQueue

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

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 Plan
Returns:
true iff is currently in the build pipleline

accept

public void accept(PlanVisitor planVisitor)
Specified by:
accept in interface Plan

isExecuting

public boolean isExecuting()
Description copied from interface: Plan
Is the build currenlty being executed?

Specified by:
isExecuting in interface Plan
Returns:
true if build is being executed

getLastBuildStartTime

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

Returns:
The date, null if it has not been build.

setLastBuildStartTime

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

Parameters:
lastBuildTime - the time

setWorkingDirectory

public void setWorkingDirectory(java.lang.String buildDirectory)
Specified by:
setWorkingDirectory in interface BuildDefinition

hasBuildResults

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

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

hasArtifacts

public boolean hasArtifacts()

getArtifacts

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

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

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

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 configMap)
Description copied from interface: BuildDefinition
A map of String key and String value pairs, representing custom

Specified by:
setCustomConfiguration in interface BuildDefinition
Parameters:
configMap - - can be null

getLatestBuildSummary

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

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

getFirstBuildSummary

public BuildResultsSummary getFirstBuildSummary()
Description copied from interface: Build
Get the first build result

Specified by:
getFirstBuildSummary in interface Build
Returns:
result

getNumberOfBuildSummaries

public long getNumberOfBuildSummaries()

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

getBuildLog

public java.util.Collection getBuildLog()
Provide the latest build details. This is not persisted.

Returns:
The collection of log strings

addBuildLogEntry

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

Parameters:
entryDescription - The entry to add

addBuildLogEntry

public java.lang.String addBuildLogEntry(LogEntry logEntry)

isMarkedForManualBuild

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


isMarkedForEditBuild

public boolean isMarkedForEditBuild()

markAsNeedingBuilding

public void markAsNeedingBuilding(ReasonForBuild reasonForBuild)

unmarkBuild

public void unmarkBuild()

validateBuild

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

Specified by:
validateBuild in interface Plan
Returns:
and ErrorCollection with relevent error messages

getFieldValueItems

public java.util.List getFieldValueItems()

getSourceCodeDirectory

public java.io.File getSourceCodeDirectory()
                                    throws RepositoryException
Description copied from interface: Plan
Returns a file representing the source directory from the Repository

Specified by:
getSourceCodeDirectory in interface Plan
Returns:
file`representing the source directory. null iff an exception has been thrown
Throws:
RepositoryException

getAverageBuildDuration

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

Specified by:
getAverageBuildDuration in interface Build
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
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

markForDeletion

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

Specified by:
markForDeletion in interface Plan

unMarkForDeletion

public void unMarkForDeletion()
Description copied from interface: Plan
Build will no longer be marked for deletion

Specified by:
unMarkForDeletion in interface Plan

isMarkedForDeletion

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

Specified by:
isMarkedForDeletion in interface Plan
Returns:

setSuspendedFromBuilding

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

Specified by:
setSuspendedFromBuilding in interface Plan

isSuspendedFromBuilding

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

Specified by:
isSuspendedFromBuilding in interface Plan
Returns:

clearBuildLog

public void clearBuildLog()

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
o - object we are comparing
Returns:
usual stuff

hashCode

public int hashCode()
IntelliJ generated hash

Overrides:
hashCode in class java.lang.Object
Returns:
hash

getBuilderManager

public BuilderManager getBuilderManager()

setBuilderManager

public void setBuilderManager(BuilderManager builderManager)

getBuildResultsSummaryManager

public BuildResultsSummaryManager getBuildResultsSummaryManager()

setBuildResultsSummaryManager

public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)

getNotificationSet

public NotificationSet getNotificationSet()
Specified by:
getNotificationSet in interface Plan

setNotificationSet

public void setNotificationSet(NotificationSet notificationSet)
Specified by:
setNotificationSet in interface Plan

getRequirementSet

@NotNull
public RequirementSet getRequirementSet()
Specified by:
getRequirementSet in interface Plan

setRequirementSet

public void setRequirementSet(RequirementSet requirementSet)
Specified by:
setRequirementSet in interface Plan

isBusy

public boolean isBusy()
Description copied from interface: Build
Does something have a lock on the build

Specified by:
isBusy in interface Build
Returns:

removeBuildResultSummary

public void removeBuildResultSummary(int buildNumber)
Description copied from interface: Build
Remove buildResultSummary and all persisted files for given build number

Specified by:
removeBuildResultSummary in interface Build

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

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

getTestClasses

@NotNull
public java.util.List<TestClass> getTestClasses()


Copyright © 2010 Atlassian. All Rights Reserved.