public abstract class

AbstractResultsSummary

extends BaseResultSummary
implements Deletable MutableBuildKeyResultsSummary
java.lang.Object
   ↳ com.atlassian.core.bean.EntityObject
     ↳ com.atlassian.bamboo.core.BambooEntityObject
       ↳ com.atlassian.bamboo.resultsummary.BaseResultSummary
         ↳ com.atlassian.bamboo.resultsummary.AbstractResultsSummary
Known Direct Subclasses
Known Indirect Subclasses

Summary

Fields
protected BuildState buildState
protected LifeCycleState lifeCycleState
protected boolean markedForDeletion
protected static final Supplier<PlanManager> planManagerRef
protected static final Supplier<PlanManager> planManagerSupplier
[Expand]
Inherited Fields
From class com.atlassian.bamboo.resultsummary.BaseResultSummary
From class com.atlassian.bamboo.core.BambooEntityObject
Public Constructors
AbstractResultsSummary()
Public Methods
@NotNull Collection<ArtifactLink> getArtifactLinks()
Returns all artifacts associated with this build.
Long getBuildAgentId()
The id of the agent that built the result
@Nullable Date getBuildCancelledDate()
When the build was cancelled
Date getBuildCompletedDate()
When the build finished
Date getBuildDate()
Date when build was passed to execution.
int getBuildNumber()
Get build number
BuildState getBuildState()
Build state.
@NotNull String getChangesListSummary()
@NotNull List<Comment> getComments()
Gets the associated user comments for the build
@NotNull List<Comment> getCommentsToDisplay()
Gets the aggregated comments from the Jobs as well as the parent plan
@NotNull Map<StringString> getCustomBuildData()
Custom data map to store random metadata about the build
DeltaState getDeltaState()
Gets the DeltaState of the summary.
String getDiscriminator()
long getDuration()
Duration of the build in milliseconds
@NotNull Set<LinkedJiraIssue> getJiraIssues()
Returns all the JIRA issues linked to this build result
List<Labelling> getLabellings()
Tags / labels assocaited with the build
LifeCycleState getLifeCycleState()
@NotNull Plan getPlan()
Gets the Plan that this result belongs directly belongs to
@Nullable Date getPlanCompletedDate()
@NotNull PlanKey getPlanKey()
Full key of the plan.
long getProcessingDuration()
Duration of actual build processing in miliseconds
Date getQueueTime()
Date when build was queued.
String getReasonSummary()
@NotNull List<RepositoryChangeset> getRepositoryChangesets()
int getRestartCount()
Return the number of build restart attempts
Long getStageResultId()
List<ConsumedSubscription> getSubscriptions()
Returns list of consumed artifact dependencies ConsumedSubscription
@NotNull List<VariableSubstitution> getSubstitutedVariables()
Returns list of variables substituted during build execution
@NotNull List<TestClassResult> getTestClassResults()
@NotNull TestResultsSummary getTestResultsSummary()
Long getTimeToFix()
A stored version of how long (milli seconds) it took for this build to fix a failure.
@NotNull TriggerReason getTriggerReason()
Why the build was was triggered
String getTriggerReasonKey()
@NotNull List<VariableContextSnapshot> getVariableContextLogs()
int incrementRestartCount()
Increments number of build restarts and returns the new value
void resetTestClassResults(List<TestClassResult> testClassResults)
Overrides all current testClassResults with the new ones
void setArtifactLinks(List<ArtifactLink> artifactLinks)
void setBuildAgentId(Long buildAgentId)
void setBuildCancelledDate(Date buildCancelledDate)
void setBuildCompletedDate(Date buildCompletedDate)
void setBuildDate(Date buildDate)
void setBuildKey(String buildKey)
void setBuildNumber(int buildNumber)
void setBuildState(BuildState buildState)
void setComments(List<Comment> comments)
void setCustomBuildData(Map<StringString> customBuildData)
void setDeltaState(DeltaState deltaState)
Sets the DeltaState for the summary.
void setDiscriminator(String discriminator)
void setDuration(long duration)
void setJiraIssues(Set jiraIssues)
void setLabellings(List<Labelling> labellings)
void setLifeCycleState(LifeCycleState lifeCycleState)
void setPlanCompletedDate(Date completionDate)
Sets the time when build finished.
void setPlanKey(PlanKey planKey)
void setProcessingDuration(long processingDuration)
void setQueueTime(Date queueTime)
void setRestartCount(int restartCount)
void setStageResultId(Long stageResultId)
void setSubscriptions(List<ConsumedSubscription> subscriptions)
void setSubstitutedVariables(List<VariableSubstitution> substitutedVariables)
void setTestResultsSummary(TestResultsSummary testResultsSummary)
Set the test summary information from this build
void setTimeToFix(Long timeToFix)
A stored version of how long (milli seconds) it took for this build to fix a failure.
void setTriggerReason(TriggerReason triggerReason)
void setTriggerReasonKey(String triggerReasonKey)
void setVariableContextLogs(List<VariableContextSnapshot> variableContextLogs)
void updateLifeCycleState(LifeCycleState lifeCycleState, BuildState buildState)
Update lifeCycleState and buildState in one go.
Protected Methods
TriggerManager getTriggerManager()
[Expand]
Inherited Methods
From class com.atlassian.bamboo.resultsummary.BaseResultSummary
From class com.atlassian.bamboo.core.BambooEntityObject
From class com.atlassian.core.bean.EntityObject
From class java.lang.Object
From interface com.atlassian.bamboo.core.BambooIdProvider
From interface com.atlassian.bamboo.core.BambooObject
From interface com.atlassian.bamboo.deletion.Deletable
From interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
From interface com.atlassian.bamboo.resultsummary.MutableBuildKeyResultsSummary
From interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
From interface com.atlassian.bamboo.resultsummary.ResultsSummary
From interface java.lang.Comparable

