com.atlassian.bamboo.index
Class BuildResultsSummaryDocument

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.index.BuildResultsSummaryDocument
All Implemented Interfaces:
BambooObject, BuildResultsSummary, ResultStatisticsProvider, java.lang.Cloneable, java.lang.Comparable

public class BuildResultsSummaryDocument
extends AbstractBuildResultsSummary

A lucene implementation of an AbstractBuildResultsSummary which mirrors the BuildResultsSummary object closely.


Field Summary
static java.lang.String DOCTYPE_BUILD_RESULT
           
static java.lang.String FIELD_AUTHORS
           
static java.lang.String FIELD_BUILD_AGENT_ID
           
static java.lang.String FIELD_BUILD_ID
           
static java.lang.String FIELD_BUILD_KEY
           
static java.lang.String FIELD_BUILD_NUMBER
           
static java.lang.String FIELD_COMPLETED_TIMESTAMP
           
static java.lang.String FIELD_DELTA_STATE
           
static java.lang.String FIELD_DOC_TYPE
           
static java.lang.String FIELD_DURATION
           
static java.lang.String FIELD_FAILED_TEST_COUNT
           
static java.lang.String FIELD_ID
           
static java.lang.String FIELD_JIRA_ISSUE_KEY
           
static java.lang.String FIELD_JIRA_PROJECT_KEY
           
static java.lang.String FIELD_LABELS
           
static java.lang.String FIELD_STATE
           
static java.lang.String FIELD_SUCCESSFUL_TEST_COUNT
           
static java.lang.String FIELD_TIME_TO_FIX
           
static java.lang.String FIELD_TIMESTAMP
           
static java.lang.String FIELD_TIMESTAMP_DAY
           
static java.lang.String FIELD_TOTAL_TEST_COUNT
           
static java.lang.String FIELD_TRIGGER_REASON_KEY
           
static java.lang.String FIELD_VCS_REVISION_KEY
           
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
BuildResultsSummaryDocument(org.apache.lucene.document.Document doc)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object object)
           
 java.util.Collection getAuthorNames()
           
 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 getChangedByAuthors()
           
 java.util.List getComments()
          Gets the associated user comments for the build
 java.util.Map 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()
          Number of failing tests
 java.util.Set getJiraIssueKeys()
          Returns all the JIRA issue keys metioned in the commit comments
 java.util.List getLabellings()
          Tags / labels assocaited with the build
 java.util.List getLabelNames()
          A shortcust method to get all of the label names from the labbellings
 long getSuccessfulTestCount()
          Number of successful tests
 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 triggerred (duh)
 java.util.Set<Author> getUniqueAuthors()
          A shortcut method to get the unique set of authors contributing to this build.
 int hashCode()
           
 void setBuildAgentId(java.lang.Long buildAgentId)
           
 void setTriggerReason(TriggerReason triggerReason)
           
 
Methods inherited from class com.atlassian.bamboo.resultsummary.AbstractBuildResultsSummary
createChangedByAuthors, getBuildResultKey, getBuildTime, getDurationDescription, getReasonSummary, getRelativeBuildDate, getRelativeBuildDate, getTestSummary, getTriggerReasonManager, getVcsRevisionKey, isBuiltToday, isFailed, isSuccessful, 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
getId
 

Field Detail

FIELD_ID

public static final java.lang.String FIELD_ID
See Also:
Constant Field Values

FIELD_BUILD_NUMBER

public static final java.lang.String FIELD_BUILD_NUMBER
See Also:
Constant Field Values

FIELD_BUILD_KEY

public static final java.lang.String FIELD_BUILD_KEY
See Also:
Constant Field Values

FIELD_BUILD_ID

public static final java.lang.String FIELD_BUILD_ID
See Also:
Constant Field Values

FIELD_STATE

public static final java.lang.String FIELD_STATE
See Also:
Constant Field Values

FIELD_TIMESTAMP

public static final java.lang.String FIELD_TIMESTAMP
See Also:
Constant Field Values

FIELD_COMPLETED_TIMESTAMP

