Class AvailabilityStrategyQueryContributor

java.lang.Object
com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
com.broadleafcommerce.search.catalog.solr.query.AvailabilityStrategyQueryContributor
All Implemented Interfaces:
com.broadleafcommerce.search.provider.solr.SolrQueryContributor, org.springframework.core.Ordered

public class AvailabilityStrategyQueryContributor extends com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
Class responsible for handling any special query/filter behavior based on availability strategies.
See Also:
  • AvailabilityStrategy
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAvailableOnlineFilter(org.apache.solr.client.solrj.SolrQuery solrQuery)
     
    protected void
    attachCatalogOnlyStrategyFilters(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    protected void
    attachNoneStrategyFilters(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    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
     
    protected String
    The availability strategy in effect.
    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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

    getOrder, isTypeAheadRequest
  • Constructor Details

    • AvailabilityStrategyQueryContributor

      public AvailabilityStrategyQueryContributor(@Nullable String availabilityStrategy)
  • Method Details

    • 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, @Nullable String locale, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      contributeInternal in class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
    • attachCatalogOnlyStrategyFilters

      protected void attachCatalogOnlyStrategyFilters(org.apache.solr.client.solrj.SolrQuery solrQuery, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • attachNoneStrategyFilters

      protected void attachNoneStrategyFilters(org.apache.solr.client.solrj.SolrQuery solrQuery, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • addAvailableOnlineFilter

      protected void addAvailableOnlineFilter(org.apache.solr.client.solrj.SolrQuery solrQuery)
    • 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, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      shouldContribute in class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
    • contributeOnTypeAhead

      public boolean contributeOnTypeAhead()
    • getAvailabilityStrategy

      protected String getAvailabilityStrategy()
      The availability strategy in effect.