mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Removed beforeUpdateParent policy calls for association modifications.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5968 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -297,7 +297,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Invoke policy behaviour
|
// Invoke policy behaviour
|
||||||
invokeBeforeUpdateNode(parentRef);
|
|
||||||
invokeBeforeCreateNode(parentRef, assocTypeQName, assocQName, nodeTypeQName);
|
invokeBeforeCreateNode(parentRef, assocTypeQName, assocQName, nodeTypeQName);
|
||||||
invokeBeforeCreateNodeAssociation(parentRef, assocTypeQName, assocQName);
|
invokeBeforeCreateNodeAssociation(parentRef, assocTypeQName, assocQName);
|
||||||
|
|
||||||
@@ -409,8 +408,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
// get the primary parent assoc
|
// get the primary parent assoc
|
||||||
ChildAssoc oldAssoc = nodeDaoService.getPrimaryParentAssoc(nodeToMove);
|
ChildAssoc oldAssoc = nodeDaoService.getPrimaryParentAssoc(nodeToMove);
|
||||||
ChildAssociationRef oldAssocRef = oldAssoc.getChildAssocRef();
|
ChildAssociationRef oldAssocRef = oldAssoc.getChildAssocRef();
|
||||||
// get the old parent
|
|
||||||
Node oldParentNode = oldAssoc.getParent();
|
|
||||||
|
|
||||||
boolean movingStore = !nodeToMoveRef.getStoreRef().equals(newParentRef.getStoreRef());
|
boolean movingStore = !nodeToMoveRef.getStoreRef().equals(newParentRef.getStoreRef());
|
||||||
|
|
||||||
@@ -428,8 +425,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
{
|
{
|
||||||
invokeBeforeDeleteChildAssociation(oldAssocRef);
|
invokeBeforeDeleteChildAssociation(oldAssocRef);
|
||||||
invokeBeforeCreateChildAssociation(newParentRef, nodeToMoveRef, assocTypeQName, assocQName);
|
invokeBeforeCreateChildAssociation(newParentRef, nodeToMoveRef, assocTypeQName, assocQName);
|
||||||
invokeBeforeUpdateNode(oldParentNode.getNodeRef()); // old parent will be updated
|
|
||||||
invokeBeforeUpdateNode(newParentRef); // new parent ditto
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove the child assoc from the old parent
|
// remove the child assoc from the old parent
|
||||||
@@ -743,7 +738,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
public ChildAssociationRef addChild(NodeRef parentRef, NodeRef childRef, QName assocTypeQName, QName assocQName)
|
public ChildAssociationRef addChild(NodeRef parentRef, NodeRef childRef, QName assocTypeQName, QName assocQName)
|
||||||
{
|
{
|
||||||
// Invoke policy behaviours
|
// Invoke policy behaviours
|
||||||
invokeBeforeUpdateNode(parentRef);
|
|
||||||
invokeBeforeCreateChildAssociation(parentRef, childRef, assocTypeQName, assocQName);
|
invokeBeforeCreateChildAssociation(parentRef, childRef, assocTypeQName, assocQName);
|
||||||
|
|
||||||
// get the parent node and ensure that it is a container node
|
// get the parent node and ensure that it is a container node
|
||||||
@@ -1262,9 +1256,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
public AssociationRef createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName)
|
public AssociationRef createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName)
|
||||||
throws InvalidNodeRefException, AssociationExistsException
|
throws InvalidNodeRefException, AssociationExistsException
|
||||||
{
|
{
|
||||||
// Invoke policy behaviours
|
|
||||||
invokeBeforeUpdateNode(sourceRef);
|
|
||||||
|
|
||||||
Node sourceNode = getNodeNotNull(sourceRef);
|
Node sourceNode = getNodeNotNull(sourceRef);
|
||||||
Node targetNode = getNodeNotNull(targetRef);
|
Node targetNode = getNodeNotNull(targetRef);
|
||||||
// see if it exists
|
// see if it exists
|
||||||
@@ -1278,7 +1269,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
AssociationRef assocRef = assoc.getNodeAssocRef();
|
AssociationRef assocRef = assoc.getNodeAssocRef();
|
||||||
|
|
||||||
// Invoke policy behaviours
|
// Invoke policy behaviours
|
||||||
invokeOnUpdateNode(sourceRef);
|
|
||||||
invokeOnCreateAssociation(assocRef);
|
invokeOnCreateAssociation(assocRef);
|
||||||
|
|
||||||
return assocRef;
|
return assocRef;
|
||||||
@@ -1298,14 +1288,10 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
}
|
}
|
||||||
AssociationRef assocRef = assoc.getNodeAssocRef();
|
AssociationRef assocRef = assoc.getNodeAssocRef();
|
||||||
|
|
||||||
// Invoke policy behaviours
|
|
||||||
invokeBeforeUpdateNode(sourceRef);
|
|
||||||
|
|
||||||
// delete it
|
// delete it
|
||||||
nodeDaoService.deleteNodeAssoc(assoc);
|
nodeDaoService.deleteNodeAssoc(assoc);
|
||||||
|
|
||||||
// Invoke policy behaviours
|
// Invoke policy behaviours
|
||||||
invokeOnUpdateNode(sourceRef);
|
|
||||||
invokeOnDeleteAssociation(assocRef);
|
invokeOnDeleteAssociation(assocRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user