public function unlock($absPath)
{
if (!$this->session->nodeExists($absPath)) {
throw new PathNotFoundException("Unable to unlock unexisting node '{$absPath}'");
}
if (!array_key_exists($absPath, $this->locks)) {
throw new LockException("Unable to find an active lock for the node '{$absPath}'");
}
$node = $this->session->getNode($absPath);
$state = $node->getState();
if ($state === Item::STATE_NEW || $state === Item::STATE_MODIFIED) {
throw new InvalidItemStateException("Cannot unlock the non-clean node '{$absPath}': current state = {$state}");
}
$this->transport->unlock($absPath, $this->locks[$absPath]->getLockToken());
$this->locks[$absPath]->setIsLive(false);
}