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);
}
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;
}
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;
}
Aggregations