com.atlassian.bamboo.plan.cache
Interface ImmutableChain

All Superinterfaces:
BambooIdProvider, DescriptionProvider, ImmutablePlan, NameProvider, PlanIdentifier
All Known Subinterfaces:
Chain, ChainBranch, ImmutableChainBranch, ImmutableTopLevelPlan, TopLevelPlan
All Known Implementing Classes:
AbstractChain, AbstractImmutableChain, ChainBranchImpl, DefaultChain, ImmutableChainBranchImpl, ImmutableChainImpl

public interface ImmutableChain
extends ImmutablePlan

Represents a Chain that is immutable. Since 3.4, all new uses of Chains should prefer this interface to improve cacheability.

Since:
v3.4

Field Summary
 
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
 
Method Summary
 boolean containsStage(java.lang.String stageName)
          Checks whether or not a stage exists in this chain by stage name.
 java.util.List<? extends ImmutableJob> getAllJobs()
          Note: Does not include Jobs that are marked for deletion.
 java.util.List<? extends ImmutableChainStage> getAllStages()
          Get Stages of the Chain

Note that this includes ChainStages that have been marked for deletion

 java.util.List<RepositoryDefinition> getEffectiveRepositoryDefinitions()
          Return list of repositories available to the chain.
 int getJobCount()
          Note: Does not include Jobs that are marked for deletion.
 PlanResultKey getLastResultKey()
          Get the latest result key including active (not finished) results
 NotificationSet getNotificationSet()
          Get notifications defined for this plan.
 java.util.List<? extends ImmutableChainStage> getStages()
          Get Stages of the chain.
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getAverageBuildDuration, getBuildDefinition, getBuildDefinitionXml, getBuildLogger, getCurrentStatus, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getMaster, getNextBuildNumber, getProject, getType, getVariables, hasMaster, isActive, isBusy, isExecuting, isMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
getBuildKey, getBuildName, getId, getMasterId, getName, getPlanKey, getPlanType, isSuspendedFromBuilding
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Method Detail

getNotificationSet

NotificationSet getNotificationSet()
Get notifications defined for this plan.

Returns:
NotificationSet containing notifications for this plan.

getStages

@NotNull
java.util.List<? extends ImmutableChainStage> getStages()
Get Stages of the chain.

Note that this excludes ChainStages that have been marked for deletion

Returns:
stages

getAllStages

@NotNull
java.util.List<? extends ImmutableChainStage> getAllStages()
Get Stages of the Chain

Note that this includes ChainStages that have been marked for deletion

Returns:
stages

containsStage

boolean containsStage(@Nullable
                      java.lang.String stageName)
Checks whether or not a stage exists in this chain by stage name.

Parameters:
stageName - to check for
Returns:
true if a stage with the given name exists, otherwise false

getJobCount

int getJobCount()
Note: Does not include Jobs that are marked for deletion.

Returns:
how many Jobs are currently contained within this chain

getAllJobs

@NotNull
java.util.List<? extends ImmutableJob> getAllJobs()
Note: Does not include Jobs that are marked for deletion.

Returns:
a list of all Jobs that are currently contained within this chain - no order guaranteed.

getEffectiveRepositoryDefinitions

@NotNull
java.util.List<RepositoryDefinition> getEffectiveRepositoryDefinitions()
Return list of repositories available to the chain. In case of non-master object it will return list of master's repository definitions with default repository overriden by a private copy of default repository.

Returns:
ordered List of repositories available to this plan

getLastResultKey

@Nullable
PlanResultKey getLastResultKey()
Get the latest result key including active (not finished) results

Returns:
The key of the last build. Returns null if there are no build results for this plan


Copyright © 2012 Atlassian. All Rights Reserved.