com.atlassian.bamboo.build
Class DefaultJob

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.DefaultJob
All Implemented Interfaces:
Buildable, Job, BambooIdProvider, BambooObject, Deletable, Describable, ImmutableDeletable, ImmutableJob, ImmutablePlan, Plan, PlanIdentifier, DescriptionProvider, NameProvider, java.lang.Cloneable, java.lang.Comparable<Plan>

public class DefaultJob
extends AbstractPlan
implements Job, Buildable


Field Summary
static int NUMBER_OF_RESULTS
           
 
Fields inherited from class com.atlassian.bamboo.plan.AbstractPlan
resultsSummaryManager
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
 
Constructor Summary
DefaultJob()
           
 
Method Summary
 void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
          Deprecated. 
 java.util.List<ArtifactDefinition> getArtifactDefinitions()
           
 java.util.List<ArtifactSubscription> getArtifactSubscriptions()
           
 long getAverageBuildDuration()
          Returns an average duration of the recent builds
 BuildResultsSummaryManager getBuildResultsSummaryManager()
           
 java.util.List<BuildResultsSummary> getBuildResultSummaries()
          Deprecated. 
 java.lang.String getCurrentStatus()
          Retuns a string key as to what the status is.
 RequirementSet getEffectiveRequirementSet()
          Return effective value of RequirementSet, that is value that is considered when checking which agents and elastic images can build this Buildable.
 BuildResultsSummary getFirstBuildSummary()
          Deprecated. 
 BuildResultsSummary getLatestBuildSummary()
          Deprecated. 
 Job getMaster()
          Return the master plan if one exists.
 java.lang.String getName()
          Returns the full name for the build in the form of "project name - build name" e.g.
 BuildResults getNextBuildResults(int buildNumber)
          Deprecated. 
 int getNumberOfConcurrentlyRunningBuilds()
          Deprecated. 
 Chain getParent()
          The Chain that this Job is a member of
 PlanType getPlanType()
           
 BuildResults getPreviousBuildResults(int buildNumber)
          Deprecated. 
 RequirementSet getRequirementSet()
           
 ChainStage getStage()
          The ChainStage that this Job is a member of
 boolean hasBuildResults()
          Deprecated. 
 boolean isActive()
          Is the plan queued or building?
 boolean isExecuting()
          Is the build currently being executed?
 void removeBuildResultSummary(int buildNumber)
          Deprecated. 
 void setArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager)
           
 void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)
           
 void setBuildExecutionManager(BuildExecutionManager buildExecutionManager)
           
 void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
           
 void setMaster(Plan master)
          Set which plan is the master of this plan.
 void setRequirementSet(RequirementSet requirementSet)
           
 void setStage(ChainStage chainStage)
           
 ErrorCollection validateBuild()
          Deprecated. 
 
Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDescription, getDiscriminator, getEffectiveVariables, getFirstBuildNumber, getKey, getLabellings, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getNextBuildNumber, getPlanKey, getProject, getRelatedLabellings, getTestClasses, getType, getVariables, hashCode, hasMaster, hasTests, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setFirstBuildNumber, setKey, setLabellings, setLabelManager, setLastBuildNumber, setMarkedForDeletion, setName, setNextBuildNumber, setPlanExecutionManager, setPlanKey, setProject, setResultsSummaryManager, setSuspendedFromBuilding, setTaskManager, setTestClasses, setVariableDefinitionManager
 
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
getLabellings, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setNextBuildNumber, setPlanKey, setProject, setSuspendedFromBuilding
 
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
 
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
isMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getBuildDefinition, getBuildDefinitionXml, getBuildLogger, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getNextBuildNumber, getProject, getType, getVariables, hasMaster, hasTests, isBusy, isMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
getBuildKey, getBuildName, getId, getPlanKey, isSuspendedFromBuilding
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Field Detail

NUMBER_OF_RESULTS

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

DefaultJob

public DefaultJob()
Method Detail

getPlanType

@NotNull
public PlanType getPlanType()
Specified by:
getPlanType in interface PlanIdentifier
Returns:
the type of this plan

getName

@NotNull
public java.lang.String getName()
Description copied from interface: PlanIdentifier
Returns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"

Specified by:
getName in interface PlanIdentifier
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Overrides:
getName in class AbstractPlan
Returns:
String

getParent

@NotNull
public Chain getParent()
Description copied from interface: Job
The Chain that this Job is a member of

Specified by:
getParent in interface Job
Specified by:
getParent in interface ImmutableJob
Returns:
chain

getStage

