Interface ItemListItemProvider<I extends com.broadleafcommerce.cart.client.domain.ItemListItem>

  • All Known Implementing Classes:
    ExternalItemListItemProvider

    public interface ItemListItemProvider<I extends com.broadleafcommerce.cart.client.domain.ItemListItem>
    A provider of item list items.
    Author:
    Jacob Mitash
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<I> createItems​(String listId, Collection<I> items, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Creates items within a specific list.
      void deleteItems​(String listId, Collection<String> itemIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deletes items within a specific list
      org.springframework.data.domain.Page<I> getItemPage​(String listId, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Gets a page of items belonging to a specific item list.
      List<I> getItems​(String listId, Collection<String> itemIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Gets specific items of a list by their IDs.
      List<I> replaceItems​(String listId, Collection<I> items, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Replaces items within a specific list.
      List<I> updateItems​(String listId, Collection<I> items, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Updates items within a specific list.
    • Method Detail

      • getItemPage

        org.springframework.data.domain.Page<I> getItemPage​(String listId,
                                                            @Nullable
                                                            org.springframework.data.domain.Pageable pageable,
                                                            @Nullable
                                                            com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Gets a page of items belonging to a specific item list.
        Parameters:
        listId - the ID of the item list to get items from
        pageable - the details of the page of items to include
        context - the context of the request
        Returns:
        a page of items
      • getItems

        List<I> getItems​(String listId,
                         Collection<String> itemIds,
                         @Nullable
                         com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Gets specific items of a list by their IDs.
        Parameters:
        listId - the ID of the item list to get items from
        itemIds - the IDs of the items to get
        context - the context of the request
        Returns:
        a list of items
      • createItems

        List<I> createItems​(String listId,
                            Collection<I> items,
                            @Nullable
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Creates items within a specific list.
        Parameters:
        listId - the ID of the item list to create items in
        items - the items to create
        context - the context of the request
        Returns:
        a list of the created items
      • replaceItems

        List<I> replaceItems​(String listId,
                             Collection<I> items,
                             @Nullable
                             com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Replaces items within a specific list.
        Parameters:
        listId - the ID of the item list to replace items in
        items - the items to replace and their corresponding data (item ID included)
        context - the context of the request
        Returns:
        a list of the replaced items
      • updateItems

        List<I> updateItems​(String listId,
                            Collection<I> items,
                            @Nullable
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Updates items within a specific list.
        Parameters:
        listId - the ID of the item list to update items in
        items - the items to update and their corresponding data (item ID included)
        context - the context of the request
        Returns:
        a list of the updated items
      • deleteItems

        void deleteItems​(String listId,
                         Collection<String> itemIds,
                         @Nullable
                         com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deletes items within a specific list
        Parameters:
        listId - the ID of the item list to delete items from
        itemIds - the IDs of the items to delete
        context - the context of the request