Interface GuestTokenProvider

All Known Implementing Classes:
ExternalGuestTokenProvider

public interface GuestTokenProvider
Provider for storing GuestToken.
Author:
Nick Crum (ncrum)
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.cart.client.domain.GuestToken
    createGuestToken(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(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deletes the guest token for the provided cart ID, if it exists.
    Optional<com.broadleafcommerce.cart.client.domain.GuestToken>
    retrieveGuestToken(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the GuestToken for the provided cart ID, if it exists.
  • Method Details

    • retrieveGuestToken

      Optional<com.broadleafcommerce.cart.client.domain.GuestToken> retrieveGuestToken(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the GuestToken for the provided cart ID, if it exists.
      Parameters:
      cartId - the cart ID
      contextInfo - the context info
      Returns:
      an optional of the guest token, or empty
    • createGuestToken

      com.broadleafcommerce.cart.client.domain.GuestToken createGuestToken(com.broadleafcommerce.cart.client.domain.GuestToken guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Creates the provided GuestToken and returns the result.
      Parameters:
      guestToken - the guest token to create
      contextInfo - the context info
      Returns:
      the created guest token
    • deleteGuestToken

      boolean deleteGuestToken(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deletes the guest token for the provided cart ID, if it exists.
      Parameters:
      cartId - the cart ID
      contextInfo - the context info
      Returns:
      whether or not a token was deleted