Interface ItemChoiceConfigurationService
- All Known Implementing Classes:
DefaultItemChoiceConfigurationService
public interface ItemChoiceConfigurationService
- Author:
- Chad Harchar (charchar)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 fromItemChoice
andSpecificItemChoice
.void
validateItemChoice
(com.broadleafcommerce.cart.client.domain.CartItem cartItem, ProductOption option, List<com.broadleafcommerce.cart.client.domain.CartItem> potentialDependentItems) Perform validation against the providedCartItem
for the givenProductOption
of typeProductOptionType.isItemChoice(String)
.
-
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 inCartItem.getDependentCartItems()
and hydrates them with pricing information fromItemChoice
andSpecificItemChoice
.- Parameters:
cartItem
- TheCartItem
on which to populateItemChoices
.option
- TheProductOption
(and itsProductOption.getItemChoice()
for the item to populate and hydratepotentialDependentItems
- The list ofdependent cart items
to 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 providedCartItem
for the givenProductOption
of typeProductOptionType.isItemChoice(String)
. This will also hydrateCartItem
with pricing information fromItemChoice
andSpecificItemChoice
.- Parameters:
cartItem
- TheCartItem
to performitem choice
validation against.option
- TheProductOption
(and it'sProductOption.getItemChoice()
we are using to validate the cart against.potentialDependentItems
- The list ofdependent cart items
to pick from when validatingItemChoice
.
-