How can I copy/move entire subtrees using Java? | Community
Skip to main content
jkpanera
Level 4
Mar 23, 2020 1:28 PM UTC
Solved

How can I copy/move entire subtrees using Java?

I'd like to be able to copy or move entire subtrees using the Java API. In other words, is there an API analogous to the bash commands mv and cp -R?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
aemmarc2Accepted solution
Employee
Mar 23, 2020 2:28 PM UTC

I general -- a Move in AEM is a very expensive operation as any number of references and things need to be adjusted post move. Just be cognizant of that. If you're moving a lot of subtrees you may see some resource contention within the JCR.

 

This article is a bit dated but conveys what you can do with the API

 

https://helpx.adobe.com/ca/experience-manager/kb/How-to-move-an-asset-in-application-code-AEM-Assets.html

https://docs.adobe.com/docs/en/spec/jcr/1.0/7.1.7_Moving_and_Copying.html

 

1 reply

aemmarc2Accepted solution
Employee
Mar 23, 2020 2:28 PM UTC

I general -- a Move in AEM is a very expensive operation as any number of references and things need to be adjusted post move. Just be cognizant of that. If you're moving a lot of subtrees you may see some resource contention within the JCR.

 

This article is a bit dated but conveys what you can do with the API

 

https://helpx.adobe.com/ca/experience-manager/kb/How-to-move-an-asset-in-application-code-AEM-Assets.html

https://docs.adobe.com/docs/en/spec/jcr/1.0/7.1.7_Moving_and_Copying.html

 

Translate