com.atlassian.bamboo.resultsummary
Interface ResultsSummary

All Superinterfaces:
BambooObject, java.lang.Comparable<ResultsSummary>, ResultStatisticsProvider
All Known Subinterfaces:
BuildResultsSummary, ChainResultsSummary, ExtendedBuildResultsSummary, MutableBuildKeyResultsSummary
All Known Implementing Classes:
AbstractResultsSummary, BuildResultsSummaryDocument, BuildResultsSummaryForTesting, BuildResultsSummaryImpl, ChainResultsSummaryImpl

public interface ResultsSummary
extends BambooObject, ResultStatisticsProvider, java.lang.Comparable<ResultsSummary>

Used to store the result of all Plan executions

Since:
2.7

Method Summary
 java.util.Collection<ArtifactLink> getArtifactLinks()
          Returns all artifacts associated with this build.
 java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
          Returns only artifacts that exists
 java.util.Date getBuildCancelledDate()
          When the build was cancelled
 java.util.Date getBuildCompletedDate()
          When the build finished
 java.lang.String getBuildKey()
          Full key of the plan.
 java.lang.String getBuildResultKey()
          A full build result key e.g.
 java.lang.String getBuildTime()
          Formatted buildDate.
 java.lang.String getChangesListSummary()
           
 java.util.List<Comment> getComments()
          Gets the associated user comments for the build
 java.util.Set<Commit> getCommits()
          Any Commits related to this BuildResultsSummary Note that if you fetched this result from Lucene that accessing this property will cause a database hit
 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 millisecods
 java.lang.String getDurationDescription()
          Returns the duration in a "pretty" format.
 long getFailedTestCount()
          Deprecated. 
 java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
          Return JIRA issues that this build result summary fixes
 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 shortcust method to get all of the label names from the labbellings
 LifeCycleState getLifeCycleState()
           
 Plan getPlan()
          Gets the Plan that this result belongs directly belongs to
 java.util.Date getPlanCompletedDate()
           
 PlanResultKey getPlanResultKey()
          Gets the PlanResultKey for this BuildResultsSummary
 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 getRelativeQueueDate()
           
 java.lang.String getRelativeQueueDate(java.util.Date comparedTo)
           
 java.lang.String getShortReasonSummary()
           
 int getSkippedCommitsCount()
          The number of commits that were included in this summary, but their details were skipped (because there was too many commits to keep them all in this summary)
 java.util.List<ConsumedSubscription> getSubscriptions()
          Returns list of consumed artifact dependencies ConsumedSubscription
 long getSuccessfulTestCount()
          Deprecated. 
 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.
 java.lang.String getVcsRevisionKey()
          The string representing the revision when the build was run.
 boolean hasChanges()
          Whether a build had changes or not
 boolean hasComments()
          Checks if the result has any user comments for the build
 boolean isActive()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS
 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 isPending()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING
 boolean isQueued()
          Shortcut method to see if getLifeCycleState() is LifeCycleState.QUEUED
 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
 void resetTestClassResults(java.util.List<TestClassResult> testClassResults)
          Overrides all current testClassResults with the new ones
 void setBuildCancelledDate(java.util.Date buildCancelledDate)
           
 void setBuildDate(java.util.Date buildDate)
           
 void setDeltaState(DeltaState deltaState)
          Sets the DeltaState for the summary.
 void setDuration(long duration)
           
 void setPlanCompletedDate(java.util.Date completionDate)
          Sets the time when build finished.
 void setQueueTime(java.util.Date queueDate)
           
 void setTestResultsSummary(TestResultsSummary testResultsSummary)
          Set the test summary information from this build
 void setTimeToFix(java.lang.Long timeToFix)
          A stored version of how long (milli seconds) it took for this build to fix a failure.
 void setTriggerReason(TriggerReason triggerReason)
           
 void setVcsRevisionKey(java.lang.String vcsRevisionKey)
           
 void updateLifeCycleState(LifeCycleState lifeCycleState, BuildState buildState)
          Update lifeCycleState and buildState in one go.
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getDurationInSeconds, getStatDate
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getPlanResultKey

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

Returns:
planResultKey

getPlan

@NotNull
Plan getPlan()
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

getBuildKey

@NotNull
java.lang.String getBuildKey()
Full key of the plan. e.g BAM-MAIN

Returns:

getBuildResultKey

@NotNull
java.lang.String getBuildResultKey()
A full build result key e.g. BAM-MAIN-100

Returns:
String

getTriggerReason

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

Returns:

setTriggerReason

