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
Modifier and TypeFieldDescriptionprotected static final org.apache.commons.lang3.time.FastDateFormat
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ImmutableResultsSummary resultsSummary) protected String
boolean
Deprecated.since 4.3When did the build start?com.google.common.collect.ImmutableList<Commit>
List of commits associated with the build represented by this summary@NotNull String
Returns the duration in a "pretty" format.@NotNull Set<LinkedJiraIssue>
Return JIRA issues that this build result summary fixesReturns all the JIRA issue keys linked to this build resultA shortcut method to get all of the label names from the labellingsReturns empty list for any result created by Bamboo 5.15 or later@NotNull PlanResultKey
Gets thePlanResultKey
for thisImmutableResultsSummary
Returns the processing duration in a "pretty" format.@NotNull Set<LinkedJiraIssue>
Returns JIRA issues that are related to this build result.getRelativeBuildDate
(Date comparedTo) Provides a relative build date, such as 2 hours ago.Returns the relative started time (duration) compared to current dategetRelativeBuildStartedDate
(Date comparedTo) Provides a relative build started date, such as 2 hours ago.getRelativeQueueDate
(Date comparedTo) Provides a relative queue date, such as 2 hours ago.@NotNull Date
When the build was executed.@NotNull String
protected abstract TriggerManager
A shortcut method to get the unique set of authors contributing to this build.boolean
Whether a build had changes or notboolean
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
boolean
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.FINISHED
boolean
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.IN_PROGRESS
boolean
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.NOT_BUILT
boolean
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.PENDING
boolean
isQueued()
Shortcut method to see ifImmutableResultsSummary.getLifeCycleState()
isLifeCycleState.QUEUED
boolean
Shortcut method to see ifResultStatisticsProvider.getBuildState()
isBuildState.SUCCESS
boolean
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
-
Field Details
-
DATE_FORMAT
protected static final org.apache.commons.lang3.time.FastDateFormat DATE_FORMAT
-
-
Constructor Details
-
BaseResultSummary
public BaseResultSummary()
-
-
Method Details
-
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
Description copied from interface:ImmutableResultsSummary
Gets thePlanResultKey
for thisImmutableResultsSummary
- Specified by:
getPlanResultKey
in interfaceImmutableResultsSummary
- Returns:
- planResultKey
-
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
- Specified by:
getRelativeBuildDate
in interfaceImmutableResultsSummary
-
getRelativeQueueDate
- Specified by:
getRelativeQueueDate
in interfaceImmutableResultsSummary
-
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
Provides a relative build date, such as 2 hours ago.- Specified by:
getRelativeBuildDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getRelativeQueueDate
Provides a relative queue date, such as 2 hours ago.- Specified by:
getRelativeQueueDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getRelativeBuildStartedDate
Provides a relative build started date, such as 2 hours ago.- Specified by:
getRelativeBuildStartedDate
in interfaceImmutableResultsSummary
- Returns:
- The relative date
-
getShortReasonSummary
- Specified by:
getShortReasonSummary
in interfaceImmutableResultsSummary
-
getTriggerManager
-
getFixingJiraIssues
Description copied from interface:ImmutableResultsSummary
Return JIRA issues that this build result summary fixes- Specified by:
getFixingJiraIssues
in interfaceImmutableResultsSummary
- Returns:
-
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
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
Description copied from interface:ImmutableResultsSummary
Returns all the JIRA issue keys linked to this build result- Specified by:
getJiraIssueKeys
in interfaceImmutableResultsSummary
- Returns:
-
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
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.since 4.3This returns live view of the getArtifactLinks()- Specified by:
getArtifactLinksThatExist
in interfaceImmutableResultsSummary
- Returns:
-
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
When did the build start?- Specified by:
getBuildTime
in interfaceImmutableResultsSummary
- Returns:
- The date and time of the build.
-
createChangeListSummary
-
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
- Specified by:
getTestSummary
in interfaceImmutableResultsSummary
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ImmutableResultsSummary>
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
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:
-