use of com.synopsys.integration.blackduck.http.transform.BlackDuckResponsesTransformer in project hub-alert by blackducksoftware.
the class BlackDuckProviderDataAccessor method retrieveBlackDuckPageResponse.
private <T extends BlackDuckResponse> BlackDuckPageResponse<T> retrieveBlackDuckPageResponse(BlackDuckServicesFactory blackDuckServicesFactory, UrlMultipleResponses<T> urlMultipleResponses, int pageNumber, int pageSize, Predicate<T> searchFilter) throws IntegrationException {
BlackDuckResponsesTransformer blackDuckResponsesTransformer = blackDuckServicesFactory.getBlackDuckResponsesTransformer();
int offset = pageNumber * pageSize;
BlackDuckMultipleRequest<T> spec = new BlackDuckRequestBuilder().commonGet().setLimitAndOffset(pageSize, offset).buildBlackDuckRequest(urlMultipleResponses);
return blackDuckResponsesTransformer.getSomeMatchingResponses(spec, searchFilter, pageSize);
}
Aggregations