com.atlassian.bamboo.resultsummary
Class BuildResultsSummaryForTesting

java.lang.Object
  extended by com.atlassian.bamboo.resultsummary.BuildResultsSummaryForTesting
All Implemented Interfaces:
BambooIdProvider, BambooObject, Deletable, ImmutableDeletable, BuildResultsSummary, ExtendedBuildResultsSummary, ResultsSummary, ResultStatisticsProvider, java.lang.Comparable<ResultsSummary>

public class BuildResultsSummaryForTesting
extends java.lang.Object
implements BuildResultsSummary


Constructor Summary
BuildResultsSummaryForTesting()
          Simple constructor for BuildResultsSummary
BuildResultsSummaryForTesting(BuildResults buildResults)
          Create a summary from an existing build results
BuildResultsSummaryForTesting(BuildState buildState, int buildNumber, int failedTestCount, int successfulTestCount, java.util.Date buildTimeStamp, long duration, ReasonForBuild reasonForBuild)
          Initialise the summary with the desired state and build number.
BuildResultsSummaryForTesting(BuildState buildState, int buildNumber, int failedTestCount, int successfulTestCount, java.util.Date buildTimeStamp, long duration, ReasonForBuild reasonForBuild, java.util.Map<java.lang.String,java.lang.String> metadata)
           
BuildResultsSummaryForTesting(java.lang.String planKey, int buildNumber, BuildState buildState)
           
 
Method Summary
 int compareTo(ResultsSummary brs)
           
protected  java.lang.String createChangedByAuthors(java.util.Set updators)
           
 boolean equals(java.lang.Object object)
           
 java.util.Collection<ArtifactLink> getArtifactLinks()
          Returns all artifacts associated with this build.
 java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
          Returns only artifacts that exists
 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 was the build?
 java.lang.String getBuildKey()
          Full key of the plan.
 int getBuildNumber()
          Which build number was this?
 java.lang.String getBuildResultKey()
          A full build result key e.g.
 BuildState getBuildState()
          What was the success status of the build?
 java.lang.String getBuildTime()
          When did the build start?
 ChainResultsSummary getChainResultsSummary()
          The ChainResultsSummary to which the current BuildResultsSummary is a child of Typically this is the link between a Chain and Job result
 java.lang.String getChangedByAuthors()
           
 java.lang.String getChangesListSummary()
           
 java.lang.String getChangesListSummaryAsJs()
           
 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
 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()
          Get the duration of the build
 java.lang.String getDurationDescription()
          Returns the duration in a "pretty" format.
 double getDurationInSeconds()
          Build duration in seconds.
 ExtraBuildResultsData getExtraBuildResultsData()
          Allow access to ExtraBuildResultsData
 FilteredTestResults getFilteredTestResults()
          Return a filtered view of all the tests that ran in this build.
 java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
          Return JIRA issues that this build result summary fixes
 long getId()
           
 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()
           
 java.util.List<VariableSubstitution> getManuallyOverriddenVariables()
          Returns list of variables manually overridden variables
 Plan getPlan()
          Gets the Plan that this result belongs directly belongs to
 java.util.Date getPlanCompletedDate()
           
 PlanKey getPlanKey()
          Full key of the plan.
 PlanResultKey getPlanResultKey()
          Gets the PlanResultKey for this BuildResultsSummary
 long getProcessingDuration()
          Duration of actual build processing in miliseconds
 java.lang.String getProcessingDurationDescription()
          Returns the processing duration in a "pretty" format.
 java.util.Collection<ArtifactLink> getProducedArtifactLinks()
          Returns all artifacts produced by this build.
 long getQueueDuration()
          How long build was in the queue (in miliseconds)
 java.util.Date getQueueTime()
          When the build queued
 ReasonForBuild getReasonForBuild()
           
 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)
          Provides a relative build date, such as 2 hours ago.
 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.Date getStatDate()
          When was the build?
 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.
