Class CommentingEvent


  • public final class CommentingEvent
    extends java.lang.Object
    The CommentingEvent represents events occurred during commenting
    • Field Detail

      • EVENT_TOPIC_BASE

        public static final java.lang.String EVENT_TOPIC_BASE
        Base Event Topic for Commenting Events. EVENT_TOPIC will be formed by appending types to it.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CommentingEvent

        public CommentingEvent​(CommentingEvent.Type eventTopic,
                               java.lang.String commentPath)
    • Method Detail

      • fromEvent

        public static CommentingEvent fromEvent​(Event event)
        convert OSGI event to CommentingEvent
        Parameters:
        event - OSGI event
        Returns:
        CommentingEvent. null if it can't be converted to CommentingEvent.
      • getCommentPath

        public java.lang.String getCommentPath()
        Returns:
        the path of the comment created.
      • getEventTopic

        public java.lang.String getEventTopic()
        Returns:
        event topic of the event
      • commented

        public static CommentingEvent commented​(java.lang.String commentPath)
        creates an event for Type.COMMENTED
        Parameters:
        commentPath - path of the comment node
        Returns:
        CommentingEvent Object
      • toEvent

        public Event toEvent()
        Create a distributable event.
        Returns:
        An event.