Examples of checkout()


Examples of javax.jcr.Node.checkout()

        Node n = createVersionableNode(superuser.getNode(path));
        Version v = n.checkin();
        VersionHistory vh = n.getVersionHistory();
        n.checkout();
        Version v2 = n.checkin();
        n.checkout();

        testSession.refresh(false);
        assertFalse(testAcMgr.hasPrivileges(n.getPath(), versionPrivileges));
        AccessControlList acl = deny(SYSTEM, privilegesFromName(Privilege.JCR_READ));
View Full Code Here

Examples of javax.jcr.Node.checkout()

            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

Examples of javax.jcr.Node.checkout()

        firstNode.addMixin(JcrConstants.MIX_VERSIONABLE);
        firstNode.getSession().save();

        // create version for the node
        Version firstNodeVersion = firstNode.checkin();
        firstNode.checkout();

        Node secondNode = testRootNode.addNode(nodeName2);
        secondNode.setPrimaryType(JcrConstants.NT_UNSTRUCTURED);
        secondNode.addMixin(JcrConstants.MIX_VERSIONABLE);
        Property firstNodeVersionFrozenUuid = firstNodeVersion.getFrozenNode().getProperty(JcrConstants.JCR_FROZENUUID);
View Full Code Here

Examples of javax.jcr.Node.checkout()

        secondNode.setProperty(JcrConstants.JCR_FROZENUUID, firstNodeVersionFrozenUuid.getValue());
        secondNode.getSession().save();

        // create version of the second node
        Version secondNodeVersion = secondNode.checkin();
        secondNode.checkout();

        // frozenUuid from the second node version node should not be the same as the one from the first node version
        Property secondBodeVersionFrozenUuid = secondNodeVersion.getFrozenNode().getProperty(JcrConstants.JCR_FROZENUUID);
        assertFalse(JcrConstants.JCR_FROZENUUID + " should not be the same for two different versions of different nodes! ",
                secondBodeVersionFrozenUuid.getValue().equals(firstNodeVersionFrozenUuid.getValue()));
View Full Code Here

Examples of javax.jcr.Node.checkout()

        // mark V1 with label test and foo
        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);
View Full Code Here

Examples of javax.jcr.Node.checkout()

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

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

Examples of javax.jcr.Node.checkout()

        }
        catch (VersionException e) {
            // success
        }

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

Examples of javax.jcr.Node.checkout()

    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

Examples of javax.jcr.Node.checkout()

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