use of com.blackducksoftware.integration.hub.service.model.ProjectRequestBuilder in project hub-detect by blackducksoftware.
the class HubManager method ensureProjectVersionExists.
public ProjectVersionView ensureProjectVersionExists(final DetectProject detectProject, final ProjectService projectService) throws IntegrationException {
final ProjectRequestBuilder builder = new ProjectRequestBuilder();
builder.setProjectName(detectProject.getProjectName());
builder.setVersionName(detectProject.getProjectVersionName());
builder.setProjectLevelAdjustments(detectConfiguration.getProjectLevelMatchAdjustments());
builder.setPhase(detectConfiguration.getProjectVersionPhase());
builder.setDistribution(detectConfiguration.getProjectVersionDistribution());
builder.setProjectTier(detectConfiguration.getProjectTier());
builder.setReleaseComments(detectConfiguration.getProjectVersionNotes());
final ProjectRequest projectRequest = builder.build();
final ProjectVersionWrapper projectVersionWrapper = projectService.getProjectVersionAndCreateIfNeeded(projectRequest);
return projectVersionWrapper.getProjectVersionView();
}
use of com.blackducksoftware.integration.hub.service.model.ProjectRequestBuilder in project hub-detect by blackducksoftware.
the class DetectProject method createDefaultProjectRequestBuilder.
public ProjectRequestBuilder createDefaultProjectRequestBuilder(final DetectConfiguration detectConfiguration) {
final ProjectRequestBuilder builder = new ProjectRequestBuilder();
builder.setProjectName(getProjectName());
builder.setVersionName(getProjectVersionName());
builder.setProjectLevelAdjustments(detectConfiguration.getProjectLevelMatchAdjustments());
builder.setPhase(detectConfiguration.getProjectVersionPhase());
builder.setDistribution(detectConfiguration.getProjectVersionDistribution());
builder.setProjectTier(detectConfiguration.getProjectTier());
builder.setReleaseComments(detectConfiguration.getProjectVersionNotes());
return builder;
}
Aggregations