Пример #1
0
 @GET
 @Path("{userId}/notifications")
 public Response getNotifications(
     @PathParam("userId") final String userId,
     @QueryParam(FILTER_QPARAM) @DefaultValue(FRESH_NOTIFICATION_TYPE) final String filter) {
   // AuditEvent auditEvent = auditEventDao.getEvents(userId);
   List<Notification> notifications = notificationDao.getNotifications(userId, filter);
   NotificationPage notificationPage =
       new NotificationPage(0, notifications.size(), notifications);
   return Response.ok().entity(notificationPage).build();
 }
Пример #2
0
 @DELETE
 @Path("{userId}/notifications")
 public Response moveNotifications(@PathParam("userId") final String userId) {
   notificationDao.moveNotification(userId);
   return Response.ok().build();
 }