Interface EventApi

  • All Known Implementing Classes:
    EventApiImpl

    public interface EventApi
    API for creating, deleting and retrieving events from the platform.
    • 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
      • createAsync

        Future createAsync​(EventRepresentation event)
                    throws SDKException
        Creates event in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.
        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

        EventCollection 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

        EventCollection 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