Package org.opennms.web.rest.v1
Class EventRestService
- java.lang.Object
-
- org.opennms.web.rest.v1.OnmsRestService
-
- org.opennms.web.rest.v1.EventRestService
-
@Component("eventRestService") public class EventRestService extends OnmsRestService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.web.rest.v1.OnmsRestService
OnmsRestService.ComparisonOperation
-
-
Field Summary
-
Fields inherited from class org.opennms.web.rest.v1.OnmsRestService
DEFAULT_LIMIT
-
-
Constructor Summary
Constructors Constructor Description EventRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCount()
returns a plaintext string being the number of eventsOnmsEvent
getEvent(java.lang.Integer eventId)
getEventOnmsEventCollection
getEvents(javax.ws.rs.core.UriInfo uriInfo)
Returns all the events which match the filter/query in the query parametersOnmsEventCollection
getEventsBetween(javax.ws.rs.core.UriInfo uriInfo)
Returns all the events which match the filter/query in the query parametersjavax.ws.rs.core.Response
publishEvent(Event event)
javax.ws.rs.core.Response
updateEvent(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 eventsjavax.ws.rs.core.Response
updateEvents(javax.ws.rs.core.SecurityContext securityContext, MultivaluedMapImpl formProperties)
Updates all the events that match any filter/query supplied in the form.-
Methods inherited from class org.opennms.web.rest.v1.OnmsRestService
applyQueryFilters, applyQueryFilters, getBadRequestResponse, getBeanWrapperForClass, getException, getException, getNumericValue, getRedirectUri, readLock, readUnlock, removeParameter, removeParameter, setProperties, writeLock, writeUnlock
-
-
-
-
Method Detail
-
getEvent
@Transactional public OnmsEvent getEvent(java.lang.Integer eventId)
getEvent
- Parameters:
eventId
- aString
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
- aInteger
object.ack
- aBoolean
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)
-
-