use of org.talend.designer.camel.dependencies.core.DependenciesResolver in project tesb-studio-se by Talend.
the class CamelDependenciesEditor method updateInput.
private void updateInput() {
// re-calculate all datas
final DependenciesResolver resolver = new DependenciesResolver(getJobEditorInput().getLoadedProcess());
// set datas
importPackageViewer.setInput(resolver.getImportPackages());
requireBundleViewer.setInput(resolver.getRequireBundles());
bundleClasspathViewer.setInput(resolver.getBundleClasspaths());
exportPackageViewer.setInput(resolver.getExportPackages());
manageRouteResourcePanel.setInput(RouteResourceUtil.getResourceDependencies(getJobEditorInput().getLoadedProcess()));
}
use of org.talend.designer.camel.dependencies.core.DependenciesResolver in project tesb-studio-se by Talend.
the class RouteJavaScriptOSGIForESBManager method addOsgiDependencies.
@Override
protected void addOsgiDependencies(Analyzer analyzer, ExportFileResource libResource, ProcessItem processItem) throws IOException {
final DependenciesResolver resolver = new DependenciesResolver(processItem);
//exportPackage.append(getPackageName(processItem));
// Add Route Resource Export packages
// http://jira.talendforge.org/browse/TESB-6227
// add manifest items
analyzer.setProperty(Analyzer.REQUIRE_BUNDLE, resolver.getManifestRequireBundle(MANIFEST_ITEM_SEPARATOR));
analyzer.setProperty(Analyzer.IMPORT_PACKAGE, //$NON-NLS-1$
resolver.getManifestImportPackage(MANIFEST_ITEM_SEPARATOR) + ",*;resolution:=optional");
analyzer.setProperty(Analyzer.EXPORT_PACKAGE, resolver.getManifestExportPackage(MANIFEST_ITEM_SEPARATOR));
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService processService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
ITalendProcessJavaProject talendProcessJavaProject = processService.getTalendProcessJavaProject();
if (talendProcessJavaProject != null) {
final IPath libPath = talendProcessJavaProject.getLibFolder().getLocation();
// process external libs
final List<URL> list = new ArrayList<URL>();
for (String s : resolver.getManifestBundleClasspath(MANIFEST_ITEM_SEPARATOR).split(Character.toString(MANIFEST_ITEM_SEPARATOR))) {
if (!s.isEmpty()) {
list.add(libPath.append(s).toFile().toURI().toURL());
}
}
libResource.addResources(list);
}
}
}
use of org.talend.designer.camel.dependencies.core.DependenciesResolver in project tesb-studio-se by Talend.
the class CamelDesignerCoreService method addManifestContent.
private void addManifestContent(Item item, Element jobElement) {
Element manifestElement = jobElement.addElement("RouteManifest");
manifestElement.addAttribute(QName.get("space", Namespace.XML_NAMESPACE), "preserve");
final DependenciesResolver resolver = new DependenciesResolver((ProcessItem) item);
manifestElement.addElement(ManifestItem.IMPORT_PACKAGE).addText(resolver.getManifestImportPackage('\n'));
manifestElement.addElement(ManifestItem.EXPORT_PACKAGE).addText(resolver.getManifestExportPackage('\n'));
manifestElement.addElement(ManifestItem.REQUIRE_BUNDLE).addText(resolver.getManifestRequireBundle('\n'));
manifestElement.addElement(ManifestItem.BUNDLE_CLASSPATH).addText(resolver.getManifestBundleClasspath('\n'));
}
Aggregations