use of org.apache.ranger.plugin.util.KeySearchFilter in project ranger by apache.
the class KmsKeyMgr method getFilteredKeyList.
public VXKmsKeyList getFilteredKeyList(HttpServletRequest request, VXKmsKeyList vXKmsKeyList) {
List<SortField> sortFields = new ArrayList<SortField>();
sortFields.add(new SortField(KeySearchFilter.KEY_NAME, KeySearchFilter.KEY_NAME));
KeySearchFilter filter = getKeySearchFilter(request, sortFields);
Predicate pred = getPredicate(filter);
if (pred != null) {
CollectionUtils.filter(vXKmsKeyList.getVXKeys(), pred);
}
return vXKmsKeyList;
}
use of org.apache.ranger.plugin.util.KeySearchFilter in project ranger by apache.
the class KmsKeyMgr method getKeySearchFilter.
private KeySearchFilter getKeySearchFilter(HttpServletRequest request, List<SortField> sortFields) {
if (request == null) {
return null;
}
KeySearchFilter ret = new KeySearchFilter();
if (MapUtils.isEmpty(request.getParameterMap())) {
ret.setParams(new HashMap<String, String>());
}
ret.setParam(KeySearchFilter.KEY_NAME, request.getParameter(KeySearchFilter.KEY_NAME));
extractCommonCriteriasForFilter(request, ret, sortFields);
return ret;
}
Aggregations