|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.mywork.host.rest.NotificationResource
public class NotificationResource
This class provides a REST interface for NotificationService
| Constructor Summary | |
|---|---|
NotificationResource(ClientService clientService,
LocalNotificationService notificationService,
com.atlassian.sal.api.user.UserManager userManager,
UserService userMappingService)
|
|
| Method Summary | |
|---|---|
javax.ws.rs.core.Response |
createOrUpdate(javax.servlet.http.HttpServletRequest request,
Notification notification,
java.lang.String bypass)
Creates or updates a notification. |
javax.ws.rs.core.Response |
delete(javax.servlet.http.HttpServletRequest request,
long id)
Deletes a notification permanently. |
javax.ws.rs.core.Response |
findById(javax.servlet.http.HttpServletRequest request,
long id)
Retrieve a specific notification. |
javax.ws.rs.core.Response |
findByUser(javax.servlet.http.HttpServletRequest request,
long after,
long before,
int limit,
java.lang.String bypass)
Retrieve a list of notifications as a flat list. |
javax.ws.rs.core.Response |
findByUserNested(javax.servlet.http.HttpServletRequest request,
long after,
long before,
int limit)
Retrieve a list of nested notifications, aggregated by their groupingId. |
javax.ws.rs.core.Response |
setRead(javax.servlet.http.HttpServletRequest request,
java.util.List<java.lang.Long> notificationId)
Marks a list of notifications as read. |
javax.ws.rs.core.Response |
setRead(javax.servlet.http.HttpServletRequest request,
java.lang.Long notificationId)
Set the id of the last notification that has been seen. |
javax.ws.rs.core.Response |
setStatus(javax.servlet.http.HttpServletRequest request,
long id,
Status status)
Changes the status of a notification. |
javax.ws.rs.core.Response |
updateMetadata(javax.servlet.http.HttpServletRequest request,
UpdateMetadata metadata)
Updates the metadata for any notification with a given globalId (and matching the provided condition). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationResource(ClientService clientService,
LocalNotificationService notificationService,
com.atlassian.sal.api.user.UserManager userManager,
UserService userMappingService)
| Method Detail |
|---|
public javax.ws.rs.core.Response findByUser(@Context
javax.servlet.http.HttpServletRequest request,
long after,
long before,
int limit,
java.lang.String bypass)
after - Optional notification id for returning only notifications created after the specified notification. This can be used to reduce both network traffic and seek time.before - Optional notification id for returning only notifications created before the specified notification.
This can be used to reduce both network traffic and seek time.limit - Number of results to return, defaults to DEFAULT_LIMIT.bypass - Optional username for allowing administrators to find notifications on behalf of other users.
public javax.ws.rs.core.Response findByUserNested(@Context
javax.servlet.http.HttpServletRequest request,
long after,
long before,
int limit)
after - Optional notification id for returning only notifications created after the specified notification. This can be used to reduce both network traffic and seek time.before - Optional notification id returning only notifications created before the specified notification.
This can be used to reduce both network traffic and seek time.limit - Number of results to return, defaults to DEFAULT_LIMIT.
public javax.ws.rs.core.Response findById(@Context
javax.servlet.http.HttpServletRequest request,
long id)
id - Notification id
public javax.ws.rs.core.Response createOrUpdate(@Context
javax.servlet.http.HttpServletRequest request,
Notification notification,
java.lang.String bypass)
throws java.lang.Exception
bypass - Optional username for allowing administrators to create notifications on behalf of other users.
java.lang.Exception
public javax.ws.rs.core.Response delete(@Context
javax.servlet.http.HttpServletRequest request,
long id)
id - Notification id
public javax.ws.rs.core.Response setRead(@Context
javax.servlet.http.HttpServletRequest request,
java.lang.Long notificationId)
Note that this distinct from the number of notifications that are "unread", which must be marked individually.
public javax.ws.rs.core.Response setRead(@Context
javax.servlet.http.HttpServletRequest request,
java.util.List<java.lang.Long> notificationId)
public javax.ws.rs.core.Response setStatus(@Context
javax.servlet.http.HttpServletRequest request,
long id,
Status status)
Status.TODO this will
result in a new task being created.
id - Notification that is being updated.
public javax.ws.rs.core.Response updateMetadata(@Context
javax.servlet.http.HttpServletRequest request,
UpdateMetadata metadata)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||