com.atlassian.bamboo.index.buildresult
Class ChainResultsSummaryDocument

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.resultsummary.BaseResultSummary
              extended by com.atlassian.bamboo.resultsummary.AbstractResultsSummary
                  extended by com.atlassian.bamboo.index.buildresult.BuildResultsSummaryDocument
                      extended by com.atlassian.bamboo.index.buildresult.ChainResultsSummaryDocument
All Implemented Interfaces:
ChainResultsSummary, ImmutableChainResultsSummary, BambooCustomDataAware, BambooIdProvider, BambooObject, Deletable, ImmutableDeletable, PlanResultKeyProvider, BuildResultsSummary, ImmutableResultsSummary, MutableBuildKeyResultsSummary, ResultsSummary, ResultStatisticsProvider, Cloneable, Comparable<ImmutableResultsSummary>

public class ChainResultsSummaryDocument
extends BuildResultsSummaryDocument
implements ChainResultsSummary


Field Summary
static IndexedEntityIntegerField FIELD_FIXED_IN
           
static IndexedEntityLongField FIELD_QUEUE_DURATION
           
static IndexedEntityLongField FIELD_VCS_UPDATE_DURATION
           
 
Fields inherited from class com.atlassian.bamboo.index.buildresult.BuildResultsSummaryDocument
CUSTOM_DATA_MAP_KEYS_TO_INDEX, DOCTYPE_BUILD_RESULT, FIELD_ARTIFACTS, FIELD_AUTHORS, FIELD_AUTHORS_LINKED_USER_SUFFIX, FIELD_BUILD_AGENT_ID, FIELD_BUILD_ID, FIELD_BUILD_KEY, FIELD_BUILD_NUMBER, FIELD_BUILD_RESULT_ID, FIELD_COMPLETED_TIMESTAMP, FIELD_CUSTOM_DATA_PREFIX, FIELD_DELTA_STATE, FIELD_DOC_TYPE, FIELD_DURATION, FIELD_ID, FIELD_JIRA_ISSUE_KEY, FIELD_JIRA_ISSUE_KEY_FIXES, FIELD_JIRA_PROJECT_KEY, FIELD_LABELS, FIELD_LIFE_CYCLE_STATE, FIELD_PERMISSION_PLAN_ID, FIELD_QUEUE_TIME, FIELD_STATE, FIELD_TIMESTAMP, FIELD_TRIGGER_REASON_KEY, FIELD_TYPE, FIELD_VCS_REVISION_KEY, FIELD_VCS_UPDATE_TIME
 
Fields inherited from class com.atlassian.bamboo.resultsummary.AbstractResultsSummary
buildState, cachedPlanManagerRef, lifeCycleState, markedForDeletion, planManagerRef
 
Fields inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
DATE_FORMAT
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
 
Fields inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanKey
 
Constructor Summary
ChainResultsSummaryDocument(org.apache.lucene.document.Document doc, ResultsSummaryManager resultsSummaryManager)
           
 
Method Summary
 boolean addStageResult(ChainStageResult chainStageResult)
          Add a stage result
 ChainStageResult createStageResult(ImmutableChainStage chainStage)
          Create a new ChainStageResult and associates it with the ChainResultsSummary
 List<BuildResultsSummary> getFailedJobResults()
          Get a list of all failed job Results in this chain result
 Integer getFixedInResult()
          Get build result that this build was fixed in.
 ImmutableChain getImmutablePlan()
          Gets the Plan that this result belongs directly belongs to
 MergeResultSummary getMergeResult()
          Note: this API is experimental.
 List<ResultsSummary> getOrderedJobResultSummaries()
          Returns all jobs ResultsSummary related to chain result summary Summaries are ordered by stages
 Chain getPlan()
          Gets the Plan that this result belongs directly belongs to
 long getQueueDuration()
          Chain document stores this precalculated value for use in reports
 List<ChainStageResult> getStageResults()
          Get all the ChainStageResult's associated with this ChainResultsSummary
 FilteredTestResults<TestClassResultDescriptor> getTestResults()
          Get the helper class to provide filtered test lists for this chain result
 int getTotalJobCount()
           
 long getVcsUpdateDuration()
          Chain document stores this precalculated value for use in reports
 boolean isContinuable()
          Indicates that Chain execution has been stopped on manual stage and is waiting for user action
 boolean isRestartable()
          Indicates that Chain execution has been failed and could be restarted from failure place
 boolean removeStageResult(ChainStageResult chainStageResult)
          Remove a stage result
 void setContinuable(boolean chainContinuable)
           
 void setFixedInResult(Integer fixedInBuild)
          Set the result that this result was fixed in.
 void setMergeResult(MergeResultSummary mergeResult)
          Note: this API is experimental.
 
Methods inherited from class com.atlassian.bamboo.index.buildresult.BuildResultsSummaryDocument
compareTo, equals, getArtifactLinks, getChainResultsSummary, getExtraBuildResultsData, getFilteredTestResults, getJiraIssueKeys, getJiraIssues, getLabellings, getLabelNames, getProducedArtifactLinks, getQueueTime, getUniqueAuthors, getVcsUpdateTime, hashCode, isMarkedForDeletion, isNotRunYet, resetTestClassResults, setChainResultsSummary, setMarkedForDeletion, setQueueTime, setVcsUpdateTime
 
