Package org.brixcms.jcr.api

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


        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

                }
            }
        }

        // 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

    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

Related Classes of org.brixcms.jcr.api.JcrNodeIterator

Copyright © 2018 www.massapicom. 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.