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

All Known Implementing Classes:
DefaultCartNoteOperationService

public interface CartNoteOperationService<P extends com.broadleafcommerce.cart.client.domain.CartNote>
The service handling the operations related to CartNote.
Author:
Sunny Yu
  • Method Summary

    Modifier and Type
    Method
    Description
    createCartNote(P cartNote, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Create a new cart note.
    void
    deleteCartNote(String cartId, String cartNoteId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deletes the cart note.
    org.springframework.data.domain.Page<P>
    readByCartId(String cartId, boolean cartLevelOnly, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, 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.
    org.springframework.data.domain.Page<P>
    readByCartItemId(String cartId, String cartItemId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, 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 item id and filter.
    replaceCartNote(String cartId, String cartNoteId, P cartNote, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Replaces the cart note.
  • Method Details

    • createCartNote

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

      org.springframework.data.domain.Page<P> readByCartId(String cartId, boolean cartLevelOnly, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, 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
    • readByCartItemId

      org.springframework.data.domain.Page<P> readByCartItemId(String cartId, String cartItemId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, 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 item id and filter.

      This is used to retrieve CartItem-level notes.

      Parameters:
      cartId - the id of the cart to find the notes for
      cartItemId - the id of the cart item to find the notes for
      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, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @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, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @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.