Interface ProductConsolidationService

All Known Implementing Classes:
DefaultProductConsolidationService

public interface ProductConsolidationService
  • Method Details

    • readAllConsolidatedProducts

      List<ConsolidatedProduct> readAllConsolidatedProducts(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read and consolidate products with their related domain.
      Parameters:
      filters - the RSQL Node used to restrict results, must not be null
      context - context information around sandboxing and multitenant state
      Returns:
      list of products consolidated with relations
    • cleanConsolidatedProductFields

      default void cleanConsolidatedProductFields(List<ConsolidatedProduct> toClean)
      ConsolidatedProduct consists of many fields, each potentially containing a lot of data. This data is not necessarily always relevant, and can lead to large, bloated API responses. This method is intended to be called as a last-step before returning to the API caller. It takes a fully formed list of ConsolidatedProduct and nullifies or trims any fields that are known to be irrelevant to the caller. This will result in those fields either being omitted in the final JSON output, or greatly reduced in size.
      Parameters:
      toClean - the instances to clean the fields of
      Since:
      Catalog Service 2.3.0, Release Train 2.3.0