Package com.atlassian.bamboo.chains
Interface Chain
-
- All Superinterfaces:
BambooIdProvider
,BambooObject
,BambooObjectWithOid
,Deletable
,Describable
,DescriptionProvider
,EntityWithOid
,ImmutableChain
,ImmutableDeletable
,ImmutableEntityWithOid
,ImmutablePlan
,NameProvider
,Plan
,PlanIdentifier
,PlanKeyProvider
,Triggerable
,Versionable
- All Known Subinterfaces:
ChainBranch
,TopLevelPlan
- All Known Implementing Classes:
AbstractChain
,ChainBranchImpl
,DefaultChain
@PublicApi public interface Chain extends ImmutableChain, Plan
Mutable version ofImmutableChain
.
-
-
Field Summary
-
Fields 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_SUCCESS
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
NAME_DELIMITER
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanKeyProvider
getPlanKey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull ChainStage
addNewStage(@NotNull String name, @NotNull String description, boolean manual)
Deprecated.since 5.13 useaddStage(ChainStage)
void
addStage(int index, @NotNull ChainStage chainStage)
Add stage at given index.void
addStage(@NotNull ChainStage chainStage)
@NotNull List<Job>
getAllJobs()
Note: Does not include Jobs that are marked for deletion.@NotNull List<ChainStage>
getAllStages()
Get Stages of the ChainChain
getMaster()
Return the master plan if one exists.@NotNull List<ChainStage>
getStages()
Get Stages of the chain.void
removeStage(long chainStageId)
void
removeStagesIf(@NotNull Predicate<ChainStage> predicate)
Remove all stages matching a predicate.void
setNotificationSet(NotificationSet notificationSet)
void
setStorageTag(ChainStorageTag storageTag)
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
-
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.core.EntityWithOid
setOid
-
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableChain
containsStage, getCreationDate, getEffectiveRepositoryDefinitions, getEntityType, getJobCount, getLastResultKey, getNotificationSet, getPlanRepositoryDefinitions, getStorageTag, getVcsBambooSpecsSource
-
Methods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOid
-
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getAverageBuildDuration, getBuildDefinition, getBuildLogger, getCurrentStatus, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getProject, getType, getVariables, hasMaster, isActive, isBusy, isExecuting, isMarkedForDeletion
-
Methods inherited from interface com.atlassian.bamboo.plan.Plan
getBuildDefinitionXml, getLabellings, getLatestResultsSummary, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setKey, setLabellings, setMaster, setPlanKey, setProject, setSuspendedFromBuilding
-
Methods inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
getBuildKey, getBuildName, getDatabaseId, getId, getMasterId, getMasterIdIfExists, getName, getPlanKey, getPlanType, isSuspendedFromBuilding
-
Methods inherited from interface com.atlassian.bamboo.trigger.Triggerable
getTriggerDefinitions, isSuspended
-
Methods inherited from interface com.atlassian.bamboo.versioning.Versionable
getVersion
-
-
-
-
Method Detail
-
setNotificationSet
void setNotificationSet(NotificationSet notificationSet)
-
addNewStage
@Deprecated @NotNull @NotNull ChainStage addNewStage(@NotNull @NotNull String name, @NotNull @NotNull String description, boolean manual)
Deprecated.since 5.13 useaddStage(ChainStage)
Adds a new stage and returns the stage- Parameters:
name
-description
-manual
-- Returns:
-
addStage
void addStage(@NotNull @NotNull ChainStage chainStage)
-
addStage
void addStage(int index, @NotNull @NotNull ChainStage chainStage)
Add stage at given index.- Since:
- 7.2
-
removeStage
void removeStage(long chainStageId)
-
getMaster
Chain 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 interfaceImmutableChain
- Specified by:
getMaster
in interfaceImmutablePlan
- Returns:
- the master
Plan
if one exists.
-
getStages
@NotNull @NotNull List<ChainStage> getStages()
Description copied from interface:ImmutableChain
Get Stages of the chain.Note that this excludes
ChainStage
s that have been marked for deletion- Specified by:
getStages
in interfaceImmutableChain
- Returns:
- stages
-
getAllStages
@NotNull @NotNull List<ChainStage> getAllStages()
Get Stages of the ChainNote that this includes
ChainStage
s that have been marked for deletion- Specified by:
getAllStages
in interfaceImmutableChain
- Returns:
- unmodifiable list of all stages
-
getAllJobs
@NotNull @NotNull List<Job> getAllJobs()
Note: Does not include Jobs that are marked for deletion.- Specified by:
getAllJobs
in interfaceImmutableChain
- Returns:
- a list of all Jobs that are currently contained within this chain - no order guaranteed.
-
setStorageTag
void setStorageTag(ChainStorageTag storageTag)
-
removeStagesIf
void removeStagesIf(@NotNull @NotNull Predicate<ChainStage> predicate)
Remove all stages matching a predicate.- Since:
- 7.1
-
-