Package org.alfresco.repo.forum
Interface CommentService
-
- All Known Implementing Classes:
CommentServiceImpl
public interface CommentServiceA service for handling comments.- Since:
- 4.0
- Author:
- Neil Mc Erlean
-
-
Field Summary
Fields Modifier and Type Field Description static StringCAN_DELETEstatic StringCAN_EDIT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeRefcreateComment(NodeRef discussableNode, String title, String comment, boolean suppressRollups)Creates a comment for the discussableNodevoiddeleteComment(NodeRef commentNodeRef)Deletes the comment for the discussableNodeMap<String,Boolean>getCommentPermissions(NodeRef discussableNode, NodeRef commentNodeRef)canEdit / canDeleteNodeRefgetDiscussableAncestor(NodeRef descendantNodeRef)Thi method retrieves the ancestor in the repository containment hierarchy having thefm:discussableaspect.NodeRefgetShareCommentsTopic(NodeRef discussableNode)This method retrieves thefm:topicNodeRef which holds the Share comments for the specifiedfm:discussablenode.PagingResults<NodeRef>listComments(NodeRef discussableNode, PagingRequest paging)Returns a paged list of comments.voidupdateComment(NodeRef commentNodeRef, String title, String comment)Updates the comment
-
-
-
Field Detail
-
CAN_EDIT
static final String CAN_EDIT
- See Also:
- Constant Field Values
-
CAN_DELETE
static final String CAN_DELETE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDiscussableAncestor
NodeRef getDiscussableAncestor(NodeRef descendantNodeRef)
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:
AlfrescoRuntimeException- if the specified expectedNodeType is not correct.
-
getShareCommentsTopic
NodeRef getShareCommentsTopic(NodeRef discussableNode)
This method retrieves thefm:topicNodeRef which holds the Share comments for the specifiedfm:discussablenode.- Parameters:
discussableNode- the node whose Share comments are sought.- Returns:
- the fm:topic NodeRef, if one exists, else null.
-
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
void updateComment(NodeRef commentNodeRef, String title, String comment)
Updates the comment- Parameters:
commentNodeRef- the comment node.title- - title of the commentcomment- - body of the comment
-
listComments
PagingResults<NodeRef> listComments(NodeRef discussableNode, 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
void deleteComment(NodeRef commentNodeRef)
Deletes the comment for the discussableNode- Parameters:
commentNodeRef- the node in Share which is being commented on.
-
-