Class ItemChoiceAvailabilityConsolidationContributor
java.lang.Object
com.broadleafcommerce.catalog.service.product.consolidation.ItemChoiceAvailabilityConsolidationContributor
- All Implemented Interfaces:
ProductConsolidationContributor
@Deprecated(since="Catalog Service 2.1.5, Release Train 2.1.5",
forRemoval=true)
public class ItemChoiceAvailabilityConsolidationContributor
extends Object
implements ProductConsolidationContributor
Deprecated, for removal: This API element is subject to removal in a future version.
Performs logic to handle if a product with required item choices has all item choices available
for purchase. This handles item bundles to determine if the product has enough available items in
order to.
-
Constructor Summary
ConstructorsConstructorDescriptionItemChoiceAvailabilityConsolidationContributor(ProductService<Product> productService, CategoryProductService<CategoryProduct> categoryProductService, CategoryService<Category> categoryService, com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser rsqlFilterParser) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckBundleProductsAvailable(List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version.protected booleancheckForProductsInRuleBasedCategory(String categoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing.voidconsolidateProducts(Set<String> productIds, List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version.Consolidate products with their related domain and translations.protected voiddetermineItemsInBundleAvailable(ConsolidatedProduct consolidatedProduct, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version.protected voiddetermineRequiredItemChoicesAvailable(List<ConsolidatedProduct> productsWithRequiredItemChoices, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version.protected CategoryProductService<CategoryProduct>Deprecated.Unused.protected CategoryService<Category>Deprecated.Unused.protected ProductService<Product>Deprecated, for removal: This API element is subject to removal in a future version.protected List<ConsolidatedProduct>getProductsWithRequiredItems(List<ConsolidatedProduct> products) Deprecated, for removal: This API element is subject to removal in a future version.protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParserDeprecated, for removal: This API element is subject to removal in a future version.protected voidhydrateBundleProducts(List<ConsolidatedProduct> bundleProducts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.protected voidhydrateCategoryProducts(org.springframework.data.domain.Page<CategoryProduct> categoryProducts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing.protected booleanisItemAvailableInCategory(ProductOption productOption, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing.protected booleanisSpecificProductAvailable(ProductOption productOption) Deprecated, for removal: This API element is subject to removal in a future version.If 1 product is available in a bundle, even if that bundle has a minimum quantity of greater than 1, we assume it is available.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.catalog.service.product.consolidation.ProductConsolidationContributor
shouldConsolidate
-
Constructor Details
-
ItemChoiceAvailabilityConsolidationContributor
public ItemChoiceAvailabilityConsolidationContributor(ProductService<Product> productService, CategoryProductService<CategoryProduct> categoryProductService, CategoryService<Category> categoryService, com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser rsqlFilterParser) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
consolidateProducts
public void consolidateProducts(Set<String> productIds, List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ProductConsolidationContributorConsolidate products with their related domain and translations. This includes both hydratingProductfields and combining external references likeCategoryProduct. Any catalog or sandbox overrides made to external references for non-overridden products will generate new placeholder products to store those overrides.- Specified by:
consolidateProductsin interfaceProductConsolidationContributor- Parameters:
productIds- the IDs of the products to consolidateproducts- the product in all explicit context statesinheritanceLines- the catalog inheritance lines top-down from all of the productscontext- context information surrounding sandboxing/multitenant state
-
checkBundleProductsAvailable
protected void checkBundleProductsAvailable(List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version. -
hydrateBundleProducts
protected void hydrateBundleProducts(List<ConsolidatedProduct> bundleProducts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version. -
determineItemsInBundleAvailable
protected void determineItemsInBundleAvailable(ConsolidatedProduct consolidatedProduct, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version. -
getProductsWithRequiredItems
protected List<ConsolidatedProduct> getProductsWithRequiredItems(List<ConsolidatedProduct> products) Deprecated, for removal: This API element is subject to removal in a future version. -
determineRequiredItemChoicesAvailable
protected void determineRequiredItemChoicesAvailable(List<ConsolidatedProduct> productsWithRequiredItemChoices, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Deprecated, for removal: This API element is subject to removal in a future version. -
isItemAvailableInCategory
@Deprecated protected boolean isItemAvailableInCategory(ProductOption productOption, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing. As of 1.5.0-GA. -
hydrateCategoryProducts
@Deprecated protected void hydrateCategoryProducts(org.springframework.data.domain.Page<CategoryProduct> categoryProducts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing. As of 1.5.0-GA. -
checkForProductsInRuleBasedCategory
@Deprecated protected boolean checkForProductsInRuleBasedCategory(String categoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.This is assumed to be true for the purposes of indexing. As of 1.5.0-GA. -
isSpecificProductAvailable
Deprecated, for removal: This API element is subject to removal in a future version.If 1 product is available in a bundle, even if that bundle has a minimum quantity of greater than 1, we assume it is available. That's because, even if there's a minimum quantity of 2 and only 1 product is available, we can say that the customer could purchase 2 of the 1 available product.- Parameters:
productOption-- Returns:
- true if at least one specific item choice is available, else false.
-
getProductService
Deprecated, for removal: This API element is subject to removal in a future version. -
getCategoryProductService
Deprecated.Unused. -
getCategoryService
Deprecated.Unused. -
getRsqlFilterParser
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser getRsqlFilterParser()Deprecated, for removal: This API element is subject to removal in a future version.
-
RequiredOptionInfoProductConsolidationContributorinstead.