public class ForumPostBehaviours extends Object implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
fm:post
content type.
These behaviours maintain the correct value for the comment count rollup property
.Policy.Arg
Modifier and Type | Field and Description |
---|---|
static int |
COUNT_TRIGGER_VALUE |
QNAME
QNAME
ARG_0, ARG_1, ARG_2, QNAME
Constructor and Description |
---|
ForumPostBehaviours() |
Modifier and Type | Method and Description |
---|---|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Called before a node is deleted.
|
void |
init()
Initialise method
|
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Called when a new node has been created.
|
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef commentsRollupNode,
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 |
setCommentService(CommentService commentService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setRawNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
public static final int COUNT_TRIGGER_VALUE
public void setPolicyComponent(PolicyComponent policyComponent)
public void setCommentService(CommentService commentService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setRawNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void init()
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef commentsRollupNode, Map<org.alfresco.service.namespace.QName,Serializable> before, Map<org.alfresco.service.namespace.QName,Serializable> after)
NodeServicePolicies.OnUpdatePropertiesPolicy
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
commentsRollupNode
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the changepublic void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodePolicy
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
childAssocRef
- the created child association referencepublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
nodeRef
- the node referenceCopyright © 2005–2017 Alfresco Software. All rights reserved.