Interface CatalogSearchProvider<T extends Product>

Type Parameters:
T - The type of the results expected in the SearchResponse. Should extend Product.
All Known Implementing Classes:
ExternalCatalogSearchProvider

public interface CatalogSearchProvider<T extends Product>
Provider for interfacing with operations around catalog search. Typically utilizes WebClient to make requests to an external REST API.
Author:
Nathan Moore (nathandmoore)
  • Method Details

    • fetchCategoryWithDetailsAndSearchResponse

      Category fetchCategoryWithDetailsAndSearchResponse(@NonNull @NonNull CategoryDetailsRequest categoryDetailsRequest)
    • getSearchResultsForCategory

      SearchResponse<T> getSearchResultsForCategory(@NonNull @NonNull CatalogEntityDetailsRequest categoryDetailsRequest, @NonNull @NonNull Category category)
      Performs a search for products belonging to the provided category.
      Parameters:
      categoryDetailsRequest - The original category request
      category - The resolved category
      Returns:
      The search results for the category.
    • getSearchResults

      SearchResponse<T> getSearchResults(CatalogSearchRequest request)
      Performs a search for the provided request.
      Parameters:
      request - All of the relevant information to be used to retrieve search results.
      Returns:
      The SearchResponse with results for the request.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
    • getSuggestions

      TypeAheadResponse getSuggestions(CatalogTypeAheadRequest request)
      Gets suggestions for a search typeahead component based on the request.
      Parameters:
      request - All of the relevant information to be used to retrieve type-ahead suggestions.
      Returns:
      The TypeAheadResponse with the results for the request.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.