use of org.talend.repository.items.importexport.handlers.ImportExportHandlersManager in project tdi-studio-se by Talend.
the class BigDataEeImportTest method importEeDemo.
@Before
public void importEeDemo() throws Exception {
initDemo(BIG_DATA_EE_DEMO_PLUGIN_ID);
Assert.assertNotNull(currentDemo);
initTestPaths();
initTempPro();
eeResManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(eeResManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(eeResManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), eeResManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
use of org.talend.repository.items.importexport.handlers.ImportExportHandlersManager in project tdi-studio-se by Talend.
the class BigdataCeImportTest method importCeDemo.
@Before
public void importCeDemo() throws Exception {
initDemo(BIG_DATA_CE_DEMO_PLUGIN_ID);
if (currentDemo == null) {
// maybe license problem, the demo plugin is not loaded.
return;
}
initTestPaths();
initTempPro();
Assert.assertNotNull(currentDemo);
ceResManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(ceResManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(ceResManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), ceResManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
use of org.talend.repository.items.importexport.handlers.ImportExportHandlersManager in project tdi-studio-se by Talend.
the class BuildJobHandlerTest method setUp.
@Before
public void setUp() throws Exception {
// Fix the NPE for org.talend.designer.core.ui.editor.process.Process.createMainParameters(Process.java:401)
bridgeProject = ReponsitoryContextBridge.getProject();
ReponsitoryContextBridge.setProject(ProjectManager.getInstance().getCurrentProject().getEmfProject());
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
// job with tdm and tdq component.
URL testJobURL = FileLocator.find(Platform.getBundle("org.talend.repository.test"), new Path("/resources/testBuildJob.zip"), null);
if (testJobURL != null) {
testJobURL = FileLocator.toFileURL(testJobURL);
}
File srcFile = new File(testJobURL.getFile());
FileResourcesUnityManager fileUnityManager = ResourcesManagerFactory.getInstance().createFileUnityManager(srcFile);
ResourcesManager resManager = fileUnityManager.doUnify();
List<ImportItem> projectRecords = importManager.populateImportingItems(resManager, true, new NullProgressMonitor());
assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), resManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
IRepositoryViewObject obj = ProxyRepositoryFactory.getInstance().getLastVersion("_bWyBUAYbEeapTZ0aKwL_YA");
Item item = obj.getProperty().getItem();
assertTrue(item instanceof ProcessItem);
processItem = (ProcessItem) item;
}
use of org.talend.repository.items.importexport.handlers.ImportExportHandlersManager in project tdi-studio-se by Talend.
the class DqDemoImportTest method importDqDemo.
@Before
public void importDqDemo() throws Exception {
initDemo(DQ_DEMO_PLUGIN_ID);
Assert.assertNotNull(currentDemo);
initTestPaths();
initTempPro();
// For DQ,has special structure to create for temp project before test
initDQStructure();
dqResManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(dqResManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(dqResManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), dqResManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
use of org.talend.repository.items.importexport.handlers.ImportExportHandlersManager in project tdi-studio-se by Talend.
the class EsbDemoImportTest method importEsbDemo.
@Before
public void importEsbDemo() throws Exception {
initDemo(ESB_DEMO_PLUGIN_ID);
Assert.assertNotNull(currentDemo);
initTestPaths();
initTempPro();
esbResManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(esbResManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(esbResManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), esbResManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
Aggregations