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 TypeMethodDescriptioncreateCartNote(P cartNote, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Create a new cart note.voiddeleteCartNote(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 createcustomerRef- the currently authenticatedCustomerRefcontextInfo- 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 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
-
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 forcartItemId- the id of the cart item to find the notes forfilters- 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, 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 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, 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 tocartNoteId- the id of the cart note that is being deletedcontextInfo- context information around sandbox and multitenant state.
-