Package com.atlassian.bamboo.chains
Class ChainResultsSummaryImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.resultsummary.BaseResultSummary
-
- com.atlassian.bamboo.resultsummary.AbstractResultsSummary
-
- com.atlassian.bamboo.chains.ChainResultsSummaryImpl
-
- All Implemented Interfaces:
ChainResultsSummary,ImmutableChainResultsSummary,BambooCustomDataAware,BambooIdProvider,BambooObject,Deletable,ImmutableDeletable,PlanResultKeyProvider,ImmutableResultsSummary,MutableBuildKeyResultsSummary,ResultsSummary,ResultStatisticsProvider,Cloneable,Comparable<ImmutableResultsSummary>
public class ChainResultsSummaryImpl extends AbstractResultsSummary implements ChainResultsSummary
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.resultsummary.AbstractResultsSummary
buildState, cachedPlanManagerRef, decryptedSubstitutedVariablesReference, decryptedVariableContextLogsReference, lifeCycleState, markedForDeletion, specsResult
-
Fields inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
DATE_FORMAT
-
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanKey
-
-
Constructor Summary
Constructors Constructor Description ChainResultsSummaryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddStageResult(@NotNull ChainStageResult chainStageResult)Add a stage result@NotNull ChainStageResultcreateStageResult(@NotNull ImmutableChainStage chainStage)Create a newChainStageResultand associates it with theChainResultsSummary@NotNull List<BuildResultsSummary>getFailedJobResults()Get a list of all failed job Results in this chain resultIntegergetFixedInResult()Get build result that this build was fixed in.@NotNull StringgetFullPlanName()@NotNull ImmutableChaingetImmutableChain()Gets theImmutableChainthat this result belongs to (directly or not)@NotNull ImmutableChaingetImmutablePlan()Gets theImmutablePlanthat this result belongs directly belongs to.MergeResultSummarygetMergeResult()Note: this API is experimental.@NotNull List<ResultsSummary>getOrderedJobResultSummaries()Returns all jobsResultsSummaryrelated to chain result summary Summaries are ordered by stages@NotNull Optional<ImmutableChain>getPlanIfExists()Gets theImmutablePlanthat this result directly belongs to.@NotNull StringgetPlanName()@NotNull List<ChainStageResult>getStageResults()Get all theChainStageResult's associated with thisChainResultsSummary@Nullable FilteredTestResults<TestClassResultDescriptor>getTestResults()Get the helper class to provide filtered test lists for this chain resultintgetTotalJobCount()booleanisContinuable()Indicates thatChainexecution has been stopped on manual stage and is waiting for user actionbooleanisMarkedForDeletion()booleanisNotRunYet()Tells whether this result belongs to a job that will run when next manual stage is kicked offbooleanisRestartable()Indicates thatChainexecution has been failed and could be restarted from failure placebooleanremoveStageResult(@NotNull ChainStageResult chainStageResult)Remove a stage resultvoidsetContinuable(boolean continuable)voidsetFixedInResult(Integer fixedInBuild)Set the result that this result was fixed in.voidsetMarkedForDeletion(boolean markedForDeletion)voidsetMergeResult(MergeResultSummary mergeResult)Note: this API is experimental.voidsetStageResults(@NotNull List<ChainStageResult> stageResults)-
Methods inherited from class com.atlassian.bamboo.resultsummary.AbstractResultsSummary
addVariableContextItem, getArtifactLinks, getBuildAgentId, getBuildAgentType, getBuildCancelledDate, getBuildCompletedDate, getBuildDate, getBuildKey, getBuildNumber, getBuildResultKey, getBuildState, getChangesListSummary, getCustomBuildData, getCustomBuildDataRows, getDeltaState, getDiscriminator, getDuration, getFormatVersion, getJiraIssues, getLabellings, getLifeCycleState, getLogSize, getPlanKey, getProcessingDuration, getQueueTime, getReasonSummary, getRepositoryChangesets, getRestartCount, getResultVariables, getStageResultId, getSubscriptions, getSubstitutedVariables, getSubstitutedVariablesEncrypted, getTestClassResults, getTestResultsSummary, getTimeToFix, getTriggerManager, getTriggerReason, getTriggerReasonKey, getVariableContextBaseline, getVariableContextBaselineId, getVariableContextLogs, getVariableContextLogsEncrypted, incrementRestartCount, isCustomBuild, isOnceOff, isRebuild, isSpecsResult, resetTestClassResults, setArtifactLinks, setBuildAgentId, setBuildAgentType, setBuildCancelledDate, setBuildCompletedDate, setBuildDate, setBuildKey, setBuildNumber, setBuildState, setComments, setCustomBuild, setCustomBuildData, setDeltaState, setDiscriminator, setDuration, setFormatVersion, setJiraIssues, setLabellings, setLifeCycleState, setLogSize, setOnceOff, setPlanKey, setPlanName, setProcessingDuration, setQueueTime, setRebuild, setRestartCount, setSpecsResult, setStageResultId, setSubscriptions, setTestResultsSummary, setTimeToFix, setTriggerReason, setTriggerReasonKey, setVariableContextBaseline, setVariableContextLogsEncrypted, toString, updateCustomDataEntry, updateFormatVersion, updateLifeCycleState
-
Methods inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
compareTo, createChangeListSummary, equals, getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getFixingJiraIssues, getJiraIssueKeys, getLabelNames, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getStatDate, getTestSummary, getUniqueAuthors, hasChanges, hasComments, hashCode, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaiting
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooCustomDataAware
updateCustomDataEntry
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface com.atlassian.bamboo.chains.ChainResultsSummary
setSpecsResult
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.atlassian.bamboo.chains.ImmutableChainResultsSummary
isSpecsResult
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinks, getArtifactLinksThatExist, getBuildAgentId, getBuildAgentType, getBuildCancelledDate, getBuildCompletedDate, getBuildTime, getChangesListSummary, getCommits, getCustomBuildData, getDeltaState, getDuration, getDurationDescription, getFixingJiraIssues, getJiraIssueKeys, getJiraIssues, getLabellings, getLabelNames, getLifeCycleState, getLogSize, getManuallyOverriddenVariables, getPlanKey, getPlanResultKey, getProcessingDuration, getProcessingDurationDescription, getQueueTime, getReasonSummary, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getRepositoryChangesets, getRestartCount, getShortReasonSummary, getSubscriptions, getSubstitutedVariables, getTestResultsSummary, getTestSummary, getTimeToFix, getTriggerReason, getUniqueAuthors, getVariableContextLogs, hasChanges, hasComments, isActive, isCustomBuild, isFailed, isFinished, isInProgress, isNotBuilt, isOnceOff, isPending, isQueued, isRebuild, isSuccessful, isWaiting
-
Methods inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanResultKey
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultsSummary
addVariableContextItem, getBuildKey, getBuildResultKey, getFormatVersion, getSubstitutedVariablesEncrypted, getVariableContextBaselineId, getVariableContextLogsEncrypted, incrementRestartCount, resetTestClassResults, setBuildAgentId, setBuildAgentType, setBuildCancelledDate, setBuildCompletedDate, setBuildDate, setCustomBuild, setDeltaState, setDuration, setLogSize, setOnceOff, setProcessingDuration, setQueueTime, setRebuild, setRestartCount, setTestResultsSummary, setTimeToFix, setTriggerReason, updateFormatVersion, updateLifeCycleState
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getStatDate
-
-
-
-
Method Detail
-
getImmutablePlan
@NotNull public @NotNull ImmutableChain getImmutablePlan()
Description copied from interface:ResultsSummaryGets theImmutablePlanthat this result belongs directly belongs to. Since version 6.9 it is possible thatImmutableJobno longer exists but its results do, therefore it is recommended to useImmutableResultsSummary.getPlanIfExists()instead when operating on job results.- Specified by:
getImmutablePlanin interfaceImmutableChainResultsSummary- Specified by:
getImmutablePlanin interfaceImmutableResultsSummary- Specified by:
getImmutablePlanin interfaceResultsSummary- Overrides:
getImmutablePlanin classAbstractResultsSummary- Returns:
- the owning plan for the result
-
getImmutableChain
@NotNull public @NotNull ImmutableChain getImmutableChain()
Description copied from interface:ImmutableResultsSummaryGets theImmutableChainthat this result belongs to (directly or not)- Specified by:
getImmutableChainin interfaceImmutableResultsSummary- Returns:
- the owning plan for the result
-
getPlanIfExists
@NotNull public @NotNull Optional<ImmutableChain> getPlanIfExists()
Description copied from interface:ImmutableResultsSummaryGets theImmutablePlanthat this result directly belongs to.- Specified by:
getPlanIfExistsin interfaceImmutableChainResultsSummary- Specified by:
getPlanIfExistsin interfaceImmutableResultsSummary- Overrides:
getPlanIfExistsin classAbstractResultsSummary- Returns:
- the owning plan for the result or empty if id doesn't exist.
-
getFullPlanName
@NotNull public @NotNull String getFullPlanName()
- Specified by:
getFullPlanNamein interfaceImmutableResultsSummary- Returns:
- full plan name
-
getPlanName
@NotNull public @NotNull String getPlanName()
- Specified by:
getPlanNamein interfaceImmutableResultsSummary- Overrides:
getPlanNamein classAbstractResultsSummary- Returns:
- short plan name
-
createStageResult
@NotNull public @NotNull ChainStageResult createStageResult(@NotNull @NotNull ImmutableChainStage chainStage)
Description copied from interface:ChainResultsSummaryCreate a newChainStageResultand associates it with theChainResultsSummary- Specified by:
createStageResultin interfaceChainResultsSummary- Parameters:
chainStage- the Stage related to result- Returns:
- chainStageResult
-
getStageResults
@NotNull public @NotNull List<ChainStageResult> getStageResults()
Description copied from interface:ImmutableChainResultsSummaryGet all theChainStageResult's associated with thisChainResultsSummary- Specified by:
getStageResultsin interfaceImmutableChainResultsSummary- Returns:
- results
-
setStageResults
public void setStageResults(@NotNull @NotNull List<ChainStageResult> stageResults)
-
addStageResult
public boolean addStageResult(@NotNull @NotNull ChainStageResult chainStageResult)Description copied from interface:ChainResultsSummaryAdd a stage result- Specified by:
addStageResultin interfaceChainResultsSummary- Returns:
- success
-
removeStageResult
public boolean removeStageResult(@NotNull @NotNull ChainStageResult chainStageResult)Description copied from interface:ChainResultsSummaryRemove a stage result- Specified by:
removeStageResultin interfaceChainResultsSummary- Returns:
- success
-
getFailedJobResults
@NotNull public @NotNull List<BuildResultsSummary> getFailedJobResults()
Description copied from interface:ImmutableChainResultsSummaryGet a list of all failed job Results in this chain result- Specified by:
getFailedJobResultsin interfaceImmutableChainResultsSummary- Returns:
- a list of all failed job Results in this chain result
-
getTotalJobCount
public int getTotalJobCount()
- Specified by:
getTotalJobCountin interfaceImmutableChainResultsSummary- Returns:
- how many job results exist
-
getTestResults
@Nullable public @Nullable FilteredTestResults<TestClassResultDescriptor> getTestResults()
Description copied from interface:ImmutableChainResultsSummaryGet the helper class to provide filtered test lists for this chain result- Specified by:
getTestResultsin interfaceImmutableChainResultsSummary- Returns:
- helper class to provide filtered test lists for this chain result, null if the chain is still being built
-
getOrderedJobResultSummaries
@NotNull public @NotNull List<ResultsSummary> getOrderedJobResultSummaries()
Description copied from interface:ImmutableChainResultsSummaryReturns all jobsResultsSummaryrelated to chain result summary Summaries are ordered by stages- Specified by:
getOrderedJobResultSummariesin interfaceImmutableChainResultsSummary- Returns:
-
isContinuable
public boolean isContinuable()
Description copied from interface:ImmutableChainResultsSummaryIndicates thatChainexecution has been stopped on manual stage and is waiting for user action- Specified by:
isContinuablein interfaceImmutableChainResultsSummary- Returns:
-
setContinuable
public void setContinuable(boolean continuable)
- Specified by:
setContinuablein interfaceChainResultsSummary
-
isRestartable
public boolean isRestartable()
Description copied from interface:ImmutableChainResultsSummaryIndicates thatChainexecution has been failed and could be restarted from failure place- Specified by:
isRestartablein interfaceImmutableChainResultsSummary- Returns:
-
isNotRunYet
public boolean isNotRunYet()
Description copied from interface:ImmutableResultsSummaryTells whether this result belongs to a job that will run when next manual stage is kicked off- Specified by:
isNotRunYetin interfaceImmutableResultsSummary- Returns:
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletionin interfaceImmutableDeletable- Returns:
- Whether or not the Object has been marked for deletion
-
setMarkedForDeletion
public void setMarkedForDeletion(boolean markedForDeletion)
- Specified by:
setMarkedForDeletionin interfaceDeletable
-
getMergeResult
public MergeResultSummary getMergeResult()
Description copied from interface:ImmutableChainResultsSummaryNote: this API is experimental.- Specified by:
getMergeResultin interfaceImmutableChainResultsSummary
-
setMergeResult
public void setMergeResult(MergeResultSummary mergeResult)
Description copied from interface:ChainResultsSummaryNote: this API is experimental.- Specified by:
setMergeResultin interfaceChainResultsSummary
-
getFixedInResult
public Integer getFixedInResult()
Description copied from interface:ImmutableChainResultsSummaryGet build result that this build was fixed in. If the build is succussful it will be null. If there is no successful build after this it will also be null. If the fixed in build is deleted. This will still reference the deleted result.- Specified by:
getFixedInResultin interfaceImmutableChainResultsSummary- Returns:
-
setFixedInResult
public void setFixedInResult(Integer fixedInBuild)
Description copied from interface:ChainResultsSummarySet the result that this result was fixed in.- Specified by:
setFixedInResultin interfaceChainResultsSummary
-
-