com.atlassian.bamboo.resultsummary
Class BuildResultsSummaryImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.resultsummary.AbstractBuildResultsSummary
              extended by com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl
All Implemented Interfaces:
BambooObject, BuildResultsSummary, ExtendedBuildResultsSummary, ResultStatisticsProvider, java.lang.Cloneable, java.lang.Comparable<BuildResultsSummary>

public class BuildResultsSummaryImpl
extends AbstractBuildResultsSummary
implements ExtendedBuildResultsSummary


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
BuildResultsSummaryImpl()
           
 
Method Summary
 int compareTo(BuildResultsSummary buildResultsSummary)
           
 boolean equals(java.lang.Object object)
           
 java.util.Collection<ArtifactLink> getArtifactLinks()
          Returns all artifacts.
 java.lang.Long getBuildAgentId()
          The agent Id
 java.util.Date getBuildCompletedDate()
          When the build finished
 java.util.Date getBuildDate()
           
 java.lang.String getBuildKey()
          Full key of the plan.
 int getBuildNumber()
           
 BuildState getBuildState()
           
 java.lang.String getChangesListSummary()
           
 java.util.List<Comment> getComments()
          Gets the associated user comments for the build
 java.util.Set<Commit> getCommits()
           
 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
 double getDurationInSeconds()
           
 long getFailedTestCount()
          Deprecated. 
 FilteredTestResults getFilteredTestResults()
          Return a filtered view of all the tests that ran in this build.
 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 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
 long getQueueDuration()
          How long build was in the queue (in miliseconds)
 java.util.Date getQueueTime()
          When the build queued
 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.lang.String getTriggerReasonKey()
           
 java.util.Set getUniqueAuthors()
          A shortcut method to get the unique set of authors contributing to this build.
 long getVcsUpdateDuration()
          How long checkout take (in miliseconds)
 java.util.Date getVcsUpdateTime()
          When the source syncronisation was kicked off
 boolean hasComments()
          Checks if the result has any user comments for the build
 int hashCode()
           
static void prefetchFromHibernate(ExtendedBuildResultsSummary buildResultsSummary)
          An inelegant method to force lazily loaded items on the ExtendedBuildResultsSummary to be fully loaded and relatively safe to use outside of the session.
 void resetTestClassResults(java.util.List<TestClassResult> testClassResults)
          Overrides all current testClassResults with the new ones
 void setArtifactLinks(java.util.List<ArtifactLink> artifactLinks)
           
 void setBuildAgentId(java.lang.Long buildAgentId)
           
 void setBuildCompletedDate(java.util.Date buildCompletedDate)
           
 void setBuildDate(java.util.Date buildDate)
           
 void setBuildKey(java.lang.String buildKey)
           
 void setBuildNumber(int buildNumber)
           
 void setBuildState(BuildState buildState)
           
 void setComments(java.util.List comments)
           
 void setCommits(java.util.Set<Commit> commits)
           
 void setCustomBuildData(java.util.Map customBuildData)
           
 void setDeltaState(DeltaState deltaState)
           
 void setDuration(long duration)
           
 void setJiraIssues(java.util.Set jiraIssues)
           
 void setLabellings(java.util.List labellings)
           
 void setQueueTime(java.util.Date queueTime)
           
 void setTestResultsSummary(TestResultsSummary testResultsSummary)
          Set the test summary information from this build
 void setTimeToFix(java.lang.Long timeToFix)
           
 void setTriggerReason(TriggerReason triggerReason)
           
 void setTriggerReasonKey(java.lang.String triggerReasonKey)
           
 void setVcsUpdateTime(java.util.Date vcsUpdateTime)
           
 
Methods inherited from class com.atlassian.bamboo.resultsummary.AbstractBuildResultsSummary
getArtifactLinksThatExist, getBuildResultKey, getBuildTime, getDurationDescription, getFixingJiraIssues, getLongReasonSummary, getPlanResultKey, getReasonSummary, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getShortReasonSummary, getTextProvider, getTriggerReasonManager, getVcsRevisionKey, hasChanges, isBuiltToday, isFailed, isNotBuilt, isPending, isSuccessful, setTextProvider, setTriggerReasonManager, setVcsRevisionKey
 
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.BuildResultsSummary
getArtifactLinksThatExist, getBuildResultKey, getBuildTime, getDurationDescription, getFixingJiraIssues, getId, getPlanResultKey, getReasonSummary, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getShortReasonSummary, getVcsRevisionKey, hasChanges, isFailed, isNotBuilt, isPending, isSuccessful, setVcsRevisionKey
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Constructor Detail

BuildResultsSummaryImpl

public BuildResultsSummaryImpl()
Method Detail

getBuildKey

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

Specified by:
getBuildKey in interface BuildResultsSummary
Returns:

setBuildKey

public void setBuildKey(java.lang.String buildKey)

getBuildState

public BuildState getBuildState()
Specified by:
getBuildState in interface ResultStatisticsProvider

setBuildState

public void setBuildState(BuildState buildState)

getBuildNumber

public int getBuildNumber()
Specified by:
getBuildNumber in interface ResultStatisticsProvider

setBuildNumber

public void setBuildNumber(int buildNumber)

getBuildDate

