Interface EventStream


  • @Role
    @Deprecated
    public interface EventStream
    Deprecated.
    since 12.5RC1, use EventStore instead
    The stream of events, allowing to store and retrieve events.
    Since:
    3.0M2
    Version:
    $Id: 94ea740995ca2e1839bc84743bc6c739ffc198ce $
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      void addEvent​(org.xwiki.eventstream.Event e)
      Deprecated.
      since 12.3RC1, use EventStore.saveEvent(Event) instead
      default long countEvents()
      Deprecated.
      since 12.6.1, use EventStore.search(EventQuery) instead
      void deleteEvent​(org.xwiki.eventstream.Event e)
      Deprecated.
      since 12.3RC1, use EventStore.deleteEvent(String) instead
      default org.xwiki.eventstream.Event getEvent​(String eventId)
      Deprecated.
      since 12.3RC1, use EventStore.getEvent(String) instead
      org.xwiki.eventstream.EventGroup getRelatedEvents​(org.xwiki.eventstream.Event e)
      Deprecated.
      since 12.6, use EventStore.search(EventQuery) instead
      List<org.xwiki.eventstream.Event> searchEvents​(org.xwiki.query.Query query)
      Deprecated.
      since 12.5RC1, use EventStore.search(EventQuery) instead
    • Method Detail

      • addEvent

        @Deprecated
        void addEvent​(org.xwiki.eventstream.Event e)
        Deprecated.
        since 12.3RC1, use EventStore.saveEvent(Event) instead
        Add a new event to the storage.
        Parameters:
        e - the event to store
      • searchEvents

        @Deprecated
        List<org.xwiki.eventstream.Event> searchEvents​(org.xwiki.query.Query query)
                                                throws org.xwiki.query.QueryException
        Deprecated.
        since 12.5RC1, use EventStore.search(EventQuery) instead
        Search stored events. The query will be prefixed with a hardcoded select event from Event as event or equivalent stub which selects actual events from the storage, so it must start with further from or where statements.
        Parameters:
        query - a query stub
        Returns:
        the list of events matched by the query
        Throws:
        org.xwiki.query.QueryException - if the query is malformed or cannot be executed
      • getRelatedEvents

        @Deprecated
        org.xwiki.eventstream.EventGroup getRelatedEvents​(org.xwiki.eventstream.Event e)
        Deprecated.
        since 12.6, use EventStore.search(EventQuery) instead
        Retrieve the group that a given event is part of.
        Parameters:
        e - the event to search for
        Returns:
        the event's group of related events
      • deleteEvent

        @Deprecated
        void deleteEvent​(org.xwiki.eventstream.Event e)
        Deprecated.
        since 12.3RC1, use EventStore.deleteEvent(String) instead
        Delete an event from the storage. This method does not perform any rights check, it should be done before calling this method.
        Parameters:
        e - the event to delete
      • getEvent

        @Deprecated
        default org.xwiki.eventstream.Event getEvent​(String eventId)
                                              throws org.xwiki.query.QueryException
        Deprecated.
        since 12.3RC1, use EventStore.getEvent(String) instead
        Parameters:
        eventId - the unique identifier of the event
        Returns:
        the event or null if none could be found
        Throws:
        org.xwiki.query.QueryException - if failing to get the event
        Since:
        12.2, 11.10.4
      • countEvents

        @Deprecated
        default long countEvents()
                          throws org.xwiki.query.QueryException
        Deprecated.
        since 12.6.1, use EventStore.search(EventQuery) instead
        Returns:
        the total number of events in the legacy store
        Throws:
        org.xwiki.query.QueryException - when failing to query the events
        Since:
        12.6.1, 12.7RC1