public function rename(ResourceNode $node, $name, $noFlush = false)
    {
        $node->setName($name);
        $name = $this->getUniqueName($node, $node->getParent());
        $node->setName($name);
        $this->om->persist($node);
        $this->logChangeSet($node);

        if (!$noFlush) {
            $this->om->flush();
        }

        return $node;
    }