com.atlassian.bamboo.plan.cache
Class AbstractImmutableChain

java.lang.Object
  extended by com.atlassian.bamboo.plan.cache.AbstractImmutablePlan
      extended by com.atlassian.bamboo.plan.cache.AbstractImmutableChain
All Implemented Interfaces:
BambooIdProvider, ImmutableChain, ImmutablePlan, PlanIdentifier, Triggerable, DescriptionProvider, NameProvider
Direct Known Subclasses:
ImmutableChainBranchImpl, ImmutableChainImpl

public class AbstractImmutableChain
extends AbstractImmutablePlan
implements ImmutableChain


Field Summary
 
Fields inherited from class com.atlassian.bamboo.plan.cache.AbstractImmutablePlan
averageBuildDuration, resultsSummaryManager
 
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
AbstractImmutableChain(Chain chain, BuildLoggerManager buildLoggerManager, ImmutablePlanCacheService immutablePlanCacheService, ImmutablePlanManager immutablePlanManager, LabelManager labelManager, ResultsSummaryManager resultsSummaryManager, RepositoryDefinitionManager repositoryDefinitionManager, VariableDefinitionManager variableDefinitionManager, BuildDefinition buildDefinition)
           
AbstractImmutableChain(Chain chain, BuildLoggerManager buildLoggerManager, ImmutablePlanCacheService immutablePlanCacheService, ImmutablePlanManager immutablePlanManager, LabelManager labelManager, ResultsSummaryManager resultsSummaryManager, RepositoryDefinitionManager repositoryDefinitionManager, VariableDefinitionManager variableDefinitionManager, BuildDefinitionManager buildDefinitionManager)
          Deprecated. 
 
Method Summary
 boolean containsStage(java.lang.String stageName)
          Checks whether or not a stage exists in this chain by stage name.
 com.google.common.collect.ImmutableList<ImmutableJob> getAllJobs()
          Note: Does not include Jobs that are marked for deletion.
 com.google.common.collect.ImmutableList<ImmutableChainStage> getAllStages()
          Get Stages of the Chain

Note that this includes ChainStages that have been marked for deletion

 com.google.common.collect.ImmutableList<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
 ImmutableResultsSummary getLatestResultsSummary()
          Get the latest finished result
 ImmutableChain getMaster()
          Return the master plan if one exists.
 NotificationSet getNotificationSet()
          Get notifications defined for this plan.
 com.google.common.collect.ImmutableList<ImmutableChainStage> getStages()
          Get Stages of the chain.
 java.util.List<BuildStrategy> getTriggers()
           
 boolean isActive()
          Is the plan queued or building?
 boolean isBusy()
          Is the Plan "busy".
 boolean isExecuting()
          Is the build currently being executed?
 boolean isSuspended()
           
 
Methods inherited from class com.atlassian.bamboo.plan.cache.AbstractImmutablePlan
compareTo, equals, exceptionOnModification, getAverageBuildDuration, getBuildDefinition, getBuildKey, getBuildLogger, getBuildName, getCurrentStatus, getDescription, getEffectiveVariables, getFirstBuildNumber, getId, getKey, getLabellings, getLabelNames, getLastBuildNumber, getMasterId, getName, getNextBuildNumber, getPlanKey, getPlanType, getProject, getRelatedLabellings, getType, getVariables, hashCode, hasMaster, isMarkedForDeletion, isSuspendedFromBuilding
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getAverageBuildDuration, getBuildDefinition, getBuildLogger, getCurrentStatus, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getNextBuildNumber, getProject, getType, getVariables, hasMaster, 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
 

Constructor Detail

AbstractImmutableChain

public AbstractImmutableChain(@NotNull
                              Chain chain,
                              BuildLoggerManager buildLoggerManager,
                              ImmutablePlanCacheService immutablePlanCacheService,
                              ImmutablePlanManager immutablePlanManager,
                              LabelManager labelManager,
                              ResultsSummaryManager resultsSummaryManager,
                              RepositoryDefinitionManager repositoryDefinitionManager,
                              VariableDefinitionManager variableDefinitionManager,
                              @NotNull
                              BuildDefinition buildDefinition)

