Class NotificationResource

java.lang.Object
com.reallifedeveloper.common.resource.BaseResource
com.reallifedeveloper.common.resource.notification.NotificationResource

@Path("/notifications") @Produces({"application/json","application/xml"}) public final class NotificationResource extends BaseResource
A JAX-RS resource to give access to Notifications in the form of a NotificationLog.
Author:
RealLifeDeveloper
  • Field Details

  • Constructor Details

  • Method Details

    • getCurrentNotificationLog

      @GET public jakarta.ws.rs.core.Response getCurrentNotificationLog(@Context jakarta.ws.rs.core.UriInfo uriInfo)
      Gives the most recent notifications.
      Parameters:
      uriInfo - provides access to application and request URI information, injected by JAX-RS
      Returns:
      a Response containing a NotificationLogRepresentation
    • getNotificationLog

      @GET @Path("{notificationLogId}") public jakarta.ws.rs.core.Response getNotificationLog(@PathParam("notificationLogId") String notificationLogIdString, @Context jakarta.ws.rs.core.UriInfo uriInfo)
      Gives a specific set of notifications.

      The notifications are identified by their stored event IDs. As an argument, you provide the ID of the first and the last notification you are interested in, in the form "<low>,<high>" where <low> is the ID of the first notification, and <high> is the ID of the last notification.

      For example, given the string "89661,89680", this method will return the notifications with IDs between 89661 and 89680, inclusive, if available.

      Parameters:
      notificationLogIdString - a string on the form "<low>,<high>"
      uriInfo - provides access to application and request URI information, injected by JAX-RS
      Returns:
      a Response containing a NotificationLogRepresentation