Class ServiceNotifications

java.lang.Object
org.silverpeas.mobile.shared.services.rest.AbstractService
org.silverpeas.mobile.shared.services.rest.ServiceNotifications

public class ServiceNotifications extends AbstractService
Service to manage requests related to notifications.
Author:
svu
  • 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

      public void markAsReaden(long id, RestCallback<Void> callback)
      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

      public void markAsRead(List<NotificationBoxDTO> selection, RestCallback<Void> callback)
      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

      public void delete(List<NotificationBoxDTO> selection, RestCallback<Void> callback)
      Deletes a list of notifications.
      Parameters:
      selection - The list of notifications to delete.
      callback - The callback to handle the response (no data returned).
    • send

      public void send(NotificationToSendDTO notification, RestCallback<Void> callback)
      Sends a notification.
      Parameters:
      notification - The notification to send.
      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).