Added removeChildAssociation method to NodeService

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4706 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-01-02 14:25:16 +00:00
parent f2c70b78e1
commit 61c2f1a614
8 changed files with 179 additions and 34 deletions

View File

@@ -771,6 +771,23 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
// done
}
public boolean removeChildAssociation(ChildAssociationRef childAssocRef)
{
Node parentNode = getNodeNotNull(childAssocRef.getParentRef());
Node childNode = getNodeNotNull(childAssocRef.getChildRef());
QName typeQName = childAssocRef.getTypeQName();
QName qname = childAssocRef.getQName();
// Delete the association
invokeBeforeDeleteChildAssociation(childAssocRef);
boolean deleted = nodeDaoService.deleteChildAssoc(parentNode, childNode, typeQName, qname);
if (deleted)
{
invokeOnDeleteChildAssociation(childAssocRef);
}
// Done
return deleted;
}
/**
* Remove properties that should not be persisted as general properties. Where necessary, the
* properties are set on the node.