com.atlassian.bamboo.resultsummary
Interface BuildResultsSummaryDao

All Superinterfaces:
BambooObjectDao<ResultsSummary>
All Known Implementing Classes:
BuildResultsSummaryHibernateDao

public interface BuildResultsSummaryDao
extends BambooObjectDao<ResultsSummary>


Field Summary
static int NUMBER_OF_DAYS_TO_FILTER
           
 
Method Summary
 int countBuildResultsSummaries(long agentId, BuildState buildState)
          Count how many build results match the agent & optional build state
 int countBuildResultsSummaries(java.lang.String planKey)
           
 int countResultsWithState(PlanKey planKey, int lowerBuildNumber, int upperBuildNumber, BuildState buildState)
          Counts results with a given state in a given build number range for plan.
<T extends BuildResultsSummary>
java.util.List<T>
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
          Deprecated. use findResultsSummaries
 java.util.List<ResultsSummary> findBuildResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
          Get a list of results summaries associated with the list of issue keys.
 java.util.List<ResultsSummary> findBuildResultsSummariesByProjectKey(java.lang.String projectKey)
          Retrieve a list of results summaries associeted with given JIRA project key
 java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
          Find all build results which have matching artifacts.
 java.util.List<BuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey, ElasticImageConfiguration elasticImageConfiguration, BuildState buildState, int maxResults)
          Searcher for builds of an image
 java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria, java.util.List<Label> labels)
          Searches through all chains to find any that have jobs which match the given labels.
 java.lang.Integer findFirstBuildNumberAfter(java.lang.String planKey, int buildNumber)
          Returns the build number of next existing build results.
 ResultsSummary findFirstBuildResultWithBuildStateAfter(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last successful BuildResultsSummary after buildNumber
 ResultsSummary findFirstBuildResultWithBuildStateBetween(java.lang.String buildKey, int lowerBuildNumber, int upperBuildNumber, BuildState buildState)
          Returns the first build that matches BuildState between the given build number range Note that this function is inclusive of the upper and lower bound
<T extends ResultsSummary>
T
findFirstResultAfter(java.lang.String planKey, int buildNumber, java.lang.Class<T> aClass)
          Finds the first successful or failed BuildResultsSummary after buildNumber
 java.lang.Integer findLastBuildNumberBefore(java.lang.String planKey, int buildNumber)
          Returns the build number of previous existing build results.
 ResultsSummary findLastBuildResultBefore(java.lang.String buildKey, int buildNumber)
          Deprecated. use findLastResultBefore(String, int, Class)
 ResultsSummary findLastBuildResultWithBuildStateBefore(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last BuildResultsSummary before buildNumber with BuildState
<T extends ResultsSummary>
T
findLastResultBefore(java.lang.String planKey, int buildNumber, java.lang.Class<T> aClass)
          Finds the last successful or failed ResultsSummary before buildNumber
<T extends ResultsSummary>
T
findLastResultSummaryWithState(PlanKey planKey, BuildState buildState, java.lang.Class<T> aClass)
           
 java.util.List<ResultsSummary> findLatestFailedResultSummaries()
          Find the failed result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
 java.util.List<ResultsSummary> findLatestResultsSummaries()
          Find the result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
<T extends ResultsSummary>
java.util.List<T>
findResultsSummaries(ResultsSummaryCriteria criteria)
          Searches for ResultsSummary objects given a ResultsSummaryCriteria
<T extends ResultsSummary>
java.util.Collection<T>
getAllActiveResultSummariesForPlan(PlanKey planKey, java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.PENDING, LifeCycleState.QUEUED, LifeCycleState.IN_PROGRESS state with the given Class See also LifeCycleState.isActive(LifeCycleState) and ResultsSummary.isActive()
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInBuildState(BuildState state, java.lang.Class<T> aClass)
          Returns all the BuildResultsSummary in requested state
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInLifeCycleState(LifeCycleState state, java.lang.Class<T> aClass)
           
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
          Returns all the BuildResultsSummary in a BuildState.UNKNOWN state
 java.util.Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
          Returns all the BuildResultsSummary in a LifeCycleState.IN_PROGRESS state
<T extends ResultsSummary>
java.util.Collection<T>
getAllInProgressResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class
<T extends ResultsSummary>
java.util.Collection<T>
getAllPendingResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.PENDING state with the given Class
<T extends ResultsSummary>
java.util.Collection<T>
getAllQueuedResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.QUEUED state with the given Class
<T extends ResultsSummary>
java.util.List<T>
getAllResultSummariesForPlan(Plan plan)
          Get all the ResultsSummarys for the given Plan
 ResultsSummary getBreakingBuild(ResultsSummary summary)
           
 BuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey, int buildNumber)
          Deprecated. use ResultsSummaryManager.getResultsSummary(PlanResultKey, Class)
 ChainStageResult getChainStageResultById(long id)
          Returns a ChainStageResult by its id
 BuildResultsSummary getFirstBuildSummary(Plan plan)
          Returns the first available BuildResultsSummary for the given Build
 ResultsSummary getFixingBuild(ResultsSummary summary)
          Returns the first successful BuildResultsSummary for given BuildResultsSummary.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(Plan plan)
          Retrieves a list of LinkedJiraIssue that are linked to the given build.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(java.util.List<ResultsSummary> buildResults)
          Retrieves a list of LinkedJiraIssue linked to the given build result summaries
<T extends ResultsSummary>
T
getLastResultSummary(java.lang.String planKey, java.lang.Class<T> aClass)
          Returns the latest completed ResultsSummary for the plan represented by planKey
 java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan, int currentBuildNumber)
          Returns build results "around" given build number
 int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
          Get the number of concurrently running builds for planKey
 long getNumberOfFinishedResults(Plan build)
          Returns the number of finished results available for the given Build
 ChainResultsSummary getParentResultSummary(ResultsSummary summary)
          Get (@link ChainResultsSummary} containing given ResultsSummary
<T extends ResultsSummary>
T
getResultsSummary(PlanResultKey planResultKey, java.lang.Class<T> aClass)
          Lookup ResultsSummary by PlanResultKey and expected type
<T extends ResultsSummary>
T
getResultsSummary(PlanResultKey planResultKey, java.lang.Class<T> aClass, ResultDataRead dataRead)
          Lookup ResultsSummary by PlanResultKey and expected type, all lazy initialized collections can be eagerly read
<T extends ResultsSummary>
java.util.List<T>
getResultSummariesForPlan(Plan plan, int firstResult, int maxResults)
          Get the ResultsSummarys for the given Plan.
<T extends ResultsSummary>
java.util.List<T>
getResultSummariesForPlanByLifeCycleState(Plan plan, 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).
 ChainStageResult getStageForResult(ResultsSummary resultsSummary)
          Get (@link ChainStageResult} containing given ResultsSummary
 int removeAllOrphanedResultSummaries()
          Removes all the ResultsSummary objects in the database that do not have a matching Plan
 void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
          Deprecated. since 2.7 - use removeResultsSummary
 int removeResultsSummariesForPlan(PlanKey planKey)
          Remove all resultSummary objects for the given plan.
 void removeResultsSummary(ResultsSummary buildResultsSummary)
          Removes the passed result summary
 long scrollJiraIssuesForExport(com.google.common.base.Function<LinkedJiraIssue,java.lang.Void> function)
          Scroll through and execute function for each of LinkedJiraIssue Objects passed to function are not fully initialized.
 long scrollResultSummaries(java.lang.String buildKey, com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
          Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, executeReturnLong, findAll, findById, save
 

Field Detail

NUMBER_OF_DAYS_TO_FILTER

static final int NUMBER_OF_DAYS_TO_FILTER
See Also:
Constant Field Values
Method Detail

getAllBuildResultSummariesInUnknownState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in a BuildState.UNKNOWN state

Returns:
summaries

getAllPendingResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllPendingResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING state with the given Class

Returns:
summaries

getAllQueuedResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllQueuedResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.QUEUED state with the given Class

Returns:
summaries

getAllInProgressResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllInProgressResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class

Returns:
summaries

getAllActiveResultSummariesForPlan

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey,
                                                                                              java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING, LifeCycleState.QUEUED, LifeCycleState.IN_PROGRESS state with the given Class See also LifeCycleState.isActive(LifeCycleState) and ResultsSummary.isActive()

Returns:
summaries

getNumberOfConcurrentlyRunningBuilds

int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
Get the number of concurrently running builds for planKey

Parameters:
planKey -
Returns:

getResultsSummary

@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
                                                        PlanResultKey planResultKey,
                                                        @NotNull
                                                        java.lang.Class<T> aClass)
Lookup ResultsSummary by PlanResultKey and expected type

Type Parameters:
T -
Parameters:
planResultKey -
aClass -
Returns:
resultSummary

getResultsSummary

@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
                                                        PlanResultKey planResultKey,
                                                        @NotNull
                                                        java.lang.Class<T> aClass,
                                                        ResultDataRead dataRead)
Lookup ResultsSummary by PlanResultKey and expected type, all lazy initialized collections can be eagerly read

Type Parameters:
T -
Parameters:
planResultKey -
aClass -
dataRead -
Returns:
resultSummary

getAllBuildResultSummariesInBuildState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInBuildState(@NotNull
                                                                                                  BuildState state,
                                                                                                  java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in requested state

Parameters:
state -
Returns:
summaries

getAllBuildResultSummariesInLifeCycleState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull
                                                                                                      LifeCycleState state,
                                                                                                      java.lang.Class<T> aClass)

getAllInProgressBuildResultSummaries

@NotNull
java.util.Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
Returns all the BuildResultsSummary in a LifeCycleState.IN_PROGRESS state

Returns:
summaries

getBuildResultsSummaryByBuildKeyAndBuildNumber

@Nullable
BuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey,
                                                                            int buildNumber)
Deprecated. use ResultsSummaryManager.getResultsSummary(PlanResultKey, Class)

Lookup BuildResultsSummary by buildKey and buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
summary

getFirstBuildSummary

@Nullable
BuildResultsSummary getFirstBuildSummary(Plan plan)
Returns the first available BuildResultsSummary for the given Build

Parameters:
plan -
Returns:
buildResult

getLastResultSummary

<T extends ResultsSummary> T getLastResultSummary(java.lang.String planKey,
                                                  java.lang.Class<T> aClass)