void setTriggerReason(TriggerReason triggerReason)

getVcsRevisionKey

@Nullable
java.lang.String getVcsRevisionKey()
The string representing the revision when the build was run. This is Repository specific, so may not correspond and thus be parseable by the current repository configuration. May return null since this data is not always available

Returns:

setVcsRevisionKey

void setVcsRevisionKey(java.lang.String vcsRevisionKey)

getDeltaState

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

Returns:

setDeltaState

void setDeltaState(DeltaState deltaState)
Sets the DeltaState for the summary. Provides a status relative to the previous summary.

Parameters:
deltaState - - the relative status for this summary

getDuration

long getDuration()
Duration of the build in millisecods

Returns:

setDuration

void setDuration(long duration)
Parameters:
duration - duration of the build in milliseconds

getPlanCompletedDate

@Nullable
java.util.Date getPlanCompletedDate()
Returns:
time when build finished

setPlanCompletedDate

void setPlanCompletedDate(@NotNull
                          java.util.Date completionDate)
Sets the time when build finished.

Parameters:
completionDate -

getBuildCancelledDate

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

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

setBuildCancelledDate

void setBuildCancelledDate(java.util.Date buildCancelledDate)

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
java.util.List<Comment> getComments()
Gets the associated user comments for the build

Returns:

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 shortcust method to get all of the label names from the labbellings

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

setTimeToFix

void setTimeToFix(java.lang.Long timeToFix)
A stored version of how long (milli seconds) it took for this build to fix a failure.

Parameters:
timeToFix - how long (milli seconds) it took for this build to fix a failure.

getFailedTestCount

@Deprecated
long getFailedTestCount()
Deprecated. 

Deprecated since 2.6: Please use methods TestResultsSummary (getTestResultsSummary().getFailedTestCaseCount()) instead Number of failing tests

Returns:
count of how many tests failed in this build

getSuccessfulTestCount

@Deprecated
long getSuccessfulTestCount()
Deprecated. 

Deprecated since 2.6: Please use methods TestResultsSummary (getTestResultsSummary().getSuccessfulTestCaseCount())instead Number of successful tests

Returns:
count of how many tests were successful in this build

resetTestClassResults

void resetTestClassResults(@NotNull
                           java.util.List<TestClassResult> testClassResults)
Overrides all current testClassResults with the new ones

Parameters:
testClassResults - to set

getTestResultsSummary

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

setTestResultsSummary

void setTestResultsSummary(@NotNull
                           TestResultsSummary testResultsSummary)
Set the test summary information from this build

Parameters:
testResultsSummary - the test summary information

getDurationDescription

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

Returns:

getShortReasonSummary

java.lang.String getShortReasonSummary()

getReasonSummary

java.lang.String getReasonSummary()

getRelativeBuildDate

java.lang.String getRelativeBuildDate()

getRelativeQueueDate

java.lang.String getRelativeQueueDate()

getTestSummary

@NotNull
java.lang.String getTestSummary()

getRelativeBuildDate

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

getRelativeQueueDate

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

getBuildTime

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

Returns:

setBuildDate

void setBuildDate(java.util.Date buildDate)
Parameters:
buildDate -

getQueueTime

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

Returns:

setQueueTime

void setQueueTime(java.util.Date queueDate)
Parameters:
queueDate -

getArtifactLinks

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

Returns:

getArtifactLinksThatExist

java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
Returns only artifacts that exists

Returns:

getLifeCycleState

LifeCycleState getLifeCycleState()

updateLifeCycleState

void updateLifeCycleState(@NotNull
                          LifeCycleState lifeCycleState,
                          @NotNull
                          BuildState buildState)
Update lifeCycleState and buildState in one go. Can throw IllegalArgumentException when values passed make no sense: - lifeCycleState == LifeCycleState.NOT_BUILT && buildState != BuildState.UNKNOWN

Parameters:
lifeCycleState - lifeCycleState to be set
buildState - buildState to be set

getCommits

@NotNull
java.util.Set<Commit> getCommits()
Any Commits related to this BuildResultsSummary Note that if you fetched this result from Lucene that accessing this property will cause a database hit

Returns:
commits

getSkippedCommitsCount

int getSkippedCommitsCount()
The number of commits that were included in this summary, but their details were skipped (because there was too many commits to keep them all in this summary)

Returns:
number of skipped commits

getChangesListSummary

@NotNull
java.lang.String getChangesListSummary()

getSubscriptions

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

Returns:


Copyright © 2011 Atlassian. All Rights Reserved.