use of com.blackducksoftware.integration.fortify.model.CommitFortifyApplicationRequest in project hub-fortify-ssc-integration-service by blackducksoftware.
the class FortifyApplicationVersionApiTest method commitApplicationVersion.
public void commitApplicationVersion(int applicationId) throws IOException, IntegrationException {
System.out.println("Executing commitApplicationVersion");
CommitFortifyApplicationRequest request = new CommitFortifyApplicationRequest(true);
fortifyApplicationVersionApi.commitApplicationVersion(applicationId, request);
}
use of com.blackducksoftware.integration.fortify.model.CommitFortifyApplicationRequest in project hub-fortify-ssc-integration-service by blackducksoftware.
the class FortifyUploadApiTest method commitApplicationVersion.
public void commitApplicationVersion(int applicationId) throws IOException, IntegrationException {
System.out.println("Executing commitApplicationVersion");
CommitFortifyApplicationRequest request = new CommitFortifyApplicationRequest(true);
fortifyApplicationVersionApi.commitApplicationVersion(applicationId, request);
}
use of com.blackducksoftware.integration.fortify.model.CommitFortifyApplicationRequest in project hub-fortify-ssc-integration-service by blackducksoftware.
the class MappingParser method createApplicationVersion.
/**
* Creates a new Application Version, updates the attributes and commits the application to mark it complete on the
* UI
*
* @param createRequest
* @return int - Application ID
* @throws IOException
* @throws IntegrationException
*/
private int createApplicationVersion(CreateApplicationRequest createRequest) throws IOException, IntegrationException {
int applicationId = 0;
applicationId = fortifyApplicationVersionApi.createApplicationVersion(createRequest);
try {
final List<UpdateFortifyApplicationAttributesRequest> updateAttributerequest = addCustomAttributes();
logger.info("updateAttributerequest::" + updateAttributerequest);
fortifyApplicationVersionApi.updateApplicationAttributes(applicationId, updateAttributerequest);
CommitFortifyApplicationRequest commitRequest = new CommitFortifyApplicationRequest(true);
fortifyApplicationVersionApi.commitApplicationVersion(applicationId, commitRequest);
} catch (IOException e) {
fortifyApplicationVersionApi.deleteApplicationVersion(applicationId);
throw new IOException(e);
} catch (IntegrationException e) {
fortifyApplicationVersionApi.deleteApplicationVersion(applicationId);
throw new IntegrationException(e);
}
return applicationId;
}
Aggregations