@PublicApi
public interface ResultsSummaryManager
ResultsSummary derivatives that supersedes BuildResultsSummaryManager| Modifier and Type | Method and Description | 
|---|---|
void | 
addVariableContextSnapshotToResultSummary(@NotNull ResultsSummary resultsSummary,
                                         @NotNull VariableContext variableContext)
Adds state of global and plan variables to result at the beginning of execution. 
 | 
void | 
calculateAndSetDeltaState(ResultsSummary resultsSummary)
Figures out the delta state for the provided results summary, if a 'fixing' build
 will also calculate how long it took to fix. 
 | 
@Nullable Long | 
calculateQueueDuration(@NotNull ChainResultsSummary resultsSummary)
Calculates queueDuration value for a chain result as a maximum value of (vcsUpdateTime - queueTime) for all related job results. 
 | 
@Nullable Long | 
calculateVcsUpdateDuration(@NotNull ChainResultsSummary resultsSummary)
Calculates vcsUpdateDuration value for a chain result as a maximum value of (buildDate - vcsUpdateTime) for all related job results. 
 | 
void | 
cleanPendingLifeCycleState(@NotNull PlanResultKey planResultKey)
Cleans state of pending result. 
 | 
void | 
clearVariablesOnRerunBuild(@NotNull ResultsSummary resultSummary)
Clear stored stage manual variables when build is fully rerun. 
 | 
int | 
countResultsWithState(@NotNull PlanKey planKey,
                     int lowerBuildNumber,
                     int upperBuildNumber,
                     @NotNull BuildState buildState)
Counts results with a given state in a given build number range for plan. 
 | 
<T extends ResultsSummary> | 
createResultsSummary(@NotNull BuildContext buildContext,
                    @NotNull Class<T> aClass)
Creates a  
ResultsSummary of the given Class | 
@NotNull List<Integer> | 
findAllBuildResultsNumbers(PlanKey planKey)  | 
@NotNull Range<Integer> | 
findBuildResultNumbersRange(@NotNull PlanKey planKey)
Finds minimum and maximum build number for a plan. 
 | 
@NotNull List<PlanResultKey> | 
findChainResultsWithFormatVersionLessThan(int formatVersion,
                                         int maxResults)
Deprecated. 
 
internal use only 
 | 
List<ChainResultsSummary> | 
findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
                               List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels. 
 | 
@Nullable ResultsSummary | 
findFirstFailedBuildResultAfter(@NotNull String buildKey,
                               int buildNumber)
