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 TypeMethodDescriptioncreateCartNote
(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 createcontextInfo
- 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 tocartNoteId
- the cart note idcontextInfo
- 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 forcartLevelOnly
- whether to retrieve cart-level notes onlyfilters
- the filters to applypageable
- the requested page of resultscontextInfo
- 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 tocartNoteId
- the id of the cart note that is being replacedcartNote
- the cart note payloadcontextInfo
- 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 tocartNoteId
- the id of the cart note that is being deletedcontextInfo
- context information around sandbox and multitenant state.
-