Search in sources :

Example 1 with SignatureScannerService

use of com.blackducksoftware.integration.hub.service.SignatureScannerService in project hub-detect by blackducksoftware.

the class HubManager method updateHubProjectVersion.

public ProjectVersionView updateHubProjectVersion(final DetectProject detectProject, final List<File> createdBdioFiles) throws IntegrationException {
    final ProjectService projectService = hubServiceWrapper.createProjectService();
    ProjectVersionView projectVersionView = ensureProjectVersionExists(detectProject, projectService);
    if (null != createdBdioFiles && !createdBdioFiles.isEmpty()) {
        final HubServerConfig hubServerConfig = hubServiceWrapper.getHubServerConfig();
        final CodeLocationService codeLocationService = hubServiceWrapper.createCodeLocationService();
        bdioUploader.uploadBdioFiles(hubServerConfig, codeLocationService, detectProject, createdBdioFiles);
    } else {
        logger.debug("Did not create any bdio files.");
    }
    if (!detectConfiguration.getHubSignatureScannerDisabled()) {
        final HubServerConfig hubServerConfig = hubServiceWrapper.getHubServerConfig();
        final SignatureScannerService signatureScannerService = hubServiceWrapper.createSignatureScannerService();
        final ProjectVersionView scanProject = hubSignatureScanner.scanPaths(hubServerConfig, signatureScannerService, detectProject);
        if (null == projectVersionView) {
            projectVersionView = scanProject;
        }
    }
    return projectVersionView;
}
Also used : CodeLocationService(com.blackducksoftware.integration.hub.service.CodeLocationService) SignatureScannerService(com.blackducksoftware.integration.hub.service.SignatureScannerService) HubServerConfig(com.blackducksoftware.integration.hub.configuration.HubServerConfig) ProjectVersionView(com.blackducksoftware.integration.hub.api.generated.view.ProjectVersionView) ProjectService(com.blackducksoftware.integration.hub.service.ProjectService)

Aggregations

ProjectVersionView (com.blackducksoftware.integration.hub.api.generated.view.ProjectVersionView)1 HubServerConfig (com.blackducksoftware.integration.hub.configuration.HubServerConfig)1 CodeLocationService (com.blackducksoftware.integration.hub.service.CodeLocationService)1 ProjectService (com.blackducksoftware.integration.hub.service.ProjectService)1 SignatureScannerService (com.blackducksoftware.integration.hub.service.SignatureScannerService)1