Package de.cxp.ocs.util
Class SearchParamsParser
- java.lang.Object
-
- de.cxp.ocs.util.SearchParamsParser
-
public class SearchParamsParser extends Object
Utility class to parse search parameters
-
-
Field Summary
Fields Modifier and Type Field Description static StringID_FILTER_SUFFIX
-
Constructor Summary
Constructors Constructor Description SearchParamsParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InternalSearchParamsextractInternalParams(SearchQuery searchQuery, Map<String,String> filters, SearchContext searchContext)static List<InternalResultFilter>parseFilters(Map<String,String> filterValues, FieldConfigIndex fieldConfig)Checks the parameter map for valid filters and extracts them into InternalResultFilter objects.static List<Sorting>parseSortings(String paramValue, FieldConfigIndex fields)Parses the sorting parameter into a list of enriched Sorting objects.
-
-
-
Field Detail
-
ID_FILTER_SUFFIX
public static final String ID_FILTER_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
extractInternalParams
public static InternalSearchParams extractInternalParams(SearchQuery searchQuery, Map<String,String> filters, SearchContext searchContext)
-
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 requestfieldConfig- 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 valuefields- the field configuration- Returns:
- list of validated sortings
-
-