Class CommentManagerImpl

  • All Implemented Interfaces:
    io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, CommentManager

    public final class CommentManagerImpl
    extends Object
    implements CommentManager
    Author:
    pchretien
    • Constructor Detail

      • CommentManagerImpl

        @Inject
        public CommentManagerImpl​(CommentPlugin commentsPlugin)
        Constructor.
        Parameters:
        commentsPlugin - Comment plugin
    • Method Detail

      • publish

        public void publish​(UID<Account> accountURI,
                            Comment comment,
                            UID<? extends KeyConcept> keyConceptUri)
        Publishes a comment on a key concept.
        Specified by:
        publish in interface CommentManager
        Parameters:
        accountURI - the account defined by its UID
        comment - the comment
        keyConceptUri - the UID of the keyConcept
      • getComments

        public List<Comment> getComments​(UID<? extends KeyConcept> keyConceptUri)
        Gets a list of sorted comments published on this keyConcept.
        Specified by:
        getComments in interface CommentManager
        Parameters:
        keyConceptUri - the UID of the keyConcept
        Returns:
        the list of sorted comments
      • update

        public void update​(UID<Account> accountURI,
                           Comment comment)
        Updates a comment.
        Specified by:
        update in interface CommentManager
        Parameters:
        accountURI - the account defined by its UID
        comment - the updated comment