Fields

protected BuildState buildState

protected LifeCycleState lifeCycleState

protected boolean markedForDeletion

protected static final Supplier<PlanManager> planManagerRef

protected static final Supplier<PlanManager> planManagerSupplier

Public Constructors

public AbstractResultsSummary ()

Public Methods

@NotNull public Collection<ArtifactLink> getArtifactLinks ()

Returns all artifacts associated with this build. Even if the files don't exist

public Long getBuildAgentId ()

The id of the agent that built the result

Returns
  • Null if no agents involved or unknown

@Nullable public Date getBuildCancelledDate ()

When the build was cancelled

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

public Date getBuildCompletedDate ()

When the build finished

public Date getBuildDate ()

Date when build was passed to execution. For chain result this date is set when the first job is started.

Returns
  • date of build execution or null if build was not executed yet

public int getBuildNumber ()

Get build number

Returns
  • build number of the described build

public BuildState getBuildState ()

Build state.

Returns
  • build state

@NotNull public String getChangesListSummary ()

@NotNull public List<Comment> getComments ()

Gets the associated user comments for the build

@NotNull public List<Comment> getCommentsToDisplay ()

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

@NotNull public Map<StringString> getCustomBuildData ()

Custom data map to store random metadata about the build

public 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.

public String getDiscriminator ()

public long getDuration ()

Duration of the build in milliseconds

Returns
  • duration of the build in milliseconds

@NotNull public Set<LinkedJiraIssue> getJiraIssues ()

Returns all the JIRA issues linked to this build result

public List<Labelling> getLabellings ()

Tags / labels assocaited with the build

public LifeCycleState getLifeCycleState ()

@NotNull public Plan getPlan ()

Gets the Plan that this result belongs directly belongs to

Returns
  • the owning plan for the result

@Nullable public Date getPlanCompletedDate ()

@NotNull public PlanKey getPlanKey ()

Full key of the plan. e.g BAM-MAIN

public long getProcessingDuration ()

Duration of actual build processing in miliseconds

Returns
  • processing duration of the build in milliseconds

public Date getQueueTime ()

Date when build was queued. For chain result this date is set when the whole chain is created - as chain is created in QUEUED state.

public String getReasonSummary ()

@NotNull public List<RepositoryChangeset> getRepositoryChangesets ()

public int getRestartCount ()

Return the number of build restart attempts

public Long getStageResultId ()

public List<ConsumedSubscription> getSubscriptions ()

Returns list of consumed artifact dependencies ConsumedSubscription

@NotNull public List<VariableSubstitution> getSubstitutedVariables ()

Returns list of variables substituted during build execution

@NotNull public List<TestClassResult> getTestClassResults ()

@NotNull public TestResultsSummary getTestResultsSummary ()

public 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

@NotNull public TriggerReason getTriggerReason ()

Why the build was was triggered

public String getTriggerReasonKey ()

@NotNull public List<VariableContextSnapshot> getVariableContextLogs ()

public int incrementRestartCount ()

Increments number of build restarts and returns the new value

public void resetTestClassResults (List<TestClassResult> testClassResults)

Overrides all current testClassResults with the new ones

Parameters
testClassResults to set

public void setArtifactLinks (List<ArtifactLink> artifactLinks)

public void setBuildAgentId (Long buildAgentId)

public void setBuildCancelledDate (Date buildCancelledDate)

public void setBuildCompletedDate (Date buildCompletedDate)

public void setBuildDate (Date buildDate)

public void setBuildKey (String buildKey)

public void setBuildNumber (int buildNumber)

public void setBuildState (BuildState buildState)

public void setComments (List<Comment> comments)

public void setCustomBuildData (Map<StringString> customBuildData)

public 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

public void setDiscriminator (String discriminator)

public void setDuration (long duration)

public void setJiraIssues (Set jiraIssues)

public void setLabellings (List<Labelling> labellings)

public void setLifeCycleState (LifeCycleState lifeCycleState)

public void setPlanCompletedDate (Date completionDate)

Sets the time when build finished.

public void setPlanKey (PlanKey planKey)

public void setProcessingDuration (long processingDuration)

public void setQueueTime (Date queueTime)

public void setRestartCount (int restartCount)

public void setStageResultId (Long stageResultId)

public void setSubscriptions (List<ConsumedSubscription> subscriptions)

public void setSubstitutedVariables (List<VariableSubstitution> substitutedVariables)

public void setTestResultsSummary (TestResultsSummary testResultsSummary)

Set the test summary information from this build

Parameters
testResultsSummary the test summary information

public void setTimeToFix (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.

public void setTriggerReason (TriggerReason triggerReason)

public void setTriggerReasonKey (String triggerReasonKey)

public void setVariableContextLogs (List<VariableContextSnapshot> variableContextLogs)

public void updateLifeCycleState (LifeCycleState lifeCycleState, 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

Protected Methods

protected TriggerManager getTriggerManager ()