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 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: ProductConsolidationContributor
      Consolidate products with their related domain and translations. This includes both hydrating Product fields and combining external references like CategoryProduct. Any catalog or sandbox overrides made to external references for non-overridden products will generate new placeholder products to store those overrides.
      Specified by:
      consolidateProducts in interface ProductConsolidationContributor
      Parameters:
      productIds - the IDs of the products to consolidate
      products - the product in all explicit context states
      inheritanceLines - the catalog inheritance lines top-down from all of the products
      context - 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

      protected boolean isSpecificProductAvailable(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. 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

      protected ProductService<Product> getProductService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCategoryProductService

      @Deprecated protected CategoryProductService<CategoryProduct> getCategoryProductService()
      Deprecated.
      Unused.
    • getCategoryService

      @Deprecated protected CategoryService<Category> 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.