@Override
    public ExplorerNode ensureFolderPath(final DocPath docPath,
                                         final ExplorerNode baseNode,
                                         final PermissionInheritance permissionInheritance) {
        Objects.requireNonNull(baseNode);

        if (docPath.isAbsolute() && !Objects.equals(baseNode, explorerNodeService.getRoot())) {
            throw new IllegalArgumentException(LogUtil.message(
                    "docPath {} is absolute so baseNode must be the root node {}",
                    docPath, explorerNodeService.getRoot()));
        }
        Objects.requireNonNull(docPath);
        AtomicReference<ExplorerNode> parentNode = new AtomicReference<>(baseNode);
        docPath.forEach((idx, pathPart) -> {
            final List<ExplorerNode> childNodes = explorerNodeService.getNodesByNameAndType(
                    parentNode.get(),
                    pathPart,
                    ExplorerConstants.FOLDER_TYPE);
            final ExplorerNode childNode;

            if (childNodes.size() > 1) {
                throw new RuntimeException(LogUtil.message(
                        "Found {} folders with name '{}' that are a child of {}",
                        childNodes.size(), pathPart, parentNode));
            } else if (childNodes.isEmpty()) {
                // node doesn't exist so create it
                childNode = create(
                        ExplorerConstants.FOLDER_TYPE,
                        pathPart,
                        parentNode.get(),
                        PermissionInheritance.DESTINATION);
            } else {
                // One node found
                childNode = childNodes.get(0);
            }
            parentNode.set(childNode);
        });
        return parentNode.get();
    }
@return True if any one of childNodes (or their descendants) has node info and is included
in treeModelOut
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/ExplorerServiceImpl.java