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 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
Fields Modifier and Type Field Description static String
BASE_URI
static String
BULK_LIST_URI
-
Constructor Summary
Constructors Constructor Description ItemListOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListManagementService<L> listService, ItemListAddToCartService addToCartService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ItemListAddToCartResponse
addItemListsToCart(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.L
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)
DeleteItemListResponse
deleteItemLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, Set<String> listIds)
Deprecated.DeleteItemListResponse
deleteItemListsInBulk(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, Set<String> listIds)
protected ItemListAddToCartService
getAddToCartService()
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
getAuthUtils()
L
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>
getListService()
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)
L
updateItemList(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, L updateRequest)
-
-
-
Field Detail
-
BASE_URI
public static final String BASE_URI
- See Also:
- Constant Field Values
-
BULK_LIST_URI
public static final String BULK_LIST_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ItemListOperationEndpoint
public ItemListOperationEndpoint(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authUtils, ItemListManagementService<L> listService, ItemListAddToCartService addToCartService)
-
-
Method Detail
-
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
@FrameworkGetMapping("/{listId}") public L getItemListById(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef)
-
createItemList
@FrameworkPostMapping public L createItemList(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody L createRequest)
-
replaceItemList
@FrameworkPutMapping("/{listId}") public L replaceItemList(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody L replaceRequest)
-
updateItemList
@FrameworkPatchMapping("/{listId}") public L updateItemList(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody L updateRequest)
-
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.
-
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)
-
shareItemList
@FrameworkPostMapping("/{listId}/share") public void shareItemList(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Validated @RequestBody ShareItemListRequest shareRequest)
-
getAuthUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthUtils()
-
getListService
protected ItemListManagementService<L> getListService()
-
getAddToCartService
protected ItemListAddToCartService getAddToCartService()
-
-