Class NotificationsController
- java.lang.Object
-
- eu.dnetlib.uoaadmintools.controllers.NotificationsController
-
@RestController @CrossOrigin(origins="*") public class NotificationsController extends Object
Created by argirok on 6/7/2018.
-
-
Constructor Summary
Constructors Constructor Description NotificationsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteNotification(String pid)List<Notifications>getNotifications(String pid)NotificationsgetNotificationsForUser(String pid)NotificationssaveNotification(String pid, Notifications notifications)
-
-
-
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
-
-