Interface ItemChoiceConfigurationService

All Known Implementing Classes:
DefaultItemChoiceConfigurationService

public interface ItemChoiceConfigurationService
Author:
Chad Harchar (charchar)
  • Method Details

    • populateItemChoice

      void populateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)
      Populates item choices in CartItem.getDependentCartItems() and hydrates them with pricing information from ItemChoice and SpecificItemChoice.
      Parameters:
      cartItem - The CartItem on which to populate ItemChoices.
      option - The ProductOption (and its ProductOption.getItemChoice() for the item to populate and hydrate
      potentialDependentItems - The list of dependent cart items to pick from when populating ItemChoice.
    • validateItemChoice

      void validateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)
      Perform validation against the provided CartItem for the given ProductOption of type ProductOptionType.isItemChoice(String). This will also hydrate CartItem with pricing information from ItemChoice and SpecificItemChoice.
      Parameters:
      cartItem - The CartItem to perform item choice validation against.
      option - The ProductOption (and it's ProductOption.getItemChoice() we are using to validate the cart against.
      potentialDependentItems - The list of dependent cart items to pick from when validating ItemChoice.