protected  TriggerManager getTriggerManager()
           
 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.util.List<VariableContextSnapshot> getVariableContextLogs()
           
 long getVcsUpdateDuration()
          How long checkout take (in miliseconds)
 java.util.Date getVcsUpdateTime()
          When the source syncronisation was kicked off
 boolean hasChanges()
          Whether a build had changes or not
 boolean hasComments()
          Checks if the result has any user comments for the build
 boolean hasCommentsToDisplay()
          Whether there are any comments aggregated from the Jobs
 int hashCode()
           
 int incrementRestartCount()
          Increments number of build restarts and returns the new value
 boolean isActive()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS
 boolean isBuiltToday()
           
 boolean isFailed()
          Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.FAILED
 boolean isFinished()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.FINISHED
 boolean isInProgress()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.IN_PROGRESS
 boolean isMarkedForDeletion()
           
 boolean isNotBuilt()
          Shortcut method to see if ResultsSummary.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 isPending()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING
 boolean isQueued()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.QUEUED
 boolean isSuccessful()
          Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.SUCCESS
 boolean isWaiting()
          Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED
 void resetTestClassResults(java.util.List<TestClassResult> testClassResults)
          Overrides all current testClassResults with the new ones
 void setArtifactLinks(java.util.Collection<ArtifactLink> artifactLinks)
           
 void setBuildAgentId(java.lang.Long buildAgentId)
           
 void setBuildCancelledDate(java.util.Date buildCancelledDate)
           
 void setBuildCompletedDate(java.util.Date completionDate)
           
 void setBuildDate(java.util.Date buildDate)
           
 void setBuildState(BuildState buildState)
           
 void setChainResultsSummary(ChainResultsSummary chainResultSummary)
           
 void setDeltaState(DeltaState deltaState)
          Sets the DeltaState for the summary.
 void setDuration(long duration)
           
 void setId(long id)
           
 void setLifeCycleState(LifeCycleState lifeCycleState)
           
 void setMarkedForDeletion(boolean markedForDeletion)
           
 void setPlanCompletedDate(java.util.Date completionDate)
          Sets the time when build finished.
 void setProcessingDuration(long processingDuration)
           
 void setQueueTime(java.util.Date queueTime)
           
 void setReasonForBuild(ReasonForBuild reasonForBuild)
           
 void setRevisionKeys(java.util.List<RepositoryChangeset> revisionKeys)
           
 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 setTriggerManager(TriggerManager triggerManager)
           
 void setTriggerReason(TriggerReason triggerReason)
           
 void setVcsUpdateTime(java.util.Date vcsUpdateTime)
           
 void updateLifeCycleState(LifeCycleState lifeCycleState, BuildState buildState)
          Update lifeCycleState and buildState in one go.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildResultsSummaryForTesting

public BuildResultsSummaryForTesting()
Simple constructor for BuildResultsSummary


BuildResultsSummaryForTesting

public BuildResultsSummaryForTesting(BuildResults buildResults)
Create a summary from an existing build results

Parameters:
buildResults -

BuildResultsSummaryForTesting

public BuildResultsSummaryForTesting(BuildState buildState,
                                     int buildNumber,
                                     int failedTestCount,
                                     int successfulTestCount,
                                     java.util.Date buildTimeStamp,
                                     long duration,
                                     ReasonForBuild reasonForBuild)
Initialise the summary with the desired state and build number.

Parameters:
buildState - The state of the build
buildNumber - The number of the build
failedTestCount - The number of failed tests in this build
successfulTestCount - The number of successful tests in this build
buildTimeStamp - The time of the build
duration - How long the build took
reasonForBuild - The reason for the build

BuildResultsSummaryForTesting

public BuildResultsSummaryForTesting(BuildState buildState,
                                     int buildNumber,
                                     int failedTestCount,
                                     int successfulTestCount,
                                     java.util.Date buildTimeStamp,
                                     long duration,
                                     ReasonForBuild reasonForBuild,
                                     java.util.Map<java.lang.String,java.lang.String> metadata)

BuildResultsSummaryForTesting

public BuildResultsSummaryForTesting(java.lang.String planKey,
                                     int buildNumber,
                                     BuildState buildState)
Method Detail

setBuildAgentId

public void setBuildAgentId(java.lang.Long buildAgentId)
Specified by:
setBuildAgentId in interface ResultsSummary

hasComments

public boolean hasComments()
Description copied from interface: ResultsSummary
Checks if the result has any user comments for the build

