@FormParam("filter") String filterJSON) {
try {
ObjectMapper mapper = new ObjectMapper();
mapper.setVisibilityChecker(mapper.getVisibilityChecker().withFieldVisibility(Visibility.ANY));
SaikuFilter filter = mapper.readValue(filterJSON, SaikuFilter.class);
String username = sessionService.getAllSessionObjects().get("username").toString();
filter.setOwner(username);
Map<String, SaikuFilter> filters = getFiltersInternal();
filters.put(filter.getName(), filter);
serialize(getUserFile(), filters);
return Response.ok(filter).build();
} catch (Exception e) {
LOG.error("Cannot save filter (" + filterJSON + ")", e);
String error = ExceptionUtils.getRootCauseMessage(e);