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, isSessionScoped, -1);
PlainChangesLog changesLog =
new PlainChangesLogImpl(new ArrayList<ItemState>(), session.getId(), ExtendedEvent.LOCK);