Specified by:
hasComments in interface ResultsSummary
Returns:

hasChanges

public boolean hasChanges()
Description copied from interface: ResultsSummary
Whether a build had changes or not

Specified by:
hasChanges in interface ResultsSummary
Returns:

getChainResultsSummary

public ChainResultsSummary getChainResultsSummary()
Description copied from interface: BuildResultsSummary
The ChainResultsSummary to which the current BuildResultsSummary is a child of Typically this is the link between a Chain and Job result

Specified by:
getChainResultsSummary in interface BuildResultsSummary

setChainResultsSummary

public void setChainResultsSummary(@NotNull
                                   ChainResultsSummary chainResultSummary)
Specified by:
setChainResultsSummary in interface BuildResultsSummary

getPlanResultKey

@NotNull
public PlanResultKey getPlanResultKey()
Description copied from interface: ResultsSummary
Gets the PlanResultKey for this BuildResultsSummary

Specified by:
getPlanResultKey in interface ResultsSummary
Returns:
planResultKey

getPlanKey

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

Specified by:
getPlanKey in interface ResultsSummary
Returns:

getBuildKey

@NotNull
public java.lang.String getBuildKey()
Description copied from interface: ResultsSummary
Full key of the plan. e.g BAM-MAIN

Specified by:
getBuildKey in interface ResultsSummary
Returns:

getPlan

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

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

getBuildState

public BuildState getBuildState()
What was the success status of the build?

Specified by:
getBuildState in interface ResultStatisticsProvider
Returns:
The build state

getBuildNumber

public int getBuildNumber()
Which build number was this?

Specified by:
getBuildNumber in interface ResultStatisticsProvider
Returns:
The build number

setDuration

public void setDuration(long duration)
Specified by:
setDuration in interface ResultsSummary
Parameters:
duration - duration of the build in milliseconds

setBuildState

public void setBuildState(BuildState buildState)

getCommentsToDisplay

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

Specified by:
getCommentsToDisplay in interface ResultsSummary
Returns:

hasCommentsToDisplay

public boolean hasCommentsToDisplay()
Description copied from interface: ResultsSummary
Whether there are any comments aggregated from the Jobs

Specified by:
hasCommentsToDisplay in interface ResultsSummary
Returns:

getBuildDate

@Nullable
public java.util.Date getBuildDate()
When was the build?

Specified by:
getBuildDate in interface ResultStatisticsProvider
Returns:
The date and time of the build.

getStatDate

@NotNull
public java.util.Date getStatDate()
When was the build?

Specified by:
getStatDate in interface ResultStatisticsProvider
Returns:
The date and time of the build or at least when result was queued or created.

getCustomBuildData

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

Specified by:
getCustomBuildData in interface ResultsSummary
Returns:

getLabellings

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

Specified by:
getLabellings in interface ResultsSummary
Returns:

getLabelNames

@NotNull
public java.util.List<java.lang.String> getLabelNames()
Description copied from interface: ResultsSummary
A shortcust method to get all of the label names from the labbellings

Specified by:
getLabelNames in interface ResultsSummary
Returns:

getJiraIssues

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

Specified by:
getJiraIssues in interface ResultsSummary
Returns:

getJiraIssueKeys

public java.util.Set<java.lang.String> getJiraIssueKeys()
Description copied from interface: ResultsSummary
Returns all the JIRA issue keys linked to this build result

Specified by:
getJiraIssueKeys in interface ResultsSummary
Returns:

getTimeToFix

public java.lang.Long getTimeToFix()
Description copied from interface: ResultsSummary
A stored version of how long (milli seconds) it took for this build to fix a failure.

Specified by:
getTimeToFix in interface ResultsSummary
Returns:
Null if not a fixing build

getComments

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

Specified by:
getComments in interface ResultsSummary
Returns:

getUniqueAuthors

public java.util.Set<Author> getUniqueAuthors()
Description copied from interface: ResultsSummary
A shortcut method to get the unique set of authors contributing to this build.

Specified by:
getUniqueAuthors in interface ResultsSummary
Returns:
Set of Authors

setBuildCompletedDate

public void setBuildCompletedDate(java.util.Date completionDate)
Specified by:
setBuildCompletedDate in interface ResultsSummary

