Interface ProductConsolidationContributor
- All Known Implementing Classes:
AllAssetsProductConsolidationContributor
,CategoryProductConsolidationContributor
,ContextualProductConsolidationContributor
,DataDrivenEnumConsolidationContributor
,ItemChoiceAvailabilityConsolidationContributor
,OptionTemplateProductConsolidationContributor
,PrimaryAssetProductConsolidationContributor
,ProductTagConsolidationContributor
,TranslationProductConsolidationContributor
,VariantProductConsolidationContributor
public interface ProductConsolidationContributor
Populates extra data into the
ConsolidatedProduct
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
consolidateProducts
(Set<String> productIds, List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Consolidate products with their related domain and translations.default boolean
shouldConsolidate
(Set<String> productIds, List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Determines whether this contributor should be executed based on the given parameters and context.
-
Method Details
-
shouldConsolidate
default boolean shouldConsolidate(Set<String> productIds, List<ConsolidatedProduct> products, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Determines whether this contributor should be executed based on the given parameters and context.Returns true by default.
- 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- Since:
- 2.1.1, 2.0.2
-
consolidateProducts
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) Consolidate products with their related domain and translations. This includes both hydratingProduct
fields 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.- 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
-