Class EventRestService


  • @Component("eventRestService")
    public class EventRestService
    extends OnmsRestService
    • Constructor Detail

      • EventRestService

        public EventRestService()
    • Method Detail

      • getEvent

        @Transactional
        public OnmsEvent getEvent​(java.lang.Integer eventId)

        getEvent

        Parameters:
        eventId - a String object.
        Returns:
        a OnmsEvent object.
      • getCount

        @Transactional
        public java.lang.String getCount()
        returns a plaintext string being the number of events
        Returns:
        a String object.
      • getEvents

        @Transactional
        public OnmsEventCollection getEvents​(@Context
                                             javax.ws.rs.core.UriInfo uriInfo)
                                      throws java.text.ParseException
        Returns all the events which match the filter/query in the query parameters
        Returns:
        Collection of OnmsEventCollection (ready to be XML-ified)
        Throws:
        java.text.ParseException - if any.
      • getEventsBetween

        @Transactional
        public OnmsEventCollection getEventsBetween​(@Context
                                                    javax.ws.rs.core.UriInfo uriInfo)
                                             throws java.text.ParseException
        Returns all the events which match the filter/query in the query parameters
        Returns:
        Collection of OnmsEventCollection (ready to be XML-ified)
        Throws:
        java.text.ParseException - if any.
      • updateEvent

        @Transactional
        public javax.ws.rs.core.Response updateEvent​(@Context
                                                     javax.ws.rs.core.SecurityContext securityContext,
                                                     java.lang.Integer eventId,
                                                     java.lang.Boolean ack)
        Updates the event with id "eventid" If the "ack" parameter is "true", then acks the events as the current logged in user, otherwise unacks the events
        Parameters:
        eventId - a Integer object.
        ack - a Boolean object.
      • updateEvents

        @Transactional
        public javax.ws.rs.core.Response updateEvents​(@Context
                                                      javax.ws.rs.core.SecurityContext securityContext,
                                                      MultivaluedMapImpl formProperties)
        Updates all the events that match any filter/query supplied in the form. If the "ack" parameter is "true", then acks the events as the current logged in user, otherwise unacks the events
        Parameters:
        formProperties - Map of the parameters passed in by form encoding
      • publishEvent

        @Transactional
        public javax.ws.rs.core.Response publishEvent​(Event event)