Class CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor

  • All Implemented Interfaces:
    com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>

    public class CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor
    extends Object
    implements com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
    Supports logic during search requests that determine if a product is returned in search results.
    See Also:
    Product.isAvailableOnline()
    • Constructor Detail

      • CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor

        public CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor()
    • Method Detail

      • contributeInternal

        public void contributeInternal​(com.broadleafcommerce.search.api.domain.Indexable<?> indexable,
                                       org.apache.solr.common.SolrInputDocument document,
                                       com.jayway.jsonpath.DocumentContext context,
                                       List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields)
                                throws com.broadleafcommerce.search.api.SearchIndexException
        Specified by:
        contributeInternal in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
        Throws:
        com.broadleafcommerce.search.api.SearchIndexException
      • isAnyVariantAvailable

        protected boolean isAnyVariantAvailable​(com.broadleafcommerce.search.catalog.core.domain.Product product,
                                                com.jayway.jsonpath.DocumentContext context)
      • canHandle

        public boolean canHandle​(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
        Specified by:
        canHandle in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>