private function importContent(Project $project, $xml_contents, $extraction_path)
 {
     $project_id = $project->getID();
     $this->logger->info("Importing project in project {$project_id}");
     $this->checkFileIsValidXML($xml_contents);
     $xml_element = simplexml_load_string($xml_contents);
     $this->importUgroups($project, $xml_element);
     $svn = new SVNXMLImporter($this->logger, $this->xml_validator);
     $svn->import($project, $xml_element, $extraction_path);
     $this->logger->info("Ask to plugin to import data from XML");
     $this->event_manager->processEvent(Event::IMPORT_XML_PROJECT, array('project' => $project, 'xml_content' => $xml_element, 'extraction_path' => $extraction_path, 'user_finder' => $this->user_finder));
     $this->logger->info("Finish importing project in project {$project_id}");
 }
Ejemplo n.º 2
0
 private function importContent(Project $project, SimpleXMLElement $xml_element, $extraction_path)
 {
     $this->logger->info("Importing project in project " . $project->getUnixName());
     $this->importUgroups($project, $xml_element);
     $svn = new SVNXMLImporter($this->logger, $this->xml_validator);
     $svn->import($project, $xml_element, $extraction_path);
     $frs = new FRSXMLImporter($this->logger, $this->xml_validator, new FRSPackageFactory(), new FRSReleaseFactory(), new FRSFileFactory(), $this->user_finder, new UGroupManager());
     $frs->import($project, $xml_element, $extraction_path);
     $this->logger->info("Ask to plugin to import data from XML");
     $this->event_manager->processEvent(Event::IMPORT_XML_PROJECT, array('logger' => $this->logger, 'project' => $project, 'xml_content' => $xml_element, 'extraction_path' => $extraction_path, 'user_finder' => $this->user_finder));
     $this->logger->info("Finish importing project in project " . $project->getUnixName());
 }