Interface CommentCollection<C extends Comment>

  • All Known Implementing Classes:

    public interface CommentCollection<C extends Comment>
    A CommentCollection represents a collection of Comments. Comments can be added to and removed from the collection. A collection is tied to a specific target (e.g. the page, asset or node that was commented on) - see getTarget().
    • Method Detail

      • addComment

        C addComment​(String message,
                     String author,
                     String annotationData)
        Create a new comment and add it to the collection. The comment will be created with the given message, optional author user ID string and optional annotation data.
        message - The message of the comment.
        author - The optional user ID to set as the author of the new comment. If none is provided, the session user is considered the author.
        annotationData - The optional annotation data. Annotation data may be used to store SVG data when commenting on an image that is annotated with such data.
        The comment just created.
        CommentException - Upon encountering an error during comment creation.
      • getCommentList

        List<C> getCommentList()
        Returns all comments of this collection.
        A List of comments of this collection, or an empty list if no comments are present.
      • getCreated

        Calendar getCreated()
        Returns the moment in time this collection was created.
        The calendar representing the creation date/time.
      • getLastModified

        Calendar getLastModified()
        Returns the moment in time this collection was last modified.
        The calendar representing the last modification.
      • getPath

        String getPath()
        Returns the path of the resource representing this collection.
        A String representing the path.
      • getTarget

        Resource getTarget()
        Returns the Resource representing the target this comment collection belongs to.
        The resource.
      • remove

        void remove()
        Removes (deletes) this comment collection. After calling this method, the collection must be considered invalid/stale and must not be used anymore.
        CommentException - Upon encountering an error while removing.