Search in sources :

Example 21 with HttpException

use of org.folio.rest.core.exceptions.HttpException in project mod-orders by folio-org.

the class PieceDeleteFlowManager method isDeletePieceRequestValid.

private CompletableFuture<Void> isDeletePieceRequestValid(PieceDeletionHolder holder, RequestContext requestContext) {
    List<Error> combinedErrors = new ArrayList<>();
    if (holder.getPieceToDelete().getItemId() != null) {
        return inventoryManager.getNumberOfRequestsByItemId(holder.getPieceToDelete().getItemId(), requestContext).thenAccept(numOfRequests -> {
            if (numOfRequests != null && numOfRequests > 0) {
                combinedErrors.add(ErrorCodes.REQUEST_FOUND.toError());
            }
        }).thenAccept(numOfRequests -> {
            if (CollectionUtils.isNotEmpty(combinedErrors)) {
                Errors errors = new Errors().withErrors(combinedErrors).withTotalRecords(combinedErrors.size());
                logger.error("Validation error : " + JsonObject.mapFrom(errors).encodePrettily());
                throw new HttpException(RestConstants.VALIDATION_ERROR, errors);
            }
        });
    }
    return completedFuture(null);
}
Also used : CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) HttpException(org.folio.rest.core.exceptions.HttpException) CompletableFuture(java.util.concurrent.CompletableFuture) StringUtils(org.apache.commons.lang3.StringUtils) CollectionUtils(org.apache.commons.collections4.CollectionUtils) ArrayList(java.util.ArrayList) ITEM_STATUS(org.folio.service.inventory.InventoryManager.ITEM_STATUS) Pair(org.apache.commons.lang3.tuple.Pair) ProtectionService(org.folio.service.ProtectionService) RequestContext(org.folio.rest.core.models.RequestContext) PieceUpdateInventoryService(org.folio.service.pieces.PieceUpdateInventoryService) DELETE(org.folio.orders.utils.ProtectedOperationType.DELETE) InventoryManager(org.folio.service.inventory.InventoryManager) JsonObject(io.vertx.core.json.JsonObject) PieceDeletionHolder(org.folio.models.pieces.PieceDeletionHolder) RestConstants(org.folio.rest.RestConstants) Errors(org.folio.rest.jaxrs.model.Errors) PieceStorageService(org.folio.service.pieces.PieceStorageService) ItemStatus(org.folio.models.ItemStatus) Piece(org.folio.rest.jaxrs.model.Piece) BasePieceFlowHolderBuilder(org.folio.service.pieces.flows.BasePieceFlowHolderBuilder) ErrorCodes(org.folio.rest.core.exceptions.ErrorCodes) Error(org.folio.rest.jaxrs.model.Error) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Optional(java.util.Optional) LogManager(org.apache.logging.log4j.LogManager) ITEM_STATUS_NAME(org.folio.service.inventory.InventoryManager.ITEM_STATUS_NAME) Errors(org.folio.rest.jaxrs.model.Errors) ArrayList(java.util.ArrayList) Error(org.folio.rest.jaxrs.model.Error) HttpException(org.folio.rest.core.exceptions.HttpException)

Example 22 with HttpException

use of org.folio.rest.core.exceptions.HttpException in project mod-orders by folio-org.

the class AbstractHelper method handleProcessingError.

protected int handleProcessingError(Throwable throwable) {
    final Throwable cause = throwable.getCause();
    logger.error("Exception encountered", cause);
    final Error error;
    final int code;
    if (cause instanceof HttpException) {
        code = ((HttpException) cause).getCode();
        error = ((HttpException) cause).getError();
    } else {
        code = INTERNAL_SERVER_ERROR.getStatusCode();
        error = GENERIC_ERROR_CODE.toError().withAdditionalProperty(ERROR_CAUSE, cause.getMessage());
    }
    if (getErrors().isEmpty()) {
        addProcessingError(error);
    }
    return code;
}
Also used : Error(org.folio.rest.jaxrs.model.Error) HttpException(org.folio.rest.core.exceptions.HttpException)

Example 23 with HttpException

use of org.folio.rest.core.exceptions.HttpException in project mod-orders by folio-org.

the class PurchaseOrderHelper method checkOrderApprovalRequired.

