Examples of checkIn()


Examples of javax.jcr.Node.checkin()

        modify(path, REP_WRITE, true);
        modify(path, Privilege.JCR_NODE_TYPE_MANAGEMENT, true);
        modify(path, Privilege.JCR_VERSION_MANAGEMENT, true);

        Node n = createVersionableNode(testSession.getNode(path));
        n.checkin();
        n.checkout();
    }

    @Test
    public void testCheckInCheckout() throws Exception {
View Full Code Here

Examples of javax.jcr.Node.checkin()

        Node n = createVersionableNode(superuser.getNode(path));
        try {
            testSession.refresh(false);
            Node testNode = testSession.getNode(n.getPath());
            testNode.checkin();
            fail("Missing jcr:versionManagement privilege -> checkin/checkout must fail.");
        } catch (AccessDeniedException e) {
            // success
            // ... but the property must not be modified nor indicating
            // checkedIn status
View Full Code Here

Examples of javax.jcr.Node.checkin()

        Node trn = testSession.getNode(path);
        modify(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, true);

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

        // removing a version must be allowed
        testNode.getVersionHistory().removeVersion(v.getName());
    }
View Full Code Here

Examples of javax.jcr.Node.checkin()

        Node trn = testSession.getNode(path);
        modify(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, true);

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

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

Examples of javax.jcr.Node.checkin()

     */
    @Ignore("OAK-168") // FIXME: waiting for basic version mgt
    @Test
    public void testRemoveVersion3() throws Exception {
        Node n = createVersionableNode(superuser.getNode(path));
        Version v = n.checkin();
        n.checkout();

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

Examples of javax.jcr.Node.checkin()

     * @since oak
     */
    @Test
    public void testAccessVersionContentWithoutStoreAccess() throws Exception {
        Node n = createVersionableNode(superuser.getNode(path));
        Version v = n.checkin();
        VersionHistory vh = n.getVersionHistory();
        n.checkout();
        Version v2 = n.checkin();
        n.checkout();

View Full Code Here

Examples of javax.jcr.Node.checkin()

    public void testAccessVersionContentWithoutStoreAccess() throws Exception {
        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.checkin()

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

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

            assertFalse(tn.isCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
View Full Code Here

Examples of javax.jcr.Node.checkin()

        firstNode.setPrimaryType(JcrConstants.NT_UNSTRUCTURED);
        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);
View Full Code Here

Examples of javax.jcr.Node.checkin()

        Property firstNodeVersionFrozenUuid = firstNodeVersion.getFrozenNode().getProperty(JcrConstants.JCR_FROZENUUID);
        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! ",
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.