Interface CommentPersistenceManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultJcrCommentPersistenceManager

public interface CommentPersistenceManager extends Serializable
Comment data persistence manager service interface, providing CRUD operations.

An implementation may provide the service based on JCR repository. Another implementation may possibly provide the service based on NoSQL data store for instance.

  • Method Details

    • createCommentItem

      String createCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Create comment data item based on given commentItem.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Returns:
      the identifier of the newly created comment data item
      Throws:
      CommentingException - if any exception occurs while creating a comment data item
    • getCommentItemById

      CommentItem getCommentItemById(CommentingContext commentingContext, String commentId) throws CommentingException
      Retrieves a comment data item by commentId.
      Parameters:
      commentingContext - commenting context instance
      commentId - the identifier of the comment data item
      Returns:
      CommentItem instance
      Throws:
      CommentingException - if any exception occurs while retrieving a comment data item
    • getLatestCommentItemsBySubjectId

      List<CommentItem> getLatestCommentItemsBySubjectId(CommentingContext commentingContext, String subjectId, long offset, long limit) throws CommentingException
      Retrieves command data by subjectId, offset and limit.
      Parameters:
      commentingContext - commenting context instance
      subjectId - the identifier of the subject data (e.g, document handle UUID).
      offset - first item index of data
      limit - max query item count limit
      Returns:
      list of comment data items
      Throws:
      CommentingException - if any exception occurs while retrieving comment data
    • updateCommentItem

      void updateCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Updates comment data item by commentItem.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Throws:
      CommentingException - if any exception occurs while updating a comment data item
    • deleteCommentItem

      void deleteCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Deletes comment data item based on information given by commentItem.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Throws:
      CommentingException - if any exception occurs while deleting a comment data item
    • getCommentHeadText

      String getCommentHeadText(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Gets comment header text to display in user interface from commentItem.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Returns:
      comment header text to display in user interface
      Throws:
      CommentingException - if any exception occurs while creating a comment data item
    • getCommentBodyText

      String getCommentBodyText(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Gets comment body text to display in user interface from commentItem.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Returns:
      comment body text to display in user interface
      Throws:
      CommentingException - if any exception occurs while creating a comment data item
    • getCommentHeadTooltip

      String getCommentHeadTooltip(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Gets comment header tooltip text to display in user interface from commentItem. Null if tooltip is not needed to display.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Returns:
      comment header tooltip text to display in user interface. Null if tooltip is not needed to display.
      Throws:
      CommentingException - if any exception occurs while creating a comment data item
    • getCommentBodyTooltip

      String getCommentBodyTooltip(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException
      Gets comment body tooltip text to display in user interface from commentItem. Null if tooltip is not needed to display.
      Parameters:
      commentingContext - commenting context instance
      commentItem - comment data item object
      Returns:
      comment body tooltip text to display in user interface. Null if tooltip is not needed to display.
      Throws:
      CommentingException - if any exception occurs while creating a comment data item