Package javax.jcr

Examples of javax.jcr.Node.checkin()


        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


        String primaryTypeName = getPrimaryTypeName(session, node);
        if (primaryTypeName == null) {
            throw new NotExecutableException("No testable node type found");
        }

        node.checkin();

        try {
            node.setPrimaryType(primaryTypeName);
            fail("Node.setPrimaryType(String) must throw a VersionException if the node is checked-in.");
        } catch (VersionException e) {
View Full Code Here

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

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

        n2.checkout();
        n2.checkin();

        Version v2_3 = n2.getBaseVersion();

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

        if (!child1.isNodeType(mixVersionable)) {
            child1.addMixin(mixVersionable);
        }
        versionableNode.getSession().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 (!child1.isNodeType(mixVersionable)) {
            child1.addMixin(mixVersionable);
        }
        versionableNode.getSession().save();
        // create v1.0 of child
        Version v1Child = child1.checkin();

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

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

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

        // remove node 1
        testRoot.checkout();
        child1.remove();
View Full Code Here

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

        // reoder nodes
        testRoot.checkout();
        testRoot.orderBefore(nodeName2, nodeName1);
View Full Code Here

            NodeImpl tn = (NodeImpl) readOnly.getItem(testNode.getPath());
            assertTrue(tn.internalIsCheckedOut());

            n.addMixin(mixVersionable);
            testRootNode.save();
            n.checkin();

            assertFalse(tn.internalIsCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
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.