Finds the first failed  
ResultsSummary after buildNumber | 
@Nullable ResultsSummary | 
findFirstFailedBuildResultBetween(@NotNull ImmutablePlan build,
                                 int lowerBuildNumber,
                                 int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively. 
 | 
@Nullable ResultsSummary | 
findFirstFailedBuildResultBetween(@NotNull PlanKey planKey,
                                 int lowerBuildNumber,
                                 int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively.* 
 | 
<T extends ResultsSummary> | 
findFirstResultAfter(@NotNull PlanResultKey planResultKey,
                    Class<T> aClass)
Finds the first  
ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. | 
@Nullable ResultsSummary | 
findFirstSuccessfulBuildResultAfter(@NotNull PlanResultKey planResultKey)
Finds the last successful  
ResultsSummary after buildNumber | 
@NotNull List<LinkedJiraIssue> | 
findJiraIssuesForPlanKey(@NotNull PlanKey planKey)
Retrieves a list of  
LinkedJiraIssue linked to the given plan key | 
@NotNull List<LinkedJiraIssue> | 
findJiraIssuesForResults(@NotNull List<ResultsSummary> buildResults)
Retrieves a list of  
LinkedJiraIssue linked to the given build result summaries | 
@NotNull List<PlanKey> | 
findJobKeysFromExistingChainResults(@NotNull PlanKey chainKey)
Find keys of jobs for which results associated with given plan exist. 
 | 
@Nullable ResultsSummary | 
findLastBuildResultBefore(@NotNull String buildKey,
                         int buildNumber)
Finds the last successful or failing  
BuildResultsSummary before buildNumber | 
<T extends ResultsSummary> | 
findLastBuildResultBeforeWithTests(@NotNull PlanResultKey planResultKey,
                                  @NotNull Class<T> aClass,
                                  boolean includeOnceOffBuilds)
Finds the last successful or failing  
BuildResultsSummary before buildNumber | 
@Nullable ResultsSummary | 
findLastFailingBuildResultBefore(@NotNull ImmutablePlan build,
                                int buildNumber)
Finds the last failing  
ResultsSummary before buildNumber | 
@Nullable ResultsSummary | 
findLastFailingBuildResultBefore(@NotNull PlanKey planKey,
                                int buildNumber)
Finds the last failing  
ResultsSummary before buildNumber | 
<T extends ResultsSummary> | 
findLastResultBefore(@NotNull PlanResultKey planResultKey,
                    Class<T> aClass)
Finds the last successful or failing  
ResultsSummary before planResultKey.getBuildNumber | 
<T extends ResultsSummary> | 
findLastResultBefore(@NotNull PlanResultKey planResultKey,
                    Class<T> aClass,
                    boolean includeOnceOffBuilds)
Finds the last  
ResultsSummary before planResultKey.getBuildNumber | 
<T extends ResultsSummary> | 
findLastResultSummaryWithState(@NotNull PlanKey planKey,
                              @NotNull BuildState buildState,
                              @NotNull Class<T> aClass)  | 
<T extends ResultsSummary> | 
findLastResultSummaryWithState(@NotNull PlanKey planKey,
                              @NotNull BuildState buildState,
                              @NotNull Class<T> aClass,
                              boolean ignoreSpecsResults)  | 
@Nullable ResultsSummary | 
findLastSuccessfulBuildResultBefore(@NotNull PlanResultKey planResultKey)
Finds the last successful  
ResultsSummary before build | 
@Nullable ResultsSummary | 
findLastSuccessfulBuildResultBefore(@NotNull PlanResultKey planResultKey,
                                   boolean includeOnceOffBuilds)
Finds the last successful  
ResultsSummary before build | 
int | 
findMinimumBuildNumberForNLatest(@NotNull PlanKey planKey,
                                int n)
Find a build number for which exist n non-specs results with a build number greater or equal. 
 | 
@NotNull List<? extends ResultsSummary> | 
findResultsSummariesByJiraIssues(@Nullable List<String> issueKeys)
Finds a list of results which are linked to the given issue keys 
 | 
@NotNull List<? extends ResultsSummary> | 
findResultsSummariesByProjectKey(@Nullable String projectKey)
Provide a list of results which are linked to any issues under the given jira project key 
 | 
@NotNull List<ResultsSummary> | 
getAfterSummaries(@NotNull ImmutablePlan plan,
                 int buildNumber,
                 int maxCount)
Returns all the  
ResultsSummary objects that represent build results strictly after the given build number. | 
<T extends ResultsSummary> | 
getAllActiveResultSummariesForPlan(PlanKey planKey,
                                  Class<T> aClass)
Returns all the  
ResultsSummary in a LifeCycleState.IN_PROGRESS state | 
<T extends ResultsSummary> | 
getAllBuildResultSummariesInUnknownState(Class<T> aClass)
Returns all the  
BuildResultsSummary in a BuildState.UNKNOWN
 state | 
<T extends ResultsSummary> | 
getAllInProgressResultSummaries(Class<T> aClass)
Returns all the  
ResultsSummary in a LifeCycleState.IN_PROGRESS state | 
<T extends ResultsSummary> | 
getAllPendingResultSummaries(Class<T> aClass)
Returns all the  
ResultsSummary in a LifeCycleState.PENDING state | 
<T extends ResultsSummary> | 
getAllQueuedResultSummaries(Class<T> aClass)
Returns all the  
ResultsSummary in a LifeCycleState.QUEUED state | 
<T extends ResultsSummary> | 
getAnyResultSummary(@NotNull ResultsSummaryCriteria criteria,
                   ResultDataRead dataRead)
Generic search to find any result summary basing on the criteria provided. 
 | 
long | 
getAveragePlanExecutionDuration(@NotNull ImmutablePlan plan,
                               int numberOfResults)
Get average duration from n last results summaries in finished state for a plan. 
 | 
@NotNull List<ResultsSummary> | 
getBeforeSummaries(@NotNull ImmutablePlan plan,
                  int buildNumber,
                  int maxCount)
Returns all the  
ResultsSummary objects that represent build results strictly before the given build number. | 
@Nullable ResultsSummary | 
getBreakingBuild(ResultsSummary buildResultsSummary)
Returns the first failing build after the last successful build. 
 | 
@Nullable ChainStageResult | 
getChainStageResultById(@NotNull Long id)
Returns a  
ChainStageResult by its id | 
@NotNull List<UnassociatedCommit> | 
getCommitsForUser(@NotNull String username,
                 int max)
Retrieve a list of recent Commits for the given user. 
 | 
<T extends ResultsSummary> | 
getFinalizedResultSummariesForPlan(PlanKey planKey,
                                  Class<T> aClass,
                                  int firstResult,
                                  int maxResults)
Returns all the  
ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class. | 
@Nullable ResultsSummary | 
getFixingBuild(ResultsSummary buildResultsSummary)
Returns the first successful  
ResultsSummary for given ResultsSummary. | 
@NotNull List<ResultsSummary> | 
getLastNFailedResultsSummaries(@NotNull PlanIdentifier planIdentifier,
                              int numberOfResults)
Returns the most recent n failed build results. 
 | 
default @NotNull List<ResultsSummary> | 
getLastNFailedResultsSummaries(@NotNull Plan build,
                              int numberOfResults)
Deprecated. 
 
since 8.2.0. Use  
getLastNFailedResultsSummaries(PlanIdentifier, int) | 
default @NotNull List<ResultsSummary> | 
getLastNResultsSummaries(@NotNull ImmutablePlan plan,
                        int numberOfResults)
Deprecated. 
 
since 8.2.0. Use  
getLastNResultsSummaries(PlanIdentifier, int) | 
@NotNull List<ResultsSummary> | 
getLastNResultsSummaries(@NotNull PlanIdentifier planIdentifier,
                        int numberOfResults)
Provides a list of the latest N results summaries for the given plan, newest first. 
 | 
<T extends ResultsSummary> | 
getLastResultsSummary(@NotNull String planKey,
                     Class<T> aClass)
Get the last  
ResultsSummary for planKey and Class | 
<T extends ResultsSummary> | 
getLastResultsSummary(@NotNull String planKey,
                     Class<T> aClass,
                     boolean ignoreSpecsResults)
Get the last  
ResultsSummary for planKey and Class with possible skip of specs results. | 
@Nullable ResultsSummary | 
getLastSuccessfulResultSummary(@NotNull PlanKey planKey)
Get the last successful  
ResultsSummary for planKey | 
List<ResultsSummary> | 
getLatestFailedResultSummaries()
Retrieve list of failed build results (for all builds) in the last few days (number of days is specified in the
 DAO) This method is filtered to remove results that user doesn't have permission to see 
 | 
List<ResultsSummary> | 
getLatestResultSummaries()
Retrieve list of build results (for all builds) in the last few days (number of days is specified in the DAO)
 This method is filtered to remove results that user doesn't have permission to see 
 | 
@NotNull List<ResultsSummary> | 
getNeighbouringSummaries(@NotNull ImmutablePlan plan,
                        int buildNumber,
                        int maxCount)
Returns all the  
ResultsSummary objects that represent build results "around" the given build number. | 
@NotNull List<ResultsSummary> | 
getNeighbouringSummaries(Plan plan,
                        int buildNumber)
Returns all the  
ResultsSummary objects that matches the passed build numbers | 
int | 
getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
Gets the number of concurrently running builds 
 | 
long | 
getNumberOfFinalizedResults(@NotNull ImmutablePlan plan)
Get number of the  
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan | 
long | 
getNumberOfFinalizedResults(@NotNull PlanKey planKey)
Get number of the  
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan | 
long | 
getNumberOfFinishedResults(@NotNull Plan plan)
 | 
long | 
getNumberOfResults()
Get number of all  
ResultsSummarys | 
@Nullable ChainResultsSummary | 
getParentResultSummary(ResultsSummary resultsSummary)
Get (@link ChainResultsSummary} containing given  
ResultsSummary | 
@NotNull List<PlanKey> | 
getPlanKeysSortedByNumberOfFinalizedResultSummaries()  | 
@Nullable ResultsSummary | 
getResultsSummary(long id)
Lookup the ResultsSummary by id 
 | 
@Nullable ResultsSummary | 
getResultsSummary(@NotNull PlanResultKey planResultKey)
Lookup the ResultsSummary by  
PlanResultKey | 
<T extends ResultsSummary> | 
getResultsSummary(@NotNull PlanResultKey planResultKey,
                 @NotNull Class<T> aClass)
Lookup  
ResultsSummary by PlanResultKey and expected type | 
<T extends ResultsSummary> | 
getResultsSummary(@NotNull PlanResultKey planResultKey,
                 @NotNull Class<T> aClass,
                 ResultDataRead dataRead)
Lookup  
ResultsSummary by PlanResultKey and expected type. | 
@Nullable ResultsSummary | 
getResultsSummary(@NotNull PlanResultKey planResultKey,
                 ResultDataRead dataRead)
Lookup the ResultsSummary by  
PlanResultKey. | 
<T extends ResultsSummary> | 
getResultSummaries(@NotNull ResultsSummaryCriteria criteria)
Generic search to find any result summaries basing on the criteria provided. 
 | 
<T extends ResultsSummary> | 
getResultSummariesByChangeSetId(@NotNull String changeSetId,
                               @NotNull Class<T> discriminator)
Get a list of all build results containing a commit with the given changeset ID. 
 | 
<T extends ResultsSummary> | 
getResultSummariesByChangeSetIdAndRepository(long repositoryId,
                                            @NotNull String changeSetId,
                                            @NotNull Class<T> discriminator)
Get a list of all build results containing a commit with the given changeset ID that are in the given repository. 
 | 
<T extends ResultsSummary> | 
getResultSummariesByChangeSetIds(@NotNull Iterable<Pair<String,RepositoryData>> changeSetIds,
                                Class<T> discriminator)
Get a list of all build results containing a commit with any of the given changeset IDs and which are in the supplied list of repository datas. 
 | 
<T extends ResultsSummary> | 
getResultSummariesByChangeSetIds(@NotNull List<String> changeSetIds,
                                Class<T> discriminator)
Get a list of all build results containing a commit with any of the given changeset IDs. 
 | 
<T extends ResultsSummary> | 
getResultSummariesByCheckoutChangesetId(@NotNull String changeSetId,
                                       @NotNull Class<T> discriminator)
Get a list of all build results containing repositories checked out with the given changeset ID. 
 | 
<T extends ResultsSummary> | 
getResultSummariesForExpiry(@NotNull ExpiryCriteria expiryCriteria)
Searches for  
result summaries according to the given criteria for
 use in build expiry. | 
<T extends ResultsSummary> | 
getResultSummariesForPlan(@NotNull ImmutablePlan plan,
                         int firstResult,
                         int maxResults)
 | 
<T extends ResultsSummary> | 
getResultSummariesForPlanByLifeCycleState(@NotNull Plan plan,
                                         @NotNull LifeCycleState lifeCycleState,
                                         int firstResult,
                                         int maxResults)
Get the  
ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending). | 
@Nullable ChainStageResult | 
getStageForResult(ResultsSummary resultsSummary)
Get (@link ChainStageResult} containing given  
ResultsSummary | 
void | 
invalidateLogSize(@NotNull PlanResultKey planResultKey)
Invalidates the log size of a  
ResultsSummary with the given PlanResultKey. | 
int | 
markResultSummariesForDeletion(@NotNull PlanKey planKey)
Mass update of all  
ResultsSummary records in the database related to a Plan identified by planKey. | 
void | 
moveResultSummaries(@NotNull Plan newParentPlan,
                   @NotNull PlanKey oldPlanKey,
                   @NotNull PlanKey newPlanKey)
Reassigns plan key ResultsSummaries associated with selected plan key. 
 | 
void | 
postBuildVariableSnapshotUpdate(@NotNull ResultsSummary resultsSummary,
                               @NotNull VariableContext variableContext)
Saves result variables produced in a job. 
 | 
int | 
removeAllOrphanedResultSummaries()
Removes all the  
ResultsSummary objects in the database that do not have a matching Plan | 
void | 
removeArtifacts(@NotNull ImmutablePlan plan,
               int buildNumber)
Remove any artifacts stored for this plan result 
 | 
void | 
removeArtifacts(@NotNull ResultsSummary resultsSummary)
Remove any artifacts stored for this plan result 
 | 
void | 
removeBuildLogs(ImmutablePlan plan,
               int buildNumber)
Remove any build logs stored for this plan result 
 | 
void | 
removeBuildLogs(ImmutablePlan plan,
               int buildNumber,
               long maxIgnoredLogSize)
Remove build logs stored for this plan result that are greater than given size (in bytes). 
 | 
void | 
removeBuildLogs(@NotNull ResultsSummary resultsSummary)
Remove any build logs stored for this plan result 
 | 
void | 
removeBuildLogs(@NotNull ResultsSummary resultsSummary,
               long maxIgnoredLogSize)
Remove build logs stored for this plan result that are greater than given size (in bytes). 
 | 
void | 
removeMatchingArtifacts(@NotNull ResultsSummary resultsSummary,
                       @NotNull com.google.common.base.Predicate<ArtifactLink> predicate)
Remove artifacts from results summary that match a predicate. 
 | 
void | 
removeMergeResultSummary(@NotNull MergeResultSummary mergeResult)
Removes merge result. 
 | 
int | 
removeResultsSummariesForPlan(@NotNull Plan plan)
Remove all resultSummary objects for the given plan. 
 | 
void | 
removeResultSummary(@NotNull ImmutablePlan plan,
                   int buildNumber)
Remove plan result summary and all associated objects. 
 | 
void | 
removeResultSummary(@Nullable ImmutablePlan plan,
                   @NotNull ResultsSummary resultsSummary)
Deprecated. 
 
since 6.9 plan argument is not used. Use  
removeResultSummary(ResultsSummary) instead. | 
void | 
removeResultSummary(@NotNull PlanResultKey planResultKey)
Remove plan result summary and all associated objects. 
 | 
void | 
removeResultSummary(@NotNull ResultsSummary resultsSummary)
Remove plan result summary and all associated objects. 
 | 
ResultsSummary | 
resetResultSummary(@NotNull BuildResultsSummary resultsSummary)
Prepare result summry to be reuse for plan rerun 
 | 
void | 
saveResultSummary(@NotNull ResultsSummary resultsSummary)
Saves the  
ResultsSummary | 
long | 
scrollResultSummaries(@NotNull String buildKey,
                     @NotNull com.google.common.base.Function<ResultsSummary,Void> function)
Scroll through and execute function for each of BuildResultsSummary
 Objects passed to function are not fully initialized. 
 | 
long | 
scrollResultSummaries(@NotNull String buildKey,
                     ResultDataRead resultDataRead,
                     @NotNull com.google.common.base.Function<ResultsSummary,Void> function)
Scroll through and execute function for each of ResultsSummary (Build and Chain)
 Objects passed to function are not fully initialized. 
 | 
void | 
updateLifeCycleState(@NotNull BuildIdentifier buildIdentifier,
                    @NotNull LifeCycleState lifeCycleState,
                    @NotNull BuildState buildState)
Update LifeCycleState and saves the  
ResultsSummary for given BuildContext
 Updates also timing information | 
void | 
updateLifeCycleState(@NotNull ResultsSummary resultsSummary,
                    @NotNull LifeCycleState lifeCycleState,
                    @NotNull BuildState buildState)
Update LifeCycleState and saves the given  
ResultsSummary | 
void | 
updatePlanCompletedDate(@NotNull ChainResultsSummary resultsSummary,
                       @NotNull Date completionDate)
Update completed date and duration of  
ChainResultsSummary | 
void | 
updateProcessingDuration(ChainResultsSummary resultSummary)
Updates  
ImmutableResultsSummary.getProcessingDuration() and ChainStageResult.getProcessingDuration()
 based on chain execution. | 
void | 
updateResultSummaryWithBuildChanges(@NotNull BuildContext buildContext)  | 
void | 
updateVariablesOnContinuedBuild(@NotNull ResultsSummary resultsSummary,
                               @NotNull VariableContext variableContext)
Add manual variables added when starting manual stage or restarting failed stage. 
 | 
<T extends ResultsSummary> T createResultsSummary(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull Class<T> aClass) throws ResultsSummaryCreationException
ResultsSummary of the given ClassT - buildContext - aClass - ResultsSummaryCreationException@Nullable @Nullable ResultsSummary getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey)
PlanResultKeyplanResultKey - @Nullable @Nullable ResultsSummary getResultsSummary(long id)
id - - database id@Nullable @Nullable ResultsSummary getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey, ResultDataRead dataRead)
PlanResultKey. All lazy initialized collections can be eagerly fetched to avoid session problems.
 Use with caution - expensive callplanResultKey - dataRead - @Nullable <T extends ResultsSummary> T getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass)
