Class ItemListItemOperationEndpoint<I extends com.broadleafcommerce.cart.client.domain.ItemListItem>
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.ItemListItemOperationEndpoint<I>
@FrameworkMapping("/item-list-ops/{listId}")
@FrameworkRestController
@DataRouteByKey("cartoperation")
public class ItemListItemOperationEndpoint<I extends com.broadleafcommerce.cart.client.domain.ItemListItem>
extends Object
Endpoint for management of item list items.
- Author:
- Jacob Mitash
-
Field Summary
-
Constructor Summary
ConstructorDescriptionItemListItemOperationEndpoint
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListItemManagementService<I> itemService) -
Method Summary
Modifier and TypeMethodDescriptioncreateItemListItem
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, I createRequest) createItemListItems
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, List<I> createRequests) void
deleteItemListItem
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId) void
deleteItemListItems
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, Set<String> itemIds) Deprecated.void
deleteItemListItemsInBulk
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, Set<String> itemIds) protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
getItemListItem
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId) org.springframework.data.domain.Page<I>
getItemListItemPage
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, org.springframework.data.domain.Pageable pageable) getItemListItems
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, Set<String> itemIds) protected ItemListItemManagementService<I>
replaceItemListItem
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId, I updateRequest) replaceItemListItems
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, List<I> updateRequests) updateItemListItem
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId, I updateRequest) updateItemListItems
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, List<I> updateRequests)
-
Field Details
-
BASE_URI
- See Also:
-
ITEMS_SUBPATH
- See Also:
-
BULK_ITEMS_SUBPATH
- See Also:
-
-
Constructor Details
-
ItemListItemOperationEndpoint
public ItemListItemOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListItemManagementService<I> itemService)
-
-
Method Details
-
getItemListItemPage
@FrameworkGetMapping("/items") public org.springframework.data.domain.Page<I> getItemListItemPage(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @PageableDefault org.springframework.data.domain.Pageable pageable) -
getItemListItem
-
createItemListItem
-
replaceItemListItem
@FrameworkPutMapping("/items/{itemId}") public I replaceItemListItem(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId, @Validated @RequestBody I updateRequest) -
updateItemListItem
@FrameworkPatchMapping("/items/{itemId}") public I updateItemListItem(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId, @Validated @RequestBody I updateRequest) -
deleteItemListItem
-
getItemListItems
@FrameworkGetMapping(value="/bulk-items", params="itemIds") public List<I> getItemListItems(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @RequestParam Set<String> itemIds) -
createItemListItems
@FrameworkPostMapping("/bulk-items") public List<I> createItemListItems(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> createRequests) -
replaceItemListItems
@FrameworkPutMapping("/bulk-items") public List<I> replaceItemListItems(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> updateRequests) -
updateItemListItems
@FrameworkPatchMapping("/bulk-items") public List<I> updateItemListItems(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> updateRequests) -
deleteItemListItems
@Deprecated @FrameworkDeleteMapping(value="/bulk-items", params="itemIds") public void deleteItemListItems(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @RequestParam Set<String> itemIds) Deprecated.UsedeleteItemListItemsInBulk(ContextInfo, CustomerRef, String, 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. -
deleteItemListItemsInBulk
@FrameworkPostMapping(value="/bulk-items/delete", consumes="application/json") public void deleteItemListItemsInBulk(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @RequestBody Set<String> itemIds) -
getAuthUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthUtils() -
getItemService
-
deleteItemListItemsInBulk(ContextInfo, CustomerRef, String, Set)
.