Package com.atlassian.bamboo.build
Class DefaultJob
java.lang.Object
com.atlassian.core.bean.EntityObject
- All Implemented Interfaces:
Buildable,Job,BambooIdProvider,BambooObject,BambooObjectWithOid,EntityWithOid,ImmutableEntityWithOid,Deletable,Describable,ImmutableBuildable,ImmutableDeletable,ImmutableJob,ImmutablePlan,Plan,PlanIdentifier,PlanKeyProvider,TaskContainer,DescriptionProvider,NameProvider,Versionable,VersionedEntityComponent<Chain>,Cloneable,Comparable<Plan>
-
Field Summary
FieldsFields inherited from class com.atlassian.bamboo.plan.AbstractPlan
internalResultsSummaryAccessorFields inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESSFields inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
NAME_DELIMITERFields inherited from interface com.atlassian.bamboo.plan.PlanKeyProvider
getPlanKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull List<ArtifactDefinition> @NotNull List<ArtifactSubscription> longReturns an average duration of the recent builds@NotNull String@NotNull RequirementSetReturn effective value ofRequirementSet, that is value that is considered when checking which agents, elastic images and ephemeral templates can build this Buildable.Return the master plan if one exists.@NotNull StringgetName()Returns the full name for the build in the form of "project name - build name" e.g.@NotNull Chain@NotNull PlanType@NotNull RequirementSet@Nullable ChaingetRoot()Returns the versioned root of the object.@NotNull ChainStagegetStage()TheChainStagethat thisJobis a member of@NotNull List<TaskDefinition> booleanisActive()Is the plan queued or building?booleanIs part of divergent branch.booleanIs the build currently being executed?voidsetArtifactDefinitionManager(ArtifactDefinitionManager artifactDefinitionManager) voidsetArtifactSubscriptionManager(ArtifactSubscriptionManager artifactSubscriptionManager) voidsetBuildExecutionManager(BuildExecutionManager buildExecutionManager) voidSet which plan is the master of this plan.voidsetRequirementSet(RequirementSet requirementSet) voidsetStage(@Nullable ChainStage chainStage) Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDatabaseId, getDescription, getDiscriminator, getEffectiveVariables, getFirstBuildNumber, getKey, getLabellings, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getMasterId, getMasterIdIfExists, getPlanKey, getProject, getRelatedLabellings, getType, getVariables, getVersion, hashCode, hasMaster, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setInternalResultsSummaryAccessor, setKey, setLabellings, setLabelManager, setMarkedForDeletion, setName, setPlanExecutionManager, setPlanKey, setProject, setSuspendedFromBuilding, setVariableDefinitionManager, setVersionMethods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityWithOid
getId, getOid, setId, setOidMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setIdMethods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletionMethods inherited from interface com.atlassian.bamboo.Describable
setDescription, setNameMethods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescriptionMethods inherited from interface com.atlassian.bamboo.core.EntityWithOid
setOidMethods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOidMethods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableJob
getEntityTypeMethods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getBuildDefinition, getBuildLogger, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getProject, getType, getVariables, hasMaster, isBusy, isMarkedForDeletionMethods inherited from interface com.atlassian.bamboo.plan.Plan
getBuildDefinitionXml, getLabellings, getLatestResultsSummary, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setKey, setLabellings, setPlanKey, setProject, setSuspendedFromBuildingMethods inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
getBuildKey, getBuildName, getDatabaseId, getId, getMasterId, getMasterIdIfExists, getPlanKey, isSuspendedFromBuildingMethods inherited from interface com.atlassian.bamboo.versioning.Versionable
getVersion
-
Field Details
-
NUMBER_OF_RESULTS
public static final int NUMBER_OF_RESULTS- See Also:
-
-
Constructor Details
-
DefaultJob
public DefaultJob()
-
-
Method Details
-
getTaskDefinitions
- Specified by:
getTaskDefinitionsin interfaceTaskContainer- Returns:
- an ordered list of taskDefinitions for this container.
-
getPlanType
- Specified by:
getPlanTypein interfacePlanIdentifier- Returns:
- the type of this plan
-
getName
Description copied from interface:PlanIdentifierReturns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfacePlanIdentifier- Overrides:
getNamein classAbstractPlan- Returns:
- String
-
getParent
Description copied from interface:Job- Specified by:
getParentin interfaceImmutableJob- Specified by:
getParentin interfaceJob- Returns:
- chain
-
getStage
Description copied from interface:JobTheChainStagethat thisJobis a member of- Specified by:
getStagein interfaceImmutableJob- Specified by:
getStagein interfaceJob- Returns:
- stage
-
setStage
-
getMaster
Description copied from interface:ImmutablePlanReturn 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:
getMasterin interfaceImmutableJob- Specified by:
getMasterin interfaceImmutablePlan- Specified by:
getMasterin interfaceJob- Returns:
- the master
Planif one exists.
-
setMaster
Description copied from interface:PlanSet which plan is the master of this plan. The master is the plan which this one is derived from. Configuration will be pulled from the master if one exists and if it is not a divergent branch -
isActive
public boolean isActive()Description copied from interface:ImmutablePlanIs the plan queued or building?- Specified by:
isActivein interfaceImmutablePlan
-
getCurrentStatus
- Specified by:
getCurrentStatusin interfaceImmutablePlan- Returns:
- a string key as to what the status is. Can be "success", "failure", "current", "none" or "notRun". Mainly used for UI purposes.
-
isExecuting
public boolean isExecuting()Description copied from interface:ImmutablePlanIs the build currently being executed?- Specified by:
isExecutingin interfaceImmutablePlan- Returns:
- true if build is being executed
-
getArtifactDefinitions
- Specified by:
getArtifactDefinitionsin interfaceImmutableJob- Specified by:
getArtifactDefinitionsin interfaceJob- Returns:
- list of produced artifacts
-
getArtifactSubscriptions
- Specified by:
getArtifactSubscriptionsin interfaceImmutableJob- Specified by:
getArtifactSubscriptionsin interfaceJob- Returns:
- list of artifact subscriptions
-
getAverageBuildDuration
public long getAverageBuildDuration()Description copied from interface:ImmutablePlanReturns an average duration of the recent builds- Specified by:
getAverageBuildDurationin interfaceImmutablePlan- Returns:
- The duration in milliseconds
-
getRequirementSet
- Specified by:
getRequirementSetin interfaceImmutableBuildable- Specified by:
getRequirementSetin interfaceImmutableJob
-
setRequirementSet
- Specified by:
setRequirementSetin interfaceBuildable
-
getEffectiveRequirementSet
Description copied from interface:ImmutableBuildableReturn effective value ofRequirementSet, that is value that is considered when checking which agents, elastic images and ephemeral templates can build this Buildable.- Specified by:
getEffectiveRequirementSetin interfaceImmutableBuildable- Specified by:
getEffectiveRequirementSetin interfaceImmutableJob- Returns:
- the same as
ImmutableBuildable.getRequirementSet()ifImmutablePlan.hasMaster()is false, getMaster().getRequirementSet() otherwise.
-
setBuildExecutionManager
-
setArtifactDefinitionManager
-
setArtifactSubscriptionManager
-
isDivergent
public boolean isDivergent()Description copied from interface:ImmutableJobIs part of divergent branch.- Specified by:
isDivergentin interfaceImmutableJob
-
getRoot
Description copied from interface:VersionedEntityComponentReturns the versioned root of the object.- Specified by:
getRootin interfaceVersionedEntityComponent<Chain>- Returns:
- the root of the object
-