use of com.synopsys.integration.blackduck.api.generated.component.ProjectRequest 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;
}
Aggregations