Interface CartTransferService

  • All Known Implementing Classes:
    DefaultCartTransferService

    public interface CartTransferService
    Service 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
      TransferCartToken createTransferCartToken​(com.broadleafcommerce.cart.client.domain.Cart cart)
      Creates a new TransferCartToken that can be exchanged for proof of access to transfer a particular cart.
      com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCartOwnership​(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.Cart transferAnonymousCartOwnership​(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.Cart transferAnonymousCsrCartToInProcess​(com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      com.broadleafcommerce.cart.client.domain.Cart transferAnonymousCsrCartToInProcess​(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 customer
      com.broadleafcommerce.cart.client.domain.Cart transferCsrCartToInProcess​(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.
      TransferCartToken validateTransferCartToken​(String tokenString)
      Attempts to decode and validate the provided token string into a TransferCartToken.
    • 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 ownership
        contextInfo - 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 new TransferCartToken that 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 ownership
        registeredCustomerCart - The pre-existing customer's cart
        contextInfo - 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 cart
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The in-process cart transferred to the customer
      • 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)
        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 transfer
        contextInfo - 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 cart
        customer - the customer
        contextInfo - the context info
        Returns:
        the transferred cart