notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/controller/rest/JPANotificationRESTController.java
@RequestMapping(value = "/{notificationId}/addressees", method = RequestMethod.POST)
    @ResponseBody
    @ResponseStatus(HttpStatus.CREATED)
    public AddresseeDTO addAddressee(HttpServletRequest req, HttpServletResponse resp,
                @PathVariable("notificationId") long id,
                @RequestBody AddresseeDTO addressee) {
        AddresseeDTO dto = restService.createAddressee(id, addressee);
        if (dto == null) {
            resp.setStatus(HttpStatus.NOT_FOUND.value());
            return null;
        }

        String url = getSingleNotificationRESTUrl(req, id) + "/addressee/" + dto.getId();
        resp.addHeader("Location", url);

        return dto;
    }
@RequestMapping(value = "/{notificationId}/addressees", method = RequestMethod.POST)
    @ResponseBody
    @ResponseStatus(HttpStatus.CREATED)
    public AddresseeDTO addAddressee(HttpServletRequest req, HttpServletResponse resp,
                @PathVariable("notificationId") long id,
                @RequestBody AddresseeDTO addressee) {
        AddresseeDTO dto = restService.createAddressee(id, addressee);
        if (dto == null) {
            resp.setStatus(HttpStatus.NOT_FOUND.value());
            return null;
        }

        String url = getSingleNotificationRESTUrl(req, id) + "/addressee/" + dto.getId();
        resp.addHeader("Location", url);

        return dto;
    }
Create a new addressee for a notification.

@param req the Http request
@param resp the Http response
@param id the notification id
@param addressee the list of addressees
@return the persisted addressee