Search in sources :

Example 1 with SecHubFileStructureDataProvider

use of com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider in project sechub by mercedes-benz.

the class PDSWorkspaceService method resolveFileStructureDataProviderOrNull.

SecHubFileStructureDataProvider resolveFileStructureDataProviderOrNull(UUID jobUUID, PDSJobConfiguration config, ScanType scanType) throws IOException {
    SecHubConfigurationModel model = resolveAndEnsureSecHubConfigurationModel(config);
    if (model == null) {
        return null;
    }
    SecHubFileStructureDataProvider configuration = SecHubFileStructureDataProvider.builder().setScanType(scanType).setModel(model).build();
    return configuration;
}
Also used : SecHubConfigurationModel(com.mercedesbenz.sechub.commons.model.SecHubConfigurationModel) SecHubFileStructureDataProvider(com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider)

Example 2 with SecHubFileStructureDataProvider

use of com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider in project sechub by mercedes-benz.

the class PDSWorkspaceService method extractTarFileUploadsWhenConfigured.

public void extractTarFileUploadsWhenConfigured(UUID jobUUID, PDSJobConfiguration config) throws IOException {
    PDSProductSetup productSetup = resolveProductSetup(config);
    if (!productSetup.isExtractUploads()) {
        return;
    }
    ScanType scanType = productSetup.getScanType();
    SecHubFileStructureDataProvider provider = resolveFileStructureDataProviderOrNull(jobUUID, config, scanType);
    exractUploadedTarFiles(jobUUID, true, provider);
}
Also used : ScanType(com.mercedesbenz.sechub.commons.model.ScanType) SecHubFileStructureDataProvider(com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider) PDSProductSetup(com.mercedesbenz.sechub.pds.config.PDSProductSetup)

Example 3 with SecHubFileStructureDataProvider

use of com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider in project sechub by mercedes-benz.

the class PDSWorkspaceService method extractZipFileUploadsWhenConfigured.

public void extractZipFileUploadsWhenConfigured(UUID jobUUID, PDSJobConfiguration config) throws IOException {
    PDSProductSetup productSetup = resolveProductSetup(config);
    if (!productSetup.isExtractUploads()) {
        return;
    }
    ScanType scanType = productSetup.getScanType();
    SecHubFileStructureDataProvider provider = resolveFileStructureDataProviderOrNull(jobUUID, config, scanType);
    extractUploadedZipFiles(jobUUID, true, provider);
}
Also used : ScanType(com.mercedesbenz.sechub.commons.model.ScanType) SecHubFileStructureDataProvider(com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider) PDSProductSetup(com.mercedesbenz.sechub.pds.config.PDSProductSetup)

Aggregations

SecHubFileStructureDataProvider (com.mercedesbenz.sechub.commons.archive.SecHubFileStructureDataProvider)3 ScanType (com.mercedesbenz.sechub.commons.model.ScanType)2 PDSProductSetup (com.mercedesbenz.sechub.pds.config.PDSProductSetup)2 SecHubConfigurationModel (com.mercedesbenz.sechub.commons.model.SecHubConfigurationModel)1