Class ServiceNotifications
java.lang.Object
org.silverpeas.mobile.shared.services.rest.AbstractService
org.silverpeas.mobile.shared.services.rest.ServiceNotifications
Service to manage requests related to notifications.
- Author:
- svu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(List<NotificationBoxDTO> selection, RestCallback<Void> callback) Deletes a list of notifications.voidgetAllowedUsersAndGroups(String componentId, String contentId, RestCallback<List<BaseDTO>> callback) Retrieves allowed users and groups for a given component and content.voidgetUserNotifications(int callNumber, RestCallback<StreamingList<NotificationReceivedDTO>> callback) Retrieves received notifications for the current user.voidgetUserSendedNotifications(int callNumber, RestCallback<StreamingList<NotificationSendedDTO>> callback) Retrieves sent notifications for the current user.voidmarkAsRead(List<NotificationBoxDTO> selection, RestCallback<Void> callback) Marks a list of notifications as read.voidmarkAsReaden(long id, RestCallback<Void> callback) Marks a notification as read by its ID.voidsend(NotificationToSendDTO notification, RestCallback<Void> callback) Sends a notification.Methods inherited from class org.silverpeas.mobile.shared.services.rest.AbstractService
asBoolean, delete, encode, escapeJson, get, getText, initContext, mapArray, post, put, request, request, requestJson, requestText, toJsonArray
-
Constructor Details
-
ServiceNotifications
public ServiceNotifications()
-
-
Method Details
-
getAllowedUsersAndGroups
public void getAllowedUsersAndGroups(String componentId, String contentId, RestCallback<List<BaseDTO>> callback) Retrieves allowed users and groups for a given component and content.- Parameters:
componentId- The ID of the component.contentId- The ID of the content.callback- The callback to handle the response (list of BaseDTO).
-
markAsReaden
Marks a notification as read by its ID.- Parameters:
id- The ID of the notification to mark as read.callback- The callback to handle the response (no data returned).
-
markAsRead
Marks a list of notifications as read.- Parameters:
selection- The list of notifications to mark as read.callback- The callback to handle the response (no data returned).
-
delete
Deletes a list of notifications.- Parameters:
selection- The list of notifications to delete.callback- The callback to handle the response (no data returned).
-
getUserSendedNotifications
public void getUserSendedNotifications(int callNumber, RestCallback<StreamingList<NotificationSendedDTO>> callback) Retrieves sent notifications for the current user.- Parameters:
callNumber- The call number for pagination.callback- The callback to handle the response (StreamingList of NotificationSendedDTO).
-
getUserNotifications
public void getUserNotifications(int callNumber, RestCallback<StreamingList<NotificationReceivedDTO>> callback) Retrieves received notifications for the current user.- Parameters:
callNumber- The call number for pagination.callback- The callback to handle the response (StreamingList of NotificationReceivedDTO).
-