Class DefaultConsolidatedProductPostProcessor

java.lang.Object
com.broadleafcommerce.catalog.service.product.consolidation.DefaultConsolidatedProductPostProcessor
All Implemented Interfaces:
ConsolidatedProductPostProcessor

public class DefaultConsolidatedProductPostProcessor extends Object implements ConsolidatedProductPostProcessor
Author:
Jeff Fischer
  • Constructor Details

    • DefaultConsolidatedProductPostProcessor

      public DefaultConsolidatedProductPostProcessor(List<ConsolidatedProduct> products, ProductService<Product> productService, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, Map<String,Set<String>> marketplaceApplicationsForCatalogs)
  • Method Details

    • process

      public void process(ConsolidatedProduct product, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      process in interface ConsolidatedProductPostProcessor
    • isSandboxOverride

      protected boolean isSandboxOverride(ConsolidatedProduct reference, ConsolidatedProduct candidate)
      Determine if the candidate product is a more close sandbox version than the reference.
      Parameters:
      reference - The production or sandbox version to use as a base reference
      candidate - The candidate sandbox version to compare against the reference for closeness
      Returns:
      Whether or not the candidate is a closer sandbox version
    • createSandboxOverrideValue

      protected String createSandboxOverrideValue(ConsolidatedProduct override)
      Create the sandbox override value to store as part of ConsolidatedProduct.getSandboxOverrides(). Usually a combination of sandbox id and sandbox owner.
      Parameters:
      override - The sandbox overriding product
      Returns:
      The representative string for the override
    • isInheriting

      protected boolean isInheriting(String reference, String candidate)
      Determine if the candidate catalog id represents a catalog that inherits from a catalog represented by the reference catalog id.
      Parameters:
      reference - The id of the reference catalog
      candidate - The id of the candidate catalog
      Returns:
      Whether or not the candidate inherits from the reference
    • isActiveSandboxMember

      protected static boolean isActiveSandboxMember(ConsolidatedProduct member)
    • isSameSandboxContext

      protected boolean isSameSandboxContext(ConsolidatedProduct reference, ConsolidatedProduct candidate)