mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Enhanced 'beforeCreateChildAssociaton' and 'onCreateChildAssociation' to carry an 'isNewNode' flag.
Fixed Lock and Rules to react correctly to this new information. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6003 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -439,19 +439,19 @@ public abstract class AbstractNodeServiceImpl implements NodeService
|
||||
* @see NodeServicePolicies.BeforeCreateChildAssociationPolicy#beforeCreateChildAssociation(NodeRef,
|
||||
* NodeRef, QName, QName)
|
||||
*/
|
||||
protected void invokeBeforeCreateChildAssociation(NodeRef parentNodeRef, NodeRef childNodeRef, QName assocTypeQName, QName assocQName)
|
||||
protected void invokeBeforeCreateChildAssociation(NodeRef parentNodeRef, NodeRef childNodeRef, QName assocTypeQName, QName assocQName, boolean isNewNode)
|
||||
{
|
||||
// get qnames to invoke against
|
||||
Set<QName> qnames = getTypeAndAspectQNames(parentNodeRef);
|
||||
// execute policy for node type
|
||||
NodeServicePolicies.BeforeCreateChildAssociationPolicy policy = beforeCreateChildAssociationDelegate.get(parentNodeRef, qnames, assocTypeQName);
|
||||
policy.beforeCreateChildAssociation(parentNodeRef, childNodeRef, assocTypeQName, assocQName);
|
||||
policy.beforeCreateChildAssociation(parentNodeRef, childNodeRef, assocTypeQName, assocQName, isNewNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see NodeServicePolicies.OnCreateChildAssociationPolicy#onCreateChildAssociation(ChildAssociationRef)
|
||||
*/
|
||||
protected void invokeOnCreateChildAssociation(ChildAssociationRef childAssocRef)
|
||||
protected void invokeOnCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNewNode)
|
||||
{
|
||||
// Get the parent reference and the assoc type qName
|
||||
NodeRef parentNodeRef = childAssocRef.getParentRef();
|
||||
@@ -460,7 +460,7 @@ public abstract class AbstractNodeServiceImpl implements NodeService
|
||||
Set<QName> qnames = getTypeAndAspectQNames(parentNodeRef);
|
||||
// execute policy for node type and aspects
|
||||
NodeServicePolicies.OnCreateChildAssociationPolicy policy = onCreateChildAssociationDelegate.get(parentNodeRef, qnames, assocTypeQName);
|
||||
policy.onCreateChildAssociation(childAssocRef);
|
||||
policy.onCreateChildAssociation(childAssocRef, isNewNode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user