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 Summary
FieldsModifier and TypeFieldDescriptionprotected SolrSearchServiceExtensionManagerprotected org.broadleafcommerce.common.locale.service.LocaleServiceprotected SolrHelperServiceprotected org.broadleafcommerce.common.i18n.service.TranslationServiceFields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.common.extension.ExtensionResultStatusTypebuildPrefixListForIndexField(IndexField field, FieldType fieldType, List<String> prefixList) Returns a prefix if required for the passed in searchable field.protected org.broadleafcommerce.common.extension.ExtensionResultStatusTypegetLocalePrefix(Field field, List<String> prefixList) If the field is translatable, take the current locale and add that as a prefix.intprotected booleanvoidinit()Methods inherited from class org.broadleafcommerce.core.search.service.solr.AbstractSolrSearchServiceExtensionHandler
addAdditionalCategoryIds, attachFacet, attachFacet, attachSortField, batchFetchCatalogData, buildActiveFacetFilter, buildActiveFacetFilter, filterSearchFacetRanges, getCategoryId, getCategorySearchFacets, getPropertyNameForIndexField, getQueryField, getSearchableIndexFields, getSearchFacets, modifySearchResults, modifySolrQuery, modifySolrQuery, setFacetResultsMethods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
isEnabled, setEnabled, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
isEnabledMethods inherited from interface org.broadleafcommerce.core.search.service.solr.SolrSearchServiceExtensionHandler
addAdditionalCategoryIds, attachFacet, attachFacet, attachSortField, batchFetchCatalogData, buildActiveFacetFilter, buildActiveFacetFilter, filterSearchFacetRanges, getCategoryId, getCategorySearchFacets, getPropertyNameForIndexField, getQueryField, getSearchableIndexFields, getSearchFacets, modifySearchResults, modifySolrQuery, modifySolrQuery, setFacetResults
-
Field Details
-
shs
-
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:SolrSearchServiceExtensionHandlerReturns a prefix if required for the passed in searchable field.- Specified by:
buildPrefixListForIndexFieldin interfaceSolrSearchServiceExtensionHandler- Overrides:
buildPrefixListForIndexFieldin classAbstractSolrSearchServiceExtensionHandler
-
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:
getPriorityin interfaceorg.broadleafcommerce.common.extension.ExtensionHandler- Overrides:
getPriorityin classorg.broadleafcommerce.common.extension.AbstractExtensionHandler
-