use of org.folio.okapi.bean.PullDescriptor in project okapi by folio-org.
the class InternalModule method pullModules.
private void pullModules(String body, Handler<ExtendedAsyncResult<String>> fut) {
try {
final PullDescriptor pmd = Json.decodeValue(body, PullDescriptor.class);
pullManager.pull(pmd, res -> {
if (res.failed()) {
fut.handle(new Failure<>(res.getType(), res.cause()));
return;
}
fut.handle(new Success<>(Json.encodePrettily(res.result())));
});
} catch (DecodeException ex) {
fut.handle(new Failure<>(USER, ex));
}
}
Aggregations