/**
 * If an order is transitioning to OPEN, checks if approval is required and throws an error if it is not approved
 *
 * @param compPO composite purchase order
 */
private void checkOrderApprovalRequired(CompositePurchaseOrder compPO, JsonObject tenantConfig, RequestContext requestContext) {
    boolean isApprovalRequired = isApprovalRequiredConfiguration(tenantConfig);
    if (isApprovalRequired && !compPO.getApproved().equals(Boolean.TRUE)) {
        throw new HttpException(400, APPROVAL_REQUIRED_TO_OPEN);
    }
    compPO.setApprovedById(getCurrentUserId(requestContext));
    compPO.setApprovalDate(new Date());
}
Also used : HttpException(org.folio.rest.core.exceptions.HttpException) Date(java.util.Date)

Example 24 with HttpException

use of org.folio.rest.core.exceptions.HttpException in project mod-orders by folio-org.

the class PurchaseOrderLineHelper method createPoLine.

/**
 * Creates PO Line if its content is valid and all restriction checks passed
 * @param compPOL {@link CompositePoLine} to be created
 * @return completable future which might hold {@link CompositePoLine} on success, {@code null} if validation fails or an exception if any issue happens
 */
public CompletableFuture<CompositePoLine> createPoLine(CompositePoLine compPOL, RequestContext requestContext) {
    // Validate PO Line content and retrieve order only if this operation is allowed
    JsonObject cachedTenantConfiguration = new JsonObject();
    return configurationEntriesService.loadConfiguration(ORDER_CONFIG_MODULE_NAME, requestContext).thenApply(tenantConfiguration -> cachedTenantConfiguration.mergeIn(tenantConfiguration, true)).thenCompose(tenantConfiguration -> setTenantDefaultCreateInventoryValues(compPOL, tenantConfiguration)).thenCompose(v -> validateNewPoLine(compPOL, cachedTenantConfiguration, requestContext)).thenCompose(validationErrors -> {
        if (CollectionUtils.isEmpty(validationErrors)) {
            return getCompositePurchaseOrder(compPOL.getPurchaseOrderId(), requestContext).thenApply(this::validateOrderState).thenCompose(po -> protectionService.isOperationRestricted(po.getAcqUnitIds(), ProtectedOperationType.CREATE, requestContext).thenApply(vVoid -> po)).thenCompose(po -> createPoLine(compPOL, po, requestContext));
        } else {
            Errors errors = new Errors().withErrors(validationErrors).withTotalRecords(validationErrors.size());
            logger.error("Create POL validation error : " + JsonObject.mapFrom(errors).encodePrettily());
            throw new HttpException(RestConstants.VALIDATION_ERROR, errors);
        }
    });
}
Also used : OrderInvoiceRelationService(org.folio.service.orders.OrderInvoiceRelationService) EN(org.folio.rest.RestConstants.EN) URL_WITH_LANG_PARAM(org.folio.orders.utils.HelperUtils.URL_WITH_LANG_PARAM) StringUtils(org.apache.commons.lang3.StringUtils) PoLineCommonUtil(org.folio.orders.utils.PoLineCommonUtil) Matcher(java.util.regex.Matcher) HelperUtils.verifyProtectedFieldsChanged(org.folio.orders.utils.HelperUtils.verifyProtectedFieldsChanged) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) ORDER_CONFIG_MODULE_NAME(org.folio.orders.utils.HelperUtils.ORDER_CONFIG_MODULE_NAME) StringUtils.isEmpty(org.apache.commons.lang3.StringUtils.isEmpty) Errors(org.folio.rest.jaxrs.model.Errors) Alert(org.folio.rest.jaxrs.model.Alert) ErrorCodes(org.folio.rest.core.exceptions.ErrorCodes) ConfigurationEntriesService(org.folio.service.configuration.ConfigurationEntriesService) REPORTING_CODES(org.folio.orders.utils.ResourcePathResolver.REPORTING_CODES) OPEN(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.OPEN) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) Logger(org.apache.logging.log4j.Logger) Eresource(org.folio.rest.jaxrs.model.Eresource) CompositePoLine(org.folio.rest.jaxrs.model.CompositePoLine) HttpClientInterface(org.folio.rest.tools.client.interfaces.HttpClientInterface) PO_LINES_STORAGE(org.folio.orders.utils.ResourcePathResolver.PO_LINES_STORAGE) ExpenseClassValidationService(org.folio.service.finance.expenceclass.ExpenseClassValidationService) RestClient(org.folio.rest.core.RestClient) UPDATE(org.folio.orders.utils.ProtectedOperationType.UPDATE) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) FolioVertxCompletableFuture(org.folio.completablefuture.FolioVertxCompletableFuture) CollectionUtils(org.apache.commons.collections4.CollectionUtils) ArrayList(java.util.ArrayList) OrderFormat(org.folio.rest.jaxrs.model.CompositePoLine.OrderFormat) ResourcePathResolver.resourcesPath(org.folio.orders.utils.ResourcePathResolver.resourcesPath) SequenceNumbers(org.folio.rest.acq.model.SequenceNumbers) Physical(org.folio.rest.jaxrs.model.Physical) ALERTS(org.folio.orders.utils.ResourcePathResolver.ALERTS) PO_LINE_NUMBER(org.folio.orders.utils.ResourcePathResolver.PO_LINE_NUMBER) HelperUtils(org.folio.orders.utils.HelperUtils) RequestEntry(org.folio.rest.core.models.RequestEntry) PostResponseType(org.folio.rest.core.PostResponseType) HelperUtils.combineCqlExpressions(org.folio.orders.utils.HelperUtils.combineCqlExpressions) JsonArray(io.vertx.core.json.JsonArray) ResourcePathResolver.resourceByIdPath(org.folio.orders.utils.ResourcePathResolver.resourceByIdPath) PoLineCollection(org.folio.rest.jaxrs.model.PoLineCollection) OrderWorkflowType(org.folio.service.orders.OrderWorkflowType) EVENT_PAYLOAD(org.folio.helper.AbstractHelper.EVENT_PAYLOAD) Cost(org.folio.rest.jaxrs.model.Cost) JsonObject.mapFrom(io.vertx.core.json.JsonObject.mapFrom) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) PurchaseOrderStorageService(org.folio.service.orders.PurchaseOrderStorageService) PoNumberHelper.buildPoLineNumber(org.folio.helper.PoNumberHelper.buildPoLineNumber) HelperUtils.collectResultsOnSuccess(org.folio.orders.utils.HelperUtils.collectResultsOnSuccess) PoLine(org.folio.rest.jaxrs.model.PoLine) ProtectionService(org.folio.service.ProtectionService) CollectionUtils.isEqualCollection(org.apache.commons.collections4.CollectionUtils.isEqualCollection) LOCATION_CAN_NOT_BE_MODIFIER_AFTER_OPEN(org.folio.rest.core.exceptions.ErrorCodes.LOCATION_CAN_NOT_BE_MODIFIER_AFTER_OPEN) HelperUtils.operateOnObject(org.folio.orders.utils.HelperUtils.operateOnObject) HelperUtils.deletePoLine(org.folio.orders.utils.HelperUtils.deletePoLine) Predicate(java.util.function.Predicate) CompletionException(java.util.concurrent.CompletionException) UUID(java.util.UUID) FundDistribution(org.folio.rest.jaxrs.model.FundDistribution) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ID(org.folio.helper.AbstractHelper.ID) List(java.util.List) CollectionUtils.isNotEmpty(org.apache.commons.collections4.CollectionUtils.isNotEmpty) Response(javax.ws.rs.core.Response) CompositePoLineValidationService(org.folio.service.orders.CompositePoLineValidationService) ReportingCode(org.folio.rest.jaxrs.model.ReportingCode) EncumbranceService(org.folio.service.finance.transaction.EncumbranceService) Optional(java.util.Optional) Parameter(org.folio.rest.jaxrs.model.Parameter) ORDER_ID(org.folio.helper.AbstractHelper.ORDER_ID) Pattern(java.util.regex.Pattern) AcquisitionsUnitsService(org.folio.service.AcquisitionsUnitsService) ProtectedOperationType(org.folio.orders.utils.ProtectedOperationType) HttpException(org.folio.rest.core.exceptions.HttpException) ProductId(org.folio.rest.jaxrs.model.ProductId) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) PENDING(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.PENDING) POLineProtectedFieldsUtil(org.folio.orders.utils.POLineProtectedFieldsUtil) Title(org.folio.rest.jaxrs.model.Title) TitlesService(org.folio.service.titles.TitlesService) CompletableFuture.allOf(java.util.concurrent.CompletableFuture.allOf) CompositePurchaseOrder(org.folio.rest.jaxrs.model.CompositePurchaseOrder) RequestContext(org.folio.rest.core.models.RequestContext) HelperUtils.getPoLineLimit(org.folio.orders.utils.HelperUtils.getPoLineLimit) DELETE(org.folio.orders.utils.ProtectedOperationType.DELETE) EncumbranceWorkflowStrategyFactory(org.folio.service.finance.transaction.EncumbranceWorkflowStrategyFactory) InventoryManager(org.folio.service.inventory.InventoryManager) RestConstants(org.folio.rest.RestConstants) EncumbranceWorkflowStrategy(org.folio.service.finance.transaction.EncumbranceWorkflowStrategy) Iterator(java.util.Iterator) MessageAddress(org.folio.orders.events.handlers.MessageAddress) CLOSED(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.CLOSED) Error(org.folio.rest.jaxrs.model.Error) Collectors.toList(java.util.stream.Collectors.toList) HelperUtils.calculateEstimatedPrice(org.folio.orders.utils.HelperUtils.calculateEstimatedPrice) HttpMethod(io.vertx.core.http.HttpMethod) PurchaseOrderLineService(org.folio.service.orders.PurchaseOrderLineService) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) Errors(org.folio.rest.jaxrs.model.Errors) JsonObject(io.vertx.core.json.JsonObject) HttpException(org.folio.rest.core.exceptions.HttpException)

