Interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
-
- All Known Implementing Classes:
DefaultItemListManagementService
public interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
Service responsible for managing actions to item lists.- Author:
- Jacob Mitash
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description L
createItemList(L itemList, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Creates an item list and handles related security access grants.void
deleteItemList(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes an item list by ID.DeleteItemListResponse
deleteItemLists(Set<String> listIds, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes multiple item lists by IDL
getItemListById(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Gets a specific item list by its ID.org.springframework.data.domain.Page<L>
getItemListPage(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 context)
Gets a page of item lists.L
replaceItemList(String listId, L replaceRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Replaces an item list after checking if operation is allowed on the list.void
shareItemList(ShareItemListRequest shareRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Shares an item list with other users.L
updateItemList(String listId, L updateRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Updates an item list after checking if the operation is allowed on the list.
-
-
-
Method Detail
-
getItemListPage
org.springframework.data.domain.Page<L> getItemListPage(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Gets a page of item lists.- Parameters:
customerRef
- the reference to the customer of which to get item lists forpageable
- the page information being requestedfilters
- additional filters to apply in the query.context
- the context of the request- Returns:
- a page of item lists
-
getItemListById
L getItemListById(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Gets a specific item list by its ID.- Parameters:
listId
- the ID of the item listcustomerRef
- the reference to the customer retrieving the listcontext
- the context of the request- Returns:
- the item list
-
createItemList
L createItemList(L itemList, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Creates an item list and handles related security access grants.- Parameters:
itemList
- The item list to createcustomerRef
- the reference to the customer to create the item list forcontext
- the context of the request- Returns:
- the created item list
-
replaceItemList
L replaceItemList(String listId, L replaceRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Replaces an item list after checking if operation is allowed on the list.- Parameters:
listId
- the ID of the item list to replacereplaceRequest
- the replacement data to apply to the item listcustomerRef
- the reference to the customer modifying the listcontext
- the context of the request- Returns:
- the replaced version of the item list
-
updateItemList
L updateItemList(String listId, L updateRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Updates an item list after checking if the operation is allowed on the list.- Parameters:
listId
- the ID of the item list to replaceupdateRequest
- the update data to apply to the item listcustomerRef
- the reference to the customer modifying the listcontext
- the context of the request- Returns:
- the updated version of the item list
-
deleteItemList
void deleteItemList(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes an item list by ID.- Parameters:
listId
- the ID of the item list to deletecustomerRef
- the reference to the customer deleting the listcontext
- the context of the request
-
deleteItemLists
DeleteItemListResponse deleteItemLists(Set<String> listIds, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes multiple item lists by ID- Parameters:
listIds
- the list IDs of the item lists to deletecustomerRef
- the reference to the customer deleting the listcontext
- the context of the request- Returns:
- a response indicating which deletions were successful
-
shareItemList
void shareItemList(ShareItemListRequest shareRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Shares an item list with other users.- Parameters:
shareRequest
- the request body describing who and how to share the list withcustomerRef
- the reference to the customer who initiated the sharing requestcontext
- the context of the request
-
-