Package javax.jcr

Examples of javax.jcr.Node.checkin()


        // checkin node inside tx
        n.checkin();

        // checkin node outside tx
        nOther.checkin();

        // commit
        try {
            utx.commit();
            fail("Commit failing with modified version history.");
View Full Code Here


                        "mix:versionable");
            }
        }
        testRootNode.save();

        node.checkin();

        node.lock(false, false);
        assertTrue("Locking of a checked-in node failed.",
                node.isLocked());
View Full Code Here

        String mixinName = NodeMixinUtil.getAddableMixinName(session, node);
        if (mixinName == null) {
            throw new NotExecutableException("No testable mixin node type found");
        }

        node.checkin();

        try {
            node.addMixin(mixinName);
            fail("Node.addMixin(String mixinName) must throw a VersionException " +
                    "if the node is checked-in.");
View Full Code Here

        testRootNode.save();

        // lock and check-in
        testNode.lock(false, true);
        testNode.save();
        testNode.checkin();

        // do the unlock
        testNode.unlock();
        assertFalse("Could not unlock a locked, checked-in node", testNode.holdsLock());
    }
View Full Code Here

        String mixinName = NodeMixinUtil.getAddableMixinName(session, node);
        if (mixinName == null) {
            throw new NotExecutableException("No testable mixin node type found");
        }

        node.checkin();

        assertFalse("Node.canAddMixin(String mixinName) must return false " +
                "if the node is checked-in.",
                node.canAddMixin(mixinName));
    }
View Full Code Here

        if (!child1.isNodeType(mixVersionable)) {
            child1.addMixin(mixVersionable);
        }
        versionableNode.save();
        // create v1.0 of child
        Version v1Child = child1.checkin();

        // V1 of versionable node has child1
        Version v1 = versionableNode.checkin();
        String v1Name = v1.getName();
View Full Code Here

        versionableNode.getVersionHistory().addVersionLabel(v1Name, "test", true);
        versionableNode.getVersionHistory().addVersionLabel(v1Name, "foo", true);

        // create V1.1 of child
        child1.checkout();
        Version v11Child = child1.checkin();
        child1.getVersionHistory().addVersionLabel(v11Child.getName(), "foo", true);

        // restore 1.0 of versionable node --> no child
        versionableNode.restore(version, true);
        assertFalse("Node.restore('1.0') must remove child node.", versionableNode.hasNode(nodeName4));
View Full Code Here

        if (!child1.isNodeType(mixVersionable)) {
            child1.addMixin(mixVersionable);
        }
        versionableNode.save();
        // create v1.0 of child
        Version v1Child = child1.checkin();

        // V1 of versionable node has child1
        String v1 = versionableNode.checkin().getName();

        // create V1.1 of child
View Full Code Here

        // V1 of versionable node has child1
        String v1 = versionableNode.checkin().getName();

        // create V1.1 of child
        child1.checkout();
        Version v11Child = child1.checkin();

        // V2 of versionable node has child1
        versionableNode.checkout();
        String v2 = versionableNode.checkin().getName();
View Full Code Here

        if (!child2.isNodeType(mixVersionable)) {
            child2.addMixin(mixVersionable);
        }
        testRoot.save();
        child1.checkin();
        child2.checkin();
        Version v1 = testRoot.checkin();

        // remove node 1
        testRoot.checkout();
        child1.remove();
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.