|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResultsSummaryManager
Manager for all ResultsSummary derivatives that supersedes BuildResultsSummaryManager
| Method Summary | ||
|---|---|---|
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. |
|
int |
countResultsWithState(PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
BuildState buildState)
Counts results with a given state in a given build number range for plan. |
|
|
createResultsSummary(BuildContext buildContext,
java.lang.Class<T> aClass)
Creates a ResultsSummary of the given Class |
|
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. |
|
ResultsSummary |
findFirstFailedBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the first failed ResultsSummary after buildNumber |
|
ResultsSummary |
findFirstFailedBuildResultBetween(Plan build,
int lowerBuildNumber,
int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively. |
|
|
findFirstResultAfter(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Finds the first ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. |
|
ResultsSummary |
findFirstSuccessfulBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the last successful BuildResultsSummary after buildNumber |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForPlan(Plan plan)
Retrieves a list of LinkedJiraIssue linked to the given Plan |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForResults(java.util.List<ResultsSummary> buildResults)
Retrieves a list of LinkedJiraIssue linked to the given build result summaries |
|
ResultsSummary |
findLastBuildResultBefore(java.lang.String buildKey,
int buildNumber)
Finds the last successful or failing BuildResultsSummary before buildNumber |
|
ResultsSummary |
findLastFailingBuildResultBefore(Plan build,
int buildNumber)
Finds the last failing BuildResultsSummary before buildNumber |
|
|
findLastResultBefore(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Finds the last successful or failing ResultsSummary before planResultKey.getBuildNumber |
|
|
findLastResultSummaryWithState(PlanKey planKey,
BuildState buildState,
java.lang.Class<T> aClass)
|
|
ResultsSummary |
findLastSuccessfulBuildResultBefore(Plan build,
int buildNumber)
Finds the last successful BuildResultsSummary before buildNumber |
|
java.util.List<? extends ResultsSummary> |
findResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
Finds a list of results which are linked to the given issue keys |
|
java.util.List<? extends ResultsSummary> |
findResultsSummariesByProjectKey(java.lang.String projectKey)
Provide a list of results which are linked to any issues under the given jira project key |
|
|
getAllActiveResultSummariesForPlan(PlanKey planKey,
java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state |
|
java.util.List<BuildResultsSummary> |
getAllBuildResultsSummariesForAgent(java.lang.Long agentId)
Returns all BuildResultsSummary for the passed BuildAgent's id. |
|
|
getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in a BuildState.UNKNOWN
state |
|
|
getAllInProgressResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state |
|
|
getAllPendingResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING state |
|
|
getAllQueuedResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.QUEUED state |
|
|
getAllResultSummariesForPlan(Plan plan)
Get all the ResultsSummarys for the given Plan |
|
long |
getAveragePlanExecutionDuration(Plan plan,
int numberOfResults)
Get average duration from n last results summaries in finished state for a plan. |
|
ResultsSummary |
getBreakingBuild(ResultsSummary buildResultsSummary)
Returns the first failing build after the last successful build. |
|
ChainStageResult |
getChainStageResultById(java.lang.Long id)
Returns a ChainStageResult by its id |
|
ResultsSummary |
getFixingBuild(ResultsSummary buildResultsSummary)
Returns the first successful ResultsSummary for given ResultsSummary. |
|
java.util.List<BuildResultsSummary> |
getLastNBuildResultsSummaries(Buildable buildable,
int numberOfResults)
Deprecated. since 2.7 use getLastNResultsSummaries instead |
|
java.util.List<ResultsSummary> |
getLastNFailedResultsSummaries(Plan build,
int numberOfResults)
Returns the most recent n failed build results. |
|
java.util.List<ResultsSummary> |
getLastNResultsSummaries(Plan plan,
int numberOfResults)
Provides a list of the latest N results summaries for the given plan, newest first. |
|
|
getLastResultsSummary(java.lang.String planKey,
java.lang.Class<T> aClass)
Get the last ResultsSummary for planKey and Class |
|
ResultsSummary |
getLastSuccessfulResultSummary(PlanKey planKey)
Get the last successful ResultsSummary for planKey |
|
java.util.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 |
|
java.util.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 |
|
java.util.List<BuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
java.util.Date fromDate)
Retrieves build summaries for agent id not older than certain date. |
|
java.util.List<BuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
int maxCount)
Retrieves n last build summaries for agent. |
|
java.util.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 |
getNumberOfFinishedResults(Plan plan)
Get number of the ResultsSummarys for the given Plan |
|
ChainResultsSummary |
getParentResultSummary(ResultsSummary resultsSummary)
Get (@link ChainResultsSummary} containing given ResultsSummary |
|
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey)
Lookup the ResultsSummary by PlanResultKey |
|
|
getResultsSummary(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Lookup ResultsSummary by PlanResultKey and expected type |
|
|
getResultsSummary(PlanResultKey planResultKey,
java.lang.Class<T> aClass,
ResultDataRead dataRead)
Lookup ResultsSummary by PlanResultKey and expected type. |
|
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey,
ResultDataRead dataRead)
Lookup the ResultsSummary by PlanResultKey. |
|
|
getResultSummaries(ResultsSummaryCriteria criteria)
Generic search to find any result summaries bases on the criteria provided. |
|
|
getResultSummariesForPlan(Plan plan,
int firstResult,
int maxResults)
Get the ResultsSummarys for the given Plan in any LifeCycleState. |
|
|
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 |
|
void |
moveResultSummaries(PlanKey oldPlanKey,
PlanKey newPlanKey)
Reassigns plan key ResultsSummaries associated with selected plan key. |
|
int |
removeAllOrphanedResultSummaries()
Removes all the ResultsSummary objects in the database that do not have a matching Plan |
|
void |
removeArtifacts(Plan plan,
int buildNumber)
Remove any artifacts stored for this plan result |
|
void |
removeBuildLogs(Plan plan,
int buildNumber)
Remove any build logs stored for this plan result |
|
int |
removeResultsSummariesForPlan(Plan plan)
Remove all resultSummary objects for the given plan. |
|
void |
removeResultSummary(Plan plan,
int buildNumber)
Remove plan result summary and all associated objects. |
|
void |
saveResultSummary(ResultsSummary resultsSummary)
Saves the ResultsSummary |
|
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. |
|
void |
updateCancelledDetails(ResultsSummary resultsSummary)
Marks ResultSummary as cancelled |
|
void |
updateLifeCycleState(BuildContext buildContext,
LifeCycleState lifeCycleState,
BuildState buildState)
Update LifeCycleState and saves the ResultsSummary for given BuildContext
Updates also timing information |
|
void |
updateLifeCycleState(ResultsSummary resultsSummary,
LifeCycleState lifeCycleState,
BuildState buildState)
Update LifeCycleState and saves the given ResultsSummary |
|
void |
updatePlanCompletedDate(ResultsSummary resultsSummary,
java.util.Date completionDate)
Update completed date and duration of ResultsSummary |
|
| Method Detail |
|---|
<T extends ResultsSummary> T createResultsSummary(@NotNull
BuildContext buildContext,
@NotNull
java.lang.Class<T> aClass)
throws ResultsSummaryCreationException
ResultsSummary of the given Class
T - buildContext - aClass -
ResultsSummaryCreationException
@Nullable
ResultsSummary getResultsSummary(@NotNull
PlanResultKey planResultKey)
PlanResultKey
planResultKey -
@Nullable
ResultsSummary getResultsSummary(@NotNull
PlanResultKey planResultKey,
ResultDataRead dataRead)
PlanResultKey. All lazy initialized collections can be eagerly fetched to avoid session problems.
Use with caution - expensive call
planResultKey -
@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
PlanResultKey planResultKey,
@NotNull
java.lang.Class<T> aClass)
ResultsSummary by PlanResultKey and expected type
T - planResultKey - aClass -
@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
PlanResultKey planResultKey,
@NotNull
java.lang.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 call
T - planResultKey - aClass -
void updateLifeCycleState(@NotNull
ResultsSummary resultsSummary,
@NotNull
LifeCycleState lifeCycleState,
@NotNull
BuildState buildState)
ResultsSummary
resultsSummary - ResultsSummary to be updated and savedlifeCycleState - LifeCycleState to be setbuildState - BuildState to be set
void updateLifeCycleState(@NotNull
BuildContext buildContext,
@NotNull
LifeCycleState lifeCycleState,
@NotNull
BuildState buildState)
ResultsSummary for given BuildContext
Updates also timing information
buildContext - BuildContext used to get information on ResultsSummarylifeCycleState - LifeCycleState to be setbuildState - BuildState to be set
void updatePlanCompletedDate(@NotNull
ResultsSummary resultsSummary,
@NotNull
java.util.Date completionDate)
ResultsSummary
resultsSummary - completionDate - void calculateAndSetDeltaState(ResultsSummary resultsSummary)
resultsSummary - to update
void saveResultSummary(@NotNull
ResultsSummary resultsSummary)
ResultsSummary
resultsSummary - @NotNull <T extends ResultsSummary> java.util.Collection<T> getAllPendingResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.PENDING state
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllQueuedResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.QUEUED state
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllInProgressResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS state
@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey,
java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS state
@NotNull
java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan,
int buildNumber)
ResultsSummary objects that matches the passed build numbers
plan - buildNumber - @return List of BuildResultsSummaryint getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
planKey -
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
BuildResultsSummary in a BuildState.UNKNOWN
state
@Nullable
<T extends ResultsSummary> T findLastResultBefore(@NotNull
PlanResultKey planResultKey,
java.lang.Class<T> aClass)
ResultsSummary before planResultKey.getBuildNumber
planResultKey - aClass -
@Nullable
ChainStageResult getChainStageResultById(@NotNull
java.lang.Long id)
ChainStageResult by its id
@NotNull
<T extends ResultsSummary> java.util.List<T> getAllResultSummariesForPlan(@NotNull
Plan plan)
ResultsSummarys for the given Plan
T - plan -
long getNumberOfFinishedResults(@NotNull
Plan plan)
ResultsSummarys for the given Plan
plan -
@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlan(@NotNull
Plan 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> java.util.List<T> getResultSummariesForPlanByLifeCycleState(@NotNull
Plan plan,
@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
Plan plan,
int numberOfResults)
plan - numberOfResults - amount of results to be taken into account for average calculation
<T extends ResultsSummary> T getLastResultsSummary(@NotNull
java.lang.String planKey,
java.lang.Class<T> aClass)
ResultsSummary for planKey and Class
T - planKey - aClass -
@Nullable
ResultsSummary getLastSuccessfulResultSummary(@NotNull
PlanKey planKey)
ResultsSummary for planKey
planKey -
int removeResultsSummariesForPlan(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 Plan
ResultsSummarys removed
@Nullable
ResultsSummary findFirstFailedBuildResultAfter(@NotNull
java.lang.String buildKey,
int buildNumber)
ResultsSummary after buildNumber
buildKey - buildNumber -
@Nullable
ResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull
java.lang.String buildKey,
int buildNumber)
BuildResultsSummary after buildNumber
buildKey - buildNumber -
@Nullable
ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull
Plan build,
int buildNumber)
BuildResultsSummary before buildNumber
build - buildNumber -
@Nullable
ResultsSummary findLastFailingBuildResultBefore(@NotNull
Plan build,
int buildNumber)
BuildResultsSummary before buildNumber
build - buildNumber -
@Nullable
ResultsSummary findFirstFailedBuildResultBetween(@NotNull
Plan build,
int lowerBuildNumber,
int upperBuildNumber)
build - lowerBuildNumber - upperBuildNumber -
@Nullable
ResultsSummary findLastBuildResultBefore(@NotNull
java.lang.String buildKey,
int buildNumber)
BuildResultsSummary before buildNumber
buildKey - buildNumber -
@Nullable ResultsSummary getBreakingBuild(ResultsSummary buildResultsSummary)
buildResultsSummary - of the current build
@Nullable ResultsSummary getFixingBuild(ResultsSummary buildResultsSummary)
ResultsSummary for given ResultsSummary. The input build
is returned if it is successful.
buildResultsSummary -
void updateCancelledDetails(@NotNull
ResultsSummary resultsSummary)
resultsSummary - results summaryjava.util.List<ResultsSummary> getLatestResultSummaries()
List of ResultsSummaryjava.util.List<ResultsSummary> getLatestFailedResultSummaries()
List of ResultsSummary
@NotNull
java.util.List<ResultsSummary> getLastNResultsSummaries(@NotNull
Plan plan,
int numberOfResults)
plan - - to get the results fornumberOfResults - - number of summaries you would like
@NotNull
java.util.List<ResultsSummary> getLastNFailedResultsSummaries(@NotNull
Plan build,
int numberOfResults)
build - numberOfResults - must be > 0
@NotNull
@Deprecated
java.util.List<BuildResultsSummary> getLastNBuildResultsSummaries(@NotNull
Buildable buildable,
int numberOfResults)
buildable - numberOfResults - must be > 0 @return
@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummaries(@NotNull
ResultsSummaryCriteria criteria)
criteria - containing all the search constraints
@NotNull
java.util.List<LinkedJiraIssue> findJiraIssuesForResults(@NotNull
java.util.List<ResultsSummary> buildResults)
LinkedJiraIssue linked to the given build result summaries
buildResults - to look for issues attached to
LinkedJiraIssue linked to the given build result summaries
@NotNull
java.util.List<LinkedJiraIssue> findJiraIssuesForPlan(@NotNull
Plan plan)
LinkedJiraIssue linked to the given Plan
plan - to look for issues associated with
LinkedJiraIssue linked to the given Plan
@NotNull
java.util.List<? extends ResultsSummary> findResultsSummariesByJiraIssues(@Nullable
java.util.List<java.lang.String> issueKeys)
issueKeys - to search for
@NotNull
java.util.List<? extends ResultsSummary> findResultsSummariesByProjectKey(@Nullable
java.lang.String projectKey)
projectKey - - jira project key
@NotNull
java.util.List<BuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull
java.lang.Long agentId)
BuildResultsSummary for the passed BuildAgent's id.
agentId - id of the agent to get the result summaries for
BuildResultsSummary for the passed BuildAgent's id.
@NotNull
java.util.List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull
java.lang.Long agentId,
@NotNull
java.util.Date fromDate)
agentId - id of an agentfromDate - beginning of the search period
List of BuildResultsSummary
@NotNull
java.util.List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull
java.lang.Long agentId,
int maxCount)
agentId - id of an agentmaxCount - maximum number of elements to retrieve
List of BuildResultsSummary@Nullable ChainResultsSummary getParentResultSummary(ResultsSummary resultsSummary)
ResultsSummary
resultsSummary -
@Nullable ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummary
resultsSummary -
void removeResultSummary(@NotNull
Plan plan,
int buildNumber)
plan - buildNumber -
void removeArtifacts(Plan plan,
int buildNumber)
plan - buildNumber -
void removeBuildLogs(Plan plan,
int buildNumber)
plan - buildNumber -
java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
java.util.List<Label> labels)
criteria - containing the restrictions for the chains to be returnedlabels - that the jobs can be associated with
void moveResultSummaries(PlanKey oldPlanKey,
PlanKey newPlanKey)
long scrollResultSummaries(@NotNull
java.lang.String buildKey,
@NotNull
com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
buildKey - of the plan you want to scroll the result summaries forfunction - function to be executed on each of the BuildResultSummary
@Nullable
<T extends ResultsSummary> T findFirstResultAfter(@NotNull
PlanResultKey planResultKey,
java.lang.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
PlanKey planKey,
@NotNull
BuildState buildState,
@NotNull
java.lang.Class<T> aClass)
T - planKey - buildState - aClass -
ResultsSummary with the provided BuildState
int countResultsWithState(@NotNull
PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
@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 counted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||