Class VariantPriceableTargetUtils
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.product.support.VariantPriceableTargetUtils
- 
Constructor SummaryConstructorsConstructorDescriptionVariantPriceableTargetUtils(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected com.broadleafcommerce.pricing.client.domain.PriceableTargetcreateTargetForProductPricingKey(@NonNull VariantSummary variant, @NonNull CollectedProduct product, @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aVariantSummaryusing its owning product'sCollectedProduct'spricingKey asPriceableTarget.getTargetId().protected com.broadleafcommerce.pricing.client.domain.PriceableTargetcreateTargetForSku(@NonNull VariantSummary variant, @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aVariantSummaryusingVariantSummary.getSku()asPriceableTarget.getTargetId().Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget>createTargets(@NonNull VariantSummary variant, CollectedProduct product) CreatesPriceableTargetsfor aVariantSummary.protected CollectedProductJsonAccessorUtilsgetPriceableFields(@NonNull VariantSummary variant, CollectedProduct product) Builds the map of priceable fields for aVariantSummarythat will be added asPriceableTarget.getPriceableFields().protected com.broadleafcommerce.common.extension.TypeFactory
- 
Constructor Details- 
VariantPriceableTargetUtilspublic VariantPriceableTargetUtils(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils) 
 
- 
- 
Method Details- 
createTargetspublic Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget> createTargets(@NonNull @NonNull VariantSummary variant, @Nullable CollectedProduct product) CreatesPriceableTargetsfor aVariantSummary. By default, this will just produce a single target based on itsVariantSummary.getSku().- Parameters:
- variant-- VariantSummaryfor which to create- PriceableTargets.
- Returns:
- PriceableTargetsfor a- VariantSummary.
 
- 
getPriceableFieldsprotected Map<String,javax.money.MonetaryAmount> getPriceableFields(@NonNull @NonNull VariantSummary variant, @Nullable CollectedProduct product) Builds the map of priceable fields for aVariantSummarythat will be added asPriceableTarget.getPriceableFields(). The key is the type of the priceable field and the value is the amount.- Parameters:
- variant-- VariantSummaryfor which to determine the priceable fields.
- Returns:
- map of priceable fields for a VariantSummary
- See Also:
 
- 
createTargetForSkuprotected com.broadleafcommerce.pricing.client.domain.PriceableTarget createTargetForSku(@NonNull @NonNull VariantSummary variant, @NonNull @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aVariantSummaryusingVariantSummary.getSku()asPriceableTarget.getTargetId().- Parameters:
- variant-- VariantSummaryfor which to create- PriceableTargets.
- priceableFields- Map of the priceable fields for the variant to add as- PriceableTarget.getPriceableFields().
- Returns:
- the PriceableTargetfor aVariantSummaryusingVariantSummary.getSku()asPriceableTarget.getTargetId().
 
- 
createTargetForProductPricingKeyprotected com.broadleafcommerce.pricing.client.domain.PriceableTarget createTargetForProductPricingKey(@NonNull @NonNull VariantSummary variant, @NonNull @NonNull CollectedProduct product, @NonNull @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aVariantSummaryusing its owning product'sCollectedProduct'spricingKey asPriceableTarget.getTargetId().- Parameters:
- variant-- VariantSummaryfor which to create- PriceableTargets.
- product-- CollectedProductfor which to get the pricingKey from.
- priceableFields- Map of the priceable fields for the product to add as- PriceableTarget.getPriceableFields().
- Returns:
- the PriceableTargetfor aVariantSummaryusing its owning product'sCollectedProduct'spricingKey asPriceableTarget.getTargetId().
 
- 
getTypeFactoryprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
- 
getCollectedProductJsonAccessorUtils
 
-