Jackrabbit редактировать узел без создания новой версии - PullRequest
0 голосов
/ 13 ноября 2018

Есть ли способ редактировать свойства узла без создания новой версии? Я прочитал кое-что об удалении VersionManager.checkin (), но это не влияет на мой код

            final Node fileNode = documentRoot.getNode(item.getName());
            vm.checkout(fileNode.getPath());
            if (item.getMetadata() != null) {
                item.getMetadata().forEach((k, v) -> {
                    try {
                        // metadata is stored as mixins
                        fileNode.addMixin(nodepropPrefix + k);
                        fileNode.setProperty(nodepropPrefix + k, v);
                    } catch (RepositoryException e) {
                        LOGGER.error("Error setting property:", e);
                    }
                });
            }
            Node contentNode = fileNode.getNode("jcr:content");
            Binary binary = session.getValueFactory().createBinary(item.getBinary());
            contentNode.setProperty("jcr:data", binary);
            contentNode.setProperty("jcr:mimeType", item.getMimeType());
            session.save();
            //vm.checkin(fileNode.getPath());
            return fileNode.getPath();
...