ResultsSummary by PlanResultKey and expected typeT - planResultKey - aClass - @Nullable <T extends ResultsSummary> T getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass, ResultDataRead dataRead)
ResultsSummary by PlanResultKey and expected type. All lazy initialized collections can be eagerly fetched to avoid session problems.
 Use with caution - expensive callT - planResultKey - aClass - dataRead - void updateLifeCycleState(@NotNull
                          @NotNull ResultsSummary resultsSummary,
                          @NotNull
                          @NotNull LifeCycleState lifeCycleState,
                          @NotNull
                          @NotNull BuildState buildState)
ResultsSummaryresultsSummary - ResultsSummary to be updated and savedlifeCycleState - LifeCycleState to be setbuildState - BuildState to be setvoid cleanPendingLifeCycleState(@NotNull
                                @NotNull PlanResultKey planResultKey)
void updateLifeCycleState(@NotNull
                          @NotNull BuildIdentifier buildIdentifier,
                          @NotNull
                          @NotNull LifeCycleState lifeCycleState,
                          @NotNull
                          @NotNull BuildState buildState)
ResultsSummary for given BuildContext
 Updates also timing informationbuildIdentifier - BuildIdentifier used to get information on ResultsSummarylifeCycleState - LifeCycleState to be setbuildState - BuildState to be setvoid updatePlanCompletedDate(@NotNull
                             @NotNull ChainResultsSummary resultsSummary,
                             @NotNull
                             @NotNull Date completionDate)
