AccessDeniedException, RepositoryException
{
checkValid();
if (!isNodeType(Constants.MIX_LOCKABLE))
throw new LockException("Node is not lockable " + getPath());
if (dataManager.hasPendingChanges(getInternalPath()))
throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
Lock newLock = session.getLockManager().addLock(this, isDeep, false, timeOut);