{
checkValid();
if (!session.getLockManager().holdsLock((NodeData)this.getData()))
throw new LockException("The node not locked " + getPath());
if (!session.getLockManager().isLockHolder(this))
throw new LockException("There are no permission to unlock the node " + getPath());
if (dataManager.hasPendingChanges(getInternalPath()))
throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
// session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException