Class ProductPriceableTargetUtils
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.product.support.ProductPriceableTargetUtils
- 
Constructor SummaryConstructorsConstructorDescriptionProductPriceableTargetUtils(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected com.broadleafcommerce.pricing.client.domain.PriceableTargetcreateTargetForPricingKey(@NonNull CollectedProduct product, @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aCollectedProductusing CollectedProduct's pricingKey asPriceableTarget.getTargetId().protected com.broadleafcommerce.pricing.client.domain.PriceableTargetcreateTargetForSku(@NonNull CollectedProduct product, @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget>createTargets(@NonNull CollectedProduct product) CreatesPriceableTargetsfor aCollectedProduct.protected CollectedProductJsonAccessorUtilsgetPriceableFields(@NonNull CollectedProduct product) Builds the map of priceable fields for aCollectedProductthat will be added asPriceableTarget.getPriceableFields().protected com.broadleafcommerce.common.extension.TypeFactory
- 
Constructor Details- 
ProductPriceableTargetUtilspublic ProductPriceableTargetUtils(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CollectedProductJsonAccessorUtils collectedProductJsonAccessorUtils) 
 
- 
- 
Method Details- 
createTargetspublic Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget> createTargets(@NonNull @NonNull CollectedProduct product) CreatesPriceableTargetsfor aCollectedProduct. This usually entails a target based on itsCollectedProduct.getId()and one on its SKU.- Parameters:
- product-- CollectedProductfor which to create- PriceableTargets.
- Returns:
- PriceableTargetsfor a- CollectedProduct.
 
- 
getPriceableFieldsprotected Map<String,javax.money.MonetaryAmount> getPriceableFields(@NonNull @NonNull CollectedProduct product) Builds the map of priceable fields for aCollectedProductthat will be added asPriceableTarget.getPriceableFields(). The key is the type of the priceable field and the value is the amount.- Parameters:
- product-- CollectedProductfor which to determine the priceable fields.
- Returns:
- map of priceable fields for a CollectedProduct
- See Also:
 
- 
createTargetForSkuprotected com.broadleafcommerce.pricing.client.domain.PriceableTarget createTargetForSku(@NonNull @NonNull CollectedProduct product, @NonNull @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) - Parameters:
- product-- CollectedProductfor which to create- PriceableTargets.
- priceableFields- Map of the priceable fields for the product to add as- PriceableTarget.getPriceableFields().
- Returns:
- the PriceableTargetfor aCollectedProductusing SKU asPriceableTarget.getTargetId().
 
- 
createTargetForPricingKeyprotected com.broadleafcommerce.pricing.client.domain.PriceableTarget createTargetForPricingKey(@NonNull @NonNull CollectedProduct product, @NonNull @NonNull Map<String, javax.money.MonetaryAmount> priceableFields) Creates thePriceableTargetfor aCollectedProductusing CollectedProduct's pricingKey asPriceableTarget.getTargetId().- Parameters:
- product-- CollectedProductfor which to create- PriceableTargets.
- priceableFields- Map of the priceable fields for the product to add as- PriceableTarget.getPriceableFields().
- Returns:
- the PriceableTargetfor aCollectedProductusing CollectedProduct's pricingKey asPriceableTarget.getTargetId().
 
- 
getTypeFactoryprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
- 
getCollectedProductJsonAccessorUtils
 
-