Package com.atlassian.bamboo.chains
Class ChainStageResultImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.chains.ChainStageResultImpl
-
- All Implemented Interfaces:
ChainStageResult,BambooIdProvider,BambooObject,Describable,DescriptionProvider,NameProvider,Cloneable
@Entity public class ChainStageResultImpl extends BambooEntityObject implements ChainStageResult
-
-
Constructor Summary
Constructors Constructor Description ChainStageResultImpl()ChainStageResultImpl(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddBuildResult(@NotNull BuildResultsSummary buildResult)Adds aBuildResultsSummaryand sets the relationship to theChainResultsSummaryvoidaddManualVariable(@NotNull StageVariableContext stageVariableContext)@NotNull Set<BuildResultsSummary>getBuildResults()Returns all theBuildResultsSummarywith this Stage result@NotNull ChainResultsSummarygetChainResult()Returns theChainResultsSummaryassociated with this Stage result@Nullable StringgetDescription()@NotNull Collection<BuildResultsSummary>getFailedBuildResults()Returns all the failedBuildResultsSummarywith this Stage resultLifeCycleStategetLifeCycleState()@NotNull List<StageVariableContext>getManualVariables()Get manual variables that were set before this stage started.List<StageVariableContext>getManualVariablesEncrypted()Since 7.0.@NotNull StringgetName()longgetProcessingDuration()Processing duration of stage (time of longest job in stage execution)@NotNull List<BuildResultsSummary>getSortedBuildResults()Returns all theBuildResultsSummarywith this Stage result ordered by build name.BuildStategetState()@NotNull Collection<BuildResultsSummary>getSuccessfulBuildResults()Returns all the successfulBuildResultsSummarywith this Stage resultbooleanisAllJobsExist()booleanisAllNotSuccessfulJobsExist()booleanisCompleted()booleanisFailed()booleanisFinal()booleanisFinished()booleanisManual()Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interactionbooleanisNotBuilt()Checks if the stage has unbuilt jobs inside itbooleanisPending()booleanisRestartable()Checks if plan nas been failed and could be restarted on the stage where failedbooleanisRunnable()Checks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)booleanisSuccessful()booleanremoveBuildResult(@NotNull BuildResultsSummary buildResult)Removes aBuildResultsSummaryvoidsetBuildResults(@NotNull Set<BuildResultsSummary> buildResults)voidsetChainResult(@NotNull ChainResultsSummary chainResult)Sets theChainResultsSummaryassociated with this Stage resultvoidsetDescription(@Nullable String description)voidsetFinal(boolean finalStage)voidsetManual(boolean manual)Marks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interactionvoidsetName(@NotNull String name)voidsetProcessingDuration(long processingDuration)-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Constructor Detail
-
ChainStageResultImpl
public ChainStageResultImpl(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult)
-
ChainStageResultImpl
public ChainStageResultImpl()
-
-
Method Detail
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider
-
setName
public void setName(@NotNull @NotNull String name)- Specified by:
setNamein interfaceDescribable
-
getDescription
@Nullable public @Nullable String getDescription()
- Specified by:
getDescriptionin interfaceDescriptionProvider
-
setDescription
public void setDescription(@Nullable @Nullable String description)- Specified by:
setDescriptionin interfaceDescribable
-
isManual
public boolean isManual()
Description copied from interface:ChainStageResultChecks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interaction- Specified by:
isManualin interfaceChainStageResult- Returns:
- true if manual
-
setManual
public void setManual(boolean manual)
Description copied from interface:ChainStageResultMarks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interaction- Specified by:
setManualin interfaceChainStageResult
-
isFinal
public boolean isFinal()
- Specified by:
isFinalin interfaceChainStageResult
-
setFinal
public void setFinal(boolean finalStage)
- Specified by:
setFinalin interfaceChainStageResult
-
getProcessingDuration
public long getProcessingDuration()
Description copied from interface:ChainStageResultProcessing duration of stage (time of longest job in stage execution)- Specified by:
getProcessingDurationin interfaceChainStageResult- Returns:
-
setProcessingDuration
public void setProcessingDuration(long processingDuration)
- Specified by:
setProcessingDurationin interfaceChainStageResult
-
getChainResult
@NotNull public @NotNull ChainResultsSummary getChainResult()
Description copied from interface:ChainStageResultReturns theChainResultsSummaryassociated with this Stage result- Specified by:
getChainResultin interfaceChainStageResult- Returns:
- chainResult
-
setChainResult
public void setChainResult(@NotNull @NotNull ChainResultsSummary chainResult)Description copied from interface:ChainStageResultSets theChainResultsSummaryassociated with this Stage result- Specified by:
setChainResultin interfaceChainStageResult
-
getBuildResults
@NotNull public @NotNull Set<BuildResultsSummary> getBuildResults()
Description copied from interface:ChainStageResultReturns all theBuildResultsSummarywith this Stage result- Specified by:
getBuildResultsin interfaceChainStageResult- Returns:
- results
-
getSortedBuildResults
@NotNull public @NotNull List<BuildResultsSummary> getSortedBuildResults()
Description copied from interface:ChainStageResultReturns all theBuildResultsSummarywith this Stage result ordered by build name. WARNING: Dont use in performance critical situations.- Specified by:
getSortedBuildResultsin interfaceChainStageResult- Returns:
- results
-
getFailedBuildResults
@NotNull public @NotNull Collection<BuildResultsSummary> getFailedBuildResults()
Description copied from interface:ChainStageResultReturns all the failedBuildResultsSummarywith this Stage result- Specified by:
getFailedBuildResultsin interfaceChainStageResult- Returns:
- results
-
getSuccessfulBuildResults
@NotNull public @NotNull Collection<BuildResultsSummary> getSuccessfulBuildResults()
Description copied from interface:ChainStageResultReturns all the successfulBuildResultsSummarywith this Stage result- Specified by:
getSuccessfulBuildResultsin interfaceChainStageResult- Returns:
- results
-
setBuildResults
public void setBuildResults(@NotNull @NotNull Set<BuildResultsSummary> buildResults)
-
addBuildResult
public boolean addBuildResult(@NotNull @NotNull BuildResultsSummary buildResult)Description copied from interface:ChainStageResultAdds aBuildResultsSummaryand sets the relationship to theChainResultsSummary- Specified by:
addBuildResultin interfaceChainStageResult- Returns:
- success
-
removeBuildResult
public boolean removeBuildResult(@NotNull @NotNull BuildResultsSummary buildResult)Description copied from interface:ChainStageResultRemoves aBuildResultsSummary- Specified by:
removeBuildResultin interfaceChainStageResult- Returns:
- success
-
isPending
public boolean isPending()
- Specified by:
isPendingin interfaceChainStageResult
-
isNotBuilt
public boolean isNotBuilt()
Description copied from interface:ChainStageResultChecks if the stage has unbuilt jobs inside it- Specified by:
isNotBuiltin interfaceChainStageResult- Returns:
-
isCompleted
public boolean isCompleted()
- Specified by:
isCompletedin interfaceChainStageResult
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin interfaceChainStageResult
-
isAllJobsExist
public boolean isAllJobsExist()
- Specified by:
isAllJobsExistin interfaceChainStageResult- Returns:
- true iff all the jobs in this stage result still exist
-
isAllNotSuccessfulJobsExist
public boolean isAllNotSuccessfulJobsExist()
- Specified by:
isAllNotSuccessfulJobsExistin interfaceChainStageResult- Returns:
- true iff all the jobs in this stage result that are not finished successfully still exist
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessfulin interfaceChainStageResult
-
isFailed
public boolean isFailed()
- Specified by:
isFailedin interfaceChainStageResult
-
isRunnable
public boolean isRunnable()
Description copied from interface:ChainStageResultChecks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)- Specified by:
isRunnablein interfaceChainStageResult- Returns:
- true if stage is ready and allowed for manual execution
-
isRestartable
public boolean isRestartable()
Description copied from interface:ChainStageResultChecks if plan nas been failed and could be restarted on the stage where failed- Specified by:
isRestartablein interfaceChainStageResult
-
getState
public BuildState getState()
- Specified by:
getStatein interfaceChainStageResult
-
getLifeCycleState
public LifeCycleState getLifeCycleState()
- Specified by:
getLifeCycleStatein interfaceChainStageResult
-
getManualVariablesEncrypted
public List<StageVariableContext> getManualVariablesEncrypted()
Description copied from interface:ChainStageResultSince 7.0. For internal use only. UseChainStageResult.getManualVariables()orChainStageResult.addManualVariable(StageVariableContext)instead.- Specified by:
getManualVariablesEncryptedin interfaceChainStageResult
-
getManualVariables
@NotNull public @NotNull List<StageVariableContext> getManualVariables()
Description copied from interface:ChainStageResultGet manual variables that were set before this stage started. This contains only the variables that changed compared to the previous stage.- Specified by:
getManualVariablesin interfaceChainStageResult
-
addManualVariable
public void addManualVariable(@NotNull @NotNull StageVariableContext stageVariableContext)- Specified by:
addManualVariablein interfaceChainStageResult
-
-