Constructor and Description |
---|
EventApiImpl(RestConnector restConnector,
UrlProcessor urlProcessor,
EventsApiRepresentation eventsApiRepresentation,
int pageSize) |
Modifier and Type | Method and Description |
---|---|
EventRepresentation |
create(EventRepresentation representation)
Creates event in the platform.
|
Future |
createAsync(EventRepresentation representation)
Creates event in the platform.
|
void |
delete(EventRepresentation event)
Deletes event from the platform.
|
void |
deleteEventsByFilter(EventFilter filter)
Deletes events from the platform based on the specified filter
|
EventRepresentation |
getEvent(com.cumulocity.model.idtype.GId eventId)
Gets event by id
|
EventCollection |
getEvents()
Gets the all the event in the platform
|
EventCollection |
getEventsByFilter(EventFilter filter)
Gets the events from the platform based on specified filter
|
EventRepresentation |
update(EventRepresentation eventRepresentation)
This update the event in the platform.
|
public EventApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, EventsApiRepresentation eventsApiRepresentation, int pageSize)
public EventRepresentation getEvent(com.cumulocity.model.idtype.GId eventId) throws SDKException
EventApi
getEvent
in interface EventApi
eventId
- id of the event to search forSDKException
- if the event is not found or if the query failedpublic EventCollection getEvents() throws SDKException
EventApi
getEvents
in interface EventApi
SDKException
- if the query failedpublic EventRepresentation create(EventRepresentation representation) throws SDKException
EventApi
create
in interface EventApi
representation
- event to be createdSDKException
- if the event could not be createdpublic Future createAsync(EventRepresentation representation) throws SDKException
EventApi
createAsync
in interface EventApi
representation
- event to be createdSDKException
- if the event could not be createdpublic void delete(EventRepresentation event) throws SDKException
EventApi
delete
in interface EventApi
event
- to be deletedSDKException
- if the event could not be deletedpublic void deleteEventsByFilter(EventFilter filter) throws IllegalArgumentException, SDKException
EventApi
deleteEventsByFilter
in interface EventApi
filter
- the filter criteria(s)IllegalArgumentException
- when null event filter providedSDKException
- if the event(s) could not be deletedpublic EventCollection getEventsByFilter(EventFilter filter) throws SDKException
EventApi
getEventsByFilter
in interface EventApi
filter
- the filter criteria(s)SDKException
- if the query failedpublic EventRepresentation update(EventRepresentation eventRepresentation) throws SDKException
EventApi
update
in interface EventApi
eventRepresentation
- event to be updatedSDKException
- if the event could not be updatedCopyright © 2020 (C) Cumulocity GmbH. All rights reserved.