public class SearchFilterUtil extends Object
SearchFilterTag.| Constructor and Description |
|---|
SearchFilterUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
filterProducts(List<Product> products,
Map<String,String[]> parameters,
String[] allowedParameters)
filterProducts iterates over the products for each allowed parameter, filtering out products that do
not match the values passed in via the parameters argument.
|
public static void filterProducts(List<Product> products, Map<String,String[]> parameters, String[] allowedParameters)
SearchFilterItemTag.
For multiSelect items, the method will remove the product if the property specified in allowedParameters's
toString() method returns a String equal to one of the Strings in the corresponding String[] in parameters.
For sliderRange items, the property on the product must be of type Money. The product will be filtered
out if it's property is greater than the Money value parsed out of max-(property name) or smaller than the Money
value parsed from min-(property name)products - the list of products to filterparameters - the parameters passed to the controller. Generally request.getParameterMap()allowedParameters - an array of the allowed parameters to filter onCopyright © 2015. All Rights Reserved.