Search in sources :

Example 11 with Clients

use of org.folio.circulation.support.Clients in project mod-circulation by folio-org.

the class LoanCollectionResource method empty.

@Override
void empty(RoutingContext routingContext) {
    WebContext context = new WebContext(routingContext);
    Clients clients = Clients.create(context, client);
    clients.loansStorage().delete().thenApply(r -> r.map(toFixedValue(NoContentResponse::noContent))).thenAccept(context::writeResultToHttpResponse);
}
Also used : UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) UpdateRequestQueue(org.folio.circulation.domain.UpdateRequestQueue) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) RequestQueueRepository(org.folio.circulation.infrastructure.storage.requests.RequestQueueRepository) LoanPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository) ValidationErrorFailure.singleValidationError(org.folio.circulation.support.ValidationErrorFailure.singleValidationError) UpdateItem(org.folio.circulation.domain.UpdateItem) RoutingContext(io.vertx.ext.web.RoutingContext) Item(org.folio.circulation.domain.Item) LoanAndRelatedRecords(org.folio.circulation.domain.LoanAndRelatedRecords) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) LostItemPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LostItemPolicyRepository) JsonObject(io.vertx.core.json.JsonObject) LoanScheduledNoticeService(org.folio.circulation.domain.notice.schedule.LoanScheduledNoticeService) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) ChangeDueDateValidator(org.folio.circulation.domain.validation.ChangeDueDateValidator) Result.of(org.folio.circulation.support.results.Result.of) Result.succeeded(org.folio.circulation.support.results.Result.succeeded) MethodHandles(java.lang.invoke.MethodHandles) Loan(org.folio.circulation.domain.Loan) RequestedByAnotherPatronValidator(org.folio.circulation.domain.validation.RequestedByAnotherPatronValidator) ITEM_ID(org.folio.circulation.domain.representations.LoanProperties.ITEM_ID) ServicePointLoanLocationValidator(org.folio.circulation.domain.validation.ServicePointLoanLocationValidator) Result(org.folio.circulation.support.results.Result) EventPublisher(org.folio.circulation.services.EventPublisher) LoanRepresentation(org.folio.circulation.domain.LoanRepresentation) Logger(org.apache.logging.log4j.Logger) ItemStatusValidator(org.folio.circulation.domain.validation.ItemStatusValidator) LoanService(org.folio.circulation.domain.LoanService) RequestRepository(org.folio.circulation.infrastructure.storage.requests.RequestRepository) NoContentResponse(org.folio.circulation.support.http.server.NoContentResponse) HttpClient(io.vertx.core.http.HttpClient) Clients(org.folio.circulation.support.Clients) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository) WebContext(org.folio.circulation.support.http.server.WebContext) CompletableFuture(java.util.concurrent.CompletableFuture) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) ItemNotFoundValidator(org.folio.circulation.domain.validation.ItemNotFoundValidator) RequestQueue(org.folio.circulation.domain.RequestQueue) DateTimeUtil.isSameMillis(org.folio.circulation.support.utils.DateTimeUtil.isSameMillis) ValidationErrorFailure(org.folio.circulation.support.ValidationErrorFailure) MappingFunctions.toFixedValue(org.folio.circulation.support.results.MappingFunctions.toFixedValue) User(org.folio.circulation.domain.User) AlreadyCheckedOutValidator(org.folio.circulation.domain.validation.AlreadyCheckedOutValidator) ProxyRelationshipValidator(org.folio.circulation.domain.validation.ProxyRelationshipValidator) PatronGroupRepository(org.folio.circulation.infrastructure.storage.users.PatronGroupRepository) LogManager(org.apache.logging.log4j.LogManager) WebContext(org.folio.circulation.support.http.server.WebContext) Clients(org.folio.circulation.support.Clients)

Example 12 with Clients

use of org.folio.circulation.support.Clients in project mod-circulation by folio-org.

the class LoanCollectionResource method delete.

