@FrameworkMapping(value="/item-list-ops/{listId}") @FrameworkRestController public class ItemListItemOperationEndpoint<I extends com.broadleafcommerce.cart.client.domain.ItemListItem> extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASE_URI |
static String |
BULK_ITEMS_SUBPATH |
static String |
ITEMS_SUBPATH |
Constructor and Description |
---|
ItemListItemOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils,
ItemListItemManagementService<I> itemService) |
Modifier and Type | Method and Description |
---|---|
I |
createItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
I createRequest) |
List<I> |
createItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
List<I> createRequests) |
void |
deleteItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
String itemId) |
void |
deleteItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
Set<String> itemIds)
Deprecated.
Use
deleteItemListItemsInBulk(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. |
void |
deleteItemListItemsInBulk(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.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.cart.client.domain.CustomerRef customerRef,
String listId,
String itemId) |
org.springframework.data.domain.Page<I> |
getItemListItemPage(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
org.springframework.data.domain.Pageable pageable) |
List<I> |
getItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
Set<String> itemIds) |
protected ItemListItemManagementService<I> |
getItemService() |
I |
replaceItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
String itemId,
I updateRequest) |
List<I> |
replaceItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
List<I> updateRequests) |
I |
updateItemListItem(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
String itemId,
I updateRequest) |
List<I> |
updateItemListItems(com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String listId,
List<I> updateRequests) |
public static final String BASE_URI
public static final String ITEMS_SUBPATH
public static final String BULK_ITEMS_SUBPATH
public ItemListItemOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListItemManagementService<I> itemService)
@FrameworkGetMapping(value="/items") public org.springframework.data.domain.Page<I> getItemListItemPage(@ContextOperation(value=READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @PageableDefault org.springframework.data.domain.Pageable pageable)
@FrameworkGetMapping(value="/items/{itemId}") public I getItemListItem(@ContextOperation(value=READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId)
@FrameworkPostMapping(value="/items") public I createItemListItem(@ContextOperation(value=CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody I createRequest)
@FrameworkPutMapping(value="/items/{itemId}") public I replaceItemListItem(@ContextOperation(value=UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId, @Validated @RequestBody I updateRequest)
@FrameworkPatchMapping(value="/items/{itemId}") public I updateItemListItem(@ContextOperation(value=UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId, @Validated @RequestBody I updateRequest)
@FrameworkDeleteMapping(value="/items/{itemId}") public void deleteItemListItem(@ContextOperation(value=DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @PathVariable String itemId)
@FrameworkGetMapping(value="/bulk-items", params="itemIds") public List<I> getItemListItems(@ContextOperation(value=READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @RequestParam Set<String> itemIds)
@FrameworkPostMapping(value="/bulk-items") public List<I> createItemListItems(@ContextOperation(value=CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> createRequests)
@FrameworkPutMapping(value="/bulk-items") public List<I> replaceItemListItems(@ContextOperation(value=UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> updateRequests)
@FrameworkPatchMapping(value="/bulk-items") public List<I> updateItemListItems(@ContextOperation(value=UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @Validated @RequestBody List<I> updateRequests)
@Deprecated @FrameworkDeleteMapping(value="/bulk-items", params="itemIds") public void deleteItemListItems(@ContextOperation(value=DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @RequestParam Set<String> itemIds)
deleteItemListItemsInBulk(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.@FrameworkPostMapping(value="/bulk-items/delete", consumes="application/json") public void deleteItemListItemsInBulk(@ContextOperation(value=DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @PathVariable String listId, @RequestBody Set<String> itemIds)
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthUtils()
protected ItemListItemManagementService<I> getItemService()
Copyright © 2021. All rights reserved.