ChainResultsSummaryresultsSummary - completionDate - void calculateAndSetDeltaState(ResultsSummary resultsSummary)
resultsSummary - to updatevoid saveResultSummary(@NotNull
                       @NotNull ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - void addVariableContextSnapshotToResultSummary(@NotNull
                                               @NotNull ResultsSummary resultsSummary,
                                               @NotNull
                                               @NotNull VariableContext variableContext)
resultsSummary - variableContext - void updateVariablesOnContinuedBuild(@NotNull
                                     @NotNull ResultsSummary resultsSummary,
                                     @NotNull
                                     @NotNull VariableContext variableContext)
resultsSummary - variableContext - void clearVariablesOnRerunBuild(@NotNull
                                @NotNull ResultsSummary resultSummary)
resultSummary - void postBuildVariableSnapshotUpdate(@NotNull
                                     @NotNull ResultsSummary resultsSummary,
                                     @NotNull
                                     @NotNull VariableContext variableContext)
resultsSummary - variableContext - @NotNull <T extends ResultsSummary> @NotNull Collection<T> getAllPendingResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.PENDING state@NotNull <T extends ResultsSummary> @NotNull Collection<T> getAllQueuedResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.QUEUED state@NotNull <T extends ResultsSummary> @NotNull Collection<T> getAllInProgressResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS stateaClass - @NotNull <T extends ResultsSummary> @NotNull Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS stateaClass - @NotNull <T extends ResultsSummary> @NotNull List<T> getFinalizedResultSummariesForPlan(PlanKey planKey, Class<T> aClass, int firstResult, int maxResults)
ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class.
 Results are sorted descending by build number.T - planKey - aClass - firstResult - - specifies the first result to be included in the list.maxResults - - specifies the length of the result; 0 for all results;@NotNull @NotNull List<ResultsSummary> getNeighbouringSummaries(Plan plan, int buildNumber)
ResultsSummary objects that matches the passed build numbersplan - buildNumber - List of BuildResultsSummary@NotNull @NotNull List<ResultsSummary> getNeighbouringSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount)
ResultsSummary objects that represent build results "around" the given build number.plan - the plan to return results forbuildNumber - the build number to search aroundmaxCount - the maximum number of builds to returnList of BuildResultsSummary in ascending order. At most there will be maxCount
 items in the list, inclusive of the result for buildNumber (if present).@NotNull @NotNull List<ResultsSummary> getBeforeSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount)
