Class 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 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
    • Constructor Detail

      • DefaultFullTextSearchStrategy

        public DefaultFullTextSearchStrategy()
    • Method Detail

      • getFieldType

        public java.lang.String getFieldType​(java.lang.String typeCode,
                                             java.lang.String fieldName)
        Description copied from interface: FullTextSearchStrategy
        Looks for a platform type code of a value for filter of specified fieldName.
        Specified by:
        getFieldType in interface FullTextSearchStrategy
        Parameters:
        typeCode - type code of values to be filtered
        fieldName - name of a field for which operators are to be provided
        Returns:
        type code of a value of filter or null if unknown
      • isLocalized

        public boolean isLocalized​(java.lang.String typeCode,
                                   java.lang.String fieldName)
        Description copied from interface: FullTextSearchStrategy
        Checks if filter of specified fieldName supports localized values.
        Specified by:
        isLocalized in interface FullTextSearchStrategy
        Parameters:
        typeCode - type code of values to be filtered
        fieldName - fieldName of a field for which operators are to be provided
        Returns:
        true if filter is localized
      • getAvailableLanguages

        public java.util.Collection<java.lang.String> getAvailableLanguages​(java.lang.String typeCode)
        Description copied from interface: FullTextSearchStrategy
        Returns a list of languages by which it is possible to search on a given type.
        Specified by:
        getAvailableLanguages in interface FullTextSearchStrategy
        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: FullTextSearchStrategy
        Looks for all available compare operators for filter of specified field name.
        Specified by:
        getAvailableOperators in interface FullTextSearchStrategy
        Parameters:
        typeCode - type code of values to be filtered
        fieldName - 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)
      • setAdvancedSearchOperatorService

        public void setAdvancedSearchOperatorService​(AdvancedSearchOperatorService advancedSearchOperatorService)
      • getStrategyName

        public java.lang.String getStrategyName()
        Description copied from interface: FullTextSearchStrategy
        Returns name of the search strategy which can be used in configuration of preferred search strategy
        Specified by:
        getStrategyName in interface FullTextSearchStrategy
        Returns:
        name of the search strategy