Interface ItemChoiceConfigurationService
-
- All Known Implementing Classes:
DefaultItemChoiceConfigurationService
public interface ItemChoiceConfigurationService- Author:
- Chad Harchar (charchar)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidpopulateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)Populates item choices inCartItem.getDependentCartItems()and hydrates them with pricing information fromItemChoiceandSpecificItemChoice.voidvalidateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)Perform validation against the providedCartItemfor the givenProductOptionof typeProductOptionType.isItemChoice(String).
-
-
-
Method Detail
-
populateItemChoice
void populateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)Populates item choices inCartItem.getDependentCartItems()and hydrates them with pricing information fromItemChoiceandSpecificItemChoice.- Parameters:
cartItem- TheCartItemon which to populateItemChoices.option- TheProductOption(and itsProductOption.getItemChoice()for the item to populate and hydratepotentialDependentItems- The list ofdependent cart itemsto pick from when populatingItemChoice.
-
validateItemChoice
void validateItemChoice(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems)Perform validation against the providedCartItemfor the givenProductOptionof typeProductOptionType.isItemChoice(String). This will also hydrateCartItemwith pricing information fromItemChoiceandSpecificItemChoice.- Parameters:
cartItem- TheCartItemto performitem choicevalidation against.option- TheProductOption(and it'sProductOption.getItemChoice()we are using to validate the cart against.potentialDependentItems- The list ofdependent cart itemsto pick from when validatingItemChoice.
-
-