Class EventImpl

  • All Implemented Interfaces:
    java.io.Serializable, Event

    public class EventImpl
    extends java.lang.Object
    implements Event, java.io.Serializable
    EventImpl implements a serializable SPI Event.
    See Also:
    Serialized Form
    • Constructor Detail

      • EventImpl

        public EventImpl​(int type,
                         Path path,
                         ItemId itemId,
                         NodeId parentId,
                         Name primaryNodeTypeName,
                         Name[] mixinTypeNames,
                         java.lang.String userId)
        Deprecated.
        Creates a new serializable event.
      • EventImpl

        public EventImpl​(int type,
                         Path path,
                         ItemId itemId,
                         NodeId parentId,
                         Name primaryNodeTypeName,
                         Name[] mixinTypeNames,
                         java.lang.String userId,
                         java.lang.String userData,
                         long timestamp,
                         java.util.Map<Name,​QValue> info)
        Creates a new serializable event.
    • Method Detail

      • getPath

        public Path getPath()
        Specified by:
        getPath in interface Event
        Returns:
        the path of the affected item. E.g. the added/removed node or the property that was added/removed/changed.
      • getItemId

        public ItemId getItemId()
        Specified by:
        getItemId in interface Event
        Returns:
        the id of the affected item.
      • getParentId

        public NodeId getParentId()
        Specified by:
        getParentId in interface Event
        Returns:
        the id of the parent node of the affected item.
      • getPrimaryNodeTypeName

        public Name getPrimaryNodeTypeName()
        Specified by:
        getPrimaryNodeTypeName in interface Event
        Returns:
        the name of the primary node type of the 'associated' node of this event.
        See Also:
        ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean)
      • getMixinTypeNames

        public Name[] getMixinTypeNames()
        Specified by:
        getMixinTypeNames in interface Event
        Returns:
        the names of the mixin types of the 'associated' node of this event.
        See Also:
        ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean)
      • getUserID

        public java.lang.String getUserID()
        Returns the user ID connected with this event. This is the string returned by getUserID of the session that caused the event.
        Specified by:
        getUserID in interface Event
        Returns:
        a String.
      • getInfo

        public java.util.Map<Name,​QValue> getInfo()
                                                 throws javax.jcr.RepositoryException
        Returns the information map associated with this event.
        Specified by:
        getInfo in interface Event
        Returns:
        A Map containing parameter information.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        Event.getInfo()
      • getUserData

        public java.lang.String getUserData()
        Returns the user data.
        Specified by:
        getUserData in interface Event
        Returns:
        the user data
        See Also:
        Event.getUserData()
      • getDate

        public long getDate()
                     throws javax.jcr.RepositoryException
        Returns the date when the change was persisted that caused this event.
        Specified by:
        getDate in interface Event
        Returns:
        the date when the change was persisted that caused this event.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        Event.getDate()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object