com.atlassian.bamboo.resultsummary
Interface ImmutableResultsSummary

All Superinterfaces:
BambooIdProvider, java.lang.Comparable<ImmutableResultsSummary>, ResultStatisticsProvider
All Known Subinterfaces:
BuildResultsSummary, ChainResultsSummary, ImmutableChainResultsSummary, MutableBuildKeyResultsSummary, ResultsSummary
All Known Implementing Classes:
AbstractResultsSummary, BaseResultSummary, BuildResultsSummaryDocument, BuildResultsSummaryImpl, ChainResultsSummaryDocument, ChainResultsSummaryImpl, ImmutableResultsSummaryImpl

public interface ImmutableResultsSummary
extends BambooIdProvider, ResultStatisticsProvider, java.lang.Comparable<ImmutableResultsSummary>


Field Summary
static java.lang.String CUSTOM_DATA_BUILD_KEY
           
 
Method Summary
 java.util.Collection<ArtifactLink> getArtifactLinks()
          Returns all artifacts associated with this build.
 java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
          Deprecated. 
 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.lang.String getBuildTime()
          Formatted buildDate.
 java.lang.String getChangesListSummary()
           
 java.util.List<Comment> getComments()
          Deprecated. since 5.0 use CommentService.getCommentsForEntity(getId())
 java.util.List<Comment> getCommentsToDisplay()
          Deprecated. since 4.4 use getComments() instead. Jobs no longer have comments
 com.google.common.collect.ImmutableList<Commit> getCommits()
          List of commits associated with the build represented by this summary
 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.lang.String getDurationDescription()
          Returns the duration in a "pretty" format.
 java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
          Return JIRA issues that this build result summary fixes
 ImmutablePlan getImmutablePlan()
          Gets the ImmutablePlan that this result belongs directly belongs to
 java.util.Set<java.lang.String> getJiraIssueKeys()
          Returns all the JIRA issue keys linked to this build 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
 java.util.List<java.lang.String> getLabelNames()
          A shortcut method to get all of the label names from the labellings
 LifeCycleState getLifeCycleState()
           
 java.util.List<VariableSubstitution> getManuallyOverriddenVariables()
          Returns list of variables manually overridden variables
 ImmutablePlan getPlan()
          Deprecated. since 5.0 use getImmutablePlan()
 PlanKey getPlanKey()
          Full key of the plan.
 PlanResultKey getPlanResultKey()
          Gets the PlanResultKey for this ImmutableResultsSummary
 long getProcessingDuration()
          Duration of actual build processing in miliseconds
 java.lang.String getProcessingDurationDescription()
          Returns the processing duration in a "pretty" format.
 java.util.Date getQueueTime()
          When the build queued
 java.lang.String getReasonSummary()
           
 java.util.Set<LinkedJiraIssue> getRelatedJiraIssues()
          Returns JIRA issues that are related to this build result.
 java.lang.String getRelativeBuildDate()
           
 java.lang.String getRelativeBuildDate(java.util.Date comparedTo)
           
 java.lang.String getRelativeBuildStartedDate()
          Returns the relative started time (duration) compared to current date
 java.lang.String getRelativeBuildStartedDate(java.util.Date comparedTo)
          Returns the relative started time (duration) compared to date passed as parameter
 java.lang.String getRelativeQueueDate()
           
 java.lang.String getRelativeQueueDate(java.util.Date comparedTo)
           
 java.util.List<RepositoryChangeset> getRepositoryChangesets()
           
 int getRestartCount()
          Return the number of build restart attempts
 java.lang.String getShortReasonSummary()
           
 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
 TestResultsSummary getTestResultsSummary()
           
 java.lang.String getTestSummary()
           
 java.lang.Long getTimeToFix()
          A stored version of how long (milli seconds) it took for this build to fix a failure.
 TriggerReason getTriggerReason()
          Why the build was was triggered
 java.util.Set<Author> getUniqueAuthors()
          A shortcut method to get the unique set of authors contributing to this build.
 com.google.common.collect.ImmutableList<VariableBaselineItem> getVariableContext()
           
 java.util.List<VariableContextSnapshot> getVariableContextLogs()
           
 boolean hasChanges()
          Whether a build had changes or not
 boolean hasComments()
          Checks if the result has any user comments for the build
 boolean hasCommentsToDisplay()
          Deprecated. since 4.4 use getComments() instead. Jobs no longer have comments
 boolean isActive()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS
 boolean isCustomBuild()
          Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI
 boolean isFailed()
          Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState#FAILED
 boolean isFinished()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.FINISHED
 boolean isInProgress()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.IN_PROGRESS
 boolean isNotBuilt()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.NOT_BUILT
 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 isPending()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING
 boolean isQueued()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.QUEUED
 boolean isRebuild()
          Indicates that this result was rebuild via "re-run this build" action.
 boolean isSuccessful()
          Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState#SUCCESS
 boolean isWaiting()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getDurationInSeconds, getStatDate
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