getBuildCompletedDate

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

Specified by:
getBuildCompletedDate in interface ResultsSummary
Returns:

getBuildCancelledDate

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

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

getDuration

public long getDuration()
Get the duration of the build

Specified by:
getDuration in interface ResultsSummary
Specified by:
getDuration in interface ResultStatisticsProvider
Returns:
The duration in milliseconds

getDurationInSeconds

public double getDurationInSeconds()
Description copied from interface: ResultStatisticsProvider
Build duration in seconds.

Specified by:
getDurationInSeconds in interface ResultStatisticsProvider
Returns:
build duration

getProcessingDuration

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

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

setProcessingDuration

public void setProcessingDuration(long processingDuration)
Specified by:
setProcessingDuration in interface ResultsSummary

getProcessingDurationDescription

public java.lang.String getProcessingDurationDescription()
Description copied from interface: ResultsSummary
Returns the processing duration in a "pretty" format. Handles unknown processing duration.

Specified by:
getProcessingDurationDescription in interface ResultsSummary
Returns:
formatted processing duration

getReasonForBuild

public ReasonForBuild getReasonForBuild()

getTriggerReason

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

Specified by:
getTriggerReason in interface ResultsSummary
Returns:

getBuildAgentId

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

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

setReasonForBuild

public void setReasonForBuild(ReasonForBuild reasonForBuild)

getChangedByAuthors

public java.lang.String getChangedByAuthors()

getChangesListSummary

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

getSubscriptions

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

Specified by:
getSubscriptions in interface ResultsSummary
Returns:

getSubstitutedVariables

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

Specified by:
getSubstitutedVariables in interface ResultsSummary
Returns:

getVariableContextLogs

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

getManuallyOverriddenVariables

public java.util.List<VariableSubstitution> getManuallyOverriddenVariables()
Description copied from interface: ResultsSummary
Returns list of variables manually overridden variables

Specified by:
getManuallyOverriddenVariables in interface ResultsSummary
Returns:

getChangesListSummaryAsJs

public java.lang.String getChangesListSummaryAsJs()

getDeltaState

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

getBuildResultKey

@NotNull
public java.lang.String getBuildResultKey()
Description copied from interface: ResultsSummary
A full build result key e.g. BAM-MAIN-100

Specified by:
getBuildResultKey in interface ResultsSummary
Returns:
String

getDurationDescription

@NotNull
public java.lang.String getDurationDescription()
Description copied from interface: ResultsSummary
Returns the duration in a "pretty" format. Handles when duration is not known

Specified by:
getDurationDescription in interface ResultsSummary
Returns:
formatted duration

getShortReasonSummary

public java.lang.String getShortReasonSummary()
Specified by:
getShortReasonSummary in interface ResultsSummary

getRelativeBuildDate

public java.lang.String getRelativeBuildDate()
Specified by:
getRelativeBuildDate in interface ResultsSummary

getRelativeQueueDate

public java.lang.String getRelativeQueueDate()
Specified by:
getRelativeQueueDate in interface ResultsSummary

getRelativeBuildStartedDate

public java.lang.String getRelativeBuildStartedDate()
Description copied from interface: ResultsSummary
Returns the relative started time (duration) compared to current date

Specified by:
getRelativeBuildStartedDate in interface ResultsSummary
Returns:
relative duration

isBuiltToday

public boolean isBuiltToday()

getRelativeBuildDate

public java.lang.String getRelativeBuildDate(java.util.Date comparedTo)
Provides a relative build date, such as 2 hours ago.

Specified by:
getRelativeBuildDate in interface ResultsSummary
Returns:
The relative date

getRelativeQueueDate

public java.lang.String getRelativeQueueDate(java.util.Date comparedTo)
Specified by:
getRelativeQueueDate in interface ResultsSummary

getRelativeBuildStartedDate

public java.lang.String getRelativeBuildStartedDate(java.util.Date comparedTo)
Description copied from interface: ResultsSummary
Returns the relative started time (duration) compared to date passed as parameter

Specified by:
getRelativeBuildStartedDate in interface ResultsSummary
Returns:
relative duration

createChangedByAuthors

