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 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
Fields Modifier and Type Field Description static String
BASE_URI
static String
BULK_ITEMS_SUBPATH
static String
ITEMS_SUBPATH
-
Constructor Summary
Constructors Constructor Description ItemListItemOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListItemManagementService<I> itemService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description I
createItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, I createRequest)
List<I>
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
getAuthUtils()
I
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)
List<I>
getItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, Set<String> itemIds)
protected ItemListItemManagementService<I>
getItemService()
I
replaceItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId, I updateRequest)
List<I>
replaceItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, List<I> updateRequests)
I
updateItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, String itemId, I updateRequest)
List<I>
updateItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, String listId, List<I> updateRequests)
-
-
-
Field Detail
-
BASE_URI
public static final String BASE_URI
- See Also:
- Constant Field Values
-
ITEMS_SUBPATH
public static final String ITEMS_SUBPATH
- See Also:
- Constant Field Values
-
BULK_ITEMS_SUBPATH
public static final String BULK_ITEMS_SUBPATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ItemListItemOperationEndpoint
public ItemListItemOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListItemManagementService<I> itemService)
-
-
Method Detail
-
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
@FrameworkGetMapping("/items/{itemId}") public I getItemListItem(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId)
-
createItemListItem
@FrameworkPostMapping("/items") public I createItemListItem(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody I createRequest)
-
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
@FrameworkDeleteMapping("/items/{itemId}") public void deleteItemListItem(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId)
-
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
protected ItemListItemManagementService<I> getItemService()
-
-