Class NotificationController


  • @Controller
    @RequestMapping("/")
    public class NotificationController
    extends AbstractController
    • Constructor Detail

      • NotificationController

        public NotificationController()
    • Method Detail

      • createNotification

        @RequestMapping(value="/notifications/createNotification",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLNotification> createNotification​(javax.servlet.http.HttpServletRequest request,
                                                               @RequestBody
                                                               JsonRequest<org.acumos.cds.domain.MLPNotification> mlpNotification,
                                                               javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        mlpNotification - Notification
        response - HttpServletResponse
        Returns:
        Notification
      • getNotifications

        @RequestMapping(value="/notifications/notifications",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLNotification>> getNotifications()
        Returns:
        List of notifications
      • getUserNotifications

        @RequestMapping(value="/notifications/{userId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<org.acumos.cds.domain.MLPUserNotification>> getUserNotifications​(javax.servlet.http.HttpServletRequest request,
                                                                                                  @PathVariable("userId")
                                                                                                  String userId,
                                                                                                  @RequestBody
                                                                                                  JsonRequest<org.acumos.cds.transport.RestPageRequest> restPageReq,
                                                                                                  javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        userId - userId
        restPageReq - rest page request
        response - HttpServletResponse
        Returns:
        List of notifications
      • addNotificationUser

        @RequestMapping(value="/notifications/create/{notificationId}/user/{userId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLNotification>> addNotificationUser​(javax.servlet.http.HttpServletRequest request,
                                                                      @PathVariable("notificationId")
                                                                      String notificationId,
                                                                      @PathVariable("userId")
                                                                      String userId,
                                                                      javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        notificationId - notification ID
        userId - user Id
        response - HttpServletResponse
        Returns:
        List of notification
      • dropNotificationUser

        @RequestMapping(value="/notifications/drop/{notificationId}/user/{userId}",
                        method=DELETE,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLNotification>> dropNotificationUser​(javax.servlet.http.HttpServletRequest request,
                                                                       @PathVariable("notificationId")
                                                                       String notificationId,
                                                                       @PathVariable("userId")
                                                                       String userId,
                                                                       javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        notificationId - notification ID
        userId - user ID
        response - HttpServletResponse
        Returns:
        List of notification
      • setNotificationUserViewed

        @RequestMapping(value="/notifications/view/{notificationId}/user/{userId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLNotification>> setNotificationUserViewed​(javax.servlet.http.HttpServletRequest request,
                                                                            @PathVariable("notificationId")
                                                                            String notificationId,
                                                                            @PathVariable("userId")
                                                                            String userId,
                                                                            javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        notificationId - notification ID
        userId - user ID
        response - HttpServletResponse
        Returns:
        List of notification
      • deleteNotification

        @RequestMapping(value="/notifications/delete/{notificationId}",
                        method=DELETE,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLNotification>> deleteNotification​(javax.servlet.http.HttpServletRequest request,
                                                                     @PathVariable("notificationId")
                                                                     String notificationId,
                                                                     javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        notificationId - notification ID
        response - HttpServletResponse
        Returns:
        List of notification
      • getNotificationCount

        @RequestMapping(value="/notifications/count",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLNotification> getNotificationCount()
        Returns:
        Notification count
      • getUserNotifPrefByUserId

        @RequestMapping(value="/notifications/pref/byUserId/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLUserNotifPref>> getUserNotifPrefByUserId​(javax.servlet.http.HttpServletRequest request,
                                                                            @PathVariable("userId")
                                                                            String userId,
                                                                            javax.servlet.http.HttpServletResponse response)
      • createUserNotificationPreference

        @RequestMapping(value="/notifications/pref/create",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLUserNotifPref> createUserNotificationPreference​(javax.servlet.http.HttpServletRequest request,
                                                                              @RequestBody
                                                                              JsonRequest<MLUserNotifPref> mlNotificationPref,
                                                                              javax.servlet.http.HttpServletResponse response)
      • updateUserNotificationPreference

        @RequestMapping(value="/notifications/pref/update",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLUserNotifPref> updateUserNotificationPreference​(javax.servlet.http.HttpServletRequest request,
                                                                              @RequestBody
                                                                              JsonRequest<MLUserNotifPref> mlNotificationPref,
                                                                              javax.servlet.http.HttpServletResponse response)
      • sendUserNotification

        @RequestMapping(value="/notifications/sendUserNotification",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> sendUserNotification​(javax.servlet.http.HttpServletRequest request,
                                                         @RequestBody
                                                         JsonRequest<NotificationRequestObject> mlNotification,
                                                         javax.servlet.http.HttpServletResponse response)
      • getUnreadNotificationCount

        @RequestMapping(value="/unreadnotifications/count/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLNotification> getUnreadNotificationCount​(javax.servlet.http.HttpServletRequest request,
                                                                       @PathVariable("userId")
                                                                       String userId,
                                                                       javax.servlet.http.HttpServletResponse response)
      • getUserNotificationsPagination

        @RequestMapping(value="/notifications/pagination/{userId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.transport.RestPageResponse<org.acumos.cds.domain.MLPUserNotification>> getUserNotificationsPagination​(javax.servlet.http.HttpServletRequest request,
                                                                                                                                                 @PathVariable("userId")
                                                                                                                                                 String userId,
                                                                                                                                                 @RequestBody
                                                                                                                                                 JsonRequest<org.acumos.cds.transport.RestPageRequest> restPageReq,
                                                                                                                                                 javax.servlet.http.HttpServletResponse response)