use of org.folio.dao.JobExecutionFilter in project mod-source-record-manager by folio-org.
the class MetadataProviderImpl method getMetadataProviderJobExecutions.
@Override
public void getMetadataProviderJobExecutions(List<String> statusAny, List<String> profileIdNotAny, String statusNot, List<String> uiStatusAny, String hrId, String fileName, List<String> profileIdAny, String userId, Date completedAfter, Date completedBefore, List<String> sortBy, int offset, int limit, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
vertxContext.runOnContext(v -> {
try {
List<SortField> sortFields = mapSortQueryToSortFields(sortBy);
JobExecutionFilter filter = buildJobExecutionFilter(statusAny, profileIdNotAny, statusNot, uiStatusAny, hrId, fileName, profileIdAny, userId, completedAfter, completedBefore);
jobExecutionsCache.get(tenantId, filter, sortFields, offset, limit).map(GetMetadataProviderJobExecutionsResponse::respond200WithApplicationJson).map(Response.class::cast).otherwise(ExceptionHelper::mapExceptionToResponse).onComplete(asyncResultHandler);
} catch (Exception e) {
asyncResultHandler.handle(Future.succeededFuture(ExceptionHelper.mapExceptionToResponse(e)));
}
});
}
Aggregations