Interface CatalogSearchProvider<T extends Product>
- Type Parameters:
T- The type of the results expected in theSearchResponse. Should extendProduct.
- 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 Summary
Modifier and TypeMethodDescriptionfetchCategoryWithDetailsAndSearchResponse(@NonNull CategoryDetailsRequest categoryDetailsRequest) getSearchResults(CatalogSearchRequest request) Performs a search for the provided request.getSearchResultsForCategory(@NonNull CatalogEntityDetailsRequest categoryDetailsRequest, @NonNull Category category) Performs a search for products belonging to the provided category.getSuggestions(CatalogTypeAheadRequest request) Gets suggestions for a search typeahead component based on the request.
-
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 requestcategory- The resolved category- Returns:
- The search results for the category.
-
getSearchResults
Performs a search for the provided request.- Parameters:
request- All of the relevant information to be used to retrieve search results.- Returns:
- The
SearchResponsewith results for the request. - Throws:
ProviderApiException- if the provider encounters an error with the request.
-
getSuggestions
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
TypeAheadResponsewith the results for the request. - Throws:
ProviderApiException- if the provider encounters an error with the request.
-