Class NotificationRestService


  • @Component("notificationRestService")
    @Path("notifications")
    public class NotificationRestService
    extends OnmsRestService

    NotificationRestService class.

    Since:
    1.8.1
    Version:
    $Id: $
    Author:
    ranger
    • Constructor Detail

      • NotificationRestService

        public NotificationRestService()
    • Method Detail

      • getNotification

        @GET
        @Produces({"application/xml","application/json"})
        @Path("{notifId}")
        @Transactional
        public OnmsNotification getNotification​(@PathParam("notifId")
                                                Integer notifId)

        getNotification

        Parameters:
        notifId - a String object.
        Returns:
        a OnmsNotification object.
      • getCount

        @GET
        @Produces("text/plain")
        @Path("count")
        @Transactional
        public String getCount()

        getCount

        Returns:
        a String object.
      • getInfo

        @GET
        @Path("summary")
        @Produces("application/json")
        public NotificationSummary getInfo​(@Context
                                           javax.ws.rs.core.SecurityContext securityContext)
      • getNotifications

        @GET
        @Path("")
        @Produces({"application/xml","application/json"})
        @Transactional
        public OnmsNotificationCollection getNotifications​(@Context
                                                           javax.ws.rs.core.UriInfo uriInfo)

        getNotifications

        Returns:
        a OnmsNotificationCollection object.
      • updateNotification

        @PUT
        @Path("{notifId}")
        @Consumes("application/x-www-form-urlencoded")
        @Transactional
        public javax.ws.rs.core.Response updateNotification​(@Context
                                                            javax.ws.rs.core.SecurityContext securityContext,
                                                            @PathParam("notifId")
                                                            Integer notifId,
                                                            @FormParam("ack")
                                                            Boolean ack)

        updateNotification

        Parameters:
        notifId - a String object.
        ack - a Boolean object.
      • updateNotifications

        @PUT
        @Consumes("application/x-www-form-urlencoded")
        @Transactional
        public javax.ws.rs.core.Response updateNotifications​(@Context
                                                             javax.ws.rs.core.SecurityContext securityContext,
                                                             MultivaluedMapImpl params)

        updateNotifications

        Parameters:
        params - a MultivaluedMapImpl object.