Package com.adobe.granite.comments
Class CommentingEvent
- java.lang.Object
-
- com.adobe.granite.comments.CommentingEvent
-
public final class CommentingEvent extends java.lang.Object
TheCommentingEvent
represents events occurred during commenting
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommentingEvent.Type
types of commenting events
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EVENT_TOPIC_BASE
Base Event Topic for Commenting Events.
-
Constructor Summary
Constructors Constructor Description CommentingEvent(CommentingEvent.Type eventTopic, java.lang.String commentPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommentingEvent
commented(java.lang.String commentPath)
creates an event for Type.COMMENTEDstatic CommentingEvent
fromEvent(Event event)
convert OSGI event toCommentingEvent
java.lang.String
getCommentPath()
java.lang.String
getEventTopic()
Event
toEvent()
Create a distributable event.
-
-
-
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 toCommentingEvent
- 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.
-
-