@Controller
@RequestMapping(value="/v1/notifications")
public class JPANotificationRESTController
extends java.lang.Object
| Constructor and Description |
|---|
JPANotificationRESTController() |
| Modifier and Type | Method and Description |
|---|---|
AddresseeDTO |
addAddressee(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
long id,
AddresseeDTO addressee)
Create a new addressee for a notification.
|
EventDTO |
createEvent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
long notificationId,
EventDTO event)
Create a new event.
|
EntryDTO |
createNotification(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse response,
EntryDTO entry)
Create a notification.
|
AddresseeDTO |
getAddressee(javax.servlet.http.HttpServletResponse resp,
long notificationId,
long addresseeId)
Get a specific addressee
|
java.util.Set<AddresseeDTO> |
getAddressees(long id)
Get the set of addressees for a notification.
|
EventDTO |
getEvent(javax.servlet.http.HttpServletResponse response,
long notificationId,
long eventId)
Get a specific event.
|
java.util.List<EventDTO> |
getEventsByNotification(long id)
Get the list of events for a notification.
|
EntryDTO |
getNotification(javax.servlet.http.HttpServletResponse response,
long id,
boolean full)
Get 1 notification by id.
|
java.util.List<EntryDTO> |
getNotifications(java.lang.Integer page,
java.lang.Integer pageSize)
Get the list of notifications.
|
@RequestMapping(method=GET) @ResponseBody public java.util.List<EntryDTO> getNotifications(@RequestParam(value="page",required=false) java.lang.Integer page, @RequestParam(value="pageSize",required=false) java.lang.Integer pageSize)
page - The 0 based page numberpageSize - the page size@RequestMapping(method=POST) @ResponseStatus(value=CREATED) @ResponseBody public EntryDTO createNotification(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse response, @RequestBody EntryDTO entry)
req - the Http requestresponse - the Http responseentry - The Entry@RequestMapping(value="/{notificationId}",
method=GET)
@ResponseBody
public EntryDTO getNotification(javax.servlet.http.HttpServletResponse response,
@PathVariable(value="notificationId")
long id,
@RequestParam(value="full",required=false,defaultValue="false")
boolean full)
response - the Http responseid - the id of the notificationfull - optionally fetch addressee info. If false, addressee info will be omitted.@RequestMapping(value="/{notificationId}/addressees",
method=GET)
@ResponseBody
public java.util.Set<AddresseeDTO> getAddressees(@PathVariable(value="notificationId")
long id)
id - the notification id@RequestMapping(value="/{notificationId}/addressees",
method=POST)
@ResponseBody
@ResponseStatus(value=CREATED)
public AddresseeDTO addAddressee(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
@PathVariable(value="notificationId")
long id,
@RequestBody
AddresseeDTO addressee)
req - the Http requestresp - the Http responseid - the notification idaddressee - the list of addressees@RequestMapping(value="/{notificationId}/addressees/{addresseeId}",
method=GET)
@ResponseBody
public AddresseeDTO getAddressee(javax.servlet.http.HttpServletResponse resp,
@PathVariable(value="notificationId")
long notificationId,
@PathVariable(value="addresseeId")
long addresseeId)
resp - the Http ResponsenotificationId - the notification idaddresseeId - the addressee id@RequestMapping(value="/{notificationId}/events",
method=GET)
@ResponseBody
public java.util.List<EventDTO> getEventsByNotification(@PathVariable(value="notificationId")
long id)
id - the notification id@RequestMapping(value="/{notificationId}/events/{eventId}",
method=GET)
@ResponseBody
public EventDTO getEvent(javax.servlet.http.HttpServletResponse response,
@PathVariable(value="notificationId")
long notificationId,
@PathVariable(value="eventId")
long eventId)
response - The Http responsenotificationId - the notification ideventId - the event id@RequestMapping(value="/{notificationId}/events",
method=POST)
@ResponseStatus(value=CREATED)
@ResponseBody
public EventDTO createEvent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
@PathVariable(value="notificationId")
long notificationId,
@RequestBody
EventDTO event)
req - the Http requestresp - the Http responsenotificationId - the notification idevent - the event idCopyright © 2018 Jasig. All Rights Reserved.