Interface SearchFacetDTOService
- All Known Implementing Classes:
SearchFacetDTOServiceImpl
public interface SearchFacetDTOService
Provides methods that facilitate interactions with SearchFacetDTOs and SearchFacetResultDTOs
- Author:
- Andre Azzolini (apazzolini)
-
Method Summary
Modifier and TypeMethodDescriptionbuildSearchCriteria(jakarta.servlet.http.HttpServletRequest request) Given a servlet request and a list of available facets for this request (could be search or category based), this method will build out a SearchCriteria object to be used by the ProductSearchService.getUrlKey(SearchFacetDTO result) getUrlKey(SearchFacetResultDTO result) Gets the url abbreviation associated with a given SearchFacetResultDTO.getValue(SearchFacetResultDTO result) Gets the value of the given SearchFacetResultDTO.booleanisActive(SearchFacetResultDTO result, jakarta.servlet.http.HttpServletRequest request) Returns whether or not the SearchFacetResultDTO's key/value pair is present in the servlet requestvoidsetActiveFacetResults(List<SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request) Sets the "active" boolean on a given SearchFacetResultDTO as determined by the current request
-
Method Details
-
buildSearchCriteria
Given a servlet request and a list of available facets for this request (could be search or category based), this method will build out a SearchCriteria object to be used by the ProductSearchService. It will perform translations from query string parameters to the SearchCriteria.- Parameters:
request-- Returns:
- the SearchCriteria
-
setActiveFacetResults
void setActiveFacetResults(List<SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request) Sets the "active" boolean on a given SearchFacetResultDTO as determined by the current request- Parameters:
facets-request-
-
isActive
Returns whether or not the SearchFacetResultDTO's key/value pair is present in the servlet request- Parameters:
result-request-- Returns:
- if the result is active
-
getUrlKey
Gets the url abbreviation associated with a given SearchFacetResultDTO.- Parameters:
result-- Returns:
- the key associated with a SearchFacetResultDTO
-
getValue
Gets the value of the given SearchFacetResultDTO. The default Broadleaf implementation will return the String value of the result if the value is not empty, or "range[<min-value>:<max-value>]" if the value was empty.- Parameters:
result-- Returns:
- the value of the SearchFacetResultDTO
-
getUrlKey
-