Class ExternalOrderProvider
java.lang.Object
com.broadleafcommerce.inventory.service.provider.ExternalOrderProvider
- All Implemented Interfaces:
OrderProvider
-
Constructor Summary
ConstructorsConstructorDescriptionExternalOrderProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.util.UriComponentsBuilderGets the base URI common to all requests this provider will make.protected org.springframework.http.HttpHeadersgetHeaders(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.fasterxml.jackson.databind.ObjectMapperprotected ExternalOrderProviderPropertiesprotected Stringprotected org.springframework.web.reactive.function.client.WebClientreadOrderById(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the order by idreadOrderByLink(String orderLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the order by linkreadOrderFulfillmentsById(String orderFulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the order fulfillment by idreadOrderFulfillmentsByLink(String fulfillmentLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the order fulfillments by link.voidsetProperties(ExternalOrderProviderProperties properties)
-
Constructor Details
-
ExternalOrderProvider
public ExternalOrderProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
readOrderByLink
public AbstractInventoryAdjustmentListener.Order readOrderByLink(String orderLink, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderProviderRead the order by link- Specified by:
readOrderByLinkin interfaceOrderProvider- Parameters:
orderLink- The link to readcontextInfo- The context- Returns:
- the order
-
readOrderById
public AbstractInventoryAdjustmentListener.Order readOrderById(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderProviderRead the order by id- Specified by:
readOrderByIdin interfaceOrderProvider- Parameters:
orderId- The order idcontextInfo- The context- Returns:
- the order
-
readOrderFulfillmentsByLink
public List<AbstractInventoryAdjustmentListener.OrderFulfillment> readOrderFulfillmentsByLink(String fulfillmentLink, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderProviderRead the order fulfillments by link.- Specified by:
readOrderFulfillmentsByLinkin interfaceOrderProvider- Parameters:
fulfillmentLink- The link to readcontextInfo- The context- Returns:
- A list of order fulfillments
-
readOrderFulfillmentsById
public AbstractInventoryAdjustmentListener.OrderFulfillment readOrderFulfillmentsById(String orderFulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderProviderRead the order fulfillment by id- Specified by:
readOrderFulfillmentsByIdin interfaceOrderProvider- Parameters:
orderFulfillmentId- The order fulfillment idcontextInfo- The context- Returns:
- the order
-
getHeaders
protected org.springframework.http.HttpHeaders getHeaders(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri()Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
-
getServiceClient
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getProperties
-
setProperties
-