use of javax.jcr.lock.LockManager in project jackrabbit-oak by apache.
the class VersionManagementTest method testCheckInCheckoutLocked.
@Test
public void testCheckInCheckoutLocked() throws Exception {
LockManager lockManager = superuser.getWorkspace().getLockManager();
VersionManager versionManager = superuser.getWorkspace().getVersionManager();
// create a versionable and lockable node
Node n = createVersionableNode(superuser.getNode(path));
n.addMixin(mixLockable);
superuser.save();
String nodePath = n.getPath();
// lock
lockManager.lock(nodePath, true, false, 0, superuser.getUserID());
// create version
versionManager.checkin(nodePath);
versionManager.checkout(nodePath);
}
Aggregations