Class NotificationController
- java.lang.Object
-
- io.tesler.notifications.controller.NotificationController
-
@RestController @RequestMapping("#{ (${tesler.api.use-servlet-context-path} == true) ? \'\': \'${tesler.api.path}\'}/notification") public class NotificationController extends Object
-
-
Constructor Summary
Constructors Constructor Description NotificationController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.context.request.async.DeferredResult<ResponseDTO>
checkNewNotifications(Long latestNotificationId, boolean unread)
ResponseDTO
countNotifications(boolean unread, Long offset)
List<Long>
deleteNotifications(List<Long> notificationId)
ResponseDTO
getNotifications(boolean unread, Long offset, PageSpecification page)
MarkNotificationDTO
markNotificationsAsRead(MarkNotificationDTO markNotificationDTO)
void
saveNotification(String url, String message)
-
-
-
Method Detail
-
getNotifications
@GetMapping("/get-notifications") public ResponseDTO getNotifications(@RequestParam(defaultValue="false") boolean unread, @RequestParam(required=false) Long offset, PageSpecification page)
-
countNotifications
@GetMapping("/count-notifications") public ResponseDTO countNotifications(@RequestParam(defaultValue="false") boolean unread, @RequestParam(required=false) Long offset)
-
checkNewNotifications
@GetMapping("/check-new-notification") public org.springframework.web.context.request.async.DeferredResult<ResponseDTO> checkNewNotifications(@RequestParam Long latestNotificationId, @RequestParam(defaultValue="false") boolean unread)
-
markNotificationsAsRead
@PostMapping("/mark-notification-as-read") public MarkNotificationDTO markNotificationsAsRead(@RequestBody MarkNotificationDTO markNotificationDTO)
-
deleteNotifications
@DeleteMapping("/delete-notification") public List<Long> deleteNotifications(@RequestParam List<Long> notificationId)
-
-