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 java.lang.StringCAN_DELETEstatic java.lang.StringCAN_EDIT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.NodeRefcreateComment(org.alfresco.service.cmr.repository.NodeRef discussableNode, java.lang.String title, java.lang.String comment, boolean suppressRollups)Creates a comment for the discussableNodevoiddeleteComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)Deletes the comment for the discussableNodejava.util.Map<java.lang.String,java.lang.Boolean>getCommentPermissions(org.alfresco.service.cmr.repository.NodeRef discussableNode, org.alfresco.service.cmr.repository.NodeRef commentNodeRef)canEdit / canDeleteorg.alfresco.service.cmr.repository.NodeRefgetDiscussableAncestor(org.alfresco.service.cmr.repository.NodeRef descendantNodeRef)Thi method retrieves the ancestor in the repository containment hierarchy having thefm:discussableaspect.org.alfresco.service.cmr.repository.NodeRefgetShareCommentsTopic(org.alfresco.service.cmr.repository.NodeRef discussableNode)This method retrieves thefm:topicNodeRef which holds the Share comments for the specifiedfm:discussablenode.org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef>listComments(org.alfresco.service.cmr.repository.NodeRef discussableNode, org.alfresco.query.PagingRequest paging)Returns a paged list of comments.voidupdateComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef, java.lang.String title, java.lang.String comment)Updates the comment
-
-
-
Field Detail
-
CAN_EDIT
static final java.lang.String CAN_EDIT
- See Also:
- Constant Field Values
-
CAN_DELETE
static final java.lang.String CAN_DELETE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDiscussableAncestor
org.alfresco.service.cmr.repository.NodeRef getDiscussableAncestor(org.alfresco.service.cmr.repository.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:
org.alfresco.error.AlfrescoRuntimeException- if the specified expectedNodeType is not correct.
-
getShareCommentsTopic
org.alfresco.service.cmr.repository.NodeRef getShareCommentsTopic(org.alfresco.service.cmr.repository.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
org.alfresco.service.cmr.repository.NodeRef createComment(org.alfresco.service.cmr.repository.NodeRef discussableNode, java.lang.String title, java.lang.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(org.alfresco.service.cmr.repository.NodeRef commentNodeRef, java.lang.String title, java.lang.String comment)Updates the comment- Parameters:
commentNodeRef- the comment node.title- - title of the commentcomment- - body of the comment
-
listComments
org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> listComments(org.alfresco.service.cmr.repository.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
void deleteComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
Deletes the comment for the discussableNode- Parameters:
commentNodeRef- the node in Share which is being commented on.
-
getCommentPermissions
java.util.Map<java.lang.String,java.lang.Boolean> getCommentPermissions(org.alfresco.service.cmr.repository.NodeRef discussableNode, org.alfresco.service.cmr.repository.NodeRef commentNodeRef)canEdit / canDelete- Parameters:
discussableNode-commentNodeRef-- Returns:
-
-