public class ExternalGuestTokenProvider extends AbstractExternalProvider implements GuestTokenProvider
Constructor and Description |
---|
ExternalGuestTokenProvider(org.springframework.web.reactive.function.client.WebClient webClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
ExternalCartProperties properties) |
Modifier and Type | Method and Description |
---|---|
com.broadleafcommerce.cart.client.domain.GuestToken |
createGuestToken(@NonNull com.broadleafcommerce.cart.client.domain.GuestToken guestToken,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Creates the provided
GuestToken and returns the result. |
boolean |
deleteGuestToken(@NonNull String cartId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deletes the guest token for the provided cart ID, if it exists.
|
protected Map<String,Object> |
getCartIdVariables(String cartId) |
protected String |
getGuestTokenUrlForCart(String cartId) |
protected ExternalCartProperties |
getProperties() |
Optional<com.broadleafcommerce.cart.client.domain.GuestToken> |
retrieveGuestToken(@NonNull String cartId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the
GuestToken for the provided cart ID, if it exists. |
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams, uriVars
public ExternalGuestTokenProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCartProperties properties)
public Optional<com.broadleafcommerce.cart.client.domain.GuestToken> retrieveGuestToken(@NonNull @NonNull String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
GuestTokenProvider
GuestToken
for the provided cart ID, if it exists.retrieveGuestToken
in interface GuestTokenProvider
cartId
- the cart IDcontextInfo
- the context infopublic com.broadleafcommerce.cart.client.domain.GuestToken createGuestToken(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.GuestToken guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
GuestTokenProvider
GuestToken
and returns the result.createGuestToken
in interface GuestTokenProvider
guestToken
- the guest token to createcontextInfo
- the context infopublic boolean deleteGuestToken(@NonNull @NonNull String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
GuestTokenProvider
deleteGuestToken
in interface GuestTokenProvider
cartId
- the cart IDcontextInfo
- the context infoprotected ExternalCartProperties getProperties()
Copyright © 2021. All rights reserved.