|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommentManager
Handles comments for a JiveObject.
Comments can be nested in a tree structure to allow for the promotions of discussions on an
object. There are two options for navigating through the comments to an object:
| Field Summary | |
|---|---|
static int |
COMMENTS_CLOSED
Comment status for documents that may have allowed comments in the past but presently do not accept comments. |
static int |
COMMENTS_DEFAULT
The default comment status for a document. |
static int |
COMMENTS_NONE
Comment status for documents that do not accept comments. |
static int |
COMMENTS_OPEN
Comment status for documents that do accept comments. |
| Method Summary | |
|---|---|
void |
addComment(JiveObject contentObject,
Comment newComment)
Adds a new comment (no parent) to the object. |
void |
addComment(JiveObject contentObject,
Comment parentComment,
Comment newComment)
Adds a new comment having a parent comment to the object. |
Comment |
createComment(JiveObject contentObject,
User user,
java.lang.String body)
Create a new comment. |
void |
deleteAllComments(JiveObject contentObject)
Deletes all comments on the object. |
void |
deleteComment(JiveObject contentObject,
Comment comment)
Deletes a comment in the object. |
void |
deleteComment(JiveObject contentObject,
Comment comment,
boolean recursive)
Deletes a comment in the object. |
Comment |
getComment(JiveObject contentObject,
long commentID)
Returns a comment from the object based on its id. |
int |
getCommentCount(JiveObject contentObject)
Returns the number of comments in the object. |
int |
getCommentCount(JiveObject contentObject,
CommentResultFilter resultFilter)
Returns the number of comments in the object based on the specified ResultFilter. |
JiveIterator<Comment> |
getComments(JiveObject contentObject)
Returns an iterable for all the comments in the object. |
JiveIterator<Comment> |
getComments(JiveObject contentObject,
CommentResultFilter resultFilter)
Returns an Iterable for all the comments in the object that match the criteria specified by the ResultFilter. |
java.util.Date |
getCommentsCreationDate(JiveObject contentObject)
Convenience method that return the date that the first comment was created. |
java.util.Date |
getCommentsModificationDate(JiveObject contentObject)
Convenience method that returns the date of the latest comment modification in the object. |
CommentTreeWalker |
getCommentTreeWalker(JiveObject contentObject)
Returns a CommentTreeWalker for the comments in the object. |
int |
getUserContentCommentCount(User user)
Returns a count of all the comments in all content which has been authored by the supplied user. |
int |
getUserContentCommentCount(User user,
com.jivesoftware.community.UserContentCommentResultFilter resultFilter)
Returns a count of all the comments in all content which has been authored by the supplied user that match the criteria specified by the ResultFilter. |
JiveIterator<Comment> |
getUserContentComments(User user)
Returns a JiveIterator for all the comments in all content which has been authored by the supplied user. |
JiveIterator<Comment> |
getUserContentComments(User user,
com.jivesoftware.community.UserContentCommentResultFilter resultFilter)
Returns a JiveIterator for all the comments in all content which has been authored by the supplied user that match the criteria specified by the ResultFilter. |
void |
updateComment(JiveObject contentObject,
Comment comment)
Updates an existing comment. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Field Detail |
|---|
static final int COMMENTS_NONE
static final int COMMENTS_OPEN
static final int COMMENTS_CLOSED
static final int COMMENTS_DEFAULT
| Method Detail |
|---|
int getCommentCount(JiveObject contentObject)
contentObject - the JiveContentObject to get a comment count for.
int getCommentCount(JiveObject contentObject,
CommentResultFilter resultFilter)
contentObject - the JiveContentObject to get a comment count for.resultFilter - a resultFilter to limit the query on.
JiveIterator<Comment> getComments(JiveObject contentObject)
contentObject - the JiveContentObject to get comments for.
JiveIterator<Comment> getComments(JiveObject contentObject,
CommentResultFilter resultFilter)
contentObject - the JiveContentObject to get comments for.resultFilter - a ResultFilter object to perform filtering and sorting with.
CommentTreeWalker getCommentTreeWalker(JiveObject contentObject)
contentObject - the JiveContentObject to get a tree walker for.
java.util.Date getCommentsCreationDate(JiveObject contentObject)
contentObject - the JiveContentObject to get creation date for.
java.util.Date getCommentsModificationDate(JiveObject contentObject)
contentObject - the JiveContentObject to get a modification date for.
Comment getComment(JiveObject contentObject,
long commentID)
throws CommentNotFoundException,
UnauthorizedException
contentObject - the JiveContentObject to get the comment for.commentID - the ID of the comment to get from the object.
CommentNotFoundException - if the commentID can't be found and/or doesn't belong
to the object.
UnauthorizedException - if the user doesn't have permissions to view the comment.
void addComment(JiveObject contentObject,
Comment newComment)
throws RejectedException,
UnauthorizedException
contentObject - the JiveContentObject to add the comment to.newComment - comment to add to the object.
RejectedException - if one of the installed interceptors prevents the
comment from being posted.
UnauthorizedException - if user does not have CREATE_COMMENT permissions.
java.lang.IllegalStateException - if the object hasn't yet been added to a community.
void addComment(JiveObject contentObject,
Comment parentComment,
Comment newComment)
throws RejectedException,
UnauthorizedException
contentObject - the JiveContentObject to add the comment to.parentComment - the comment in the object that will be the parent to the new comment.newComment - comment to add to the object under the parent.
RejectedException - if one of the installed interceptors prevents the
comment from being posted.
UnauthorizedException - if user does not have CREATE_COMMENT permissions.
java.lang.IllegalStateException - if the object hasn't yet been added to a community.
Comment createComment(JiveObject contentObject,
User user,
java.lang.String body)
throws UnauthorizedException,
RejectedException
contentObject - the JiveContentObject to create a comment for.user - the author of the comment.body - the body of the comment.
UnauthorizedException - if user does not have permissions.
RejectedException - if the comment status for this object is not COMMENTS_OPEN
void updateComment(JiveObject contentObject,
Comment comment)
throws UnauthorizedException
contentObject - the JiveContentObject to which the comment belongs.comment - the updated comment
UnauthorizedException - if the user does not have permissions
void deleteComment(JiveObject contentObject,
Comment comment)
throws UnauthorizedException
contentObject - the JiveContentObject to wich the comment belongs.comment - the comment to delete
java.lang.IllegalArgumentException - if the comment does not belong to the object.
UnauthorizedException - if user does not have administrator permissions.
void deleteComment(JiveObject contentObject,
Comment comment,
boolean recursive)
throws UnauthorizedException
contentObject - the JiveContentObject to wich the comment belongs.comment - the comment to deleterecursive - true to delete all the child comments, false to leave the children.
java.lang.IllegalArgumentException - if the comment does not belong to the object.
UnauthorizedException - if user does not have administrator permissions.
void deleteAllComments(JiveObject contentObject)
throws UnauthorizedException
contentObject - the JiveContentObject to delete all comments for.
UnauthorizedException - if user does not have administrator permissions.int getUserContentCommentCount(User user)
user - the User whose content will be searched for comments.
int getUserContentCommentCount(User user,
com.jivesoftware.community.UserContentCommentResultFilter resultFilter)
user - the User whose content will be searched for comments.resultFilter - a ResultFilter object to perform filtering and sorting with.
JiveIterator<Comment> getUserContentComments(User user)
user - the User whose content will be searched for comments.
JiveIterator<Comment> getUserContentComments(User user,
com.jivesoftware.community.UserContentCommentResultFilter resultFilter)
user - the User whose content will be searched for comments.resultFilter - a ResultFilter object to perform filtering and sorting with.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||