use of org.folio.circulation.services.PubSubPublishingService in project mod-circulation by folio-org.
the class DeclareClaimedReturnedItemAsMissingResource method declareClaimedReturnedItemAsMissing.
private void declareClaimedReturnedItemAsMissing(RoutingContext routingContext) {
final WebContext context = new WebContext(routingContext);
final EventPublisher eventPublisher = new EventPublisher(new PubSubPublishingService(context));
createRequest(routingContext).after(request -> processDeclareClaimedReturnedItemAsMissing(routingContext, request)).thenCompose(r -> r.after(eventPublisher::publishMarkedAsMissingLoanEvent)).thenApply(r -> r.map(toFixedValue(NoContentResponse::noContent))).thenAccept(context::writeResultToHttpResponse);
}
Aggregations