com.atlassian.bamboo.chains
Class DefaultChain

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.chains.DefaultChain
All Implemented Interfaces:
Chain, BambooObject, Describable, Plan, DescriptionProvider, NameProvider, java.lang.Cloneable, java.lang.Comparable<Plan>

public class DefaultChain
extends AbstractPlan
implements Chain


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.plan.Plan
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
 
Constructor Summary
DefaultChain()
           
 
Method Summary
 void accept(PlanVisitor planVisitor)
           
 ChainStage addNewStage(java.lang.String name, java.lang.String description)
           
 void addStage(ChainStage chainStage)
           
 java.lang.String getCurrentStatus()
          Retuns a string key as to what the status is.
 java.util.List<ChainStage> getStages()
          Get Stages of the chain
 boolean isExecuting()
          Is the build currenlty being executed?
 boolean isInBuildQueue()
          Needed for Dependency Blocking for Chains.
 void removeStage(ChainStage chainStage)
           
 void setChainExecutionManager(ChainExecutionManager chainExecutionManager)
           
 void setStages(java.util.List<ChainStage> stages)
           
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDescription, getFirstBuildNumber, getKey, getLabellings, getLastBuildNumber, getLastVcsRevisionKey, getName, getNextBuildNumber, getNotificationSet, getPlanKey, getProject, getRelatedLabellings, getRequirementSet, getSourceCodeDirectory, hashCode, isMarkedForDeletion, isSuspendedFromBuilding, markForDeletion, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setLastVcsRevisionKey, setMarkedForDeletion, setName, setNextBuildNumber, setNotificationSet, setProject, setRequirementSet, setSuspendedFromBuilding, unMarkForDeletion
 
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
getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getFirstBuildNumber, getKey, getLabellings, getLastBuildNumber, getLastVcsRevisionKey, getName, getNextBuildNumber, getNotificationSet, getPlanKey, getProject, getRelatedLabellings, getRequirementSet, getSourceCodeDirectory, isMarkedForDeletion, isSuspendedFromBuilding, markForDeletion, setBuildDefinitionXml, setBuildKey, setBuildName, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setLastVcsRevisionKey, setNextBuildNumber, setNotificationSet, setProject, setRequirementSet, setSuspendedFromBuilding, unMarkForDeletion
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Constructor Detail

DefaultChain

public DefaultChain()
Method Detail

getStages

@NotNull
public java.util.List<ChainStage> getStages()
Description copied from interface: Chain
Get Stages of the chain

Specified by:
getStages in interface Chain
Returns:
stages

addNewStage

@NotNull
public ChainStage addNewStage(@NotNull
                                      java.lang.String name,
                                      @NotNull
                                      java.lang.String description)
Specified by:
addNewStage in interface Chain

addStage

public void addStage(@NotNull
                     ChainStage chainStage)
Specified by:
addStage in interface Chain

removeStage

public void removeStage(@NotNull
                        ChainStage chainStage)
Specified by:
removeStage in interface Chain

setStages

public void setStages(@NotNull
                      java.util.List<ChainStage> stages)

validateBuild

public ErrorCollection validateBuild()
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

getCurrentStatus

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

isExecuting

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

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

isInBuildQueue

public boolean isInBuildQueue()
Needed for Dependency Blocking for Chains. We can consider it in the queue if the chain is executing (since its children will be queued at some point)

Specified by:
isInBuildQueue in interface Plan
Returns:
queued

accept

public void accept(PlanVisitor planVisitor)
Specified by:
accept in interface Plan

setChainExecutionManager

public void setChainExecutionManager(ChainExecutionManager chainExecutionManager)


Copyright © 2010 Atlassian. All Rights Reserved.