|
Jive API (3.0.13) 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.
| 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_MODERATED
Comments must be approved by the owner |
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(CommentContentResource commentContentResource,
Comment newComment)
Adds a new comment (no parent) to the object. |
void |
addComment(CommentContentResource commentContentResource,
Comment parentComment,
Comment newComment)
Adds a new comment having a parent comment to the object. |
void |
approve(Comment comment,
AuthToken auth)
|
Comment |
createComment(CommentContentResource commentContentResource,
User user,
Document body)
Create a new comment. |
Comment |
createComment(CommentContentResource commentContentResource,
User user,
String body)
Create a new comment. |
Image |
createImage(Comment comment,
String name,
String contentType,
InputStream data)
|
void |
deleteAllComments(CommentContentResource commentContentResource)
Deletes all comments on the object. |
void |
deleteComment(CommentContentResource commentContentResource,
Comment comment)
Deletes a comment in the object. |
void |
deleteComment(CommentContentResource commentContentResource,
Comment comment,
boolean recursive)
Deletes a comment in the object. |
void |
deleteImage(Comment comment,
Image image)
|
void |
deleteUserComments(User user)
Deletes all comments authored by the the given user. |
Comment |
getComment(CommentContentResource commentContentResource,
long commentID)
Returns a comment from the object based on its id. |
Comment |
getComment(long commentID)
Returns a comment from the object based on its id. |
CommentContentResource |
getCommentContentResource(Comment comment)
Returns the parent CommentContentResource of the comment. |
int |
getCommentCount(CommentContentResource commentContentResource)
Returns the number of comments in the object. |
int |
getCommentCount(CommentContentResource commentContentResource,
CommentResultFilter resultFilter)
Returns the number of comments in the object based on the specified ResultFilter. |
JiveIterator<Comment> |
getComments(CommentContentResource commentContentResource)
Returns an iterable for all the comments in the object. |
JiveIterator<Comment> |
getComments(CommentContentResource commentContentResource,
CommentResultFilter resultFilter)
Returns an Iterable for all the comments in the object that match the criteria specified by the ResultFilter. |
Date |
getCommentsCreationDate(CommentContentResource commentContentResource)
Convenience method that return the date that the first comment was created. |
Date |
getCommentsModificationDate(CommentContentResource commentContentResource)
Convenience method that returns the date of the latest comment modification in the object. |
CommentTreeWalker |
getCommentTreeWalker(CommentContentResource commentContentResource)
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,
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,
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 |
setBody(Comment comment,
String body)
|
void |
setModerated(Comment comment,
boolean moderated)
|
void |
update(Comment comment)
Updates an existing comment. |
void |
updateComment(CommentContentResource commentContentResource,
Comment comment)
Updates an existing comment. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| Field Detail |
|---|
static final int COMMENTS_NONE
static final int COMMENTS_OPEN
static final int COMMENTS_CLOSED
static final int COMMENTS_MODERATED
static final int COMMENTS_DEFAULT
| Method Detail |
|---|
int getCommentCount(CommentContentResource commentContentResource)
commentContentResource - the JivecommentContentResource to get a comment count for.
int getCommentCount(CommentContentResource commentContentResource,
CommentResultFilter resultFilter)
commentContentResource - the JivecommentContentResource to get a comment count for.resultFilter - a resultFilter to limit the query on.
JiveIterator<Comment> getComments(CommentContentResource commentContentResource)
commentContentResource - the JivecommentContentResource to get comments for.
JiveIterator<Comment> getComments(CommentContentResource commentContentResource,
CommentResultFilter resultFilter)
commentContentResource - the JivecommentContentResource to get comments for.resultFilter - a ResultFilter object to perform filtering and sorting with.
CommentTreeWalker getCommentTreeWalker(CommentContentResource commentContentResource)
commentContentResource - the JivecommentContentResource to get a tree walker for.
Date getCommentsCreationDate(CommentContentResource commentContentResource)
commentContentResource - the JivecommentContentResource to get creation date for.
Date getCommentsModificationDate(CommentContentResource commentContentResource)
commentContentResource - the JivecommentContentResource to get a modification date for.
Comment getComment(long commentID)
throws CommentNotFoundException
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.CommentContentResource getCommentContentResource(Comment comment)
CommentContentResource of the comment.
CommentContentResource which contains the comment.
Comment getComment(CommentContentResource commentContentResource,
long commentID)
throws CommentNotFoundException,
UnauthorizedException
commentContentResource - the JivecommentContentResource 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(CommentContentResource commentContentResource,
Comment newComment)
throws RejectedException,
UnauthorizedException
commentContentResource - the JivecommentContentResource 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.
IllegalStateException - if the object hasn't yet been added to a community.
void addComment(CommentContentResource commentContentResource,
Comment parentComment,
Comment newComment)
throws RejectedException,
UnauthorizedException
commentContentResource - the JivecommentContentResource 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.
IllegalStateException - if the object hasn't yet been added to a community.
Comment createComment(CommentContentResource commentContentResource,
User user,
String body)
throws UnauthorizedException,
RejectedException
commentContentResource - the JivecommentContentResource 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
Comment createComment(CommentContentResource commentContentResource,
User user,
Document body)
throws UnauthorizedException,
RejectedException
commentContentResource - the JivecommentContentResource 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(CommentContentResource commentContentResource,
Comment comment)
throws UnauthorizedException
commentContentResource - the JivecommentContentResource to which the comment belongs.comment - the updated comment
UnauthorizedException - if the user does not have permissions
void update(Comment comment)
throws UnauthorizedException
comment - the updated comment
UnauthorizedException - if the user does not have permissions
void setBody(Comment comment,
String body)
void setModerated(Comment comment,
boolean moderated)
void approve(Comment comment,
AuthToken auth)
throws UnauthorizedException
UnauthorizedException
void deleteComment(CommentContentResource commentContentResource,
Comment comment)
throws UnauthorizedException
commentContentResource - the JivecommentContentResource to wich the comment belongs.comment - the comment to delete
IllegalArgumentException - if the comment does not belong to the object.
UnauthorizedException - if user does not have administrator permissions.
void deleteComment(CommentContentResource commentContentResource,
Comment comment,
boolean recursive)
throws UnauthorizedException
commentContentResource - the JivecommentContentResource to wich the comment belongs.comment - the comment to deleterecursive - true to delete all the child comments, false to leave the children.
IllegalArgumentException - if the comment does not belong to the object.
UnauthorizedException - if user does not have administrator permissions.
void deleteAllComments(CommentContentResource commentContentResource)
throws UnauthorizedException
commentContentResource - the JivecommentContentResource to delete all comments for.
UnauthorizedException - if user does not have administrator permissions.
void deleteUserComments(User user)
throws UnauthorizedException
user - the user to delete all comments for.
UnauthorizedException - if user does not have system administrator or user administrator permissions.int getUserContentCommentCount(User user)
user - the User whose content will be searched for comments.
int getUserContentCommentCount(User user,
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,
UserContentCommentResultFilter resultFilter)
user - the User whose content will be searched for comments.resultFilter - a ResultFilter object to perform filtering and sorting with.
Image createImage(Comment comment,
String name,
String contentType,
InputStream data)
throws IllegalStateException,
ImageException
IllegalStateException
ImageException
void deleteImage(Comment comment,
Image image)
throws ImageException
ImageException
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||