com.atlassian.bamboo.build
Class AbstractBuildable

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.plan.AbstractPlan
              extended by com.atlassian.bamboo.build.AbstractBuildable
All Implemented Interfaces:
Buildable, BambooObject, Deletable, Describable, Plan, DescriptionProvider, NameProvider, java.lang.Cloneable, java.lang.Comparable<Plan>
Direct Known Subclasses:
DefaultBuild, DefaultJob

public abstract class AbstractBuildable
extends AbstractPlan
implements Buildable


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
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
AbstractBuildable()
           
 
Method Summary
 void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
          Add the given build results summary to the build.
 long getAverageBuildDuration()
          Returns an average duration of the recent builds
 BuildResultsSummaryManager getBuildResultsSummaryManager()
           
 java.util.List<BuildResultsSummary> getBuildResultSummaries()
          Obtains the builds total collection of BuildResultsSummary objects (oldest first), one for each build.
 java.lang.String getCurrentStatus()
          Retuns a string key as to what the status is.
 BuildResultsSummary getFirstBuildSummary()
          Get the first build result
 BuildResultsSummary getLatestBuildSummary()
          Get the summary from the latest completed build
 ResultsSummary getLatestResultsSummary()
          Get the summary from the latest completed plan
 BuildResults getNextBuildResults(int buildNumber)
           
 int getNumberOfConcurrentlyRunningBuilds()
          Gets the number of currently running concurrent build instances for the build
 BuildResults getPreviousBuildResults(int buildNumber)
          Gets the first BuildResultsImpl before the passed number
 RequirementSet getRequirementSet()
           
 boolean hasBuildResults()
          Has the build got any build results to display?
 boolean isActive()
          Checks if the plan has an active build(s).
 boolean isExecuting()
          Is the build currenlty being executed?
 boolean isInBuildQueue()
          Is the build currently being built?
 void removeBuildResultSummary(int buildNumber)
          Remove buildResultSummary and all persisted files for given build number
 void setBuildExecutionManager(BuildExecutionManager buildExecutionManager)
           
 void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
           
 void setRequirementSet(RequirementSet requirementSet)
           
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDescription, getDiscriminator, getFirstBuildNumber, getKey, getLabellings, getLastBuildNumber, getLastVcsRevisionKey, getName, getNextBuildNumber, getNotificationSet, getPlanKey, getProject, getRelatedLabellings, getSourceCodeDirectory, getTestClasses, hashCode, hasTests, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setLastVcsRevisionKey, setMarkedForDeletion, setName, setNextBuildNumber, setNotificationSet, setPlanExecutionManager, setProject, setSuspendedFromBuilding, setTaskManager, setTestClasses
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.plan.Plan
getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getFirstBuildNumber, getKey, getLabellings, getLastBuildNumber, getLastVcsRevisionKey, getName, getNextBuildNumber, getPlanKey, getProject, getRelatedLabellings, getSourceCodeDirectory, getType, hasTests, isBusy, isSuspendedFromBuilding, setBuildDefinitionXml, setBuildKey, setBuildName, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setLastVcsRevisionKey, setNextBuildNumber, setProject, setSuspendedFromBuilding
 
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
isMarkedForDeletion, setMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Constructor Detail

AbstractBuildable

public AbstractBuildable()
Method Detail

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

getBuildResultSummaries

public java.util.List<BuildResultsSummary> getBuildResultSummaries()
Description copied from interface: Buildable
Obtains the builds total collection of BuildResultsSummary objects (oldest first), one for each build.

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

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

getLatestBuildSummary

public BuildResultsSummary getLatestBuildSummary()
Description copied from interface: Buildable
Get the summary from the latest completed 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

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:

getFirstBuildSummary

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

Specified by:
getFirstBuildSummary in interface Buildable
Returns:
result

getRequirementSet

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

setRequirementSet

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

addBuildResultSummary

public void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
Description copied from interface: Buildable
Add the given build results summary to the build.

Specified by:
addBuildResultSummary in interface Buildable
Parameters:
buildResultsSummary - The build summary

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

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

hasBuildResults

public boolean hasBuildResults()
Description copied from interface: Buildable
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

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

getCurrentStatus

public java.lang.String getCurrentStatus()
Description copied from interface: Plan
Retuns a string key as to what the status is. Can be "success", "failure", "current", "none" or "notRun". Mainly used for UI purposes.

Specified by:
getCurrentStatus in interface Plan
Returns:

isInBuildQueue

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

Specified by:
isInBuildQueue in interface Buildable
Returns:
true iff is currently in the build pipleline

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

setBuildResultsSummaryManager

public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)

getBuildResultsSummaryManager

public BuildResultsSummaryManager getBuildResultsSummaryManager()

setBuildExecutionManager

public void setBuildExecutionManager(BuildExecutionManager buildExecutionManager)


Copyright © 2011 Atlassian. All Rights Reserved.