From eb20aa587b6e908290d4a9031222a6699c0ffdfa Mon Sep 17 00:00:00 2001 From: David Caruana Date: Fri, 12 Mar 2010 22:27:42 +0000 Subject: [PATCH] Merging BRANCHES/DEV/BELARUS/HEAD-2010_03_09 to HEAD: 19261: CMIS-WS: Bug fixing in WS Bindings and CMISServices Bug related to DeleteTree with "unfile" flag was fixed. - Removal of secondary parent associations was added to CMISServices.deleteObject method. Objects state verification was added to MultifillingService. - Verification of object and folder type was added. Verification of object presence in folder was added. - Checking constraints for versioning typeDef was added. DiscoveryService.query() problems were fixed. - includeRelationships feature was added to DMDiscoveryServicePort.query(). - DMAbstractServicePort was refactored and extended to introduce functionality required for includeRelationships feature in other binding port implementations. TCK bug fixing - Test cases in Java TCK tests for Query Ordering problem demonstration were developed (CmisDiscoveryServiceClient.testQueryWithAscendingOrdering() and CmisDiscoveryServiceClient.testQueryWithDescendingOrdering()). - CmisDiscoveryServiceClient.testQueryAllVersionsSearchable() was corrected. Using of invalid property "cmis:parentId" for none folder object was removed. - CmisDiscoveryServiceClient.testQueryRelationships() was fixed. Currently, this method correctly tests relationships receiving for each EnumIncludeRelationships constant. Relationships supporting by repository checking was added. Test was redeveloped against new functionality. - Expected exceptions verification was corrected. - Properties filter was corrected in concordance with CMIS Specification. - RepositoryInfo and capabilities assertion was fixed and extended. - Test for latest non-major version receiving was corrected. - TCK Build file was corrected. WSI part was removed. Target "jar" that creates one executable jar was added. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19270 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/cmis/mapping/CMISServicesImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java index 1cd8163815..ed1d02afc9 100644 --- a/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java +++ b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java @@ -1458,7 +1458,19 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware, } versionService.deleteVersionHistory(nodeRef); } - + + // Remove not primary parent associations + List childAssociations = nodeService.getParentAssocs(nodeRef); + if (childAssociations != null) + { + for (ChildAssociationRef childAssoc : childAssociations) + { + if (!childAssoc.isPrimary()) + { + nodeService.removeChildAssociation(childAssoc); + } + } + } // Attempt to delete the node nodeService.deleteNode(nodeRef); }