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
-
Constructor Summary
ConstructorsConstructorDescriptionChainStageResultImpl(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBuildResult(@NotNull BuildResultsSummary buildResult) Adds aBuildResultsSummaryand sets the relationship to theChainResultsSummaryvoidaddManualVariable(@NotNull StageVariableContext stageVariableContext) @NotNull Set<BuildResultsSummary>Returns all theBuildResultsSummarywith this Stage result@NotNull ChainResultsSummaryReturns theChainResultsSummaryassociated with this Stage result@Nullable String@NotNull Collection<BuildResultsSummary>Returns all the failedBuildResultsSummarywith this Stage result@NotNull List<StageVariableContext>Get manual variables that were set before this stage started.Since 7.0.@NotNull StringgetName()longProcessing duration of stage (time of longest job in stage execution)@NotNull List<BuildResultsSummary>Returns all theBuildResultsSummarywith this Stage result ordered by build name.getState()@NotNull Collection<BuildResultsSummary>Returns all the successfulBuildResultsSummarywith this Stage resultbooleanbooleanbooleanbooleanisFailed()booleanisFinal()booleanbooleanisManual()Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interactionbooleanChecks if the stage has unbuilt jobs inside itbooleanbooleanChecks if plan nas been failed and could be restarted on the stage where failedbooleanChecks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)booleanbooleanremoveBuildResult(@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 interactionvoidvoidsetProcessingDuration(long processingDuration) Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
ChainStageResultImpl
public ChainStageResultImpl(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult) -
ChainStageResultImpl
public ChainStageResultImpl()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider
-
setName
- Specified by:
setNamein interfaceDescribable
-
getDescription
- Specified by:
getDescriptionin interfaceDescriptionProvider
-
setDescription
- 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
Description copied from interface:ChainStageResultReturns theChainResultsSummaryassociated with this Stage result- Specified by:
getChainResultin interfaceChainStageResult- Returns:
- chainResult
-
setChainResult
Description copied from interface:ChainStageResultSets theChainResultsSummaryassociated with this Stage result- Specified by:
setChainResultin interfaceChainStageResult
-
getBuildResults
Description copied from interface:ChainStageResultReturns all theBuildResultsSummarywith this Stage result- Specified by:
getBuildResultsin interfaceChainStageResult- Returns:
- results
-
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
Description copied from interface:ChainStageResultReturns all the failedBuildResultsSummarywith this Stage result- Specified by:
getFailedBuildResultsin interfaceChainStageResult- Returns:
- results
-
getSuccessfulBuildResults
Description copied from interface:ChainStageResultReturns all the successfulBuildResultsSummarywith this Stage result- Specified by:
getSuccessfulBuildResultsin interfaceChainStageResult- Returns:
- results
-
setBuildResults
-
addBuildResult
Description copied from interface:ChainStageResultAdds aBuildResultsSummaryand sets the relationship to theChainResultsSummary- Specified by:
addBuildResultin interfaceChainStageResult- Returns:
- success
-
removeBuildResult
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
- Specified by:
getStatein interfaceChainStageResult
-
getLifeCycleState
- Specified by:
getLifeCycleStatein interfaceChainStageResult
-
getManualVariablesEncrypted
Description copied from interface:ChainStageResultSince 7.0. For internal use only. UseChainStageResult.getManualVariables()orChainStageResult.addManualVariable(StageVariableContext)instead.- Specified by:
getManualVariablesEncryptedin interfaceChainStageResult
-
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
- Specified by:
addManualVariablein interfaceChainStageResult
-