Search code examples
aemjackrabbit-oak

How does versioning and version control management work in Oak?


Can we say that OAK 1.4 provides versioning and version control management features out of box? If so, how ? Also does it imply that the same features are available to AEM Authors i.e. exposed to the top layer ?


Solution

  • Jackrabbit has always provided version management at its core. In OAK implementation its packaged under org.apache.jackrabbit.oak.jcr.version.

    The details around the functional aspect of JackRabbit Versioning (it holds true for OAK as well) can be found in Wiki here

    The core concept revolves around mixin type mix:versionable, in OAK any node with mixing type mix:versionable can be versioned to maintain change history. The key aspect to the implementation is the VersionManager class that provides API for version relation operations.

    In AEM, the core concepts of the versioning from JCR are extended and provided in more restricted way. AEM allows for the versioning of Pages only, this is limited by providing its own implementation of VersionManager in package com.day.cq.wcm.core.impl.VersionManagerImpl, refer to documentation here

    By default in AEM, a version for a page is created on Activation of page. AEM provides GUI interface in Classic UI to explicitly create version on a page and there is a OOTB process step available for versioning to be used as is in custom workflow implementations.