Returns the latest completed ResultsSummary for the plan represented by planKey

Parameters:
planKey -
Returns:
buildResult

getNumberOfFinishedResults

long getNumberOfFinishedResults(Plan build)
Returns the number of finished results available for the given Build

Parameters:
build -
Returns:
numberOfResults

getNeighbouringSummaries

@NotNull
java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan,
                                                                int currentBuildNumber)
Returns build results "around" given build number

Parameters:
plan -
currentBuildNumber - @return

getBreakingBuild

@Nullable
ResultsSummary getBreakingBuild(ResultsSummary summary)

getFixingBuild

@Nullable
ResultsSummary getFixingBuild(ResultsSummary summary)
Returns the first successful BuildResultsSummary for given BuildResultsSummary. The input build is returned if it is successful.

Parameters:
summary -
Returns:
null if there is no fixing build.

findBuildResultsSummaries

@Deprecated
@NotNull
<T extends BuildResultsSummary> java.util.List<T> findBuildResultsSummaries(@NotNull
                                                                                               BuildResultsSummaryCriteria criteria)
Deprecated. use findResultsSummaries

Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria

Parameters:
criteria - @NotNull
Returns:
List of BuildResultsSummary

findResultsSummaries

@NotNull
<T extends ResultsSummary> java.util.List<T> findResultsSummaries(@NotNull
                                                                          ResultsSummaryCriteria criteria)
Searches for ResultsSummary objects given a ResultsSummaryCriteria

Parameters:
criteria - @NotNull
Returns:
List of BuildResultsSummary

removeResultsSummariesForPlan

int removeResultsSummariesForPlan(@NotNull
                                  PlanKey planKey)
Remove all resultSummary objects for the given plan. Time-cost of this method might be significant if there are thousands of ResultsSummary objects to be deleted in such case #scheduleResultsSummariesForDelayedDeletion(PlanKey) should be considered.

Parameters:
planKey - identifier of plan to remove results for.
Returns:
number of deleted ResultsSummary objects

removeAllOrphanedResultSummaries

int removeAllOrphanedResultSummaries()
Removes all the ResultsSummary objects in the database that do not have a matching Plan

Returns:
number of ResultsSummarys removed

countBuildResultsSummaries

int countBuildResultsSummaries(long agentId,
                               @Nullable
                               BuildState buildState)
Count how many build results match the agent & optional build state

Parameters:
agentId -
buildState - - can be null.
Returns:
count

countBuildResultsSummaries

