Interface CartNoteProvider<P extends com.broadleafcommerce.cart.client.domain.CartNote>

All Known Implementing Classes:
ExternalCartNoteProvider

public interface CartNoteProvider<P extends com.broadleafcommerce.cart.client.domain.CartNote>
Provider for interfacing with CartNotes.
Author:
Sunny Yu
  • Method Summary

    Modifier and Type
    Method
    Description
    createCartNote(P cartNote, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Create a new cart note.
    void
    deleteCartNote(String cartId, String cartNoteId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deletes the cart note.
    replaceCartNote(String cartId, String cartNoteId, P cartNote, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Replaces the cart note.
    retrieveCartNoteById(String cartId, String cartNoteId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves a cart note by its id.
    org.springframework.data.domain.Page<P>
    retrieveCartNotesByCartId(String cartId, boolean cartLevelOnly, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves all cart notes based on the given cart id and filter.
  • Method Details

    • createCartNote

      P createCartNote(P cartNote, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Create a new cart note.
      Parameters:
      cartNote - the cart note to create
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the created cart note.
    • retrieveCartNoteById

      P retrieveCartNoteById(String cartId, String cartNoteId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a cart note by its id.
      Parameters:
      cartId - the id of the cart that this note belongs to
      cartNoteId - the cart note id
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the retrieved cart note with the given id
    • retrieveCartNotesByCartId

      org.springframework.data.domain.Page<P> retrieveCartNotesByCartId(String cartId, boolean cartLevelOnly, cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves all cart notes based on the given cart id and filter.
      Parameters:
      cartId - the id of the cart to find the notes for
      cartLevelOnly - whether to retrieve cart-level notes only
      filters - the filters to apply
      pageable - the requested page of results
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the cart notes based on the given cart id and filter
    • replaceCartNote

      P replaceCartNote(String cartId, String cartNoteId, P cartNote, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Replaces the cart note.
      Parameters:
      cartId - the id of the cart that this note belongs to
      cartNoteId - the id of the cart note that is being replaced
      cartNote - the cart note payload
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the updated cart note
    • deleteCartNote

      void deleteCartNote(String cartId, String cartNoteId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deletes the cart note.
      Parameters:
      cartId - the id of the cart that this note belongs to
      cartNoteId - the id of the cart note that is being deleted
      contextInfo - context information around sandbox and multitenant state.