com.atlassian.bamboo.plan.cache
Class ImmutableResultsSummaryImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.resultsummary.BaseResultSummary
              extended by com.atlassian.bamboo.plan.cache.ImmutableResultsSummaryImpl
All Implemented Interfaces:
ImmutableChainResultsSummary, BambooIdProvider, BambooObject, ImmutableResultsSummary, ResultStatisticsProvider, java.lang.Cloneable, java.lang.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 class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
 
Constructor Summary
ImmutableResultsSummaryImpl(ChainResultsSummary summary, TriggerManager triggerManager, ImmutablePlanManager immutablePlanManager, CachedPlanManager cachedPlanManager)
           
 
Method Summary
 java.util.List<ArtifactLink> getArtifactLinks()
          Returns all artifacts associated with this build.
 java.lang.Long getBuildAgentId()
          The id of the agent that built the result
 java.util.Date getBuildCancelledDate()
          When the build was cancelled
 java.util.Date getBuildCompletedDate()
          When the build finished
 java.util.Date getBuildDate()
          When the build was executed
 int getBuildNumber()
          Get build number
 BuildState getBuildState()
          Build state.
 java.lang.String getChangesListSummary()
           
 java.util.List<Comment> getComments()
          Gets the associated user comments for the build
 java.util.List<Comment> getCommentsToDisplay()
          Gets the aggregated comments from the Jobs as well as the parent plan
 java.util.Map<java.lang.String,java.lang.String> getCustomBuildData()
          Custom data map to store random metadata about the build
 DeltaState getDeltaState()
          Gets the DeltaState of the summary.
 long getDuration()
          Duration of the build in milliseconds
 java.util.List<BuildResultsSummary> getFailedJobResults()
          Get a list of all failed job Results in this chain result
 java.util.Set<LinkedJiraIssue> getJiraIssues()
          Returns all the JIRA issues linked to this build result
 java.util.List<Labelling> getLabellings()
          Tags / labels assocaited with the build
 LifeCycleState getLifeCycleState()
           
 MergeResultSummary getMergeResult()
          Note: this API is experimental.
 java.util.List<ResultsSummary> getOrderedJobResultSummaries()
          Returns all jobs ResultsSummary related to chain result summary Summaries are ordered by stages
 ImmutableChain getPlan()
          Gets the Plan that this result belongs directly belongs to
 PlanKey getPlanKey()
          Full key of the plan.
 long getProcessingDuration()
          Duration of actual build processing in miliseconds
 java.util.Date getQueueTime()
          When the build queued
 java.lang.String getReasonSummary()
           
 java.util.List<RepositoryChangeset> getRepositoryChangesets()
           
 int getRestartCount()
          Return the number of build restart attempts
 java.util.List<ChainStageResult> getStageResults()
          Get all the ChainStageResult's associated with this ChainResultsSummary
 java.util.List<ConsumedSubscription> getSubscriptions()
          Returns list of consumed artifact dependencies ConsumedSubscription
 java.util.List<VariableSubstitution> getSubstitutedVariables()
          Returns list of variables substituted during build execution
 FilteredTestResults<TestClassResultDescriptor> getTestResults()
          Get the helper class to provide filtered test lists for this chain result
 TestResultsSummary getTestResultsSummary()
           
 java.lang.Long getTimeToFix()
          A stored version of how long (milli seconds) it took for this build to fix a failure.
 int getTotalJobCount()
           
protected  TriggerManager getTriggerManager()
           
 TriggerReason getTriggerReason()
          Why the build was was triggered
 java.util.List<VariableContextSnapshot> getVariableContextLogs()
           
 boolean isContinuable()
          Indicates that Chain execution has been stopped on manual stage and is waiting for user action
 boolean isCustomBuild()
          Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI
 boolean isMarkedForDeletion()
           
 boolean isNotRunYet()
          Tells whether this result belongs to a job that will run when next manual stage is kicked off
 boolean isOnceOff()
          Indicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff
 boolean isRebuild()
          Indicates that this result was rebuild via "re-run this build" action.
 boolean isRestartable()
          Indicates that Chain execution has been failed and could be restarted from failure place
 
Methods inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
compareTo, createChangeListSummary, equals, getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getDurationInSeconds, getFixingJiraIssues, getJiraIssueKeys, getLabelNames, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getStatDate, getTestSummary, getUniqueAuthors, hasChanges, hasComments, hasCommentsToDisplay, hashCode, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaiting
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
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, hasComments, hasCommentsToDisplay, isActive, isFailed, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaiting
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getDurationInSeconds, getStatDate
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ImmutableResultsSummaryImpl

