throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
}
Lock newLock = session.getLockManager().addLock(this, isDeep, false, timeOut);
PlainChangesLog changesLog = new PlainChangesLogImpl(new ArrayList<ItemState>(), session, ExtendedEvent.LOCK);
PropertyData propData =
TransientPropertyData.createPropertyData(nodeData(), Constants.JCR_LOCKOWNER, PropertyType.STRING, false,
new TransientValueData(session.getUserID()));
changesLog.add(ItemState.createAddedState(propData));
propData =
TransientPropertyData.createPropertyData(nodeData(), Constants.JCR_LOCKISDEEP, PropertyType.BOOLEAN, false,
new TransientValueData(isDeep));
changesLog.add(ItemState.createAddedState(propData));
dataManager.getTransactManager().save(changesLog);
session.getActionHandler().postLock(this);
return newLock;