public class DefaultItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList> extends Object implements ItemListManagementService<L>
Constructor and Description |
---|
DefaultItemListManagementService(com.broadleafcommerce.common.extension.TypeFactory typeFactory,
ItemListProvider<L> listProvider,
ItemListSecurityService<com.broadleafcommerce.cart.client.domain.ItemListAccessRule> securityService,
ItemListItemManagementService<com.broadleafcommerce.cart.client.domain.ItemListItem> itemService) |
Modifier and Type | Method and Description |
---|---|
L |
createItemList(L itemList,
@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Creates an item list and handles related security access grants.
|
void |
deleteItemList(@NonNull String listId,
@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes an item list by ID.
|
DeleteItemListResponse |
deleteItemLists(Set<String> listIds,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Deletes multiple item lists by ID
|
L |
getItemListById(@NonNull String listId,
@NonNull com.broadleafcommerce.cart.client.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(@NonNull com.broadleafcommerce.cart.client.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.
|
protected ItemListItemManagementService<com.broadleafcommerce.cart.client.domain.ItemListItem> |
getItemService() |
protected ItemListProvider<L> |
getListProvider() |
protected ItemListSecurityService<com.broadleafcommerce.cart.client.domain.ItemListAccessRule> |
getSecurityService() |
protected com.broadleafcommerce.common.extension.TypeFactory |
getTypeFactory() |
L |
replaceItemList(@NonNull String listId,
L replaceRequest,
@NonNull com.broadleafcommerce.cart.client.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(@NonNull ShareItemListRequest shareRequest,
@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Shares an item list with other users.
|
L |
updateItemList(@NonNull String listId,
L updateRequest,
@NonNull com.broadleafcommerce.cart.client.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.
|
public DefaultItemListManagementService(com.broadleafcommerce.common.extension.TypeFactory typeFactory, ItemListProvider<L> listProvider, ItemListSecurityService<com.broadleafcommerce.cart.client.domain.ItemListAccessRule> securityService, ItemListItemManagementService<com.broadleafcommerce.cart.client.domain.ItemListItem> itemService)
public org.springframework.data.domain.Page<L> getItemListPage(@NonNull @NonNull com.broadleafcommerce.cart.client.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)
ItemListManagementService
getItemListPage
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
customerRef
- the reference to the customer of which to get item lists forfilters
- additional filters to apply in the query.pageable
- the page information being requestedcontext
- the context of the requestpublic L getItemListById(@NonNull @NonNull String listId, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
getItemListById
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
listId
- the ID of the item listcustomerRef
- the reference to the customer retrieving the listcontext
- the context of the requestpublic L createItemList(@NonNull L itemList, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
createItemList
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
itemList
- The item list to createcustomerRef
- the reference to the customer to create the item list forcontext
- the context of the requestpublic L replaceItemList(@NonNull @NonNull String listId, @NonNull L replaceRequest, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
replaceItemList
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
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 requestpublic L updateItemList(@NonNull @NonNull String listId, @NonNull L updateRequest, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
updateItemList
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
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 requestpublic void deleteItemList(@NonNull @NonNull String listId, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
deleteItemList
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
listId
- the ID of the item list to deletecustomerRef
- the reference to the customer deleting the listcontext
- the context of the requestpublic DeleteItemListResponse deleteItemLists(Set<String> listIds, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
deleteItemLists
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
listIds
- the list IDs of the item lists to deletecustomerRef
- the reference to the customer deleting the listcontext
- the context of the requestpublic void shareItemList(@NonNull @NonNull ShareItemListRequest shareRequest, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ItemListManagementService
shareItemList
in interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
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 requestprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
protected ItemListProvider<L> getListProvider()
protected ItemListSecurityService<com.broadleafcommerce.cart.client.domain.ItemListAccessRule> getSecurityService()
protected ItemListItemManagementService<com.broadleafcommerce.cart.client.domain.ItemListItem> getItemService()
Copyright © 2021. All rights reserved.