Methods inherited from class com.atlassian.bamboo.resultsummary.AbstractResultsSummary
getBuildAgentId, getBuildCancelledDate, getBuildCompletedDate, getBuildDate, getBuildKey, getBuildNumber, getBuildResultKey, getBuildState, getChangesListSummary, getComments, getCustomBuildData, getCustomBuildDataRows, getDeltaState, getDiscriminator, getDuration, getFormatVersion, getLifeCycleState, getLogSize, getPlanKey, getProcessingDuration, getReasonSummary, getRepositoryChangesets, getRestartCount, getResultVariables, getStageResultId, getSubscriptions, getSubstitutedVariables, getTestClassResults, getTestResultsSummary, getTimeToFix, getTriggerManager, getTriggerReason, getTriggerReasonKey, getVariableContext, getVariableContextBaseline, getVariableContextLogs, incrementRestartCount, isCustomBuild, isOnceOff, isRebuild, setArtifactLinks, setBuildAgentId, setBuildCancelledDate, setBuildCompletedDate, setBuildDate, setBuildKey, setBuildNumber, setBuildState, setComments, setCustomBuild, setCustomBuildData, setDeltaState, setDiscriminator, setDuration, setFormatVersion, setJiraIssues, setLabellings, setLifeCycleState, setLogSize, setOnceOff, setPlanKey, setProcessingDuration, setRebuild, setRestartCount, setStageResultId, setSubscriptions, setSubstitutedVariables, setTestResultsSummary, setTimeToFix, setTriggerReason, setTriggerReasonKey, setVariableContextBaseline, setVariableContextLogs, updateCustomDataEntry, updateFormatVersion, updateLifeCycleState
 
Methods inherited from class com.atlassian.bamboo.resultsummary.BaseResultSummary
createChangeListSummary, getArtifactLinksThatExist, getBuildTime, getCommits, getDurationDescription, getFixingJiraIssues, getManuallyOverriddenVariables, getPlanResultKey, getProcessingDurationDescription, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getShortReasonSummary, getStatDate, getTestSummary, hasChanges, hasComments, isActive, isFailed, isFinalized, isFinished, isInProgress, isNotBuilt, isPending, isQueued, isSuccessful, isWaiting
 
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.ResultsSummary
getBuildKey, getBuildResultKey, getFormatVersion, getVariableContextBaseline, incrementRestartCount, resetTestClassResults, setBuildAgentId, setBuildCancelledDate, setBuildCompletedDate, setBuildDate, setCustomBuild, setDeltaState, setDuration, setLogSize, setOnceOff, setProcessingDuration, setQueueTime, setRebuild, setTestResultsSummary, setTimeToFix, setTriggerReason, setVariableContextBaseline, updateFormatVersion, updateLifeCycleState
 
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
isMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinks, getArtifactLinksThatExist, getBuildAgentId, getBuildCancelledDate, getBuildCompletedDate, getBuildTime, getChangesListSummary, getComments, getCommits, getCustomBuildData, getDeltaState, getDuration, getDurationDescription, getFixingJiraIssues, getJiraIssueKeys, getJiraIssues, getLabellings, getLabelNames, getLifeCycleState, getLogSize, getManuallyOverriddenVariables, getPlanKey, getPlanResultKey, getProcessingDuration, getProcessingDurationDescription, getQueueTime, getReasonSummary, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getRepositoryChangesets, getRestartCount, getShortReasonSummary, getSubscriptions, getSubstitutedVariables, getTestResultsSummary, getTestSummary, getTimeToFix, getTriggerReason, getUniqueAuthors, getVariableContext, getVariableContextLogs, hasChanges, hasComments, isActive, isCustomBuild, isFailed, isFinished, isInProgress, isNotBuilt, isNotRunYet, isOnceOff, isPending, isQueued, isRebuild, isSuccessful, isWaiting
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getStatDate
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.atlassian.bamboo.core.BambooCustomDataAware
updateCustomDataEntry
 
Methods inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanResultKey
 
Methods inherited from interface com.atlassian.bamboo.resultsummary.BuildResultsSummary
getResultVariables
 

Field Detail

FIELD_FIXED_IN

public static final IndexedEntityIntegerField FIELD_FIXED_IN

FIELD_QUEUE_DURATION

public static final IndexedEntityLongField FIELD_QUEUE_DURATION

FIELD_VCS_UPDATE_DURATION

public static final IndexedEntityLongField FIELD_VCS_UPDATE_DURATION
Constructor Detail

ChainResultsSummaryDocument

public ChainResultsSummaryDocument(org.apache.lucene.document.Document doc,
                                   @NotNull
                                   ResultsSummaryManager resultsSummaryManager)
Method Detail

getImmutablePlan

@NotNull
public ImmutableChain getImmutablePlan()
Description copied from interface: ResultsSummary
Gets the Plan that this result belongs directly belongs to

