How do I fetch the number of versions present in an asset in AEM programmatically?
Hi everyone,
I have a requirement to fetch the number of versions present in an Asset using a servlet.
Can anyone please provide some references?
Thanks in advance.
Hi everyone,
I have a requirement to fetch the number of versions present in an Asset using a servlet.
Can anyone please provide some references?
Thanks in advance.
Hello @kaibalyajena_123
As I understood your requirement, you need the number of versions created for a given asset.
You can use VersionHistory Interface to get all the versions and their details. Please refer below doc link for available methods.
https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionHistory.html
Do let me know if you face any issues or you have different requirement?
Hope it helps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.