com.atlassian.bamboo.resultsummary
Class BuildResultsSummaryManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl
All Implemented Interfaces:
BuildResultsSummaryManager

public class BuildResultsSummaryManagerImpl
extends java.lang.Object
implements BuildResultsSummaryManager


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)
           
<T extends BuildResultsSummary>
java.util.List<T>
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

BuildResultsSummaryManagerImpl

public BuildResultsSummaryManagerImpl()
Method Detail

getAllPendingBuildResultSummaries

@NotNull
public java.util.Collection<BuildResultsSummary> getAllPendingBuildResultSummaries()
Description copied from interface: BuildResultsSummaryManager
Returns all the BuildResultsSummary in a BuildState.PENDING state

Specified by:
getAllPendingBuildResultSummaries in interface BuildResultsSummaryManager
Returns:
summaries

createBuildResultSummary

@NotNull
public ExtendedBuildResultsSummary createBuildResultSummary(BuildContext buildContext)
                                                     throws BuildResultCreationException
Description copied from interface: BuildResultsSummaryManager
Create build results summary before build execution starts. BuildResultSummary is partially initialized, some fields could be initialized after build is completed.

Specified by:
createBuildResultSummary in interface BuildResultsSummaryManager
Returns:
Throws:
BuildResultCreationException

updateBuildSummaryFromBuildResults

@NotNull
public ExtendedBuildResultsSummary updateBuildSummaryFromBuildResults(BuildContext buildContext,
                                                                              CurrentlyBuilding currentlyBuilding,
                                                                              BuildResults buildResults)
Description copied from interface: BuildResultsSummaryManager
Updates BuildResultsSummary after build is completed. All fiedls are initialized at this moment.

Specified by:
updateBuildSummaryFromBuildResults in interface BuildResultsSummaryManager
Returns:
updated build result summary

updateBuildState

@NotNull
public ExtendedBuildResultsSummary updateBuildState(@NotNull
                                                            BuildResultsSummary buildResultsSummary,
                                                            @NotNull
                                                            BuildState buildState)
Description copied from interface: BuildResultsSummaryManager
Update the BuildState of the BuildResultsSummary

Specified by:
updateBuildState in interface BuildResultsSummaryManager
Returns:
updated

getBreakingBuild

@Nullable
public BuildResultsSummary getBreakingBuild(BuildResultsSummary buildResultsSummary)
Specified by:
getBreakingBuild in interface BuildResultsSummaryManager

getFixingBuild

@Nullable
public BuildResultsSummary getFixingBuild(BuildResultsSummary buildResultsSummary)
Description copied from interface: BuildResultsSummaryManager
Returns the first successful BuildResultsSummary for given BuildResultsSummary. The input build is returned if it is successful.

Specified by:
getFixingBuild in interface BuildResultsSummaryManager
Returns:
null if there is no fixing build.

getAllBuildResultsSummaries

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getAllBuildResultsSummaries(@NotNull
                                                                                       Build build)
Description copied from interface: BuildResultsSummaryManager
Returns all ExtendedBuildResultsSummary for the passed Build. Sorted by oldest first.

Specified by:
getAllBuildResultsSummaries in interface BuildResultsSummaryManager
Returns:

getAllFailedResultsSummaries

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getAllFailedResultsSummaries(@NotNull
                                                                                        Build build)
Description copied from interface: BuildResultsSummaryManager
Returns all Failed ExtendedBuildResultsSummary for the passed Build. Sorted by oldest first.

Specified by:
getAllFailedResultsSummaries in interface BuildResultsSummaryManager
Returns:

getLastNBuildResultsSummaries

@NotNull
public <T extends BuildResultsSummary> java.util.List<T> getLastNBuildResultsSummaries(@NotNull
                                                                                               Build build,
                                                                                               int numberOfResults)
Description copied from interface: BuildResultsSummaryManager
Returns the most recent n build results. Sorted by newest first.

Specified by:
getLastNBuildResultsSummaries in interface BuildResultsSummaryManager
numberOfResults - must be > 0
Returns:

getLastOrNBuildResultsSummary

@Nullable
public ExtendedBuildResultsSummary getLastOrNBuildResultsSummary(@NotNull
                                                                          Build build,
                                                                          @Nullable
                                                                          java.lang.String buildNumber)
Specified by:
getLastOrNBuildResultsSummary in interface BuildResultsSummaryManager

getLastNFailedResultsSummaries

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getLastNFailedResultsSummaries(@NotNull
                                                                                          Build build,
                                                                                          int numberOfResults)
Description copied from interface: BuildResultsSummaryManager
Returns the most recent n failed build results. Sorted by newest first.

Specified by:
getLastNFailedResultsSummaries in interface BuildResultsSummaryManager
numberOfResults - must be > 0
Returns:

findBuildResultsSummaries