Example 25 with HttpException

use of org.folio.rest.core.exceptions.HttpException in project mod-orders by folio-org.

the class PurchaseOrderLineHelper method handleSubObjsOperation.

private CompletableFuture<Void> handleSubObjsOperation(String prop, JsonObject updatedLine, JsonObject lineFromStorage, RequestContext requestContext) {
    List<CompletableFuture<String>> futures = new ArrayList<>();
    JsonArray idsInStorage = lineFromStorage.getJsonArray(prop);
    JsonArray jsonObjects = updatedLine.getJsonArray(prop);
    // Handle updated sub-objects content
    if (jsonObjects != null && !jsonObjects.isEmpty()) {
        // Clear array of object which will be replaced with array of id's
        updatedLine.remove(prop);
        for (int i = 0; i < jsonObjects.size(); i++) {
            JsonObject subObj = jsonObjects.getJsonObject(i);
            if (subObj != null && subObj.getString(ID) != null) {
                String id = idsInStorage.remove(subObj.getString(ID)) ? subObj.getString(ID) : null;
                futures.add(handleSubObjOperation(prop, subObj, id, requestContext).exceptionally(throwable -> {
                    Error error = handleProcessingError(throwable, prop, id);
                    throw new HttpException(500, error);
                }));
            }
        }
    }
    // The remaining unprocessed objects should be removed
    for (int i = 0; i < idsInStorage.size(); i++) {
        String id = idsInStorage.getString(i);
        if (id != null) {
            futures.add(handleSubObjOperation(prop, null, id, requestContext).exceptionally(throwable -> {
                handleProcessingError(throwable, prop, id);
                // In case the object is not deleted, still keep reference to old id
                return id;
            }));
        }
    }
    return collectResultsOnSuccess(futures).thenAccept(newIds -> updatedLine.put(prop, newIds));
}
Also used : JsonArray(io.vertx.core.json.JsonArray) OrderInvoiceRelationService(org.folio.service.orders.OrderInvoiceRelationService) EN(org.folio.rest.RestConstants.EN) URL_WITH_LANG_PARAM(org.folio.orders.utils.HelperUtils.URL_WITH_LANG_PARAM) StringUtils(org.apache.commons.lang3.StringUtils) PoLineCommonUtil(org.folio.orders.utils.PoLineCommonUtil) Matcher(java.util.regex.Matcher) HelperUtils.verifyProtectedFieldsChanged(org.folio.orders.utils.HelperUtils.verifyProtectedFieldsChanged) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) ORDER_CONFIG_MODULE_NAME(org.folio.orders.utils.HelperUtils.ORDER_CONFIG_MODULE_NAME) StringUtils.isEmpty(org.apache.commons.lang3.StringUtils.isEmpty) Errors(org.folio.rest.jaxrs.model.Errors) Alert(org.folio.rest.jaxrs.model.Alert) ErrorCodes(org.folio.rest.core.exceptions.ErrorCodes) ConfigurationEntriesService(org.folio.service.configuration.ConfigurationEntriesService) REPORTING_CODES(org.folio.orders.utils.ResourcePathResolver.REPORTING_CODES) OPEN(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.OPEN) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) Logger(org.apache.logging.log4j.Logger) Eresource(org.folio.rest.jaxrs.model.Eresource) CompositePoLine(org.folio.rest.jaxrs.model.CompositePoLine) HttpClientInterface(org.folio.rest.tools.client.interfaces.HttpClientInterface) PO_LINES_STORAGE(org.folio.orders.utils.ResourcePathResolver.PO_LINES_STORAGE) ExpenseClassValidationService(org.folio.service.finance.expenceclass.ExpenseClassValidationService) RestClient(org.folio.rest.core.RestClient) UPDATE(org.folio.orders.utils.ProtectedOperationType.UPDATE) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) FolioVertxCompletableFuture(org.folio.completablefuture.FolioVertxCompletableFuture) CollectionUtils(org.apache.commons.collections4.CollectionUtils) ArrayList(java.util.ArrayList) OrderFormat(org.folio.rest.jaxrs.model.CompositePoLine.OrderFormat) ResourcePathResolver.resourcesPath(org.folio.orders.utils.ResourcePathResolver.resourcesPath) SequenceNumbers(org.folio.rest.acq.model.SequenceNumbers) Physical(org.folio.rest.jaxrs.model.Physical) ALERTS(org.folio.orders.utils.ResourcePathResolver.ALERTS) PO_LINE_NUMBER(org.folio.orders.utils.ResourcePathResolver.PO_LINE_NUMBER) HelperUtils(org.folio.orders.utils.HelperUtils) RequestEntry(org.folio.rest.core.models.RequestEntry) PostResponseType(org.folio.rest.core.PostResponseType) HelperUtils.combineCqlExpressions(org.folio.orders.utils.HelperUtils.combineCqlExpressions) JsonArray(io.vertx.core.json.JsonArray) ResourcePathResolver.resourceByIdPath(org.folio.orders.utils.ResourcePathResolver.resourceByIdPath) PoLineCollection(org.folio.rest.jaxrs.model.PoLineCollection) OrderWorkflowType(org.folio.service.orders.OrderWorkflowType) EVENT_PAYLOAD(org.folio.helper.AbstractHelper.EVENT_PAYLOAD) Cost(org.folio.rest.jaxrs.model.Cost) JsonObject.mapFrom(io.vertx.core.json.JsonObject.mapFrom) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) PurchaseOrderStorageService(org.folio.service.orders.PurchaseOrderStorageService) PoNumberHelper.buildPoLineNumber(org.folio.helper.PoNumberHelper.buildPoLineNumber) HelperUtils.collectResultsOnSuccess(org.folio.orders.utils.HelperUtils.collectResultsOnSuccess) PoLine(org.folio.rest.jaxrs.model.PoLine) ProtectionService(org.folio.service.ProtectionService) CollectionUtils.isEqualCollection(org.apache.commons.collections4.CollectionUtils.isEqualCollection) LOCATION_CAN_NOT_BE_MODIFIER_AFTER_OPEN(org.folio.rest.core.exceptions.ErrorCodes.LOCATION_CAN_NOT_BE_MODIFIER_AFTER_OPEN) HelperUtils.operateOnObject(org.folio.orders.utils.HelperUtils.operateOnObject) HelperUtils.deletePoLine(org.folio.orders.utils.HelperUtils.deletePoLine) Predicate(java.util.function.Predicate) CompletionException(java.util.concurrent.CompletionException) UUID(java.util.UUID) FundDistribution(org.folio.rest.jaxrs.model.FundDistribution) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ID(org.folio.helper.AbstractHelper.ID) List(java.util.List) CollectionUtils.isNotEmpty(org.apache.commons.collections4.CollectionUtils.isNotEmpty) Response(javax.ws.rs.core.Response) CompositePoLineValidationService(org.folio.service.orders.CompositePoLineValidationService) ReportingCode(org.folio.rest.jaxrs.model.ReportingCode) EncumbranceService(org.folio.service.finance.transaction.EncumbranceService) Optional(java.util.Optional) Parameter(org.folio.rest.jaxrs.model.Parameter) ORDER_ID(org.folio.helper.AbstractHelper.ORDER_ID) Pattern(java.util.regex.Pattern) AcquisitionsUnitsService(org.folio.service.AcquisitionsUnitsService) ProtectedOperationType(org.folio.orders.utils.ProtectedOperationType) HttpException(org.folio.rest.core.exceptions.HttpException) ProductId(org.folio.rest.jaxrs.model.ProductId) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) PENDING(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.PENDING) POLineProtectedFieldsUtil(org.folio.orders.utils.POLineProtectedFieldsUtil) Title(org.folio.rest.jaxrs.model.Title) TitlesService(org.folio.service.titles.TitlesService) CompletableFuture.allOf(java.util.concurrent.CompletableFuture.allOf) CompositePurchaseOrder(org.folio.rest.jaxrs.model.CompositePurchaseOrder) RequestContext(org.folio.rest.core.models.RequestContext) HelperUtils.getPoLineLimit(org.folio.orders.utils.HelperUtils.getPoLineLimit) DELETE(org.folio.orders.utils.ProtectedOperationType.DELETE) EncumbranceWorkflowStrategyFactory(org.folio.service.finance.transaction.EncumbranceWorkflowStrategyFactory) InventoryManager(org.folio.service.inventory.InventoryManager) RestConstants(org.folio.rest.RestConstants) EncumbranceWorkflowStrategy(org.folio.service.finance.transaction.EncumbranceWorkflowStrategy) Iterator(java.util.Iterator) MessageAddress(org.folio.orders.events.handlers.MessageAddress) CLOSED(org.folio.rest.jaxrs.model.CompositePurchaseOrder.WorkflowStatus.CLOSED) Error(org.folio.rest.jaxrs.model.Error) Collectors.toList(java.util.stream.Collectors.toList) HelperUtils.calculateEstimatedPrice(org.folio.orders.utils.HelperUtils.calculateEstimatedPrice) HttpMethod(io.vertx.core.http.HttpMethod) PurchaseOrderLineService(org.folio.service.orders.PurchaseOrderLineService) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) FolioVertxCompletableFuture(org.folio.completablefuture.FolioVertxCompletableFuture) CompletableFuture(java.util.concurrent.CompletableFuture) ArrayList(java.util.ArrayList) JsonObject(io.vertx.core.json.JsonObject) Error(org.folio.rest.jaxrs.model.Error) HttpException(org.folio.rest.core.exceptions.HttpException)

Aggregations

HttpException (org.folio.rest.core.exceptions.HttpException)54 CompletionException (java.util.concurrent.CompletionException)26 Test (org.junit.jupiter.api.Test)26 Error (org.folio.rest.jaxrs.model.Error)18 CompositePoLine (org.folio.rest.jaxrs.model.CompositePoLine)16 Parameter (org.folio.rest.jaxrs.model.Parameter)15 ArrayList (java.util.ArrayList)14 CompletableFuture (java.util.concurrent.CompletableFuture)14 RequestContext (org.folio.rest.core.models.RequestContext)14 List (java.util.List)13 RequestEntry (org.folio.rest.core.models.RequestEntry)13 CompositePurchaseOrder (org.folio.rest.jaxrs.model.CompositePurchaseOrder)13 JsonObject (io.vertx.core.json.JsonObject)12 FundDistribution (org.folio.rest.jaxrs.model.FundDistribution)12 Map (java.util.Map)11 CollectionUtils (org.apache.commons.collections4.CollectionUtils)10 LogManager (org.apache.logging.log4j.LogManager)10 Logger (org.apache.logging.log4j.Logger)10 RestClient (org.folio.rest.core.RestClient)10 Location (org.folio.rest.jaxrs.model.Location)10