Package com.cumulocity.sdk.client.event
Class EventApiImpl
java.lang.Object
com.cumulocity.sdk.client.event.EventApiImpl
- All Implemented Interfaces:
EventApi
-
Constructor Summary
ConstructorsConstructorDescriptionEventApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, EventsApiRepresentation eventsApiRepresentation, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptioncreate(EventRepresentation representation) Creates event in the platform.createAsync(EventRepresentation representation) Creates event in the platform.voiddelete(EventRepresentation event) Deletes event from the platform.voiddeleteEventsByFilter(EventFilter filter) Deletes events from the platform based on the specified filterGets event by idGets the all the event in the platformgetEventsByFilter(EventFilter filter) Gets the events from the platform based on specified filterupdate(EventRepresentation eventRepresentation) This update the event in the platform.
-
Constructor Details
-
EventApiImpl
public EventApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, EventsApiRepresentation eventsApiRepresentation, int pageSize)
-
-
Method Details
-
getEvent
Description copied from interface:EventApiGets event by id- Specified by:
getEventin interfaceEventApi- Parameters:
eventId- id of the event to search for- Returns:
- the event with the given id
- Throws:
SDKException- if the event is not found or if the query failed
-
getEvents
Description copied from interface:EventApiGets the all the event in the platform- Specified by:
getEventsin interfaceEventApi- Returns:
- collection of events with paging functionality
- Throws:
SDKException- if the query failed
-
create
Description copied from interface:EventApiCreates event in the platform. The id of the event must not be set, since it will be generated by the platform- Specified by:
createin interfaceEventApi- Parameters:
representation- event to be created- Returns:
- the created event with the generated id
- Throws:
SDKException- if the event could not be created
-
createAsync
Description copied from interface:EventApiCreates event in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.- Specified by:
createAsyncin interfaceEventApi- Parameters:
representation- event to be created- Returns:
- the created event with the generated id
- Throws:
SDKException- if the event could not be created
-
delete
Description copied from interface:EventApiDeletes event from the platform. The event to be deleted is identified by the id within the given event.- Specified by:
deletein interfaceEventApi- Parameters:
event- to be deleted- Throws:
SDKException- if the event could not be deleted
-
deleteEventsByFilter
Description copied from interface:EventApiDeletes events from the platform based on the specified filter- Specified by:
deleteEventsByFilterin interfaceEventApi- Parameters:
filter- the filter criteria(s)- Throws:
IllegalArgumentException- when null event filter providedSDKException- if the event(s) could not be deleted
-
getEventsByFilter
Description copied from interface:EventApiGets the events from the platform based on specified filter- Specified by:
getEventsByFilterin interfaceEventApi- Parameters:
filter- the filter criteria(s)- Returns:
- collection of events matched by the filter with paging functionality
- Throws:
SDKException- if the query failed
-
update
Description copied from interface:EventApiThis update the event in the platform. Cannot update the ID.- Specified by:
updatein interfaceEventApi- Parameters:
eventRepresentation- event to be updated- Returns:
- The created event
- Throws:
SDKException- if the event could not be updated
-