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 Details

  • Constructor Details

    • SearchFacetDTOServiceImpl

      public SearchFacetDTOServiceImpl()
  • Method Details

    • getDefaultPageSize

      protected int getDefaultPageSize()
    • getMaxPageSize

      protected int getMaxPageSize()
    • buildSearchCriteria

      public SearchCriteria buildSearchCriteria(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: SearchFacetDTOService
      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.
      Specified by:
      buildSearchCriteria in interface SearchFacetDTOService
      Returns:
      the SearchCriteria
    • createSearchCriteria

      protected SearchCriteria createSearchCriteria()
    • setActiveFacetResults

      public void setActiveFacetResults(List<SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: SearchFacetDTOService
      Sets the "active" boolean on a given SearchFacetResultDTO as determined by the current request
      Specified by:
      setActiveFacetResults in interface SearchFacetDTOService
    • isActive

      public boolean isActive(SearchFacetResultDTO result, jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: SearchFacetDTOService
      Returns whether or not the SearchFacetResultDTO's key/value pair is present in the servlet request
      Specified by:
      isActive in interface SearchFacetDTOService
      Returns:
      if the result is active
    • getUrlKey

      public String getUrlKey(SearchFacetResultDTO result)
      Description copied from interface: SearchFacetDTOService
      Gets the url abbreviation associated with a given SearchFacetResultDTO.
      Specified by:
      getUrlKey in interface SearchFacetDTOService
      Returns:
      the key associated with a SearchFacetResultDTO
    • getValue

      public String getValue(SearchFacetResultDTO result)
      Description copied from interface: SearchFacetDTOService
      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.
      Specified by:
      getValue in interface SearchFacetDTOService
      Returns:
      the value of the SearchFacetResultDTO
    • getUrlKey

      public String getUrlKey(SearchFacetDTO result)
      Specified by:
      getUrlKey in interface SearchFacetDTOService