Class DefaultSearchHelper

java.lang.Object
de.hybris.platform.cms2.common.service.impl.DefaultSearchHelper
All Implemented Interfaces:
SearchHelper

public class DefaultSearchHelper extends Object implements SearchHelper
Default implementation of SearchHelper.
  • Constructor Details

    • DefaultSearchHelper

      public DefaultSearchHelper()
  • Method Details

    • convertSort

      public List<Sort> convertSort(String sort, SortDirection defaultSortDirection)
      Description copied from interface: SearchHelper
      Converts the String sort param into a list of Sort objects. The input, if not empty, should be already validated with the following format: {param}:{direction} Multiple sort parameters are allowed if the blocks are separated by comma.
      Specified by:
      convertSort in interface SearchHelper
      Parameters:
      sort - - the sort parameter received from the request
      defaultSortDirection - the default sort direction if not supplied in any of the sortBlocks
      Returns:
      a list of Sort objects
    • convertSortBlock

      public Sort convertSortBlock(String sortBlock, SortDirection defaultSortDirection)
      Description copied from interface: SearchHelper
      Convert a sort block, i.e. {param}:{direction} into a Sort object. When a sort direction is invalid or is not provided, the sort direction is defaulted to the defaultSortDirection param.
      Specified by:
      convertSortBlock in interface SearchHelper
      Parameters:
      sortBlock - a colon delimited String containing the sort field name and sorting direction
      defaultSortDirection - the default sort direction if not supplied in the sortBlock
      Returns:
      a Sort object