Package com.adobe.granite.comments
Class CommentingEvent
- java.lang.Object
-
- com.adobe.granite.comments.CommentingEvent
-
public final class CommentingEvent extends 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 String
EVENT_TOPIC_BASE
Base Event Topic for Commenting Events.
-
Constructor Summary
Constructors Constructor Description CommentingEvent(CommentingEvent.Type eventTopic, String commentPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommentingEvent
commented(String commentPath)
creates an event for Type.COMMENTEDstatic CommentingEvent
fromEvent(Event event)
convert OSGI event toCommentingEvent
String
getCommentPath()
String
getEventTopic()
Event
toEvent()
Create a distributable event.
-
-
-
Field Detail
-
EVENT_TOPIC_BASE
public static final 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, 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 String getCommentPath()
- Returns:
- the path of the comment created.
-
getEventTopic
public String getEventTopic()
- Returns:
- event topic of the event
-
commented
public static CommentingEvent commented(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.
-
-