public ImmutableResultsSummaryImpl(ChainResultsSummary summary,
                                   TriggerManager triggerManager,
                                   ImmutablePlanManager immutablePlanManager,
                                   CachedPlanManager cachedPlanManager)
Method Detail

getStageResults

@NotNull
public java.util.List<ChainStageResult> getStageResults()
Description copied from interface: ImmutableChainResultsSummary
Get all the ChainStageResult's associated with this ChainResultsSummary

Specified by:
getStageResults in interface ImmutableChainResultsSummary
Returns:
results

getTestResults

public FilteredTestResults<TestClassResultDescriptor> getTestResults()
Description copied from interface: ImmutableChainResultsSummary
Get the helper class to provide filtered test lists for this chain result

Specified by:
getTestResults in interface ImmutableChainResultsSummary
Returns:
helper class to provide filtered test lists for this chain result, null if the chain is still being built

getFailedJobResults

@NotNull
public java.util.List<BuildResultsSummary> getFailedJobResults()
Description copied from interface: ImmutableChainResultsSummary
Get a list of all failed job Results in this chain result

Specified by:
getFailedJobResults in interface ImmutableChainResultsSummary
Returns:
a list of all failed job Results in this chain result

getTotalJobCount

public int getTotalJobCount()
Specified by:
getTotalJobCount in interface ImmutableChainResultsSummary
Returns:
how many job results exist

getOrderedJobResultSummaries

@NotNull
public java.util.List<ResultsSummary> getOrderedJobResultSummaries()
Description copied from interface: ImmutableChainResultsSummary
Returns all jobs ResultsSummary related to chain result summary Summaries are ordered by stages

Specified by:
getOrderedJobResultSummaries in interface ImmutableChainResultsSummary
Returns:

isContinuable

public boolean isContinuable()
Description copied from interface: ImmutableChainResultsSummary
Indicates that Chain execution has been stopped on manual stage and is waiting for user action

Specified by:
isContinuable in interface ImmutableChainResultsSummary
Returns:

isRestartable

public boolean isRestartable()
Description copied from interface: ImmutableChainResultsSummary
Indicates that Chain execution has been failed and could be restarted from failure place

Specified by:
isRestartable in interface ImmutableChainResultsSummary
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 interface ImmutableResultsSummary
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 interface ImmutableResultsSummary
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 interface ImmutableResultsSummary
Returns:

getPlan

@NotNull
public ImmutableChain getPlan()
Description copied from interface: ImmutableResultsSummary
Gets the Plan that this result belongs directly belongs to

Specified by:
getPlan in interface ImmutableResultsSummary
Returns:
the owning plan for the result

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 interface ImmutableResultsSummary
Returns:

isMarkedForDeletion

public boolean isMarkedForDeletion()

getArtifactLinks

@NotNull
public java.util.List<ArtifactLink> getArtifactLinks()
Description copied from interface: ImmutableResultsSummary
Returns all artifacts associated with this build. Even if the files don't exist

Specified by:
getArtifactLinks in interface ImmutableResultsSummary
Returns:

getBuildCancelledDate

public java.util.Date getBuildCancelledDate()
Description copied from interface: ImmutableResultsSummary
When the build was cancelled

Specified by:
getBuildCancelledDate in interface ImmutableResultsSummary
Returns:
date of build cancellation or null if build was not cancelled

getBuildCompletedDate

public java.util.Date getBuildCompletedDate()
Description copied from interface: ImmutableResultsSummary
When the build finished

Specified by:
getBuildCompletedDate in interface ImmutableResultsSummary
Returns:

getBuildDate

public java.util.Date getBuildDate()
Description copied from interface: ResultStatisticsProvider
When the build was executed

Specified by:
getBuildDate in interface ResultStatisticsProvider
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 interface ResultStatisticsProvider
Returns:
build number of the described build

getBuildState

public BuildState getBuildState()
Description copied from interface: ResultStatisticsProvider
Build state.

Specified by:
getBuildState in interface ResultStatisticsProvider
Returns:
build state

getChangesListSummary

@NotNull
public java.lang.String getChangesListSummary()
Specified by:
getChangesListSummary in interface ImmutableResultsSummary

getComments

@NotNull
public java.util.List<Comment> getComments()
Description copied from interface: ImmutableResultsSummary
Gets the associated user comments for the build

Specified by:
getComments in interface ImmutableResultsSummary
Returns:

getCommentsToDisplay

@NotNull
public java.util.List<Comment> getCommentsToDisplay()
Description copied from interface: ImmutableResultsSummary
Gets the aggregated comments from the Jobs as well as the parent plan

Specified by:
getCommentsToDisplay in interface ImmutableResultsSummary
Returns:

