Search in sources :

Example 1 with RouteBundleExportAction

use of org.talend.camel.designer.build.RouteBundleExportAction in project tesb-studio-se by Talend.

the class JavaCamelJobScriptsExportWSAction method exportRouteUsedJobBundle.

protected void exportRouteUsedJobBundle(IRepositoryViewObject object, File filePath, String jobVersion, String bundleName, String bundleSymbolicName, String bundleVersion, String routeName, String routeVersion, String context) throws InvocationTargetException, InterruptedException {
    RouteDedicatedJobManager talendJobManager = new RouteDedicatedJobManager(getExportChoice(), context);
    talendJobManager.setJobVersion(jobVersion);
    talendJobManager.setBundleName(bundleName);
    talendJobManager.setBundleSymbolicName(bundleSymbolicName);
    talendJobManager.setBundleVersion(bundleVersion);
    talendJobManager.setDestinationPath(filePath.getAbsolutePath());
    talendJobManager.setRouteName(routeName);
    talendJobManager.setRouteVersion(routeVersion);
    talendJobManager.setGroupId(getGroupId());
    talendJobManager.setArtifactId(getArtifactId());
    talendJobManager.setArtifactVersion(getArtifactVersion());
    RepositoryNode node = new RepositoryNode(object, null, ENodeType.REPOSITORY_ELEMENT);
    if (!jobVersion.equals(node.getObject().getProperty().getVersion())) {
        node.getObject().getProperty().setVersion(jobVersion);
    }
    JobExportAction action = new RouteBundleExportAction(Collections.singletonList(node), jobVersion, bundleVersion, talendJobManager, getTempDir(), "Job");
    action.run(monitor);
}
Also used : RouteDedicatedJobManager(org.talend.camel.designer.ui.wizards.export.RouteDedicatedJobManager) JobExportAction(org.talend.repository.ui.wizards.exportjob.action.JobExportAction) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) RouteBundleExportAction(org.talend.camel.designer.build.RouteBundleExportAction)

Example 2 with RouteBundleExportAction

use of org.talend.camel.designer.build.RouteBundleExportAction in project tesb-studio-se by Talend.

the class JavaCamelJobScriptsExportWSAction method exportRouteBundle.

private void exportRouteBundle(IRepositoryViewObject object, File filePath, String version, String bundleName, String bundleSymbolicName, String bundleVersion, String idSuffix, Collection<String> routelets, String context) throws InvocationTargetException, InterruptedException {
    final RouteJavaScriptOSGIForESBManager talendJobManager = new RouteJavaScriptOSGIForESBManager(getExportChoice(), context, routelets, getModulesProvidedByFeatures(), statisticPort, tracePort);
    talendJobManager.setBundleName(bundleName);
    talendJobManager.setBundleSymbolicName(bundleSymbolicName);
    talendJobManager.setBundleVersion(bundleVersion);
    talendJobManager.setOsgiServiceIdSuffix(idSuffix);
    talendJobManager.setMultiNodes(false);
    talendJobManager.setDestinationPath(filePath.getAbsolutePath());
    talendJobManager.setSubjobImportPackages(subjobImportPackages);
    RepositoryNode node = new RepositoryNode(object, null, ENodeType.REPOSITORY_ELEMENT);
    JobExportAction action = new RouteBundleExportAction(Collections.singletonList(node), version, bundleVersion, talendJobManager, getTempDir(), "Route");
    action.run(monitor);
}
Also used : RouteJavaScriptOSGIForESBManager(org.talend.camel.designer.ui.wizards.export.RouteJavaScriptOSGIForESBManager) JobExportAction(org.talend.repository.ui.wizards.exportjob.action.JobExportAction) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) RouteBundleExportAction(org.talend.camel.designer.build.RouteBundleExportAction)

Aggregations

RouteBundleExportAction (org.talend.camel.designer.build.RouteBundleExportAction)2 IRepositoryNode (org.talend.repository.model.IRepositoryNode)2 RepositoryNode (org.talend.repository.model.RepositoryNode)2 JobExportAction (org.talend.repository.ui.wizards.exportjob.action.JobExportAction)2 RouteDedicatedJobManager (org.talend.camel.designer.ui.wizards.export.RouteDedicatedJobManager)1 RouteJavaScriptOSGIForESBManager (org.talend.camel.designer.ui.wizards.export.RouteJavaScriptOSGIForESBManager)1