Class DefaultQueryPreprocessorRegistry
- java.lang.Object
-
- de.hybris.platform.servicelayer.search.internal.preprocessor.impl.DefaultQueryPreprocessorRegistry
-
- All Implemented Interfaces:
QueryPreprocessorRegistry
public class DefaultQueryPreprocessorRegistry extends java.lang.Object implements QueryPreprocessorRegistry
Default implementation of
QueryPreprocessorRegistryinterface.Please notice that because registered
QueryPreprocessorimplementations can have any dependencies, thus it can lead to circular dependency problem. To avoid this problem this class must be used withlookup-methodas follows:Java class
public class DefaultFlexibleSearchService extends AbstractBusinessService implements FlexibleSearchService { ... private volatile QueryPreprocessorRegistry queryPreprocessorRegistry; public QueryPreprocessorRegistry getQueryPreprocessorRegistry() { if (queryPreprocessorRegistry == null) { synchronized (this) { if (queryPreprocessorRegistry == null) { queryPreprocessorRegistry = lookupQueryPreprocessorRegistry(); } } } return queryPreprocessorRegistry; } public QueryPreprocessorRegistry lookupQueryPreprocessorRegistry() { throw new UnsupportedOperationException( "please override DefaultFlexibleSearchService#lookupQueryPreprocessorRegistry() or use <lookup-method>"); } ... }Spring context configuration
<bean id="defaultFlexibleSearchService" parent="abstractBusinessService" class="de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService" > ... <lookup-method name="lookupQueryPreprocessorRegistry" bean="queryPreprocessorRegistry"/> ... </bean> <bean id="queryPreprocessorRegistry" class="de.hybris.platform.servicelayer.search.internal.preprocessor.impl.DefaultQueryPreprocessorRegistry" autowire="byType" />
-
-
Constructor Summary
Constructors Constructor Description DefaultQueryPreprocessorRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAllPreprocessors(FlexibleSearchQuery query)Iterates over all registered preprocessors and executes each againstFlexibleSearchQueryobject.voidsetQueryPreprocessors(java.util.Map<java.lang.String,QueryPreprocessor> queryPreprocessors)
-
-
-
Method Detail
-
executeAllPreprocessors
public void executeAllPreprocessors(FlexibleSearchQuery query)
Iterates over all registered preprocessors and executes each againstFlexibleSearchQueryobject.- Specified by:
executeAllPreprocessorsin interfaceQueryPreprocessorRegistry- Parameters:
query-FlexibleSearchQueryobject.
-
setQueryPreprocessors
public void setQueryPreprocessors(java.util.Map<java.lang.String,QueryPreprocessor> queryPreprocessors)
-
-