test_class.declarator: versionable
test_class.modifier: protected
test_class.original_string: protected Tree versionable;
test_class.type: Tree
test_class.var_name: versionable
test_class.declarator: workspaceName
test_class.modifier: private
test_class.original_string: private String workspaceName;
test_class.type: String
test_class.var_name: workspaceName
test_class.declarator: versionManager
test_class.modifier: protected
test_class.original_string: protected ReadOnlyVersionManager versionManager;
test_class.type: ReadOnlyVersionManager
test_class.var_name: versionManager
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerTest.java
test_class.identifier: ReadOnlyVersionManagerTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testGetVersionable() throws Exception {
          Tree versionHistory = checkNotNull(versionManager.getVersionHistory(root.getTree("/a")));
          assertVersionable("/a", versionHistory);
  
          Tree rootVersion = versionHistory.getChild(JcrConstants.JCR_ROOTVERSION);
          assertVersionable("/a", rootVersion);
  
          Tree baseVersion = checkNotNull(versionManager.getBaseVersion(versionable));
          assertVersionable("/a", baseVersion);
  
          Tree frozen = baseVersion.getChild(VersionConstants.JCR_FROZENNODE);
          assertVersionable("/a", frozen);
  
          Tree frozenB = frozen.getChild("b");
          assertVersionable("/a/b", frozenB);
  
          Tree frozenC = frozenB.getChild("c");
          assertVersionable("/a/b/c", frozenC);
      }
