Class DefaultFullTextSearchStrategy
- java.lang.Object
-
- com.hybris.backoffice.widgets.fulltextsearch.DefaultFullTextSearchStrategy
-
- All Implemented Interfaces:
FullTextSearchStrategy
public class DefaultFullTextSearchStrategy extends java.lang.Object implements FullTextSearchStrategy
Default Fulltext search strategy that works on type system. Each filter is named by items attributes and a type of filters values are determined on basis of attribute's type,
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSTRATEGY_NAMEStrategy name to be used in configuration when preferred search strategy is to be changed
-
Constructor Summary
Constructors Constructor Description DefaultFullTextSearchStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdvancedSearchOperatorServicegetAdvancedSearchOperatorService()java.util.Collection<java.lang.String>getAvailableLanguages(java.lang.String typeCode)Returns a list of languages by which it is possible to search on a given type.java.util.Collection<ValueComparisonOperator>getAvailableOperators(java.lang.String typeCode, java.lang.String fieldName)Looks for all available compare operators for filter of specified field name.java.lang.StringgetFieldType(java.lang.String typeCode, java.lang.String fieldName)Looks for a platform type code of a value for filter of specified fieldName.java.lang.StringgetStrategyName()Returns name of the search strategy which can be used in configuration of preferred search strategyprotected TypeFacadegetTypeFacade()booleanisLocalized(java.lang.String typeCode, java.lang.String fieldName)Checks if filter of specified fieldName supports localized values.voidsetAdvancedSearchOperatorService(AdvancedSearchOperatorService advancedSearchOperatorService)voidsetTypeFacade(TypeFacade typeFacade)
-
-
-
Field Detail
-
STRATEGY_NAME
public static final java.lang.String STRATEGY_NAME
Strategy name to be used in configuration when preferred search strategy is to be changed- See Also:
- Constant Field Values
-
-
Method Detail
-
getFieldType
public java.lang.String getFieldType(java.lang.String typeCode, java.lang.String fieldName)Description copied from interface:FullTextSearchStrategyLooks for a platform type code of a value for filter of specified fieldName.- Specified by:
getFieldTypein interfaceFullTextSearchStrategy- Parameters:
typeCode- type code of values to be filteredfieldName- name of a field for which operators are to be provided- Returns:
- type code of a value of filter or
nullif unknown
-
isLocalized
public boolean isLocalized(java.lang.String typeCode, java.lang.String fieldName)Description copied from interface:FullTextSearchStrategyChecks if filter of specified fieldName supports localized values.- Specified by:
isLocalizedin interfaceFullTextSearchStrategy- Parameters:
typeCode- type code of values to be filteredfieldName- fieldName of a field for which operators are to be provided- Returns:
trueif filter is localized
-
getAvailableLanguages
public java.util.Collection<java.lang.String> getAvailableLanguages(java.lang.String typeCode)
Description copied from interface:FullTextSearchStrategyReturns a list of languages by which it is possible to search on a given type.- Specified by:
getAvailableLanguagesin interfaceFullTextSearchStrategy- Parameters:
typeCode- type code of values to be filtered- Returns:
- list of languages in the form of ISO codes
-
getAvailableOperators
public java.util.Collection<ValueComparisonOperator> getAvailableOperators(java.lang.String typeCode, java.lang.String fieldName)
Description copied from interface:FullTextSearchStrategyLooks for all available compare operators for filter of specified field name.- Specified by:
getAvailableOperatorsin interfaceFullTextSearchStrategy- Parameters:
typeCode- type code of values to be filteredfieldName- name of a field for which operators are to be provided- Returns:
- collection of supported operators
-
getTypeFacade
protected TypeFacade getTypeFacade()
-
setTypeFacade
public void setTypeFacade(TypeFacade typeFacade)
-
getAdvancedSearchOperatorService
protected AdvancedSearchOperatorService getAdvancedSearchOperatorService()
-
setAdvancedSearchOperatorService
public void setAdvancedSearchOperatorService(AdvancedSearchOperatorService advancedSearchOperatorService)
-
getStrategyName
public java.lang.String getStrategyName()
Description copied from interface:FullTextSearchStrategyReturns name of the search strategy which can be used in configuration of preferred search strategy- Specified by:
getStrategyNamein interfaceFullTextSearchStrategy- Returns:
- name of the search strategy
-
-