Search in sources :

Example 1 with ProjectService

use of com.synopsys.integration.blackduck.service.ProjectService in project hub-detect by blackducksoftware.

the class DetectProjectService method createOrUpdateHubProject.

public ProjectVersionWrapper createOrUpdateHubProject(final NameVersion projectNameVersion, final String applicationId) throws IntegrationException, DetectUserFriendlyException, InterruptedException {
    final ProjectService projectService = blackDuckServicesFactory.createProjectService();
    final BlackDuckService hubService = blackDuckServicesFactory.createBlackDuckService();
    final ProjectRequest projectRequest = createProjectRequest(projectNameVersion, projectService, hubService);
    final boolean forceUpdate = detectProjectServiceOptions.isForceProjectVersionUpdate();
    final ProjectVersionWrapper projectVersionWrapper = projectService.syncProjectAndVersion(projectRequest, forceUpdate);
    setApplicationId(projectVersionWrapper.getProjectView(), applicationId);
    return projectVersionWrapper;
}
Also used : ProjectRequest(com.synopsys.integration.blackduck.api.generated.component.ProjectRequest) ProjectService(com.synopsys.integration.blackduck.service.ProjectService) ProjectVersionWrapper(com.synopsys.integration.blackduck.service.model.ProjectVersionWrapper) BlackDuckService(com.synopsys.integration.blackduck.service.BlackDuckService)

Aggregations

ProjectRequest (com.synopsys.integration.blackduck.api.generated.component.ProjectRequest)1 BlackDuckService (com.synopsys.integration.blackduck.service.BlackDuckService)1 ProjectService (com.synopsys.integration.blackduck.service.ProjectService)1 ProjectVersionWrapper (com.synopsys.integration.blackduck.service.model.ProjectVersionWrapper)1