|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl
public class BuildResultsSummaryManagerImpl
Constructor Summary | |
---|---|
BuildResultsSummaryManagerImpl()
|
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)
|
|
ExtendedBuildResultsSummary |
createBuildResultSummary(BuildContext buildContext)
Create build results summary before build execution starts. |
|
java.util.List<ExtendedBuildResultsSummary> |
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria |
|
java.util.List<ExtendedBuildResultsSummary> |
findBuildResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
|
|
java.util.List<ExtendedBuildResultsSummary> |
findBuildResultsSummariesByProjectKey(java.lang.String projectKey)
|
|
java.util.List<ExtendedBuildResultsSummary> |
findBuildResultsSummariesForBuild(Build build,
BuildResultsSummaryCriteria criteria)
|
|
ExtendedBuildResultsSummary |
findFirstFailedBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the first failed ExtendedBuildResultsSummary after buildNumber |
|
ExtendedBuildResultsSummary |
findFirstFailedBuildResultBetween(Build build,
int lowerBuildNumber,
int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively. |
|
ExtendedBuildResultsSummary |
findFirstSuccessfulBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the last successful ExtendedBuildResultsSummary after buildNumber |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForBuild(Build build)
Retrieves a list of LinkedJiraIssue linked to the given Build |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForBuildResults(java.util.List<BuildResultsSummary> buildResults)
Retrieves a list of LinkedJiraIssue linked to the given build result summaries |
|
ExtendedBuildResultsSummary |
findLastBuildResultBefore(Build build,
int buildNumber)
Finds the last successful or failing ExtendedBuildResultsSummary before buildNumber |
|
ExtendedBuildResultsSummary |
findLastBuildResultBefore(java.lang.String buildKey,
int buildNumber)
Finds the last successful or failing ExtendedBuildResultsSummary before buildNumber |
|
ExtendedBuildResultsSummary |
findLastFailingBuildResultBefore(Build build,
int buildNumber)
Finds the last failing ExtendedBuildResultsSummary before buildNumber |
|
ExtendedBuildResultsSummary |
findLastSuccessfulBuildResultBefore(Build build,
int buildNumber)
Finds the last successful ExtendedBuildResultsSummary before buildNumber |
|
java.util.List<ExtendedBuildResultsSummary> |
getAllBuildResultsSummaries(Build build)
Returns all ExtendedBuildResultsSummary for the passed Build . |
|
java.util.List<ExtendedBuildResultsSummary> |
getAllBuildResultsSummariesForAgent(java.lang.Long agentId)
Returns all ExtendedBuildResultsSummary for the passed BuildAgent 's id. |
|
java.util.List<ExtendedBuildResultsSummary> |
getAllFailedResultsSummaries(Build build)
Returns all Failed ExtendedBuildResultsSummary for the passed Build . |
|
java.util.Collection<BuildResultsSummary> |
getAllPendingBuildResultSummaries()
Returns all the BuildResultsSummary in a BuildState.PENDING state |
|
long |
getAverageBuildTime(Build build,
int numberOfResults)
Returns average build duration for given number of builds |
|
BuildResultsSummary |
getBreakingBuild(BuildResultsSummary buildResultsSummary)
|
|
ExtendedBuildResultsSummary |
getBuildResultsSummary(Build build,
int buildNumber)
|
|
ExtendedBuildResultsSummary |
getBuildResultsSummary(PlanResultKey planResultKey)
Gets the ExtendedBuildResultsSummary represented by the provided PlanResultKey |
|
ExtendedBuildResultsSummary |
getBuildResultsSummary(java.lang.String buildKey,
int buildNumber)
Gets the ExtendedBuildResultsSummary represented by the provided buildKey and buildNumber |
|
BuildResultsSummary |
getBuildResultsSummaryById(long id)
|
|
BuildResultsSummary |
getFirstBuildSummary(Build build)
Retreives the first result |
|
BuildResultsSummary |
getFixingBuild(BuildResultsSummary buildResultsSummary)
Returns the first successful BuildResultsSummary for given BuildResultsSummary . |
|
ExtendedBuildResultsSummary |
getLastBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
|
ExtendedBuildResultsSummary |
getLastBuildForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration configuration)
|
|
ExtendedBuildResultsSummary |
getLastBuildSummary(Build build)
Retreives the last build result |
|
ExtendedBuildResultsSummary |
getLastBuildSummary(java.lang.String planKey)
|
|
|
getLastNBuildResultsSummaries(Build build,
int numberOfResults)
Returns the most recent n build results. |
|
java.util.List<ExtendedBuildResultsSummary> |
getLastNFailedResultsSummaries(Build build,
int numberOfResults)
Returns the most recent n failed build results. |
|
ExtendedBuildResultsSummary |
getLastOrNBuildResultsSummary(Build build,
java.lang.String buildNumber)
|
|
ExtendedBuildResultsSummary |
getLastSuccessfulBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
|
ExtendedBuildResultsSummary |
getLastSuccessfulBuildForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration configuration)
|
|
ExtendedBuildResultsSummary |
getLastSuccessfulBuildSummary(java.lang.String planKey)
|
|
java.util.List<ExtendedBuildResultsSummary> |
getLatestbuildResultSummaries()
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<ExtendedBuildResultsSummary> |
getLatestFailedBuildResultSummaries()
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<ExtendedBuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
java.util.Date fromDate)
Retrieves build summaries for agent id not older than certain date. |
|
java.util.List<ExtendedBuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
int maxCount)
Retrieves n last build summaries for agent. |
|
java.util.List |
getNeighbouringSummaries(Build build,
int buildNumber)
Returns all the BuildResultsSummary objects that matches the passed build numbers |
|
long |
getNumberOfResults(Build build)
|
|
void |
removeArtifacts(Build build,
int buildNumber)
Removes the artifact for a given build |
|
void |
removeBuildLogs(Build build,
int buildNumber)
Removes the build log for a given build |
|
void |
removeBuildResult(Build build,
int buildNumber)
Removes a build result for a particular build. |
|
void |
removeBuildResultsSummariesForBuild(Build build)
Remove the BuildResultsSummary objects from the database. |
|
void |
saveBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Saves the specified BuildResultsSummary |
|
void |
setArtifactLinkManager(ArtifactLinkManager artifactLinkManager)
|
|
void |
setBuildDao(BuildDao buildDao)
|
|
void |
setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
|
|
void |
setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)
|
|
void |
setBuildResultsSummaryDao(BuildResultsSummaryDao buildResultsSummaryDao)
|
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
|
void |
setExtendedAuthorManager(ExtendedAuthorManager extendedAuthorManager)
|
|
void |
setJiraIssueManager(JiraIssueManager jiraIssueManager)
|
|
void |
setJiraIssueUtils(JiraIssueUtils jiraIssueUtils)
|
|
ExtendedBuildResultsSummary |
updateBuildState(BuildResultsSummary buildResultsSummary,
BuildState buildState)
Update the BuildState of the BuildResultsSummary |
|
ExtendedBuildResultsSummary |
updateBuildSummaryFromBuildResults(BuildContext buildContext,
CurrentlyBuilding currentlyBuilding,
BuildResults buildResults)
Updates BuildResultsSummary after build is completed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildResultsSummaryManagerImpl()
Method Detail |
---|
@NotNull public java.util.Collection<BuildResultsSummary> getAllPendingBuildResultSummaries()
BuildResultsSummaryManager
BuildResultsSummary
in a BuildState.PENDING
state
getAllPendingBuildResultSummaries
in interface BuildResultsSummaryManager
@NotNull public ExtendedBuildResultsSummary createBuildResultSummary(BuildContext buildContext) throws BuildResultCreationException
BuildResultsSummaryManager
createBuildResultSummary
in interface BuildResultsSummaryManager
BuildResultCreationException
@NotNull public ExtendedBuildResultsSummary updateBuildSummaryFromBuildResults(BuildContext buildContext, CurrentlyBuilding currentlyBuilding, BuildResults buildResults)
BuildResultsSummaryManager
updateBuildSummaryFromBuildResults
in interface BuildResultsSummaryManager
@NotNull public ExtendedBuildResultsSummary updateBuildState(@NotNull BuildResultsSummary buildResultsSummary, @NotNull BuildState buildState)
BuildResultsSummaryManager
BuildState
of the BuildResultsSummary
updateBuildState
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getBreakingBuild(BuildResultsSummary buildResultsSummary)
getBreakingBuild
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getFixingBuild(BuildResultsSummary buildResultsSummary)
BuildResultsSummaryManager
BuildResultsSummary
for given BuildResultsSummary
.
The input build is returned if it is successful.
getFixingBuild
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> getAllBuildResultsSummaries(@NotNull Build build)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
for the passed Build
. Sorted by oldest first.
getAllBuildResultsSummaries
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> getAllFailedResultsSummaries(@NotNull Build build)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
for the passed Build
. Sorted by oldest first.
getAllFailedResultsSummaries
in interface BuildResultsSummaryManager
@NotNull public <T extends BuildResultsSummary> java.util.List<T> getLastNBuildResultsSummaries(@NotNull Build build, int numberOfResults)
BuildResultsSummaryManager
getLastNBuildResultsSummaries
in interface BuildResultsSummaryManager
numberOfResults
- must be > 0
@Nullable public ExtendedBuildResultsSummary getLastOrNBuildResultsSummary(@NotNull Build build, @Nullable java.lang.String buildNumber)
getLastOrNBuildResultsSummary
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> getLastNFailedResultsSummaries(@NotNull Build build, int numberOfResults)
BuildResultsSummaryManager
getLastNFailedResultsSummaries
in interface BuildResultsSummaryManager
numberOfResults
- must be > 0
@NotNull public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummaries(@NotNull BuildResultsSummaryCriteria criteria)
BuildResultsSummaryManager
BuildResultsSummary
objects given a BuildResultsSummaryCriteria
findBuildResultsSummaries
in interface BuildResultsSummaryManager
criteria
- @NotNull
List
of ExtendedBuildResultsSummary
public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesForBuild(@NotNull Build build, @NotNull BuildResultsSummaryCriteria criteria)
findBuildResultsSummariesForBuild
in interface BuildResultsSummaryManager
public int countBuildResultsSummaries()
BuildResultsSummaryManager
countBuildResultsSummaries
in interface BuildResultsSummaryManager
public int countBuildResultsSummaries(@Nullable java.lang.String planKey)
BuildResultsSummaryManager
Build
countBuildResultsSummaries
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable java.util.List<java.lang.String> issueKeys)
findBuildResultsSummariesByJiraIssues
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable java.lang.String projectKey)
findBuildResultsSummariesByProjectKey
in interface BuildResultsSummaryManager
@NotNull public java.util.List<LinkedJiraIssue> findJiraIssuesForBuildResults(@NotNull java.util.List<BuildResultsSummary> buildResults)
BuildResultsSummaryManager
LinkedJiraIssue
linked to the given build result summaries
findJiraIssuesForBuildResults
in interface BuildResultsSummaryManager
@NotNull public java.util.List<LinkedJiraIssue> findJiraIssuesForBuild(@NotNull Build build)
BuildResultsSummaryManager
LinkedJiraIssue
linked to the given Build
findJiraIssuesForBuild
in interface BuildResultsSummaryManager
public void removeBuildResult(Build build, int buildNumber)
BuildResultsSummaryManager
removeBuildResult
in interface BuildResultsSummaryManager
build
- @NotNullbuildNumber
- The build numner.public void removeBuildLogs(Build build, int buildNumber)
BuildResultsSummaryManager
removeBuildLogs
in interface BuildResultsSummaryManager
build
- @NotNullbuildNumber
- The build numner.public void removeArtifacts(Build build, int buildNumber)
BuildResultsSummaryManager
removeArtifacts
in interface BuildResultsSummaryManager
build
- @NotNullbuildNumber
- The build numner.public BuildResultsSummary getBuildResultsSummaryById(long id)
getBuildResultsSummaryById
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getBuildResultsSummary(Build build, int buildNumber)
getBuildResultsSummary
in interface BuildResultsSummaryManager
public java.util.List getNeighbouringSummaries(Build build, int buildNumber)
BuildResultsSummaryManager
BuildResultsSummary
objects that matches the passed build numbers
getNeighbouringSummaries
in interface BuildResultsSummaryManager
List
of BuildResultsSummary
public void removeBuildResultsSummariesForBuild(@NotNull Build build)
BuildResultsSummaryManager
BuildResultsSummary
objects from the database. No events are triggered
removeBuildResultsSummariesForBuild
in interface BuildResultsSummaryManager
build
- @NotNull@Nullable public ExtendedBuildResultsSummary getBuildResultsSummary(@NotNull PlanResultKey planResultKey)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
represented by the provided PlanResultKey
getBuildResultsSummary
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getBuildResultsSummary(java.lang.String buildKey, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
represented by the provided buildKey and buildNumber
getBuildResultsSummary
in interface BuildResultsSummaryManager
public void saveBuildResultsSummary(@NotNull BuildResultsSummary buildResultsSummary)
BuildResultsSummaryManager
BuildResultsSummary
saveBuildResultsSummary
in interface BuildResultsSummaryManager
public BuildResultsSummary getFirstBuildSummary(Build build)
BuildResultsSummaryManager
getFirstBuildSummary
in interface BuildResultsSummaryManager
public ExtendedBuildResultsSummary getLastBuildSummary(Build build)
BuildResultsSummaryManager
getLastBuildSummary
in interface BuildResultsSummaryManager
public ExtendedBuildResultsSummary getLastBuildSummary(java.lang.String planKey)
getLastBuildSummary
in interface BuildResultsSummaryManager
public ExtendedBuildResultsSummary getLastSuccessfulBuildSummary(@NotNull java.lang.String planKey)
getLastSuccessfulBuildSummary
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull java.lang.Long agentId)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
for the passed BuildAgent
's id.
getAllBuildResultsSummariesForAgent
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getLastBuildForAgent(@NotNull java.lang.String planKey, @NotNull java.lang.Long agentId)
getLastBuildForAgent
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getLastBuildForImageConfiguration(@NotNull java.lang.String planKey, @NotNull ElasticImageConfiguration configuration)
getLastBuildForImageConfiguration
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull java.lang.String planKey, @NotNull java.lang.Long agentId)
getLastSuccessfulBuildForAgent
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary getLastSuccessfulBuildForImageConfiguration(@NotNull java.lang.String planKey, @NotNull ElasticImageConfiguration configuration)
getLastSuccessfulBuildForImageConfiguration
in interface BuildResultsSummaryManager
public int countBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countBuildResultsSummariesForAgent
in interface BuildResultsSummaryManager
public int countFailedBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countFailedBuildResultsSummariesForAgent
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findLastSuccessfulBuildResultBefore(@NotNull Build build, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
before buildNumber
findLastSuccessfulBuildResultBefore
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findLastBuildResultBefore(@NotNull Build build, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
before buildNumber
findLastBuildResultBefore
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findLastBuildResultBefore(@NotNull java.lang.String buildKey, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
before buildNumber
findLastBuildResultBefore
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findFirstFailedBuildResultAfter(@NotNull java.lang.String buildKey, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
after buildNumber
findFirstFailedBuildResultAfter
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull java.lang.String buildKey, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
after buildNumber
findFirstSuccessfulBuildResultAfter
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findLastFailingBuildResultBefore(@NotNull Build build, int buildNumber)
BuildResultsSummaryManager
ExtendedBuildResultsSummary
before buildNumber
findLastFailingBuildResultBefore
in interface BuildResultsSummaryManager
@Nullable public ExtendedBuildResultsSummary findFirstFailedBuildResultBetween(@NotNull Build build, int lowerBuildNumber, int upperBuildNumber)
BuildResultsSummaryManager
findFirstFailedBuildResultBetween
in interface BuildResultsSummaryManager
@NotNull public java.util.List<ExtendedBuildResultsSummary> getLatestSummariesForAgent(@NotNull java.lang.Long agentId, @NotNull java.util.Date fromDate)
BuildResultsSummaryManager
getLatestSummariesForAgent
in interface BuildResultsSummaryManager
agentId
- id of an agentfromDate
- beginning of the search period
List
of ExtendedBuildResultsSummary
@NotNull public java.util.List<ExtendedBuildResultsSummary> getLatestSummariesForAgent(@NotNull java.lang.Long agentId, int maxCount)
BuildResultsSummaryManager
getLatestSummariesForAgent
in interface BuildResultsSummaryManager
agentId
- id of an agentmaxCount
- maximum number of elements to retrieve
List
of ExtendedBuildResultsSummary
public long getNumberOfResults(Build build)
getNumberOfResults
in interface BuildResultsSummaryManager
public java.util.List<ExtendedBuildResultsSummary> getLatestbuildResultSummaries()
BuildResultsSummaryManager
getLatestbuildResultSummaries
in interface BuildResultsSummaryManager
List
of BuildResultsSummary
public java.util.List<ExtendedBuildResultsSummary> getLatestFailedBuildResultSummaries()
BuildResultsSummaryManager
getLatestFailedBuildResultSummaries
in interface BuildResultsSummaryManager
List
of BuildResultsSummary
public long getAverageBuildTime(@NotNull Build build, int numberOfResults)
BuildResultsSummaryManager
getAverageBuildTime
in interface BuildResultsSummaryManager
build
- - must not be nullnumberOfResults
- - How many build results to use in the average. must be greater 0
public void setBuildResultsSummaryDao(BuildResultsSummaryDao buildResultsSummaryDao)
public void setExtendedAuthorManager(ExtendedAuthorManager extendedAuthorManager)
public void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setJiraIssueUtils(JiraIssueUtils jiraIssueUtils)
public void setJiraIssueManager(JiraIssueManager jiraIssueManager)
public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
public void setBuildDao(BuildDao buildDao)
public void setArtifactLinkManager(ArtifactLinkManager artifactLinkManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |