Interface ItemMergingService<C,I>

Type Parameters:
C - the type of the container that holds &lt;I&gt; items
I - the type of the items to merge
All Known Subinterfaces:
CartItemMergingService<I>, ItemListItemMergingService<I>
All Known Implementing Classes:
AbstractItemMergingService, DefaultCartItemMergingService, DefaultItemListItemMergingService

public interface ItemMergingService<C,I>
Service for handling merges of similar items within some container.
Author:
Jacob Mitash
  • Method Summary

    Modifier and Type
    Method
    Description
    mergeItems(C container, List<I> items, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Determines and prepares item merges between items being added/modified and the items of the container.
  • Method Details

    • mergeItems

      List<MergeItemPair<I>> mergeItems(C container, List<I> items, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Determines and prepares item merges between items being added/modified and the items of the container.
      Parameters:
      container - the container that holds the items that will be merged.
      items - the items that have been changed or are being added to consider for merging
      context - the context of the request
      Returns:
      a list of matched item pairs that describe what changes should take place in order for the merge to occur