use of org.talend.repository.items.importexport.handlers.model.ImportItem in project tdi-studio-se by Talend.
the class RoutineImportHandler method afterImportingItems.
/*
* (non-Javadoc)
*
* @see org.talend.repository.items.importexport.handlers.imports.ImportRepTypeHandler#afterImportingItemRecords(org
* .eclipse.core.runtime.IProgressMonitor,
* org.talend.repository.items.importexport.ui.wizard.imports.managers.ResourcesManager,
* org.talend.repository.items.importexport.ui.wizard.imports.models.ItemRecord)
*/
@Override
public void afterImportingItems(IProgressMonitor monitor, ResourcesManager resManager, ImportItem selectedItemRecord) {
// deploy routines Jar
final Item item = selectedItemRecord.getItem();
if (validEClass(item) && item instanceof RoutineItem) {
RoutineItem rItem = (RoutineItem) item;
Set<String> extRoutines = new HashSet<String>();
for (IMPORTType type : (List<IMPORTType>) rItem.getImports()) {
extRoutines.add(type.getMODULE());
}
if (resManager instanceof ProviderManager || resManager instanceof ZipFileManager) {
deployJarToDestForArchive(resManager, extRoutines);
} else {
deployJarToDest(resManager, extRoutines);
}
}
super.afterImportingItems(monitor, resManager, selectedItemRecord);
}
use of org.talend.repository.items.importexport.handlers.model.ImportItem 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.model.ImportItem 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);
}
use of org.talend.repository.items.importexport.handlers.model.ImportItem in project tdi-studio-se by Talend.
the class MdmEeDemoImportTest method importMdmEeDemo.
@Before
public void importMdmEeDemo() throws Exception {
initDemo(MDM_EE_DEMO_PLUGIN_ID);
Assert.assertNotNull(currentDemo);
initTestPaths();
initTempPro();
mdmResEeManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(mdmResEeManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(mdmResEeManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), mdmResEeManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
use of org.talend.repository.items.importexport.handlers.model.ImportItem in project tdi-studio-se by Talend.
the class DiDemoImportTest method importDiDemo.
@Before
public void importDiDemo() throws Exception {
initDemo(DI_DEMO_PLUGIN_ID);
Assert.assertNotNull(currentDemo);
initTestPaths();
initTempPro();
diResManager = DemoImportTestUtil.getResourceManager(currentDemo);
Assert.assertNotNull(diResManager);
ImportExportHandlersManager importManager = new ImportExportHandlersManager();
List<ImportItem> projectRecords = importManager.populateImportingItems(diResManager, true, new NullProgressMonitor());
Assert.assertTrue(projectRecords.size() > 0);
importManager.importItemRecords(new NullProgressMonitor(), diResManager, projectRecords, true, projectRecords.toArray(new ImportItem[0]), null);
}
Aggregations