cancel
Showing results for 
Search instead for 
Did you mean: 

Copying entire node tree with CMLCopy

maggot84
Champ in-the-making
Champ in-the-making
Hi, I got a serious problem.
I have a space template which I keep in the 'Company home/Dictionary/Space templates' directory and it has a tree structure, so there is one root node (space), it contains a couple of other nodes and so on. When I copy the root node using the CMLCopy class weird things happen. It seems to have created a new node like the template root in the specified location with a new uuid, but the child nodes seem to be just links instead of new nodes (they seem to keep their old ids form the template). Why do I think that? Beacuse when I add content to the child nodes in my space template it also magically appears in the nodes that were copied and the other way around - add content to new location, it appears in the template. Does anyone know what the deal is? Does CMLCopy allow the copying of ONLY one node and then if the node has any children it just creates links to them instead of actual copies?
I would appreciate any form of help.
Thanks
6 REPLIES 6

aubertinp
Champ in-the-making
Champ in-the-making
Does anyone knows how to do it?

Can we copy entire node?

Thanks

sisao
Champ in-the-making
Champ in-the-making
Can you successfully use the CMLCopy class? I have a type mismatch while passing a ParentReference object to its "setTo(ParentReference)" method….so i cant initialize it.
I dont have problems with CMLCreate or CMLDelete though.

sisao
Champ in-the-making
Champ in-the-making
there was a type mismatch using org.alfresco.repo.webservices.types.*

aubertinp
Champ in-the-making
Champ in-the-making
Nobody wants to give a simple function to copy a entire node?

Alright, I well do it…

salmon
Champ in-the-making
Champ in-the-making
I have an exactly same problem… copying template creates just some kind of "refrences" not copies… did anybody found a solution?

salmon
Champ in-the-making
Champ in-the-making
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.