Class RedisCommentPlugin

java.lang.Object
io.vertigo.social.plugins.comment.redis.RedisCommentPlugin
All Implemented Interfaces:
io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Plugin, CommentPlugin

public final class RedisCommentPlugin extends Object implements CommentPlugin
Author:
pchretien
  • Constructor Summary

    Constructors
    Constructor
    Description
    RedisCommentPlugin(Optional<String> connectorNameOpt, List<io.vertigo.connectors.redis.RedisConnector> redisConnectors)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get(UUID uuid)
    Gets the comment by its uuid.
    <S extends io.vertigo.datamodel.data.model.KeyConcept>
    List<Comment>
    getComments(io.vertigo.datamodel.data.model.UID<S> keyConceptUri)
    Lists the comments as a key concerned is concerned
    <S extends io.vertigo.datamodel.data.model.KeyConcept>
    void
    publish(Comment comment, io.vertigo.datamodel.data.model.UID<S> keyConceptUri)
    Publishes a comment about a key concept.
    void
    update(Comment comment)
    Updates a comment.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RedisCommentPlugin

      @Inject public RedisCommentPlugin(Optional<String> connectorNameOpt, List<io.vertigo.connectors.redis.RedisConnector> redisConnectors)
      Parameters:
      connectorNameOpt - Redis connector Name
  • Method Details

    • publish

      public <S extends io.vertigo.datamodel.data.model.KeyConcept> void publish(Comment comment, io.vertigo.datamodel.data.model.UID<S> keyConceptUri)
      Publishes a comment about a key concept.
      Specified by:
      publish in interface CommentPlugin
      Parameters:
      comment - the comment
      keyConceptUri - the key concept defined by its URI
    • update

      public void update(Comment comment)
      Updates a comment.
      Specified by:
      update in interface CommentPlugin
      Parameters:
      comment - the comment
    • get

      public Comment get(UUID uuid)
      Gets the comment by its uuid.
      Specified by:
      get in interface CommentPlugin
      Parameters:
      uuid - the uuid of the comment
      Returns:
      the comment
    • getComments

      public <S extends io.vertigo.datamodel.data.model.KeyConcept> List<Comment> getComments(io.vertigo.datamodel.data.model.UID<S> keyConceptUri)
      Lists the comments as a key concerned is concerned
      Specified by:
      getComments in interface CommentPlugin
      Parameters:
      keyConceptUri - the key concept defined by its URI
      Returns:
      the list of comments