protected java.lang.String createChangedByAuthors(java.util.Set updators)

getReasonSummary

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

getTestSummary

@NotNull
public java.lang.String getTestSummary()
Specified by:
getTestSummary in interface ResultsSummary

isFailed

public boolean isFailed()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.FAILED

Specified by:
isFailed in interface ResultsSummary
Returns:

isSuccessful

public boolean isSuccessful()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.SUCCESS

Specified by:
isSuccessful in interface ResultsSummary
Returns:

isPending

public boolean isPending()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING

Specified by:
isPending in interface ResultsSummary
Returns:

isQueued

public boolean isQueued()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.QUEUED

Specified by:
isQueued in interface ResultsSummary
Returns:

isInProgress

public boolean isInProgress()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.IN_PROGRESS

Specified by:
isInProgress in interface ResultsSummary
Returns:

isNotBuilt

public boolean isNotBuilt()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.NOT_BUILT

Specified by:
isNotBuilt in interface ResultsSummary
Returns:

isFinished

public boolean isFinished()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.FINISHED

Specified by:
isFinished in interface ResultsSummary
Returns:

isWaiting

public boolean isWaiting()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED

Specified by:
isWaiting in interface ResultsSummary
Returns:

isActive

public boolean isActive()
Description copied from interface: ResultsSummary
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS

Specified by:
isActive in interface ResultsSummary
Returns:

getFixingJiraIssues

@NotNull
public java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
Description copied from interface: ResultsSummary
Return JIRA issues that this build result summary fixes

Specified by:
getFixingJiraIssues in interface ResultsSummary
Returns:

getRelatedJiraIssues

@NotNull
public java.util.Set<LinkedJiraIssue> getRelatedJiraIssues()
Description copied from interface: ResultsSummary
Returns JIRA issues that are related to this build result. Does not include fixing issues

Specified by:
getRelatedJiraIssues in interface ResultsSummary
Returns:

getArtifactLinks

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

Specified by:
getArtifactLinks in interface ResultsSummary
Returns:

getProducedArtifactLinks

@NotNull
public java.util.Collection<ArtifactLink> getProducedArtifactLinks()
Description copied from interface: BuildResultsSummary
Returns all artifacts produced by this build. Even if the files don't exist

Specified by:
getProducedArtifactLinks in interface BuildResultsSummary
Returns:

setArtifactLinks

public void setArtifactLinks(java.util.Collection<ArtifactLink> artifactLinks)

getArtifactLinksThatExist

public java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
Description copied from interface: ResultsSummary
Returns only artifacts that exists

Specified by:
getArtifactLinksThatExist in interface ResultsSummary
Returns:

getRepositoryChangesets

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

setRevisionKeys

public void setRevisionKeys(java.util.List<RepositoryChangeset> revisionKeys)

getBuildTime

public java.lang.String getBuildTime()
When did the build start?

Specified by:
getBuildTime in interface ResultsSummary
Returns:
The date and time of the build.

setBuildDate

public void setBuildDate(java.util.Date buildDate)
Specified by:
setBuildDate in interface ResultsSummary

getId

public long getId()
Specified by:
getId in interface BambooIdProvider

setId

public void setId(long id)
Specified by:
setId in interface BambooObject

getTriggerManager

protected TriggerManager getTriggerManager()

setTriggerManager

public void setTriggerManager(TriggerManager triggerManager)

getQueueTime

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

Specified by:
getQueueTime in interface ResultsSummary
Returns:

getQueueDuration

public long getQueueDuration()
Description copied from interface: BuildResultsSummary
How long build was in the queue (in miliseconds)

Specified by:
getQueueDuration in interface BuildResultsSummary
Returns:

setQueueTime

public void setQueueTime(java.util.Date queueTime)
Specified by:
setQueueTime in interface ResultsSummary

getVcsUpdateTime

public java.util.Date getVcsUpdateTime()
Description copied from interface: BuildResultsSummary
When the source syncronisation was kicked off

Specified by:
getVcsUpdateTime in interface BuildResultsSummary
Returns:

getVcsUpdateDuration

public long getVcsUpdateDuration()
Description copied from interface: BuildResultsSummary
How long checkout take (in miliseconds)

