org.opennms.web.rest
Class EventRestService

java.lang.Object
  extended by org.opennms.web.rest.OnmsRestService
      extended by org.opennms.web.rest.EventRestService

@Component
@PerRequest
@Scope(value="prototype")
public class EventRestService
extends OnmsRestService


Nested Class Summary
 
Nested classes/interfaces inherited from class org.opennms.web.rest.OnmsRestService
OnmsRestService.ComparisonOperation
 
Constructor Summary
EventRestService()
           
 
Method Summary
 String getCount()
          returns a plaintext string being the number of events
 OnmsEvent getEvent(String eventId)
           
 OnmsEventCollection getEvents()
          Returns all the events which match the filter/query in the query parameters
 void updateEvent(String eventId, 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
 void updateEvents(MultivaluedMapImpl formProperties)
          Updates all the events that match any filter/query supplied in the form.
 
Methods inherited from class org.opennms.web.rest.OnmsRestService
addFiltersToCriteria, addOrdering, convertNameToPropertyName, log, setLimitOffset, setLimitOffset, setProperties, throwException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventRestService

public EventRestService()
Method Detail

getEvent

@Transactional
public OnmsEvent getEvent(String eventId)

getCount

@Transactional
public String getCount()
returns a plaintext string being the number of events

Returns:

getEvents

@Transactional
public OnmsEventCollection getEvents()
                              throws ParseException
Returns all the events which match the filter/query in the query parameters

Returns:
Collection of OnmsEvents (ready to be XML-ified)
Throws:
ParseException

updateEvent

@Transactional
public void updateEvent(String eventId,
                                      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


updateEvents

@Transactional
public void updateEvents(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


Copyright © 2009. All Rights Reserved.