/**
  * delete node
  * 
  * @param string $_flatpath
  * @return boolean
  * @throws Tinebase_Exception_NotFound
  */
 protected function _deleteNode($_flatpath)
 {
     $flatpathWithBasepath = $this->addBasePath($_flatpath);
     list($parentPathRecord, $nodeName) = Tinebase_Model_Tree_Node_Path::getParentAndChild($flatpathWithBasepath);
     $pathRecord = Tinebase_Model_Tree_Node_Path::createFromPath($flatpathWithBasepath);
     $this->_checkPathACL($parentPathRecord, 'delete');
     if (!$parentPathRecord->container) {
         // check acl for deleting toplevel container
         $this->_checkPathACL($pathRecord, 'delete');
     }
     $success = $this->_deleteNodeInBackend($pathRecord);
     if ($success && !$parentPathRecord->container) {
         if (!is_object($pathRecord->container)) {
             throw new Tinebase_Exception_NotFound('Container not found');
         }
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
             Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Delete container ' . $pathRecord->container->name);
         }
         Tinebase_Container::getInstance()->delete($pathRecord->container->getId());
     }
     return $success;
 }