Search in sources :

Example 1 with ZipFileManager

use of org.talend.repository.items.importexport.ui.managers.ZipFileManager 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);
}
Also used : RoutineItem(org.talend.core.model.properties.RoutineItem) Item(org.talend.core.model.properties.Item) ImportItem(org.talend.repository.items.importexport.handlers.model.ImportItem) ProviderManager(org.talend.repository.items.importexport.ui.managers.ProviderManager) IMPORTType(org.talend.designer.core.model.utils.emf.component.IMPORTType) RoutineItem(org.talend.core.model.properties.RoutineItem) List(java.util.List) ZipFileManager(org.talend.repository.items.importexport.ui.managers.ZipFileManager) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 List (java.util.List)1 Item (org.talend.core.model.properties.Item)1 RoutineItem (org.talend.core.model.properties.RoutineItem)1 IMPORTType (org.talend.designer.core.model.utils.emf.component.IMPORTType)1 ImportItem (org.talend.repository.items.importexport.handlers.model.ImportItem)1 ProviderManager (org.talend.repository.items.importexport.ui.managers.ProviderManager)1 ZipFileManager (org.talend.repository.items.importexport.ui.managers.ZipFileManager)1