Specified by:
getImmutablePlan in interface ChainResultsSummary
Specified by:
getImmutablePlan in interface ImmutableResultsSummary
Specified by:
getImmutablePlan in interface ResultsSummary
Overrides:
getImmutablePlan in class AbstractResultsSummary
Returns:
the owning plan for the result

getPlan

@NotNull
public Chain getPlan()
Description copied from interface: ResultsSummary
Gets the Plan that this result belongs directly belongs to

Specified by:
getPlan in interface ChainResultsSummary
Specified by:
getPlan in interface ImmutableResultsSummary
Specified by:
getPlan in interface ResultsSummary
Overrides:
getPlan in class AbstractResultsSummary
Returns:
the owning plan for the result

getStageResults

@NotNull
public List<ChainStageResult> getStageResults()
Description copied from interface: ImmutableChainResultsSummary
Get all the ChainStageResult's associated with this ChainResultsSummary

Specified by:
getStageResults in interface ImmutableChainResultsSummary
Returns:
results

createStageResult

@NotNull
public ChainStageResult createStageResult(@NotNull
                                                  ImmutableChainStage chainStage)
Description copied from interface: ChainResultsSummary
Create a new ChainStageResult and associates it with the ChainResultsSummary

Specified by:
createStageResult in interface ChainResultsSummary
Parameters:
chainStage - the Stage related to result
Returns:
chainStageResult

addStageResult

public boolean addStageResult(@NotNull
                              ChainStageResult chainStageResult)
Description copied from interface: ChainResultsSummary
Add a stage result

Specified by:
addStageResult in interface ChainResultsSummary
Returns:
success

removeStageResult

public boolean removeStageResult(@NotNull
                                 ChainStageResult chainStageResult)
Description copied from interface: ChainResultsSummary
Remove a stage result

Specified by:
removeStageResult in interface ChainResultsSummary
Returns:
success

getFailedJobResults

@NotNull
public List<BuildResultsSummary> getFailedJobResults()
Description copied from interface: ImmutableChainResultsSummary
Get a list of all failed job Results in this chain result

Specified by:
getFailedJobResults in interface ImmutableChainResultsSummary
Returns:
a list of all failed job Results in this chain result

getTotalJobCount

public int getTotalJobCount()
Specified by:
getTotalJobCount in interface ImmutableChainResultsSummary
Returns:
how many job results exist

getOrderedJobResultSummaries

@NotNull
public List<ResultsSummary> getOrderedJobResultSummaries()
Description copied from interface: ImmutableChainResultsSummary
Returns all jobs ResultsSummary related to chain result summary Summaries are ordered by stages

Specified by:
getOrderedJobResultSummaries in interface ImmutableChainResultsSummary
Returns:

isContinuable

public boolean isContinuable()
Description copied from interface: ImmutableChainResultsSummary
Indicates that Chain execution has been stopped on manual stage and is waiting for user action

Specified by:
isContinuable in interface ImmutableChainResultsSummary
Returns:

setContinuable

public void setContinuable(boolean chainContinuable)
Specified by:
setContinuable in interface ChainResultsSummary

isRestartable

public boolean isRestartable()
Description copied from interface: ImmutableChainResultsSummary
Indicates that Chain execution has been failed and could be restarted from failure place

Specified by:
isRestartable in interface ImmutableChainResultsSummary
Returns:

getFixedInResult

public Integer getFixedInResult()
Description copied from interface: ImmutableChainResultsSummary
Get build result that this build was fixed in. If the build is succussful it will be null. If there is no successful build after this it will also be null. If the fixed in build is deleted. This will still reference the deleted result.

Specified by:
getFixedInResult in interface ImmutableChainResultsSummary
Returns:

setFixedInResult

public void setFixedInResult(Integer fixedInBuild)
Description copied from interface: ChainResultsSummary
Set the result that this result was fixed in.

Specified by:
setFixedInResult in interface ChainResultsSummary

getTestResults

public FilteredTestResults<TestClassResultDescriptor> getTestResults()
Description copied from interface: ImmutableChainResultsSummary
Get the helper class to provide filtered test lists for this chain result

Specified by:
getTestResults in interface ImmutableChainResultsSummary
Returns:
helper class to provide filtered test lists for this chain result, null if the chain is still being built

getMergeResult

public MergeResultSummary getMergeResult()
Description copied from interface: ImmutableChainResultsSummary
Note: this API is experimental.

Specified by:
getMergeResult in interface ImmutableChainResultsSummary

setMergeResult

public void setMergeResult(@Nullable
                           MergeResultSummary mergeResult)
Description copied from interface: ChainResultsSummary
Note: this API is experimental.

Specified by:
setMergeResult in interface ChainResultsSummary

getQueueDuration

public long getQueueDuration()
Chain document stores this precalculated value for use in reports

Specified by:
getQueueDuration in interface BuildResultsSummary
Overrides:
getQueueDuration in class BuildResultsSummaryDocument
Returns:

getVcsUpdateDuration

public long getVcsUpdateDuration()
Chain document stores this precalculated value for use in reports

Specified by:
getVcsUpdateDuration in interface BuildResultsSummary
Overrides:
getVcsUpdateDuration in class BuildResultsSummaryDocument
Returns:


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.