getCustomBuildData

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getCustomBuildData()
Description copied from interface: ImmutableResultsSummary
Custom data map to store random metadata about the build

Specified by:
getCustomBuildData in interface ImmutableResultsSummary
Returns:

getDeltaState

public DeltaState getDeltaState()
Description copied from interface: ImmutableResultsSummary
Gets the DeltaState 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 interface ImmutableResultsSummary
Returns:

getDuration

public long getDuration()
Description copied from interface: ImmutableResultsSummary
Duration of the build in milliseconds

Specified by:
getDuration in interface ImmutableResultsSummary
Specified by:
getDuration in interface ResultStatisticsProvider
Returns:
duration of the build in milliseconds

getJiraIssues

@NotNull
public java.util.Set<LinkedJiraIssue> getJiraIssues()
Description copied from interface: ImmutableResultsSummary
Returns all the JIRA issues linked to this build result

Specified by:
getJiraIssues in interface ImmutableResultsSummary
Returns:

getLabellings

public java.util.List<Labelling> getLabellings()
Description copied from interface: ImmutableResultsSummary
Tags / labels assocaited with the build

Specified by:
getLabellings in interface ImmutableResultsSummary
Returns:

getLifeCycleState

public LifeCycleState getLifeCycleState()
Specified by:
getLifeCycleState in interface ImmutableResultsSummary

getPlanKey

@NotNull
public PlanKey getPlanKey()
Description copied from interface: ImmutableResultsSummary
Full key of the plan. e.g BAM-MAIN

Specified by:
getPlanKey in interface ImmutableResultsSummary
Returns:

getProcessingDuration

public long getProcessingDuration()
Description copied from interface: ImmutableResultsSummary
Duration of actual build processing in miliseconds

Specified by:
getProcessingDuration in interface ImmutableResultsSummary
Specified by:
getProcessingDuration in interface ResultStatisticsProvider
Returns:
processing duration of the build in milliseconds

getQueueTime

public java.util.Date getQueueTime()
Description copied from interface: ImmutableResultsSummary
When the build queued

Specified by:
getQueueTime in interface ImmutableResultsSummary
Returns:

getReasonSummary

public java.lang.String getReasonSummary()
Specified by:
getReasonSummary in interface ImmutableResultsSummary

getRepositoryChangesets

@NotNull
public java.util.List<RepositoryChangeset> getRepositoryChangesets()
Specified by:
getRepositoryChangesets in interface ImmutableResultsSummary

getRestartCount

public int getRestartCount()
Description copied from interface: ImmutableResultsSummary
Return the number of build restart attempts

Specified by:
getRestartCount in interface ImmutableResultsSummary
Returns:

getSubscriptions

@NotNull
public java.util.List<ConsumedSubscription> getSubscriptions()
Description copied from interface: ImmutableResultsSummary
Returns list of consumed artifact dependencies ConsumedSubscription

Specified by:
getSubscriptions in interface ImmutableResultsSummary
Returns:

getSubstitutedVariables

@NotNull
public java.util.List<VariableSubstitution> getSubstitutedVariables()
Description copied from interface: ImmutableResultsSummary
Returns list of variables substituted during build execution

Specified by:
getSubstitutedVariables in interface ImmutableResultsSummary
Returns:

getTestResultsSummary

@NotNull
public TestResultsSummary getTestResultsSummary()
Specified by:
getTestResultsSummary in interface ImmutableResultsSummary
Returns:
a summary of all the tests that ran in this build.

getTimeToFix

public java.lang.Long 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 interface ImmutableResultsSummary
Returns:
Null if not a fixing build

getTriggerReason

@NotNull
public TriggerReason getTriggerReason()
Description copied from interface: ImmutableResultsSummary
Why the build was was triggered

Specified by:
getTriggerReason in interface ImmutableResultsSummary
Returns:

getVariableContextLogs

@NotNull
public java.util.List<VariableContextSnapshot> getVariableContextLogs()
Specified by:
getVariableContextLogs in interface ImmutableResultsSummary

getTriggerManager

protected TriggerManager getTriggerManager()
Specified by:
getTriggerManager in class BaseResultSummary

getMergeResult

public MergeResultSummary getMergeResult()
Description copied from interface: ImmutableChainResultsSummary
Note: this API is experimental.

Specified by:
getMergeResult in interface ImmutableChainResultsSummary

getBuildAgentId

public java.lang.Long getBuildAgentId()
Description copied from interface: ImmutableResultsSummary
The id of the agent that built the result

Specified by:
getBuildAgentId in interface ImmutableResultsSummary
Returns:
Null if no agents involved or unknown


Copyright © 2012 Atlassian. All Rights Reserved.