AssetManagers moveAsset Operation in AEMcs environment - to move asset from one path to another | Community
Skip to main content
Level 3
January 18, 2022
Solved

AssetManagers moveAsset Operation in AEMcs environment - to move asset from one path to another

  • January 18, 2022
  • 1 reply
  • 1579 views

Hi All, 

I have a requirement to move asset/s from one path (/content/dam/sourcePath) to (/content/dam/dest) path.
I am planning to use asssetManager.moveAsset(..) operation from com.adobe.granite.asset.api.AssetManager API.

Ref.

https://www.adobe.io/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/asset/api/AssetManager.html

Considering the AEM's newer architecture(AEM CS), is this the right way to implement asset move functionality?

 

If I have to go with given API, how does assetManager.moveAsset operation works for already published assets, whether I need to unpublish it first and then invoke moveAsset operation or it will internally first unpublish it and then perform asset move?

Any suggestions please..

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nitin_laad

If any method is drepricated, you should see depricated word against method name, based on api specifications it looks moveAsset method is not depricated. 

For Asset Move optration - steps should be

1. Unpublish the asset - you can use OOB unpublish workflow step

2. Move Asset to destination path

3. Publish if needed. 

 

 

1 reply

Nitin_laad
Community Advisor
Nitin_laadCommunity AdvisorAccepted solution
Community Advisor
February 1, 2022

If any method is drepricated, you should see depricated word against method name, based on api specifications it looks moveAsset method is not depricated. 

For Asset Move optration - steps should be

1. Unpublish the asset - you can use OOB unpublish workflow step

2. Move Asset to destination path

3. Publish if needed.