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);
}
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);
}
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());
}
}
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);
}
Aggregations