int countBuildResultsSummaries(@Nullable
                               java.lang.String planKey)

removeBuildResultsSummary

@Deprecated
void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Deprecated. since 2.7 - use removeResultsSummary

Removes the passed build result summary

Parameters:
buildResultsSummary - - @NotNull

removeResultsSummary

void removeResultsSummary(@NotNull
                          ResultsSummary buildResultsSummary)
Removes the passed result summary

Parameters:
buildResultsSummary - - @NotNull

findBuildResultsSummariesByJiraIssues

@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable
                                                                             java.util.List<java.lang.String> issueKeys)
Get a list of results summaries associated with the list of issue keys.

Parameters:
issueKeys -
Returns:
list of result summaries

findBuildResultsSummariesByProjectKey

@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable
                                                                             java.lang.String projectKey)
Retrieve a list of results summaries associeted with given JIRA project key

Parameters:
projectKey - - Jira project key (prefix of the jira issues e.g. 'BAM')
Returns:
a list of results summaries associeted with given JIRA project key

getJiraIssuesForBuildResults

@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull
                                                                     java.util.List<ResultsSummary> buildResults)
Retrieves a list of LinkedJiraIssue linked to the given build result summaries

Parameters:
buildResults -
Returns:

getJiraIssuesForBuild

@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(@NotNull
                                                              Plan plan)
Retrieves a list of LinkedJiraIssue that are linked to the given build.

Parameters:
plan -
Returns:

findBuildsForImageConfiguration

@NotNull
java.util.List<BuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey,
                                                                            ElasticImageConfiguration elasticImageConfiguration,
                                                                            @Nullable
                                                                            BuildState buildState,
                                                                            int maxResults)
Searcher for builds of an image

Parameters:
planKey -
elasticImageConfiguration -
buildState - @Nullable
maxResults -
Returns:

findLastBuildResultBefore

@Deprecated
@Nullable
ResultsSummary findLastBuildResultBefore(@NotNull
                                                             java.lang.String buildKey,
                                                             int buildNumber)
Deprecated. use findLastResultBefore(String, int, Class)

Finds the last successful or failed BuildResultsSummary before buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
buildResult

findLastResultBefore

@Nullable
<T extends ResultsSummary> T findLastResultBefore(@NotNull
                                                           java.lang.String planKey,
                                                           int buildNumber,
                                                           java.lang.Class<T> aClass)
Finds the last successful or failed ResultsSummary before buildNumber

Parameters:
planKey -
buildNumber -
Returns:
buildResult

findFirstResultAfter

@Nullable
<T extends ResultsSummary> T findFirstResultAfter(@NotNull
                                                           java.lang.String planKey,
                                                           int buildNumber,
                                                           java.lang.Class<T> aClass)
Finds the first successful or failed BuildResultsSummary after buildNumber

Parameters:
planKey -
buildNumber -
Returns:
buildResult

findFirstBuildResultWithBuildStateAfter

@Nullable
ResultsSummary findFirstBuildResultWithBuildStateAfter(@NotNull
                                                                java.lang.String buildKey,
                                                                int buildNumber,
                                                                @NotNull
                                                                BuildState buildState)
Finds the last successful BuildResultsSummary after buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
buildResult

findLastBuildResultWithBuildStateBefore

ResultsSummary findLastBuildResultWithBuildStateBefore(@NotNull
                                                       java.lang.String buildKey,
                                                       int buildNumber,
                                                       @NotNull
                                                       BuildState buildState)
Finds the last BuildResultsSummary before buildNumber with BuildState

Parameters:
buildKey -
buildNumber -
buildState -
Returns:
buildResult

findFirstBuildResultWithBuildStateBetween

@Nullable
ResultsSummary findFirstBuildResultWithBuildStateBetween(@NotNull
                                                                  java.lang.String buildKey,
                                                                  int lowerBuildNumber,
                                                                  int upperBuildNumber,
                                                                  @NotNull
                                                                  BuildState buildState)
Returns the first build that matches BuildState between the given build number range Note that this function is inclusive of the upper and lower bound

Parameters:
buildKey -
lowerBuildNumber -
upperBuildNumber -
buildState -
Returns:
buildResult

findFirstBuildNumberAfter

@Nullable
java.lang.Integer findFirstBuildNumberAfter(@NotNull
                                                     java.lang.String planKey,
                                                     int buildNumber)
