Class AbstractResultsSummary
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.resultsummary.BaseResultSummary
com.atlassian.bamboo.resultsummary.AbstractResultsSummary
- All Implemented Interfaces:
BambooCustomDataAware,BambooIdProvider,BambooObject,Deletable,ImmutableDeletable,PlanResultKeyProvider,ImmutableResultsSummary,MutableBuildKeyResultsSummary,ResultsSummary,ResultStatisticsProvider,Cloneable,Comparable<ImmutableResultsSummary>
- Direct Known Subclasses:
BuildResultsSummaryImpl,ChainResultsSummaryImpl
@Entity
public abstract class AbstractResultsSummary
extends BaseResultSummary
implements ImmutableDeletable, Deletable, MutableBuildKeyResultsSummary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BuildStateprotected static final Supplier<CachedPlanManager> protected final io.atlassian.util.concurrent.ResettableLazyReference<List<VariableSubstitution>> protected final io.atlassian.util.concurrent.ResettableLazyReference<List<VariableContextSnapshot>> protected LifeCycleStateprotected booleanprotected booleanFields inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
DATE_FORMATFields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVariableContextItem(@NotNull VariableContextSnapshot variableContext) @NotNull List<ArtifactLink> Returns all artifacts associated with this build.The id of the latest agent that built the result@Nullable AgentTypeThe type of the latest agent that built the result@Nullable DateWhen the build was cancelledWhen the build finishedDate when build was passed to execution.@NotNull StringintGet build number@NotNull StringBuild state.@NotNull StringCustom data map to store random metadata about the buildThis method is not intended to be used outsideBuildResultsSummaryDaoGets theDeltaStateof the summary.longDuration of the build in millisecondsint@NotNull ImmutablePlanGets theImmutablePlanthat this result belongs directly belongs to.@NotNull Set<LinkedJiraIssue> Returns all the JIRA issues linked to this build resultTags / labels associated with the build@Nullable LongReturns the size of log associated with this result.@NotNull Optional<? extends ImmutablePlan> Gets theImmutablePlanthat this result directly belongs to.@NotNull PlanKeyFull key of the plan. e.g BAM-MAIN@NotNull StringlongDuration of actual build processing in milisecondsDate when build was queued.@NotNull List<RepositoryChangeset> intReturn the number of build restart attempts@NotNull Iterable<VariableContextSnapshot> @NotNull List<ConsumedSubscription> Returns list of consumed artifact dependenciesConsumedSubscription@NotNull List<VariableSubstitution> Returns immutable list of variables substituted during build execution@NotNull List<VariableSubstitution> since 7.0 for internal use only, useResultsSummaryVariableAccessorinstead@NotNull Set<TestClassResult> @NotNull TestResultsSummaryA stored version of how long (milli seconds) it took for this build to fix a failure.protected TriggerManager@NotNull TriggerReasonWhy the build was was triggered@Nullable VariableContextBaseline@NotNull List<VariableContextSnapshot> @NotNull List<VariableContextSnapshot> since 7.0 for internal use only, useResultsSummaryVariableAccessorinsteadintIncrements number of build restarts and returns the new valuebooleanIndicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UIbooleanIndicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuffbooleanIndicates that this result was rebuild via "re-run this build" action.booleanvoidresetTestClassResults(@NotNull List<TestClassResult> testClassResults) Overrides all current testClassResults with the new onesvoidsetArtifactLinks(List<ArtifactLink> artifactLinks) voidsetBuildAgentId(long buildAgentId) voidsetBuildAgentType(@Nullable AgentType agentType) Sets the build agent type.voidsetBuildCancelledDate(Date buildCancelledDate) voidsetBuildCompletedDate(Date buildCompletedDate) voidsetBuildDate(Date buildDate) voidsetBuildKey(String buildKey) voidsetBuildNumber(int buildNumber) voidsetBuildState(BuildState buildState) voidsetComments(List<Comment> comments) voidsetCustomBuild(boolean customBuild) voidsetCustomBuildData(Map<String, String> customBuildData) voidsetDeltaState(DeltaState deltaState) Sets theDeltaStatefor the summary.voidsetDiscriminator(String discriminator) voidsetDuration(long duration) voidsetFormatVersion(int formatVersion) voidsetJiraIssues(Set<LinkedJiraIssue> jiraIssues) voidsetLabellings(List<Labelling> labellings) voidsetLifeCycleState(LifeCycleState lifeCycleState) voidsetLogSize(@Nullable Long logSize) voidsetOnceOff(boolean onceOff) voidsetPlanKey(PlanKey planKey) voidsetPlanName(@NotNull String planName) voidsetProcessingDuration(long processingDuration) voidsetQueueTime(Date queueTime) voidsetRebuild(boolean rebuild) voidsetRestartCount(int restartCount) Sets number of build restarts.voidsetSpecsResult(boolean specsResult) voidsetStageResultId(Long stageResultId) voidsetSubscriptions(List<ConsumedSubscription> subscriptions) voidsetTestResultsSummary(@NotNull TestResultsSummary testResultsSummary) Set the test summary information from this buildvoidsetTimeToFix(Long timeToFix) A stored version of how long (milli seconds) it took for this build to fix a failure.voidsetTriggerReason(TriggerReason triggerReason) voidsetTriggerReasonKey(String triggerReasonKey) voidsetVariableContextBaseline(@Nullable VariableContextBaseline variableContextBaseline) protected voidsetVariableContextLogsEncrypted(List<VariableContextSnapshot> variableContextLogs) toString()voidupdateCustomDataEntry(@NotNull String key, @NotNull String value) Add or modify key value pair to Object's custom data map.voidSets format version to current Bamboo build number.voidupdateLifeCycleState(@NotNull LifeCycleState lifeCycleState, @NotNull BuildState buildState) Update lifeCycleState and buildState in one go.Methods inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
compareTo, createChangeListSummary, equals, getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getFixingJiraIssues, getJiraIssueKeys, getLabelNames, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getStatDate, getTestSummary, getUniqueAuthors, hasChanges, hashCode, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaitingMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setIdMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletionMethods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
isMarkedForDeletionMethods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getFixingJiraIssues, getFullPlanName, getImmutableChain, getJiraIssueKeys, getLabelNames, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getTestSummary, getUniqueAuthors, hasChanges, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isNotRunYet, isPending, isQueued, isSuccessful, isWaitingMethods inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanResultKeyMethods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getStatDate
-
Field Details
-
markedForDeletion
protected boolean markedForDeletion -
buildState
-
lifeCycleState
-
specsResult
protected boolean specsResult -
cachedPlanManagerRef
-
decryptedVariableContextLogsReference
protected final io.atlassian.util.concurrent.ResettableLazyReference<List<VariableContextSnapshot>> decryptedVariableContextLogsReference -
decryptedSubstitutedVariablesReference
protected final io.atlassian.util.concurrent.ResettableLazyReference<List<VariableSubstitution>> decryptedSubstitutedVariablesReference
-
-
Constructor Details
-
AbstractResultsSummary
public AbstractResultsSummary()
-
-
Method Details
-
getImmutablePlan
Description copied from interface:ResultsSummaryGets theImmutablePlanthat this result belongs directly belongs to. Since version 6.9 it is possible thatImmutableJobno longer exists but its results do, therefore it is recommended to useImmutableResultsSummary.getPlanIfExists()instead when operating on job results.- Specified by:
getImmutablePlanin interfaceImmutableResultsSummary- Specified by:
getImmutablePlanin interfaceResultsSummary- Returns:
- the owning plan for the result
-
getPlanIfExists
Description copied from interface:ImmutableResultsSummaryGets theImmutablePlanthat this result directly belongs to.- Specified by:
getPlanIfExistsin interfaceImmutableResultsSummary- Returns:
- the owning plan for the result or empty if id doesn't exist.
-
getBuildResultKey
- Specified by:
getBuildResultKeyin interfaceResultsSummary- Returns:
- full build result key e.g. BAM-MAIN-100
-
getBuildKey
- Specified by:
getBuildKeyin interfaceResultsSummary- Returns:
- full key of the plan. e.g BAM-MAIN
-
getPlanName
- Specified by:
getPlanNamein interfaceImmutableResultsSummary- Returns:
- short plan name
-
setPlanName
-
getReasonSummary
- Specified by:
getReasonSummaryin interfaceImmutableResultsSummary
-
setBuildKey
- Specified by:
setBuildKeyin interfaceMutableBuildKeyResultsSummary- Parameters:
buildKey-
-
getBuildNumber
public int getBuildNumber()Description copied from interface:ResultStatisticsProviderGet build number- Specified by:
getBuildNumberin interfaceResultStatisticsProvider- Returns:
- build number of the described build
-
setBuildNumber
public void setBuildNumber(int buildNumber) -
getBuildDate
Date when build was passed to execution. For chain result this date is set when the first job is started.- Specified by:
getBuildDatein interfaceResultStatisticsProvider- Returns:
-
setBuildDate
- Specified by:
setBuildDatein interfaceResultsSummary- Parameters:
buildDate-
-
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.- Specified by:
getQueueTimein interfaceImmutableResultsSummary- Returns:
-
setQueueTime
- Specified by:
setQueueTimein interfaceResultsSummary- Parameters:
queueTime-
-
getBuildCompletedDate
Description copied from interface:ImmutableResultsSummaryWhen the build finished- Specified by:
getBuildCompletedDatein interfaceImmutableResultsSummary- Returns:
-
setBuildCompletedDate
- Specified by:
setBuildCompletedDatein interfaceResultsSummary
-
getDeltaState
Description copied from interface:ImmutableResultsSummaryGets theDeltaStateof the summary. It can be a build that fixes, breaks, failing, successful. Provides a status relative to the previous summary.- Specified by:
getDeltaStatein interfaceImmutableResultsSummary- Returns:
-
setDeltaState
Description copied from interface:ResultsSummarySets theDeltaStatefor the summary. Provides a status relative to the previous summary.- Specified by:
setDeltaStatein interfaceResultsSummary- Parameters:
deltaState- - the relative status for this summary
-
isOnceOff
public boolean isOnceOff()Description copied from interface:ImmutableResultsSummaryIndicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff- Specified by:
isOnceOffin interfaceImmutableResultsSummary- Returns:
-
setOnceOff
public void setOnceOff(boolean onceOff) - Specified by:
setOnceOffin interfaceResultsSummary
-
isCustomBuild
public boolean isCustomBuild()Description copied from interface:ImmutableResultsSummaryIndicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI- Specified by:
isCustomBuildin interfaceImmutableResultsSummary- Returns:
-
setCustomBuild
public void setCustomBuild(boolean customBuild) - Specified by:
setCustomBuildin interfaceResultsSummary
-
isRebuild
public boolean isRebuild()Description copied from interface:ImmutableResultsSummaryIndicates that this result was rebuild via "re-run this build" action.- Specified by:
isRebuildin interfaceImmutableResultsSummary- Returns:
-
setRebuild
public void setRebuild(boolean rebuild) - Specified by:
setRebuildin interfaceResultsSummary
-
getLogSize
Description copied from interface:ImmutableResultsSummaryReturns the size of log associated with this result.For a
BuildResultsSummarythis method will return size of the log produced by theJob.For a
ChainResultsSummarythe returned value will be equal to the maximum log size produced by thisChain'sJobs.- Specified by:
getLogSizein interfaceImmutableResultsSummary- Returns:
- the log size or null, if the value is not known
-
setLogSize
Description copied from interface:ResultsSummarySets the size of the log file associated with this result, eg. size of the log produced by aJobor largest log produced byChain'sJobs.- Specified by:
setLogSizein interfaceResultsSummary- Parameters:
logSize- size of the largest log associated with the result (use null if unknown)
-
getJiraIssues
Description copied from interface:ImmutableResultsSummaryReturns all the JIRA issues linked to this build result- Specified by:
getJiraIssuesin interfaceImmutableResultsSummary- Returns:
-
setJiraIssues
-
getCustomBuildData
Description copied from interface:ImmutableResultsSummaryCustom data map to store random metadata about the build- Specified by:
getCustomBuildDatain interfaceImmutableResultsSummary- Returns:
-
setCustomBuildData
-
updateCustomDataEntry
Description copied from interface:BambooCustomDataAwareAdd or modify key value pair to Object's custom data map.- Specified by:
updateCustomDataEntryin interfaceBambooCustomDataAware- Parameters:
key- key to addvalue- value to add
-
getTimeToFix
Description copied from interface:ImmutableResultsSummaryA stored version of how long (milli seconds) it took for this build to fix a failure.- Specified by:
getTimeToFixin interfaceImmutableResultsSummary- Returns:
- Null if not a fixing build
-
setTimeToFix
Description copied from interface:ResultsSummaryA stored version of how long (milli seconds) it took for this build to fix a failure.- Specified by:
setTimeToFixin interfaceResultsSummary- Parameters:
timeToFix- how long (milli seconds) it took for this build to fix a failure.
-
getLabellings
Description copied from interface:ImmutableResultsSummaryTags / labels associated with the build- Specified by:
getLabellingsin interfaceImmutableResultsSummary- Returns:
-
setLabellings
-
setComments
-
getArtifactLinks
Description copied from interface:ImmutableResultsSummaryReturns all artifacts associated with this build. Even if the files don't exist- Specified by:
getArtifactLinksin interfaceImmutableResultsSummary- Returns:
-
setArtifactLinks
-
getSubscriptions
Description copied from interface:ImmutableResultsSummaryReturns list of consumed artifact dependenciesConsumedSubscription- Specified by:
getSubscriptionsin interfaceImmutableResultsSummary- Returns:
-
setSubscriptions
-
getTriggerReasonKey
-
setTriggerReasonKey
-
getTriggerReason
Description copied from interface:ImmutableResultsSummaryWhy the build was was triggered- Specified by:
getTriggerReasonin interfaceImmutableResultsSummary
-
setTriggerReason
- Specified by:
setTriggerReasonin interfaceResultsSummary
-
getBuildAgentId
Description copied from interface:ImmutableResultsSummaryThe id of the latest agent that built the result- Specified by:
getBuildAgentIdin interfaceImmutableResultsSummary- Returns:
- Null if no agents involved or unknown
-
getBuildAgentType
Description copied from interface:ImmutableResultsSummaryThe type of the latest agent that built the result- Specified by:
getBuildAgentTypein interfaceImmutableResultsSummary- Returns:
- Null if no agents involved or unknown
-
setBuildAgentId
public void setBuildAgentId(long buildAgentId) - Specified by:
setBuildAgentIdin interfaceResultsSummary
-
setBuildAgentType
Description copied from interface:ResultsSummarySets the build agent type.- Specified by:
setBuildAgentTypein interfaceResultsSummary
-
getDuration
public long getDuration()Description copied from interface:ImmutableResultsSummaryDuration of the build in milliseconds- Specified by:
getDurationin interfaceImmutableResultsSummary- Specified by:
getDurationin interfaceResultStatisticsProvider- Returns:
-
setDuration
public void setDuration(long duration) - Specified by:
setDurationin interfaceResultsSummary- Parameters:
duration- duration of the build in milliseconds
-
getProcessingDuration
public long getProcessingDuration()Description copied from interface:ImmutableResultsSummaryDuration of actual build processing in miliseconds- Specified by:
getProcessingDurationin interfaceImmutableResultsSummary- Specified by:
getProcessingDurationin interfaceResultStatisticsProvider- Returns:
-
setProcessingDuration
public void setProcessingDuration(long processingDuration) - Specified by:
setProcessingDurationin interfaceResultsSummary- Parameters:
processingDuration-
-
getBuildCancelledDate
Description copied from interface:ImmutableResultsSummaryWhen the build was cancelled- Specified by:
getBuildCancelledDatein interfaceImmutableResultsSummary- Returns:
- date of build cancellation or null if build was not cancelled
-
setBuildCancelledDate
- Specified by:
setBuildCancelledDatein interfaceResultsSummary
-
getChangesListSummary
- Specified by:
getChangesListSummaryin interfaceImmutableResultsSummary
-
getTriggerManager
- Specified by:
getTriggerManagerin classBaseResultSummary
-
getBuildState
Description copied from interface:ResultStatisticsProviderBuild state.- Specified by:
getBuildStatein interfaceResultStatisticsProvider- Returns:
- build state
-
setBuildState
-
getLifeCycleState
- Specified by:
getLifeCycleStatein interfaceImmutableResultsSummary
-
setLifeCycleState
-
updateLifeCycleState
public void updateLifeCycleState(@NotNull @NotNull LifeCycleState lifeCycleState, @NotNull @NotNull BuildState buildState) Description copied from interface:ResultsSummaryUpdate lifeCycleState and buildState in one go. Can throw IllegalArgumentException when values passed make no sense: - lifeCycleState == LifeCycleState.NOT_BUILT && buildState != BuildState.UNKNOWN- Specified by:
updateLifeCycleStatein interfaceResultsSummary- Parameters:
lifeCycleState- lifeCycleState to be setbuildState- buildState to be set
-
getDiscriminator
-
setDiscriminator
-
getRepositoryChangesets
- Specified by:
getRepositoryChangesetsin interfaceImmutableResultsSummary
-
getSubstitutedVariables
Description copied from interface:ImmutableResultsSummaryReturns immutable list of variables substituted during build execution- Specified by:
getSubstitutedVariablesin interfaceImmutableResultsSummary
-
getSubstitutedVariablesEncrypted
Description copied from interface:ResultsSummarysince 7.0 for internal use only, useResultsSummaryVariableAccessorinstead- Specified by:
getSubstitutedVariablesEncryptedin interfaceResultsSummary
-
getVariableContextLogs
- Specified by:
getVariableContextLogsin interfaceImmutableResultsSummary
-
getVariableContextLogsEncrypted
Description copied from interface:ResultsSummarysince 7.0 for internal use only, useResultsSummaryVariableAccessorinstead- Specified by:
getVariableContextLogsEncryptedin interfaceResultsSummary
-
setVariableContextLogsEncrypted
-
addVariableContextItem
- Specified by:
addVariableContextItemin interfaceResultsSummary
-
getResultVariables
-
getVariableContextBaselineId
- Specified by:
getVariableContextBaselineIdin interfaceResultsSummary
-
setVariableContextBaseline
public void setVariableContextBaseline(@Nullable @Nullable VariableContextBaseline variableContextBaseline) -
getVariableContextBaseline
-
getTestResultsSummary
- Specified by:
getTestResultsSummaryin interfaceImmutableResultsSummary- Returns:
- a summary of all the tests that ran in this build.
-
setTestResultsSummary
Description copied from interface:ResultsSummarySet the test summary information from this build- Specified by:
setTestResultsSummaryin interfaceResultsSummary- Parameters:
testResultsSummary- the test summary information
-
getTestClassResults
-
resetTestClassResults
Description copied from interface:ResultsSummaryOverrides all current testClassResults with the new ones- Specified by:
resetTestClassResultsin interfaceResultsSummary- Parameters:
testClassResults- to set
-
getCustomBuildDataRows
This method is not intended to be used outsideBuildResultsSummaryDao- Returns:
-
getStageResultId
-
setStageResultId
-
getRestartCount
public int getRestartCount()Description copied from interface:ImmutableResultsSummaryReturn the number of build restart attempts- Specified by:
getRestartCountin interfaceImmutableResultsSummary- Returns:
-
incrementRestartCount
public int incrementRestartCount()Description copied from interface:ResultsSummaryIncrements number of build restarts and returns the new value- Specified by:
incrementRestartCountin interfaceResultsSummary
-
setRestartCount
public void setRestartCount(int restartCount) Description copied from interface:ResultsSummarySets number of build restarts.- Specified by:
setRestartCountin interfaceResultsSummary
-
getPlanKey
Description copied from interface:ImmutableResultsSummaryFull key of the plan. e.g BAM-MAIN- Specified by:
getPlanKeyin interfaceImmutableResultsSummary
-
setPlanKey
- Specified by:
setPlanKeyin interfaceMutableBuildKeyResultsSummary
-
getFormatVersion
public int getFormatVersion()- Specified by:
getFormatVersionin interfaceResultsSummary- Returns:
- build number of Bamboo version in which this result was created
-
updateFormatVersion
public void updateFormatVersion()Description copied from interface:ResultsSummarySets format version to current Bamboo build number.- Specified by:
updateFormatVersionin interfaceResultsSummary
-
setFormatVersion
public void setFormatVersion(int formatVersion) -
setSpecsResult
public void setSpecsResult(boolean specsResult) -
isSpecsResult
public boolean isSpecsResult() -
toString
-