test_case.class_method_signature: ReadOnlyVersionManagerTest.testGetVersionable()
test_case.full_signature: @Test public void testGetVersionable()
test_case.identifier: testGetVersionable
test_case.invocations: checkNotNull getVersionHistory getTree assertVersionable getChild assertVersionable checkNotNull getBaseVersion assertVersionable getChild assertVersionable getChild assertVersionable getChild assertVersionable
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetVersionable()
focal_class.declarator: log = LoggerFactory.getLogger(ReadOnlyVersionManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(ReadOnlyVersionManager.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java
focal_class.identifier: ReadOnlyVersionManager
focal_class.class_method_signature: ReadOnlyVersionManager.getVersionStorage()
focal_class.full_signature: @NotNull protected abstract Tree getVersionStorage()
focal_class.identifier: getVersionStorage
focal_class.modifiers: @NotNull protected abstract
focal_class.parameters: ()
focal_class.return: Tree
focal_class.signature: Tree getVersionStorage()
focal_class.class_method_signature: ReadOnlyVersionManager.getWorkspaceRoot()
focal_class.full_signature: @NotNull protected abstract Root getWorkspaceRoot()
focal_class.identifier: getWorkspaceRoot
focal_class.modifiers: @NotNull protected abstract
focal_class.parameters: ()
focal_class.return: Root
focal_class.signature: Root getWorkspaceRoot()
focal_class.class_method_signature: ReadOnlyVersionManager.getNodeTypeManager()
focal_class.full_signature: @NotNull protected abstract ReadOnlyNodeTypeManager getNodeTypeManager()
focal_class.identifier: getNodeTypeManager
focal_class.modifiers: @NotNull protected abstract
focal_class.parameters: ()
focal_class.return: ReadOnlyNodeTypeManager
focal_class.signature: ReadOnlyNodeTypeManager getNodeTypeManager()
focal_class.class_method_signature: ReadOnlyVersionManager.getInstance(final Root root,
                                                       final NamePathMapper namePathMapper)
focal_class.full_signature: @NotNull public static ReadOnlyVersionManager getInstance(final Root root,
                                                       final NamePathMapper namePathMapper)
focal_class.identifier: getInstance
focal_class.modifiers: @NotNull public static
focal_class.parameters: (final Root root,
                                                       final NamePathMapper namePathMapper)
focal_class.return: ReadOnlyVersionManager
focal_class.signature: ReadOnlyVersionManager getInstance(final Root root,
                                                       final NamePathMapper namePathMapper)
focal_class.class_method_signature: ReadOnlyVersionManager.isCheckedOut(@NotNull Tree tree)
focal_class.full_signature: public boolean isCheckedOut(@NotNull Tree tree)
focal_class.identifier: isCheckedOut
focal_class.modifiers: public
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean isCheckedOut(@NotNull Tree tree)
focal_class.class_method_signature: ReadOnlyVersionManager.getVersionHistory(@NotNull Tree versionable)
focal_class.full_signature: @Nullable public Tree getVersionHistory(@NotNull Tree versionable)
focal_class.identifier: getVersionHistory
focal_class.modifiers: @Nullable public
focal_class.parameters: (@NotNull Tree versionable)
focal_class.return: Tree
focal_class.signature: Tree getVersionHistory(@NotNull Tree versionable)
focal_class.class_method_signature: ReadOnlyVersionManager.getVersion(@NotNull String uuid)
focal_class.full_signature: @Nullable public Tree getVersion(@NotNull String uuid)
focal_class.identifier: getVersion
focal_class.modifiers: @Nullable public
focal_class.parameters: (@NotNull String uuid)
focal_class.return: Tree
focal_class.signature: Tree getVersion(@NotNull String uuid)
focal_class.class_method_signature: ReadOnlyVersionManager.getVersionHistoryPath(@NotNull String uuid)
focal_class.full_signature: @NotNull public String getVersionHistoryPath(@NotNull String uuid)
focal_class.identifier: getVersionHistoryPath
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull String uuid)
focal_class.return: String
focal_class.signature: String getVersionHistoryPath(@NotNull String uuid)
focal_class.class_method_signature: ReadOnlyVersionManager.getBaseVersion(@NotNull Tree versionable)
focal_class.full_signature: @Nullable public Tree getBaseVersion(@NotNull Tree versionable)
focal_class.identifier: getBaseVersion
focal_class.modifiers: @Nullable public
focal_class.parameters: (@NotNull Tree versionable)
focal_class.return: Tree
focal_class.signature: Tree getBaseVersion(@NotNull Tree versionable)
focal_class.class_method_signature: ReadOnlyVersionManager.isVersionStoreTree(@NotNull Tree tree)
focal_class.full_signature: public static boolean isVersionStoreTree(@NotNull Tree tree)
focal_class.identifier: isVersionStoreTree
focal_class.modifiers: public static
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean isVersionStoreTree(@NotNull Tree tree)
focal_class.class_method_signature: ReadOnlyVersionManager.getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)
focal_class.full_signature: @Nullable public Tree getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)
focal_class.identifier: getVersionable
focal_class.modifiers: @Nullable public
focal_class.parameters: (@NotNull Tree versionTree, @NotNull String workspaceName)
focal_class.return: Tree
focal_class.signature: Tree getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)
focal_class.class_method_signature: ReadOnlyVersionManager.getIdentifierManager()
focal_class.full_signature: protected IdentifierManager getIdentifierManager()
focal_class.identifier: getIdentifierManager
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: IdentifierManager
focal_class.signature: IdentifierManager getIdentifierManager()
focal_class.class_method_signature: ReadOnlyVersionManager.checkVersionable(@NotNull Tree tree)
focal_class.full_signature: @NotNull protected Tree checkVersionable(@NotNull Tree tree)
focal_class.identifier: checkVersionable
focal_class.modifiers: @NotNull protected
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: Tree
focal_class.signature: Tree checkVersionable(@NotNull Tree tree)
focal_class.class_method_signature: ReadOnlyVersionManager.isVersionable(@NotNull Tree tree)
focal_class.full_signature: protected boolean isVersionable(@NotNull Tree tree)
focal_class.identifier: isVersionable
focal_class.modifiers: protected
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean isVersionable(@NotNull Tree tree)
focal_class.class_method_signature: ReadOnlyVersionManager.isVersionable(NodeState versionableCandidate)
focal_class.full_signature:  boolean isVersionable(NodeState versionableCandidate)
focal_class.identifier: isVersionable
focal_class.parameters: (NodeState versionableCandidate)
focal_class.return: boolean
focal_class.signature: boolean isVersionable(NodeState versionableCandidate)
focal_method.body: @Nullable
      public Tree getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName) {
          Root root = getWorkspaceRoot();
          String relPath = "";
          Tree t = versionTree;
          while (t.exists() && !isVersionStoreTree(t) && !t.isRoot()) {
              String ntName = TreeUtil.getPrimaryTypeName(t);
              if (VersionConstants.NT_FROZENNODE.equals(ntName)) {
                  relPath = PathUtils.relativize(t.getPath(), versionTree.getPath());
              } else if (JcrConstants.NT_VERSIONHISTORY.equals(ntName)) {
                  PropertyState prop = t.getProperty(workspaceName);
                  if (prop != null) {
                      return root.getTree(PathUtils.concat(prop.getValue(Type.PATH), relPath));
                  } else {
                      // version history is missing the versionable path property for the given workspace name
                      log.warn("Missing versionable path property for {} at {}", workspaceName, t.getPath());
                      break;
                  }
              }
              t = t.getParent();
          }
  
          // intermediate node in the version storage that matches none of the special
          // conditions checked above and cannot be resolve to a versionable tree.
          return null;
      }
focal_method.class_method_signature: ReadOnlyVersionManager.getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)
focal_method.full_signature: @Nullable public Tree getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)
focal_method.identifier: getVersionable
focal_method.invocations: getWorkspaceRoot exists isVersionStoreTree isRoot getPrimaryTypeName equals relativize getPath getPath equals getProperty getTree concat getValue warn getPath getParent
focal_method.modifiers: @Nullable public
focal_method.parameters: (@NotNull Tree versionTree, @NotNull String workspaceName)
focal_method.return: Tree
focal_method.signature: Tree getVersionable(@NotNull Tree versionTree, @NotNull String workspaceName)