Class VariantProductSource

  • All Implemented Interfaces:
    ProductSource

    public class VariantProductSource
    extends java.lang.Object
    implements ProductSource
    Find the products for a variant product and all its variants' categories.
    • Constructor Detail

      • VariantProductSource

        public VariantProductSource()
    • Method Detail

      • getProductsForConfigAndProperty

        public java.util.Collection<ProductModel> getProductsForConfigAndProperty​(IndexConfig indexConfig,
                                                                                  IndexedProperty indexedProperty,
                                                                                  java.lang.Object model)
        Description copied from interface: ProductSource
        Returns a collection of ProductModel of a given indexedProperty that are fetched from the model based on the indexConfig.
        Specified by:
        getProductsForConfigAndProperty in interface ProductSource
        Parameters:
        indexConfig - index config
        indexedProperty - indexed property
        model - model
        Returns:
        Collection of products
      • getProducts

        public java.util.Set<ProductModel> getProducts​(java.lang.Object model)
        Get all the variant products of a base product
        Specified by:
        getProducts in interface ProductSource
        Parameters:
        model - productModel
        Returns:
        Collection of products
      • getBaseProducts

        protected java.util.Set<ProductModel> getBaseProducts​(java.lang.Object model)