Package javax.jcr

Examples of javax.jcr.Node.checkout()


            assertFalse(tn.internalIsCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
            n.checkout();
            changeReadPermission(principal, n, true);
        }
    }
}
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

            assertFalse(tn.internalIsCheckedOut());
        } finally {
            readOnly.logout();
            // reset the denied read-access
            n.checkout();
            changeReadPermission(principal, n, true);
        }
    }
   
    public void testAddNodeUuid() throws RepositoryException, NotExecutableException {
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

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

        return child;
    }

    public void testSetRetentionPolicyOnCheckedInNode() throws NotExecutableException, RepositoryException {
        Node child = getVersionableChildNode();
        child.checkout();
        child.checkin();
        String childPath = child.getPath();

        // get another session.
        Session otherS = helper.getSuperuserSession();
View Full Code Here

        }
    }

    public void testRemoveRetentionPolicyOnCheckedInNode() throws NotExecutableException, RepositoryException {
        Node child = getVersionableChildNode();
        child.checkout();
        retentionMgr.setRetentionPolicy(child.getPath(), getApplicableRetentionPolicy());
        superuser.save();
        child.checkin();

        Session otherS = helper.getSuperuserSession();
View Full Code Here

            // success
        } finally {
            otherS.logout();

            // clear policy added before
            child.checkout();
            try {
                retentionMgr.removeRetentionPolicy(child.getPath());
                superuser.save();
            } catch (RepositoryException e) {
                // should not get here if test is correctly executed.
View Full Code Here

        return child;
    }

    public void testAddHoldOnCheckedInNode() throws NotExecutableException, RepositoryException {
        Node child = getVersionableChildNode();
        child.checkout();
        child.checkin();

        // get another session.
        javax.jcr.Session otherS = helper.getSuperuserSession();
        try {
View Full Code Here

            // success
        } finally {
            otherS.logout();

            // clear holds (in case of test failure)
            child.checkout();
            Hold[] holds = retentionMgr.getHolds(child.getPath());
            for (int i = 0; i < holds.length; i++) {
                retentionMgr.removeHold(child.getPath(), holds[i]);
            }
            superuser.save();
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.