public class CommentServiceImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements CommentService, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
Policy.ArgCAN_DELETE, CAN_EDITQNAMEARG_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.AbstractLifecycleBeanprotected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanpublic org.alfresco.service.cmr.repository.NodeRef getDiscussableAncestor(org.alfresco.service.cmr.repository.NodeRef descendantNodeRef)
CommentServicefm:discussable aspect.getDiscussableAncestor in interface CommentServicedescendantNodeRef - 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)
CommentServicelistComments in interface CommentServicediscussableNode - the node which is being commented on .paging - paging.public org.alfresco.service.cmr.repository.NodeRef getShareCommentsTopic(org.alfresco.service.cmr.repository.NodeRef discussableNode)
CommentServicefm:topic NodeRef which holds the Share comments for
the specified fm:discussable node.getShareCommentsTopic in interface CommentServicediscussableNode - 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)
CommentServicecreateComment in interface CommentServicediscussableNode - 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)
CommentServiceupdateComment in interface CommentServicecommentNodeRef - the comment node.title - - title of the commentcomment - - body of the commentpublic void deleteComment(org.alfresco.service.cmr.repository.NodeRef commentNodeRef)
CommentServicedeleteComment in interface CommentServicecommentNodeRef - 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)
CommentServicegetCommentPermissions in interface CommentServicepublic 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.OnUpdatePropertiesPolicyonUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicycommentNodeRef - 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.BeforeDeleteNodePolicybeforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicycommentNodeRef - the node referenceCopyright © 2005–2018 Alfresco Software. All rights reserved.