@Controller
@RequestMapping(value="/api/v1/notifications")
public class JPANotificationRESTController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REQUEST_ROOT |
| Constructor and Description |
|---|
JPANotificationRESTController() |
| Modifier and Type | Method and Description |
|---|---|
org.jasig.portlet.notice.rest.AddresseeDTO |
addAddressee(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
long id,
org.jasig.portlet.notice.rest.AddresseeDTO addressee)
Create a new addressee for a notification.
|
org.jasig.portlet.notice.rest.EventDTO |
createEvent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
long notificationId,
org.jasig.portlet.notice.rest.EventDTO event)
Create a new event.
|
org.jasig.portlet.notice.rest.EntryDTO |
createNotification(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse response,
org.jasig.portlet.notice.rest.EntryDTO entry)
Create a notification.
|
org.jasig.portlet.notice.rest.AddresseeDTO |
getAddressee(javax.servlet.http.HttpServletResponse resp,
long notificationId,
long addresseeId)
Get a specific addressee
|
java.util.Set<org.jasig.portlet.notice.rest.AddresseeDTO> |
getAddressees(long id)
Get the set of addressees for a notification.
|
org.jasig.portlet.notice.rest.EventDTO |
getEvent(javax.servlet.http.HttpServletResponse response,
long notificationId,
long eventId)
Get a specific event.
|
java.util.List<org.jasig.portlet.notice.rest.EventDTO> |
getEventsByNotification(long id)
Get the list of events for a notification.
|
org.jasig.portlet.notice.rest.EntryDTO |
getNotification(javax.servlet.http.HttpServletResponse response,
long id,
boolean full)
Get 1 notification by id.
|
java.util.List<org.jasig.portlet.notice.rest.EntryDTO> |
getNotifications(java.lang.Integer page,
java.lang.Integer pageSize)
Get the list of notifications.
|
public static final java.lang.String REQUEST_ROOT
@RequestMapping(method=GET)
@ResponseBody
public java.util.List<org.jasig.portlet.notice.rest.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 org.jasig.portlet.notice.rest.EntryDTO createNotification(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse response,
@RequestBody
org.jasig.portlet.notice.rest.EntryDTO entry)
req - the Http requestresponse - the Http responseentry - The Entry@RequestMapping(value="/{notificationId}",
method=GET)
@ResponseBody
public org.jasig.portlet.notice.rest.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<org.jasig.portlet.notice.rest.AddresseeDTO> getAddressees(@PathVariable(value="notificationId")
long id)
id - the notification id@RequestMapping(value="/{notificationId}/addressees",
method=POST)
@ResponseBody
@ResponseStatus(value=CREATED)
public org.jasig.portlet.notice.rest.AddresseeDTO addAddressee(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
@PathVariable(value="notificationId")
long id,
@RequestBody
org.jasig.portlet.notice.rest.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 org.jasig.portlet.notice.rest.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<org.jasig.portlet.notice.rest.EventDTO> getEventsByNotification(@PathVariable(value="notificationId")
long id)
id - the notification id@RequestMapping(value="/{notificationId}/events/{eventId}",
method=GET)
@ResponseBody
public org.jasig.portlet.notice.rest.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 org.jasig.portlet.notice.rest.EventDTO createEvent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
@PathVariable(value="notificationId")
long notificationId,
@RequestBody
org.jasig.portlet.notice.rest.EventDTO event)
req - the Http requestresp - the Http responsenotificationId - the notification idevent - the event id