Interface CharacteristicHydrationService

All Known Implementing Classes:
DefaultCharacteristicHydrationService

public interface CharacteristicHydrationService
Service interface for applying characteristic value narrowing to products.
Since:
Catalog Services 2.3.0, Release Train 2.3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    <P extends ProductCharacteristic>
    void
    applyCharacteristicValueNarrowing(Product product, List<P> allProdCharsFromInheritanceLine, P productCharacteristic, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Applies characteristic value narrowing for the given product characteristic on the given product.
  • Method Details

    • applyCharacteristicValueNarrowing

      <P extends ProductCharacteristic> void applyCharacteristicValueNarrowing(Product product, List<P> allProdCharsFromInheritanceLine, P productCharacteristic, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)

      Applies characteristic value narrowing for the given product characteristic on the given product.

      This method narrows characteristic values based on their active status and the catalog level from context information. Narrowing occurs to guarantee that only values active in all higher catalog levels (if there are any) are included.

      Parameters:
      product - the product containing the characteristic that needs narrowing
      allProdCharsFromInheritanceLine - a list of all product characteristics for the given product context id. This input is expected to contain results from the entire catalog ancestry rather than only the 'most-derived' results. Thus, this should contain multiple catalog representations (e.g., parent vs. child catalog) of each logical characteristic. At the same time, for each catalog representation, this should only contain the 'most derived' sandbox result - this method does not account for multiple sandbox representations.
      productCharacteristic - the product characteristic that needs narrowing. This is the 'most derived' instance of the product characteristic loaded for the current context info. Its value will be directly mutated by this method.
      contextInfo - the context information containing the catalog level
      Since:
      Catalog Services 2.3.0, Release Train 2.3.0