Class MockAsSearchProvider

  • All Implemented Interfaces:
    AsSearchProvider, org.springframework.beans.factory.InitializingBean

    public class MockAsSearchProvider
    extends java.lang.Object
    implements AsSearchProvider, org.springframework.beans.factory.InitializingBean
    Mock implementation for AsSearchProvider
    • Field Detail

      • INDEX_CONFIGURATION

        protected static final java.lang.String INDEX_CONFIGURATION
        See Also:
        Constant Field Values
      • INDEX_TYPE_NO_CATALOG_VERSION

        protected static final java.lang.String INDEX_TYPE_NO_CATALOG_VERSION
        See Also:
        Constant Field Values
      • SCORE_EXPRESSION

        protected static final java.lang.String SCORE_EXPRESSION
        See Also:
        Constant Field Values
      • INDEX_PROPERTY_CODE1

        protected static final java.lang.String INDEX_PROPERTY_CODE1
        See Also:
        Constant Field Values
      • INDEX_PROPERTY_CODE2

        protected static final java.lang.String INDEX_PROPERTY_CODE2
        See Also:
        Constant Field Values
      • INDEX_PROPERTY_CODE3

        protected static final java.lang.String INDEX_PROPERTY_CODE3
        See Also:
        Constant Field Values
      • INDEX_PROPERTY_CODE4

        protected static final java.lang.String INDEX_PROPERTY_CODE4
        See Also:
        Constant Field Values
    • Constructor Detail

      • MockAsSearchProvider

        public MockAsSearchProvider()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • getIndexTypes

        public java.util.List<AsIndexTypeData> getIndexTypes​(java.lang.String indexConfiguration)
        Description copied from interface: AsSearchProvider
        Returns a list of index types for a given index configuration.
        Specified by:
        getIndexTypes in interface AsSearchProvider
        Parameters:
        indexConfiguration - - the index configuration code
        Returns:
        the index types
      • getIndexTypeForCode

        public java.util.Optional<AsIndexTypeData> getIndexTypeForCode​(java.lang.String code)
        Description copied from interface: AsSearchProvider
        Returns the index type for the provided code.
        Specified by:
        getIndexTypeForCode in interface AsSearchProvider
        Parameters:
        code - - the index type code
        Returns:
        the index type
      • getIndexProperties

        public java.util.List<AsIndexPropertyData> getIndexProperties​(java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of index properties for a given index type.
        Specified by:
        getIndexProperties in interface AsSearchProvider
        Parameters:
        indexType - - the index type code
        Returns:
        the index properties
      • getIndexPropertyForCode

        public java.util.Optional<AsIndexPropertyData> getIndexPropertyForCode​(java.lang.String indexType,
                                                                               java.lang.String code)
        Description copied from interface: AsSearchProvider
        Returns the index property for the provided code.
        Specified by:
        getIndexPropertyForCode in interface AsSearchProvider
        code - - the index property code
        Returns:
        the index property
      • getSupportedCatalogVersions

        public java.util.List<CatalogVersionModel> getSupportedCatalogVersions​(java.lang.String indexConfiguration,
                                                                               java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of catalog versions for a given index configuration and type.
        Specified by:
        getSupportedCatalogVersions in interface AsSearchProvider
        Parameters:
        indexConfiguration - - the index configuration
        indexType - - the index type
        Returns:
        the catalog versions
      • getSupportedLanguages

        public java.util.List<LanguageModel> getSupportedLanguages​(java.lang.String indexConfiguration,
                                                                   java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of languages for a given index configuration and type.
        Specified by:
        getSupportedLanguages in interface AsSearchProvider
        Parameters:
        indexConfiguration - - the index configuration
        indexType - - the index type
        Returns:
        the languages
      • getSupportedCurrencies

        public java.util.List<CurrencyModel> getSupportedCurrencies​(java.lang.String indexConfiguration,
                                                                    java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of currencies for a given index configuration and type.
        Specified by:
        getSupportedCurrencies in interface AsSearchProvider
        Parameters:
        indexConfiguration - - the index configuration
        indexType - - the index type
        Returns:
        the currencies
      • getSupportedFacetIndexProperties

        public java.util.List<AsIndexPropertyData> getSupportedFacetIndexProperties​(java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of index properties for a given index type that can be used for facets.
        Specified by:
        getSupportedFacetIndexProperties in interface AsSearchProvider
        Parameters:
        indexType - - the index type code
        Returns:
        the index properties
      • isValidFacetIndexProperty

        public boolean isValidFacetIndexProperty​(java.lang.String indexType,
                                                 java.lang.String code)
        Description copied from interface: AsSearchProvider
        Checks is a given index property can be used for facets.
        Specified by:
        isValidFacetIndexProperty in interface AsSearchProvider
        Parameters:
        indexType - - the index type code
        code - - the code of the index property
        Returns:
        true if the index property can be used for facets, false otherwise
      • getSupportedSortExpressions

        public java.util.List<AsExpressionData> getSupportedSortExpressions​(java.lang.String indexType)
        Description copied from interface: AsSearchProvider
        Returns a list of expressions for a given index type that can be used for sorts.
        Specified by:
        getSupportedSortExpressions in interface AsSearchProvider
        Parameters:
        indexType - - the index type code
        Returns:
        the expressions
      • isValidSortExpression

        public boolean isValidSortExpression​(java.lang.String indexType,
                                             java.lang.String expression)
        Description copied from interface: AsSearchProvider
        Checks is a given expression can be used for facets.
        Specified by:
        isValidSortExpression in interface AsSearchProvider
        Parameters:
        indexType - - the index type code
        expression - - the sort expression
        Returns:
        true if expression can be used for sorts, false otherwise