Class ExternalInventoryProvider<T extends SkuInventory>
java.lang.Object
com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
com.broadleafcommerce.dataexchange.service.provider.external.ExternalInventoryProvider<T>
- All Implemented Interfaces:
InventoryProvider<T>
public class ExternalInventoryProvider<T extends SkuInventory>
extends AbstractRestApiExternalProvider
implements InventoryProvider<T>
Component for interacting with inventory data, typically by making remote calls.
- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
Fields inherited from class com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
CONTENT_CONTEXT_HEADER
-
Constructor Summary
ConstructorsConstructorDescriptionExternalInventoryProvider
(ExternalInventoryProviderProperties properties, com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.web.reactive.function.client.WebClient dataExchangeWebClient, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildInventoryRsql
(SkuRef skuRef, String locationId) createSkuInventory
(T inventory, BatchContext<ComprehensiveProduct> batchContext) protected cz.jirutka.rsql.parser.ast.Node
equalsNode
(String field, String... value) protected String
protected cz.jirutka.rsql.parser.ast.Node
orEqualsNode
(cz.jirutka.rsql.parser.ast.Node node, String field, String value) readSkuInventory
(String locationId, SkuRef skuRef, BatchContext<ComprehensiveProduct> batchContext) updateSkuInventory
(T inventory, BatchContext<ComprehensiveProduct> batchContext) Methods inherited from class com.broadleafcommerce.dataexchange.service.provider.external.AbstractRestApiExternalProvider
buildAndNode, buildAndNode, buildEqualsNode, buildInNode, buildInNode, buildOrNode, buildOrNode, deleteRequest, deleteRequest, emptyNode, filterEmptyNodes, filterEmptyNodes, getHeaders, getMapper, getMostDerivedType, getRequest, getRequest, getTypeFactory, getWebClient, isEmptyNodeOrNull, narrowedPageParams, patchRequest, patchRequest, postRequest, postRequest, putRequest, putRequest, setCorrelationIds
-
Constructor Details
-
ExternalInventoryProvider
public ExternalInventoryProvider(ExternalInventoryProviderProperties properties, com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.web.reactive.function.client.WebClient dataExchangeWebClient, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
readSkuInventory
public List<T> readSkuInventory(String locationId, SkuRef skuRef, BatchContext<ComprehensiveProduct> batchContext) - Specified by:
readSkuInventory
in interfaceInventoryProvider<T extends SkuInventory>
-
createSkuInventory
- Specified by:
createSkuInventory
in interfaceInventoryProvider<T extends SkuInventory>
-
updateSkuInventory
- Specified by:
updateSkuInventory
in interfaceInventoryProvider<T extends SkuInventory>
-
buildInventoryRsql
-
orEqualsNode
-
equalsNode
-
getType
-
getServiceClient
- Specified by:
getServiceClient
in classAbstractRestApiExternalProvider
- Returns:
- Returns the service client name to be used for the request.
-