Returns the build number of next existing build results.

Parameters:
buildKey -
buildNumber -
Returns:
null if no build result summary with higher number exists

findLastBuildNumberBefore

@Nullable
java.lang.Integer findLastBuildNumberBefore(@NotNull
                                                     java.lang.String planKey,
                                                     int buildNumber)
Returns the build number of previous existing build results.

Parameters:
buildKey -
buildNumber -
Returns:
null if no build result summary with lower number exists

findBuildResultsWithArtifacts

java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
Find all build results which have matching artifacts. Sorted by buildNumber, ascending

Parameters:
planKey -
Returns:

scrollResultSummaries

long scrollResultSummaries(@NotNull
                           java.lang.String buildKey,
                           @NotNull
                           com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Parameters:
buildKey - of the plan you want to scroll the result summaries for
function - function to be executed on each of the BuildResultSummary
Returns:
number of traversed rows

scrollJiraIssuesForExport

long scrollJiraIssuesForExport(@NotNull
                               com.google.common.base.Function<LinkedJiraIssue,java.lang.Void> function)
Scroll through and execute function for each of LinkedJiraIssue Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Parameters:
function - function to be executed on each of the LinkedJiraIssue
Returns:
number of traversed rows

getChainStageResultById

@Nullable
ChainStageResult getChainStageResultById(long id)
Returns a ChainStageResult by its id

Returns:
chainStageResult

getAllResultSummariesForPlan

<T extends ResultsSummary> java.util.List<T> getAllResultSummariesForPlan(@NotNull
                                                                          Plan plan)
Get all the ResultsSummarys for the given Plan

Type Parameters:
T -
Parameters:
plan -
Returns:
summaries

getResultSummariesForPlan

@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlan(@NotNull
                                                                               Plan plan,
                                                                               int firstResult,
                                                                               int maxResults)
Get the ResultsSummarys for the given Plan. Results are sorted by build number (descending). User can skip first n result and request maximum number of results. Note: fetching huge amount of data in single call should be avoided.

Type Parameters:
T -
Parameters:
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.
Returns:
summaries

getResultSummariesForPlanByLifeCycleState

@NotNull
<T extends ResultsSummary> java.util.List<T> 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). User can skip first n result and request maximum number of results.

Type Parameters:
T -
Parameters:
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.
Returns:
summaries

getParentResultSummary

@Nullable
ChainResultsSummary getParentResultSummary(ResultsSummary summary)
Get (@link ChainResultsSummary} containing given ResultsSummary

Parameters:
summary -
Returns:

getStageForResult

@Nullable
ChainStageResult getStageForResult(ResultsSummary resultsSummary)
Get (@link ChainStageResult} containing given ResultsSummary

Parameters:
resultsSummary -
Returns:

findLatestResultsSummaries

java.util.List<ResultsSummary> findLatestResultsSummaries()
Find the result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER

Returns:
list of latest results summaries

findLatestFailedResultSummaries

java.util.List<ResultsSummary> findLatestFailedResultSummaries()
Find the failed result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER

Returns:
list of latest results summaries

findChainResultsWithJobLabelled

java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
                                                                    java.util.List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels. The list of chains is then filtered if required, using other criteria elements. Currently the only used criteria are:
  • buildKey
  • toBuildDate
  • toBuildNumber
  • This is to ensure performance is consistent and reduce the possibility of conflicts.

    Parameters:
    criteria - containing the restrictions for the chains to be returned
    labels - that the jobs can be associated with
    Returns:
    list of ChainResultSummary that match the criteria and have jobs with any of the given labels

    findLastResultSummaryWithState

    @Nullable
    <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull
                                                                         PlanKey planKey,
                                                                         @NotNull
                                                                         BuildState buildState,
                                                                         @NotNull
                                                                         java.lang.Class<T> aClass)
    Type Parameters:
    T -
    Parameters:
    planKey -
    buildState -
    aClass -
    Returns:
    the last ResultsSummary with the provided BuildState

    countResultsWithState

    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.

    Parameters:
    planKey - the key of plan to analyse
    lowerBuildNumber - the build number to start the count with
    upperBuildNumber - the build number to end the count with
    buildState - the state that will be counted
    Returns:
    the count


    Copyright © 2010 Atlassian. All Rights Reserved.