Package javax.jcr

Examples of javax.jcr.Node.checkout()


        phase="checkin N2 uncommitted.";

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

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

        Version v2_3 = n2.getBaseVersion();

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


        }
        catch (VersionException e) {
            // success
        }

        node.checkout();
    }
}
View Full Code Here

    public Version checkpoint(String absPath) throws RepositoryException {
        // this is not quite correct, since the entire checkpoint operation
        // should be atomic
        Node node = session.getNode(absPath);
        Version v = node.checkin();
        node.checkout();
        return v;
    }

    /**
     * {@inheritDoc}
 
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

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

            assertFalse(tn.internalIsCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
            n.checkout();
            changeReadPermission(principal, n, true);
        }
    }
}
View Full Code Here

    /**
     * @see javax.jcr.version.VersionManager#checkout(String)
     */
    public void checkout(String absPath) throws UnsupportedRepositoryOperationException, LockException, RepositoryException {
        Node n = itemManager.getNode(resolver.getQPath(absPath));
        n.checkout();
    }

    /**
     * @see javax.jcr.version.VersionManager#checkpoint(String)
     */
 
View Full Code Here

            assertFalse(tn.isCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
            n.checkout();
            changeReadPermission(principal, n, true);
        }
    }

    public void testAddNodeUuid() throws RepositoryException, NotExecutableException {
View Full Code Here

        phase="checkin N2 uncommitted.";

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

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

        Version v2_3 = n2.getBaseVersion();

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

        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();
        history.addVersionLabel(versionB.getName(), "labelB", false);
        return versionable;
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.