Class BaseResultSummary
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.resultsummary.BaseResultSummary
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,ImmutableResultsSummary
,ResultStatisticsProvider
,Cloneable
,Comparable<ImmutableResultsSummary>
- Direct Known Subclasses:
AbstractResultsSummary
,ImmutableResultsSummaryImpl
public abstract class BaseResultSummary extends BambooEntityObject implements ImmutableResultsSummary
Base class for mutable and immutable result summaries.- Since:
- v3.4
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.lang3.time.FastDateFormat
DATE_FORMAT
-
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
-
-
Constructor Summary
Constructors Constructor Description BaseResultSummary()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(ImmutableResultsSummary resultsSummary)
protected String
createChangeListSummary()
boolean
equals(Object object)
Collection<ArtifactLink>
getArtifactLinksThatExist()
Deprecated.since 4.3String
getBuildTime()
When did the build start?com.google.common.collect.ImmutableList<Commit>
getCommits()
List of commits associated with the build represented by this summary@NotNull String
getDurationDescription()
Returns the duration in a "pretty" format.@NotNull Set<LinkedJiraIssue>
getFixingJiraIssues()
Return JIRA issues that this build result summary fixesSet<String>
getJiraIssueKeys()
Returns all the JIRA issue keys linked to this build result@NotNull List<String>
getLabelNames()
A shortcut method to get all of the label names from the labellingsList<VariableSubstitution>
getManuallyOverriddenVariables()
Returns empty list for any result created by Bamboo 5.15 or later@NotNull PlanResultKey
getPlanResultKey()
Gets thePlanResultKey
for thisImmutableResultsSummary
String
getProcessingDurationDescription()
Returns the processing duration in a "pretty" format.@NotNull Set<LinkedJiraIssue>
getRelatedJiraIssues()
Returns JIRA issues that are related to this build result.String
getRelativeBuildDate()
String
getRelativeBuildDate(Date comparedTo)
Provides a relative build date, such as 2 hours ago.String
getRelativeBuildStartedDate()
Returns the relative started time (duration) compared to current dateString
getRelativeBuildStartedDate(Date comparedTo)
Provides a relative build started date, such as 2 hours ago.String
getRelativeQueueDate()
String
getRelativeQueueDate(Date comparedTo)
Provides a relative queue date, such as 2 hours ago.String
getShortReasonSummary()
@NotNull Date
getStatDate()
When the build was executed.@NotNull String
getTestSummary()
protected abstract TriggerManager
getTriggerManager()
Set<Author>
getUniqueAuthors()
A shortcut method to get the unique set of authors contributing to this build.boolean
hasChanges()
Whether a build had changes or notboolean
hasComments()
Checks if the result has any user comments for the buildint
hashCode()
boolean
isActive()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
orLifeCycleState.QUEUED
orLifeCycleState.IN_PROGRESS
boolean
isFailed()
Shortcut method to see ifResultStatisticsProvider.getBuildState()
isBuildState.FAILED
boolean
isFinalized()
boolean
isFinished()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.FINISHED
boolean
isInProgress()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.IN_PROGRESS
boolean
isNotBuilt()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.NOT_BUILT
boolean
isPending()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
boolean
isQueued()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.QUEUED
boolean
isSuccessful()
Shortcut method to see ifResultStatisticsProvider.getBuildState()
isBuildState.SUCCESS
boolean
isWaiting()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
orLifeCycleState.QUEUED
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinks, getBuildAgentId, getBuildAgentType, getBuildCancelledDate, getBuildCompletedDate, getChangesListSummary, getCustomBuildData, getDeltaState, getDuration, getFullPlanName, getImmutableChain, getImmutablePlan, getJiraIssues, getLabellings, getLifeCycleState, getLogSize, getPlanIfExists, getPlanKey, getPlanName, getProcessingDuration, getQueueTime, getReasonSummary, getRepositoryChangesets, getRestartCount, getSubscriptions, getSubstitutedVariables, getTestResultsSummary, getTimeToFix, getTriggerReason, getVariableContextLogs, isCustomBuild, isNotRunYet, isOnceOff, isRebuild
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState
-
-
-
-
Method Detail
-
isFailed
public boolean isFailed()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifResultStatisticsProvider.getBuildState()
isBuildState.FAILED
- Specified by:
isFailed
in interfaceImmutableResultsSummary
- Returns:
-
isSuccessful
public boolean isSuccessful()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifResultStatisticsProvider.getBuildState()
isBuildState.SUCCESS
- Specified by:
isSuccessful
in interfaceImmutableResultsSummary
- Returns:
-
isPending
public boolean isPending()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
- Specified by:
isPending
in interfaceImmutableResultsSummary
- Returns:
-
isQueued
public boolean isQueued()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.QUEUED
- Specified by:
isQueued
in interfaceImmutableResultsSummary
- Returns:
-
isInProgress
public boolean isInProgress()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.IN_PROGRESS
- Specified by:
isInProgress
in interfaceImmutableResultsSummary
- Returns:
-
isNotBuilt
public boolean isNotBuilt()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.NOT_BUILT
- Specified by:
isNotBuilt
in interfaceImmutableResultsSummary
- Returns:
-
isFinalized
public boolean isFinalized()
-
isFinished
public boolean isFinished()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.FINISHED
- Specified by:
isFinished
in interfaceImmutableResultsSummary
- Returns:
-
isWaiting
public boolean isWaiting()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
orLifeCycleState.QUEUED
- Specified by:
isWaiting
in interfaceImmutableResultsSummary
- Returns:
-
isActive
public boolean isActive()
Description copied from interface:ImmutableResultsSummary
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
orLifeCycleState.QUEUED
orLifeCycleState.IN_PROGRESS
- Specified by:
isActive
in interfaceImmutableResultsSummary
- Returns:
-
getPlanResultKey
@NotNull public @NotNull PlanResultKey getPlanResultKey()
Description copied from interface:ImmutableResultsSummary
Gets thePlanResultKey
for thisImmutableResultsSummary
- Specified by:
getPlanResultKey
in interfaceImmutableResultsSummary
- Returns:
- planResultKey
-
getDurationDescription
@NotNull public @NotNull String getDurationDescription()
Description copied from interface:ImmutableResultsSummary
Returns the duration in a "pretty" format. Handles when duration is not known- Specified by:
getDurationDescription
in interfaceImmutableResultsSummary
- Returns:
- formatted duration
-
getRelativeBuildDate
public String getRelativeBuildDate()
- Specified by:
getRelativeBuildDate
in interfaceImmutableResultsSummary
-
getRelativeQueueDate
public String getRelativeQueueDate()
- Specified by:
getRelativeQueueDate
in interfaceImmutableResultsSummary
-
getRelativeBuildStartedDate
public String getRelativeBuildStartedDate()
Description copied from interface:ImmutableResultsSummary
Returns the relative started time (duration) compared to current date- Specified by:
getRelativeBuildStartedDate
in interfaceImmutableResultsSummary
- Returns:
- relative duration
-
getRelativeBuildDate
public String getRelativeBuildDate(Date comparedTo)
Provides a relative build date, such as 2 hours ago.- Specified by:
getRelativeBuildDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getRelativeQueueDate
public String getRelativeQueueDate(Date comparedTo)
Provides a relative queue date, such as 2 hours ago.- Specified by:
getRelativeQueueDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getRelativeBuildStartedDate
public String getRelativeBuildStartedDate(Date comparedTo)
Provides a relative build started date, such as 2 hours ago.- Specified by:
getRelativeBuildStartedDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getShortReasonSummary
public String getShortReasonSummary()
- Specified by:
getShortReasonSummary
in interfaceImmutableResultsSummary
-
getTriggerManager
protected abstract TriggerManager getTriggerManager()
-
getFixingJiraIssues
@NotNull public @NotNull Set<LinkedJiraIssue> getFixingJiraIssues()
Description copied from interface:ImmutableResultsSummary
Return JIRA issues that this build result summary fixes- Specified by:
getFixingJiraIssues
in interfaceImmutableResultsSummary
- Returns:
-
getRelatedJiraIssues
@NotNull public @NotNull Set<LinkedJiraIssue> getRelatedJiraIssues()
Description copied from interface:ImmutableResultsSummary
Returns JIRA issues that are related to this build result. Does not include fixing issues- Specified by:
getRelatedJiraIssues
in interfaceImmutableResultsSummary
- Returns:
-
hasChanges
public boolean hasChanges()
Description copied from interface:ImmutableResultsSummary
Whether a build had changes or not- Specified by:
hasChanges
in interfaceImmutableResultsSummary
- Returns:
-
getStatDate
@NotNull public @NotNull Date getStatDate()
Description copied from interface:ResultStatisticsProvider
When the build was executed. If build was not completed, queued time is provided instead.- Specified by:
getStatDate
in interfaceResultStatisticsProvider
- Returns:
- date of build execution or queued time if build was not executed or state is unknown
-
getJiraIssueKeys
public Set<String> getJiraIssueKeys()
Description copied from interface:ImmutableResultsSummary
Returns all the JIRA issue keys linked to this build result- Specified by:
getJiraIssueKeys
in interfaceImmutableResultsSummary
- Returns:
-
getLabelNames
@NotNull public @NotNull List<String> getLabelNames()
Description copied from interface:ImmutableResultsSummary
A shortcut method to get all of the label names from the labellings- Specified by:
getLabelNames
in interfaceImmutableResultsSummary
- Returns:
-
getUniqueAuthors
public Set<Author> getUniqueAuthors()
Description copied from interface:ImmutableResultsSummary
A shortcut method to get the unique set of authors contributing to this build.- Specified by:
getUniqueAuthors
in interfaceImmutableResultsSummary
- Returns:
Set
ofAuthor
s
-
getArtifactLinksThatExist
@Deprecated public Collection<ArtifactLink> getArtifactLinksThatExist()
Deprecated.since 4.3This returns live view of the getArtifactLinks()- Specified by:
getArtifactLinksThatExist
in interfaceImmutableResultsSummary
- Returns:
-
getProcessingDurationDescription
public String getProcessingDurationDescription()
Description copied from interface:ImmutableResultsSummary
Returns the processing duration in a "pretty" format. Handles unknown processing duration.- Specified by:
getProcessingDurationDescription
in interfaceImmutableResultsSummary
- Returns:
- formatted processing duration
-
getBuildTime
public String getBuildTime()
When did the build start?- Specified by:
getBuildTime
in interfaceImmutableResultsSummary
- Returns:
- The date and time of the build.
-
createChangeListSummary
protected String createChangeListSummary()
-
getCommits
public com.google.common.collect.ImmutableList<Commit> getCommits()
Description copied from interface:ImmutableResultsSummary
List of commits associated with the build represented by this summary- Specified by:
getCommits
in interfaceImmutableResultsSummary
- Returns:
- list of commits
-
getTestSummary
@NotNull public @NotNull String getTestSummary()
- Specified by:
getTestSummary
in interfaceImmutableResultsSummary
-
compareTo
public int compareTo(ImmutableResultsSummary resultsSummary)
- Specified by:
compareTo
in interfaceComparable<ImmutableResultsSummary>
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
getManuallyOverriddenVariables
public List<VariableSubstitution> getManuallyOverriddenVariables()
Description copied from interface:ImmutableResultsSummary
Returns empty list for any result created by Bamboo 5.15 or later- Specified by:
getManuallyOverriddenVariables
in interfaceImmutableResultsSummary
-
hasComments
public boolean hasComments()
Description copied from interface:ImmutableResultsSummary
Checks if the result has any user comments for the build- Specified by:
hasComments
in interfaceImmutableResultsSummary
- Returns:
-
-