As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
ChildAssociationRef assocRef = this.nodeService.getPrimaryParent(sourceNodeRef); nodeService.moveNode(sourceNodeRef, targetNodeRef, ContentModel.ASSOC_CONTAINS, assocRef.getQName());
fileFolderService.move(nodeRef, targetParentFolderNodeRef, null);
Note that in Alfresco's “moveNode” call, they use destinationAssocQName as the qname of the newly movednode. That variable resolves to the string “move”. If you ever move more than one documentinto a folder using that action, you'll get integrity violations. This seems like a bug to me. My version ofthe “moveNode” call uses the current name of the object being moved as the new name, which seemslike a better way to go.