public java.util.Date getBuildDate()
Specified by:
getBuildDate in interface ResultStatisticsProvider

setBuildDate

public void setBuildDate(java.util.Date buildDate)

getBuildCompletedDate

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

Specified by:
getBuildCompletedDate in interface BuildResultsSummary
Returns:

setBuildCompletedDate

public void setBuildCompletedDate(java.util.Date buildCompletedDate)

getDuration

public long getDuration()
Description copied from interface: BuildResultsSummary
Duration of the build in millisecods

Specified by:
getDuration in interface BuildResultsSummary
Returns:

setDuration

public void setDuration(long duration)

getDeltaState

public DeltaState getDeltaState()
Description copied from interface: BuildResultsSummary
Gets the DeltaState of the summary. It can be a build that fixes, breaks, failing, successfull. Provides a status relative to the previous summary.

Specified by:
getDeltaState in interface BuildResultsSummary
Returns:

setDeltaState

public void setDeltaState(DeltaState deltaState)

getCommits

public java.util.Set<Commit> getCommits()
Specified by:
getCommits in interface ExtendedBuildResultsSummary

setCommits

public void setCommits(java.util.Set<Commit> commits)

getJiraIssueKeys

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

Specified by:
getJiraIssueKeys in interface BuildResultsSummary
Returns:

getJiraIssues

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

Specified by:
getJiraIssues in interface BuildResultsSummary
Returns:

setJiraIssues

public void setJiraIssues(java.util.Set jiraIssues)

getCustomBuildData

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

Specified by:
getCustomBuildData in interface BuildResultsSummary
Returns:

setCustomBuildData

public void setCustomBuildData(java.util.Map customBuildData)

getTimeToFix

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

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

setTimeToFix

public void setTimeToFix(java.lang.Long timeToFix)

getLabellings

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

Specified by:
getLabellings in interface BuildResultsSummary
Returns:

setLabellings

public void setLabellings(java.util.List labellings)

getLabelNames

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

Specified by:
getLabelNames in interface BuildResultsSummary
Returns:

getComments

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

Specified by:
getComments in interface BuildResultsSummary
Returns:

hasComments

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

Specified by:
hasComments in interface BuildResultsSummary
Returns:

setComments

public void setComments(java.util.List comments)

getArtifactLinks

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

Specified by:
getArtifactLinks in interface BuildResultsSummary
Returns:

setArtifactLinks

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

getUniqueAuthors

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

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

getTriggerReasonKey

public java.lang.String getTriggerReasonKey()

setTriggerReasonKey

public void setTriggerReasonKey(java.lang.String triggerReasonKey)

getTriggerReason

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

Specified by:
getTriggerReason in interface BuildResultsSummary
Returns:

setTriggerReason

public void setTriggerReason(TriggerReason triggerReason)

getQueueTime

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

Specified by:
getQueueTime in interface BuildResultsSummary
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)

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:

setVcsUpdateTime

public void setVcsUpdateTime(java.util.Date vcsUpdateTime)

getBuildAgentId

public java.lang.Long getBuildAgentId()
Description copied from interface: BuildResultsSummary
The agent Id

Specified by:
getBuildAgentId in interface BuildResultsSummary
Returns:

setBuildAgentId

public void setBuildAgentId(java.lang.Long buildAgentId)

getChangesListSummary

public java.lang.String getChangesListSummary()
Specified by:
getChangesListSummary in interface ExtendedBuildResultsSummary

getDurationInSeconds

public double getDurationInSeconds()
Specified by:
getDurationInSeconds in interface ResultStatisticsProvider

compareTo

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

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class com.atlassian.core.bean.EntityObject

hashCode

public int hashCode()
Overrides:
hashCode in class com.atlassian.core.bean.EntityObject

prefetchFromHibernate

public static void prefetchFromHibernate(ExtendedBuildResultsSummary buildResultsSummary)
An inelegant method to force lazily loaded items on the ExtendedBuildResultsSummary to be fully loaded and relatively safe to use outside of the session. Should not be used when large numbers of builds are retrieved and should be avoided if possible.

Parameters:
buildResultsSummary -

resetTestClassResults

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

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

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.

getTestResultsSummary

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

setTestResultsSummary

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

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

getFailedTestCount

@Deprecated
public long getFailedTestCount()
Deprecated. 

Description copied from interface: BuildResultsSummary
Deprecated since 2.6: Please use methods TestResultsSummary (getTestResultsSummary().getFailedTestCaseCount()) instead Number of failing tests

Specified by:
getFailedTestCount in interface BuildResultsSummary
Returns:
count of how many tests failed in this build

getSuccessfulTestCount

@Deprecated
public long getSuccessfulTestCount()
Deprecated. 

Description copied from interface: BuildResultsSummary
Deprecated since 2.6: Please use methods TestResultsSummary (getTestResultsSummary().getSuccessfulTestCaseCount())instead Number of successful tests

Specified by:
getSuccessfulTestCount in interface BuildResultsSummary
Returns:
count of how many tests were successful in this build

getTestSummary

public java.lang.String getTestSummary()
Specified by:
getTestSummary in interface BuildResultsSummary


Copyright © 2010 Atlassian. All Rights Reserved.