SavedSearchCriterias savedSearchCriterias =
saveRpstry.getSavedList(context.getUser());
if(savedSearchCriterias.size() >=
SearchConfig.getConfiguredInstance().getMaxSavedSearches()) {
MessageBroker messageBroker =
new FacesContextBroker(request,response).extractMessageBroker();
String message =
messageBroker.getMessage("catalog.search.error.maxSavedSearchesReached")
.getSummary();
writeSavedSearches(request, response, context, message);
return;
}
String body = IOUtils.toString(request.getInputStream(), "UTF-8");
Map<String, String> paramMap = urlToParamMap(body);
String name = "";
String criteria = "";
name = paramMap.get("name");
if("".equals(Val.chkStr(name))) {
MessageBroker messageBroker =
new FacesContextBroker(request,response).extractMessageBroker();
String message =
messageBroker.getMessage("catalog.search.savedSearches.noSaveName")
.getSummary();
writeSavedSearches(request, response, context, message);
return;