Interface ProductDetailsContributor

All Superinterfaces:
org.springframework.core.Ordered
All Known Implementing Classes:
AdvancedTagsProductDetailsContributor, BreadcrumbsProductDetailsContributor, CategoriesProductDetailsContributor, DataDrivenEnumsProductDetailsContributor, IncludedProductsProductDetailsContributor, MinifyProductDetailsContributor, PriceInfoProductDetailsContributor, ProductAssetsProductDetailsContributor, ProductOptionsProductDetailsContributor, PromotionalProductsProductDetailsContributor, VariantsProductDetailsContributor, VendorRefProductDetailsContributor

public interface ProductDetailsContributor extends org.springframework.core.Ordered
Responsible for contributing a specific subset of information to a ProductDetails based on a ProductDetailsContext such as contributing the assets or contributing the pricing info. It is desirable for implementations of this class to be as narrow as possible in the breadth of their contributions to improve extensibility, reusability, testability, and readability.
Author:
Nathan Moore (nathandmoore)
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    contribute(Collection<D> productDetailsList, Collection<C> productDetailsContexts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Contributes to the supplied ProductDetails.

    Methods inherited from interface org.springframework.core.Ordered

    getOrder
  • Method Details

    • contribute

      <D extends ProductDetails, C extends ProductDetailsContext> Collection<D> contribute(Collection<D> productDetailsList, Collection<C> productDetailsContexts, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Contributes to the supplied ProductDetails. This should not mutate the inputted details, but return a new one with the new contributions.
      Parameters:
      productDetailsList - The details to which to contribute
      productDetailsContexts - The context containing information that may be important for contributors such as active price lists.
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      An version of the supplied ProductDetails with the new contributions.