org.outerj.daisy.repository.comment
Interface CommentManager


public interface CommentManager


Method Summary
 Comment addComment(long documentId, CommentVisibility visibility, java.lang.String commentText)
          Adds a comment to the branch "main", language "default" of this document.
 Comment addComment(long documentId, long branchId, long languageId, CommentVisibility visibility, java.lang.String commentText)
           
 void deleteComment(Comment comment)
           
 void deleteComment(long documentId, long commentId)
          Deletes a comment from the branch "main", language "default" of the document.
 void deleteComment(long documentId, long branchId, long languageId, long commentId)
          Deletes a comment.
 Comments getComments()
          Returns all comments created by the current user.
 Comments getComments(CommentVisibility visibility)
          Returns all comments with the specified visibility, created by the current user.
 Comments getComments(long documentId)
          Gets the comments from the branch "main", languge "default" of the document.
 Comments getComments(long documentId, long branchId, long langugeId)
          Returns the comments for a specific document variant.
 Comments getComments(VariantKey variantKey)
           
 

Method Detail

addComment

Comment addComment(long documentId,
                   long branchId,
                   long languageId,
                   CommentVisibility visibility,
                   java.lang.String commentText)
                   throws RepositoryException
Throws:
RepositoryException

addComment

Comment addComment(long documentId,
                   CommentVisibility visibility,
                   java.lang.String commentText)
                   throws RepositoryException
Adds a comment to the branch "main", language "default" of this document.

Throws:
RepositoryException

deleteComment

void deleteComment(long documentId,
                   long branchId,
                   long languageId,
                   long commentId)
                   throws RepositoryException
Deletes a comment. These are the rules for deleting comments:

Throws:
RepositoryException

deleteComment

void deleteComment(long documentId,
                   long commentId)
                   throws RepositoryException
Deletes a comment from the branch "main", language "default" of the document.

Throws:
RepositoryException

deleteComment

void deleteComment(Comment comment)
                   throws RepositoryException
Throws:
RepositoryException

getComments

Comments getComments(long documentId,
                     long branchId,
                     long langugeId)
                     throws RepositoryException
Returns the comments for a specific document variant. Only private comment of the current user will be included (also for administrators). Editors-only comments are only included when the user has write access to the document.

The comments are ordered by creation date.

Throws:
RepositoryException

getComments

Comments getComments(VariantKey variantKey)
                     throws RepositoryException
Throws:
RepositoryException
See Also:
getComments(long, long, long)

getComments

Comments getComments(long documentId)
                     throws RepositoryException
Gets the comments from the branch "main", languge "default" of the document.

Throws:
RepositoryException

getComments

Comments getComments(CommentVisibility visibility)
                     throws RepositoryException
Returns all comments with the specified visibility, created by the current user.

Throws:
RepositoryException

getComments

Comments getComments()
                     throws RepositoryException
Returns all comments created by the current user.

Throws:
RepositoryException


Copyright © -2012 . All Rights Reserved.