Class EventStateCollection

    • Method Detail

      • createEventStates

        public void createEventStates​(NodeId rootNodeId,
                                      ChangeLog changes,
                                      ItemStateManager stateMgr)
                               throws ItemStateException
        Creates EventState instances from ItemState changes.
        Parameters:
        rootNodeId - the id of the root node.
        changes - the changes on ItemStates.
        stateMgr - an ItemStateManager to provide ItemState of items that are not contained in the changes collection.
        Throws:
        ItemStateException - if an error occurs while creating events states for the item state changes.
      • addAll

        public void addAll​(Collection<EventState> c)
        Adds all event states in the given collection to this collection
        Parameters:
        c -
      • prepare

        public void prepare()
        Prepares already added events for dispatching.
      • prepareDeleted

        public void prepareDeleted​(ChangeLog changes)
        Prepares deleted items from changes.
        Parameters:
        changes - the changes to prepare.
      • dispatch

        public void dispatch()
        Dispatches the events to the EventListeners.
      • getTimestamp

        public long getTimestamp()
        Returns:
        the timestamp when this collection was created.
      • setTimestamp

        public void setTimestamp​(long timestamp)
        Sets a new timestamp for this collection.
        Parameters:
        timestamp - the new timestamp value.
      • getEvents

        public List<EventState> getEvents()
        Return the list of events.
        Returns:
        list of events
      • size

        public int size()
        Get the number of events.
        Returns:
        the size
      • getSession

        public SessionImpl getSession()
        Return the session who is the origin of this events.
        Returns:
        event source
      • getUserData

        public String getUserData()
        Returns:
        the user data attached to this event state collection.
      • setUserData

        public void setUserData​(String userData)
        Sets the user data for this event state collection.
        Parameters:
        userData - the user data.
      • getCommonPath

        public String getCommonPath()
        Get the longest common path of all event state paths.
        Returns:
        the longest common path