org.broadleafcommerce.core.search.service.solr
Class AbstractSolrSearchServiceExtensionHandler

java.lang.Object
  extended by org.broadleafcommerce.core.extension.AbstractExtensionHandler
      extended by org.broadleafcommerce.core.search.service.solr.AbstractSolrSearchServiceExtensionHandler
All Implemented Interfaces:
ExtensionHandler, SolrSearchServiceExtensionHandler
Direct Known Subclasses:
I18nSolrSearchServiceExtensionHandler

public abstract class AbstractSolrSearchServiceExtensionHandler
extends AbstractExtensionHandler
implements SolrSearchServiceExtensionHandler

Implementors of the SolrSearchServiceExtensionHandler interface should extend this class so that if additional extension points are added which they don't care about, their code will not need to be modified.

Author:
bpolster

Constructor Summary
AbstractSolrSearchServiceExtensionHandler()
           
 
Method Summary
 ExtensionResultStatusType addPropertyValues(Product product, Field field, FieldType fieldType, Map<String,Object> values, String propertyName, List<Locale> locales)
          Given the input field, populates the values array with the fields needed for the passed in field.
 ExtensionResultStatusType attachAdditionalBasicFields(Product product, org.apache.solr.common.SolrInputDocument document, SolrHelperService shs)
          Allows the extension additional fields to the document that are not configured via the DB.
 ExtensionResultStatusType buildPrefixListForSearchableFacet(Field field, List<String> prefixList)
          Returns a prefix if required for the passed in facet.
 ExtensionResultStatusType buildPrefixListForSearchableField(Field field, FieldType searchableFieldType, List<String> prefixList)
          Returns a prefix if required for the passed in searchable field.
 ExtensionResultStatusType filterSearchFacetRanges(SearchFacetDTO dto, List<SearchFacetRange> ranges)
          Builds the search facet ranges for the provided dto.
 ExtensionResultStatusType modifySolrQuery(org.apache.solr.client.solrj.SolrQuery query, String qualifiedSolrQuery, List<SearchFacetDTO> facets, ProductSearchCriteria searchCriteria, String defaultSort)
          Provides an extension point to modify the SolrQuery.
 
Methods inherited from class org.broadleafcommerce.core.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.core.extension.ExtensionHandler
getPriority, isEnabled
 

Constructor Detail

AbstractSolrSearchServiceExtensionHandler

public AbstractSolrSearchServiceExtensionHandler()
Method Detail

buildPrefixListForSearchableFacet

public ExtensionResultStatusType buildPrefixListForSearchableFacet(Field field,
                                                                   List<String> prefixList)
Description copied from interface: SolrSearchServiceExtensionHandler
Returns a prefix if required for the passed in facet.

Specified by:
buildPrefixListForSearchableFacet in interface SolrSearchServiceExtensionHandler

buildPrefixListForSearchableField

public ExtensionResultStatusType buildPrefixListForSearchableField(Field field,
                                                                   FieldType searchableFieldType,
                                                                   List<String> prefixList)
Description copied from interface: SolrSearchServiceExtensionHandler
Returns a prefix if required for the passed in searchable field.

Specified by:
buildPrefixListForSearchableField in interface SolrSearchServiceExtensionHandler

filterSearchFacetRanges

public ExtensionResultStatusType filterSearchFacetRanges(SearchFacetDTO dto,
                                                         List<SearchFacetRange> ranges)
Description copied from interface: SolrSearchServiceExtensionHandler
Builds the search facet ranges for the provided dto.

Specified by:
filterSearchFacetRanges in interface SolrSearchServiceExtensionHandler

addPropertyValues

public ExtensionResultStatusType addPropertyValues(Product product,
                                                   Field field,
                                                   FieldType fieldType,
                                                   Map<String,Object> values,
                                                   String propertyName,
                                                   List<Locale> locales)
                                            throws IllegalAccessException,
                                                   InvocationTargetException,
                                                   NoSuchMethodException
Description copied from interface: SolrSearchServiceExtensionHandler
Given the input field, populates the values array with the fields needed for the passed in field. For example, a handler might create multiple fields for the given passed in field.

Specified by:
addPropertyValues in interface SolrSearchServiceExtensionHandler
Returns:
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

modifySolrQuery

public ExtensionResultStatusType modifySolrQuery(org.apache.solr.client.solrj.SolrQuery query,
                                                 String qualifiedSolrQuery,
                                                 List<SearchFacetDTO> facets,
                                                 ProductSearchCriteria searchCriteria,
                                                 String defaultSort)
Description copied from interface: SolrSearchServiceExtensionHandler
Provides an extension point to modify the SolrQuery.

Specified by:
modifySolrQuery in interface SolrSearchServiceExtensionHandler
defaultSort - * @return

attachAdditionalBasicFields

public ExtensionResultStatusType attachAdditionalBasicFields(Product product,
                                                             org.apache.solr.common.SolrInputDocument document,
                                                             SolrHelperService shs)
Description copied from interface: SolrSearchServiceExtensionHandler
Allows the extension additional fields to the document that are not configured via the DB.

Specified by:
attachAdditionalBasicFields in interface SolrSearchServiceExtensionHandler


Copyright © 2013. All Rights Reserved.