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 Type
    Method
    Description
    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.
     
    Gets the url abbreviation associated with a given SearchFacetResultDTO.
    Gets the value of the given SearchFacetResultDTO.
    boolean
    isActive(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<SearchFacetDTO> facets, jakarta.servlet.http.HttpServletRequest request)
    Sets the "active" boolean on a given SearchFacetResultDTO as determined by the current request
  • Method Details

    • buildSearchCriteria

      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. 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

      boolean isActive(SearchFacetResultDTO result, jakarta.servlet.http.HttpServletRequest request)
      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

      String getUrlKey(SearchFacetResultDTO result)
      Gets the url abbreviation associated with a given SearchFacetResultDTO.
      Parameters:
      result -
      Returns:
      the key associated with a SearchFacetResultDTO
    • getValue

      String getValue(SearchFacetResultDTO result)
      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

      String getUrlKey(SearchFacetDTO result)