@MappedSuperclass public abstract class AbstractChain extends AbstractPlan implements Plan, Chain
Modifier and Type | Field and Description |
---|---|
protected Chain |
master |
static int |
NUMBER_OF_RESULTS |
resultsSummaryManager
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
getPlanKeyFunction, NAME_DELIMITER
getPlanKey
Constructor and Description |
---|
AbstractChain() |
Modifier and Type | Method and Description |
---|---|
ChainStage |
addNewStage(String name,
String description,
boolean manual)
Adds a new stage and returns the stage
|
void |
addStage(ChainStage chainStage) |
void |
addStage(int index,
ChainStage chainStage)
Add stage at given index.
|
boolean |
containsStage(String stageName)
Checks whether or not a stage exists in this chain by stage name.
|
List<Job> |
getAllJobs()
Note: Does not include Jobs that are marked for deletion.
|
List<ChainStage> |
getAllStages()
Get Stages of the Chain
|
long |
getAverageBuildDuration()
Returns an average duration of the recent builds
|
String |
getCurrentStatus() |
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
|
Chain |
getMaster()
Return the master plan if one exists.
|
NotificationSet |
getNotificationSet()
Get notifications defined for this plan.
|
NotificationSet |
getNotificationSetField()
Raw access to notification set field used in import/export, upgrade tasks and Hibernate.
|
List<PlanRepositoryDefinition> |
getPlanRepositoryDefinitions()
Return list of repositories available to the chain.
|
List<ChainStage> |
getStages()
Get Stages of the chain.
|
ChainStorageTag |
getStorageTag() |
List<TriggerDefinition> |
getTriggerDefinitions() |
VcsBambooSpecsSource |
getVcsBambooSpecsSource() |
boolean |
isActive()
Needed for Dependency Blocking for Chains.
|
boolean |
isExecuting()
Is the build currently being executed?
|
boolean |
isSuspended() |
void |
removeStage(long chainStageId) |
void |
removeStagesIf(Predicate<ChainStage> predicate)
Remove all stages matching a predicate.
|
void |
setAllStages(List<ChainStage> allStages) |
void |
setChainExecutionManager(ChainExecutionManager chainExecutionManager) |
void |
setNotificationSet(NotificationSet notificationSet) |
void |
setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager) |
void |
setStorageTag(ChainStorageTag storageTag) |
void |
setVcsBambooSpecsSource(VcsBambooSpecsSourceImpl vcsBambooSpecsSource) |
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDatabaseId, getDescription, getDiscriminator, getEffectiveVariables, getFirstBuildNumber, getKey, getLabellings, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getMasterId, getMasterIdIfExists, getName, getPlanKey, getProject, getRelatedLabellings, getTestClasses, getType, getVariables, hashCode, hasMaster, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setKey, setLabellings, setLabelManager, setMarkedForDeletion, setName, setPlanExecutionManager, setPlanKey, setProject, setResultsSummaryManager, setSuspendedFromBuilding, setTestClasses, setVariableDefinitionManager
getId, getOid, setId, setOid
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getCreationDate, getEntityType
getBuildDefinitionXml, getLabellings, getLatestResultsSummary, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setKey, setLabellings, setMaster, setPlanKey, setProject, setSuspendedFromBuilding
setOid
getOid
setDescription, setName
setMarkedForDeletion
setId
isMarkedForDeletion
getBuildDefinition, getBuildLogger, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getProject, getType, getVariables, hasMaster, isBusy, isMarkedForDeletion
getBuildKey, getBuildName, getDatabaseId, getId, getMasterId, getMasterIdIfExists, getName, getPlanKey, getPlanType, isSuspendedFromBuilding
public static final int NUMBER_OF_RESULTS
protected Chain master
public ChainStorageTag getStorageTag()
getStorageTag
in interface ImmutableChain
public void setStorageTag(ChainStorageTag storageTag)
setStorageTag
in interface Chain
@NotNull public List<ChainStage> getStages()
ImmutableChain
Note that this excludes ChainStage
s that have been marked for deletion
getStages
in interface Chain
getStages
in interface ImmutableChain
public ChainStage addNewStage(@NotNull String name, @NotNull String description, boolean manual)
Chain
addNewStage
in interface Chain
public void addStage(@NotNull ChainStage chainStage)
public void addStage(int index, @NotNull ChainStage chainStage)
Chain
public void removeStage(long chainStageId)
removeStage
in interface Chain
public void removeStagesIf(@NotNull Predicate<ChainStage> predicate)
Chain
removeStagesIf
in interface Chain
public int getJobCount()
ImmutableChain
getJobCount
in interface ImmutableChain
@NotNull public List<Job> getAllJobs()
Chain
getAllJobs
in interface Chain
getAllJobs
in interface ImmutableChain
public boolean containsStage(@Nullable String stageName)
ImmutableChain
containsStage
in interface ImmutableChain
stageName
- to check for@NotNull public String getCurrentStatus()
getCurrentStatus
in interface ImmutablePlan
public boolean isExecuting()
ImmutablePlan
isExecuting
in interface ImmutablePlan
public boolean isActive()
isActive
in interface ImmutablePlan
public PlanResultKey getLastResultKey()
ImmutableChain
getLastResultKey
in interface ImmutableChain
public long getAverageBuildDuration()
ImmutablePlan
getAverageBuildDuration
in interface ImmutablePlan
@NotNull public List<RepositoryDefinition> getEffectiveRepositoryDefinitions()
ImmutableChain
getEffectiveRepositoryDefinitions
in interface ImmutableChain
List
of repositories available to this plan@NotNull public List<PlanRepositoryDefinition> getPlanRepositoryDefinitions()
ImmutableChain
getPlanRepositoryDefinitions
in interface ImmutableChain
List
of repositories available to this planpublic NotificationSet getNotificationSet()
ImmutableChain
getNotificationSet
in interface ImmutableChain
NotificationSet
containing notifications for this plan.public void setNotificationSet(NotificationSet notificationSet)
setNotificationSet
in interface Chain
public final NotificationSet getNotificationSetField()
public Chain getMaster()
ImmutablePlan
getMaster
in interface Chain
getMaster
in interface ImmutableChain
getMaster
in interface ImmutablePlan
Plan
if one exists.public boolean isSuspended()
isSuspended
in interface Triggerable
@NotNull public List<TriggerDefinition> getTriggerDefinitions()
getTriggerDefinitions
in interface Triggerable
@NotNull public List<ChainStage> getAllStages()
Chain
Note that this includes ChainStage
s that have been marked for deletion
getAllStages
in interface Chain
getAllStages
in interface ImmutableChain
public void setAllStages(@NotNull List<ChainStage> allStages)
public void setChainExecutionManager(ChainExecutionManager chainExecutionManager)
public void setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager)
@Nullable public VcsBambooSpecsSource getVcsBambooSpecsSource()
getVcsBambooSpecsSource
in interface ImmutableChain
public void setVcsBambooSpecsSource(VcsBambooSpecsSourceImpl vcsBambooSpecsSource)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.