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
 
Field Summary
 
Fields inherited from class org.opennms.web.rest.OnmsRestService
DEFAULT_LIMIT
 
Constructor Summary
EventRestService()
           
 
Method Summary
 String getCount()
          returns a plaintext string being the number of events
 OnmsEvent getEvent(String eventId)
          getEvent
 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, addOrdering, convertNameToPropertyName, getDistinctIdCriteria, getException, getException, log, setLimitOffset, setLimitOffset, setLimitOffset, setProperties
 
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)

getEvent

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

getCount

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

Returns:
a String object.

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 - if any.

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

Parameters:
eventId - a String object.
ack - a Boolean object.

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 © 2011. All Rights Reserved.