Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How can I copy/move entire subtrees using Java?

Avatar

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

17 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

17 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
jkpanera
Level 3

23-03-2020

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
aemmarc
Employee

23-03-2020

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...

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

 

Answers (0)