use of com.synopsys.integration.blackduck.service.request.BlackDuckRequest in project hub-alert by blackducksoftware.
the class BlackDuckSSOConfigRetriever method retrieve.
public BlackDuckSSOConfigView retrieve() throws AlertException {
BlackDuckRequestBuilder requestBuilder = new BlackDuckRequestBuilder().acceptMimeType(SSO_CONFIGURATION_MIME_TYPE);
UrlSingleResponse<BlackDuckSSOConfigView> ssoConfigurationSingleResponse = apiDiscovery.metaSingleResponse(SSO_CONFIGURATION_PATH);
BlackDuckRequest<BlackDuckSSOConfigView, UrlSingleResponse<BlackDuckSSOConfigView>> ssoConfigurationRequest = new BlackDuckRequest<>(requestBuilder, ssoConfigurationSingleResponse);
try {
return blackDuckApiClient.getResponse(ssoConfigurationRequest);
} catch (IntegrationException e) {
String errorMessage = String.format("Unable to retrieve SSO configuration from Black Duck: %s", e.getMessage());
throw new AlertException(errorMessage, e);
}
}
Aggregations