Class SearchFacetDTOServiceImpl
java.lang.Object
org.broadleafcommerce.core.web.service.SearchFacetDTOServiceImpl
- All Implemented Interfaces:
SearchFacetDTOService
@Service("blSearchFacetDTOService")
public class SearchFacetDTOServiceImpl
extends Object
implements SearchFacetDTOService
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.protected SearchCriteriaprotected intprotected intgetUrlKey(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
-
Field Details
-
exploitProtectionService
-
-
Constructor Details
-
SearchFacetDTOServiceImpl
public SearchFacetDTOServiceImpl()
-
-
Method Details
-
getDefaultPageSize
protected int getDefaultPageSize() -
getMaxPageSize
protected int getMaxPageSize() -
buildSearchCriteria
Description copied from interface:SearchFacetDTOServiceGiven 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.- Specified by:
buildSearchCriteriain interfaceSearchFacetDTOService- Returns:
- the SearchCriteria
-
createSearchCriteria
-
setActiveFacetResults
public void setActiveFacetResults(List<SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:SearchFacetDTOServiceSets the "active" boolean on a given SearchFacetResultDTO as determined by the current request- Specified by:
setActiveFacetResultsin interfaceSearchFacetDTOService
-
isActive
public boolean isActive(SearchFacetResultDTO result, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:SearchFacetDTOServiceReturns whether or not the SearchFacetResultDTO's key/value pair is present in the servlet request- Specified by:
isActivein interfaceSearchFacetDTOService- Returns:
- if the result is active
-
getUrlKey
Description copied from interface:SearchFacetDTOServiceGets the url abbreviation associated with a given SearchFacetResultDTO.- Specified by:
getUrlKeyin interfaceSearchFacetDTOService- Returns:
- the key associated with a SearchFacetResultDTO
-
getValue
Description copied from interface:SearchFacetDTOServiceGets 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.- Specified by:
getValuein interfaceSearchFacetDTOService- Returns:
- the value of the SearchFacetResultDTO
-
getUrlKey
- Specified by:
getUrlKeyin interfaceSearchFacetDTOService
-