com.atlassian.bamboo.resultsummary
Interface BuildResultsSummaryManager
- All Superinterfaces:
- ResultsSummaryManager
- All Known Implementing Classes:
- BuildResultsSummaryManagerImpl
public interface BuildResultsSummaryManager
- extends ResultsSummaryManager
Primarily manages interactions with the BuildResultsSummary
from the database. Slowly, it will encompass all
methods that deals with the all build results interaction.
Method Summary |
int |
countBuildResultsSummaries()
Returns the number of results saved |
int |
countBuildResultsSummaries(java.lang.String planKey)
Returns the number of results saved for the given Build |
int |
countBuildResultsSummariesForAgent(BuildAgent buildAgent)
|
int |
countFailedBuildResultsSummariesForAgent(BuildAgent buildAgent)
|
java.util.List<BuildResultsSummary> |
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria |
java.util.List<BuildResultsSummary> |
findBuildResultsSummariesForBuild(Build build,
BuildResultsSummaryCriteria criteria)
|
java.util.List<BuildResultsSummary> |
getAllBuildResultsSummaries(Plan plan)
Returns all BuildResultsSummary for the passed Plan . |
java.util.List<BuildResultsSummary> |
getAllFailedResultsSummaries(Build build)
Returns all Failed BuildResultsSummary for the passed Build . |
long |
getAverageBuildTime(Buildable buildable,
int numberOfResults)
Returns average build duration for given number of builds |
BuildResultsSummary |
getBuildResultsSummary(Build build,
int buildNumber)
Deprecated. use getBuildResultsSummary(PlanResultKey) |
BuildResultsSummary |
getBuildResultsSummary(PlanResultKey planResultKey)
Gets the BuildResultsSummary represented by the provided PlanResultKey |
BuildResultsSummary |
getBuildResultsSummary(java.lang.String buildKey,
int buildNumber)
Gets the BuildResultsSummary represented by the provided buildKey and buildNumber |
BuildResultsSummary |
getBuildResultsSummaryById(long id)
|
java.util.List<Commit> |
getCommitsForResult(ResultsSummary resultsSummary)
|
BuildResultsSummary |
getFirstBuildSummary(Plan plan)
Retreives the first result |
BuildResultsSummary |
getLastBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
BuildResultsSummary |
getLastBuildForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration configuration)
|
BuildResultsSummary |
getLastBuildSummary(Plan plan)
Retrieves the last completed build result for a plan |
BuildResultsSummary |
getLastBuildSummary(java.lang.String planKey)
Deprecated. use ResultsSummaryManager.getLastResultsSummary(String, Class) |
BuildResultsSummary |
getLastOrNBuildResultsSummary(Build build,
java.lang.String buildNumber)
|
BuildResultsSummary |
getLastSuccessfulBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
BuildResultsSummary |
getLastSuccessfulBuildForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration configuration)
|
BuildResultsSummary |
getLastSuccessfulBuildSummary(java.lang.String planKey)
Deprecated. use getLastSuccessfulResultSummary |
java.util.List<BuildResultsSummary> |
getLatestbuildResultSummaries()
Deprecated. since 2.7 use ResultsSummary.getLatestResultSummaries() |
java.util.List<BuildResultsSummary> |
getLatestFailedBuildResultSummaries()
Deprecated. since 2.7 use ResultsSummary.getLatestFailedResultSummaries() |
long |
getNumberOfFinishedResults(Plan build)
Get number of the ResultsSummary s for the given Plan |
void |
removeBuildResult(Buildable buildable,
int buildNumber)
Removes a build result for a particular build. |
void |
removeBuildResultsSummariesForBuild(Build build)
Deprecated. use ResultsSummaryManager#scheduleResultsSummariesForDelayedDeletion(Plan) |
void |
saveBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Deprecated. use ResultsSummaryManager.saveResultSummary(ResultsSummary) |
BuildResultsSummary |
updateBuildState(BuildResultsSummary buildResultsSummary,
BuildState buildState)
Update the BuildState of the BuildResultsSummary |
BuildResultsSummary |
updateBuildSummaryFromBuildResults(BuildContext buildContext,
CurrentlyBuilding currentlyBuilding,
BuildResults buildResults)
Updates BuildResultsSummary after build is completed. |
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultsSummaryManager |
calculateAndSetDeltaState, countResultsWithState, createResultsSummary, findChainResultsWithJobLabelled, findFirstFailedBuildResultAfter, findFirstFailedBuildResultBetween, findFirstResultAfter, findFirstSuccessfulBuildResultAfter, findJiraIssuesForPlan, findJiraIssuesForResults, findLastBuildResultBefore, findLastFailingBuildResultBefore, findLastResultBefore, findLastResultSummaryWithState, findLastSuccessfulBuildResultBefore, findResultsSummariesByJiraIssues, findResultsSummariesByProjectKey, getAllActiveResultSummariesForPlan, getAllBuildResultsSummariesForAgent, getAllBuildResultSummariesInUnknownState, getAllInProgressResultSummaries, getAllPendingResultSummaries, getAllQueuedResultSummaries, getAllResultSummariesForPlan, getAveragePlanExecutionDuration, getBreakingBuild, getChainStageResultById, getFixingBuild, getLastNBuildResultsSummaries, getLastNFailedResultsSummaries, getLastNResultsSummaries, getLastResultsSummary, getLastSuccessfulResultSummary, getLatestFailedResultSummaries, getLatestResultSummaries, getLatestSummariesForAgent, getLatestSummariesForAgent, getNeighbouringSummaries, getNumberOfConcurrentlyRunningBuilds, getParentResultSummary, getResultsSummary, getResultsSummary, getResultsSummary, getResultsSummary, getResultSummaries, getResultSummariesForPlan, getResultSummariesForPlanByLifeCycleState, getStageForResult, moveResultSummaries, removeAllOrphanedResultSummaries, removeArtifacts, removeBuildLogs, removeResultsSummariesForPlan, removeResultSummary, saveResultSummary, scrollResultSummaries, updateCancelledDetails, updateLifeCycleState, updateLifeCycleState, updatePlanCompletedDate |
getAllBuildResultsSummaries
@NotNull
java.util.List<BuildResultsSummary> getAllBuildResultsSummaries(@NotNull
Plan plan)
- Returns all
BuildResultsSummary
for the passed Plan
. Sorted by oldest first.
- Parameters:
plan
-
- Returns:
getAllFailedResultsSummaries
@NotNull
java.util.List<BuildResultsSummary> getAllFailedResultsSummaries(@NotNull
Build build)
- Returns all Failed
BuildResultsSummary
for the passed Build
. Sorted by oldest first.
- Parameters:
build
-
- Returns:
getLastOrNBuildResultsSummary
@Nullable
BuildResultsSummary getLastOrNBuildResultsSummary(@NotNull
Build build,
@Nullable
java.lang.String buildNumber)
getBuildResultsSummaryById
@Nullable
BuildResultsSummary getBuildResultsSummaryById(long id)
getBuildResultsSummary
@Nullable
BuildResultsSummary getBuildResultsSummary(java.lang.String buildKey,
int buildNumber)
- Gets the
BuildResultsSummary
represented by the provided buildKey and buildNumber
- Parameters:
buildKey
- buildNumber
-
- Returns:
- buildResultsSummary
getBuildResultsSummary
@Nullable
BuildResultsSummary getBuildResultsSummary(@NotNull
PlanResultKey planResultKey)
- Gets the
BuildResultsSummary
represented by the provided PlanResultKey
- Parameters:
planResultKey
-
- Returns:
- buildResultsSummary
saveBuildResultsSummary
@Deprecated
void saveBuildResultsSummary(@NotNull
BuildResultsSummary buildResultsSummary)
- Deprecated. use
ResultsSummaryManager.saveResultSummary(ResultsSummary)
- Saves the specified
BuildResultsSummary
- Parameters:
buildResultsSummary
-
updateBuildSummaryFromBuildResults
@NotNull
BuildResultsSummary updateBuildSummaryFromBuildResults(BuildContext buildContext,
CurrentlyBuilding currentlyBuilding,
BuildResults buildResults)
- Updates BuildResultsSummary after build is completed.
All fiedls are initialized at this moment.
- Parameters:
currentlyBuilding
- buildResults
-
- Returns:
- updated build result summary
updateBuildState
@NotNull
BuildResultsSummary updateBuildState(@NotNull
BuildResultsSummary buildResultsSummary,
@NotNull
BuildState buildState)
- Update the
BuildState
of the BuildResultsSummary
- Parameters:
buildResultsSummary
- buildState
-
- Returns:
- updated
getFirstBuildSummary
BuildResultsSummary getFirstBuildSummary(Plan plan)
- Retreives the first result
- Parameters:
plan
-
- Returns:
- result
getLastBuildSummary
@Nullable
BuildResultsSummary getLastBuildSummary(@NotNull
Plan plan)
- Retrieves the last completed build result for a plan
- Parameters:
plan
- plan of which build result will be searched
- Returns:
- result
getLastBuildSummary
@Deprecated
@Nullable
BuildResultsSummary getLastBuildSummary(java.lang.String planKey)
- Deprecated. use
ResultsSummaryManager.getLastResultsSummary(String, Class)
- Retrieves the last completed build result for a plan identified by a planKey
- Parameters:
planKey
- identifier of a plan
- Returns:
- result
- Since:
- 2.7
getNumberOfFinishedResults
long getNumberOfFinishedResults(Plan build)
- Description copied from interface:
ResultsSummaryManager
- Get number of the
ResultsSummary
s for the given Plan
- Specified by:
getNumberOfFinishedResults
in interface ResultsSummaryManager
- Returns:
- summaries
getBuildResultsSummary
@Nullable
@Deprecated
BuildResultsSummary getBuildResultsSummary(Build build,
int buildNumber)
- Deprecated. use
getBuildResultsSummary(PlanResultKey)
getAverageBuildTime
long getAverageBuildTime(@NotNull
Buildable buildable,
int numberOfResults)
- Returns average build duration for given number of builds
- Parameters:
buildable
- numberOfResults
- - How many build results to use in the average. must be greater 0 @return Average build time. 0 if no build found.
removeBuildResultsSummariesForBuild
@Deprecated
void removeBuildResultsSummariesForBuild(@NotNull
Build build)
- Deprecated. use
ResultsSummaryManager#scheduleResultsSummariesForDelayedDeletion(Plan)
- Remove the
BuildResultsSummary
objects from the database. No events are triggered
- Parameters:
build
- @NotNull
getLatestbuildResultSummaries
@Deprecated
java.util.List<BuildResultsSummary> getLatestbuildResultSummaries()
- Deprecated. since 2.7 use 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
- Returns:
List
of BuildResultsSummary
getLatestFailedBuildResultSummaries
@Deprecated
java.util.List<BuildResultsSummary> getLatestFailedBuildResultSummaries()
- Deprecated. since 2.7 use 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
- Returns:
List
of BuildResultsSummary
findBuildResultsSummaries
@NotNull
java.util.List<BuildResultsSummary> findBuildResultsSummaries(@NotNull
BuildResultsSummaryCriteria criteria)
- Searches for
BuildResultsSummary
objects given a BuildResultsSummaryCriteria
- Parameters:
criteria
- @NotNull
- Returns:
List
of BuildResultsSummary
findBuildResultsSummariesForBuild
java.util.List<BuildResultsSummary> findBuildResultsSummariesForBuild(@NotNull
Build build,
@NotNull
BuildResultsSummaryCriteria criteria)
countBuildResultsSummaries
int countBuildResultsSummaries()
- Returns the number of results saved
- Returns:
- results
countBuildResultsSummaries
int countBuildResultsSummaries(@Nullable
java.lang.String planKey)
- Returns the number of results saved for the given
Build
- Parameters:
planKey
-
- Returns:
- results
removeBuildResult
void removeBuildResult(Buildable buildable,
int buildNumber)
- Removes a build result for a particular build. This fully removes everything about this particular build result
and triggers off all appropriate events.
- Parameters:
buildable
- buildNumber
- The build numner.
getLastSuccessfulBuildSummary
@Nullable
@Deprecated
BuildResultsSummary getLastSuccessfulBuildSummary(@NotNull
java.lang.String planKey)
- Deprecated. use getLastSuccessfulResultSummary
- Parameters:
planKey
-
- Returns:
getLastBuildForAgent
@Nullable
BuildResultsSummary getLastBuildForAgent(@NotNull
java.lang.String planKey,
@NotNull
java.lang.Long agentId)
getLastSuccessfulBuildForAgent
@Nullable
BuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull
java.lang.String planKey,
@NotNull
java.lang.Long agentId)
getLastBuildForImageConfiguration
@Nullable
BuildResultsSummary getLastBuildForImageConfiguration(@NotNull
java.lang.String planKey,
@NotNull
ElasticImageConfiguration configuration)
getLastSuccessfulBuildForImageConfiguration
@Nullable
BuildResultsSummary getLastSuccessfulBuildForImageConfiguration(@NotNull
java.lang.String planKey,
@NotNull
ElasticImageConfiguration configuration)
countBuildResultsSummariesForAgent
int countBuildResultsSummariesForAgent(@NotNull
BuildAgent buildAgent)
countFailedBuildResultsSummariesForAgent
int countFailedBuildResultsSummariesForAgent(@NotNull
BuildAgent buildAgent)
getCommitsForResult
@NotNull
java.util.List<Commit> getCommitsForResult(@NotNull
ResultsSummary resultsSummary)
Copyright © 2010 Atlassian. All Rights Reserved.