* Constructor used by Pico when there is no {@link PostProjectAnalysisTask} in the container.
*/
public PostProjectAnalysisTasksExecutor(org.sonar.ce.task.CeTask ceTask,
- AnalysisMetadataHolder analysisMetadataHolder,
- QualityGateHolder qualityGateHolder, QualityGateStatusHolder qualityGateStatusHolder,
- BatchReportReader reportReader, System2 system2) {
+ AnalysisMetadataHolder analysisMetadataHolder,
+ QualityGateHolder qualityGateHolder, QualityGateStatusHolder qualityGateStatusHolder,
+ BatchReportReader reportReader, System2 system2) {
this(ceTask, analysisMetadataHolder, qualityGateHolder, qualityGateStatusHolder, reportReader, system2, null);
}
public PostProjectAnalysisTasksExecutor(org.sonar.ce.task.CeTask ceTask,
- AnalysisMetadataHolder analysisMetadataHolder,
- QualityGateHolder qualityGateHolder, QualityGateStatusHolder qualityGateStatusHolder,
- BatchReportReader reportReader, System2 system2,
- @Nullable PostProjectAnalysisTask[] postProjectAnalysisTasks) {
+ AnalysisMetadataHolder analysisMetadataHolder,
+ QualityGateHolder qualityGateHolder, QualityGateStatusHolder qualityGateStatusHolder,
+ BatchReportReader reportReader, System2 system2,
+ @Nullable PostProjectAnalysisTask[] postProjectAnalysisTasks) {
this.analysisMetadataHolder = analysisMetadataHolder;
this.qualityGateHolder = qualityGateHolder;
this.qualityGateStatusHolder = qualityGateStatusHolder;
ScannerContextImpl.from(reportReader.readContextProperties()),
status == SUCCESS ? createQualityGate() : null,
createBranch(),
- reportReader.readMetadata().getScmRevisionId()
- );
+ reportReader.readMetadata().getScmRevisionId());
}
@CheckForNull
if (analysisDate != null) {
return of(new AnalysisImpl(analysisMetadataHolder.getUuid(), analysisDate));
- } else {
- return empty();
}
+ return empty();
}
private static Project createProject(org.sonar.ce.task.CeTask ceTask) {
.selectByComponentUuidsAndMetricKeys(dbSession, projectUuids, singletonList(CoreMetrics.ALERT_STATUS_KEY));
data.setProjects(projects)
- .setProjectLinks(projectLinks)
- .setSnapshots(snapshots)
- .setQualityGates(qualityGates)
- .setTotalNbOfProjects(searchResult.total);
+ .setProjectLinks(projectLinks)
+ .setSnapshots(snapshots)
+ .setQualityGates(qualityGates)
+ .setTotalNbOfProjects(searchResult.total);
return data.build();
}
List<Long> componentIds = dbClient.roleDao().selectComponentIdsByPermissionAndUserId(dbSession, UserRole.ADMIN, userId);
ComponentQuery dbQuery = ComponentQuery.builder()
- .setQualifiers(Qualifiers.PROJECT)
- .setComponentIds(ImmutableSet.copyOf(componentIds.subList(0, Math.min(componentIds.size(), DatabaseUtils.PARTITION_SIZE_FOR_ORACLE))))
- .build();
+ .setQualifiers(Qualifiers.PROJECT)
+ .setComponentIds(ImmutableSet.copyOf(componentIds.subList(0, Math.min(componentIds.size(), DatabaseUtils.PARTITION_SIZE_FOR_ORACLE))))
+ .build();
return new ProjectsResult(
- dbClient.componentDao().selectByQuery(dbSession, dbQuery, offset(request.getPage(), request.getPageSize()), request.getPageSize()),
- dbClient.componentDao().countByQuery(dbSession, dbQuery));
+ dbClient.componentDao().selectByQuery(dbSession, dbQuery, offset(request.getPage(), request.getPageSize()), request.getPageSize()),
+ dbClient.componentDao().countByQuery(dbSession, dbQuery));
}
private static class ProjectsResult {