@NotNull
public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummaries(@NotNull
                                                                                     BuildResultsSummaryCriteria criteria)
Description copied from interface: BuildResultsSummaryManager
Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria

Specified by:
findBuildResultsSummaries in interface BuildResultsSummaryManager
Parameters:
criteria - @NotNull
Returns:
List of ExtendedBuildResultsSummary

findBuildResultsSummariesForBuild

public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesForBuild(@NotNull
                                                                                     Build build,
                                                                                     @NotNull
                                                                                     BuildResultsSummaryCriteria criteria)
Specified by:
findBuildResultsSummariesForBuild in interface BuildResultsSummaryManager

countBuildResultsSummaries

public int countBuildResultsSummaries()
Description copied from interface: BuildResultsSummaryManager
Returns the number of results saved

Specified by:
countBuildResultsSummaries in interface BuildResultsSummaryManager
Returns:
results

countBuildResultsSummaries

public int countBuildResultsSummaries(@Nullable
                                      java.lang.String planKey)
Description copied from interface: BuildResultsSummaryManager
Returns the number of results saved for the given Build

Specified by:
countBuildResultsSummaries in interface BuildResultsSummaryManager
Returns:
results

findBuildResultsSummariesByJiraIssues

@NotNull
public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable
                                                                                                 java.util.List<java.lang.String> issueKeys)
Specified by:
findBuildResultsSummariesByJiraIssues in interface BuildResultsSummaryManager

findBuildResultsSummariesByProjectKey

@NotNull
public java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable
                                                                                                 java.lang.String projectKey)
Specified by:
findBuildResultsSummariesByProjectKey in interface BuildResultsSummaryManager

findJiraIssuesForBuildResults

@NotNull
public java.util.List<LinkedJiraIssue> findJiraIssuesForBuildResults(@NotNull
                                                                             java.util.List<BuildResultsSummary> buildResults)
Description copied from interface: BuildResultsSummaryManager
Retrieves a list of LinkedJiraIssue linked to the given build result summaries

Specified by:
findJiraIssuesForBuildResults in interface BuildResultsSummaryManager
Returns:

findJiraIssuesForBuild

@NotNull
public java.util.List<LinkedJiraIssue> findJiraIssuesForBuild(@NotNull
                                                                      Build build)
Description copied from interface: BuildResultsSummaryManager
Retrieves a list of LinkedJiraIssue linked to the given Build

Specified by:
findJiraIssuesForBuild in interface BuildResultsSummaryManager
Returns:

removeBuildResult

public void removeBuildResult(Build build,
                              int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Removes a build result for a particular build. This fully removes everything about this particular build result and triggers off all appropriate events.

Specified by:
removeBuildResult in interface BuildResultsSummaryManager
Parameters:
build - @NotNull
buildNumber - The build numner.

removeBuildLogs

public void removeBuildLogs(Build build,
                            int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Removes the build log for a given build

Specified by:
removeBuildLogs in interface BuildResultsSummaryManager
Parameters:
build - @NotNull
buildNumber - The build numner.

removeArtifacts

public void removeArtifacts(Build build,
                            int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Removes the artifact for a given build

Specified by:
removeArtifacts in interface BuildResultsSummaryManager
Parameters:
build - @NotNull
buildNumber - The build numner.

getBuildResultsSummaryById

public BuildResultsSummary getBuildResultsSummaryById(long id)
Specified by:
getBuildResultsSummaryById in interface BuildResultsSummaryManager

getBuildResultsSummary

@Nullable
public ExtendedBuildResultsSummary getBuildResultsSummary(Build build,
                                                                   int buildNumber)
Specified by:
getBuildResultsSummary in interface BuildResultsSummaryManager

getNeighbouringSummaries

public java.util.List getNeighbouringSummaries(Build build,
                                               int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Returns all the BuildResultsSummary objects that matches the passed build numbers

Specified by:
getNeighbouringSummaries in interface BuildResultsSummaryManager
Returns:
List of BuildResultsSummary

removeBuildResultsSummariesForBuild

public void removeBuildResultsSummariesForBuild(@NotNull
                                                Build build)
Description copied from interface: BuildResultsSummaryManager
Remove the BuildResultsSummary objects from the database. No events are triggered

Specified by:
removeBuildResultsSummariesForBuild in interface BuildResultsSummaryManager
Parameters:
build - @NotNull

getBuildResultsSummary

@Nullable
public ExtendedBuildResultsSummary getBuildResultsSummary(@NotNull
                                                                   PlanResultKey planResultKey)
Description copied from interface: BuildResultsSummaryManager
Gets the ExtendedBuildResultsSummary represented by the provided PlanResultKey

Specified by:
getBuildResultsSummary in interface BuildResultsSummaryManager
Returns:
buildResultsSummary

getBuildResultsSummary

@Nullable
public ExtendedBuildResultsSummary getBuildResultsSummary(java.lang.String buildKey,
                                                                   int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Gets the ExtendedBuildResultsSummary represented by the provided buildKey and buildNumber

Specified by:
getBuildResultsSummary in interface BuildResultsSummaryManager
Returns:
buildResultsSummary

saveBuildResultsSummary

public void saveBuildResultsSummary(@NotNull
                                    BuildResultsSummary buildResultsSummary)
Description copied from interface: BuildResultsSummaryManager
Saves the specified BuildResultsSummary

Specified by:
saveBuildResultsSummary in interface BuildResultsSummaryManager

getFirstBuildSummary

public BuildResultsSummary getFirstBuildSummary(Build build)
Description copied from interface: BuildResultsSummaryManager
Retreives the first result

Specified by:
getFirstBuildSummary in interface BuildResultsSummaryManager
Returns:
result

getLastBuildSummary

public ExtendedBuildResultsSummary getLastBuildSummary(Build build)
Description copied from interface: BuildResultsSummaryManager
Retreives the last build result

Specified by:
getLastBuildSummary in interface BuildResultsSummaryManager
Returns:
result

getLastBuildSummary

public ExtendedBuildResultsSummary getLastBuildSummary(java.lang.String planKey)
Specified by:
getLastBuildSummary in interface BuildResultsSummaryManager

getLastSuccessfulBuildSummary

public ExtendedBuildResultsSummary getLastSuccessfulBuildSummary(@NotNull
                                                                 java.lang.String planKey)
Specified by:
getLastSuccessfulBuildSummary in interface BuildResultsSummaryManager

getAllBuildResultsSummariesForAgent

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull
                                                                                               java.lang.Long agentId)
Description copied from interface: BuildResultsSummaryManager
Returns all ExtendedBuildResultsSummary for the passed BuildAgent's id.

Specified by:
getAllBuildResultsSummariesForAgent in interface BuildResultsSummaryManager
Returns:

getLastBuildForAgent

@Nullable
public ExtendedBuildResultsSummary getLastBuildForAgent(@NotNull
                                                                 java.lang.String planKey,
                                                                 @NotNull
                                                                 java.lang.Long agentId)
Specified by:
getLastBuildForAgent in interface BuildResultsSummaryManager

getLastBuildForImageConfiguration

@Nullable
public ExtendedBuildResultsSummary getLastBuildForImageConfiguration(@NotNull
                                                                              java.lang.String planKey,
                                                                              @NotNull
                                                                              ElasticImageConfiguration configuration)
Specified by:
getLastBuildForImageConfiguration in interface BuildResultsSummaryManager

getLastSuccessfulBuildForAgent

@Nullable
public ExtendedBuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull
                                                                           java.lang.String planKey,
                                                                           @NotNull
                                                                           java.lang.Long agentId)
Specified by:
getLastSuccessfulBuildForAgent in interface BuildResultsSummaryManager

getLastSuccessfulBuildForImageConfiguration

@Nullable
public ExtendedBuildResultsSummary getLastSuccessfulBuildForImageConfiguration(@NotNull
                                                                                        java.lang.String planKey,
                                                                                        @NotNull
                                                                                        ElasticImageConfiguration configuration)
Specified by:
getLastSuccessfulBuildForImageConfiguration in interface BuildResultsSummaryManager

countBuildResultsSummariesForAgent

public int countBuildResultsSummariesForAgent(@NotNull
                                              BuildAgent buildAgent)
Specified by:
countBuildResultsSummariesForAgent in interface BuildResultsSummaryManager

countFailedBuildResultsSummariesForAgent

public int countFailedBuildResultsSummariesForAgent(@NotNull
                                                    BuildAgent buildAgent)
Specified by:
countFailedBuildResultsSummariesForAgent in interface BuildResultsSummaryManager

findLastSuccessfulBuildResultBefore

@Nullable
public ExtendedBuildResultsSummary findLastSuccessfulBuildResultBefore(@NotNull
                                                                                Build build,
                                                                                int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the last successful ExtendedBuildResultsSummary before buildNumber

Specified by:
findLastSuccessfulBuildResultBefore in interface BuildResultsSummaryManager
Returns:
buildResult

findLastBuildResultBefore

@Nullable
public ExtendedBuildResultsSummary findLastBuildResultBefore(@NotNull
                                                                      Build build,
                                                                      int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the last successful or failing ExtendedBuildResultsSummary before buildNumber

Specified by:
findLastBuildResultBefore in interface BuildResultsSummaryManager
Returns:

findLastBuildResultBefore

@Nullable
public ExtendedBuildResultsSummary findLastBuildResultBefore(@NotNull
                                                                      java.lang.String buildKey,
                                                                      int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the last successful or failing ExtendedBuildResultsSummary before buildNumber

Specified by:
findLastBuildResultBefore in interface BuildResultsSummaryManager
Returns:

findFirstFailedBuildResultAfter

@Nullable
public ExtendedBuildResultsSummary findFirstFailedBuildResultAfter(@NotNull
                                                                            java.lang.String buildKey,
                                                                            int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the first failed ExtendedBuildResultsSummary after buildNumber

Specified by:
findFirstFailedBuildResultAfter in interface BuildResultsSummaryManager
Returns:
buildResult

findFirstSuccessfulBuildResultAfter

@Nullable
public ExtendedBuildResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull
                                                                                java.lang.String buildKey,
                                                                                int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the last successful ExtendedBuildResultsSummary after buildNumber

Specified by:
findFirstSuccessfulBuildResultAfter in interface BuildResultsSummaryManager
Returns:
buildResult

findLastFailingBuildResultBefore

@Nullable
public ExtendedBuildResultsSummary findLastFailingBuildResultBefore(@NotNull
                                                                             Build build,
                                                                             int buildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the last failing ExtendedBuildResultsSummary before buildNumber

Specified by:
findLastFailingBuildResultBefore in interface BuildResultsSummaryManager
Returns:
buildResult

findFirstFailedBuildResultBetween

@Nullable
public ExtendedBuildResultsSummary findFirstFailedBuildResultBetween(@NotNull
                                                                              Build build,
                                                                              int lowerBuildNumber,
                                                                              int upperBuildNumber)
Description copied from interface: BuildResultsSummaryManager
Finds the first failed build between the upper and lower build numbers inclusively.

Specified by:
findFirstFailedBuildResultBetween in interface BuildResultsSummaryManager
Returns:
buildResults

getLatestSummariesForAgent

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getLatestSummariesForAgent(@NotNull
                                                                                      java.lang.Long agentId,
                                                                                      @NotNull
                                                                                      java.util.Date fromDate)
Description copied from interface: BuildResultsSummaryManager
Retrieves build summaries for agent id not older than certain date.

Specified by:
getLatestSummariesForAgent in interface BuildResultsSummaryManager
Parameters:
agentId - id of an agent
fromDate - beginning of the search period
Returns:
List of ExtendedBuildResultsSummary

getLatestSummariesForAgent

@NotNull
public java.util.List<ExtendedBuildResultsSummary> getLatestSummariesForAgent(@NotNull
                                                                                      java.lang.Long agentId,
                                                                                      int maxCount)
Description copied from interface: BuildResultsSummaryManager
Retrieves n last build summaries for agent.

Specified by:
getLatestSummariesForAgent in interface BuildResultsSummaryManager
Parameters:
agentId - id of an agent
maxCount - maximum number of elements to retrieve
Returns:
List of ExtendedBuildResultsSummary

getNumberOfResults

public long getNumberOfResults(Build build)
Specified by:
getNumberOfResults in interface BuildResultsSummaryManager

getLatestbuildResultSummaries

public java.util.List<ExtendedBuildResultsSummary> getLatestbuildResultSummaries()
Description copied from interface: BuildResultsSummaryManager
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

Specified by:
getLatestbuildResultSummaries in interface BuildResultsSummaryManager
Returns:
List of BuildResultsSummary

getLatestFailedBuildResultSummaries

public java.util.List<ExtendedBuildResultsSummary> getLatestFailedBuildResultSummaries()
Description copied from interface: BuildResultsSummaryManager
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

Specified by:
getLatestFailedBuildResultSummaries in interface BuildResultsSummaryManager
Returns:
List of BuildResultsSummary

getAverageBuildTime

public long getAverageBuildTime(@NotNull
                                Build build,
                                int numberOfResults)
Description copied from interface: BuildResultsSummaryManager
Returns average build duration for given number of builds

Specified by:
getAverageBuildTime in interface BuildResultsSummaryManager
Parameters:
build - - must not be null
numberOfResults - - How many build results to use in the average. must be greater 0
Returns:
Average build time. 0 if no build found.

setBuildResultsSummaryDao

public void setBuildResultsSummaryDao(BuildResultsSummaryDao buildResultsSummaryDao)

setExtendedAuthorManager

public void setExtendedAuthorManager(ExtendedAuthorManager extendedAuthorManager)

setBuildResultsIndexer

public void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)

setEventManager

public void setEventManager(com.atlassian.event.EventManager eventManager)

setJiraIssueUtils

public void setJiraIssueUtils(JiraIssueUtils jiraIssueUtils)

setJiraIssueManager

public void setJiraIssueManager(JiraIssueManager jiraIssueManager)

setBuildDefinitionManager

public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)

setBuildDao

public void setBuildDao(BuildDao buildDao)

setArtifactLinkManager

public void setArtifactLinkManager(ArtifactLinkManager artifactLinkManager)


Copyright © 2010 Atlassian. All Rights Reserved.