Class I18nSolrSearchServiceExtensionHandler

java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.search.service.solr.AbstractSolrSearchServiceExtensionHandler
org.broadleafcommerce.core.search.service.solr.I18nSolrSearchServiceExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler, SolrSearchServiceExtensionHandler

@Service("blI18nSolrSearchServiceExtensionHandler") public class I18nSolrSearchServiceExtensionHandler extends AbstractSolrSearchServiceExtensionHandler implements SolrSearchServiceExtensionHandler
If the field is translatable, then this method prefixes the field with supported locales.
Author:
bpolster
  • Field Details

    • shs

      protected SolrHelperService shs
    • extensionManager

      protected SolrSearchServiceExtensionManager extensionManager
    • translationService

      protected org.broadleafcommerce.common.i18n.service.TranslationService translationService
    • localeService

      protected org.broadleafcommerce.common.locale.service.LocaleService localeService
  • Constructor Details

    • I18nSolrSearchServiceExtensionHandler

      public I18nSolrSearchServiceExtensionHandler()
  • Method Details

    • getTranslationEnabled

      protected boolean getTranslationEnabled()
    • init

      @PostConstruct public void init()
    • buildPrefixListForIndexField

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType buildPrefixListForIndexField(IndexField field, FieldType fieldType, List<String> prefixList)
      Description copied from interface: SolrSearchServiceExtensionHandler
      Returns a prefix if required for the passed in searchable field.
      Specified by:
      buildPrefixListForIndexField in interface SolrSearchServiceExtensionHandler
      Overrides:
      buildPrefixListForIndexField in class AbstractSolrSearchServiceExtensionHandler
    • getLocalePrefix

      protected org.broadleafcommerce.common.extension.ExtensionResultStatusType getLocalePrefix(Field field, List<String> prefixList)
      If the field is translatable, take the current locale and add that as a prefix.
      Parameters:
      field -
      prefixList -
      Returns:
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface org.broadleafcommerce.common.extension.ExtensionHandler
      Overrides:
      getPriority in class org.broadleafcommerce.common.extension.AbstractExtensionHandler