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
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.common.security.service.ExploitProtectionService
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.core.search.domain.SearchCriteria
    buildSearchCriteria(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 org.broadleafcommerce.core.search.domain.SearchCriteria
     
    protected int
     
    protected int
     
    getUrlKey(org.broadleafcommerce.core.search.domain.SearchFacetDTO result)
     
    getUrlKey(org.broadleafcommerce.core.search.domain.SearchFacetResultDTO result)
    Gets the url abbreviation associated with a given SearchFacetResultDTO.
    getValue(org.broadleafcommerce.core.search.domain.SearchFacetResultDTO result)
    Gets the value of the given SearchFacetResultDTO.
    boolean
    isActive(org.broadleafcommerce.core.search.domain.SearchFacetResultDTO result, jakarta.servlet.http.HttpServletRequest request)
    Returns whether or not the SearchFacetResultDTO's key/value pair is present in the servlet request
    void
    setActiveFacetResults(List<org.broadleafcommerce.core.search.domain.SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request)
    Sets the "active" boolean on a given SearchFacetResultDTO as determined by the current request

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • exploitProtectionService

      protected org.broadleafcommerce.common.security.service.ExploitProtectionService exploitProtectionService
  • Constructor Details

    • SearchFacetDTOServiceImpl

      public SearchFacetDTOServiceImpl()
  • Method Details

    • getDefaultPageSize

      protected int getDefaultPageSize()
    • getMaxPageSize

      protected int getMaxPageSize()
    • buildSearchCriteria

      public org.broadleafcommerce.core.search.domain.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 org.broadleafcommerce.core.search.domain.SearchCriteria createSearchCriteria()
    • setActiveFacetResults

      public void setActiveFacetResults(List<org.broadleafcommerce.core.search.domain.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(org.broadleafcommerce.core.search.domain.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(org.broadleafcommerce.core.search.domain.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(org.broadleafcommerce.core.search.domain.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(org.broadleafcommerce.core.search.domain.SearchFacetDTO result)
      Specified by:
      getUrlKey in interface SearchFacetDTOService