CUSTOM_DATA_BUILD_KEY

static final java.lang.String CUSTOM_DATA_BUILD_KEY
See Also:
Constant Field Values
Method Detail

getPlanResultKey

@NotNull
PlanResultKey getPlanResultKey()
Gets the PlanResultKey for this ImmutableResultsSummary

Returns:
planResultKey

getImmutablePlan

@NotNull
ImmutablePlan getImmutablePlan()
Gets the ImmutablePlan that this result belongs directly belongs to

Returns:
the owning plan for the result
Throws:
{@link - IllegalStateException} if the plan doesn't exist.

getPlan

@NotNull
@Deprecated
ImmutablePlan getPlan()
Deprecated. since 5.0 use getImmutablePlan()

Gets the Plan that this result belongs directly belongs to

Returns:
the owning plan for the result
Throws:
{@link - IllegalStateException} if the plan doesn't exist.

getPlanKey

@NotNull
PlanKey getPlanKey()
Full key of the plan. e.g BAM-MAIN

Returns:

getTriggerReason

@NotNull
TriggerReason getTriggerReason()
Why the build was was triggered

Returns:

getDeltaState

DeltaState getDeltaState()
Gets the DeltaState of the summary. It can be a build that fixes, breaks, failing, successful. Provides a status relative to the previous summary.

Returns:

isOnceOff

boolean isOnceOff()
Indicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff

Returns:

isCustomBuild

boolean isCustomBuild()
Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI

Returns:

isRebuild

boolean isRebuild()
Indicates that this result was rebuild via "re-run this build" action.

Returns:

getDuration

long getDuration()
Duration of the build in milliseconds

Specified by:
getDuration in interface ResultStatisticsProvider
Returns:

getProcessingDuration

long getProcessingDuration()
Duration of actual build processing in miliseconds

Specified by:
getProcessingDuration in interface ResultStatisticsProvider
Returns:

getBuildCancelledDate

@Nullable
java.util.Date getBuildCancelledDate()
When the build was cancelled

Returns:
date of build cancellation or null if build was not cancelled

getBuildCompletedDate

java.util.Date getBuildCompletedDate()
When the build finished

Returns:

isFailed

boolean isFailed()
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState#FAILED

Returns:

isSuccessful

boolean isSuccessful()
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState#SUCCESS

Returns:

isPending

boolean isPending()
Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING

Returns:

isQueued

boolean isQueued()
Shortcut method to see if getLifeCycleState() is LifeCycleState.QUEUED

Returns:

isInProgress

boolean isInProgress()
Shortcut method to see if getLifeCycleState() is LifeCycleState.IN_PROGRESS

Returns:

isNotBuilt

boolean isNotBuilt()
Shortcut method to see if getLifeCycleState() is LifeCycleState.NOT_BUILT

Returns:

isFinished

boolean isFinished()
Shortcut method to see if getLifeCycleState() is LifeCycleState.FINISHED

Returns:

isWaiting

boolean isWaiting()
Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED

Returns:

isActive

boolean isActive()
Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS

Returns:

getCustomBuildData

@NotNull
java.util.Map<java.lang.String,java.lang.String> getCustomBuildData()
Custom data map to store random metadata about the build

Returns:

getJiraIssues

@NotNull
java.util.Set<LinkedJiraIssue> getJiraIssues()
Returns all the JIRA issues linked to this build result

Returns:

getFixingJiraIssues

@NotNull
java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
Return JIRA issues that this build result summary fixes

Returns:

getRelatedJiraIssues

@NotNull
java.util.Set<LinkedJiraIssue> getRelatedJiraIssues()
Returns JIRA issues that are related to this build result. Does not include fixing issues

Returns:

getJiraIssueKeys

java.util.Set<java.lang.String> getJiraIssueKeys()
Returns all the JIRA issue keys linked to this build result

Returns:

getComments

@NotNull
@Deprecated
java.util.List<Comment> getComments()
Deprecated. since 5.0 use CommentService.getCommentsForEntity(getId())

Gets the associated user comments for the build

Returns:

getRepositoryChangesets

