Search in sources :

Example 1 with Bdio2ContentExtractor

use of com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor in project blackduck-common by blackducksoftware.

the class BlackDuckServicesFactory method createIntelligentPersistenceService.

public IntelligentPersistenceService createIntelligentPersistenceService() {
    Bdio2StreamUploader bdio2Uploader = new Bdio2StreamUploader(blackDuckApiClient, apiDiscovery, logger, ApiDiscovery.INTELLIGENT_PERSISTENCE_SCANS_PATH, IntelligentPersistenceService.CONTENT_TYPE);
    Bdio2FileUploadService bdio2FileUploadService = new Bdio2FileUploadService(blackDuckApiClient, apiDiscovery, logger, new Bdio2ContentExtractor(), bdio2Uploader);
    IntelligentPersistenceBatchRunner batchRunner = new IntelligentPersistenceBatchRunner(logger, executorService, bdio2FileUploadService);
    return new IntelligentPersistenceService(blackDuckApiClient, apiDiscovery, logger, batchRunner, createCodeLocationCreationService());
}
Also used : Bdio2FileUploadService(com.synopsys.integration.blackduck.bdio2.Bdio2FileUploadService) Bdio2ContentExtractor(com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor) IntelligentPersistenceService(com.synopsys.integration.blackduck.codelocation.intelligentpersistence.IntelligentPersistenceService) IntelligentPersistenceBatchRunner(com.synopsys.integration.blackduck.codelocation.intelligentpersistence.IntelligentPersistenceBatchRunner) Bdio2StreamUploader(com.synopsys.integration.blackduck.bdio2.Bdio2StreamUploader)

Example 2 with Bdio2ContentExtractor

use of com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor in project blackduck-common by blackducksoftware.

the class Bdio2ContentExtractorTest method testReadValidFile.

@Test
public void testReadValidFile() throws Exception {
    File bdioFile = new File(getClass().getResource("/bdio/scans/developerScanTest.bdio").getFile());
    Bdio2ContentExtractor reader = new Bdio2ContentExtractor();
    List<BdioFileContent> contents = reader.extractContent(bdioFile);
    assertFalse(contents.isEmpty());
}
Also used : BdioFileContent(com.synopsys.integration.blackduck.bdio2.model.BdioFileContent) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 3 with Bdio2ContentExtractor

use of com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor in project synopsys-detect by blackducksoftware.

the class DetectRapidScanService method fromBlackDuckServicesFactory.

public static DetectRapidScanService fromBlackDuckServicesFactory(DirectoryManager directoryManager, BlackDuckServicesFactory blackDuckServicesFactory) {
    RapidScanConfigBdio2StreamUploader bdio2Uploader = new RapidScanConfigBdio2StreamUploader(blackDuckServicesFactory.getBlackDuckApiClient(), blackDuckServicesFactory.getApiDiscovery(), blackDuckServicesFactory.getLogger(), ApiDiscovery.DEVELOPER_SCANS_PATH, CONTENT_TYPE);
    RapidScanUploadService bdio2FileUploadService = new RapidScanUploadService(blackDuckServicesFactory.getBlackDuckApiClient(), blackDuckServicesFactory.getApiDiscovery(), blackDuckServicesFactory.getLogger(), new Bdio2ContentExtractor(), bdio2Uploader);
    return new DetectRapidScanService(bdio2FileUploadService, directoryManager);
}
Also used : Bdio2ContentExtractor(com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor)

Aggregations

Bdio2ContentExtractor (com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor)2 Bdio2FileUploadService (com.synopsys.integration.blackduck.bdio2.Bdio2FileUploadService)1 Bdio2StreamUploader (com.synopsys.integration.blackduck.bdio2.Bdio2StreamUploader)1 BdioFileContent (com.synopsys.integration.blackduck.bdio2.model.BdioFileContent)1 IntelligentPersistenceBatchRunner (com.synopsys.integration.blackduck.codelocation.intelligentpersistence.IntelligentPersistenceBatchRunner)1 IntelligentPersistenceService (com.synopsys.integration.blackduck.codelocation.intelligentpersistence.IntelligentPersistenceService)1 File (java.io.File)1 Test (org.junit.jupiter.api.Test)1