AbstractImmutableChain

@Deprecated
public AbstractImmutableChain(@NotNull
                                         Chain chain,
                                         BuildLoggerManager buildLoggerManager,
                                         ImmutablePlanCacheService immutablePlanCacheService,
                                         ImmutablePlanManager immutablePlanManager,
                                         LabelManager labelManager,
                                         ResultsSummaryManager resultsSummaryManager,
                                         RepositoryDefinitionManager repositoryDefinitionManager,
                                         VariableDefinitionManager variableDefinitionManager,
                                         BuildDefinitionManager buildDefinitionManager)
Deprecated. 

Method Detail

isActive

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

Specified by:
isActive 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

getLastResultKey

public PlanResultKey getLastResultKey()
Description copied from interface: ImmutableChain
Get the latest result key including active (not finished) results

Specified by:
getLastResultKey in interface ImmutableChain
Returns:
The key of the last build. Returns null if there are no build results for this plan

getLatestResultsSummary

public ImmutableResultsSummary getLatestResultsSummary()
Description copied from interface: ImmutablePlan
Get the latest finished result

Specified by:
getLatestResultsSummary in interface ImmutablePlan
Returns:
The summary info for the last completed build. Returns null if there are no build results for this plan

isBusy

public boolean isBusy()
Description copied from interface: ImmutablePlan
Is the Plan "busy". Busy is defined by the plan having a lock held on it. This is done during change detection, dependency listner and the like

Specified by:
isBusy in interface ImmutablePlan
Returns:
busy

getStages

@NotNull
public com.google.common.collect.ImmutableList<ImmutableChainStage> getStages()
Description copied from interface: ImmutableChain
Get Stages of the chain.

Note that this excludes ChainStages that have been marked for deletion

Specified by:
getStages in interface ImmutableChain
Returns:
stages

getAllStages

@NotNull
public com.google.common.collect.ImmutableList<ImmutableChainStage> getAllStages()
Description copied from interface: ImmutableChain
Get Stages of the Chain

Note that this includes ChainStages that have been marked for deletion

Specified by:
getAllStages in interface ImmutableChain
Returns:
stages

getJobCount

public int getJobCount()
Description copied from interface: ImmutableChain
Note: Does not include Jobs that are marked for deletion.

Specified by:
getJobCount in interface ImmutableChain
Returns:
how many Jobs are currently contained within this chain

getAllJobs

@NotNull
public com.google.common.collect.ImmutableList<ImmutableJob> getAllJobs()
Description copied from interface: ImmutableChain
Note: Does not include Jobs that are marked for deletion.

Specified by:
getAllJobs in interface ImmutableChain
Returns:
a list of all Jobs that are currently contained within this chain - no order guaranteed.

containsStage

public boolean containsStage(@Nullable
                             java.lang.String stageName)
Description copied from interface: ImmutableChain
Checks whether or not a stage exists in this chain by stage name.

Specified by:
containsStage in interface ImmutableChain
Parameters:
stageName - to check for
Returns:
true if a stage with the given name exists, otherwise false

getEffectiveRepositoryDefinitions

@NotNull
public com.google.common.collect.ImmutableList<RepositoryDefinition> getEffectiveRepositoryDefinitions()
Description copied from interface: ImmutableChain
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.

Specified by:
getEffectiveRepositoryDefinitions in interface ImmutableChain
Returns:
ordered List of repositories available to this plan

getNotificationSet

public NotificationSet getNotificationSet()
Description copied from interface: ImmutableChain
Get notifications defined for this plan.

Specified by:
getNotificationSet in interface ImmutableChain
Returns:
NotificationSet containing notifications for this plan.

getMaster

public ImmutableChain 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 ImmutableChain
Specified by:
getMaster in interface ImmutablePlan
Returns:
the master Plan if one exists.

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface Triggerable
Returns:
true iff automatic triggering is switched off for this object

getTriggers

@NotNull
public java.util.List<BuildStrategy> getTriggers()
Specified by:
getTriggers in interface Triggerable
Returns:
all triggers defined for this object


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.