Class InventoryAvailabilityQueryContributor

  • All Implemented Interfaces:
    com.broadleafcommerce.search.provider.solr.IndexableTypeSolrQueryContributor, com.broadleafcommerce.search.provider.solr.SolrQueryContributor, org.springframework.core.Ordered

    public class InventoryAvailabilityQueryContributor
    extends com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
    implements com.broadleafcommerce.search.provider.solr.IndexableTypeSolrQueryContributor
    This component attempts to filter out Product search results that require inventory checks, but which do not have inventory available.
    Author:
    Kelly Tisdell (ktisdell)
    See Also:
    ProductInventoryAvailableSolrDocumentContributor
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void contributeInternal​(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)  
      boolean contributeOnTypeAhead()  
      com.broadleafcommerce.search.api.type.IndexableType getIndexableType()  
      protected boolean shouldContribute​(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)  
      • Methods inherited from class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor

        contribute
      • Methods inherited from interface com.broadleafcommerce.search.provider.solr.SolrQueryContributor

        contribute, getOrder, isTypeAheadRequest
    • Constructor Detail

      • InventoryAvailabilityQueryContributor

        public InventoryAvailabilityQueryContributor()
    • Method Detail

      • getIndexableType

        public com.broadleafcommerce.search.api.type.IndexableType getIndexableType()
        Specified by:
        getIndexableType in interface com.broadleafcommerce.search.provider.solr.IndexableTypeSolrQueryContributor
      • contributeInternal

        protected void contributeInternal​(org.apache.solr.client.solrj.SolrQuery solrQuery,
                                          com.broadleafcommerce.search.api.domain.SearchRequest searchRequest,
                                          List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions,
                                          org.springframework.data.domain.Pageable page,
                                          com.broadleafcommerce.search.core.service.SearchRequestProperties properties,
                                          String locale,
                                          com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Specified by:
        contributeInternal in class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
      • shouldContribute

        protected boolean shouldContribute​(org.apache.solr.client.solrj.SolrQuery solrQuery,
                                           com.broadleafcommerce.search.api.domain.SearchRequest searchRequest,
                                           org.springframework.data.domain.Pageable page,
                                           com.broadleafcommerce.search.core.service.SearchRequestProperties properties,
                                           com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Specified by:
        shouldContribute in class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
      • contributeOnTypeAhead

        public boolean contributeOnTypeAhead()
        Specified by:
        contributeOnTypeAhead in interface com.broadleafcommerce.search.provider.solr.SolrQueryContributor