Search in sources :

Example 36 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicDistributionOptionForm method isInCurrentProject.

private boolean isInCurrentProject(IDynamicPlugin dynamicPlugin) {
    IDynamicPluginConfiguration pluginConfiguration = dynamicPlugin.getPluginConfiguration();
    String projLabel = (String) pluginConfiguration.getAttribute(DynamicConstants.ATTR_PROJECT_TECHNICAL_NAME);
    String curProjLabel = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
    return StringUtils.equals(projLabel, curProjLabel);
}
Also used : IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Example 37 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicDistributionOptionForm method buildDynamicConfiguration.

private DynamicConfiguration buildDynamicConfiguration(IDynamicPlugin plugin) {
    if (plugin == null) {
        return null;
    }
    IDynamicPluginConfiguration pluginConfiguration = plugin.getPluginConfiguration();
    DynamicConfiguration config = new DynamicConfiguration();
    config.setDescription(pluginConfiguration.getDescription());
    config.setDistribution(pluginConfiguration.getDistribution());
    config.setId(pluginConfiguration.getId());
    config.setName(pluginConfiguration.getName());
    config.setVersion(pluginConfiguration.getVersion());
    return config;
}
Also used : DynamicConfiguration(org.talend.hadoop.distribution.dynamic.DynamicConfiguration) IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Example 38 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicDistributionOptionForm method getNamePluginMap.

private Map<String, IDynamicPlugin> getNamePluginMap() throws Exception {
    if (namePluginMap == null || namePluginMap.isEmpty()) {
        namePluginMap = new HashMap<>();
        DynamicDistributionSetupData dynamicBuildConfigurationData = getDynamicDistributionSetupData();
        if (allBuiltinDynamicPlugins == null || allBuiltinDynamicPlugins.isEmpty()) {
            copyAllUsersDynamicPlugins(new DummyDynamicMonitor(), dynamicBuildConfigurationData.getDynamicDistributionsGroup());
        }
        if (allBuiltinDynamicPlugins != null) {
            for (IDynamicPlugin plugin : allBuiltinDynamicPlugins) {
                IDynamicPluginConfiguration pluginConfiguration = plugin.getPluginConfiguration();
                String name = pluginConfiguration.getName();
                namePluginMap.put(name, plugin);
            }
        }
        if (allCurrentUsersDynamicPlugins != null) {
            for (IDynamicPlugin plugin : allCurrentUsersDynamicPlugins) {
                IDynamicPluginConfiguration pluginConfiguration = plugin.getPluginConfiguration();
                String name = pluginConfiguration.getName();
                namePluginMap.put(name, plugin);
            }
        }
    }
    return namePluginMap;
}
Also used : IDynamicPlugin(org.talend.core.runtime.dynamic.IDynamicPlugin) DummyDynamicMonitor(org.talend.designer.maven.aether.DummyDynamicMonitor) DynamicDistributionSetupData(org.talend.repository.hadoopcluster.ui.dynamic.DynamicDistributionSetupData) IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Aggregations

IDynamicPluginConfiguration (org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)38 IDynamicPlugin (org.talend.core.runtime.dynamic.IDynamicPlugin)16 DynamicPluginAdapter (org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter)10 Set (java.util.Set)6 NodeComponentTypeBean (org.talend.hadoop.distribution.NodeComponentTypeBean)6 File (java.io.File)5 InvocationTargetException (java.lang.reflect.InvocationTargetException)5 DummyDynamicMonitor (org.talend.designer.maven.aether.DummyDynamicMonitor)5 IDynamicMonitor (org.talend.designer.maven.aether.IDynamicMonitor)5 IDynamicDistributionTemplate (org.talend.hadoop.distribution.dynamic.template.IDynamicDistributionTemplate)4 ArrayList (java.util.ArrayList)3 Project (org.talend.core.model.general.Project)3 DynamicConfiguration (org.talend.hadoop.distribution.dynamic.DynamicConfiguration)3 DynamicDistributionSetupData (org.talend.repository.hadoopcluster.ui.dynamic.DynamicDistributionSetupData)3 IFolder (org.eclipse.core.resources.IFolder)2 IProject (org.eclipse.core.resources.IProject)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 Bundle (org.osgi.framework.Bundle)2 LoginException (org.talend.commons.exception.LoginException)2 PersistenceException (org.talend.commons.exception.PersistenceException)2