Interface CartTransferService
-
- All Known Implementing Classes:
DefaultCartTransferService
public interface CartTransferServiceService for performing ownership transfers between anonymous, CSR, and customer-owned carts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description TransferCartTokencreateTransferCartToken(com.broadleafcommerce.cart.client.domain.Cart cart)Creates a newTransferCartTokenthat can be exchanged for proof of access to transfer a particular cart.com.broadleafcommerce.cart.client.domain.CarttransferAnonymousCartOwnership(com.broadleafcommerce.cart.client.domain.Cart anonymousCart, com.broadleafcommerce.cart.client.domain.Cart registeredCustomerCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous cart to be in-process for the currently authenticated customer.com.broadleafcommerce.cart.client.domain.CarttransferAnonymousCartOwnership(com.broadleafcommerce.cart.client.domain.Cart anonymousCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous cart to be in-process for the currently authenticated customer.com.broadleafcommerce.cart.client.domain.CarttransferAnonymousCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated.com.broadleafcommerce.cart.client.domain.CarttransferAnonymousCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous CSR cart to be in-process for the provided customercom.broadleafcommerce.cart.client.domain.CarttransferCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided CSR cart to be in-process for its customer.TransferCartTokenvalidateTransferCartToken(String tokenString)Attempts to decode and validate the provided token string into aTransferCartToken.
-
-
-
Method Detail
-
transferAnonymousCartOwnership
com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCartOwnership(com.broadleafcommerce.cart.client.domain.Cart anonymousCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous cart to be in-process for the currently authenticated customer.- Parameters:
anonymousCart- The anonymous cart to transfer ownershipcontextInfo- Context information around sandbox and multitenant state.- Returns:
- The cart now owned by the customer
-
createTransferCartToken
TransferCartToken createTransferCartToken(com.broadleafcommerce.cart.client.domain.Cart cart)
Creates a newTransferCartTokenthat can be exchanged for proof of access to transfer a particular cart.- Parameters:
cart- the cart which can be transferred using this token- Returns:
- a transfer cart token object with an encoded token that is used to prove access to transfer the cart
-
transferAnonymousCartOwnership
com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCartOwnership(com.broadleafcommerce.cart.client.domain.Cart anonymousCart, @Nullable com.broadleafcommerce.cart.client.domain.Cart registeredCustomerCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous cart to be in-process for the currently authenticated customer.- Parameters:
anonymousCart- The anonymous cart to transfer ownershipregisteredCustomerCart- The pre-existing customer's cartcontextInfo- Context information around sandbox and multitenant state.- Returns:
- The cart now owned by the customer
-
transferCsrCartToInProcess
com.broadleafcommerce.cart.client.domain.Cart transferCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided CSR cart to be in-process for its customer.- Parameters:
csrCart- The CSR-owned cart to replace the customer's in-process cartcontextInfo- Context information around sandbox and multitenant state.- Returns:
- The in-process cart transferred to the customer
-
validateTransferCartToken
TransferCartToken validateTransferCartToken(String tokenString) throws TransferCartTokenParseException
Attempts to decode and validate the provided token string into aTransferCartToken. This is used to provide a way to check that a token is valid and to extract the contents.- Parameters:
tokenString- the encoded token string- Returns:
- a transfer cart token object
- Throws:
TransferCartTokenParseException
-
transferAnonymousCsrCartToInProcess
@Deprecated com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.Transfer the provided anonymous CSR cart to be in-process for the current customer or anonymous user.- Parameters:
csrCart- The anonymous CSR-owned cart to transfercontextInfo- Context information around sandbox and multitenant state.- Returns:
- The in-process cart transferred to the customer or anonymous user
-
transferAnonymousCsrCartToInProcess
com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCsrCartToInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Transfer the provided anonymous CSR cart to be in-process for the provided customer- Parameters:
csrCart- the CSR cartcustomer- the customercontextInfo- the context info- Returns:
- the transferred cart
-
-