ResultsSummary objects that represent build results strictly before the given build number.plan - the plan to return results forbuildNumber - the build number to search beforemaxCount - the maximum number of builds to returnList of BuildResultsSummary in ascending order. At most there will be maxCount
 items in the list, exclusive of the result for buildNumber (if present).@NotNull @NotNull List<ResultsSummary> getAfterSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount)
ResultsSummary objects that represent build results strictly after the given build number.plan - the plan to return results forbuildNumber - the build number to search aftermaxCount - the maximum number of builds to returnList of BuildResultsSummary in ascending order. At most there will be maxCount
 items in the list, exclusive of the result for buildNumber (if present).int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
planKey - @NotNull <T extends ResultsSummary> @NotNull Collection<T> getAllBuildResultSummariesInUnknownState(Class<T> aClass)
BuildResultsSummary in a BuildState.UNKNOWN
 state@Nullable <T extends ResultsSummary> T findLastResultBefore(@NotNull @NotNull PlanResultKey planResultKey, Class<T> aClass)
ResultsSummary before planResultKey.getBuildNumberplanResultKey - aClass - @Nullable <T extends ResultsSummary> T findLastResultBefore(@NotNull @NotNull PlanResultKey planResultKey, Class<T> aClass, boolean includeOnceOffBuilds)
ResultsSummary before planResultKey.getBuildNumberplanResultKey - aClass - includeOnceOffBuilds - - should we skip once-off builds or include them in the search@Nullable @Nullable ChainStageResult getChainStageResultById(@NotNull @NotNull Long id)
ChainStageResult by its idlong getNumberOfResults()
ResultsSummaryslong getNumberOfFinishedResults(@NotNull
                                @NotNull Plan plan)
