Package org.alfresco.repo.forum
Class ForumPostBehaviours
java.lang.Object
org.alfresco.repo.forum.ForumPostBehaviours
- All Implemented Interfaces:
NodeServicePolicies.BeforeDeleteNodePolicy,NodeServicePolicies.OnCreateNodePolicy,NodeServicePolicies.OnUpdatePropertiesPolicy,ClassPolicy,Policy
public class ForumPostBehaviours
extends Object
implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
This class registers behaviours for the
fm:post content type.
These behaviours maintain the correct value for the comment count rollup property.- Since:
- 4.0
- Author:
- Neil Mc Erlean
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg -
Field Summary
FieldsFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteNode(NodeRef nodeRef) Called before a node is deleted.voidinit()Initialise methodvoidonCreateNode(ChildAssociationRef childAssocRef) Called when a new node has been created.voidonUpdateProperties(NodeRef commentsRollupNode, Map<QName, Serializable> before, Map<QName, Serializable> after) Called after a node's properties have been changed.voidsetCommentService(CommentService commentService) voidsetNodeService(NodeService nodeService) voidsetPolicyComponent(PolicyComponent policyComponent) voidsetRawNodeService(NodeService nodeService)
-
Field Details
-
COUNT_TRIGGER_VALUE
public static final int COUNT_TRIGGER_VALUE- See Also:
-
-
Constructor Details
-
ForumPostBehaviours
public ForumPostBehaviours()
-
-
Method Details
-
setPolicyComponent
-
setCommentService
-
setNodeService
-
setRawNodeService
-
init
public void init()Initialise method -
onUpdateProperties
public void onUpdateProperties(NodeRef commentsRollupNode, Map<QName, Serializable> before, Map<QName, Serializable> after) Description copied from interface:NodeServicePolicies.OnUpdatePropertiesPolicyCalled after a node's properties have been changed.- Specified by:
onUpdatePropertiesin interfaceNodeServicePolicies.OnUpdatePropertiesPolicy- Parameters:
commentsRollupNode- reference to the updated nodebefore- the node's properties before the changeafter- the node's properties after the change
-
onCreateNode
Description copied from interface:NodeServicePolicies.OnCreateNodePolicyCalled when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssocRef- the created child association reference
-
beforeDeleteNode
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-