Class NotificationsController


  • @RestController
    @CrossOrigin(origins="*")
    public class NotificationsController
    extends Object
    Created by argirok on 6/7/2018.
    • Constructor Detail

      • NotificationsController

        public NotificationsController()
    • Method Detail

      • getNotifications

        @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)")
        @RequestMapping(value="/community/{pid}/notifications/all",
                        method=GET)
        public List<Notifications> getNotifications​(@PathVariable("pid")
                                                    String pid)
                                             throws eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
        Throws:
        eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
      • getNotificationsForUser

        @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN, @AuthorizationService.curator(\'community\'), @AuthorizationService.manager(\'community\', #pid))")
        @RequestMapping(value="/community/{pid}/notifications",
                        method=GET)
        public Notifications getNotificationsForUser​(@PathVariable("pid")
                                                     String pid)
                                              throws eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
        Throws:
        eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
      • deleteNotification

        @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN, @AuthorizationService.curator(\'community\'), @AuthorizationService.manager(\'community\', #pid))")
        @RequestMapping(value="/community/{pid}/notifications",
                        method=DELETE)
        public void deleteNotification​(@PathVariable("pid")
                                       String pid)
                                throws eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
        Throws:
        eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
      • saveNotification

        @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN, @AuthorizationService.curator(\'community\'), @AuthorizationService.manager(\'community\', #pid))")
        @RequestMapping(value="/community/{pid}/notifications",
                        method=POST)
        public Notifications saveNotification​(@PathVariable("pid")
                                              String pid,
                                              @RequestBody
                                              Notifications notifications)
                                       throws eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException
        Throws:
        eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException