Package com.atlassian.bamboo.plan.cache
Class ImmutableResultsSummaryImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.resultsummary.BaseResultSummary
com.atlassian.bamboo.plan.cache.ImmutableResultsSummaryImpl
- All Implemented Interfaces:
ImmutableChainResultsSummary,BambooIdProvider,BambooObject,ImmutableResultsSummary,ResultStatisticsProvider,Cloneable,Comparable<ImmutableResultsSummary>
public class ImmutableResultsSummaryImpl
extends BaseResultSummary
implements ImmutableChainResultsSummary
- Since:
- v3.4
-
Field Summary
Fields inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
DATE_FORMATFields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY -
Constructor Summary
ConstructorsConstructorDescriptionImmutableResultsSummaryImpl(ChainResultsSummary summary, TriggerManager triggerManager, ImmutablePlanManager immutablePlanManager, CachedPlanManager cachedPlanManager) ImmutableResultsSummaryImpl(ChainResultsSummary summary, TriggerManager triggerManager, ImmutablePlanManager immutablePlanManager, ImmutableChain immutableChain) -
Method Summary
Modifier and TypeMethodDescription@NotNull List<ArtifactLink>Returns all artifacts associated with this build.The id of the latest agent that built the result@Nullable AgentTypeThe type of the latest agent that built the resultWhen the build was cancelledWhen the build finishedWhen the build was executedintGet build numberBuild state.@NotNull StringCustom data map to store random metadata about the buildGets theDeltaStateof the summary.longDuration of the build in milliseconds@NotNull List<BuildResultsSummary>Get a list of all failed job Results in this chain result@Nullable IntegerGet build result that this build was fixed in.@NotNull String@NotNull ImmutableChainGets theImmutableChainthat this result belongs to (directly or not)@NotNull ImmutableChainGets theImmutablePlanthat this result directly belongs to.@NotNull Set<LinkedJiraIssue>Returns all the JIRA issues linked to this build resultTags / labels associated with the build@Nullable LongReturns the size of log associated with this result.Note: this API is experimental.@NotNull List<ResultsSummary>Returns all jobsResultsSummaryrelated to chain result summary Summaries are ordered by stages@NotNull Optional<ImmutableChain>Gets theImmutablePlanthat this result directly belongs to.@NotNull PlanKeyFull key of the plan. e.g BAM-MAIN@NotNull StringlongDuration of actual build processing in milisecondsWhen the build queued@NotNull List<RepositoryChangeset>intReturn the number of build restart attempts@NotNull List<ChainStageResult>Get all theChainStageResult's associated with thisChainResultsSummary@NotNull List<ConsumedSubscription>Returns list of consumed artifact dependenciesConsumedSubscription@NotNull List<VariableSubstitution>Returns immutable list of variables substituted during build execution@NotNull TestResultsSummaryA stored version of how long (milli seconds) it took for this build to fix a failure.intprotected TriggerManager@NotNull TriggerReasonWhy the build was was triggered@NotNull List<VariableContextSnapshot>booleanIndicates thatChainexecution has been stopped on manual stage and is waiting for user actionbooleanIndicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UIbooleanbooleanTells whether this result belongs to a job that will run when next manual stage is kicked offbooleanIndicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuffbooleanIndicates that this result was rebuild via "re-run this build" action.booleanIndicates thatChainexecution has been failed and could be restarted from failure placebooleanMethods 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, hashCode, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaitingMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, 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
setIdMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getFixingJiraIssues, getJiraIssueKeys, getLabelNames, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getTestSummary, getUniqueAuthors, hasChanges, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaitingMethods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getStatDate
-
Constructor Details
-
ImmutableResultsSummaryImpl
public ImmutableResultsSummaryImpl(ChainResultsSummary summary, TriggerManager triggerManager, ImmutablePlanManager immutablePlanManager, CachedPlanManager cachedPlanManager) -
ImmutableResultsSummaryImpl
public ImmutableResultsSummaryImpl(ChainResultsSummary summary, TriggerManager triggerManager, ImmutablePlanManager immutablePlanManager, ImmutableChain immutableChain)
-
-
Method Details
-
getStageResults
Description copied from interface:ImmutableChainResultsSummaryGet all theChainStageResult's associated with thisChainResultsSummary- Specified by:
getStageResultsin interfaceImmutableChainResultsSummary- Returns:
- results
-
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
-
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:
-
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:
-
isOnceOff
public boolean isOnceOff()Description copied from interface:ImmutableResultsSummaryIndicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff- Specified by:
isOnceOffin interfaceImmutableResultsSummary- Returns:
-
isCustomBuild
public boolean isCustomBuild()Description copied from interface:ImmutableResultsSummaryIndicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI- Specified by:
isCustomBuildin interfaceImmutableResultsSummary- Returns:
-
isRebuild
public boolean isRebuild()Description copied from interface:ImmutableResultsSummaryIndicates that this result was rebuild via "re-run this build" action.- Specified by:
isRebuildin interfaceImmutableResultsSummary- Returns:
-
getLogSize
Description copied from interface:ImmutableResultsSummaryReturns the size of log associated with this result.For a
BuildResultsSummarythis method will return size of the log produced by theJob.For a
ChainResultsSummarythe returned value will be equal to the maximum log size produced by thisChain'sJobs.- Specified by:
getLogSizein interfaceImmutableResultsSummary- Returns:
- the log size or null, if the value is not known
-
getImmutablePlan
Description copied from interface:ImmutableResultsSummaryGets theImmutablePlanthat this result 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 of this method when operating on job results.- Specified by:
getImmutablePlanin interfaceImmutableChainResultsSummary- Specified by:
getImmutablePlanin interfaceImmutableResultsSummary- Returns:
- the owning plan for the result
-
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
Description copied from interface:ImmutableResultsSummaryGets theImmutablePlanthat this result directly belongs to.- Specified by:
getPlanIfExistsin interfaceImmutableChainResultsSummary- Specified by:
getPlanIfExistsin interfaceImmutableResultsSummary- Returns:
- the owning plan for the result or empty if id doesn't exist.
-
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() -
getArtifactLinks
Description copied from interface:ImmutableResultsSummaryReturns all artifacts associated with this build. Even if the files don't exist- Specified by:
getArtifactLinksin interfaceImmutableResultsSummary- Returns:
-
getBuildCancelledDate
Description copied from interface:ImmutableResultsSummaryWhen the build was cancelled- Specified by:
getBuildCancelledDatein interfaceImmutableResultsSummary- Returns:
- date of build cancellation or null if build was not cancelled
-
getBuildCompletedDate
Description copied from interface:ImmutableResultsSummaryWhen the build finished- Specified by:
getBuildCompletedDatein interfaceImmutableResultsSummary- Returns:
-
getBuildDate
Description copied from interface:ResultStatisticsProviderWhen the build was executed- Specified by:
getBuildDatein interfaceResultStatisticsProvider- Returns:
- date of build execution or null if build was not executed yet
-
getBuildNumber
public int getBuildNumber()Description copied from interface:ResultStatisticsProviderGet build number- Specified by:
getBuildNumberin interfaceResultStatisticsProvider- Returns:
- build number of the described build
-
getBuildState
Description copied from interface:ResultStatisticsProviderBuild state.- Specified by:
getBuildStatein interfaceResultStatisticsProvider- Returns:
- build state
-
getChangesListSummary
- Specified by:
getChangesListSummaryin interfaceImmutableResultsSummary
-
getCustomBuildData
Description copied from interface:ImmutableResultsSummaryCustom data map to store random metadata about the build- Specified by:
getCustomBuildDatain interfaceImmutableResultsSummary- Returns:
-
getDeltaState
Description copied from interface:ImmutableResultsSummaryGets theDeltaStateof the summary. It can be a build that fixes, breaks, failing, successful. Provides a status relative to the previous summary.- Specified by:
getDeltaStatein interfaceImmutableResultsSummary- Returns:
-
getDuration
public long getDuration()Description copied from interface:ImmutableResultsSummaryDuration of the build in milliseconds- Specified by:
getDurationin interfaceImmutableResultsSummary- Specified by:
getDurationin interfaceResultStatisticsProvider- Returns:
- duration of the build in milliseconds
-
getJiraIssues
Description copied from interface:ImmutableResultsSummaryReturns all the JIRA issues linked to this build result- Specified by:
getJiraIssuesin interfaceImmutableResultsSummary- Returns:
-
getLabellings
Description copied from interface:ImmutableResultsSummaryTags / labels associated with the build- Specified by:
getLabellingsin interfaceImmutableResultsSummary- Returns:
-
getLifeCycleState
- Specified by:
getLifeCycleStatein interfaceImmutableResultsSummary
-
getPlanKey
Description copied from interface:ImmutableResultsSummaryFull key of the plan. e.g BAM-MAIN- Specified by:
getPlanKeyin interfaceImmutableResultsSummary
-
getFullPlanName
- Specified by:
getFullPlanNamein interfaceImmutableResultsSummary- Returns:
- full plan name
-
getPlanName
- Specified by:
getPlanNamein interfaceImmutableResultsSummary- Returns:
- short plan name
-
getProcessingDuration
public long getProcessingDuration()Description copied from interface:ImmutableResultsSummaryDuration of actual build processing in miliseconds- Specified by:
getProcessingDurationin interfaceImmutableResultsSummary- Specified by:
getProcessingDurationin interfaceResultStatisticsProvider- Returns:
- processing duration of the build in milliseconds
-
getQueueTime
Description copied from interface:ImmutableResultsSummaryWhen the build queued- Specified by:
getQueueTimein interfaceImmutableResultsSummary- Returns:
-
getReasonSummary
- Specified by:
getReasonSummaryin interfaceImmutableResultsSummary
-
getRepositoryChangesets
- Specified by:
getRepositoryChangesetsin interfaceImmutableResultsSummary
-
getRestartCount
public int getRestartCount()Description copied from interface:ImmutableResultsSummaryReturn the number of build restart attempts- Specified by:
getRestartCountin interfaceImmutableResultsSummary- Returns:
-
getSubscriptions
Description copied from interface:ImmutableResultsSummaryReturns list of consumed artifact dependenciesConsumedSubscription- Specified by:
getSubscriptionsin interfaceImmutableResultsSummary- Returns:
-
getSubstitutedVariables
Description copied from interface:ImmutableResultsSummaryReturns immutable list of variables substituted during build execution- Specified by:
getSubstitutedVariablesin interfaceImmutableResultsSummary
-
getTestResultsSummary
- Specified by:
getTestResultsSummaryin interfaceImmutableResultsSummary- Returns:
- a summary of all the tests that ran in this build.
-
getTimeToFix
Description copied from interface:ImmutableResultsSummaryA stored version of how long (milli seconds) it took for this build to fix a failure.- Specified by:
getTimeToFixin interfaceImmutableResultsSummary- Returns:
- Null if not a fixing build
-
getTriggerReason
Description copied from interface:ImmutableResultsSummaryWhy the build was was triggered- Specified by:
getTriggerReasonin interfaceImmutableResultsSummary
-
getVariableContextLogs
- Specified by:
getVariableContextLogsin interfaceImmutableResultsSummary
-
getTriggerManager
- Specified by:
getTriggerManagerin classBaseResultSummary
-
getMergeResult
Description copied from interface:ImmutableChainResultsSummaryNote: this API is experimental.- Specified by:
getMergeResultin interfaceImmutableChainResultsSummary
-
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:
-
getBuildAgentId
Description copied from interface:ImmutableResultsSummaryThe id of the latest agent that built the result- Specified by:
getBuildAgentIdin interfaceImmutableResultsSummary- Returns:
- Null if no agents involved or unknown
-
getBuildAgentType
Description copied from interface:ImmutableResultsSummaryThe type of the latest agent that built the result- Specified by:
getBuildAgentTypein interfaceImmutableResultsSummary- Returns:
- Null if no agents involved or unknown
-
isSpecsResult
public boolean isSpecsResult()- Specified by:
isSpecsResultin interfaceImmutableChainResultsSummary
-