plan - long getNumberOfFinalizedResults(@NotNull
                                 @NotNull ImmutablePlan plan)
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Planplan - long getNumberOfFinalizedResults(@NotNull
                                 @NotNull PlanKey planKey)
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given PlanplanKey - @NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesForPlan(@NotNull @NotNull ImmutablePlan plan, int firstResult, int maxResults)
ResultsSummarys for the given Plan in any LifeCycleState. Results are sorted by build number (descending). User can skip first n result
 and request maximum number of results.T - plan - firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesForPlanByLifeCycleState(@NotNull @NotNull Plan plan, @NotNull @NotNull LifeCycleState lifeCycleState, int firstResult, int maxResults)
ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending). User
 can skip first n result and request maximum number of results.T - plan - lifeCycleState - firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.long getAveragePlanExecutionDuration(@NotNull
                                     @NotNull ImmutablePlan plan,
                                     int numberOfResults)
plan - numberOfResults - amount of results to be taken into account for average calculation<T extends ResultsSummary> T getLastResultsSummary(@NotNull @NotNull String planKey, Class<T> aClass)
ResultsSummary for planKey and ClassT - planKey - aClass - <T extends ResultsSummary> T getLastResultsSummary(@NotNull @NotNull String planKey, Class<T> aClass, boolean ignoreSpecsResults)
ResultsSummary for planKey and Class with possible skip of specs results.T - planKey - aClass - ignoreSpecsResults - @Nullable @Nullable ResultsSummary getLastSuccessfulResultSummary(@NotNull @NotNull PlanKey planKey)
ResultsSummary for planKeyplanKey - int removeResultsSummariesForPlan(@NotNull
                                  @NotNull Plan plan)
ResultsSummary objects to be deleted
 in such case #scheduleResultsSummariesForDelayedDeletion(Plan) should be considered.plan - to remove results for.ResultsSummarys removedint removeAllOrphanedResultSummaries()
ResultsSummary objects in the database that do not have a matching PlanResultsSummarys removed@Nullable @Nullable ResultsSummary findFirstFailedBuildResultAfter(@NotNull @NotNull String buildKey, int buildNumber)
ResultsSummary after buildNumberbuildKey - buildNumber - @Nullable @Nullable ResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull @NotNull PlanResultKey planResultKey)
ResultsSummary after buildNumberplanResultKey - @Nullable @Nullable ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull @NotNull PlanResultKey planResultKey)
ResultsSummary before buildplanResultKey - @Nullable @Nullable ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull @NotNull PlanResultKey planResultKey, boolean includeOnceOffBuilds)
ResultsSummary before build@Nullable @Nullable ResultsSummary findLastFailingBuildResultBefore(@NotNull @NotNull ImmutablePlan build, int buildNumber)
ResultsSummary before buildNumberbuild - buildNumber - @Nullable @Nullable ResultsSummary findLastFailingBuildResultBefore(@NotNull @NotNull PlanKey planKey, int buildNumber)
ResultsSummary before buildNumber@Nullable @Nullable ResultsSummary findFirstFailedBuildResultBetween(@NotNull @NotNull PlanKey planKey, int lowerBuildNumber, int upperBuildNumber)
@Nullable @Nullable ResultsSummary findFirstFailedBuildResultBetween(@NotNull @NotNull ImmutablePlan build, int lowerBuildNumber, int upperBuildNumber)
build - lowerBuildNumber - upperBuildNumber - @Nullable @Nullable ResultsSummary findLastBuildResultBefore(@NotNull @NotNull String buildKey, int buildNumber)
BuildResultsSummary before buildNumberbuildKey - buildNumber - @Nullable <T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass, boolean includeOnceOffBuilds)
BuildResultsSummary before buildNumberplanResultKey - includeOnceOffBuilds - should once-off builds be considered or ignored in the searchaClass - @Nullable @Nullable ResultsSummary getBreakingBuild(ResultsSummary buildResultsSummary)
buildResultsSummary - of the current build@Nullable @Nullable ResultsSummary getFixingBuild(ResultsSummary buildResultsSummary)
ResultsSummary for given ResultsSummary. The input build
 is returned if it is successful.buildResultsSummary - List<ResultsSummary> getLatestResultSummaries()
