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(NodeRef commentNodeRef)
Called before a node is deleted.
|
NodeRef |
createComment(NodeRef discussableNode,
String title,
String comment,
boolean suppressRollups)
Creates a comment for the discussableNode
|
void |
deleteComment(NodeRef commentNodeRef)
Deletes the comment for the discussableNode
|
Map<String,Boolean> |
getCommentPermissions(NodeRef discussableNode,
NodeRef commentNodeRef)
canEdit / canDelete
|
NodeRef |
getDiscussableAncestor(NodeRef descendantNodeRef)
Thi method retrieves the ancestor in the repository containment hierarchy having the
fm:discussable aspect. |
NodeRef |
getShareCommentsTopic(NodeRef discussableNode)
This method retrieves the
fm:topic NodeRef which holds the Share comments for
the specified fm:discussable node. |
PagingResults<NodeRef> |
listComments(NodeRef discussableNode,
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(NodeRef commentNodeRef,
Map<QName,Serializable> before,
Map<QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setActivityService(ActivityService activityService) |
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setCannedQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry) |
void |
setContentService(ContentService contentService) |
void |
setDictionaryService(DictionaryService dictionaryService) |
void |
setLockService(LockService lockService) |
void |
setNodeService(NodeService nodeService) |
void |
setPermissionService(PermissionService permissionService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setSiteService(SiteService siteService) |
void |
updateComment(NodeRef commentNodeRef,
String title,
String comment)
Updates the comment
|
public void setSiteService(SiteService siteService)
public void setActivityService(ActivityService activityService)
public void setNodeService(NodeService nodeService)
public void setContentService(ContentService contentService)
public void setCannedQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
public void setPermissionService(PermissionService permissionService)
public void setLockService(LockService lockService)
public void setDictionaryService(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 NodeRef getDiscussableAncestor(NodeRef descendantNodeRef)
CommentServicefm:discussable aspect.getDiscussableAncestor in interface CommentServicedescendantNodeRef - The nodeRef which descends from the f:discussable node.public PagingResults<NodeRef> listComments(NodeRef discussableNode, PagingRequest paging)
CommentServicelistComments in interface CommentServicediscussableNode - the node which is being commented on .paging - paging.public NodeRef getShareCommentsTopic(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 NodeRef createComment(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(NodeRef commentNodeRef, String title, String comment)
CommentServiceupdateComment in interface CommentServicecommentNodeRef - the comment node.title - - title of the commentcomment - - body of the commentpublic void deleteComment(NodeRef commentNodeRef)
CommentServicedeleteComment in interface CommentServicecommentNodeRef - the node in Share which is being commented on.public Map<String,Boolean> getCommentPermissions(NodeRef discussableNode, NodeRef commentNodeRef)
CommentServicegetCommentPermissions in interface CommentServicepublic void onUpdateProperties(NodeRef commentNodeRef, Map<QName,Serializable> before, Map<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(NodeRef commentNodeRef)
NodeServicePolicies.BeforeDeleteNodePolicybeforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicycommentNodeRef - the node referenceCopyright © 2005–2020 Alfresco Software. All rights reserved.