Search in sources :

Example 1 with DetectExtractionEnvironment

use of com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment in project synopsys-detect by blackducksoftware.

the class ExtractionEnvironmentProvider method createExtractionEnvironment.

public ExtractionEnvironment createExtractionEnvironment(String name) {
    ExtractionId extractionId = new ExtractionId(name, count);
    count = count + 1;
    File outputDirectory = directoryManager.getExtractionOutputDirectory(extractionId);
    return new DetectExtractionEnvironment(outputDirectory, extractionId);
}
Also used : DetectExtractionEnvironment(com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment) File(java.io.File)

Example 2 with DetectExtractionEnvironment

use of com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment in project synopsys-detect by blackducksoftware.

the class ExtractionEnvironmentProvider method createExtractionEnvironment.

public ExtractionEnvironment createExtractionEnvironment(DetectorEvaluation detectorEvaluation) {
    ExtractionId extractionId = new ExtractionId(detectorEvaluation.getDetectorType(), count);
    count = count + 1;
    File outputDirectory = directoryManager.getExtractionOutputDirectory(extractionId);
    return new DetectExtractionEnvironment(outputDirectory, extractionId);
}
Also used : DetectExtractionEnvironment(com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment) File(java.io.File)

Example 3 with DetectExtractionEnvironment

use of com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment in project synopsys-detect by blackducksoftware.

the class CodeLocationReporter method writeBomToolEvaluationDetails.

private void writeBomToolEvaluationDetails(ReportWriter writer, DetectorEvaluation evaluation, Map<DetectCodeLocation, Integer> dependencyCounts, Map<CodeLocation, DetectCodeLocation> detectCodeLocationMap, Map<DetectCodeLocation, String> codeLocationNameMap) {
    for (CodeLocation codeLocation : evaluation.getExtraction().getCodeLocations()) {
        DetectExtractionEnvironment detectExtractionEnvironment = (DetectExtractionEnvironment) evaluation.getExtractionEnvironment();
        DetectCodeLocation detectCodeLocation = detectCodeLocationMap.get(codeLocation);
        writeCodeLocationDetails(writer, detectCodeLocation, dependencyCounts.get(detectCodeLocation), codeLocationNameMap.get(detectCodeLocation), detectExtractionEnvironment.getExtractionId().toUniqueString());
    }
}
Also used : DetectExtractionEnvironment(com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment) CodeLocation(com.synopsys.integration.detectable.detectable.codelocation.CodeLocation) DetectCodeLocation(com.synopsys.integration.detect.workflow.codelocation.DetectCodeLocation) DetectCodeLocation(com.synopsys.integration.detect.workflow.codelocation.DetectCodeLocation)

Example 4 with DetectExtractionEnvironment

use of com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment in project synopsys-detect by blackducksoftware.

the class ExtractionLogger method extractionStarted.

public void extractionStarted(DetectorEvaluation detectorEvaluation) {
    DetectExtractionEnvironment detectExtractionEnvironment = (DetectExtractionEnvironment) detectorEvaluation.getExtractionEnvironment();
    Integer i = detectExtractionEnvironment.getExtractionId().getId();
    String progress = Integer.toString((int) Math.floor((i * 100.0f) / extractionCount));
    logger.debug(String.format("Extracting %d of %d (%s%%)", i + 1, extractionCount, progress));
    logger.debug(ReportConstants.SEPARATOR);
    logger.debug("Starting extraction: " + detectorEvaluation.getDetectorType() + " - " + detectorEvaluation.getDetectorRule().getName());
    logger.debug("Identifier: " + detectExtractionEnvironment.getExtractionId().toUniqueString());
    ObjectPrinter.printObjectPrivate(new DebugLogReportWriter(logger), detectorEvaluation.getDetectable());
    logger.debug(ReportConstants.SEPARATOR);
}
Also used : DetectExtractionEnvironment(com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment) DebugLogReportWriter(com.synopsys.integration.detect.workflow.report.writer.DebugLogReportWriter)

Aggregations

DetectExtractionEnvironment (com.synopsys.integration.detect.tool.detector.DetectExtractionEnvironment)4 File (java.io.File)2 DetectCodeLocation (com.synopsys.integration.detect.workflow.codelocation.DetectCodeLocation)1 DebugLogReportWriter (com.synopsys.integration.detect.workflow.report.writer.DebugLogReportWriter)1 CodeLocation (com.synopsys.integration.detectable.detectable.codelocation.CodeLocation)1