Class ItemListOperationEndpoint<L extends com.broadleafcommerce.cart.client.domain.ItemList>
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.ItemListOperationEndpoint<L>
@FrameworkMapping("/item-list-ops")
@FrameworkRestController
@DataRouteByKey("cartoperation")
public class ItemListOperationEndpoint<L extends com.broadleafcommerce.cart.client.domain.ItemList>
extends Object
Endpoint for management of item list(s).
- Author:
- Jacob Mitash
-
Field Summary
-
Constructor Summary
ConstructorDescriptionItemListOperationEndpoint
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListManagementService<L> listService, ItemListAddToCartService addToCartService) -
Method Summary
Modifier and TypeMethodDescriptionaddItemListsToCart
(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, AddItemListToCartRequest addItemListToCartRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.createItemList
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L createRequest) void
deleteItemList
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef) deleteItemLists
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, Set<String> listIds) Deprecated.deleteItemListsInBulk
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, Set<String> listIds) protected ItemListAddToCartService
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
getItemListById
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef) org.springframework.data.domain.Page<L>
getItemListPage
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable) protected ItemListManagementService<L>
replaceItemList
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L replaceRequest) void
shareItemList
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, ShareItemListRequest shareRequest) updateItemList
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L updateRequest) updateItemListAttributes
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L request) updateItemListName
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L request)
-
Field Details
-
BASE_URI
- See Also:
-
BULK_LIST_URI
- See Also:
-
-
Constructor Details
-
ItemListOperationEndpoint
public ItemListOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListManagementService<L> listService, ItemListAddToCartService addToCartService)
-
-
Method Details
-
getItemListPage
@FrameworkGetMapping public org.springframework.data.domain.Page<L> getItemListPage(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(50) org.springframework.data.domain.Pageable pageable) -
addItemListsToCart
@FrameworkPostMapping(value="/add-to-cart", consumes="application/json") @Deprecated public ItemListAddToCartResponse addItemListsToCart(@Nullable com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @RequestBody AddItemListToCartRequest addItemListToCartRequest, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
getItemListById
-
createItemList
-
replaceItemList
-
updateItemList
-
deleteItemList
@FrameworkDeleteMapping("/{listId}") public void deleteItemList(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef) -
deleteItemLists
@Deprecated @FrameworkDeleteMapping("/bulk-item-lists") public DeleteItemListResponse deleteItemLists(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @RequestParam Set<String> listIds) Deprecated.UsedeleteItemListsInBulk(ContextInfo, CustomerRef, Set)
. This will allow much longer lists of IDs without worrying about whether the URL is too long and corrects the HTTP method semantics by using POST since we're not actually deleting a resource at the URL. -
updateItemListName
@FrameworkPatchMapping("/item-list-ops/{listId}/name") public L updateItemListName(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody L request) -
updateItemListAttributes
@FrameworkPatchMapping("/item-list-ops/{listId}/attributes") public L updateItemListAttributes(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody L request) -
deleteItemListsInBulk
@FrameworkPostMapping(value="/bulk-item-lists/delete", consumes="application/json") public DeleteItemListResponse deleteItemListsInBulk(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @RequestBody Set<String> listIds) -
getAuthUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthUtils() -
getListService
-
getAddToCartService
-
deleteItemListsInBulk(ContextInfo, CustomerRef, Set)
.