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
ConstructorDescriptionChainStageResultImpl
(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addBuildResult
(@NotNull BuildResultsSummary buildResult) Adds aBuildResultsSummary
and sets the relationship to theChainResultsSummary
void
addManualVariable
(@NotNull StageVariableContext stageVariableContext) @NotNull Set<BuildResultsSummary>
Returns all theBuildResultsSummary
with this Stage result@NotNull ChainResultsSummary
Returns theChainResultsSummary
associated with this Stage result@Nullable String
@NotNull Collection<BuildResultsSummary>
Returns all the failedBuildResultsSummary
with this Stage result@NotNull List<StageVariableContext>
Get manual variables that were set before this stage started.Since 7.0.@NotNull String
getName()
long
Processing duration of stage (time of longest job in stage execution)@NotNull List<BuildResultsSummary>
Returns all theBuildResultsSummary
with this Stage result ordered by build name.getState()
@NotNull Collection<BuildResultsSummary>
Returns all the successfulBuildResultsSummary
with this Stage resultboolean
boolean
boolean
boolean
isFailed()
boolean
isFinal()
boolean
boolean
isManual()
Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interactionboolean
Checks if the stage has unbuilt jobs inside itboolean
boolean
Checks if plan nas been failed and could be restarted on the stage where failedboolean
Checks if current stage if first manual stage waiting for execution (chain is completed on previous stage and waiting for this stage to execute)boolean
boolean
removeBuildResult
(@NotNull BuildResultsSummary buildResult) Removes aBuildResultsSummary
void
setBuildResults
(@NotNull Set<BuildResultsSummary> buildResults) void
setChainResult
(@NotNull ChainResultsSummary chainResult) Sets theChainResultsSummary
associated with this Stage resultvoid
setDescription
(@Nullable String description) void
setFinal
(boolean finalStage) void
setManual
(boolean manual) Marks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interactionvoid
void
setProcessingDuration
(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 Details
-
ChainStageResultImpl
public ChainStageResultImpl(String name, String description, boolean manual, boolean finalStage, ChainResultsSummary chainResult) -
ChainStageResultImpl
public ChainStageResultImpl()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
-
setName
- Specified by:
setName
in interfaceDescribable
-
getDescription
- Specified by:
getDescription
in interfaceDescriptionProvider
-
setDescription
- Specified by:
setDescription
in interfaceDescribable
-
isManual
public boolean isManual()Description copied from interface:ChainStageResult
Checks if result as manual (at the time of result creation) Manual means stage execution is hold and waits for user interaction- Specified by:
isManual
in interfaceChainStageResult
- Returns:
- true if manual
-
setManual
public void setManual(boolean manual) Description copied from interface:ChainStageResult
Marks result as optional (at the time of result creation) Manual means stage execution is hold and waits for user interaction- Specified by:
setManual
in interfaceChainStageResult
-
isFinal
public boolean isFinal()- Specified by:
isFinal
in interfaceChainStageResult
-
setFinal
public void setFinal(boolean finalStage) - Specified by:
setFinal
in interfaceChainStageResult
-
getProcessingDuration
public long getProcessingDuration()Description copied from interface:ChainStageResult
Processing duration of stage (time of longest job in stage execution)- Specified by:
getProcessingDuration
in interfaceChainStageResult
- Returns:
-
setProcessingDuration
public void setProcessingDuration(long processingDuration) - Specified by:
setProcessingDuration
in interfaceChainStageResult
-
getChainResult
Description copied from interface:ChainStageResult
Returns theChainResultsSummary
associated with this Stage result- Specified by:
getChainResult
in interfaceChainStageResult
- Returns:
- chainResult
-
setChainResult
Description copied from interface:ChainStageResult
Sets theChainResultsSummary
associated with this Stage result- Specified by:
setChainResult
in interfaceChainStageResult
-
getBuildResults
Description copied from interface:ChainStageResult
Returns all theBuildResultsSummary
with this Stage result- Specified by:
getBuildResults
in interfaceChainStageResult
- Returns:
- results
-
getSortedBuildResults
Description copied from interface:ChainStageResult
Returns all theBuildResultsSummary
with this Stage result ordered by build name. WARNING: Dont use in performance critical situations.- Specified by:
getSortedBuildResults
in interfaceChainStageResult
- Returns:
- results
-
getFailedBuildResults
Description copied from interface:ChainStageResult
Returns all the failedBuildResultsSummary
with this Stage result- Specified by:
getFailedBuildResults
in interfaceChainStageResult
- Returns:
- results
-
getSuccessfulBuildResults
Description copied from interface:ChainStageResult
Returns all the successfulBuildResultsSummary
with this Stage result- Specified by:
getSuccessfulBuildResults
in interfaceChainStageResult
- Returns:
- results
-
setBuildResults
-
addBuildResult
Description copied from interface:ChainStageResult
Adds aBuildResultsSummary
and sets the relationship to theChainResultsSummary
- Specified by:
addBuildResult
in interfaceChainStageResult
- Returns:
- success
-
removeBuildResult
Description copied from interface:ChainStageResult
Removes aBuildResultsSummary
- Specified by:
removeBuildResult
in interfaceChainStageResult
- Returns:
- success
-
isPending
public boolean isPending()- Specified by:
isPending
in interfaceChainStageResult
-
isNotBuilt
public boolean isNotBuilt()Description copied from interface:ChainStageResult
Checks if the stage has unbuilt jobs inside it- Specified by:
isNotBuilt
in interfaceChainStageResult
- Returns:
-
isCompleted
public boolean isCompleted()- Specified by:
isCompleted
in interfaceChainStageResult
-
isFinished
public boolean isFinished()- Specified by:
isFinished
in interfaceChainStageResult
-
isAllJobsExist
public boolean isAllJobsExist()- Specified by:
isAllJobsExist
in interfaceChainStageResult
- Returns:
- true iff all the jobs in this stage result still exist
-
isAllNotSuccessfulJobsExist
public boolean isAllNotSuccessfulJobsExist()- Specified by:
isAllNotSuccessfulJobsExist
in interfaceChainStageResult
- Returns:
- true iff all the jobs in this stage result that are not finished successfully still exist
-
isSuccessful
public boolean isSuccessful()- Specified by:
isSuccessful
in interfaceChainStageResult
-
isFailed
public boolean isFailed()- Specified by:
isFailed
in interfaceChainStageResult
-
isRunnable
public boolean isRunnable()Description copied from interface:ChainStageResult
Checks 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:
isRunnable
in interfaceChainStageResult
- Returns:
- true if stage is ready and allowed for manual execution
-
isRestartable
public boolean isRestartable()Description copied from interface:ChainStageResult
Checks if plan nas been failed and could be restarted on the stage where failed- Specified by:
isRestartable
in interfaceChainStageResult
-
getState
- Specified by:
getState
in interfaceChainStageResult
-
getLifeCycleState
- Specified by:
getLifeCycleState
in interfaceChainStageResult
-
getManualVariablesEncrypted
Description copied from interface:ChainStageResult
Since 7.0. For internal use only. UseChainStageResult.getManualVariables()
orChainStageResult.addManualVariable(StageVariableContext)
instead.- Specified by:
getManualVariablesEncrypted
in interfaceChainStageResult
-
getManualVariables
Description copied from interface:ChainStageResult
Get manual variables that were set before this stage started. This contains only the variables that changed compared to the previous stage.- Specified by:
getManualVariables
in interfaceChainStageResult
-
addManualVariable
- Specified by:
addManualVariable
in interfaceChainStageResult
-