public class CommentServiceImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements CommentService, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
Policy.Arg
CAN_DELETE, CAN_EDIT
QNAME
ARG_0, ARG_1, ARG_2, QNAME
Constructor and Description |
---|
CommentServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
Called before a node is deleted.
|
org.alfresco.service.cmr.repository.NodeRef |
createComment(org.alfresco.service.cmr.repository.NodeRef discussableNode,
String title,
String comment,
boolean suppressRollups)
Creates a comment for the discussableNode
|
void |
deleteComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
Deletes the comment for the discussableNode
|
Map<String,Boolean> |
getCommentPermissions(org.alfresco.service.cmr.repository.NodeRef discussableNode,
org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
canEdit / canDelete
|
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 the
fm:discussable aspect. |
org.alfresco.service.cmr.repository.NodeRef |
getShareCommentsTopic(org.alfresco.service.cmr.repository.NodeRef discussableNode)
This method retrieves the
fm:topic NodeRef which holds the Share comments for
the specified fm:discussable node. |
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.
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef commentNodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> before,
Map<org.alfresco.service.namespace.QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setActivityService(ActivityService activityService) |
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<? extends Object>> cannedQueryRegistry) |
void |
setContentService(ContentService contentService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setLockService(LockService lockService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setSiteService(SiteService siteService) |
void |
updateComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef,
String title,
String comment)
Updates the comment
|
public void setSiteService(SiteService siteService)
public void setActivityService(ActivityService activityService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setContentService(ContentService contentService)
public void setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<? extends Object>> cannedQueryRegistry)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setLockService(LockService lockService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
public org.alfresco.service.cmr.repository.NodeRef getDiscussableAncestor(org.alfresco.service.cmr.repository.NodeRef descendantNodeRef)
CommentService
fm:discussable
aspect.getDiscussableAncestor
in interface CommentService
descendantNodeRef
- The nodeRef which descends from the f:discussable node.public org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> listComments(org.alfresco.service.cmr.repository.NodeRef discussableNode, org.alfresco.query.PagingRequest paging)
CommentService
listComments
in interface CommentService
discussableNode
- the node which is being commented on .paging
- paging.public org.alfresco.service.cmr.repository.NodeRef getShareCommentsTopic(org.alfresco.service.cmr.repository.NodeRef discussableNode)
CommentService
fm:topic
NodeRef which holds the Share comments for
the specified fm:discussable
node.getShareCommentsTopic
in interface CommentService
discussableNode
- the node whose Share comments are sought.public org.alfresco.service.cmr.repository.NodeRef createComment(org.alfresco.service.cmr.repository.NodeRef discussableNode, String title, String comment, boolean suppressRollups)
CommentService
createComment
in interface CommentService
discussableNode
- the node in Share which is being commented on .title
- - title of the commentcomment
- - body of the commentsuppressRollups
- - should it suppressRollupspublic void updateComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef, String title, String comment)
CommentService
updateComment
in interface CommentService
commentNodeRef
- the comment node.title
- - title of the commentcomment
- - body of the commentpublic void deleteComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
CommentService
deleteComment
in interface CommentService
commentNodeRef
- the node in Share which is being commented on.public Map<String,Boolean> getCommentPermissions(org.alfresco.service.cmr.repository.NodeRef discussableNode, org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
CommentService
getCommentPermissions
in interface CommentService
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef commentNodeRef, Map<org.alfresco.service.namespace.QName,Serializable> before, Map<org.alfresco.service.namespace.QName,Serializable> after)
NodeServicePolicies.OnUpdatePropertiesPolicy
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
commentNodeRef
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the changepublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
commentNodeRef
- the node referenceCopyright © 2005–2017 Alfresco Software. All rights reserved.