public class DiscussionDetailsRetriever extends Object implements EventListener<DiscussionChangedEvent>
| Constructor and Description |
|---|
DiscussionDetailsRetriever(NoteDao noteDao)
Creates a new instance of the retriever
|
| Modifier and Type | Method and Description |
|---|---|
List<SimpleNoteListItem> |
getCommentsInDiscussion(Long discussionId,
User user)
Returns the notes in a discussion.
|
int |
getDiscussionNoteCount(Long discussionId,
User user)
Returns the number of notes in a discussion.
|
Class<DiscussionChangedEvent> |
getObservedEvent()
Defines the types of events about which this listener will be informed.
|
int |
getReplyCount(Note note)
Returns the number of replies to a note.
|
void |
handle(DiscussionChangedEvent event)
Is called by the
EventDispatcher when the observed event was fired. |
public DiscussionDetailsRetriever(NoteDao noteDao)
noteDao - the note DAOpublic List<SimpleNoteListItem> getCommentsInDiscussion(Long discussionId, User user)
discussionId - the ID of the discussion for which the notes should be returneduser - the user to test for access right, can be null for instance in anonymous access
use-casepublic int getDiscussionNoteCount(Long discussionId, User user)
discussionId - the ID of the discussion for which the notes should be returneduser - the user to test for access right, can be null for instance in anonymous access
use-casepublic Class<DiscussionChangedEvent> getObservedEvent()
getObservedEvent in interface EventListener<DiscussionChangedEvent>public int getReplyCount(Note note)
note - the note for which the number of replies should be returnedpublic void handle(DiscussionChangedEvent event)
EventDispatcher when the observed event was fired.handle in interface EventListener<DiscussionChangedEvent>event - the event that was firedCopyright © 2019 Communote team. All rights reserved.