com.atlassian.bamboo.build
Class BuildObjectForTests

java.lang.Object
  extended by com.atlassian.bamboo.build.BuildObjectForTests
All Implemented Interfaces:
Build, Buildable, BuildDefinition, BuildDefinitionForBuild, BuildDefinitionXml, BambooObject, Deletable, Describable, Plan, TopLevelPlan, 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
 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()
           
 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.
 BuildStrategy getBuildStrategy()
          Returns to BuildStrategy that the user actually selects
 java.util.Map getConfigObjects()
          Returns a map of objects generated by the plugins.
 BuildStrategy getCurrentBuildStrategy()
           
 java.lang.String getCurrentStatus()
          Returns the string representation 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.
 BuildResultsSummary getLatestBuildSummary()
          Get the summary from the latest build
 ResultsSummary getLatestResultsSummary()
          Get the summary from the latest completed plan
 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()
           
 int getNumberOfConcurrentlyRunningBuilds()
          Gets the number of currently running concurrent build instances for the build
 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<TaskDefinition> getTaskDefinitions()
          All tasks defined for this build.
 java.util.List<TestClass> getTestClasses()
           
 java.util.List<TopLevelPlan> getTopLevelPlans()
          This methods returns all TopLevelPlans, including the ones marked for deletion This collection is a lazy relationship for performance reasons.
 java.lang.String getType()
           
 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 hasBuildResults()
          Has the build got any build results to display?
 int hashCode()
          IntelliJ generated hash
 boolean hasTests()
          Helper method checking if plan has tests defined
 boolean isActive()
          Checks if the plan has an active build(s).
 boolean isBusy()
          Is the Plan busy
 boolean isExecuting()
          Is the build currenlty being executed?
 boolean isInBuildQueue()
          Is the build currenlty being built?
 boolean isInheritRepository()
          Whether the BuildDefinition will use its own Repository or not or will it use its parents' Repository
 boolean isMarkedForDeletion()
           
 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()
           
 void removeBuildResultSummary(int buildNumber)
          Remove buildResultSummary and all persisted files for given build number
 void save()
           
 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 setInheritRepository(boolean inheritRepositoryFromParent)
          Sets if the BuildDefinition should use the parents' Repository
 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 setMarkedForDeletion(boolean markedForDeletion)
           
 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 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 setXmlData(java.lang.String xmlData)
           
 void setXmppMessageSender(XmppMessageSender xmppMessageSender)
          The build's option IM message server configuration
 void unmarkBuild()
           
 void unMarkForDeletion()
           
 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

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

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 inheritRepositoryFromParent)
Description copied from interface: BuildDefinition
Sets if the BuildDefinition should use the parents' Repository

Specified by:
setInheritRepository in interface BuildDefinition

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

getCurrentStatus

public java.lang.String getCurrentStatus()
Description copied from interface: Project
Returns the string representation 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

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

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

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

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

getPlans

@NotNull
public java.util.List<Plan> getPlans()
Description copied from interface: Project
Returns all Plan associated with the Project. Returns Collections.emptyList() if there are no Plans for the project. This collection is a lazy relationship for performance reasons. If you need to guarantee that these collections are available use PlanManager.getPlansByProject(Project, Class)

Specified by:
getPlans in interface Project
Returns:
List of Plans. Collections.emptyList() if no plans.

getTopLevelPlans

@NotNull
public java.util.List<TopLevelPlan> getTopLevelPlans()
Description copied from interface: Project
This methods returns all TopLevelPlans, including the ones marked for deletion This collection is a lazy relationship for performance reasons. If you need to guarantee that these collections are available use PlanManager.getPlansByProject(Project, Class) Use this method only if all you need is present in TopLevelPlan interface, otherwise consider using getAllChains.

Specified by:
getTopLevelPlans in interface Project
Returns:

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

getNumberOfConcurrentlyRunningBuilds

public int getNumberOfConcurrentlyRunningBuilds()
Description copied from interface: Buildable
Gets the number of currently running concurrent build instances for the build

Specified by:
getNumberOfConcurrentlyRunningBuilds in interface Buildable
Returns:

isActive

public boolean isActive()
Description copied from interface: Plan
Checks if the plan has an active build(s).

Specified by:
isActive in interface Plan
Returns:
true if at least one build request is currently in the queue or being processed

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 Buildable
Returns:
true if the build has been built, false otherwise

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 BuildResultsSummary getLatestBuildSummary()
Get the summary from the latest build

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

getLatestResultsSummary

public ResultsSummary getLatestResultsSummary()
Description copied from interface: Plan
Get the summary from the latest completed plan

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

getFirstBuildSummary

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

Specified by:
getFirstBuildSummary in interface Buildable
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: Plan
Returns an average duration of the recent builds

Specified by:
getAverageBuildDuration in interface Plan
Returns:
The duration in milliseconds

getPreviousBuildResults

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

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

getNextBuildResults

@Nullable
public BuildResults getNextBuildResults(int buildNumber)
Specified by:
getNextBuildResults in interface Buildable

markForDeletion

public void markForDeletion()

unMarkForDeletion

public void unMarkForDeletion()

isMarkedForDeletion

public boolean isMarkedForDeletion()
Specified by:
isMarkedForDeletion in interface Deletable
Returns:
Whether or not the Object has been marked for deletion

setMarkedForDeletion

public void setMarkedForDeletion(boolean markedForDeletion)
Specified by:
setMarkedForDeletion in interface Deletable

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 TopLevelPlan

setNotificationSet

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

getRequirementSet

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

setRequirementSet

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

isBusy

public boolean isBusy()
Description copied from interface: Plan
Is the Plan busy

Specified by:
isBusy in interface Plan
Returns:
busy

removeBuildResultSummary

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

Specified by:
removeBuildResultSummary in interface Buildable

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

getType

@NotNull
public java.lang.String getType()
Specified by:
getType in interface Plan
Returns:
a string representation of the implementation type. Used for freemarker.

hasTests

public boolean hasTests()
Description copied from interface: Plan
Helper method checking if plan has tests defined

Specified by:
hasTests in interface Plan
Returns:
true iff plan produces test results


Copyright © 2011 Atlassian. All Rights Reserved.