List of ResultsSummaryList<ResultsSummary> getLatestFailedResultSummaries()
List of ResultsSummary@NotNull @NotNull List<ResultsSummary> getLastNResultsSummaries(@NotNull @NotNull PlanIdentifier planIdentifier, int numberOfResults)
planIdentifier - - to get the results fornumberOfResults - - number of summaries you would like@Deprecated @NotNull default @NotNull List<ResultsSummary> getLastNResultsSummaries(@NotNull @NotNull ImmutablePlan plan, int numberOfResults)
getLastNResultsSummaries(PlanIdentifier, int)plan - - to get the results fornumberOfResults - - number of summaries you would like@NotNull @NotNull List<ResultsSummary> getLastNFailedResultsSummaries(@NotNull @NotNull PlanIdentifier planIdentifier, int numberOfResults)
planIdentifier - numberOfResults - must be > 0@NotNull @Deprecated default @NotNull List<ResultsSummary> getLastNFailedResultsSummaries(@NotNull @NotNull Plan build, int numberOfResults)
getLastNFailedResultsSummaries(PlanIdentifier, int)build - numberOfResults - must be > 0@Nullable <T extends ResultsSummary> T getAnyResultSummary(@NotNull @NotNull ResultsSummaryCriteria criteria, ResultDataRead dataRead)
criteria - containing all the search constraints@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummaries(@NotNull @NotNull ResultsSummaryCriteria criteria)
criteria - containing all the search constraints@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesForExpiry(@NotNull @NotNull ExpiryCriteria expiryCriteria)
result summaries according to the given criteria for
 use in build expiry.T - type of returned results (determined by the criteria)expiryCriteria - search constraintsresults summaries matching the criteria@NotNull @NotNull List<LinkedJiraIssue> findJiraIssuesForResults(@NotNull @NotNull List<ResultsSummary> buildResults)
LinkedJiraIssue linked to the given build result summariesbuildResults - to look for issues attached toLinkedJiraIssue linked to the given build result summaries@NotNull @NotNull List<LinkedJiraIssue> findJiraIssuesForPlanKey(@NotNull @NotNull PlanKey planKey)
LinkedJiraIssue linked to the given plan keyplanKey - to look for issues associated with plan of this keyLinkedJiraIssue linked to the given Plan@NotNull @NotNull List<? extends ResultsSummary> findResultsSummariesByJiraIssues(@Nullable @Nullable List<String> issueKeys)
issueKeys - to search for@NotNull @NotNull List<? extends ResultsSummary> findResultsSummariesByProjectKey(@Nullable @Nullable String projectKey)
projectKey - - jira project key@Nullable @Nullable ChainResultsSummary getParentResultSummary(ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - @Nullable @Nullable ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - void removeResultSummary(@NotNull
                         @NotNull ImmutablePlan plan,
                         int buildNumber)
plan - buildNumber - @Deprecated void removeResultSummary(@Nullable @Nullable ImmutablePlan plan, @NotNull @NotNull ResultsSummary resultsSummary)
removeResultSummary(ResultsSummary) instead.plan - not usedresultsSummary - void removeResultSummary(@NotNull
                         @NotNull ResultsSummary resultsSummary)
void removeResultSummary(@NotNull
                         @NotNull PlanResultKey planResultKey)
void removeArtifacts(@NotNull
                     @NotNull ImmutablePlan plan,
                     int buildNumber)
              throws IOException
plan - buildNumber - IOExceptionvoid removeArtifacts(@NotNull
                     @NotNull ResultsSummary resultsSummary)
              throws IOException
resultsSummary - IOExceptionvoid removeMatchingArtifacts(@NotNull
                             @NotNull ResultsSummary resultsSummary,
                             @NotNull
                             @NotNull com.google.common.base.Predicate<ArtifactLink> predicate)
                      throws IOException
resultsSummary - predicate - IOExceptionvoid removeBuildLogs(ImmutablePlan plan, int buildNumber)
plan - buildNumber - void removeBuildLogs(@NotNull
                     @NotNull ResultsSummary resultsSummary)
resultsSummary - void removeBuildLogs(ImmutablePlan plan, int buildNumber, long maxIgnoredLogSize)
plan - buildNumber - maxIgnoredLogSize - void removeBuildLogs(@NotNull
                     @NotNull ResultsSummary resultsSummary,
                     long maxIgnoredLogSize)
resultsSummary - maxIgnoredLogSize - List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria, List<Label> labels)
criteria - containing the restrictions for the chains to be returnedlabels - that the jobs can be associated withvoid moveResultSummaries(@NotNull
                         @NotNull Plan newParentPlan,
                         @NotNull
                         @NotNull PlanKey oldPlanKey,
                         @NotNull
                         @NotNull PlanKey newPlanKey)
newParentPlan - the new parent plan of result summaries. This should be a plan, not a job.long scrollResultSummaries(@NotNull
                           @NotNull String buildKey,
                           @NotNull
                           @NotNull com.google.common.base.Function<ResultsSummary,Void> function)
buildKey - of the plan you want to scroll the result summaries forfunction - function to be executed on each of the BuildResultSummarylong scrollResultSummaries(@NotNull
                           @NotNull String buildKey,
                           ResultDataRead resultDataRead,
                           @NotNull
                           @NotNull com.google.common.base.Function<ResultsSummary,Void> function)
buildKey - of the plan you want to scroll the result summaries forresultDataRead - if the data should be loaded lazy or eagerlyfunction - function to be executed on each of the BuildResultSummary@Nullable <T extends ResultsSummary> T findFirstResultAfter(@NotNull @NotNull PlanResultKey planResultKey, Class<T> aClass)
ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. is not
 in NOT_BUILT state.planResultKey - aClass - @Nullable <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildState buildState, @NotNull @NotNull Class<T> aClass)