@NotNull
java.util.List<RepositoryChangeset> getRepositoryChangesets()

hasComments

boolean hasComments()
Checks if the result has any user comments for the build

Returns:

getLabellings

java.util.List<Labelling> getLabellings()
Tags / labels assocaited with the build

Returns:

getLabelNames

@NotNull
java.util.List<java.lang.String> getLabelNames()
A shortcut method to get all of the label names from the labellings

Returns:

getUniqueAuthors

java.util.Set<Author> getUniqueAuthors()
A shortcut method to get the unique set of authors contributing to this build.

Returns:
Set of Authors

hasChanges

boolean hasChanges()
Whether a build had changes or not

Returns:

getTimeToFix

@Nullable
java.lang.Long getTimeToFix()
A stored version of how long (milli seconds) it took for this build to fix a failure.

Returns:
Null if not a fixing build

getTestResultsSummary

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

getDurationDescription

@NotNull
java.lang.String getDurationDescription()
Returns the duration in a "pretty" format. Handles when duration is not known

Returns:
formatted duration

getProcessingDurationDescription

java.lang.String getProcessingDurationDescription()
Returns the processing duration in a "pretty" format. Handles unknown processing duration.

Returns:
formatted processing duration

getShortReasonSummary

java.lang.String getShortReasonSummary()

getReasonSummary

java.lang.String getReasonSummary()

getRelativeBuildDate

java.lang.String getRelativeBuildDate()

getRelativeQueueDate

java.lang.String getRelativeQueueDate()

getRelativeBuildStartedDate

java.lang.String getRelativeBuildStartedDate()
Returns the relative started time (duration) compared to current date

Returns:
relative duration

getTestSummary

@NotNull
java.lang.String getTestSummary()

getRelativeBuildDate

java.lang.String getRelativeBuildDate(java.util.Date comparedTo)

getRelativeQueueDate

java.lang.String getRelativeQueueDate(java.util.Date comparedTo)

getRelativeBuildStartedDate

java.lang.String getRelativeBuildStartedDate(java.util.Date comparedTo)
Returns the relative started time (duration) compared to date passed as parameter

Parameters:
comparedTo -
Returns:
relative duration

getBuildTime

java.lang.String getBuildTime()
Formatted buildDate. When the build was started

Returns:

getQueueTime

@Nullable
java.util.Date getQueueTime()
When the build queued

Returns:

getArtifactLinks

@NotNull
java.util.Collection<ArtifactLink> getArtifactLinks()
Returns all artifacts associated with this build. Even if the files don't exist

Returns:

getArtifactLinksThatExist

@Deprecated
java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
Deprecated. 

Returns only artifacts that exists

Returns:

getLifeCycleState

LifeCycleState getLifeCycleState()

getChangesListSummary

@NotNull
java.lang.String getChangesListSummary()

getSubscriptions

@NotNull
java.util.List<ConsumedSubscription> getSubscriptions()
Returns list of consumed artifact dependencies ConsumedSubscription

Returns:

getSubstitutedVariables

@NotNull
java.util.List<VariableSubstitution> getSubstitutedVariables()
Returns list of variables substituted during build execution

Returns:

getVariableContextLogs

@NotNull
java.util.List<VariableContextSnapshot> getVariableContextLogs()

getVariableContext

@NotNull
com.google.common.collect.ImmutableList<VariableBaselineItem> getVariableContext()

getManuallyOverriddenVariables

java.util.List<VariableSubstitution> getManuallyOverriddenVariables()
Returns list of variables manually overridden variables

Returns:

getRestartCount

int getRestartCount()
Return the number of build restart attempts

Returns:

isNotRunYet

boolean isNotRunYet()
Tells whether this result belongs to a job that will run when next manual stage is kicked off

Returns:

getCommits

com.google.common.collect.ImmutableList<Commit> getCommits()
List of commits associated with the build represented by this summary

Returns:
list of commits

getCommentsToDisplay

@Deprecated
@NotNull
java.util.List<Comment> getCommentsToDisplay()
Deprecated. since 4.4 use getComments() instead. Jobs no longer have comments

Gets the aggregated comments from the Jobs as well as the parent plan

Returns:

hasCommentsToDisplay

@Deprecated
boolean hasCommentsToDisplay()
Deprecated. since 4.4 use getComments() instead. Jobs no longer have comments

Whether there are any comments aggregated from the Jobs

Returns:

getBuildAgentId

@Nullable
java.lang.Long getBuildAgentId()
The id of the agent that built the result

Returns:
Null if no agents involved or unknown


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.