Package org.alfresco.repo.forum
Interface CommentService
- All Known Implementing Classes:
CommentServiceImpl
public interface CommentService
A service for handling comments.
- Since:
- 4.0
- Author:
- Neil Mc Erlean
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateComment(NodeRef discussableNode, String title, String comment, boolean suppressRollups) Creates a comment for the discussableNodevoiddeleteComment(NodeRef commentNodeRef) Deletes the comment for the discussableNodegetCommentPermissions(NodeRef discussableNode, NodeRef commentNodeRef) canEdit / canDeletegetDiscussableAncestor(NodeRef descendantNodeRef) Thi method retrieves the ancestor in the repository containment hierarchy having thefm:discussableaspect.getShareCommentsTopic(NodeRef discussableNode) This method retrieves thefm:topicNodeRef which holds the Share comments for the specifiedfm:discussablenode.org.alfresco.query.PagingResults<NodeRef>listComments(NodeRef discussableNode, org.alfresco.query.PagingRequest paging) Returns a paged list of comments.voidupdateComment(NodeRef commentNodeRef, String title, String comment) Updates the comment
-
Field Details
-
CAN_EDIT
- See Also:
-
CAN_DELETE
- See Also:
-
-
Method Details
-
getDiscussableAncestor
Thi method retrieves the ancestor in the repository containment hierarchy having thefm:discussableaspect.- Parameters:
descendantNodeRef- The nodeRef which descends from the f:discussable node.- Returns:
- the fm:discussable ancestor if there is one, else null
- Throws:
org.alfresco.error.AlfrescoRuntimeException- if the specified expectedNodeType is not correct.
-
createComment
NodeRef createComment(NodeRef discussableNode, String title, String comment, boolean suppressRollups) Creates a comment for the discussableNode- Parameters:
discussableNode- the node in Share which is being commented on .title- - title of the commentcomment- - body of the commentsuppressRollups- - should it suppressRollups- Returns:
- NodeRef - the created node reference
-
updateComment
Updates the comment- Parameters:
commentNodeRef- the comment node.title- - title of the commentcomment- - body of the comment
-
listComments
org.alfresco.query.PagingResults<NodeRef> listComments(NodeRef discussableNode, org.alfresco.query.PagingRequest paging) Returns a paged list of comments.- Parameters:
discussableNode- the node which is being commented on .paging- paging.- Returns:
- a list of comment nodes
-
deleteComment
Deletes the comment for the discussableNode- Parameters:
commentNodeRef- the node in Share which is being commented on.
-
getCommentPermissions
canEdit / canDelete- Parameters:
discussableNode-commentNodeRef-- Returns:
-