Package javax.jcr

Examples of javax.jcr.Node.restore()


        propParent.checkout();

        p.setValue(newPropValue);
        p.save();

        propParent.restore(v, false);

        assertEquals("On restore of a OnParentVersion-IGNORE property P, the current value of P must be left unchanged.", p.getString(), newPropValue);
    }

    /**
 
View Full Code Here


        propParent.checkout();

        p.setValue(newPropValue);
        p.save();

        propParent.restore(v, false);

        assertEquals("On restore of a OnParentVersion-INITIALIZE property P, the current value of P must be left unchanged.", p.getString(), newPropValue);
    }

    /**
 
View Full Code Here

        Version v1 = versionableNode.checkin();
        versionableNode.remove();
        versionableNode = null;
        parent.getSession().save();

        parent.restore(v1, oldName, true);

        versionableNode = parent.getNode(oldName);

        String value = versionableNode.getProperty(propertyName1).getString();
        assertEquals("Restoring a node must set the correct property.", propertyValue2, value);
View Full Code Here

        propParent.checkout();

        p.setValue(newPropValue);
        p.save();

        propParent.restore(v, false);

        assertEquals("On restore of a OnParentVersion-COMPUTE property P, the current P in the workspace will be left unchanged.", p.getString(), newPropValue);
    }

    /**
 
View Full Code Here

        phase="restore N2 uncommitted.";

        tx = new UserTransactionImpl(s2);
        tx.begin();

        n2.restore("1.0", false);
        Version v2_2 = n2.getBaseVersion();

        check(v1_1, phase, "jcr:rootVersion", 1);
        check(v2_1, phase, "jcr:rootVersion", 1);
        check(v1_2, phase, "1.0", 0);
View Full Code Here

        }

        // restore child, then restore/checkout grandchild nodes
        for (int i = 0; i < NODES_COUNT; i++) {
            Node childNode = myRoot.getNode("child" + i);
            childNode.restore("1.0", false);
            Node grandChildNode = childNode.getNode("grandChild");
            grandChildNode.restore("1.0", false);
            // critical location regarding item state manager caching (see
            // JCR-1197)
            grandChildNode.checkout();
View Full Code Here

        // restore child, then restore/checkout grandchild nodes
        for (int i = 0; i < NODES_COUNT; i++) {
            Node childNode = myRoot.getNode("child" + i);
            childNode.restore("1.0", false);
            Node grandChildNode = childNode.getNode("grandChild");
            grandChildNode.restore("1.0", false);
            // critical location regarding item state manager caching (see
            // JCR-1197)
            grandChildNode.checkout();
            grandChildNode.checkin();
        }
View Full Code Here

        phase="restore N2 uncommitted.";

        tx = new UserTransactionImpl(s2);
        tx.begin();

        n2.restore("1.0", false);
        Version v2_2 = n2.getBaseVersion();

        check(v1_1, phase, "jcr:rootVersion", 1);
        check(v2_1, phase, "jcr:rootVersion", 1);
        check(v1_2, phase, "1.0", 0);
View Full Code Here

            Version version = node.checkin();
            node.checkout();
            assertEquals(1, node.getNodes("test").getSize());

            // - Restore any version of 'a'
            node.restore(version, true);
            assertEquals(1, node.getNodes("test").getSize());
        } finally {
            node.remove();
            session.save();
            session.logout();
View Full Code Here

        executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                Version v = (Version) getNode(versionId, sInfo);
                if (hasNode(sessionInfo, nodeId)) {
                    Node n = getNode(nodeId, sInfo);
                    n.restore(v, removeExisting);
                } else {
                    // restore with rel-Path part
                    Node n = null;
                    Path relPath = null;
                    Path path = nodeId.getPath();
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.