@Override
void delete(RoutingContext routingContext) {
    WebContext context = new WebContext(routingContext);
    Clients clients = Clients.create(context, client);
    String id = routingContext.request().getParam("id");
    clients.loansStorage().delete(id).thenApply(r -> r.map(toFixedValue(NoContentResponse::noContent))).thenAccept(context::writeResultToHttpResponse);
}
Also used : UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) UpdateRequestQueue(org.folio.circulation.domain.UpdateRequestQueue) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) RequestQueueRepository(org.folio.circulation.infrastructure.storage.requests.RequestQueueRepository) LoanPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository) ValidationErrorFailure.singleValidationError(org.folio.circulation.support.ValidationErrorFailure.singleValidationError) UpdateItem(org.folio.circulation.domain.UpdateItem) RoutingContext(io.vertx.ext.web.RoutingContext) Item(org.folio.circulation.domain.Item) LoanAndRelatedRecords(org.folio.circulation.domain.LoanAndRelatedRecords) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) LostItemPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LostItemPolicyRepository) JsonObject(io.vertx.core.json.JsonObject) LoanScheduledNoticeService(org.folio.circulation.domain.notice.schedule.LoanScheduledNoticeService) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) ChangeDueDateValidator(org.folio.circulation.domain.validation.ChangeDueDateValidator) Result.of(org.folio.circulation.support.results.Result.of) Result.succeeded(org.folio.circulation.support.results.Result.succeeded) MethodHandles(java.lang.invoke.MethodHandles) Loan(org.folio.circulation.domain.Loan) RequestedByAnotherPatronValidator(org.folio.circulation.domain.validation.RequestedByAnotherPatronValidator) ITEM_ID(org.folio.circulation.domain.representations.LoanProperties.ITEM_ID) ServicePointLoanLocationValidator(org.folio.circulation.domain.validation.ServicePointLoanLocationValidator) Result(org.folio.circulation.support.results.Result) EventPublisher(org.folio.circulation.services.EventPublisher) LoanRepresentation(org.folio.circulation.domain.LoanRepresentation) Logger(org.apache.logging.log4j.Logger) ItemStatusValidator(org.folio.circulation.domain.validation.ItemStatusValidator) LoanService(org.folio.circulation.domain.LoanService) RequestRepository(org.folio.circulation.infrastructure.storage.requests.RequestRepository) NoContentResponse(org.folio.circulation.support.http.server.NoContentResponse) HttpClient(io.vertx.core.http.HttpClient) Clients(org.folio.circulation.support.Clients) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository) WebContext(org.folio.circulation.support.http.server.WebContext) CompletableFuture(java.util.concurrent.CompletableFuture) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) ItemNotFoundValidator(org.folio.circulation.domain.validation.ItemNotFoundValidator) RequestQueue(org.folio.circulation.domain.RequestQueue) DateTimeUtil.isSameMillis(org.folio.circulation.support.utils.DateTimeUtil.isSameMillis) ValidationErrorFailure(org.folio.circulation.support.ValidationErrorFailure) MappingFunctions.toFixedValue(org.folio.circulation.support.results.MappingFunctions.toFixedValue) User(org.folio.circulation.domain.User) AlreadyCheckedOutValidator(org.folio.circulation.domain.validation.AlreadyCheckedOutValidator) ProxyRelationshipValidator(org.folio.circulation.domain.validation.ProxyRelationshipValidator) PatronGroupRepository(org.folio.circulation.infrastructure.storage.users.PatronGroupRepository) LogManager(org.apache.logging.log4j.LogManager) WebContext(org.folio.circulation.support.http.server.WebContext) Clients(org.folio.circulation.support.Clients)

Example 13 with Clients

use of org.folio.circulation.support.Clients in project mod-circulation by folio-org.

the class LoanCollectionResource method get.

@Override
void get(RoutingContext routingContext) {
    final WebContext context = new WebContext(routingContext);
    final Clients clients = Clients.create(context, client);
    final var userRepository = new UserRepository(clients);
    final var loanRepository = new LoanRepository(clients, new ItemRepository(clients), userRepository);
    final ServicePointRepository servicePointRepository = new ServicePointRepository(clients);
    final LoanRepresentation loanRepresentation = new LoanRepresentation();
    final LoanPolicyRepository loanPolicyRepository = new LoanPolicyRepository(clients);
    final OverdueFinePolicyRepository overdueFinePolicyRepository = new OverdueFinePolicyRepository(clients);
    final LostItemPolicyRepository lostItemPolicyRepository = new LostItemPolicyRepository(clients);
    final AccountRepository accountRepository = new AccountRepository(clients);
    final PatronGroupRepository patronGroupRepository = new PatronGroupRepository(clients);
    String id = routingContext.request().getParam("id");
    loanRepository.getById(id).thenComposeAsync(accountRepository::findAccountsAndActionsForLoan).thenComposeAsync(servicePointRepository::findServicePointsForLoan).thenComposeAsync(userRepository::findUserForLoan).thenComposeAsync(loanPolicyRepository::findPolicyForLoan).thenComposeAsync(overdueFinePolicyRepository::findOverdueFinePolicyForLoan).thenComposeAsync(lostItemPolicyRepository::findLostItemPolicyForLoan).thenComposeAsync(patronGroupRepository::findGroupForLoan).thenApply(loanResult -> loanResult.map(loanRepresentation::extendedLoan)).thenApply(r -> r.map(JsonHttpResponse::ok)).thenAccept(context::writeResultToHttpResponse);
}
Also used : UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) UpdateRequestQueue(org.folio.circulation.domain.UpdateRequestQueue) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) RequestQueueRepository(org.folio.circulation.infrastructure.storage.requests.RequestQueueRepository) LoanPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository) ValidationErrorFailure.singleValidationError(org.folio.circulation.support.ValidationErrorFailure.singleValidationError) UpdateItem(org.folio.circulation.domain.UpdateItem) RoutingContext(io.vertx.ext.web.RoutingContext) Item(org.folio.circulation.domain.Item) LoanAndRelatedRecords(org.folio.circulation.domain.LoanAndRelatedRecords) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) LostItemPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LostItemPolicyRepository) JsonObject(io.vertx.core.json.JsonObject) LoanScheduledNoticeService(org.folio.circulation.domain.notice.schedule.LoanScheduledNoticeService) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) ChangeDueDateValidator(org.folio.circulation.domain.validation.ChangeDueDateValidator) Result.of(org.folio.circulation.support.results.Result.of) Result.succeeded(org.folio.circulation.support.results.Result.succeeded) MethodHandles(java.lang.invoke.MethodHandles) Loan(org.folio.circulation.domain.Loan) RequestedByAnotherPatronValidator(org.folio.circulation.domain.validation.RequestedByAnotherPatronValidator) ITEM_ID(org.folio.circulation.domain.representations.LoanProperties.ITEM_ID) ServicePointLoanLocationValidator(org.folio.circulation.domain.validation.ServicePointLoanLocationValidator) Result(org.folio.circulation.support.results.Result) EventPublisher(org.folio.circulation.services.EventPublisher) LoanRepresentation(org.folio.circulation.domain.LoanRepresentation) Logger(org.apache.logging.log4j.Logger) ItemStatusValidator(org.folio.circulation.domain.validation.ItemStatusValidator) LoanService(org.folio.circulation.domain.LoanService) RequestRepository(org.folio.circulation.infrastructure.storage.requests.RequestRepository) NoContentResponse(org.folio.circulation.support.http.server.NoContentResponse) HttpClient(io.vertx.core.http.HttpClient) Clients(org.folio.circulation.support.Clients) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository) WebContext(org.folio.circulation.support.http.server.WebContext) CompletableFuture(java.util.concurrent.CompletableFuture) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) ItemNotFoundValidator(org.folio.circulation.domain.validation.ItemNotFoundValidator) RequestQueue(org.folio.circulation.domain.RequestQueue) DateTimeUtil.isSameMillis(org.folio.circulation.support.utils.DateTimeUtil.isSameMillis) ValidationErrorFailure(org.folio.circulation.support.ValidationErrorFailure) MappingFunctions.toFixedValue(org.folio.circulation.support.results.MappingFunctions.toFixedValue) User(org.folio.circulation.domain.User) AlreadyCheckedOutValidator(org.folio.circulation.domain.validation.AlreadyCheckedOutValidator) ProxyRelationshipValidator(org.folio.circulation.domain.validation.ProxyRelationshipValidator) PatronGroupRepository(org.folio.circulation.infrastructure.storage.users.PatronGroupRepository) LogManager(org.apache.logging.log4j.LogManager) WebContext(org.folio.circulation.support.http.server.WebContext) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) Clients(org.folio.circulation.support.Clients) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) LostItemPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LostItemPolicyRepository) UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) LoanRepresentation(org.folio.circulation.domain.LoanRepresentation) LoanPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository) PatronGroupRepository(org.folio.circulation.infrastructure.storage.users.PatronGroupRepository)

Example 14 with Clients

use of org.folio.circulation.support.Clients in project mod-circulation by folio-org.

the class PickSlipsResource method getMany.

private void getMany(RoutingContext routingContext) {
    final WebContext context = new WebContext(routingContext);
    final Clients clients = Clients.create(context, client);
    final var userRepository = new UserRepository(clients);
    final var itemRepository = new ItemRepository(clients);
    final AddressTypeRepository addressTypeRepository = new AddressTypeRepository(clients);
    final ServicePointRepository servicePointRepository = new ServicePointRepository(clients);
    final UUID servicePointId = UUID.fromString(routingContext.request().getParam(SERVICE_POINT_ID_PARAM));
    fetchLocationsForServicePoint(servicePointId, clients).thenComposeAsync(r -> r.after(locations -> fetchPagedItemsForLocations(locations, itemRepository, LocationRepository.using(clients, servicePointRepository)))).thenComposeAsync(r -> r.after(items -> fetchOpenPageRequestsForItems(items, clients))).thenComposeAsync(r -> r.after(userRepository::findUsersForRequests)).thenComposeAsync(r -> r.after(addressTypeRepository::findAddressTypesForRequests)).thenComposeAsync(r -> r.after(servicePointRepository::findServicePointsForRequests)).thenApply(flatMapResult(this::mapResultToJson)).thenApply(r -> r.map(JsonHttpResponse::ok)).thenAccept(context::writeResultToHttpResponse);
}
Also used : UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) Clients(org.folio.circulation.support.Clients) RecordFetching.findWithMultipleCqlIndexValues(org.folio.circulation.support.fetching.RecordFetching.findWithMultipleCqlIndexValues) Location(org.folio.circulation.domain.Location) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) WebContext(org.folio.circulation.support.http.server.WebContext) Request(org.folio.circulation.domain.Request) Router(io.vertx.ext.web.Router) CompletableFuture(java.util.concurrent.CompletableFuture) RoutingContext(io.vertx.ext.web.RoutingContext) ItemStatus(org.folio.circulation.domain.ItemStatus) StringUtils(org.apache.commons.lang3.StringUtils) Item(org.folio.circulation.domain.Item) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) LocationRepository(org.folio.circulation.infrastructure.storage.inventory.LocationRepository) CqlQuery.exactMatch(org.folio.circulation.support.http.client.CqlQuery.exactMatch) Collectors.toMap(java.util.stream.Collectors.toMap) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) MultipleCqlIndexValuesCriteria.byIndex(org.folio.circulation.support.fetching.MultipleCqlIndexValuesCriteria.byIndex) Map(java.util.Map) PageLimit(org.folio.circulation.support.http.client.PageLimit) TemplateContextUtil(org.folio.circulation.domain.notice.TemplateContextUtil) JsonObject(io.vertx.core.json.JsonObject) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) Collectors.toSet(java.util.stream.Collectors.toSet) RecordFetching.findWithCqlQuery(org.folio.circulation.support.fetching.RecordFetching.findWithCqlQuery) RequestType(org.folio.circulation.domain.RequestType) MultipleRecords(org.folio.circulation.domain.MultipleRecords) Collections.emptyList(java.util.Collections.emptyList) Result.succeeded(org.folio.circulation.support.results.Result.succeeded) Collection(java.util.Collection) Set(java.util.Set) UUID(java.util.UUID) Result(org.folio.circulation.support.results.Result) Collectors(java.util.stream.Collectors) ResultBinding.flatMapResult(org.folio.circulation.support.results.ResultBinding.flatMapResult) RouteRegistration(org.folio.circulation.support.RouteRegistration) List(java.util.List) AddressTypeRepository(org.folio.circulation.infrastructure.storage.users.AddressTypeRepository) RequestStatus(org.folio.circulation.domain.RequestStatus) Function.identity(java.util.function.Function.identity) CqlQuery(org.folio.circulation.support.http.client.CqlQuery) HttpClient(io.vertx.core.http.HttpClient) WebContext(org.folio.circulation.support.http.server.WebContext) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) Clients(org.folio.circulation.support.Clients) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) AddressTypeRepository(org.folio.circulation.infrastructure.storage.users.AddressTypeRepository) UUID(java.util.UUID)

Example 15 with Clients

use of org.folio.circulation.support.Clients in project mod-circulation by folio-org.

the class ScheduledAnonymizationProcessingResource method scheduledAnonymizeLoans.

private void scheduledAnonymizeLoans(RoutingContext routingContext) {
    final WebContext context = new WebContext(routingContext);
    final Clients clients = Clients.create(context, client);
    ConfigurationRepository configurationRepository = new ConfigurationRepository(clients);
    final var itemRepository = new ItemRepository(clients);
    final var userRepository = new UserRepository(clients);
    final var loanRepository = new LoanRepository(clients, itemRepository, userRepository);
    final var accountRepository = new AccountRepository(clients);
    final var anonymizeStorageLoansRepository = new AnonymizeStorageLoansRepository(clients);
    final var eventPublisher = new EventPublisher(clients.pubSubPublishingService());
    final var loansFinder = new LoansForTenantFinder(loanRepository, accountRepository, Environment.getScheduledAnonymizationNumberOfLoansToCheck());
    log.info("Initializing loan anonymization for current tenant");
    safelyInitialise(configurationRepository::loanHistoryConfiguration).thenApply(r -> r.map(config -> new DefaultLoanAnonymizationService(new AnonymizationCheckersService(config, ClockUtil::getZonedDateTime), anonymizeStorageLoansRepository, eventPublisher))).thenCompose(r -> r.after(service -> service.anonymizeLoans(loansFinder::findLoansToAnonymize))).thenApply(AnonymizeLoansRepresentation::from).thenApply(r -> r.map(JsonHttpResponse::ok)).exceptionally(CommonFailures::failedDueToServerError).thenAccept(context::writeResultToHttpResponse);
}
Also used : Environment(org.folio.Environment) UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) Clients(org.folio.circulation.support.Clients) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) ConfigurationRepository(org.folio.circulation.infrastructure.storage.ConfigurationRepository) WebContext(org.folio.circulation.support.http.server.WebContext) Router(io.vertx.ext.web.Router) RoutingContext(io.vertx.ext.web.RoutingContext) JsonHttpResponse(org.folio.circulation.support.http.server.JsonHttpResponse) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) AnonymizeStorageLoansRepository(org.folio.circulation.infrastructure.storage.loans.AnonymizeStorageLoansRepository) CommonFailures(org.folio.circulation.support.results.CommonFailures) MethodHandles(java.lang.invoke.MethodHandles) AnonymizeLoansRepresentation(org.folio.circulation.domain.representations.anonymization.AnonymizeLoansRepresentation) EventPublisher(org.folio.circulation.services.EventPublisher) RouteRegistration(org.folio.circulation.support.RouteRegistration) LoansForTenantFinder(org.folio.circulation.domain.anonymization.service.LoansForTenantFinder) Logger(org.apache.logging.log4j.Logger) DefaultLoanAnonymizationService(org.folio.circulation.domain.anonymization.DefaultLoanAnonymizationService) ClockUtil(org.folio.circulation.support.utils.ClockUtil) AsynchronousResultBindings.safelyInitialise(org.folio.circulation.support.results.AsynchronousResultBindings.safelyInitialise) LogManager(org.apache.logging.log4j.LogManager) AnonymizationCheckersService(org.folio.circulation.domain.anonymization.service.AnonymizationCheckersService) HttpClient(io.vertx.core.http.HttpClient) WebContext(org.folio.circulation.support.http.server.WebContext) EventPublisher(org.folio.circulation.services.EventPublisher) DefaultLoanAnonymizationService(org.folio.circulation.domain.anonymization.DefaultLoanAnonymizationService) ClockUtil(org.folio.circulation.support.utils.ClockUtil) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) LoansForTenantFinder(org.folio.circulation.domain.anonymization.service.LoansForTenantFinder) Clients(org.folio.circulation.support.Clients) LoanRepository(org.folio.circulation.infrastructure.storage.loans.LoanRepository) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) AnonymizationCheckersService(org.folio.circulation.domain.anonymization.service.AnonymizationCheckersService) ConfigurationRepository(org.folio.circulation.infrastructure.storage.ConfigurationRepository) AnonymizeStorageLoansRepository(org.folio.circulation.infrastructure.storage.loans.AnonymizeStorageLoansRepository)

Aggregations

Clients (org.folio.circulation.support.Clients)41 WebContext (org.folio.circulation.support.http.server.WebContext)38 HttpClient (io.vertx.core.http.HttpClient)36 RoutingContext (io.vertx.ext.web.RoutingContext)36 ItemRepository (org.folio.circulation.infrastructure.storage.inventory.ItemRepository)33 UserRepository (org.folio.circulation.infrastructure.storage.users.UserRepository)32 LoanRepository (org.folio.circulation.infrastructure.storage.loans.LoanRepository)31 Result (org.folio.circulation.support.results.Result)31 Router (io.vertx.ext.web.Router)30 CompletableFuture (java.util.concurrent.CompletableFuture)29 JsonObject (io.vertx.core.json.JsonObject)26 EventPublisher (org.folio.circulation.services.EventPublisher)26 Result.succeeded (org.folio.circulation.support.results.Result.succeeded)23 RouteRegistration (org.folio.circulation.support.RouteRegistration)21 ValidationErrorFailure.singleValidationError (org.folio.circulation.support.ValidationErrorFailure.singleValidationError)21 Loan (org.folio.circulation.domain.Loan)19 RequestRepository (org.folio.circulation.infrastructure.storage.requests.RequestRepository)19 JsonHttpResponse (org.folio.circulation.support.http.server.JsonHttpResponse)19 NoContentResponse (org.folio.circulation.support.http.server.NoContentResponse)19 MappingFunctions.toFixedValue (org.folio.circulation.support.results.MappingFunctions.toFixedValue)19