Class SearchParamsParser


  • public class SearchParamsParser
    extends Object
    Utility class to parse search parameters
    • Constructor Detail

      • SearchParamsParser

        public SearchParamsParser()
    • Method Detail

      • parseFilters

        public static List<InternalResultFilter> parseFilters​(Map<String,​String> filterValues,
                                                              FieldConfigIndex fieldConfig)
        Checks the parameter map for valid filters and extracts them into InternalResultFilter objects.
        Parameters:
        filterValues - parameters as sent in the request
        fieldConfig - the field configuration
        Returns:
        validated and enriched filter values for internal usage
      • parseSortings

        public static List<Sorting> parseSortings​(String paramValue,
                                                  FieldConfigIndex fields)
        Parses the sorting parameter into a list of enriched Sorting objects.
        Parameters:
        paramValue - the sorting parameter value
        fields - the field configuration
        Returns:
        list of validated sortings