Class DefaultPriceDataPreloadProcessor
java.lang.Object
com.broadleafcommerce.dataexchange.service.catalog.product.AbstractPriceDataPreloadProcessor
com.broadleafcommerce.dataexchange.service.catalog.product.DefaultPriceDataPreloadProcessor
- All Implemented Interfaces:
 BatchExtensionProcessor,NodeBuilder,org.springframework.core.Ordered
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class - 
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE - 
Constructor Summary
ConstructorsConstructorDescriptionDefaultPriceDataPreloadProcessor(PriceProvider<PriceData, PriceList> pricingProvider, DataExchangePriceListProperties properties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPriceDataTargetIds(ExchangeObject obj, Set<String> pricingKeys, Map<String, PriceList> priceListMap, BatchContext<ComprehensiveProduct> batch) protected cz.jirutka.rsql.parser.ast.NodebuildCurrencyFilters(cz.jirutka.rsql.parser.ast.Node node, DefaultPriceDataPreloadProcessor.PriceListFilters filters) protected cz.jirutka.rsql.parser.ast.NodebuildCurrencyInNode(Set<String> currencies) protected cz.jirutka.rsql.parser.ast.NodebuildPriceDataReadFilter(Map<String, PriceList> priceListMap, List<ComprehensiveProduct> products, BatchContext<ComprehensiveProduct> batch) Builds the criteria for bulk reading price data.protected cz.jirutka.rsql.parser.ast.NodebuildPriceListReadFilter(List<ComprehensiveProduct> products, BatchContext<ComprehensiveProduct> batch) Builds the criteria for reading price lists.protected StringgetPriceDataPriceListKey(Prices prices, PriceData priceData) Return a function that maps a price list to a key for a map.protected voidhandleCurrencyIdentifier(ComprehensiveProduct product, Prices prices, DefaultPriceDataPreloadProcessor.PriceListFilters priceListFilters, BatchContext<ComprehensiveProduct> batch) protected booleanisCurrencyIdentifier(Prices prices) protected booleanisIdIdentifier(Prices prices) protected booleanisSaleType(Prices prices) protected booleanisStandardType(Prices prices) protected voidpopulatePriceListIdForPriceData(ComprehensiveProduct product, Prices prices, PriceData priceData, Map<String, PriceList> priceListMap, BatchContext<ComprehensiveProduct> batch) Populates the price list id for the given price data.Methods inherited from class com.broadleafcommerce.dataexchange.service.catalog.product.AbstractPriceDataPreloadProcessor
buildPriceListMap, canHandle, getPricingProvider, getProperties, getTypeFactory, populatePriceListIds, preProcess, readExistingPriceData, readPriceListsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.dataexchange.service.BatchExtensionProcessor
getOrder, postProcessMethods inherited from interface com.broadleafcommerce.dataexchange.service.NodeBuilder
buildAndNode, buildAndNode, buildEqualsNode, buildInNode, buildInNode, buildOrNode, buildOrNode, emptyNode, escapeSpecialCharacters, filterEmptyNodes, filterEmptyNodes, isEmptyNodeOrNull 
- 
Constructor Details
- 
DefaultPriceDataPreloadProcessor
public DefaultPriceDataPreloadProcessor(PriceProvider<PriceData, PriceList> pricingProvider, DataExchangePriceListProperties properties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)  
 - 
 - 
Method Details
- 
populatePriceListIdForPriceData
protected void populatePriceListIdForPriceData(ComprehensiveProduct product, Prices prices, PriceData priceData, Map<String, PriceList> priceListMap, BatchContext<ComprehensiveProduct> batch) Description copied from class:AbstractPriceDataPreloadProcessorPopulates the price list id for the given price data. The implementation should populatePriceData.setPriceListId(String)with the appropriate ID from the supplied price list map. If the price list is not found, the implementation should register an error with the batch context for the supplied product.- Specified by:
 populatePriceListIdForPriceDatain classAbstractPriceDataPreloadProcessor- Parameters:
 product- The productpriceData- The price datapriceListMap- The price list map. Key depends on the implementation.batch- The batch context
 - 
getPriceListMapKeyFunction
Description copied from class:AbstractPriceDataPreloadProcessorReturn a function that maps a price list to a key for a map. This will be used whenpopulating the price list IDfor a given price data.- Specified by:
 getPriceListMapKeyFunctionin classAbstractPriceDataPreloadProcessor- Returns:
 - a function that maps a price list to a key for a map
 
 - 
getPriceDataPriceListKey
 - 
buildPriceDataReadFilter
protected cz.jirutka.rsql.parser.ast.Node buildPriceDataReadFilter(Map<String, PriceList> priceListMap, List<ComprehensiveProduct> products, BatchContext<ComprehensiveProduct> batch) Description copied from class:AbstractPriceDataPreloadProcessorBuilds the criteria for bulk reading price data. SeePriceProvider.bulkReadPriceData(Node, BatchContext)- Specified by:
 buildPriceDataReadFilterin classAbstractPriceDataPreloadProcessorbatch- the batch context- Returns:
 - the criteria for bulk reading price data
 
 - 
addPriceDataTargetIds
protected void addPriceDataTargetIds(ExchangeObject obj, Set<String> pricingKeys, Map<String, PriceList> priceListMap, BatchContext<ComprehensiveProduct> batch)  - 
buildPriceListReadFilter
protected cz.jirutka.rsql.parser.ast.Node buildPriceListReadFilter(List<ComprehensiveProduct> products, BatchContext<ComprehensiveProduct> batch) Description copied from class:AbstractPriceDataPreloadProcessorBuilds the criteria for reading price lists. SeePriceProvider.readPriceLists(Node, BatchContext)- Specified by:
 buildPriceListReadFilterin classAbstractPriceDataPreloadProcessor- Parameters:
 products- the products to build the filter forbatch- the batch context- Returns:
 - the criteria for reading price lists
 
 - 
buildCurrencyFilters
protected cz.jirutka.rsql.parser.ast.Node buildCurrencyFilters(cz.jirutka.rsql.parser.ast.Node node, DefaultPriceDataPreloadProcessor.PriceListFilters filters)  - 
buildCurrencyInNode
 - 
handleCurrencyIdentifier
protected void handleCurrencyIdentifier(ComprehensiveProduct product, Prices prices, DefaultPriceDataPreloadProcessor.PriceListFilters priceListFilters, BatchContext<ComprehensiveProduct> batch)  - 
isIdIdentifier
 - 
isCurrencyIdentifier
 - 
isStandardType
 - 
isSaleType
 
 -