Interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>

All Known Implementing Classes:
DefaultItemListManagementService

public interface ItemListManagementService<L extends com.broadleafcommerce.cart.client.domain.ItemList>
Service responsible for managing actions to item lists.
Author:
Jacob Mitash
  • Method Summary

    Modifier and Type
    Method
    Description
    changeItemListAttributes(String listId, Map<String,Object> attributes, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Changes the attributes of the item list without having to include all of the items in the update request.
    changeItemListName(String listId, String replacementName, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Changes the name of the item list without having to include all of the items in the update request
    createItemList(L itemList, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Creates an item list and handles related security access grants.
    void
    deleteItemList(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Deletes an item list by ID.
    deleteItemLists(Set<String> listIds, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Deletes multiple item lists by ID
    getItemListById(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Gets a specific item list by its ID.
    org.springframework.data.domain.Page<L>
    getItemListPage(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Gets a page of item lists.
    replaceItemList(String listId, L replaceRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Replaces an item list after checking if operation is allowed on the list.
    void
    shareItemList(ShareItemListRequest shareRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Shares an item list with other users.
    updateItemList(String listId, L updateRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Updates an item list after checking if the operation is allowed on the list.
  • Method Details

    • getItemListPage

      org.springframework.data.domain.Page<L> getItemListPage(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Gets a page of item lists.
      Parameters:
      customerRef - the reference to the customer of which to get item lists for
      pageable - the page information being requested
      filters - additional filters to apply in the query.
      context - the context of the request
      Returns:
      a page of item lists
    • getItemListById

      L getItemListById(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Gets a specific item list by its ID.
      Parameters:
      listId - the ID of the item list
      customerRef - the reference to the customer retrieving the list
      context - the context of the request
      Returns:
      the item list
    • createItemList

      L createItemList(L itemList, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Creates an item list and handles related security access grants.
      Parameters:
      itemList - The item list to create
      customerRef - the reference to the customer to create the item list for
      context - the context of the request
      Returns:
      the created item list
    • changeItemListName

      L changeItemListName(String listId, String replacementName, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Changes the name of the item list without having to include all of the items in the update request
      Parameters:
      listId - the ID of the item list whose name is being changed
      replacementName - the new name for the list
      customerRef - the reference to the customer to create the item list for
      context - the context of the request
      Returns:
      the item list with an updated name value
    • changeItemListAttributes

      L changeItemListAttributes(String listId, Map<String,Object> attributes, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Changes the attributes of the item list without having to include all of the items in the update request. Only attributes with keys specified in the request will be updated. To have an attribute removed, map the key to a null value: myKey -> null.
      Parameters:
      listId - the ID of the item list whose attributes are being added
      attributes - the new attributes for the list
      customerRef - the reference to the customer to create the item list for
      context - the context of the request
      Returns:
      the item list with an updated name value
    • replaceItemList

      L replaceItemList(String listId, L replaceRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Replaces an item list after checking if operation is allowed on the list.
      Parameters:
      listId - the ID of the item list to replace
      replaceRequest - the replacement data to apply to the item list
      customerRef - the reference to the customer modifying the list
      context - the context of the request
      Returns:
      the replaced version of the item list
    • updateItemList

      L updateItemList(String listId, L updateRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Updates an item list after checking if the operation is allowed on the list.
      Parameters:
      listId - the ID of the item list to replace
      updateRequest - the update data to apply to the item list
      customerRef - the reference to the customer modifying the list
      context - the context of the request
      Returns:
      the updated version of the item list
    • deleteItemList

      void deleteItemList(String listId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deletes an item list by ID.
      Parameters:
      listId - the ID of the item list to delete
      customerRef - the reference to the customer deleting the list
      context - the context of the request
    • deleteItemLists

      DeleteItemListResponse deleteItemLists(Set<String> listIds, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deletes multiple item lists by ID
      Parameters:
      listIds - the list IDs of the item lists to delete
      customerRef - the reference to the customer deleting the list
      context - the context of the request
      Returns:
      a response indicating which deletions were successful
    • shareItemList

      void shareItemList(ShareItemListRequest shareRequest, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Shares an item list with other users.
      Parameters:
      shareRequest - the request body describing who and how to share the list with
      customerRef - the reference to the customer who initiated the sharing request
      context - the context of the request