T - planKey - buildState - aClass - ResultsSummary with the provided BuildState@Nullable <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildState buildState, @NotNull @NotNull Class<T> aClass, boolean ignoreSpecsResults)
T - planKey - buildState - aClass - ignoreSpecsResults - ResultsSummary with the provided BuildState@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesByChangeSetId(@NotNull @NotNull String changeSetId, @NotNull @NotNull Class<T> discriminator)
Get a list of all build results containing a commit with the given changeset ID.
Please note that a build result summary contains list of commits which were added in a given build (compared to a previous one). It means that a list of commits may be empty if there were no repository changes. A list of commits is also empty in case of a first build in a plan or a first build of a plan's branch. A build results summary may also contain no commits if no version control system was used.
This will not return records marked for deletion.
In case you need to find build results based on commit which was checked out into a build workspace, see the
 getResultSummariesByCheckoutChangesetId(String, Class)
T - extends ResultSummarychangeSetId - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesByCheckoutChangesetId(@NotNull @NotNull String changeSetId, @NotNull @NotNull Class<T> discriminator)
Get a list of all build results containing repositories checked out with the given changeset ID.
A build may use one or more repositories, each checked out with a certain changeset. This method returns build results having exact changeset ID checked out (note that it does not search for intermediate commits between two changeset IDs).
This will not return records marked for deletion.
In case you need to find build results based on commits which were added in certain build (compared to a previous
 one), see the getResultSummariesByChangeSetId(String, Class)
T - extends ResultSummarychangeSetId - of the checkout commitdiscriminator - class of the ResultSummary interface requiredchangeSetId commit@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesByChangeSetIdAndRepository(long repositoryId, @NotNull @NotNull String changeSetId, @NotNull @NotNull Class<T> discriminator)
T - extends ResultSummaryrepositoryId - of the repositorychangeSetId - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesByChangeSetIds(@NotNull @NotNull List<String> changeSetIds, Class<T> discriminator)
T - extends ResultSummarychangeSetIds - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> @NotNull List<T> getResultSummariesByChangeSetIds(@NotNull @NotNull Iterable<Pair<String,RepositoryData>> changeSetIds, Class<T> discriminator)
T - extends ResultSummarychangeSetIds - of the commit anding with the repository that commit came fromdiscriminator - class of the ResultSummary interface required@NotNull @NotNull List<UnassociatedCommit> getCommitsForUser(@NotNull @NotNull String username, int max)
username - to filter commits bymax - maximum number of commits to get.int countResultsWithState(@NotNull
                          @NotNull PlanKey planKey,
                          int lowerBuildNumber,
                          int upperBuildNumber,
                          @NotNull
                          @NotNull BuildState buildState)
planKey - the key of plan to analyselowerBuildNumber - the build number to start the count withupperBuildNumber - the build number to end the count withbuildState - the state that will be countedvoid updateProcessingDuration(ChainResultsSummary resultSummary)
ImmutableResultsSummary.getProcessingDuration() and ChainStageResult.getProcessingDuration()
 based on chain execution.resultSummary - int markResultSummariesForDeletion(@NotNull
                                   @NotNull PlanKey planKey)
ResultsSummary records in the database related to a Plan identified by planKey.planKey - key of a planvoid updateResultSummaryWithBuildChanges(@NotNull
                                         @NotNull BuildContext buildContext)
                                  throws ResultsSummaryCreationException
ResultsSummaryCreationExceptionResultsSummary resetResultSummary(@NotNull @NotNull BuildResultsSummary resultsSummary) throws IOException
resultsSummary - IOExceptionvoid removeMergeResultSummary(@NotNull
                              @NotNull MergeResultSummary mergeResult)
@Internal @NotNull @NotNull List<PlanKey> getPlanKeysSortedByNumberOfFinalizedResultSummaries()
@Nullable @Nullable Long calculateQueueDuration(@NotNull @NotNull ChainResultsSummary resultsSummary)
resultsSummary - ChainResultsSummary for which calculation has to be madeBuildResultsSummary records@Nullable @Nullable Long calculateVcsUpdateDuration(@NotNull @NotNull ChainResultsSummary resultsSummary)
resultsSummary - ChainResultsSummary for which calculation has to be madeBuildResultsSummary records@NotNull @NotNull List<Integer> findAllBuildResultsNumbers(PlanKey planKey)
void invalidateLogSize(@NotNull
                       @NotNull PlanResultKey planResultKey)
ResultsSummary with the given PlanResultKey.
 
 For a BuildResultsSummary the ChainResultsSummary's max log size will also be invalidated.planResultKey - result key@NotNull @NotNull Range<Integer> findBuildResultNumbersRange(@NotNull @NotNull PlanKey planKey)
planKey - @Deprecated @NotNull @NotNull List<PlanResultKey> findChainResultsWithFormatVersionLessThan(int formatVersion, int maxResults)
@NotNull @NotNull List<PlanKey> findJobKeysFromExistingChainResults(@NotNull @NotNull PlanKey chainKey)
int findMinimumBuildNumberForNLatest(@NotNull
                                     @NotNull PlanKey planKey,
                                     int n)
Copyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.