@NotNull
public ChainStage getStage()
Description copied from interface: Job
The ChainStage that this Job is a member of

Specified by:
getStage in interface Job
Specified by:
getStage in interface ImmutableJob
Returns:
stage

setStage

public void setStage(@NotNull
                     ChainStage chainStage)
Specified by:
setStage in interface Job

getMaster

public Job getMaster()
Description copied from interface: ImmutablePlan
Return the master plan if one exists. The master is the plan which this one is derived from. Configuration is pulled from the master if one exists.

Specified by:
getMaster in interface Job
Specified by:
getMaster in interface ImmutableJob
Specified by:
getMaster in interface ImmutablePlan
Returns:
the master Plan if one exists.

setMaster

public void setMaster(Plan master)
Description copied from interface: Plan
Set which plan is the master of this plan. The master is the plan which this one is derived from. Configuration is pulled from the master if one exists.

Specified by:
setMaster in interface Plan

isActive

public boolean isActive()
Description copied from interface: ImmutablePlan
Is the plan queued or building?

Specified by:
isActive in interface ImmutablePlan
Returns:

getCurrentStatus

@NotNull
public java.lang.String getCurrentStatus()
Description copied from interface: ImmutablePlan
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 ImmutablePlan
Returns:

isExecuting

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

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

getArtifactDefinitions

@NotNull
public java.util.List<ArtifactDefinition> getArtifactDefinitions()
Specified by:
getArtifactDefinitions in interface ImmutableJob
Returns:
list of produced artifacts

getArtifactSubscriptions

@NotNull
public java.util.List<ArtifactSubscription> getArtifactSubscriptions()
Specified by:
getArtifactSubscriptions in interface ImmutableJob
Returns:
list of artifact subscriptions

getAverageBuildDuration

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

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

getRequirementSet

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

setRequirementSet

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

getEffectiveRequirementSet

@NotNull
public RequirementSet getEffectiveRequirementSet()
Description copied from interface: Buildable
Return effective value of RequirementSet, that is value that is considered when checking which agents and elastic images can build this Buildable.

Specified by:
getEffectiveRequirementSet in interface Buildable
Specified by:
getEffectiveRequirementSet in interface ImmutableJob
Returns:
the same as Buildable.getRequirementSet() if ImmutablePlan.hasMaster() is false, getMaster().getRequirementSet() otherwise.

setBuildResultsSummaryManager

public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)

getBuildResultsSummaryManager

public BuildResultsSummaryManager getBuildResultsSummaryManager()

setBuildExecutionManager

public void setBuildExecutionManager(BuildExecutionManager buildExecutionManager)

setArtifactDefinitionManager

public void setArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager)

setArtifactSubscriptionManager

public void setArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager)

getBuildResultSummaries

@Deprecated
public java.util.List<BuildResultsSummary> getBuildResultSummaries()
Deprecated. 

Specified by:
getBuildResultSummaries in interface Buildable

getLatestBuildSummary

@Deprecated
public BuildResultsSummary getLatestBuildSummary()
Deprecated. 

Specified by:
getLatestBuildSummary in interface Buildable

getNumberOfConcurrentlyRunningBuilds

@Deprecated
public int getNumberOfConcurrentlyRunningBuilds()
Deprecated. 

Specified by:
getNumberOfConcurrentlyRunningBuilds in interface Buildable

getFirstBuildSummary

@Deprecated
public BuildResultsSummary getFirstBuildSummary()
Deprecated. 

Specified by:
getFirstBuildSummary in interface Buildable

addBuildResultSummary

@Deprecated
public void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
Deprecated. 

Specified by:
addBuildResultSummary in interface Buildable

removeBuildResultSummary

@Deprecated
public void removeBuildResultSummary(int buildNumber)
Deprecated. 

Specified by:
removeBuildResultSummary in interface Buildable

getPreviousBuildResults

@Deprecated
@Nullable
public BuildResults getPreviousBuildResults(int buildNumber)
Deprecated. 

Specified by:
getPreviousBuildResults in interface Buildable

getNextBuildResults

@Deprecated
@Nullable
public BuildResults getNextBuildResults(int buildNumber)
Deprecated. 

Specified by:
getNextBuildResults in interface Buildable

hasBuildResults

@Deprecated
public boolean hasBuildResults()
Deprecated. 

Specified by:
hasBuildResults in interface Buildable

validateBuild

@Deprecated
public ErrorCollection validateBuild()
Deprecated. 

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


Copyright © 2012 Atlassian. All Rights Reserved.