I have created a node and created 2 versions of it using VersionManager checkout and checkin feature. I am adding/setting xyz files contents in jcr:content property.
version::jcr:rootVersion
hasNode:jcr_content :false
version::1.0
hasNode:jcr_content :true
version::1.1
hasNode:jcr_content :true
But when I am trying to get all versions data using below code, I am not able to get jcr:content property of jcr:rootVersion node. I am able to to fetch files contents using jcr:content property of version 1.0 and 1.1
if (node.isNodeType(NodeType.MIX_VERSIONABLE)) {
final VersionHistory versionHistory = session.getWorkspace().getVersionManager().getVersionHistory(node.getPath());
final VersionIterator itr = versionHistory.getAllVersions();
while (itr.hasNext()) {
final Version v = itr.nextVersion();
final Node frozenNode = v.getFrozenNode();
log.info("version::" + v.getName());
log.info("hasNode:jcr_content :" + frozenNode.hasNode(Property.JCR_CONTENT));
}
}
How I can get files content from rootversion node, why jcr:content property is not available for root version in jcr version history.
See https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.13.5.2%20Root%20Version: