Examples of JcrNodeIterator


Examples of org.brixcms.jcr.api.JcrNodeIterator

            if (exists == false) {
                // if there was no node with such uuid in target workspace
                return session.getNodeByIdentifier(uuid);
            } else {
                // otherwise get the latest child with such name
                JcrNodeIterator iterator = parentNode.getNodes(name);
                iterator.skip(iterator.getSize() - 1);
                JcrNode newNode = iterator.nextNode();
                String newUuid = newNode.getIdentifier();

                // and if it has uuid other than the existing one (should always
                // be the case)
                if (uuid.equals(newUuid) == false) {
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNodeIterator

        pair.originalNode = originalNode;
        pair.targetNode = targetNode;
        nodes.add(pair);

        // go over nodes and call the method recursively
        JcrNodeIterator nodeIterator = originalNode.getNodes();
        while (nodeIterator.hasNext()) {
            createNodeAndChildren(nodeIterator.nextNode(), targetNode, xmlns, uuidMap, nodes);
        }
    }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNodeIterator

                }
            }
        }

        // go through children and do a recursive check for dependencies
        JcrNodeIterator nodes = node.getNodes();
        while (nodes.hasNext()) {
            JcrNode child = nodes.nextNode();
            checkDependencies(child, paths, targetWorkspace, result);
        }
    }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNodeIterator

    private void checkForSiteRoot(JcrNode webNode) {
        if (!webNode.hasNode(SITE_NODE_NAME)) {
            JcrNode site = webNode.addNode(SITE_NODE_NAME, "nt:folder");
            site.addMixin(BrixNode.JCR_TYPE_BRIX_NODE);

            JcrNodeIterator nodes = webNode.getNodes();
            while (nodes.hasNext()) {
                BrixNode node = (BrixNode) nodes.nextNode();
                if (node.isSame(site) == false && node instanceof GlobalContainerNode == false) {
                    JcrSession session = webNode.getSession();
                    session.move(node.getPath(), site.getPath() + "/" + node.getName());
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.