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
Modifier and TypeMethodDescriptionchangeItemListAttributes
(String listId, Map<String, Object> attributes, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Changes the attributes of the item list without having to include all of the items in the update request.changeItemListName
(String listId, String replacementName, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Changes the name of the item list without having to include all of the items in the update requestcreateItemList
(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.deleteItemLists
(Set<String> listIds, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deletes multiple item lists by IDgetItemListById
(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.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.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 Details
-
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
-
changeItemListName
L changeItemListName(String listId, String replacementName, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Changes the name of the item list without having to include all of the items in the update request- Parameters:
listId
- the ID of the item list whose name is being changedreplacementName
- the new name for the listcustomerRef
- the reference to the customer to create the item list forcontext
- the context of the request- Returns:
- the item list with an updated name value
-
changeItemListAttributes
L changeItemListAttributes(String listId, Map<String, Object> attributes, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Changes the attributes of the item list without having to include all of the items in the update request. Only attributes with keys specified in the request will be updated. To have an attribute removed, map the key to a null value:myKey -> null
.- Parameters:
listId
- the ID of the item list whose attributes are being addedattributes
- the new attributes for the listcustomerRef
- the reference to the customer to create the item list forcontext
- the context of the request- Returns:
- the item list with an updated name value
-
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
-