    public Map<String, Object> getNotificationsFor(final @RequestParam(value = "uuid", required = true) String uuid,
                                            final @RequestParam(value = "sender", required = true) boolean sender,
                                            final @RequestParam(value = "search") String search,
                                            final @RequestParam(value = "pageNumber") Integer pageNumber,
                                            final @RequestParam(value = "pageSize") Integer pageSize) {
        Map<String, Object> response = new HashMap<String, Object>();
        Person person = Context.getPersonService().getPersonByUuid(uuid);
        DataService service = Context.getService(DataService.class);
        Integer pages;
        List<NotificationData> notificationDataList;
        if (sender) {
            pages = (service.countNotificationDataBySender(person, search) + pageSize - 1) / pageSize;
            notificationDataList = service.getNotificationDataBySender(person, search, pageNumber, pageSize);
        } else {
            pages = (service.countNotificationDataByReceiver(person, search) + pageSize - 1) / pageSize;
            notificationDataList = service.getNotificationDataByReceiver(person, search, pageNumber, pageSize);
        }
        List<Object> objects = new ArrayList<Object>();
        for (NotificationData notificationData : notificationDataList) {
            objects.add(NotificationDataConverter.convert(notificationData));
        }
        response.put("pages", pages);
        response.put("objects", objects);
        return response;
    }

    public Map<String, Object> getNotificationsFor(final @RequestParam(value = "uuid", required = true) String uuid,
                                            final @RequestParam(value = "sender", required = true) boolean sender,
                                            final @RequestParam(value = "search") String search,
                                            final @RequestParam(value = "pageNumber") Integer pageNumber,
                                            final @RequestParam(value = "pageSize") Integer pageSize) {
        Map<String, Object> response = new HashMap<String, Object>();
        Person person = Context.getPersonService().getPersonByUuid(uuid);
        DataService service = Context.getService(DataService.class);
        Integer pages;
        List<NotificationData> notificationDataList;
        if (sender) {
            pages = (service.countNotificationDataBySender(person, search).intValue() + pageSize - 1) / pageSize;
            notificationDataList = service.getNotificationDataBySender(person, search, pageNumber, pageSize);
        } else {
            pages = (service.countNotificationDataByReceiver(person, search).intValue() + pageSize - 1) / pageSize;
            notificationDataList = service.getNotificationDataByReceiver(person, search, pageNumber, pageSize);
        }
        List<Object> objects = new ArrayList<Object>();
        for (NotificationData notificationData : notificationDataList) {
            objects.add(NotificationDataConverter.convert(notificationData));
        }
        response.put("pages", pages);
        response.put("objects", objects);
        return response;
    }
