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_FORMAT
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
-
Constructor Summary
ConstructorDescriptionImmutableResultsSummaryImpl
(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 AgentType
The type of the latest agent that built the resultWhen the build was cancelledWhen the build finishedWhen the build was executedint
Get build numberBuild state.@NotNull String
Custom data map to store random metadata about the buildGets theDeltaState
of the summary.long
Duration of the build in milliseconds@NotNull List<BuildResultsSummary>
Get a list of all failed job Results in this chain result@Nullable Integer
Get build result that this build was fixed in.@NotNull String
@NotNull ImmutableChain
Gets theImmutableChain
that this result belongs to (directly or not)@NotNull ImmutableChain
Gets theImmutablePlan
that this result directly belongs to.@NotNull Set<LinkedJiraIssue>
Returns all the JIRA issues linked to this build resultTags / labels associated with the build@Nullable Long
Returns the size of log associated with this result.Note: this API is experimental.@NotNull List<ResultsSummary>
Returns all jobsResultsSummary
related to chain result summary Summaries are ordered by stages@NotNull Optional<ImmutableChain>
Gets theImmutablePlan
that this result directly belongs to.@NotNull PlanKey
Full key of the plan.@NotNull String
long
Duration of actual build processing in milisecondsWhen the build queued@NotNull List<RepositoryChangeset>
int
Return 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 TestResultsSummary
A stored version of how long (milli seconds) it took for this build to fix a failure.int
protected TriggerManager
@NotNull TriggerReason
Why the build was was triggered@NotNull List<VariableContextSnapshot>
boolean
Indicates thatChain
execution has been stopped on manual stage and is waiting for user actionboolean
Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UIboolean
boolean
Tells whether this result belongs to a job that will run when next manual stage is kicked offboolean
Indicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuffboolean
Indicates that this result was rebuild via "re-run this build" action.boolean
Indicates thatChain
execution has been failed and could be restarted from failure placeboolean
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, 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, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
Methods inherited from interface java.lang.Comparable
compareTo
Methods 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, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaiting
Methods 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:ImmutableChainResultsSummary
Get all theChainStageResult
's associated with thisChainResultsSummary
- Specified by:
getStageResults
in interfaceImmutableChainResultsSummary
- Returns:
- results
-
getFailedJobResults
Description copied from interface:ImmutableChainResultsSummary
Get a list of all failed job Results in this chain result- Specified by:
getFailedJobResults
in interfaceImmutableChainResultsSummary
- Returns:
- a list of all failed job Results in this chain result
-
getTotalJobCount
public int getTotalJobCount()- Specified by:
getTotalJobCount
in interfaceImmutableChainResultsSummary
- Returns:
- how many job results exist
-
getOrderedJobResultSummaries
Description copied from interface:ImmutableChainResultsSummary
Returns all jobsResultsSummary
related to chain result summary Summaries are ordered by stages- Specified by:
getOrderedJobResultSummaries
in interfaceImmutableChainResultsSummary
- Returns:
-
isContinuable
public boolean isContinuable()Description copied from interface:ImmutableChainResultsSummary
Indicates thatChain
execution has been stopped on manual stage and is waiting for user action- Specified by:
isContinuable
in interfaceImmutableChainResultsSummary
- Returns:
-
isRestartable
public boolean isRestartable()Description copied from interface:ImmutableChainResultsSummary
Indicates thatChain
execution has been failed and could be restarted from failure place- Specified by:
isRestartable
in interfaceImmutableChainResultsSummary
- Returns:
-
isOnceOff
public boolean isOnceOff()Description copied from interface:ImmutableResultsSummary
Indicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff- Specified by:
isOnceOff
in interfaceImmutableResultsSummary
- Returns:
-
isCustomBuild
public boolean isCustomBuild()Description copied from interface:ImmutableResultsSummary
Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI- Specified by:
isCustomBuild
in interfaceImmutableResultsSummary
- Returns:
-
isRebuild
public boolean isRebuild()Description copied from interface:ImmutableResultsSummary
Indicates that this result was rebuild via "re-run this build" action.- Specified by:
isRebuild
in interfaceImmutableResultsSummary
- Returns:
-
getLogSize
Description copied from interface:ImmutableResultsSummary
Returns the size of log associated with this result.For a
BuildResultsSummary
this method will return size of the log produced by theJob
.For a
ChainResultsSummary
the returned value will be equal to the maximum log size produced by thisChain
'sJob
s.- Specified by:
getLogSize
in interfaceImmutableResultsSummary
- Returns:
- the log size or null, if the value is not known
-
getImmutablePlan
Description copied from interface:ImmutableResultsSummary
Gets theImmutablePlan
that this result directly belongs to. Since version 6.9 it is possible thatImmutableJob
no longer exists but its results do, therefore it is recommended to useImmutableResultsSummary.getPlanIfExists()
instead of this method when operating on job results.- Specified by:
getImmutablePlan
in interfaceImmutableChainResultsSummary
- Specified by:
getImmutablePlan
in interfaceImmutableResultsSummary
- Returns:
- the owning plan for the result
-
getImmutableChain
Description copied from interface:ImmutableResultsSummary
Gets theImmutableChain
that this result belongs to (directly or not)- Specified by:
getImmutableChain
in interfaceImmutableResultsSummary
- Returns:
- the owning plan for the result
-
getPlanIfExists
Description copied from interface:ImmutableResultsSummary
Gets theImmutablePlan
that this result directly belongs to.- Specified by:
getPlanIfExists
in interfaceImmutableChainResultsSummary
- Specified by:
getPlanIfExists
in interfaceImmutableResultsSummary
- Returns:
- the owning plan for the result or empty if id doesn't exist.
-
isNotRunYet
public boolean isNotRunYet()Description copied from interface:ImmutableResultsSummary
Tells whether this result belongs to a job that will run when next manual stage is kicked off- Specified by:
isNotRunYet
in interfaceImmutableResultsSummary
- Returns:
-
isMarkedForDeletion
public boolean isMarkedForDeletion() -
getArtifactLinks
Description copied from interface:ImmutableResultsSummary
Returns all artifacts associated with this build. Even if the files don't exist- Specified by:
getArtifactLinks
in interfaceImmutableResultsSummary
- Returns:
-
getBuildCancelledDate
Description copied from interface:ImmutableResultsSummary
When the build was cancelled- Specified by:
getBuildCancelledDate
in interfaceImmutableResultsSummary
- Returns:
- date of build cancellation or null if build was not cancelled
-
getBuildCompletedDate
Description copied from interface:ImmutableResultsSummary
When the build finished- Specified by:
getBuildCompletedDate
in interfaceImmutableResultsSummary
- Returns:
-
getBuildDate
Description copied from interface:ResultStatisticsProvider
When the build was executed- Specified by:
getBuildDate
in interfaceResultStatisticsProvider
- Returns:
- date of build execution or null if build was not executed yet
-
getBuildNumber
public int getBuildNumber()Description copied from interface:ResultStatisticsProvider
Get build number- Specified by:
getBuildNumber
in interfaceResultStatisticsProvider
- Returns:
- build number of the described build
-
getBuildState
Description copied from interface:ResultStatisticsProvider
Build state.- Specified by:
getBuildState
in interfaceResultStatisticsProvider
- Returns:
- build state
-
getChangesListSummary
- Specified by:
getChangesListSummary
in interfaceImmutableResultsSummary
-
getCustomBuildData
Description copied from interface:ImmutableResultsSummary
Custom data map to store random metadata about the build- Specified by:
getCustomBuildData
in interfaceImmutableResultsSummary
- Returns:
-
getDeltaState
Description copied from interface:ImmutableResultsSummary
Gets theDeltaState
of the summary. It can be a build that fixes, breaks, failing, successful. Provides a status relative to the previous summary.- Specified by:
getDeltaState
in interfaceImmutableResultsSummary
- Returns:
-
getDuration
public long getDuration()Description copied from interface:ImmutableResultsSummary
Duration of the build in milliseconds- Specified by:
getDuration
in interfaceImmutableResultsSummary
- Specified by:
getDuration
in interfaceResultStatisticsProvider
- Returns:
- duration of the build in milliseconds
-
getJiraIssues
Description copied from interface:ImmutableResultsSummary
Returns all the JIRA issues linked to this build result- Specified by:
getJiraIssues
in interfaceImmutableResultsSummary
- Returns:
-
getLabellings
Description copied from interface:ImmutableResultsSummary
Tags / labels associated with the build- Specified by:
getLabellings
in interfaceImmutableResultsSummary
- Returns:
-
getLifeCycleState
- Specified by:
getLifeCycleState
in interfaceImmutableResultsSummary
-
getPlanKey
Description copied from interface:ImmutableResultsSummary
Full key of the plan. e.g BAM-MAIN- Specified by:
getPlanKey
in interfaceImmutableResultsSummary
-
getFullPlanName
- Specified by:
getFullPlanName
in interfaceImmutableResultsSummary
- Returns:
- full plan name
-
getPlanName
- Specified by:
getPlanName
in interfaceImmutableResultsSummary
- Returns:
- short plan name
-
getProcessingDuration
public long getProcessingDuration()Description copied from interface:ImmutableResultsSummary
Duration of actual build processing in miliseconds- Specified by:
getProcessingDuration
in interfaceImmutableResultsSummary
- Specified by:
getProcessingDuration
in interfaceResultStatisticsProvider
- Returns:
- processing duration of the build in milliseconds
-
getQueueTime
Description copied from interface:ImmutableResultsSummary
When the build queued- Specified by:
getQueueTime
in interfaceImmutableResultsSummary
- Returns:
-
getReasonSummary
- Specified by:
getReasonSummary
in interfaceImmutableResultsSummary
-
getRepositoryChangesets
- Specified by:
getRepositoryChangesets
in interfaceImmutableResultsSummary
-
getRestartCount
public int getRestartCount()Description copied from interface:ImmutableResultsSummary
Return the number of build restart attempts- Specified by:
getRestartCount
in interfaceImmutableResultsSummary
- Returns:
-
getSubscriptions
Description copied from interface:ImmutableResultsSummary
Returns list of consumed artifact dependenciesConsumedSubscription
- Specified by:
getSubscriptions
in interfaceImmutableResultsSummary
- Returns:
-
getSubstitutedVariables
Description copied from interface:ImmutableResultsSummary
Returns immutable list of variables substituted during build execution- Specified by:
getSubstitutedVariables
in interfaceImmutableResultsSummary
-
getTestResultsSummary
- Specified by:
getTestResultsSummary
in interfaceImmutableResultsSummary
- Returns:
- a summary of all the tests that ran in this build.
-
getTimeToFix
Description copied from interface:ImmutableResultsSummary
A stored version of how long (milli seconds) it took for this build to fix a failure.- Specified by:
getTimeToFix
in interfaceImmutableResultsSummary
- Returns:
- Null if not a fixing build
-
getTriggerReason
Description copied from interface:ImmutableResultsSummary
Why the build was was triggered- Specified by:
getTriggerReason
in interfaceImmutableResultsSummary
-
getVariableContextLogs
- Specified by:
getVariableContextLogs
in interfaceImmutableResultsSummary
-
getTriggerManager
- Specified by:
getTriggerManager
in classBaseResultSummary
-
getMergeResult
Description copied from interface:ImmutableChainResultsSummary
Note: this API is experimental.- Specified by:
getMergeResult
in interfaceImmutableChainResultsSummary
-
getFixedInResult
Description copied from interface:ImmutableChainResultsSummary
Get 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:
getFixedInResult
in interfaceImmutableChainResultsSummary
- Returns:
-
getBuildAgentId
Description copied from interface:ImmutableResultsSummary
The id of the latest agent that built the result- Specified by:
getBuildAgentId
in interfaceImmutableResultsSummary
- Returns:
- Null if no agents involved or unknown
-
getBuildAgentType
Description copied from interface:ImmutableResultsSummary
The type of the latest agent that built the result- Specified by:
getBuildAgentType
in interfaceImmutableResultsSummary
- Returns:
- Null if no agents involved or unknown
-
isSpecsResult
public boolean isSpecsResult()- Specified by:
isSpecsResult
in interfaceImmutableChainResultsSummary
-