Specified by:
getVcsUpdateDuration in interface BuildResultsSummary
Returns:

getLifeCycleState

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

setLifeCycleState

public void setLifeCycleState(LifeCycleState lifeCycleState)

updateLifeCycleState

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

Specified by:
updateLifeCycleState in interface ResultsSummary
Parameters:
lifeCycleState - lifeCycleState to be set
buildState - buildState to be set

setVcsUpdateTime

public void setVcsUpdateTime(java.util.Date vcsUpdateTime)

resetTestClassResults

public void resetTestClassResults(@NotNull
                                  java.util.List<TestClassResult> testClassResults)
Description copied from interface: ResultsSummary
Overrides all current testClassResults with the new ones

Specified by:
resetTestClassResults in interface ResultsSummary
Parameters:
testClassResults - to set

setPlanCompletedDate

public void setPlanCompletedDate(@NotNull
                                 java.util.Date completionDate)
Description copied from interface: ResultsSummary
Sets the time when build finished.

Specified by:
setPlanCompletedDate in interface ResultsSummary

getPlanCompletedDate

@NotNull
public java.util.Date getPlanCompletedDate()
Specified by:
getPlanCompletedDate in interface ResultsSummary
Returns:
time when build finished

getTestResultsSummary

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

setTestResultsSummary

public void setTestResultsSummary(@NotNull
                                  TestResultsSummary testResultsSummary)
Description copied from interface: ResultsSummary
Set the test summary information from this build

Specified by:
setTestResultsSummary in interface ResultsSummary
Parameters:
testResultsSummary - the test summary information

isMarkedForDeletion

public boolean isMarkedForDeletion()
Specified by:
isMarkedForDeletion in interface ImmutableDeletable
Returns:
Whether or not the Object has been marked for deletion

setMarkedForDeletion

public void setMarkedForDeletion(boolean markedForDeletion)
Specified by:
setMarkedForDeletion in interface Deletable

setBuildCancelledDate

public void setBuildCancelledDate(java.util.Date buildCancelledDate)
Specified by:
setBuildCancelledDate in interface ResultsSummary

setTriggerReason

public void setTriggerReason(TriggerReason triggerReason)
Specified by:
setTriggerReason in interface ResultsSummary

setDeltaState

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

Specified by:
setDeltaState in interface ResultsSummary
Parameters:
deltaState - - the relative status for this summary

setTimeToFix

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

Specified by:
setTimeToFix in interface ResultsSummary
Parameters:
timeToFix - how long (milli seconds) it took for this build to fix a failure.

getExtraBuildResultsData

@Nullable
public ExtraBuildResultsData getExtraBuildResultsData()
Description copied from interface: BuildResultsSummary
Allow access to ExtraBuildResultsData

Specified by:
getExtraBuildResultsData in interface BuildResultsSummary
Returns:

getFilteredTestResults

@NotNull
public FilteredTestResults getFilteredTestResults()
Description copied from interface: BuildResultsSummary
Return a filtered view of all the tests that ran in this build. Provides some degree of caching but is still relatively intensive.

Specified by:
getFilteredTestResults in interface BuildResultsSummary
Returns:
a filtered view of all the tests ran in this build. Null if the builds hasn't finished yet.

getRestartCount

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

Specified by:
getRestartCount in interface ResultsSummary
Returns:

incrementRestartCount

public int incrementRestartCount()
Description copied from interface: ResultsSummary
Increments number of build restarts and returns the new value

Specified by:
incrementRestartCount in interface ResultsSummary
Returns:

getCommits

public com.google.common.collect.ImmutableList<Commit> getCommits()
Description copied from interface: ResultsSummary
List of commits associated with the build represented by this summary

Specified by:
getCommits in interface ResultsSummary
Returns:
list of commits

isNotRunYet

public boolean isNotRunYet()
Description copied from interface: ResultsSummary
Tells whether this result belongs to a job that will run when next manual stage is kicked off

Specified by:
isNotRunYet in interface ResultsSummary
Returns:

compareTo

public int compareTo(ResultsSummary brs)
Specified by:
compareTo in interface java.lang.Comparable<ResultsSummary>

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2012 Atlassian. All Rights Reserved.