Class ExternalCustomerOrderInfoProvider<O extends CustomerOrderInfo>
java.lang.Object
com.broadleafcommerce.tabby.provider.external.AbstractExternalProvider
com.broadleafcommerce.tabby.provider.external.ExternalCustomerOrderInfoProvider<O>
- All Implemented Interfaces:
CustomerOrderInfoProvider<O>
public class ExternalCustomerOrderInfoProvider<O extends CustomerOrderInfo>
extends AbstractExternalProvider
implements CustomerOrderInfoProvider<O>
The default implementation of
CustomerOrderInfoProvider.- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionExternalCustomerOrderInfoProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalOrderOperationProviderProperties properties, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsprotected org.springframework.web.util.UriComponentsBuilderprotected ExternalOrderOperationProviderPropertiesorg.springframework.data.domain.Page<O>readOrderInfoForAnonymousCustomer(String customerEmail, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the order history for an anonymous customer by email address.org.springframework.data.domain.Page<O>readOrderInfoForCustomer(String customerId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the order history for the provided customer id.Methods inherited from class com.broadleafcommerce.tabby.provider.external.AbstractExternalProvider
executeRequest, getHeaders, getObjectMapper, getWebClient, orderToParamValue, pageableToParams, uriVars
-
Constructor Details
-
ExternalCustomerOrderInfoProvider
public ExternalCustomerOrderInfoProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalOrderOperationProviderProperties properties, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
-
-
Method Details
-
readOrderInfoForCustomer
public org.springframework.data.domain.Page<O> readOrderInfoForCustomer(String customerId, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomerOrderInfoProviderReads the order history for the provided customer id.- Specified by:
readOrderInfoForCustomerin interfaceCustomerOrderInfoProvider<O extends CustomerOrderInfo>- Parameters:
customerId- the customer id to read the Orderspage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- the page of
CustomerOrderInfo
-
readOrderInfoForAnonymousCustomer
public org.springframework.data.domain.Page<O> readOrderInfoForAnonymousCustomer(String customerEmail, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomerOrderInfoProviderReads the order history for an anonymous customer by email address.- Specified by:
readOrderInfoForAnonymousCustomerin interfaceCustomerOrderInfoProvider<O extends CustomerOrderInfo>- Parameters:
customerEmail- the customer emailpage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- the page of
CustomerOrderInfo
-
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri() -
getProperties
-
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
-