use of com.synopsys.integration.detect.workflow.report.OverviewSummaryReporter in project synopsys-detect by blackducksoftware.
the class DiagnosticReportHandler method completedBomToolEvaluations.
public void completedBomToolEvaluations(DetectorToolResult detectorToolResult) {
this.detectorToolResult = detectorToolResult;
DetectorEvaluationTree rootEvaluation;
if (detectorToolResult.getRootDetectorEvaluationTree().isPresent()) {
rootEvaluation = detectorToolResult.getRootDetectorEvaluationTree().get();
} else {
logger.warn("Detectors completed, but no evaluation was found, unable to write detector reports.");
return;
}
try {
SearchSummaryReporter searchReporter = new SearchSummaryReporter();
searchReporter.print(getReportWriter(ReportTypes.SEARCH), rootEvaluation);
} catch (Exception e) {
logger.error("Failed to write search report.", e);
}
try {
DetailedSearchSummaryReporter searchReporter = new DetailedSearchSummaryReporter();
searchReporter.print(getReportWriter(ReportTypes.SEARCH_DETAILED), rootEvaluation);
} catch (Exception e) {
logger.error("Failed to write detailed search report.", e);
}
try {
OverviewSummaryReporter overviewSummaryReporter = new OverviewSummaryReporter();
overviewSummaryReporter.writeReport(getReportWriter(ReportTypes.DETECTOR), rootEvaluation);
} catch (Exception e) {
logger.error("Failed to write detector report.", e);
}
}
Aggregations