Class AgentBuildResultsSummaryManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.resultsummary.AgentBuildResultsSummaryManagerImpl
-
- All Implemented Interfaces:
AgentResultsSummaryManager
public class AgentBuildResultsSummaryManagerImpl extends Object implements AgentResultsSummaryManager
-
-
Constructor Summary
Constructors Constructor Description AgentBuildResultsSummaryManagerImpl(@NotNull AgentBuildResultsSummaryDao agentBuildResultsSummaryDao, @NotNull BuildResultsSummaryDao buildResultsSummaryDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calculateUtilisedAgentTime(@org.jetbrains.annotations.NotNull long agentId)
Calculates the time spent performing builds of an agent.int
countBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
int
countFailedBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
@NotNull List<BuildResultsSummary>
getAllBuildResultsSummariesForAgent(@NotNull Long agentId)
Returns allBuildResultsSummary
for the passedBuildAgent
's id.@NotNull List<BuildResultsSummary>
getBuildResultsSummariesForAgent(@NotNull Long agentId, int firstResult, int maxResult)
Returns a list ofBuildResultsSummary
for the passedBuildAgent
's id in the given range.@Nullable BuildResultsSummary
getLastBuildForAgent(@NotNull String planKey, @NotNull Long agentId)
@Nullable BuildResultsSummary
getLastSuccessfulBuildForAgent(@NotNull String planKey, @NotNull Long agentId)
@NotNull List<BuildResultsSummary>
getLatestSummariesForAgent(@NotNull Long agentId, int maxCount)
Retrieves n last build summaries for agent.@NotNull List<BuildResultsSummary>
getLatestSummariesForAgent(@NotNull Long agentId, @NotNull Date fromDate)
Retrieves build summaries for agent id not older than certain date.@Nullable BuildResultsSummary
getLatestSummaryForAgent(long agentId)
long
getNumberOfSummariesForAgent(long agentId)
Retrieves the total count of build summaries executed on an agent.
-
-
-
Constructor Detail
-
AgentBuildResultsSummaryManagerImpl
public AgentBuildResultsSummaryManagerImpl(@NotNull @NotNull AgentBuildResultsSummaryDao agentBuildResultsSummaryDao, @NotNull @NotNull BuildResultsSummaryDao buildResultsSummaryDao)
-
-
Method Detail
-
getLastBuildForAgent
@Nullable public @Nullable BuildResultsSummary getLastBuildForAgent(@NotNull @NotNull String planKey, @NotNull @NotNull Long agentId)
- Specified by:
getLastBuildForAgent
in interfaceAgentResultsSummaryManager
-
getLastSuccessfulBuildForAgent
@Nullable public @Nullable BuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull @NotNull String planKey, @NotNull @NotNull Long agentId)
- Specified by:
getLastSuccessfulBuildForAgent
in interfaceAgentResultsSummaryManager
-
countBuildResultsSummariesForAgent
public int countBuildResultsSummariesForAgent(@NotNull @NotNull BuildAgent buildAgent)
- Specified by:
countBuildResultsSummariesForAgent
in interfaceAgentResultsSummaryManager
-
countFailedBuildResultsSummariesForAgent
public int countFailedBuildResultsSummariesForAgent(@NotNull @NotNull BuildAgent buildAgent)
- Specified by:
countFailedBuildResultsSummariesForAgent
in interfaceAgentResultsSummaryManager
-
getAllBuildResultsSummariesForAgent
@NotNull public @NotNull List<BuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull @NotNull Long agentId)
Description copied from interface:AgentResultsSummaryManager
Returns allBuildResultsSummary
for the passedBuildAgent
's id.- Specified by:
getAllBuildResultsSummariesForAgent
in interfaceAgentResultsSummaryManager
- Parameters:
agentId
- id of the agent to get the result summaries for- Returns:
- all
BuildResultsSummary
for the passedBuildAgent
's id.
-
getBuildResultsSummariesForAgent
@NotNull public @NotNull List<BuildResultsSummary> getBuildResultsSummariesForAgent(@NotNull @NotNull Long agentId, int firstResult, int maxResult)
Description copied from interface:AgentResultsSummaryManager
Returns a list ofBuildResultsSummary
for the passedBuildAgent
's id in the given range.- Specified by:
getBuildResultsSummariesForAgent
in interfaceAgentResultsSummaryManager
- Returns:
-
getNumberOfSummariesForAgent
public long getNumberOfSummariesForAgent(long agentId)
Description copied from interface:AgentResultsSummaryManager
Retrieves the total count of build summaries executed on an agent.- Specified by:
getNumberOfSummariesForAgent
in interfaceAgentResultsSummaryManager
- Parameters:
agentId
- id of an agent- Returns:
- number of summaries
-
getLatestSummariesForAgent
@NotNull public @NotNull List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull @NotNull Long agentId, @NotNull @NotNull Date fromDate)
Description copied from interface:AgentResultsSummaryManager
Retrieves build summaries for agent id not older than certain date.- Specified by:
getLatestSummariesForAgent
in interfaceAgentResultsSummaryManager
- Parameters:
agentId
- id of an agentfromDate
- beginning of the search period- Returns:
List
ofBuildResultsSummary
-
getLatestSummariesForAgent
@NotNull public @NotNull List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull @NotNull Long agentId, int maxCount)
Description copied from interface:AgentResultsSummaryManager
Retrieves n last build summaries for agent.- Specified by:
getLatestSummariesForAgent
in interfaceAgentResultsSummaryManager
- Parameters:
agentId
- id of an agentmaxCount
- maximum number of elements to retrieve- Returns:
List
ofBuildResultsSummary
-
getLatestSummaryForAgent
@Nullable public @Nullable BuildResultsSummary getLatestSummaryForAgent(long agentId)
- Specified by:
getLatestSummaryForAgent
in interfaceAgentResultsSummaryManager
-
calculateUtilisedAgentTime
public long calculateUtilisedAgentTime(@NotNull @org.jetbrains.annotations.NotNull long agentId)
Description copied from interface:AgentResultsSummaryManager
Calculates the time spent performing builds of an agent.- Specified by:
calculateUtilisedAgentTime
in interfaceAgentResultsSummaryManager
- Returns:
-
-