Class VariantsProductPriceableTargetsBuilder
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.product.support.VariantsProductPriceableTargetsBuilder
- All Implemented Interfaces:
ProductPriceableTargetsBuilder
public class VariantsProductPriceableTargetsBuilder
extends Object
implements ProductPriceableTargetsBuilder
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVariantsProductPriceableTargetsBuilder
(VariantPriceableTargetUtils utils, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils) -
Method Summary
Modifier and TypeMethodDescriptionbuildTargetsForProducts
(@NonNull Collection<? extends CollectedProduct> products) BuildsPriceableTargets
for multipleProducts
or one of the relationships such as their Variants.This returns a map where the key is the entity to which the PriceableTarget corresponds, which helps when mappingPriceInfos
back onto the entity represented by thePriceableTarget
.protected CollectedProductJsonAccessorUtils
protected VariantPriceableTargetUtils
getUtils()
-
Field Details
-
VARIANT_PRICING_TARGET_TYPE
- See Also:
-
-
Constructor Details
-
VariantsProductPriceableTargetsBuilder
public VariantsProductPriceableTargetsBuilder(VariantPriceableTargetUtils utils, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils)
-
-
Method Details
-
buildTargetsForProducts
public Map<Object,Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget>> buildTargetsForProducts(@NonNull @NonNull Collection<? extends CollectedProduct> products) Description copied from interface:ProductPriceableTargetsBuilder
BuildsPriceableTargets
for multipleProducts
or one of the relationships such as their Variants.This returns a map where the key is the entity to which the PriceableTarget corresponds, which helps when mappingPriceInfos
back onto the entity represented by thePriceableTarget
.Note that in some cases, multiple targets can be created for the same entity if there are multiple ways of identifying some of them.
- Specified by:
buildTargetsForProducts
in interfaceProductPriceableTargetsBuilder
- Parameters:
products
- MultipleProducts
all for which to buildPriceableTargets
- Returns:
- A map of all the
PriceableTargets
the givenProducts
or one of their relationships.
-
getUtils
-
getCollectedProductJsonAccessorUtils
-