Search in sources :

Example 1 with OverviewSummaryReporter

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);
    }
}
Also used : DetectorEvaluationTree(com.synopsys.integration.detector.base.DetectorEvaluationTree) DetailedSearchSummaryReporter(com.synopsys.integration.detect.workflow.report.DetailedSearchSummaryReporter) OverviewSummaryReporter(com.synopsys.integration.detect.workflow.report.OverviewSummaryReporter) SearchSummaryReporter(com.synopsys.integration.detect.workflow.report.SearchSummaryReporter) DetailedSearchSummaryReporter(com.synopsys.integration.detect.workflow.report.DetailedSearchSummaryReporter)

Aggregations

DetailedSearchSummaryReporter (com.synopsys.integration.detect.workflow.report.DetailedSearchSummaryReporter)1 OverviewSummaryReporter (com.synopsys.integration.detect.workflow.report.OverviewSummaryReporter)1 SearchSummaryReporter (com.synopsys.integration.detect.workflow.report.SearchSummaryReporter)1 DetectorEvaluationTree (com.synopsys.integration.detector.base.DetectorEvaluationTree)1