com.cumulocity.sdk.client.event
Class EventApiImpl

java.lang.Object
  extended by com.cumulocity.sdk.client.event.EventApiImpl
All Implemented Interfaces:
EventApi

public class EventApiImpl
extends Object
implements EventApi


Constructor Summary
EventApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformApiUrl)
          Deprecated. 
EventApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformApiUrl, int pageSize)
           
 
Method Summary
 EventRepresentation create(EventRepresentation representation)
          Creates event in the platform.
 void delete(EventRepresentation event)
          Deletes event from the platform.
 EventRepresentation getEvent(GId eventId)
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventApiImpl

@Deprecated
public EventApiImpl(RestConnector restConnector,
                               TemplateUrlParser templateUrlParser,
                               String platformApiUrl)
Deprecated. 


EventApiImpl

public EventApiImpl(RestConnector restConnector,
                    TemplateUrlParser templateUrlParser,
                    String platformApiUrl,
                    int pageSize)
Method Detail

getEvent

public EventRepresentation getEvent(GId eventId)
                             throws SDKException
Description copied from interface: EventApi
Gets event by id

Specified by:
getEvent in interface EventApi
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

public PagedCollectionResource<EventCollectionRepresentation> getEvents()
                                                                 throws SDKException
Description copied from interface: EventApi
Gets the all the event in the platform

Specified by:
getEvents in interface EventApi
Returns:
collection of events with paging functionality
Throws:
SDKException - if the query failed

create

public EventRepresentation create(EventRepresentation representation)
                           throws SDKException
Description copied from interface: EventApi
Creates event in the platform. The id of the event must not be set, since it will be generated by the platform

Specified by:
create in interface EventApi
Parameters:
representation - event to be created
Returns:
the created event with the generated id
Throws:
SDKException - if the event could not be created

delete

public void delete(EventRepresentation event)
            throws SDKException
Description copied from interface: EventApi
Deletes event from the platform. The event to be deleted is identified by the id within the given event.

Specified by:
delete in interface EventApi
Parameters:
event - to be deleted
Throws:
SDKException - if the event could not be deleted

getEventsByFilter

public PagedCollectionResource<EventCollectionRepresentation> getEventsByFilter(EventFilter filter)
                                                                         throws SDKException
Description copied from interface: EventApi
Gets the events from the platform based on specified filter

Specified by:
getEventsByFilter in interface EventApi
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.