Package javax.jcr

Examples of javax.jcr.Node.checkout()


        }
    }

    public void testRemoveHoldOnCheckedInNode() throws NotExecutableException, RepositoryException {
        Node vn = getVersionableChildNode();
        vn.checkout();
        Node n = vn.addNode(nodeName2);
        Hold h = retentionMgr.addHold(n.getPath(), getHoldName(), false);
        superuser.save();

        // checkin on the parent node make the hold-containing node checked-in.
View Full Code Here


        modifyPrivileges(trn.getPath(), Privilege.JCR_NODE_TYPE_MANAGEMENT, true);
        modifyPrivileges(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, true);

        Node n = createVersionableNode(trn);
        Version v = n.checkin();
        n.checkout();
    }

    public void testWriteVersionStore() throws RepositoryException, NotExecutableException {
        Node trn = getTestNode();
        modifyPrivileges(trn.getPath(), PrivilegeRegistry.REP_WRITE, true);
View Full Code Here

        // test session should now be able to create versionable nodes, checkout
        // and checkin them, read the version/v-histories.

        Node testNode = trn.getNode(nodeName1);
        Version v = testNode.checkin();
        testNode.checkout();
        testNode.checkin();

        // remove ability to edit version information
        // -> VersionHistory.removeVersion must not be allowed.
        modifyPrivileges(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, false);
View Full Code Here

        Node n = createVersionableNode(testRootNode);
        modifyPrivileges(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, true);

        Node testNode = trn.getNode(nodeName1);
        Version v = testNode.checkin();
        testNode.checkout();
        testNode.checkin();

        // -> VersionHistory.removeVersion must not be allowed.
        try {
            testNode.getVersionHistory().removeVersion(v.getName());
View Full Code Here

            acMgr.setPolicy(tmpl.getPath(), tmpl);
            superuser.save();

            Node testNode = trn.getNode(nodeName1);
            Version v = testNode.checkin();
            testNode.checkout();
            testNode.checkin();

            // -> VersionHistory.removeVersion must be allowed           
            testNode.getVersionHistory().removeVersion(v.getName());
        } finally {
View Full Code Here

        // create 2 independent versions for a node and its corresponding node
        // so merge fails for this node

        // default workspace
        Node originalNode = testRootNode.getNode(nodeName1);
        originalNode.checkout();
        originalNode.checkin();

        // second workspace
        nodeToMerge.checkin();
View Full Code Here

        /// create successor versions for a node
        // so merge fails for this node

        // default workspace
        Node originalNode = testRootNode.getNode(nodeName1);
        originalNode.checkout();
        originalNode.checkin();

        // "merge" the clonedNode with the newNode from the default workspace
        // merge, besteffort set to false
        try {
View Full Code Here

        /// create 2 independent base versions for a node and its corresponding node
        // so merge fails for this node

        // default workspace
        Node originalNode = testRootNode.getNode(nodeName1);
        originalNode.checkout();
        originalNode.checkin();

        // second workspace
        nodeToMerge.checkin();
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

        // create 2 independent versions for a node and its corresponding node
        // so merge fails for this node

        // default workspace
        Node originalNode = testRootNode.getNode(nodeName1);
        originalNode.checkout();
        originalNode.checkin();

        // second workspace
        nodeToMerge.checkin();
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.