Uses of Class
com.broadleafcommerce.dataexchange.service.BatchContext
Packages that use BatchContext
Package
Description
-
Uses of BatchContext in com.broadleafcommerce.dataexchange.domain.util
Methods in com.broadleafcommerce.dataexchange.domain.util with parameters of type BatchContextModifier and TypeMethodDescriptionstatic voidReflectionUtils.resolveErrors(Function<Throwable, DataExchangeError> dataExchangeErrorSupplier, BatchContext<?> batchContext) This method walks the resulting object graph fromgetSavedTopLevelEntities()that were either saved or errored, and assignserrorstogetResponseErrors().Retryable.RetryableBuilder.withExceptionConsumer(ExchangeObject exchangeObject, BatchContext<?> batchContext) Creates aConsumerthat callsregisterException(String, Throwable)using theExchangeObject.getCorrelationId()as the key and logs the exception. -
Uses of BatchContext in com.broadleafcommerce.dataexchange.service
Methods in com.broadleafcommerce.dataexchange.service that return BatchContextModifier and TypeMethodDescriptionHandlerArgs.getBatchContext()The batch context that the item is being saved in.final BatchContext<T>AbstractDataExchangeService.saveAll(@NonNull List<T> entities, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) This method takes the list of entities to be saved, splits them into their individual pieces that have to be saved separately.DataExchangeService.saveAll(List<T> entities, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts a list of entities, typically composite entities that require calls to multiple services and/or service API endpoints to create or update.Methods in com.broadleafcommerce.dataexchange.service with parameters of type BatchContextModifier and TypeMethodDescriptionprotected voidAbstractDataExchangeService.aggregate(BatchContext<T> batchContext) This process takes all the entities that have been saved, aggregates or augments them, and returns them.AbstractBatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate) AbstractBatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, BatchItemOperationType operationType) AbstractBatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, BatchItemOperationType operationType, Map<String, Object> additionalArgs) AbstractBatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, Map<String, Object> additionalArgs) BatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate) The entry point for the handler.BatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, BatchItemOperationType operationType) The entry point for the handler.BatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, BatchItemOperationType operationType, Map<String, Object> additionalArgs) The entry point for the handler.BatchItemHandler.execute(T1 parent, ExchangeObject exchangeObject, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate, Map<String, Object> additionalArgs) The entry point for the handler.protected Function<Throwable,DataExchangeError> AbstractDataExchangeService.getDataExchangeErrorSupplier(BatchContext<T> batchContext) default voidBatchExtensionProcessor.postProcess(BatchContext<?> batchContext) This method will be executed to allow further processing prior to a response being composed and returned.default voidBatchExtensionProcessor.preProcess(BatchContext<?> batchContext) This method will be executed to allow customers to fetch, for example, data that is required for future processing.protected <R,C extends ExchangeObject>
Callable<R>AbstractDataExchangeService.retryableCallable(C payload, BatchContext<T> batchContext, Callable<R> supplier) protected <R,C extends ExchangeObject>
Callable<R>AbstractDataExchangeService.retryableCallable(List<C> payload, BatchContext<T> batchContext, Callable<R> supplier) protected <C extends ExchangeObject>
RunnableAbstractDataExchangeService.retryableRunnable(C payload, BatchContext<T> batchContext, Callable<Void> supplier) protected <C extends ExchangeObject>
RunnableAbstractDataExchangeService.retryableRunnable(List<C> payload, BatchContext<T> batchContext, Callable<Void> supplier) protected <R,C extends ExchangeObject>
Supplier<R>AbstractDataExchangeService.retryableSupplier(C payload, BatchContext<T> batchContext, Callable<R> supplier) protected <R,C extends ExchangeObject>
Supplier<List<R>>AbstractDataExchangeService.retryableSupplier(List<C> payload, BatchContext<T> batchContext, Callable<List<R>> supplier) protected abstract voidAbstractDataExchangeService.saveAll(BatchContext<T> batchContext) This is the entry point for subclasses to inject logic to handle the structure that has been passed in.voidHandlerArgs.setBatchContext(BatchContext<T1> batchContext) The batch context that the item is being saved in.protected voidAbstractDataExchangeService.split(List<T> entities, BatchContext<T> batchContext) This method "flattens" the object graph into aMapofexchange objects.Constructors in com.broadleafcommerce.dataexchange.service with parameters of type BatchContextModifierConstructorDescriptionHandlerArgs(T1 topLevelEntity, T2 beforeSaveItem, BatchContext<T1> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate) HandlerArgs(T1 topLevelEntity, T2 beforeSaveItem, T2 savedItem, BatchContext<T1> batchContext, BatchItemOperationType operationType, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate) -
Uses of BatchContext in com.broadleafcommerce.dataexchange.service.catalog
Methods in com.broadleafcommerce.dataexchange.service.catalog with parameters of type BatchContextModifier and TypeMethodDescriptionprotected List<CompletableFuture<Void>>DefaultComprehensiveProductExchangeService.createProductSaveCompletableFutures(BatchContext<T> batchContext) Creates a list ofCompletableFuture, one for eachComprehensiveProduct, such that each product can be saved individually in an asynchronous way.protected voidDefaultComprehensiveProductExchangeService.fetchExistingProductData(BatchContext<T> batchContext) protected voidDefaultComprehensiveProductExchangeService.fetchExistingProducts(List<T> originalProductList, BatchContext<T> batchContext) protected voidDefaultComprehensiveProductExchangeService.fetchExistingVariants(BatchContext<T> batchContext) DefaultComprehensiveProductExchangeService.getOriginalProductList(BatchContext<T> batchContext) protected voidDefaultComprehensiveProductExchangeService.saveAll(BatchContext<T> batchContext) -
Uses of BatchContext in com.broadleafcommerce.dataexchange.service.product
Methods in com.broadleafcommerce.dataexchange.service.product with parameters of type BatchContextModifier and TypeMethodDescriptionprotected CompletableFuture<Void>ProductBatchItemHandler.deleteVariantsFuture(HandlerArgs<T, T> args, BatchContext<T> tBatchContext) protected org.apache.commons.lang3.tuple.Pair<Collection<String>,Collection<String>> DefaultAdvancedTagPreloader.findTagNamesAndIds(BatchContext<?> batchContext) Find tag names and ids for the given batch context.ProductBatchItemHandlerHelper.getExistingVariants(BatchContext<T> batchContext, T product) voidDefaultAdvancedTagPreloader.preProcess(BatchContext<?> batchContext) voidDefaultPriceDataPreloadProcessor.preProcess(BatchContext<?> batchContext) protected TProductBatchItemHandler.resolveExistingProducts(T product, BatchContext<T> batchContext) ProductBatchItemHandler.saveProduct(T product, BatchContext<T> batchContext, org.springframework.core.task.AsyncTaskExecutor executor, org.springframework.retry.support.RetryTemplate retryTemplate) protected voidProductTagBatchItemHandler.validateParent(BatchContext<ComprehensiveProduct> batchContext, T productTag) -
Uses of BatchContext in com.broadleafcommerce.dataexchange.service.provider
Methods in com.broadleafcommerce.dataexchange.service.provider with parameters of type BatchContextModifier and TypeMethodDescriptionPriceProvider.bulkReadPriceData(BatchContext<ComprehensiveProduct> batch) Bulk read price data for products in a batch.PriceProvider.createPriceData(T priceData, BatchContext<?> batch) CatalogProvider.createProduct(T1 product, BatchContext<?> batchContext) ProductAssetProvider.createProductAsset(String productId, T asset, BatchContext<?> batchContext) AdvancedTagProvider.createProductTag(T2 productTag, BatchContext<?> batchContext) InventoryProvider.createSkuInventory(T inventory, BatchContext<ComprehensiveProduct> batchContext) CatalogProvider.createVariant(T1 product, T2 variant, BatchContext<?> batchContext) AdvancedTagProvider.createVariantTag(T2 variantTag, BatchContext<?> batchContext) voidPriceProvider.deletePriceData(String id, BatchContext<?> batch) voidAdvancedTagProvider.deleteProductTag(String productId, String tagId, BatchContext<?> batchContext) voidCatalogProvider.deleteVariant(String productId, String variantId, BatchContext<?> context) voidAdvancedTagProvider.deleteVariantTag(String productId, String variantId, String id, BatchContext<?> batchContext) AdvancedTagProvider.readAdvancedTags(Collection<String> names, Collection<String> ids, BatchContext<?> batchContext) ProductAssetProvider.readProductAssets(String productId, BatchContext<?> batchContext) Fetch any assets associated with the supplied product id.CatalogProvider.readProductById(String productId, BatchContext<?> batchContext) CatalogProvider.readProducts(List<T1> requestedProducts, BatchContext<?> batchContext) Fetches a list of Products based on externalId, SKU, or URI.CatalogProvider.readProducts(org.springframework.util.MultiValueMap<String, String> params, BatchContext<?> context) AdvancedTagProvider.readProductTags(String productId, BatchContext<?> batchContext) InventoryProvider.readSkuInventory(String locationId, SkuRef skuRef, BatchContext<ComprehensiveProduct> batchContext) CatalogProvider.readVariant(String productId, String variantId, BatchContext<?> context) CatalogProvider.readVariantById(String productId, String variantId, BatchContext<?> batchContext) CatalogProvider.readVariants(List<T1> products, BatchContext<?> batchContext) CatalogProvider.readVariantsForProduct(T1 products, BatchContext<?> batchContext) AdvancedTagProvider.readVariantTags(String productId, String variantId, BatchContext<?> batchContext) CatalogProvider.saveProductTranslations(T1 product, Locale locale, List<Translation> translations, BatchContext<?> batchContext) Saves translations, specifically for a Product.ProductAssetProvider.saveTranslations(String productId, String assetId, Locale locale, List<Translation> translations, BatchContext<?> batchContext) CatalogProvider.saveVariantTranslations(T1 product, T2 variant, Locale locale, List<Translation> translations, BatchContext<?> batchContext) PriceProvider.updatePriceData(T priceData, BatchContext<?> batch) CatalogProvider.updateProduct(T1 product, BatchContext<?> batchContext) ProductAssetProvider.updateProductAsset(String productId, T asset, BatchContext<?> batchContext) AdvancedTagProvider.updateProductTag(T2 productTag, BatchContext<?> batchContext) InventoryProvider.updateSkuInventory(T inventory, BatchContext<ComprehensiveProduct> batchContext) CatalogProvider.updateVariant(T1 product, T2 variant, BatchContext<?> batchContext) AdvancedTagProvider.updateVariantTag(T2 variantTag, BatchContext<?> batchContext) -
Uses of BatchContext in com.broadleafcommerce.dataexchange.service.provider.external
Methods in com.broadleafcommerce.dataexchange.service.provider.external with parameters of type BatchContextModifier and TypeMethodDescriptionprotected cz.jirutka.rsql.parser.ast.NodeExternalPriceProvider.buildBulkReadCriteria(BatchContext<ComprehensiveProduct> batch) ExternalPriceProvider.bulkReadPriceData(BatchContext<ComprehensiveProduct> batch) ExternalCatalogProvider.createExistingProductRsqlQuery(List<T1> products, BatchContext<?> batchContext) When we want to query for existing products, we normally do so by querying by contextId, externalId, or sku.ExternalPriceProvider.createPriceData(T priceData, BatchContext<?> batch) ExternalCatalogProvider.createProduct(T1 product, BatchContext<?> batchContext) ExternalProductAssetProvider.createProductAsset(String productId, T asset, BatchContext<?> batchContext) ExternalAdvancedTagProvider.createProductTag(T2 productTag, BatchContext<?> batchContext) ExternalInventoryProvider.createSkuInventory(T inventory, BatchContext<ComprehensiveProduct> batchContext) ExternalCatalogProvider.createVariant(T1 product, T2 variant, BatchContext<?> batchContext) ExternalAdvancedTagProvider.createVariantTag(T2 productTag, BatchContext<?> batchContext) voidExternalPriceProvider.deletePriceData(String id, BatchContext<?> batch) voidExternalAdvancedTagProvider.deleteProductTag(String productId, String id, BatchContext<?> batchContext) protected org.springframework.web.reactive.function.client.WebClient.RequestHeadersSpec<?>AbstractRestApiExternalProvider.deleteRequest(String uri, BatchContext<?> batchContext) voidExternalCatalogProvider.deleteVariant(String productId, String variantId, BatchContext<?> context) voidExternalAdvancedTagProvider.deleteVariantTag(String productId, String variantId, String id, BatchContext<?> batchContext) protected org.springframework.web.reactive.function.client.WebClient.RequestHeadersSpec<?>AbstractRestApiExternalProvider.getRequest(String uri, BatchContext<?> batchContext) protected org.springframework.web.reactive.function.client.WebClient.RequestBodySpecAbstractRestApiExternalProvider.patchRequest(String uri, BatchContext<?> batchContext) protected org.springframework.web.reactive.function.client.WebClient.RequestBodySpecAbstractRestApiExternalProvider.postRequest(String uri, BatchContext<?> batchContext) protected org.springframework.web.reactive.function.client.WebClient.RequestBodySpecAbstractRestApiExternalProvider.putRequest(String uri, BatchContext<?> batchContext) ExternalAdvancedTagProvider.readAdvancedTags(Collection<String> names, Collection<String> ids, BatchContext<?> batchContext) ExternalProductAssetProvider.readProductAssets(String productId, BatchContext<?> batchContext) ExternalCatalogProvider.readProductById(String productId, BatchContext<?> batchContext) ExternalCatalogProvider.readProducts(List<T1> requestedProducts, BatchContext<?> batchContext) ExternalCatalogProvider.readProducts(org.springframework.util.MultiValueMap<String, String> params, BatchContext<?> batchContext) ExternalAdvancedTagProvider.readProductTags(String productId, BatchContext<?> batchContext) ExternalInventoryProvider.readSkuInventory(String locationId, SkuRef skuRef, BatchContext<ComprehensiveProduct> batchContext) ExternalCatalogProvider.readVariant(String productId, String variantId, BatchContext<?> context) ExternalCatalogProvider.readVariantById(String productId, String variantId, BatchContext<?> batchContext) ExternalCatalogProvider.readVariants(List<T1> products, BatchContext<?> batchContext) ExternalCatalogProvider.readVariantsForProduct(T1 product, BatchContext<?> batchContext) ExternalAdvancedTagProvider.readVariantTags(String productId, String variantId, BatchContext<?> batchContext) ExternalCatalogProvider.saveProductTranslations(T1 product, Locale locale, List<Translation> translations, BatchContext<?> batchContext) ExternalProductAssetProvider.saveTranslations(String productId, String assetId, Locale locale, List<Translation> translations, BatchContext<?> batchContext) ExternalCatalogProvider.saveVariantTranslations(T1 product, T2 variant, Locale locale, List<Translation> translations, BatchContext<?> batchContext) ExternalPriceProvider.updatePriceData(T priceData, BatchContext<?> batch) ExternalCatalogProvider.updateProduct(T1 product, BatchContext<?> batchContext) ExternalProductAssetProvider.updateProductAsset(String productId, T asset, BatchContext<?> batchContext) ExternalAdvancedTagProvider.updateProductTag(T2 productTag, BatchContext<?> batchContext) ExternalInventoryProvider.updateSkuInventory(T inventory, BatchContext<ComprehensiveProduct> batchContext) ExternalCatalogProvider.updateVariant(T1 product, T2 variant, BatchContext<?> batchContext) ExternalAdvancedTagProvider.updateVariantTag(T2 productTag, BatchContext<?> batchContext)