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


        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

        Node versionable = parent.addNode("versionable", "nt:myversionable");
        versionable.setProperty("foo", "A");
        parent.save();

        VersionHistory history = versionable.getVersionHistory();
        Version versionA = versionable.checkin();
        history.addVersionLabel(versionA.getName(), "labelA", false);
        versionable.checkout();
        versionable.setProperty("foo", "B");
        parent.save();
        Version versionB = versionable.checkin();
View Full Code Here

        Version versionA = versionable.checkin();
        history.addVersionLabel(versionA.getName(), "labelA", false);
        versionable.checkout();
        versionable.setProperty("foo", "B");
        parent.save();
        Version versionB = versionable.checkin();
        history.addVersionLabel(versionB.getName(), "labelB", false);
        return versionable;
    }

    protected void createProperties(Node parent, Node reference)
View Full Code Here

      String normalizePath = getNormalizePath(repoPath);
      try
      {
         Node srcVersionNode = (Node)session.getItem(normalizePath);

         srcVersionNode.checkin();
         session.save();

         srcVersionNode.checkout();
         srcVersionNode.setProperty("jcr:data", newValue);
         session.save();
View Full Code Here

            } else {
                fail("Node " + nodeName1 + " is not versionable and does not allow to add mix:versionable");
            }
        }
        testRootNode.save();
        versionable.checkin();

        try {
            query.storeAsNode(testRoot + "/" + nodeName1 + "/" + nodeName2);
            fail("Query.storeAsNode() must throw VersionException, parent node is checked in.");
        } catch (VersionException e) {
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

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

        node.checkin();

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

        Property property = node.setProperty(refPropName, referenceableNode);

        testRootNode.save();

        node.checkin();

        try {
            property.setValue(referenceableNode);
            node.save();
            fail("Property.setValue(Node) must throw a VersionException " +
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

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.