How to add revisions to assets programmatically? | Adobe Higher Education
Skip to main content
October 16, 2015
Répondu

How to add revisions to assets programmatically?

I am trying to move revisions/versions from an asset to another programmatically. I am getting the revisions using the AssetManager, calling getRevisions(path, calendar), but I don't know how to add them to another asset programmatically. Thanks!

Ce sujet a été fermé aux réponses.
Meilleure réponse par Yogesh_Upadhyay

Hello,

I am not sure if you can do that directly. You might have to get all version, create data using version (by restoring) and then check in that version to create new version for new asset. There is no DAM API to do that, You can use JCR version API http://www.day.com/specs/jcr/2.0/15_Versioning.html. See if this helps,

http://www.wemblog.com/2012/08/how-to-work-with-version-in-cq.html

Yogesh

1 commentaire

Yogesh_Upadhyay
Level 6
October 16, 2015

Hello,

I am not sure if you can do that directly. You might have to get all version, create data using version (by restoring) and then check in that version to create new version for new asset. There is no DAM API to do that, You can use JCR version API http://www.day.com/specs/jcr/2.0/15_Versioning.html. See if this helps,

http://www.wemblog.com/2012/08/how-to-work-with-version-in-cq.html

Yogesh