public static final java.lang.String FIELD_COMPLETED_TIMESTAMP
See Also:
Constant Field Values

FIELD_TIMESTAMP_DAY

public static final java.lang.String FIELD_TIMESTAMP_DAY
See Also:
Constant Field Values

FIELD_DOC_TYPE

public static final java.lang.String FIELD_DOC_TYPE
See Also:
Constant Field Values

DOCTYPE_BUILD_RESULT

public static final java.lang.String DOCTYPE_BUILD_RESULT
See Also:
Constant Field Values

FIELD_DURATION

public static final java.lang.String FIELD_DURATION
See Also:
Constant Field Values

FIELD_JIRA_ISSUE_KEY

public static final java.lang.String FIELD_JIRA_ISSUE_KEY
See Also:
Constant Field Values

FIELD_JIRA_PROJECT_KEY

public static final java.lang.String FIELD_JIRA_PROJECT_KEY
See Also:
Constant Field Values

FIELD_TOTAL_TEST_COUNT

public static final java.lang.String FIELD_TOTAL_TEST_COUNT
See Also:
Constant Field Values

FIELD_SUCCESSFUL_TEST_COUNT

public static final java.lang.String FIELD_SUCCESSFUL_TEST_COUNT
See Also:
Constant Field Values

FIELD_FAILED_TEST_COUNT

public static final java.lang.String FIELD_FAILED_TEST_COUNT
See Also:
Constant Field Values

FIELD_AUTHORS

public static final java.lang.String FIELD_AUTHORS
See Also:
Constant Field Values

FIELD_TRIGGER_REASON_KEY

public static final java.lang.String FIELD_TRIGGER_REASON_KEY
See Also:
Constant Field Values

FIELD_DELTA_STATE

public static final java.lang.String FIELD_DELTA_STATE
See Also:
Constant Field Values

FIELD_LABELS

public static final java.lang.String FIELD_LABELS
See Also:
Constant Field Values

FIELD_TIME_TO_FIX

public static final java.lang.String FIELD_TIME_TO_FIX
See Also:
Constant Field Values

FIELD_VCS_REVISION_KEY

public static final java.lang.String FIELD_VCS_REVISION_KEY
See Also:
Constant Field Values

FIELD_BUILD_AGENT_ID

public static final java.lang.String FIELD_BUILD_AGENT_ID
See Also:
Constant Field Values
Constructor Detail

BuildResultsSummaryDocument

public BuildResultsSummaryDocument(org.apache.lucene.document.Document doc)
Method Detail

getBuildNumber

public int getBuildNumber()

getBuildKey

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

Returns:

getBuildState

public BuildState getBuildState()

getBuildDate

public java.util.Date getBuildDate()

getBuildCompletedDate

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

Returns:

getDurationInSeconds

public double getDurationInSeconds()

getJiraIssueKeys

public java.util.Set getJiraIssueKeys()
Description copied from interface: BuildResultsSummary
Returns all the JIRA issue keys metioned in the commit comments

Returns:

getSuccessfulTestCount

public long getSuccessfulTestCount()
Description copied from interface: BuildResultsSummary
Number of successful tests

Returns:

getFailedTestCount

public long getFailedTestCount()
Description copied from interface: BuildResultsSummary
Number of failing tests

Returns:

getAuthorNames

public java.util.Collection getAuthorNames()

getTriggerReason

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

Returns:

setTriggerReason

public void setTriggerReason(TriggerReason triggerReason)

getBuildAgentId

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

Returns:

setBuildAgentId

public void setBuildAgentId(java.lang.Long buildAgentId)

getChangedByAuthors

public java.lang.String getChangedByAuthors()

getUniqueAuthors

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

Returns:
Set of Authors

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.

Returns:

getCustomBuildData

public java.util.Map getCustomBuildData()
Description copied from interface: BuildResultsSummary
Custom data map to store random metadata about the build

Returns:

getLabellings

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

Returns:

getLabelNames

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

Returns:

getDuration

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

Returns:

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.

Returns:
Null if not a fixing build

getComments

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

Returns:

compareTo

public int compareTo(java.lang.Object obj)

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


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.