com.cumulocity.sdk.client.event
Interface EventApi

All Known Implementing Classes:
EventApiImpl

public interface EventApi

API for creating, deleting and retrieving events from the platform.


Method Summary
 EventRepresentation create(EventRepresentation event)
          Creates event in the platform.
 void delete(EventRepresentation event)
          Deletes event from the platform.
 EventRepresentation getEvent(GId gid)
          Gets event by id
 PagedCollectionResource<EventCollectionRepresentation> getEvents()
          Gets the all the event in the platform
 PagedCollectionResource<EventCollectionRepresentation> getEventsByFilter(EventFilter filter)
          Gets the events from the platform based on specified filter
 

Method Detail

getEvent

EventRepresentation getEvent(GId gid)
                             throws SDKException
Gets event by id

Parameters:
gid - 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

create

EventRepresentation create(EventRepresentation event)
                           throws SDKException
Creates event in the platform. The id of the event must not be set, since it will be generated by the platform

Parameters:
event - event to be created
Returns:
the created event with the generated id
Throws:
SDKException - if the event could not be created

delete

void delete(EventRepresentation event)
            throws SDKException
Deletes event from the platform. The event to be deleted is identified by the id within the given event.

Parameters:
event - to be deleted
Throws:
SDKException - if the event could not be deleted

getEvents

PagedCollectionResource<EventCollectionRepresentation> getEvents()
                                                                 throws SDKException
Gets the all the event in the platform

Returns:
collection of events with paging functionality
Throws:
SDKException - if the query failed

getEventsByFilter

PagedCollectionResource<EventCollectionRepresentation> getEventsByFilter(EventFilter filter)
                                                                         throws SDKException
Gets the events from the platform based on specified filter

Parameters:
filter - the filter criteria(s)
Returns:
collection of events matched by the filter with paging functionality
Throws:
SDKException - if the query failed


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.