Compare commits

...

40 Commits

Author SHA1 Message Date
vyu-talend
4b66f32b84 fix(TDI-49728):upgrade snowflake driver to 3.13.30. (#8932) 2023-07-03 13:52:22 +08:00
jzhao-talend
b34123c9f3 fix(TDI-49728): Revert "feat(TDI-49728):upgrade snowflake driver to fix
cve. (#8836)"

This reverts commit 250e20f13e.
2023-06-30 15:40:36 +08:00
vyu-talend
250e20f13e feat(TDI-49728):upgrade snowflake driver to fix cve. (#8836) 2023-06-21 18:05:07 +08:00
Oleksandr Zhelezniak
aa2ba7d199 fix(TDI-49872): bump json-smart & accessors-smart (#8823)
* 2.4.9 -> 2.4.11
2023-06-20 12:58:40 +03:00
Zhiwei Xue
8b57520df9 fix(TUP-38235):Job in a project that references other projects load very (#8877)
slowly in Studio
2023-06-20 09:47:57 +08:00
Jill Yan
e8020483f1 Jill/m3/appint-35640 (#8875)
* Jill/m80/appint-35640 (#8864)

* APPINT-35640:Studio:Data Usage: remove old nb.route.osgi under process in Data Collector

* APPINT-35640:Studio:Data Usage: remove old nb.route.osgi under process in Data Collector

* APPINT-35640 Studio:Data Usage: remove old nb.route.osgi under process

* APPINT-35640 call this task before logon

---------

Co-authored-by: Abdulhamid Rashankar <arashankar@talend.com>

* APPINT-35640:remove old nb.route.osgi under process in Data Collector

---------

Co-authored-by: Abdulhamid Rashankar <arashankar@talend.com>
2023-06-12 15:40:58 +08:00
Abdulhamid Rashankar
ad532744ed APPINT-35585:There is nb.route.osgi under process in Data Collector (#8797) 2023-05-25 10:20:02 +02:00
sbliu
b2f1602a30 fix(TUP-38912) fix mvn build cannot handle special name such as 'CVS' (#8751) 2023-05-16 17:48:41 +08:00
Oleksandr Zhelezniak
492fdc5b46 fix(TDI-49771): Cell format is not date (#8742)
* column that we read may start not from the first excel column, need to take it into account
2023-05-16 10:40:42 +03:00
wang wei
b650de6411 fix(TDI-49752): tMap performance issue after migration to v8.0 (#8756) 2023-05-15 16:15:36 +08:00
Jill Yan
14cdcbed05 APPINT-35584 add runtime feature in data collector (adds) (#8755)
* APPINT-35584 Add runtime feature count

* APPINT-35584 add runtime feature in data collector

* update type "count_use_OAuther2_Bearer" to "count_use_OAuth2_Bearer"

---------

Co-authored-by: Abdulhamid Rashankar <40884069+arashankar@users.noreply.github.com>
2023-05-09 12:46:48 +02:00
Dmytro Sylaiev
3db5b96350 chore(TDI-49749): Update json-smart and related (#8748) 2023-05-08 14:46:21 +03:00
Abdulhamid Rashankar
3f3dce5bc5 APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage (#8730) 2023-05-04 16:46:22 +02:00
Abdulhamid Rashankar
0f992cff7a APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage (#8725)
* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage

* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage
2023-05-02 14:06:44 +02:00
jiezhang-tlnd
6365b7a741 Revert "fix(TUP-38314)Guess schema fails with the warning (#8583)" (#8721)
This reverts commit 6e720df1cc.
2023-04-27 17:28:26 +08:00
jiezhang-tlnd
6e720df1cc fix(TUP-38314)Guess schema fails with the warning (#8583)
* fix(TUP-38314)Guess schema fails with the warning
https://jira.talendforge.org/browse/TUP-38314

* fix(TUP-38314)Guess schema fails with the warning

* fix(TUP-38314)Guess schema fails with the warning

* fix(TUP-38314)Guess schema fails with the warning

* code format

* code format

* code format
2023-04-27 15:06:07 +08:00
Abdulhamid Rashankar
5313413799 APPINT-35490:App & API Integration - Studio Metrics gathering: build … (#8714)
* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage

* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage

* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage
2023-04-27 09:50:49 +08:00
AlixMetivier
9180096b87 fix(TBD-14987): fix hadoop jar not found (#8643) (#8682) 2023-04-24 10:54:27 +02:00
wang wei
a1a28c0a61 fix(TDI-49452): CVE-2022-45143,org.apache.tomcat:tomcat-catalina:9.0.68 (#8666) 2023-04-24 15:35:14 +08:00
wang wei
ecd3952727 fix(TDI-49546): CVE-2022-45688, org.json:json:(<=20220924) (#8590) 2023-04-24 14:08:02 +08:00
Jill Yan
df7974265f Jill/m80/appint-35472 (#8688) (#8700)
* APPINT-35470 gather pure DI jobs

* APPINT-35470 gather pure DI jobs

* APPINT-35470 count data services

* APPINT-35470 count soap services

* APPINT-35470 App & API Integration - Studio Metrics gathering

* APPINT-35470 App & API Integration - Studio Metrics gathering

* APPINT-3547 add runtime feature count in studio metrix

* APPINT-35472 add runtime feature count in studio metrix
2023-04-23 10:12:30 +08:00
Jill Yan
4bcc864761 Jill/m80/appint 35470 (#8635) (#8698)
* APPINT-35470 gather pure DI jobs

* APPINT-35470 gather pure DI jobs

* APPINT-35470 count data services

* APPINT-35470 count soap services

* APPINT-35470 App & API Integration - Studio Metrics gathering

* APPINT-35470 App & API Integration - Studio Metrics gathering
2023-04-23 09:50:51 +08:00
hzhao
a0e04938fa fix(TUP-38334): job showing error when running from studio on remote (#8637)
jobserver
2023-04-22 16:55:32 +08:00
Zhiwei Xue
9706a0f82b fix(TUP-38316):[801 CI/CD] Duplicate Parameter error in the artifact and (#8613)
creating the task
2023-04-20 18:33:33 +08:00
wang wei
f99b6129ad fix(TDI-49483): Denial Of Service (DoS) in Talend/connectors-se (master)-FileUpload (#8609) 2023-04-14 11:08:01 +08:00
Jane Ding
8f25b6380d fix(TUP-37227):Issue building when items names too long (#8594)
* fix(TUP-37227):Issue building when items names too long (#8412)

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185

* fix(TUP-38185):job run fail if joblet use db connection from other
joblet
https://jira.talendforge.org/browse/TUP-38185
2023-03-30 18:15:51 +08:00
vyu-talend
c61694066d fix(TDI-49458):bump talend_file_enhanced.jar (#8608) 2023-03-30 16:21:57 +08:00
Oleksandr Zhelezniak
b0c97b42b3 fix(TDI-49549): BigQuery catch NPE (#8577)
* problem in google-cloud-bigquery, catch NPE when we try to covert to JSON statistic object
2023-03-22 11:47:42 +02:00
hzhao
f8a24814fb fix(TUP-38282): Guess Schema doesn't show Context options (#8567)
* fix(TUP-38282): Guess Schema doesn't show Context options

* fix(TUP-38282): Guess Schema doesn't show Context options
2023-03-21 21:03:33 +08:00
Oleksandr Zhelezniak
3fe5cfeeac fix(TDI-49487): BigQuery forceSingleQueryExecution (#8549)
* add a new checkbox forceSingleQueryExecution. It forces the execution of complex queries as one query and get the single result.
* return the behavior of job\query executions before feature that splits query to multiquery execution
2023-03-21 10:51:02 +02:00
jzhao
2ef6fa24ee fix(TDI-49446):tFTPPut is transferring the file to the remote directory but the current status shows "No file transfered." (#8515)
* fix(TDI-49446):tFTPPut is transferring the file to the remote directory
but the current status shows "No file transfered."

* fix(TDI-49446):not change ftps part

* fix(TDI-49446):exception catch like before
2023-03-07 17:11:17 +08:00
Jane Ding
9a2e5f7bfa fix(TUP-38093):Studio 8.0.1 hangs in "Loading user component" after (#8500)
* fix(TUP-38093):Studio 8.0.1 hangs in "Loading user component" after
patch R2023-01
https://jira.talendforge.org/browse/TUP-38093

* fix(TUP-38093):Studio 8.0.1 hangs in "Loading user component" after
patch R2023-01
https://jira.talendforge.org/browse/TUP-38093
2023-03-03 17:09:52 +08:00
Jane Ding
175e48eb16 Revert "fix(TUP-37227):Issue building when items names too long (#8412)" (#8517)
This reverts commit 2ea39fb234.
2023-03-02 09:45:08 +08:00
jiezhang-tlnd
87c399bab1 fix(TUP-37874)SQL inject risk (#8440) 2023-02-22 18:18:16 +08:00
jzhao
4e3e7ce00d fix(TDI-49399):[CVE]: upgrade zip4j to lastest version : 2.11.4 (#8494)(tFileUnarchive) 2023-02-20 18:21:55 +08:00
jzhao
035c08956d fix(TDI-49399):[CVE]: upgrade zip4j to lastest version : 2.11.4 (#8492) 2023-02-20 18:02:01 +08:00
Jane Ding
2ea39fb234 fix(TUP-37227):Issue building when items names too long (#8412)
* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227
2023-02-15 18:01:10 +08:00
Oleksandr Zhelezniak
59419071e9 fix(TDI-49284): talend file enhanced (#8424)
* fix the behavior when it reaches end of file
2023-02-13 11:46:43 +02:00
Dmytro Sylaiev
3e66072638 chore(TDI-49272): Bump talend-mscrm for 7.3 (#8418)
* chore(TDI-49252): Bump talend-mscrm for 7.3

* Bump transitive deps

* fix(TDI-49252): Remove extra dependency

* fix(TDI-49252): Fix compilation error onprem2011

* fix(TDI-49252): Fix crm4client issue

* fix(TDI-49252): Fix compile error 73

* fix(TDI-49252): Fix neethi for output
2023-02-09 22:16:14 +02:00
pyzhou
f7c1659f8f fix(TDI-48321): tSCP components cannot work with redhat server (#7951)
* fix(TDI-48321): tSCP components cannot work with redhat server

* fix wron /n

* fix tssh compile error

* fix NPE
2023-01-28 15:28:53 +08:00
95 changed files with 1265 additions and 1295 deletions

View File

@@ -1096,7 +1096,8 @@ public static class <%=conn.getName() %>Struct<%=templateOrigin %> implements ro
<%
} else if(javaType.isObjectBased() || typeToGenerate.equals("Geometry") || typeToGenerate.equals("Dynamic")) {
%>
dos.writeObject(this.<%=column.getLabel() %>);
dos.clearInstanceCache();
dos.writeObject(this.<%=column.getLabel() %>);
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
@@ -1428,7 +1429,8 @@ public static class <%=conn.getName() %>Struct<%=templateOrigin %> implements ro
<%
} else if(typeToGenerate.equals("Object") || typeToGenerate.equals("Geometry") || typeToGenerate.equals("BigDecimal") || typeToGenerate.equals("List") || typeToGenerate.equals("Dynamic") || typeToGenerate.equals("Document")) {
%>
objectOut.writeObject(this.<%=column.getLabel() %>);
objectOut.clearInstanceCache();
objectOut.writeObject(this.<%=column.getLabel() %>);
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);

View File

@@ -74,7 +74,6 @@ import org.talend.core.model.components.IComponentsFactory;
import org.talend.core.model.components.IComponentsHandler;
import org.talend.core.model.components.filters.ComponentsFactoryProviderManager;
import org.talend.core.model.components.filters.IComponentFactoryFilter;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.runtime.util.ComponentsLocationProvider;
import org.talend.core.ui.IJobletProviderService;
import org.talend.core.ui.ISparkJobletProviderService;
@@ -119,6 +118,8 @@ public class ComponentsFactory implements IComponentsFactory {
private SubMonitor subMonitor;
private static Map<IComponent, File> customComponentFolderMap = new HashMap<IComponent, File>();
private static Map<String, Map<String, IComponent>> componentsCache = new HashMap<String, Map<String, IComponent>>();
// keep a list of the current provider for the selected component, to have the family translation
@@ -170,6 +171,7 @@ public class ComponentsFactory implements IComponentsFactory {
} // not used anymore
long startTime = System.currentTimeMillis();
customComponentFolderMap.clear();
// TimeMeasure.display = true;
// TimeMeasure.displaySteps = true;
// TimeMeasure.measureActive = true;
@@ -226,6 +228,8 @@ public class ComponentsFactory implements IComponentsFactory {
isInitialising.set(false);
initialiseLock.unlock();
}
// sync custom component libs after init
syncCustomComponentLibs();
}
private boolean wait4InitialiseFinish() {
@@ -632,7 +636,7 @@ public class ComponentsFactory implements IComponentsFactory {
componentList.add(currentComp);
if (isCustom) {
customComponentList.add(currentComp);
syncCustomComponentLibs(currentFolder, currentComp.getModulesNeeded());
customComponentFolderMap.put(currentComp, currentFolder);
}
if (pathSource != null) {
Path userComponent = new Path(pathSource);
@@ -672,18 +676,22 @@ public class ComponentsFactory implements IComponentsFactory {
}
}
private void syncCustomComponentLibs(File componentFolder, List<ModuleNeeded> modulesNeeded) {
private void syncCustomComponentLibs() {
try {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerService.class)) {
ILibraryManagerService libraryService = GlobalServiceRegister.getDefault()
.getService(ILibraryManagerService.class);
libraryService.deployLibsFromCustomComponents(componentFolder, modulesNeeded);
if (libraryService != null) {
customComponentFolderMap.forEach((component, componentFolder) -> libraryService
.deployLibsFromCustomComponents(componentFolder, component.getModulesNeeded()));
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
customComponentFolderMap.clear();
}
}
/**
* DOC smallet Comment method "checkComponentFolder".
*

View File

@@ -15,9 +15,9 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>adal4j</artifactId>
<version>1.1.1</version>
</dependency>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
@@ -26,7 +26,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>

View File

@@ -25,7 +25,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>

View File

@@ -77,7 +77,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20150729</version>
<version>20230227</version>
<type>jar</type>
</dependency>
<dependency>

View File

@@ -1,74 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.components</groupId>
<artifactId>talendzip</artifactId>
<version>1.3</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.talendforge.org/modules/licenses/APACHE_v2.txt</url>
<distribution>may be downloaded from the Maven repository</distribution>
</license>
</licenses>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
<author.name>wangwei</author.name>
</properties>
<distributionManagement>
<snapshotRepository>
<id>talend_nexus_deployment</id>
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</snapshotRepository>
<repository>
<id>talend_nexus_deployment</id>
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.21</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,183 +0,0 @@
package com.talend.compress.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
import org.apache.commons.compress.archivers.zip.ZipFile;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
// import javax.crypto.Cipher;
public class IntegrityUtil {
/**
* Is used to check if the zip file is corrupted/destroyed
*
* @param file
* @return
*/
public static boolean isZipValid(final File file) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
return true;
} catch (IOException e) {
return false;
} finally {
try {
if (zipFile != null) {
zipFile.close();
zipFile = null;
}
} catch (IOException e) {
}
}
}
public static void validate(final File file) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (IOException e) {
} finally {
try {
if (zipFile != null) {
zipFile.close();
zipFile = null;
}
} catch (IOException e) {
}
}
}
/**
* To check if the encrpted zip file is corrupted or not
*
* @param file
* @param password
* @return
*/
public static boolean isEncryptedZipValid(final File file, String password) {
ZipArchiveInputStream input = null;
InputStream target = null;
try {
target = new FileInputStream(file);
target = new CipherInputStream(target, createCipher(Cipher.DECRYPT_MODE, password));
input = new ZipArchiveInputStream(target);
ArchiveEntry entry = input.getNextEntry();
return true;
} catch (IOException e) {
return false;
} catch (Exception e) {
return false;
} finally {
try {
if (input != null) {
input.close();
input = null;
}
if (target != null) {
target.close();
target = null;
}
} catch (IOException e) {
}
}
}
/**
* Used to check tar.gz/.tgz/.gz file is corrupted/destroyed
*
* @param fileName
* @return
*/
public static boolean isGZIPValid(final String fileName) {
GZIPInputStream inputStream = null;
InputStream is = null;
try {
is = new FileInputStream(new File(fileName));
inputStream = new GZIPInputStream(is);
return true;
} catch (IOException e) {
return false;
}finally {
try {
if (inputStream != null) {
inputStream.close();
inputStream = null;
} else if(is != null) {
is.close();
is = null;
}
} catch (IOException e) {
}
}
}
/**
* Used to check tar.tar file is corrupted/destroyed
*
* @param fileName
* @return
*/
public static boolean isTarValid(final String fileName) {
TarArchiveInputStream inputStream = null;
InputStream is = null;
try {
is = new FileInputStream(new File(fileName));
inputStream = new TarArchiveInputStream(is);
return inputStream.canReadEntryData(inputStream.getNextEntry());
} catch (IOException e) {
return false;
}finally {
try {
if (inputStream != null) {
inputStream.close();
inputStream = null;
} else if(is != null) {
is.close();
is = null;
}
} catch (IOException e) {
}
}
}
/**
*
* @param mode
* @param password
* @return
* @throws Exception
*/
public static Cipher createCipher(int mode, String password) throws Exception {
String alg = "PBEWithSHA1AndDESede"; // BouncyCastle has better algorithms
PBEKeySpec keySpec = new PBEKeySpec(password.toCharArray());
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(alg);
SecretKey secretKey = keyFactory.generateSecret(keySpec);
Cipher cipher = Cipher.getInstance("PBEWithSHA1AndDESede");
cipher.init(mode, secretKey, new PBEParameterSpec("saltsalt".getBytes(), 2000));
return cipher;
}
}

View File

@@ -1,239 +0,0 @@
package com.talend.compress.zip;
import java.io.File;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Optional;
import net.lingala.zip4j.ZipFile;
import net.lingala.zip4j.model.FileHeader;
public class Unzip {
public void setNeedPassword(boolean needPassword) {
this.needPassword = needPassword;
}
public void setPassword(String password) {
this.password = password;
}
public void setCheckArchive(boolean checkArchive) {
this.checkArchive = checkArchive;
}
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
public void setExtractPath(boolean extractPath) {
this.extractPath = extractPath;
}
public void setUtil(Util util) {
this.util = util;
}
public void setSourceZip(String sourceZip) {
this.sourceZip = sourceZip;
}
public void setTargetDir(String targetDir) {
this.targetDir = targetDir;
}
public void setUseZip4jDecryption(boolean useZip4jDecryption) {
this.useZip4jDecryption = useZip4jDecryption;
}
public void setEncording(String encording){this.encording = encording;}
private boolean needPassword = false;
private boolean useZip4jDecryption = false;
private String password = null;
private boolean checkArchive = false;
private boolean verbose = false;
private boolean extractPath = true;
private Util util = null;
private String sourceZip;
private String targetDir;
private String encording;
public Unzip(String sourceZip, String targetDir) {
this.sourceZip = sourceZip;
this.targetDir = targetDir;
}
public void doUnzip() throws Exception {
System.out.println("Processing archive " + sourceZip
+ ", please wait...");
System.out.println();
if (needPassword) {
if (useZip4jDecryption) {
doUnzipWithAes();
} else {
doUnzipWithDecryption();
}
} else {
doUnzipWithoutDecryption();
}
System.out.println();
System.out.println("Process finished");
}
// zip4j compress&decryption impl
public void doUnzipWithAes() throws Exception {
File file = new File(sourceZip);
if (password == null || "".equals(password)) {
Thread.sleep(1000); // To make sure the System.out.println message
// come before
throw new RuntimeException(
"Please enter the password and try again..");
}
ZipFile zipFile = new ZipFile(sourceZip,password.toCharArray());
if(encording != null){
zipFile.setCharset(Charset.forName(encording));
}
if (checkArchive) {
if (!zipFile.isValidZipFile()) {
throw new RuntimeException("The file " + sourceZip
+ " is corrupted, process terminated...");
}
}
List fileHeaderList = zipFile.getFileHeaders();
if (fileHeaderList == null) {
return;
}
for (int i = 0; i < fileHeaderList.size(); i++) {
FileHeader fileHeader = (FileHeader) fileHeaderList.get(i);
String filename = fileHeader.getFileName();
if (verbose) {
System.out.println("Source file : " + filename);
}
if (!extractPath) {
filename = filename.replaceAll("\\\\", "/");
filename = filename.substring(filename.lastIndexOf('/') + 1);
}
zipFile.extractFile(fileHeader, targetDir, filename);
util.addUnzippedFiles(targetDir, filename);
}
}
// apache common compress&decryption impl
public void doUnzipWithDecryption() throws Exception {
File file = new File(sourceZip);
if (password == null || "".equals(password)) {
Thread.sleep(1000); // To make sure the System.out.println message
// come before
throw new RuntimeException(
"Please enter the password and try again..");
}
if (checkArchive) {
if (!IntegrityUtil.isEncryptedZipValid(file,
password)) {
throw new RuntimeException("The file " + sourceZip
+ " is corrupted, process terminated...");
}
}
java.io.InputStream is = null;
try {
is = new java.io.FileInputStream(sourceZip);
is = new javax.crypto.CipherInputStream(is,
IntegrityUtil.createCipher(
javax.crypto.Cipher.DECRYPT_MODE, password));
org.apache.commons.compress.archivers.zip.ZipArchiveInputStream input = new org.apache.commons.compress.archivers.zip.ZipArchiveInputStream(
new java.io.BufferedInputStream(is),Optional.ofNullable(encording).orElse("UTF8"));
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry;
while ((entry = input.getNextZipEntry()) != null) {
if (verbose) {
System.out.println("Source file : " + entry.getName());
}
boolean isDirectory = entry.isDirectory();
String filename = entry.getName();
util.output(targetDir, filename, isDirectory, input);
applyLastModifiedTime(entry, filename);
}
} finally {
if (is != null) {
is.close();
}
}
}
// apache common compress impl
public void doUnzipWithoutDecryption() throws Exception {
if (checkArchive
&& !IntegrityUtil
.isZipValid(new java.io.File(sourceZip))) {
Thread.sleep(1000); // To make the process terminated after the
// System.out.println
throw new RuntimeException("The file " + sourceZip
+ " is corrupted, process terminated...");
}
Thread.sleep(1000);
org.apache.commons.compress.archivers.zip.ZipFile zip = null;
try {
zip = new org.apache.commons.compress.archivers.zip.ZipFile(
sourceZip,Optional.ofNullable(encording).orElse("UTF8"));
java.util.Enumeration enuFiles = zip.getEntries();
java.io.InputStream is = null;
while (enuFiles.hasMoreElements()) {
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry = (org.apache.commons.compress.archivers.zip.ZipArchiveEntry) enuFiles
.nextElement();
if (verbose) {
System.out.println("Source file : " + entry.getName());
}
boolean isDirectory = entry.isDirectory();
if (!isDirectory) {
// get the input stream
is = zip.getInputStream(entry);
}
String filename = entry.getName();
util.output(targetDir, filename, isDirectory, is);
applyLastModifiedTime(entry, filename);
}
} finally {
if (zip != null) {
zip.close();
}
}
}
private void applyLastModifiedTime(
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry,
String filename) {
if (extractPath) {
java.io.File f = new java.io.File(targetDir + "/" + filename);
f.setLastModified(entry.getTime());
} else {
java.io.File unzippedFile = new java.io.File(targetDir
+ util.getEntryName(filename));
unzippedFile.setLastModified(entry.getTime());
}
}
}

View File

@@ -1,12 +0,0 @@
package com.talend.compress.zip;
public class UnzippedFile {
public String fileName;
public String filePath;
public UnzippedFile(String fileName, String filePath) {
this.fileName = fileName;
this.filePath = filePath;
}
}

View File

@@ -1,151 +0,0 @@
package com.talend.compress.zip;
import java.io.IOException;
public class Util {
public java.util.List<UnzippedFile> unzippedFiles = new java.util.ArrayList<UnzippedFile>();
private boolean extractPath = false;
public Util(boolean extractPath) {
this.extractPath = extractPath;
}
public void deleteDir(java.io.File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
deleteDir(new java.io.File(dir, children[i]));
}
}
dir.delete();
}
public void repairDir(java.io.File dir) {
java.io.File parentFile = dir.getParentFile();
if (parentFile != null) {
if (parentFile.exists() && parentFile.isFile())
parentFile.delete();
repairDir(parentFile);
}
}
public void checkDir(java.io.File file) {
if (file.exists()) {
if (file.isDirectory())
deleteDir(file);
} else {
repairDir(file);
}
}
public void output(String path, String fileName, java.io.InputStream is)
throws java.lang.Exception {
// deal with the path issue and get the outputstream
java.io.File f = null;
if (extractPath) {
f = new java.io.File(path, fileName);
} else {
String tempName = fileName.replaceAll("\\\\", "/");
int m = tempName.lastIndexOf('/');
String shortName = tempName.substring(m != -1 ? m + 1 : 0);
f = new java.io.File(path, shortName);
}
if(!f.getCanonicalPath().startsWith(new java.io.File(path).getCanonicalPath())) {
throw new IOException("expanding " + f.getName()
+ " would create file outside of " + path);
}
checkDir(f);
f.getParentFile().mkdirs();
f.createNewFile();
java.io.FileOutputStream fos = null;
try {
fos = new java.io.FileOutputStream(f);
byte[] buffer = new byte[1024];
for (int len = is.read(buffer, 0, 1024); len != -1; len = is.read(
buffer, 0, 1024)) {
fos.write(buffer, 0, len);
}
} finally {
if (fos != null) {
fos.close();
}
}
unzippedFiles.add(new UnzippedFile(f.getName(), f.getAbsolutePath()));
}
public void output(String path, String fileName, boolean isDirectory,
java.io.InputStream is) throws java.lang.Exception {
// deal with the path issue and get the outputstream
java.io.File f = null;
if (extractPath) {
f = new java.io.File(path, fileName);
} else {
String tempName = fileName.replaceAll("\\\\", "/");
int m = tempName.lastIndexOf('/');
String shortName = tempName.substring(m != -1 ? m + 1 : 0);
f = new java.io.File(path, shortName);
}
if(!f.getCanonicalPath().startsWith(new java.io.File(path).getCanonicalPath())) {
throw new IOException("expanding " + f.getName()
+ " would create file outside of " + path);
}
if (isDirectory) {
if (!f.exists()) {
f.mkdirs();
}
// /
} else {
java.io.File parent = f.getParentFile();
if (parent != null && !parent.exists()) {
parent.mkdirs();
}
f.createNewFile();
java.io.BufferedOutputStream bos = null;
try {
bos = new java.io.BufferedOutputStream(
new java.io.FileOutputStream(f));
byte[] buff = new byte[1024];
int data = -1;
while ((data = is.read(buff)) != -1) {
bos.write(buff, 0, data);
}
} finally {
if (bos != null) {
bos.close();
}
}
}
unzippedFiles.add(new UnzippedFile(f.getName(), f.getAbsolutePath()));
}
// This function is used for Extract file from the path
public String getEntryName(String fileEntry) {
if (fileEntry != null && !fileEntry.equals("")) {
for (int i = fileEntry.length() - 1; i > 0; i--) {
if (fileEntry.charAt(i) == '/' || fileEntry.charAt(i) == '\\') {
fileEntry = fileEntry.substring(i + 1, fileEntry.length());
break;
}
}
}
return fileEntry;
}
// This function is used for extract file with password.
public void addUnzippedFiles(String path, String fileName)
throws java.lang.Exception{
java.io.File f = new java.io.File(path, fileName);
unzippedFiles.add(new UnzippedFile(f.getName(), f.getAbsolutePath()));
}
}

View File

@@ -1,341 +0,0 @@
package com.talend.compress.zip;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.GZIPOutputStream;
import net.lingala.zip4j.ZipFile;
import net.lingala.zip4j.model.ZipParameters;
import net.lingala.zip4j.model.enums.AesKeyStrength;
import net.lingala.zip4j.model.enums.CompressionLevel;
import net.lingala.zip4j.model.enums.CompressionMethod;
import net.lingala.zip4j.model.enums.EncryptionMethod;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.compress.compressors.gzip.GzipUtils;
import org.apache.commons.compress.utils.IOUtils;
public class Zip {
private String sourceFile;
private String targetZip;
private boolean overwriteExistTargetZip = true;
private boolean makeTargetDir = false;
private CompressionLevel compressLevel = CompressionLevel.MEDIUM_FAST;
private String encoding = "ISO-8859-15";
private boolean allFiles = true;
private String namePatternFilter = null;
private boolean containSubDir = true;
private boolean isEncrypted = false;
private String password = null;
private String zip64Mode = null;
private boolean useZip4jEncryption = false;
private EncryptionMethod encryptionMethod = EncryptionMethod.AES;
private AesKeyStrength aesKeyStrength = AesKeyStrength.KEY_STRENGTH_256;
private String archiveFormat = "zip";
private boolean syncFlush;
public void setUseZip4jEncryption(boolean useZip4jEncryption) {
this.useZip4jEncryption = useZip4jEncryption;
}
public void setZip64Mode(String zip64Mode) {
this.zip64Mode = zip64Mode;
}
public void setEncoding(String encoding) {
this.encoding = encoding;
}
public void setPassword(String password) {
this.password = password;
}
public void setEncrypted(boolean isEncrypted) {
this.isEncrypted = isEncrypted;
}
public void setContainSubDir(boolean containSubDir) {
this.containSubDir = containSubDir;
}
public void setAllFiles(boolean allFiles) {
this.allFiles = allFiles;
}
public void setNamePatternFilter(String namePatternFilter) {
this.namePatternFilter = namePatternFilter;
}
public void setCompressLevel(int compressLevel) {
switch (compressLevel){
case 0:
this.compressLevel = CompressionLevel.NO_COMPRESSION;
break;
case 4:
this.compressLevel = CompressionLevel.MEDIUM_FAST;
break;
case 9:
this.compressLevel = CompressionLevel.ULTRA;
break;
}
}
public void setMakeTargetDir(boolean makeTargetDir) {
this.makeTargetDir = makeTargetDir;
}
public void setEncryptionMethod(String encryptionMethod) {
this.encryptionMethod = EncryptionMethod.valueOf(encryptionMethod);
}
public void setAesKeyStrength(int aesKeyStrength) {
this.aesKeyStrength = AesKeyStrength.getAesKeyStrengthFromRawCode(aesKeyStrength);
}
public String getArchiveFormat() {
return archiveFormat;
}
public void setArchiveFormat(String archiveFormat) {
this.archiveFormat = archiveFormat;
}
public boolean isSyncFlush() {
return syncFlush;
}
public void setSyncFlush(boolean syncFlush) {
this.syncFlush = syncFlush;
}
public Zip(String sourceFile, String targetZip) {
this.sourceFile = sourceFile;
this.targetZip = targetZip;
}
public void setOverwriteExistTargetZip(boolean overwriteExistTargetZip) {
this.overwriteExistTargetZip = overwriteExistTargetZip;
}
public void checkTargetFilePath(String targetFilePath, boolean isOverwrite, boolean isMakeTargetDir) throws Exception {
File target = new java.io.File(targetZip);
if (target.exists()) {
if (!overwriteExistTargetZip) {
throw (new java.lang.Exception("File already exist!"));
} else {
target.delete();
}
} else {
if (makeTargetDir) {
String targetDir = target.getParent();
File zDir = new java.io.File(targetDir);
if (!zDir.exists()) {
zDir.mkdirs();
}
}
}
}
public void doZip() throws Exception {
checkTargetFilePath(targetZip, overwriteExistTargetZip, makeTargetDir);
final File source = new File(sourceFile);
final List<File> list = new ArrayList<File>();
if (source.isFile()) {
list.add(source);
} else {
source.listFiles(new java.io.FilenameFilter() {
public boolean accept(java.io.File dir, String name) {
java.io.File file = new java.io.File(dir, name);
if (file.isFile()) {
if (allFiles || name.matches(namePatternFilter)) {
list.add(file);
return true;
}
} else if (containSubDir) {
file.listFiles(this);
}
return false;
}
});
}
if (list.size() < 1) {
return;
}
if (isEncrypted && useZip4jEncryption) {
doZip2(source, list);
} else if ("gzip".equals(archiveFormat)) {
doGZip();
} else if ("tgz".equals(archiveFormat)) {
Map<String, File> filesMap = new HashMap<String, File>();
int folderPathLen = source.getAbsolutePath().length();
for (File file : list) {
filesMap.put(file.getAbsolutePath().substring(folderPathLen), file);
}
doTarGZip(filesMap);
} else {
doZip1(source, list);
}
}
private void doTarGZip(Map<String, File> filesMap) throws Exception {
File targetFile = new File(targetZip);
targetFile.setLastModified(System.currentTimeMillis());
FileOutputStream fos = new FileOutputStream(targetFile);
final boolean syncFlush = this.syncFlush;
final int compressLevel = this.compressLevel.getLevel();
TarArchiveOutputStream taos = new TarArchiveOutputStream(new GZIPOutputStream(fos, syncFlush) {
{
this.def.setLevel(compressLevel);
}
});
taos.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_STAR);
taos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
try {
for (String relativeDir : filesMap.keySet()) {
File file = filesMap.get(relativeDir);
taos.putArchiveEntry(new TarArchiveEntry(file, relativeDir));
FileInputStream is = new FileInputStream(file);
try{
IOUtils.copy(is, taos);
taos.closeArchiveEntry();
}finally{
is.close();
}
}
} finally {
taos.close();
fos.close();
}
}
private void doGZip() throws Exception {
File srcFile = new File(sourceFile);
File tarFile = new File(targetZip);
if(!GzipUtils.getUncompressedFilename(tarFile.getName()).equals(srcFile.getName())){
System.err.println("WARNING: It is better that the gzip file change from \""+tarFile.getName()+"\" to \""+GzipUtils.getCompressedFilename(srcFile.getName())+"\".");
}
InputStream input = new FileInputStream(srcFile);
OutputStream out = new FileOutputStream(tarFile);
try {
final boolean syncFlush = this.syncFlush;
final int compressLevel = this.compressLevel.getLevel();
GZIPOutputStream gcos = new GZIPOutputStream(out, syncFlush) {
{
this.def.setLevel(compressLevel);
}
};
try{
IOUtils.copy(input, gcos);
}finally{
gcos.close();
}
} finally {
input.close();
out.close();
}
}
// apache common compress impl
private void doZip1(final File source, final List<File> list) throws Exception {
int beginIndex = source.getPath().length() + 1;
java.io.OutputStream output_stream = null;
try {
output_stream = new java.io.FileOutputStream(targetZip);
if (isEncrypted && !"".equals(password)) {
output_stream = new javax.crypto.CipherOutputStream(output_stream, IntegrityUtil.createCipher(
javax.crypto.Cipher.ENCRYPT_MODE, password));
}
} catch (Exception e) {
if (output_stream != null) {
output_stream.close();
}
throw e;
}
org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream out = null;
out = new org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream(
new java.io.BufferedOutputStream(output_stream));
out.setLevel(compressLevel.getLevel());
// set filename & comment encoding
out.setEncoding(encoding);
if ("ALWAYS".equals(zip64Mode)) {
out.setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode.Always);
} else if ("NEVER".equals(zip64Mode)) {
out.setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode.Never);
}
try {
for (int i = 0; i < list.size(); i++) {
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry = new org.apache.commons.compress.archivers.zip.ZipArchiveEntry(
list.get(i).getPath().substring(beginIndex));
entry.setTime(list.get(i).lastModified());
out.putArchiveEntry(entry);
java.io.BufferedInputStream in = null;
try {
in = new java.io.BufferedInputStream(new java.io.FileInputStream(list.get(i)));
int readLen;
byte[] buf = new byte[1024];
while ((readLen = in.read(buf, 0, 1024)) != -1) {
out.write(buf, 0, readLen);
}
} finally {
if (in != null) {
in.close();
}
}
out.closeArchiveEntry();
out.flush();
}
} finally {
if (out != null) {
out.close();
}
}
}
// zip4j impl
private void doZip2(final File source, final List<File> list) throws Exception {
ZipFile zipFile = new ZipFile(targetZip,password.toCharArray());
if ("UTF-8".equalsIgnoreCase(encoding)) {
encoding = "UTF8";
}
zipFile.setCharset(Charset.forName(encoding));
ZipParameters params = new ZipParameters();
params.setCompressionMethod(CompressionMethod.DEFLATE);
params.setCompressionLevel(compressLevel);
if (isEncrypted && !"".equals(password)) {
params.setEncryptFiles(true);
params.setEncryptionMethod(encryptionMethod);
if (encryptionMethod == EncryptionMethod.AES) {
params.setAesKeyStrength(aesKeyStrength);
}
}
params.setDefaultFolderPath(source.getAbsoluteFile().getPath());
zipFile.addFiles(list, params);
}
}

View File

@@ -149,7 +149,7 @@
<IMPORTS>
<IMPORT
NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar"
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar"
REQUIRED="true"
/>
</IMPORTS>

View File

@@ -387,7 +387,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -210,7 +210,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
</IMPORTS>

View File

@@ -270,7 +270,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -341,7 +341,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -326,7 +326,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -38,6 +38,7 @@
boolean advancedSeparator = (advancedSeparatorStr!=null&&!("").equals(advancedSeparatorStr))?("true").equals(advancedSeparatorStr):false;
String thousandsSeparator = ElementParameterParser.getValueWithJavaType(node, "__THOUSANDS_SEPARATOR__", JavaTypesManager.CHARACTER);
String decimalSeparator = ElementParameterParser.getValueWithJavaType(node, "__DECIMAL_SEPARATOR__", JavaTypesManager.CHARACTER);
final boolean forceSingleQueryExecution = ElementParameterParser.getBooleanValue(node,"__FORCE_SINGLE_QUERY_EXEC__");
query = query.replaceAll("\n"," ");
query = query.replaceAll("\r"," ");
@@ -406,7 +407,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",ee_<%=cid%>.getMessage());
long nb_line_<%=cid%> = 0;
java.util.List<String> child_statistics_<%=cid%> = null;
java.util.List<com.google.cloud.bigquery.Job> childJobs_<%=cid%>;
if(job_<%=cid%>.getStatistics().getNumChildJobs() != null){
if(!<%=forceSingleQueryExecution%> && job_<%=cid%>.getStatistics().getNumChildJobs() != null){
childJobs_<%=cid%> = java.util.Optional.ofNullable(bigquery_<%=cid%>.listJobs(com.google.cloud.bigquery.BigQuery.JobListOption.parentJobId(jobId_<%=cid%>.getJob())))
.map(com.google.api.gax.paging.Page::getValues)
.flatMap(iterable_<%=cid%> ->
@@ -496,7 +497,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",ee_<%=cid%>.getMessage());
%>
} else {
java.util.List<com.google.api.services.bigquery.model.Job> insert_jobs_<%=cid%>;
if (insert_<%=cid %>.getStatistics().getNumChildJobs() != null) {
if (!<%=forceSingleQueryExecution%> && insert_<%=cid %>.getStatistics().getNumChildJobs() != null) {
insert_jobs_<%=cid%> = bigQueryUtil_<%=cid%>.listChildJobs(insert_<%=cid %>.getJobReference().getJobId());
} else {
insert_jobs_<%=cid%> = java.util.Collections.singletonList(insert_<%=cid%>);

View File

@@ -198,6 +198,10 @@
SHOW_IF="(USE_CUSTOM_TEMPORARY_DATASET == 'true') AND (RESULT_SIZE != 'SMALL')">
<DEFAULT>"temp_dataset"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FORCE_SINGLE_QUERY_EXEC" FIELD="CHECK" REQUIRED="true" NUM_ROW="50">
<DEFAULT>false</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>

View File

@@ -15,6 +15,7 @@ CLIENT_SECRET.NAME=Client Secret
PROJECT_ID.NAME=Project ID
AUTHORIZATION_CODE.NAME=Authorization Code
ACCESS_TOKEN.NAME=OAuth Access Token
FORCE_SINGLE_QUERY_EXEC.NAME=Force single query execution
QUERY.NAME=Query
SCHEMA.NAME=Schema

View File

@@ -184,6 +184,10 @@
<ITEM NAME="AUTO" VALUE="AUTO"/>
</ITEMS>
</PARAMETER>
<PARAMETER NAME="FORCE_SINGLE_QUERY_EXEC" FIELD="CHECK" REQUIRED="true" NUM_ROW="40">
<DEFAULT>false</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>

View File

@@ -26,6 +26,8 @@
query = query.replaceAll("\n"," ").replaceAll("\r"," ");
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
final boolean forceSingleQueryExecution = ElementParameterParser.getBooleanValue(node,"__FORCE_SINGLE_QUERY_EXEC__");
if (authMode.equals("OAUTH") || authMode.equals("TOKEN")) {
String resultSizeType = ElementParameterParser.getValue(node,"__RESULT_SIZE__");
%>
@@ -70,7 +72,7 @@
%>
} else {
java.util.List<com.google.api.services.bigquery.model.Job> insert_jobs_<%=cid%>;
if (insert_<%=cid %>.getStatistics().getNumChildJobs() != null) {
if (!<%=forceSingleQueryExecution%> && insert_<%=cid %>.getStatistics().getNumChildJobs() != null) {
insert_jobs_<%=cid%> = bigQueryUtil_<%=cid%>.listChildJobs(insert_<%=cid %>.getJobReference().getJobId());
} else {
insert_jobs_<%=cid%> = java.util.Collections.singletonList(insert_<%=cid%>);
@@ -110,9 +112,17 @@
%>
} else {
com.google.gson.Gson gsonObject_<%=cid%> = new com.google.gson.Gson();
globalMap.put("<%=cid%>_STATISTICS", gsonObject_<%=cid%>.toJson(job_<%=cid%>.getStatistics()));
try {
globalMap.put("<%=cid%>_STATISTICS", gsonObject_<%=cid%>.toJson(job_<%=cid%>.getStatistics()));
} catch (NullPointerException npeex_<%=cid%>) {
// quick fix for TDI-49549 (google-cloud-bigquery library problem)
globalMap.put("<%=cid%>_STATISTICS", null);
<%if(isLog4jEnabled){%>
log.warn("<%=cid%> - Can't retrieve statistics " + jobId_<%=cid%> + " with query: " + <%=query%>);
<%}%>
}
java.util.List<com.google.cloud.bigquery.Job> childJobs_<%=cid%>;
if (job_<%=cid%>.getStatistics().getNumChildJobs() != null) {
if (!<%=forceSingleQueryExecution%> && job_<%=cid%>.getStatistics().getNumChildJobs() != null) {
childJobs_<%=cid%> = java.util.Optional.ofNullable(bigquery_<%=cid%>.listJobs(com.google.cloud.bigquery.BigQuery.JobListOption.parentJobId(jobId_<%=cid%>.getJob())))
.map(com.google.api.gax.paging.Page::getValues)
.flatMap(iterable_<%=cid%> ->

View File

@@ -14,6 +14,7 @@ PROJECT_ID.NAME=Project ID
AUTHORIZATION_CODE.NAME=Authorization Code
ACCESS_TOKEN.NAME=OAuth Access Token
FORCE_SINGLE_QUERY_EXEC.NAME=Force single query execution
QUERY.NAME=Query
SCHEMA.NAME=Schema

View File

@@ -866,7 +866,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
<IMPORT NAME="Driver-MYSQL5" MODULE="mysql-connector-java-5.1.49.jar" MVN="mvn:mysql/mysql-connector-java/5.1.49" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') and (DBTYPE=='MYSQL') and (DB_MYSQL_VERSION=='MYSQL_5')"/>
@@ -914,7 +914,7 @@
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED_IF="(DBTYPE=='EXASOL') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Redshift" MODULE="redshift-jdbc42-no-awssdk-1.2.55.1083.jar" MVN="mvn:com.amazon.redshift/redshift-jdbc42-no-awssdk/1.2.55.1083" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="antlr4-runtime-4.8-1.jar" MODULE="antlr4-runtime-4.8-1.jar" MVN="mvn:org.antlr/antlr4-runtime/4.8-1" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.13.1.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.13.1" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.13.30.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.13.30" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-VERTICA_9.0" MODULE="vertica-jdbc-9.3.1-0.jar" MVN="mvn:com.vertica/vertica-jdbc/9.3.1-0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_9_0')"/>
<!-- java 11 dependencies for jdbc HSQLDB driver -->

View File

@@ -200,7 +200,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -190,8 +190,8 @@
<IMPORT NAME="json-path-2.1.0.jar" MODULE="json-path-2.1.0.jar" MVN="mvn:org.talend.libraries/json-path-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.json/lib/json-path-2.1.0.jar" REQUIRED_IF="(READ_BY == 'JSONPATH') AND (JSON_PATH_VERSION == '2_1_0')" />
<IMPORT NAME="json-path-1.2.0.jar" MODULE="json-path-1.2.0.jar" MVN="mvn:org.talend.libraries/json-path-1.2.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.json/lib/json-path-1.2.0.jar" REQUIRED_IF="(READ_BY == 'JSONPATH') AND (JSON_PATH_VERSION == '1_2_0')" />
<IMPORT NAME="json-smart-2.4.7.jar" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="READ_BY == 'JSONPATH'" />
<IMPORT NAME="accessors-smart-2.4.7.jar" MODULE="accessors-smart-2.4.7.jar" MVN="mvn:net.minidev/accessors-smart/2.4.7" REQUIRED_IF="READ_BY == 'JSONPATH'" />
<IMPORT NAME="json-smart-2.4.11.jar" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="READ_BY == 'JSONPATH'" />
<IMPORT NAME="accessors-smart-2.4.11.jar" MODULE="accessors-smart-2.4.11.jar" MVN="mvn:net.minidev/accessors-smart/2.4.11" REQUIRED_IF="READ_BY == 'JSONPATH'" />
<IMPORT NAME="slf4j-api-1.7.5.jar" MODULE="slf4j-api-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.7.5.jar" REQUIRED_IF="READ_BY == 'JSONPATH'" />
<IMPORT NAME="slf4j-log4j12-1.7.5.jar" MODULE="slf4j-log4j12-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-log4j12-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-log4j12-1.7.5.jar" REQUIRED_IF="READ_BY == 'JSONPATH'" />
</IMPORTS>

View File

@@ -149,7 +149,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -245,6 +245,13 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
if(listings<%=cid %> != null && listings<%=cid %>.length > 0){
for (int m<%=cid %> = 0; m<%=cid %> < listings<%=cid %>.length; m<%=cid %>++){
<%
if (!ftps) {
%>
try {
<%
}
%>
if (listings<%=cid %>[m<%=cid %>].getName().matches(mask<%=cid %>)){
java.io.File file_in_localDir_<%=cid%> = listings<%=cid %>[m<%=cid %>];
java.io.FileInputStream file_stream_<%=cid %> = new java.io.FileInputStream(file_in_localDir_<%=cid%>);
@@ -314,6 +321,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
<%
if (!ftps) {
%>
currentStatus_<%=cid %> = "File rename OK.";
msg_<%=cid%>.add("file: " + file_in_localDir_<%=cid%>.getAbsolutePath() + ", size: "
+ file_in_localDir_<%=cid%>.length() + " bytes upload successfully");
<%
@@ -321,6 +329,17 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
%>
nb_file_<%=cid%>++;
}
<%
if (!ftps) {
%>
}catch(java.io.IOException e_<%=cid%>){
currentStatus_<%=cid %> = "File rename fail.";
globalMap.put("<%=cid %>_CURRENT_STATUS", currentStatus_<%=cid %>);
throw e_<%=cid%>;
}
<%
}
%>
}
}else{
<%if(isLog4jEnabled){%>
@@ -329,6 +348,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
System.err.println("No matches found for mask '" + key<%=cid %> + "'!");
}
}
globalMap.put("<%=cid %>_CURRENT_STATUS", currentStatus_<%=cid %>);
<%}%>
}catch(java.lang.Exception e_<%=cid%>){
globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
@@ -352,4 +372,4 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e_<%=cid%>.getMessage());
<%
}
%>
}
}

View File

@@ -132,8 +132,8 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="commons-compress-1.21" MODULE="commons-compress-1.21.jar" MVN="mvn:org.apache.commons/commons-compress/1.21" REQUIRED="true" />
<IMPORT NAME="zip4j-2.10.0.jar" MODULE="zip4j-2.10.0.jar" MVN="mvn:net.lingala.zip4j/zip4j/2.10.0" REQUIRED="true" />
<IMPORT NAME="talendzip-1.3.jar" MODULE="talendzip-1.3.jar" MVN="mvn:org.talend.components/talendzip/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talendzip-1.3.jar" REQUIRED="true" />
<IMPORT NAME="zip4j-2.11.4.jar" MODULE="zip4j-2.11.4.jar" MVN="mvn:net.lingala.zip4j/zip4j/2.11.4" REQUIRED="true" />
<IMPORT NAME="talendzip-1.4.jar" MODULE="talendzip-1.4.jar" MVN="mvn:org.talend.components/talendzip/1.4" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talendzip-1.4.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -213,7 +213,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
<IMPORT NAME="Talend_CSV" MODULE="talendcsv.jar" MVN="mvn:org.talend.libraries/talendcsv/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.csv/lib/talendcsv.jar"
REQUIRED="true" />
</IMPORTS>

View File

@@ -1290,7 +1290,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e.getMessage());
if ("id_Date".equals(columnList.get(i).getTalendType())) {
// it's input component. we should avoid data rounding here. for dynamic schema we have another algo
%>
excelReader_<%=cid%>.addDateFormat(<%=i%>,new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"));
excelReader_<%=cid%>.addDateFormat(<%=i%> + start_column_<%= cid %>,new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"));
<%
}
}

View File

@@ -131,7 +131,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talend File Enhanced" MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
<IMPORT NAME="Talend File Enhanced" MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -184,9 +184,9 @@
REQUIRED_IF="(READ_BY == 'JSONPATH') AND (JSON_PATH_VERSION == '2_1_0')" />
<IMPORT NAME="json-path-1.2.0.jar" MODULE="json-path-1.2.0.jar" MVN="mvn:org.talend.libraries/json-path-1.2.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.json/lib/json-path-1.2.0.jar"
REQUIRED_IF="(READ_BY == 'JSONPATH') AND (JSON_PATH_VERSION == '1_2_0')" />
<IMPORT NAME="json-smart-2.4.7.jar" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7"
<IMPORT NAME="json-smart-2.4.11.jar" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11"
REQUIRED_IF="(READ_BY == 'JSONPATH')" />
<IMPORT NAME="accessors-smart-2.4.7.jar" MODULE="accessors-smart-2.4.7.jar" MVN="mvn:net.minidev/accessors-smart/2.4.7"
<IMPORT NAME="accessors-smart-2.4.11.jar" MODULE="accessors-smart-2.4.11.jar" MVN="mvn:net.minidev/accessors-smart/2.4.11"
REQUIRED_IF="(READ_BY == 'JSONPATH')" />
<IMPORT NAME="slf4j-api-1.7.5.jar" MODULE="slf4j-api-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.7.5.jar"
REQUIRED_IF="(READ_BY == 'JSONPATH')" BundleID="" />

View File

@@ -118,7 +118,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
<IMPORT NAME="Talend_CSV" MODULE="talendcsv.jar" MVN="mvn:org.talend.libraries/talendcsv/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.csv/lib/talendcsv.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -81,11 +81,11 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.1.jar" REQUIRED="true" />
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.3.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>
</COMPONENT>

View File

@@ -39,7 +39,7 @@
String skipEmptyRows = "true"; //("true").equals(ElementParameterParser.getValue(node, "__SKIP_EMPTY_ROWS__"));
boolean trimAll = ("true").equals(ElementParameterParser.getValue(node,"__TRIMALL__"));
String encoding = ElementParameterParser.getValue(node,"__ENCODING__");
//need to process rows longger than 100,000 characters, the property SafetySwitch(in talend_file_enhanced-1.1.jar) should be sent to false.(the default is true)
//need to process rows longger than 100,000 characters, the property SafetySwitch(in talend_file_enhanced-1.3.jar) should be sent to false.(the default is true)
//that means if check the option(true), the logic value of bSafetySwitch should be changed to false (negate the property)
boolean bSafetySwitch = !(("true").equals(ElementParameterParser.getValue(node, "__PROCESS_LONG_ROW__")));
String advancedSeparatorStr = ElementParameterParser.getValue(node, "__ADVANCED_SEPARATOR__");

View File

@@ -128,7 +128,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -69,7 +69,7 @@
String dieOnErrorStr = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
boolean dieOnError = (dieOnErrorStr!=null&&!("").equals(dieOnErrorStr))?("true").equals(dieOnErrorStr):false;
//need to process rows longger than 100 000 characters, the property SafetySwitch(in talend_file_enhanced-1.1.jar) should be sent to false.(the default is true)
//need to process rows longger than 100 000 characters, the property SafetySwitch(in talend_file_enhanced-1.3.jar) should be sent to false.(the default is true)
//that means if check the option(true), the logic value of bSafetySwitch should be changed to false (XOR with 'true')
boolean bSafetySwitch = (("true").equals(ElementParameterParser.getValue(node, "__PROCESS_LONG_ROW__")) ^ true);
String advancedSeparatorStr = ElementParameterParser.getValue(node, "__ADVANCED_SEPARATOR__");

View File

@@ -258,7 +258,7 @@
<IMPORTS>
<IMPORT
NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar"
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar"
REQUIRED="true"
/>
</IMPORTS>

View File

@@ -175,7 +175,7 @@
<IMPORTS>
<IMPORT
NAME="Talen File Enhanced"
MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar"
MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar"
REQUIRED="true"
/>
</IMPORTS>

View File

@@ -93,8 +93,8 @@
<IMPORTS>
<IMPORT NAME="commons-compress-1.21" MODULE="commons-compress-1.21.jar" MVN="mvn:org.apache.commons/commons-compress/1.21" REQUIRED="true" />
<IMPORT NAME="Ant-Zip" MODULE="ant-1.10.11.jar" MVN="mvn:org.apache.ant/ant/1.10.11" REQUIRED="true" />
<IMPORT NAME="zip4j-2.10.0.jar" MODULE="zip4j-2.10.0.jar" MVN="mvn:net.lingala.zip4j/zip4j/2.10.0" REQUIRED="true" />
<IMPORT NAME="talendzip-1.3.jar" MODULE="talendzip-1.3.jar" MVN="mvn:org.talend.components/talendzip/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talendzip-1.3.jar" REQUIRED="true" />
<IMPORT NAME="zip4j-2.11.4.jar" MODULE="zip4j-2.11.4.jar" MVN="mvn:net.lingala.zip4j/zip4j/2.11.4" REQUIRED="true" />
<IMPORT NAME="talendzip-1.4.jar" MODULE="talendzip-1.4.jar" MVN="mvn:org.talend.components/talendzip/1.4" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talendzip-1.4.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -79,7 +79,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.3.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.3" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.3.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -406,7 +406,7 @@
<IMPORT NAME="gson"
MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED="true"/>
<IMPORT NAME="json"
MODULE="json-20170516.jar" MVN="mvn:org.json/json/20170516" REQUIRED="true"/>
MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED="true"/>
<IMPORT NAME="guava"
MODULE="guava-27.0.1-jre.jar" MVN="mvn:com.google.guava/guava/27.0.1-jre" REQUIRED="true"/>
<IMPORT NAME="jackson-core"

View File

@@ -80,15 +80,22 @@ class DealJobLibrary_<%=cid%> {
}
private String adaptLibPaths(String line, java.util.Map.Entry<String, String> entry) {
line = line.replace("\\", "/");
String jarName = entry.getValue();
String crc = entry.getKey();
String libStringFinder = "../lib/" + jarName;
String libStringFinder2 = "./" + jarName; // for the job jar itself.
String replacement = "../../../cache/lib/" + crc + "/" + jarName;
if (line.contains(libStringFinder)) {
line = line.replace(libStringFinder, "../../../cache/lib/" + crc + "/" + jarName);
line = line.replace(libStringFinder, replacement);
} else if (line.toLowerCase().contains(libStringFinder2)) {
line = line.toLowerCase().replace(libStringFinder2, replacement);
} else if (line.equalsIgnoreCase(jarName)) {
line = replacement;
} else if (line.contains(":$ROOT_PATH/" + jarName + ":")) {
line = line.replace(":$ROOT_PATH/" + jarName + ":", ":$ROOT_PATH/../../../cache/lib/" + crc + "/" + jarName + ":");
line = line.replace(":$ROOT_PATH/" + jarName + ":", ":$ROOT_PATH/" + replacement + ":");
} else if (line.contains(";" + jarName + ";")) {
line = line.replace(";" + jarName + ";", ";../../../cache/lib/" + crc + "/" + jarName + ";");
line = line.replace(";" + jarName + ";", ";" + replacement + ";");
}
return line;
}

View File

@@ -412,7 +412,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -212,7 +212,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
</IMPORTS>

View File

@@ -286,7 +286,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -380,7 +380,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -344,7 +344,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -526,7 +526,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -266,7 +266,7 @@
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.11.jar" MVN="mvn:net.minidev/json-smart/2.4.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>

View File

@@ -876,7 +876,6 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
hasAtLeastOneObjectType = true;
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) objectIn.readObject();
<%
} else {
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
@@ -961,7 +960,6 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
hasAtLeastOneObjectType = true;
%>
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) objectIn.readObject();
<%
} else {
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
@@ -1236,7 +1234,8 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
} else if(("Object").equals(typeToGenerate) || ("BigDecimal").equals(typeToGenerate) || ("List").equals(typeToGenerate)) {
%>
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
objectOut.clearInstanceCache();
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
@@ -1249,6 +1248,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
objectOut.clearInstanceCache();
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
} else {
@@ -1307,7 +1307,8 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
} else if(("Object").equals(typeToGenerate) || ("BigDecimal").equals(typeToGenerate) || ("List").equals(typeToGenerate)) {
%>
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
objectOut.clearInstanceCache();
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
@@ -1320,6 +1321,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
objectOut.clearInstanceCache();
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
} else {

View File

@@ -63,10 +63,10 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
com.microsoft.crm4.webserviceTest.CrmServiceStub service_<%=cid%> = new com.microsoft.crm4.webserviceTest.CrmServiceStub(<%=endpointURL%>);
org.apache.axis2.client.Options options_<%=cid%> = service_<%=cid%>._getServiceClient().getOptions();
org.apache.axis2.transport.http.HttpTransportProperties.Authenticator auth_<%=cid%> = new org.apache.axis2.transport.http.HttpTransportProperties.Authenticator();
org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator auth_<%=cid%> = new org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator();
List<String> authSchemes_<%=cid%> = new java.util.ArrayList<String>();
authSchemes_<%=cid%>.add(org.apache.axis2.transport.http.HttpTransportProperties.Authenticator.NTLM);
authSchemes_<%=cid%>.add(org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator.NTLM);
auth_<%=cid%> .setAuthSchemes(authSchemes_<%=cid%>);
auth_<%=cid%> .setUsername(<%=username%>);
@@ -76,16 +76,16 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
auth_<%=cid%> .setDomain(<%=domain%>);
auth_<%=cid%> .setPreemptiveAuthentication(false);
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth_<%=cid%>);
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE, auth_<%=cid%>);
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setUserName(<%=username%>);
options_<%=cid%> .setPassword(decryptedPassword_<%=cid%>);
options_<%=cid%> .setTimeOutInMilliSeconds(Long.valueOf(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument catd_<%=cid%> = com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument.Factory.newInstance();
com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken token_<%=cid%> = com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken.Factory.newInstance();
@@ -99,11 +99,11 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
msDynamicsWrapper_<%=cid%>.connect();
String crmTicket_<%=cid%> = msDynamicsWrapper_<%=cid%>.getCrmTicket();
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setTimeOutInMilliSeconds(Long.valueOf(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument catd_<%=cid%> = com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument.Factory.newInstance();
com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken token_<%=cid%> = com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken.Factory.newInstance();

View File

@@ -27545,57 +27545,65 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="axiom-api" MODULE="axiom-api-1.2.8.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/axiom-api-1.2.8.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-impl" MODULE="axiom-impl-1.2.8.jar" MVN="mvn:org.talend.libraries/axiom-impl-1.2.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/axiom-impl-1.2.8.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-local" MODULE="axis2-transport-local-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-api" MODULE="axiom-api-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-api/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-impl" MODULE="axiom-impl-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-impl/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-dom" MODULE="axiom-dom-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-dom/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-adb" MODULE="axis2-adb-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-adb/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-local" MODULE="axis2-transport-local-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-codec-1.14" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="httpcore" MODULE="httpcore-4.2.1.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.2.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.2.jar" MVN="mvn:commons-logging/commons-logging/1.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="httpcore" MODULE="httpcore-4.4.13.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.13" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="neethi" MODULE="neethi-3.1.1.jar" MVN="mvn:org.apache.neethi/neethi/3.1.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="XmlSchema" MODULE="xmlschema-core-2.0.1.jar" MVN="mvn:org.talend.libraries/xmlschema-core-2.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/xmlschema-core-2.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="geronimo-stax" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="wstx-asl" MODULE="wstx-asl-3.2.4.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.4.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-3.0.1.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="XmlSchema" MODULE="xmlschema-core-2.3.0.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="geronimo-ws-metadata_2.0_spec-1.1.3" MODULE="geronimo-ws-metadata_2.0_spec-1.1.3.jar" MVN="mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="SOAP-JAF" MODULE="activation.jar" MVN="mvn:org.talend.libraries/activation/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="Java-JAXEN" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" BundleID="" />
<IMPORT NAME="Java-JAXEN" MODULE="jaxen-1.2.0.jar" MVN="mvn:jaxen/jaxen/1.2.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" BundleID="" />
<IMPORT NAME="saajapi" MODULE="saaj-api.jar" MVN="mvn:org.talend.libraries/saaj-api/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.saaj/lib/saaj-api.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="saajimpl" MODULE="saaj-impl.jar" MVN="mvn:org.talend.libraries/saaj-impl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.saaj/lib/saaj-impl.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jaxpapi" MODULE="jaxp-api.jar" MVN="mvn:org.talend.libraries/jaxp-api/6.0.0" BundleID="" UrlPath="platform:/plugin/org.talend.libraries.jax/lib/jaxp-api.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jaxpri" MODULE="jaxp-ri.jar" MVN="mvn:org.talend.libraries/jaxp-ri/6.0.0" BundleID="" UrlPath="platform:/plugin/org.talend.libraries.jax/lib/jaxp-ri.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="crm4client" MODULE="crm4client.jar" MVN="mvn:org.talend.libraries/crm4client/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/crm4client.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="crm4client" MODULE="crm4client-1.0.2.jar" MVN="mvn:org.talend.components/crm4client/1.0.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="woden-core-1.0M10" MODULE="woden-core-1.0M10.jar" MVN="mvn:org.apache.woden/woden-core/1.0M10" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="httpclient" MODULE="httpclient-4.5.13.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.13" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="javax.servlet-api-3.1.0" MODULE="javax.servlet-api-3.1.0.jar" MVN="mvn:javax.servlet/javax.servlet-api/3.1.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="javax.transaction-api-1.3" MODULE="javax.transaction-api-1.3.jar" MVN="mvn:javax.transaction/javax.transaction-api/1.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jakarta.activation-api-1.2.2" MODULE="jakarta.activation-api-1.2.2.jar" MVN="mvn:jakarta.activation/jakarta.activation-api/1.2.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<!-- 2011 -->
<!-- crm client -->
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.3-20221123.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.3-20221123" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<!-- axis2 1.7.4 -->
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-impl-1.2.20" MODULE="axiom-impl-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-impl-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-adb-1.7.4" MODULE="axis2-adb-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-adb-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-kernel-1.7.4" MODULE="axis2-kernel-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-kernel-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-xmlbeans-1.7.4" MODULE="axis2-xmlbeans-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-xmlbeans-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-http-1.7.4" MODULE="axis2-transport-http-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-transport-http-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-local-1.7.4" MODULE="axis2-transport-local-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-transport-local-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.3-20230119.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.3-20230119" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<!-- axis2 1.8.2 -->
<IMPORT NAME="jakarta.activation-api-1.2.2" MODULE="jakarta.activation-api-1.2.2.jar" MVN="mvn:jakarta.activation/jakarta.activation-api/1.2.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-api-1.4.0" MODULE="axiom-api-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-api/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-impl-1.4.0" MODULE="axiom-impl-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-impl/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-dom-1.4.0" MODULE="axiom-dom-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-dom/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-adb" MODULE="axis2-adb-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-adb/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-xmlbeans" MODULE="axis2-xmlbeans-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-xmlbeans/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-local-1.8.2" MODULE="axis2-transport-local-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="commons-cli-1.2" MODULE="commons-cli-1.2.jar" MVN="mvn:commons-cli/commons-cli/1.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-cli-1.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-stax-api_1.0_spec-1.0.1" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="neethi-3.0.3" MODULE="neethi-3.0.3.jar" MVN="mvn:org.apache.neethi/neethi/3.0.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-ws-metadata_2.0_spec-1.1.3" MODULE="geronimo-ws-metadata_2.0_spec-1.1.3.jar" MVN="mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.2.0" MODULE="jaxen-1.2.0.jar" MVN="mvn:jaxen/jaxen/1.2.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="neethi" MODULE="neethi-3.2.0.jar" MVN="mvn:org.apache.neethi/neethi/3.2.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlbeans-2.6.0" MODULE="xmlbeans-2.6.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.6.0/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlschema-core-2.2.1" MODULE="xmlschema-core-2.2.1.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-httpclient-3.1" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-fileupload-1.3.1" MODULE="commons-fileupload-1.3.1.jar" MVN="mvn:org.talend.libraries/commons-fileupload-1.3.1/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlbeans-3.0.1" MODULE="xmlbeans-3.0.1.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlschema-core-2.3.0" MODULE="xmlschema-core-2.3.0.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-fileupload-1.5" MODULE="commons-fileupload-1.5.jar" MVN="mvn:commons-fileupload/commons-fileupload/1.5" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="addressing-1.6.2" MODULE="addressing-1.6.2.jar" MVN="mvn:org.talend.libraries/addressing-1.6.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/addressing-1.6.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="addressing" MODULE="addressing-1.6.2.mar" MVN="mvn:org.talend.libraries/addressing-1.6.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/addressing-1.6.2.mar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="woden-api-1.0M9" MODULE="woden-api-1.0M9.jar" MVN="mvn:org.talend.libraries/woden-api-1.0M9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/woden-api-1.0M9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="woden-impl-commons-1.0M9" MODULE="woden-impl-commons-1.0M9.jar" MVN="mvn:org.talend.libraries/woden-impl-commons-1.0M9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/woden-impl-commons-1.0M9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="woden-impl-dom-1.0M9" MODULE="woden-impl-dom-1.0M9.jar" MVN="mvn:org.talend.libraries/woden-impl-dom-1.0M9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/woden-impl-dom-1.0M9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="woden-core-1.0M10" MODULE="woden-core-1.0M10.jar" MVN="mvn:org.apache.woden/woden-core/1.0M10" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="javax.servlet-api-3.1.0" MODULE="javax.servlet-api-3.1.0.jar" MVN="mvn:javax.servlet/javax.servlet-api/3.1.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="javax.transaction-api-1.3" MODULE="javax.transaction-api-1.3.jar" MVN="mvn:javax.transaction/javax.transaction-api/1.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<!-- log4j -->
<IMPORT NAME="reload4j-1.2.19" MODULE="reload4j-1.2.19.jar" MVN="mvn:ch.qos.reload4j/reload4j/1.2.19" REQUIRED="true" BundleID="" />
<!-- Jars for CRM 2015 CXF begin -->
@@ -27606,9 +27614,9 @@
UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="asm-9.1"
MODULE="asm-9.1.jar"
MVN="mvn:org.ow2.asm/asm/9.1"
NAME="asm-9.5"
MODULE="asm-9.5.jar"
MVN="mvn:org.ow2.asm/asm/9.5"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="cxf-core-3.4.10"
@@ -27718,9 +27726,9 @@
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jcl-over-slf4j-1.7.12.jar"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="neethi-3.1.1"
MODULE="neethi-3.1.1.jar"
MVN="mvn:org.apache.neethi/neethi/3.1.1"
NAME="neethi-3.2.0"
MODULE="neethi-3.2.0.jar"
MVN="mvn:org.apache.neethi/neethi/3.2.0"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="slf4j-api-1.7.12"
@@ -27781,14 +27789,13 @@
MVN="mvn:org.apache.wss4j/wss4j-ws-security-stax/2.2.2"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="xmlbeans-2.6.0"
MODULE="xmlbeans-2.6.0.jar"
MVN="mvn:org.talend.libraries/xmlbeans-2.6.0/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/xmlbeans-2.6.0.jar"
NAME="xmlbeans-3.0.1"
MODULE="xmlbeans-3.0.1.jar"
MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="xmlschema-core-2.2.3"
MODULE="xmlschema-core-2.2.3.jar"
NAME="xmlschema-core-2.3.0"
MODULE="xmlschema-core-2.3.0.jar"
MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.3"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
@@ -27828,8 +27835,8 @@
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<IMPORT
NAME="apache-commons-io"
MODULE="commons-io-2.8.0.jar"
MVN="mvn:commons-io/commons-io/2.8.0"
MODULE="commons-io-2.11.0.jar"
MVN="mvn:commons-io/commons-io/2.11.0"
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<IMPORT
NAME="commons-lang3-3.10.jar"
@@ -27873,14 +27880,14 @@
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.13.4"
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<IMPORT
NAME="json-smart-2.4.7.jar"
MODULE="json-smart-2.4.7.jar"
MVN="mvn:net.minidev/json-smart/2.4.7"
NAME="json-smart-2.4.11.jar"
MODULE="json-smart-2.4.11.jar"
MVN="mvn:net.minidev/json-smart/2.4.11"
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<IMPORT
NAME="accessors-smart-2.4.7"
MODULE="accessors-smart-2.4.7.jar"
MVN="mvn:net.minidev/accessors-smart/2.4.7"
NAME="accessors-smart-2.4.11"
MODULE="accessors-smart-2.4.11.jar"
MVN="mvn:net.minidev/accessors-smart/2.4.11"
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7"
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />

View File

@@ -46,10 +46,10 @@ imports="
com.microsoft.crm4.webserviceTest.CrmServiceStub service_<%=cid%> = new com.microsoft.crm4.webserviceTest.CrmServiceStub(<%=endpointURL%>);
org.apache.axis2.client.Options options_<%=cid%> = service_<%=cid%>._getServiceClient().getOptions();
org.apache.axis2.transport.http.HttpTransportProperties.Authenticator auth_<%=cid%> = new org.apache.axis2.transport.http.HttpTransportProperties.Authenticator();
org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator auth_<%=cid%> = new org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator();
List<String> authSchemes_<%=cid%> = new java.util.ArrayList<String>();
authSchemes_<%=cid%>.add(org.apache.axis2.transport.http.HttpTransportProperties.Authenticator.NTLM);
authSchemes_<%=cid%>.add(org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator.NTLM);
auth_<%=cid%> .setAuthSchemes(authSchemes_<%=cid%>);
auth_<%=cid%> .setUsername(<%=username%>);
@@ -59,15 +59,15 @@ imports="
auth_<%=cid%> .setDomain(<%=domain%>);
auth_<%=cid%> .setPreemptiveAuthentication(false);
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth_<%=cid%>);
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE, auth_<%=cid%>);
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setUserName(<%=username%>);
options_<%=cid%> .setPassword(decryptedPassword_<%=cid%>);
options_<%=cid%> .setTimeOutInMilliSeconds(Long.valueOf(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument catd_<%=cid%> = com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument.Factory.newInstance();
com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken token_<%=cid%> = com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken.Factory.newInstance();
@@ -81,11 +81,11 @@ imports="
msDynamicsWrapper_<%=cid%>.connect();
String crmTicket_<%=cid%> = msDynamicsWrapper_<%=cid%>.getCrmTicket();
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.REUSE_HTTP_CLIENT, "<%=reuseHttpClient%>");
options_<%=cid%> .setTimeOutInMilliSeconds(Long.valueOf(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.SO_TIMEOUT,new Integer(<%=timeout%>));
options_<%=cid%> .setProperty(org.apache.axis2.kernel.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(<%=timeout%>));
com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument catd_<%=cid%> = com.microsoft.schemas.crm._2007.webservices.CrmAuthenticationTokenDocument.Factory.newInstance();
com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken token_<%=cid%> = com.microsoft.schemas.crm._2007.coretypes.CrmAuthenticationToken.Factory.newInstance();

View File

@@ -38302,11 +38302,13 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="axiom-api" MODULE="axiom-api-1.2.8.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/axiom-api-1.2.8.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-impl" MODULE="axiom-impl-1.2.8.jar" MVN="mvn:org.talend.libraries/axiom-impl-1.2.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/axiom-impl-1.2.8.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-local" MODULE="axis2-transport-local-1.6.3.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.6.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-api" MODULE="axiom-api-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-api/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-impl" MODULE="axiom-impl-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-impl/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axiom-dom" MODULE="axiom-dom-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-dom/1.4.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-adb" MODULE="axis2-adb-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-adb/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="axis2-transport-local" MODULE="axis2-transport-local-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.8.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-codec-1.14" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
@@ -38314,40 +38316,45 @@
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="XmlSchema" MODULE="xmlschema-core-2.0.1.jar" MVN="mvn:org.talend.libraries/xmlschema-core-2.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/xmlschema-core-2.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="geronimo-stax" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="wstx-asl" MODULE="wstx-asl-3.2.4.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.4.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-3.0.1.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="XmlSchema" MODULE="xmlschema-core-2.3.0.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="geronimo-ws-metadata_2.0_spec-1.1.3" MODULE="geronimo-ws-metadata_2.0_spec-1.1.3.jar" MVN="mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="SOAP-JAF" MODULE="activation.jar" MVN="mvn:org.talend.libraries/activation/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="Java-JAXEN" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" BundleID="" />
<IMPORT NAME="saajapi" MODULE="saaj-api.jar" MVN="mvn:org.talend.libraries/saaj-api/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.saaj/lib/saaj-api.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="saajimpl" MODULE="saaj-impl.jar" MVN="mvn:org.talend.libraries/saaj-impl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.saaj/lib/saaj-impl.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jaxpapi" MODULE="jaxp-api.jar" MVN="mvn:org.talend.libraries/jaxp-api/6.0.0" BundleID="" UrlPath="platform:/plugin/org.talend.libraries.jax/lib/jaxp-api.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jaxpri" MODULE="jaxp-ri.jar" MVN="mvn:org.talend.libraries/jaxp-ri/6.0.0" BundleID="" UrlPath="platform:/plugin/org.talend.libraries.jax/lib/jaxp-ri.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="crm4client" MODULE="crm4client.jar" MVN="mvn:org.talend.libraries/crm4client/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/crm4client.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="crm4client" MODULE="crm4client-1.0.2.jar" MVN="mvn:org.talend.components/crm4client/1.0.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="woden-core-1.0M10" MODULE="woden-core-1.0M10.jar" MVN="mvn:org.apache.woden/woden-core/1.0M10" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<IMPORT NAME="httpclient" MODULE="httpclient-4.5.13.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.13" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="javax.servlet-api-3.1.0" MODULE="javax.servlet-api-3.1.0.jar" MVN="mvn:javax.servlet/javax.servlet-api/3.1.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="javax.transaction-api-1.3" MODULE="javax.transaction-api-1.3.jar" MVN="mvn:javax.transaction/javax.transaction-api/1.3" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="jakarta.activation-api-1.2.2" MODULE="jakarta.activation-api-1.2.2.jar" MVN="mvn:jakarta.activation/jakarta.activation-api/1.2.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
<!-- 2011 -->
<!-- crm client -->
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.3-20221123.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.3-20221123" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<!-- axis2 1.7.4 -->
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-impl-1.2.20" MODULE="axiom-impl-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-impl-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-adb-1.7.4" MODULE="axis2-adb-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-adb-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-kernel-1.7.4" MODULE="axis2-kernel-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-kernel-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-xmlbeans-1.7.4" MODULE="axis2-xmlbeans-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-xmlbeans-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-http-1.7.4" MODULE="axis2-transport-http-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-transport-http-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-local-1.7.4" MODULE="axis2-transport-local-1.7.4.jar" MVN="mvn:org.talend.libraries/axis2-transport-local-1.7.4/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.3-20230119.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.3-20230119" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<!-- axis2 1.8.0 -->
<IMPORT NAME="jakarta.activation-api-1.2.2" MODULE="jakarta.activation-api-1.2.2.jar" MVN="mvn:jakarta.activation/jakarta.activation-api/1.2.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-api-1.4.0" MODULE="axiom-api-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-api/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-impl-1.4.0" MODULE="axiom-impl-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-impl/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axiom-dom-1.4.0" MODULE="axiom-dom-1.4.0.jar" MVN="mvn:org.apache.ws.commons.axiom/axiom-dom/1.4.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-adb" MODULE="axis2-adb-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-adb/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-kernel" MODULE="axis2-kernel-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-kernel/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-xmlbeans" MODULE="axis2-xmlbeans-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-xmlbeans/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-http" MODULE="axis2-transport-http-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-http/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="axis2-transport-local-1.8.2" MODULE="axis2-transport-local-1.8.2.jar" MVN="mvn:org.apache.axis2/axis2-transport-local/1.8.2" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="commons-cli-1.2" MODULE="commons-cli-1.2.jar" MVN="mvn:commons-cli/commons-cli/1.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-cli-1.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-stax-api_1.0_spec-1.0.1" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="neethi-3.0.3" MODULE="neethi-3.0.3.jar" MVN="mvn:org.apache.neethi/neethi/3.0.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-ws-metadata_2.0_spec-1.1.3" MODULE="geronimo-ws-metadata_2.0_spec-1.1.3.jar" MVN="mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.2.0" MODULE="jaxen-1.2.0.jar" MVN="mvn:jaxen/jaxen/1.2.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="neethi" MODULE="neethi-3.2.0.jar" MVN="mvn:org.apache.neethi/neethi/3.2.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlbeans-2.6.0" MODULE="xmlbeans-2.6.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.6.0/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlschema-core-2.2.1" MODULE="xmlschema-core-2.2.1.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-httpclient-3.1" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-fileupload-1.3.1" MODULE="commons-fileupload-1.3.1.jar" MVN="mvn:org.talend.libraries/commons-fileupload-1.3.1/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlbeans-3.0.1" MODULE="xmlbeans-3.0.1.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="xmlschema-core-2.3.0" MODULE="xmlschema-core-2.3.0.jar" MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')"/>
<IMPORT NAME="commons-fileupload-1.5" MODULE="commons-fileupload-1.5.jar" MVN="mvn:commons-fileupload/commons-fileupload/1.5" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="addressing-1.6.2" MODULE="addressing-1.6.2.jar" MVN="mvn:org.talend.libraries/addressing-1.6.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/addressing-1.6.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="addressing" MODULE="addressing-1.6.2.mar" MVN="mvn:org.talend.libraries/addressing-1.6.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/addressing-1.6.2.mar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="woden-api-1.0M9" MODULE="woden-api-1.0M9.jar" MVN="mvn:org.talend.libraries/woden-api-1.0M9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/woden-api-1.0M9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
@@ -38363,9 +38370,9 @@
UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="asm-9.1"
MODULE="asm-9.1.jar"
MVN="mvn:org.ow2.asm/asm/9.1"
NAME="asm-9.5"
MODULE="asm-9.5.jar"
MVN="mvn:org.ow2.asm/asm/9.5"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="cxf-core-3.4.10"
@@ -38475,9 +38482,9 @@
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jcl-over-slf4j-1.7.12.jar"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="neethi-3.1.1"
MODULE="neethi-3.1.1.jar"
MVN="mvn:org.apache.neethi/neethi/3.1.1"
NAME="neethi-3.2.0"
MODULE="neethi-3.2.0.jar"
MVN="mvn:org.apache.neethi/neethi/3.2.0"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="slf4j-api-1.7.12"
@@ -38538,15 +38545,14 @@
MVN="mvn:org.apache.wss4j/wss4j-ws-security-stax/2.2.2"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="xmlbeans-2.6.0"
MODULE="xmlbeans-2.6.0.jar"
MVN="mvn:org.talend.libraries/xmlbeans-2.6.0/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/xmlbeans-2.6.0.jar"
NAME="xmlbeans-3.0.1"
MODULE="xmlbeans-3.0.1.jar"
MVN="mvn:org.apache.xmlbeans/xmlbeans/3.0.1"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="xmlschema-core-2.2.3"
MODULE="xmlschema-core-2.2.3.jar"
MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.3"
NAME="xmlschema-core-2.3.0"
MODULE="xmlschema-core-2.3.0.jar"
MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.3.0"
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
<IMPORT
NAME="xmlsec-2.3.1"
@@ -38591,8 +38597,8 @@
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<IMPORT
NAME="apache-commons-io"
MODULE="commons-io-2.8.0.jar"
MVN="mvn:commons-io/commons-io/2.8.0"
MODULE="commons-io-2.11.0.jar"
MVN="mvn:commons-io/commons-io/2.11.0"
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<IMPORT
NAME="commons-lang3-3.10.jar"
@@ -38636,14 +38642,14 @@
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.13.4"
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<IMPORT
NAME="json-smart-2.4.7.jar"
MODULE="json-smart-2.4.7.jar"
MVN="mvn:net.minidev/json-smart/2.4.7"
NAME="json-smart-2.4.11.jar"
MODULE="json-smart-2.4.11.jar"
MVN="mvn:net.minidev/json-smart/2.4.11"
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<IMPORT
NAME="accessors-smart-2.4.7"
MODULE="accessors-smart-2.4.7.jar"
MVN="mvn:net.minidev/accessors-smart/2.4.7"
NAME="accessors-smart-2.4.11"
MODULE="accessors-smart-2.4.11.jar"
MVN="mvn:net.minidev/accessors-smart/2.4.11"
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7"
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />

View File

@@ -190,7 +190,7 @@
<IMPORT NAME="slf4j-log4j12-1.7.16.jar" MODULE="slf4j-log4j12-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-log4j12/1.7.16" REQUIRED_IF="SERVER == 'ACTIVEMQ'" />
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq.allclient-9.2.4.0.jar" MVN="mvn:com.ibm.mq/com.ibm.mq.allclient/9.2.4.0" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20210307.jar" MVN="mvn:org.json/json/20210307" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcprov-jdk15on-1.69" MODULE="bcprov-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.69" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcpkix-jdk15on-1.69" MODULE="bcpkix-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcpkix-jdk15on/1.69" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcutil-jdk15on-1.69" MODULE="bcutil-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcutil-jdk15on/1.69" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />

View File

@@ -329,7 +329,7 @@
<!-- Websphere MQ -->
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq.allclient-9.2.4.0.jar" MVN="mvn:com.ibm.mq/com.ibm.mq.allclient/9.2.4.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20210307.jar" MVN="mvn:org.json/json/20210307" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcprov-jdk15on-1.69" MODULE="bcprov-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcpkix-jdk15on-1.69" MODULE="bcpkix-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcpkix-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcutil-jdk15on-1.69" MODULE="bcutil-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcutil-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />

View File

@@ -83,7 +83,7 @@ This component only support Websphere MQ currently!
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq.allclient-9.2.4.0.jar" MVN="mvn:com.ibm.mq/com.ibm.mq.allclient/9.2.4.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20210307.jar" MVN="mvn:org.json/json/20210307" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcprov-jdk15on-1.69" MODULE="bcprov-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcpkix-jdk15on-1.69" MODULE="bcpkix-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcpkix-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcutil-jdk15on-1.69" MODULE="bcutil-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcutil-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />

View File

@@ -454,7 +454,7 @@
<!-- Websphere MQ -->
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq.allclient-9.2.4.0.jar" MVN="mvn:com.ibm.mq/com.ibm.mq.allclient/9.2.4.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20210307.jar" MVN="mvn:org.json/json/20210307" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="JSON In Java " MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcprov-jdk15on-1.69" MODULE="bcprov-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcpkix-jdk15on-1.69" MODULE="bcpkix-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcpkix-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />
<IMPORT NAME="bcutil-jdk15on-1.69" MODULE="bcutil-jdk15on-1.69.jar" MVN="mvn:org.bouncycastle/bcutil-jdk15on/1.69" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'WEBSPHERE')" />

View File

@@ -328,7 +328,7 @@
<IMPORT NAME="commons-log" MODULE="commons-logging-1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.jar" REQUIRED="true" />
<IMPORT NAME="commons-beanutils" MODULE="commons-beanutils-1.9.4.jar" MVN="mvn:commons-beanutils/commons-beanutils/1.9.4" REQUIRED="true" />
<IMPORT NAME="commons-colections" MODULE="commons-collections-3.2.2.jar" MVN="mvn:commons-collections/commons-collections/3.2.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-3.2.2.jar" REQUIRED="true" BundleID="" />
<IMPORT NAME="commons-fileupload" MODULE="commons-fileupload-1.3.1.jar" MVN="mvn:org.talend.libraries/commons-fileupload-1.3.1/6.0.0" REQUIRED="true" />
<IMPORT NAME="commons-fileupload-1.5" MODULE="commons-fileupload-1.5.jar" MVN="mvn:commons-fileupload/commons-fileupload/1.5" REQUIRED="true" />
<IMPORT NAME="commons-pool" MODULE="commons-pool-1.2.jar" MVN="mvn:org.talend.libraries/commons-pool-1.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-pool-1.2.jar" REQUIRED="true" />
<IMPORT NAME="commons-digester" MODULE="commons-digester-1.7.jar" MVN="mvn:org.talend.libraries/commons-digester-1.7/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-digester-1.7.jar" REQUIRED="true" />
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.0.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.0.1" REQUIRED="true" />

View File

@@ -137,7 +137,11 @@ imports="
<%
if (("PUBLICKEY").equals(authMethod)) {
%>
try {
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
} catch (java.lang.Exception e) {
//ignore
}
<%}%>
if(14 == se_<%=cid%>.getDisconnectCode()){
throw new IllegalArgumentException("Authentication failed.");

View File

@@ -51,22 +51,29 @@ imports="
log.debug("Execute command: "+ rmCmd_<%= cid %>);
<%}%>
org.apache.sshd.client.channel.ClientChannel channel_<%=cid %> = session_<%=cid %>.createExecChannel((command_<%=cid %>).toString());
java.io.ByteArrayOutputStream stdout_<%=cid %> = new java.io.ByteArrayOutputStream();
java.io.ByteArrayOutputStream stderr_<%=cid %> = new java.io.ByteArrayOutputStream();
channel_<%=cid%>.setOut(stdout_<%=cid %>);
channel_<%=cid%>.setErr(stderr_<%=cid %>);
channel_<%=cid%>.open();
java.util.Set<org.apache.sshd.client.channel.ClientChannelEvent> clientChannelEvents_<%=cid %> =
channel_<%=cid%>.waitFor(java.util.EnumSet.of(
org.apache.sshd.client.channel.ClientChannelEvent.CLOSED,org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS), 0L);
exit_code_<%=cid%> = channel_<%=cid%>.getExitStatus();
channel_<%=cid%>.close();
<%if(isLog4jEnabled){%>
log.debug("Channel Events: "+ java.util.Arrays.toString(clientChannelEvents_<%=cid %>.toArray()));
<%}%>
stringStdout_<%=cid%>.append(stdout_<%=cid%>.toString());
stringStderr_<%=cid%>.append(stderr_<%=cid%>.toString());
final java.io.InputStream invertedOut_<%=cid%> = channel_<%=cid%>.getInvertedOut();
final List<String> outLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedOut_<%=cid%>);
final java.io.InputStream invertedErr_<%=cid%> = channel_<%=cid%>.getInvertedErr();
final List<String> errorLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedErr_<%=cid%>);
stringStdout_<%=cid%>.append(outLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
stringStderr_<%=cid%>.append(errorLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
channel_<%=cid%>.close();
if(stringStdout_<%=cid%>.length() >0 && stringStdout_<%=cid%>.charAt(stringStdout_<%=cid%>.length()-1) == '\n'){
stringStdout_<%=cid%>.deleteCharAt(stringStdout_<%=cid%>.length()-1);
@@ -79,6 +86,7 @@ imports="
<% if(dieOnError){ %>
StringBuilder errMsg_<%= cid %> = new StringBuilder("File(s) deleting failed.");
if(clientChannelEvents_<%=cid %>.contains(org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS)){
if (exit_code_<%= cid %> != 0) {
isCmdFailed_<%= cid %> = true;

View File

@@ -167,7 +167,11 @@ imports="
<%
if (("PUBLICKEY").equals(authMethod)) {
%>
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
try {
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
} catch (java.lang.Exception e) {
//ignore
}
<%}%>
if(14 == se_<%=cid%>.getDisconnectCode()){
throw new IllegalArgumentException("Authentication failed.");

View File

@@ -50,22 +50,27 @@ imports="
<%}%>
org.apache.sshd.client.channel.ClientChannel channel_<%=cid %> = session_<%=cid %>.createExecChannel((command_<%=cid %>).toString());
java.io.ByteArrayOutputStream stdout_<%=cid %> = new java.io.ByteArrayOutputStream();
java.io.ByteArrayOutputStream stderr_<%=cid %> = new java.io.ByteArrayOutputStream();
channel_<%=cid%>.setOut(stdout_<%=cid %>);
channel_<%=cid%>.setErr(stderr_<%=cid %>);
channel_<%=cid%>.open();
java.util.Set<org.apache.sshd.client.channel.ClientChannelEvent> clientChannelEvents_<%=cid %> =
channel_<%=cid%>.waitFor(java.util.EnumSet.of(
org.apache.sshd.client.channel.ClientChannelEvent.CLOSED,org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS), 0L);
exit_code_<%=cid%> = channel_<%=cid%>.getExitStatus();
channel_<%=cid%>.close();
<%if(isLog4jEnabled){%>
log.debug("Channel Events: "+ java.util.Arrays.toString(clientChannelEvents_<%=cid %>.toArray()));
<%}%>
stringStdout_<%=cid%>.append(stdout_<%=cid%>.toString());
stringStderr_<%=cid%>.append(stderr_<%=cid%>.toString());
final java.io.InputStream invertedOut_<%=cid%> = channel_<%=cid%>.getInvertedOut();
final List<String> outLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedOut_<%=cid%>);
final java.io.InputStream invertedErr_<%=cid%> = channel_<%=cid%>.getInvertedErr();
final List<String> errorLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedErr_<%=cid%>);
stringStdout_<%=cid%>.append(outLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
stringStderr_<%=cid%>.append(errorLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
channel_<%=cid%>.close();
if(stringStdout_<%=cid%>.length() >0 && stringStdout_<%=cid%>.charAt(stringStdout_<%=cid%>.length()-1) == '\n'){
stringStdout_<%=cid%>.deleteCharAt(stringStdout_<%=cid%>.length()-1);

View File

@@ -162,7 +162,11 @@ imports="
<%
if (("PUBLICKEY").equals(authMethod)) {
%>
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
try {
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
} catch (java.lang.Exception e) {
//ignore
}
<%}%>
if(14 == se_<%=cid%>.getDisconnectCode()){
throw new IllegalArgumentException("Authentication failed.");
@@ -191,22 +195,26 @@ imports="
StringBuilder stringStdout_<%=cid%> =new StringBuilder();
StringBuilder stringStderr_<%=cid%> =new StringBuilder();
Integer exit_code_<%=cid%> = null;
java.io.ByteArrayOutputStream stdout_<%=cid %> = new java.io.ByteArrayOutputStream();
java.io.ByteArrayOutputStream stderr_<%=cid %> = new java.io.ByteArrayOutputStream();
channel_<%=cid%>.setOut(stdout_<%=cid %>);
channel_<%=cid%>.setErr(stderr_<%=cid %>);
channel_<%=cid%>.open();
java.util.Set<org.apache.sshd.client.channel.ClientChannelEvent> clientChannelEvents_<%=cid %> =
channel_<%=cid%>.waitFor(java.util.EnumSet.of(
org.apache.sshd.client.channel.ClientChannelEvent.CLOSED,org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS), 0L);
exit_code_<%=cid%> = channel_<%=cid%>.getExitStatus();
channel_<%=cid%>.close();
<%if(isLog4jEnabled){%>
log.debug("Channel Events: "+ java.util.Arrays.toString(clientChannelEvents_<%=cid %>.toArray()));
<%}%>
stringStdout_<%=cid%>.append(stdout_<%=cid%>.toString());
stringStderr_<%=cid%>.append(stderr_<%=cid%>.toString());
final java.io.InputStream invertedOut_<%=cid%> = channel_<%=cid%>.getInvertedOut();
final List<String> outLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedOut_<%=cid%>);
final java.io.InputStream invertedErr_<%=cid%> = channel_<%=cid%>.getInvertedErr();
final List<String> errorLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedErr_<%=cid%>);
stringStdout_<%=cid%>.append(outLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
stringStderr_<%=cid%>.append(errorLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
channel_<%=cid%>.close();
if(stringStdout_<%=cid%>.length() >0 && stringStdout_<%=cid%>.charAt(stringStdout_<%=cid%>.length()-1) == '\n'){
stringStdout_<%=cid%>.deleteCharAt(stringStdout_<%=cid%>.length()-1);

View File

@@ -31,22 +31,29 @@ imports="
//execute the command
org.apache.sshd.client.channel.ClientChannel channel_<%=cid %> = session_<%=cid %>.createExecChannel((command_<%=cid %>).toString());
java.io.ByteArrayOutputStream stdout_<%=cid %> = new java.io.ByteArrayOutputStream();
java.io.ByteArrayOutputStream stderr_<%=cid %> = new java.io.ByteArrayOutputStream();
channel_<%=cid%>.setOut(stdout_<%=cid %>);
channel_<%=cid%>.setErr(stderr_<%=cid %>);
channel_<%=cid%>.open();
java.util.Set<org.apache.sshd.client.channel.ClientChannelEvent> clientChannelEvents_<%=cid %> =
channel_<%=cid%>.waitFor(java.util.EnumSet.of(
org.apache.sshd.client.channel.ClientChannelEvent.CLOSED,org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS), 0L);
exit_code_<%=cid%> = channel_<%=cid%>.getExitStatus();
channel_<%=cid%>.close();
<%if(isLog4jEnabled){%>
log.debug("Channel Events: "+ java.util.Arrays.toString(clientChannelEvents_<%=cid %>.toArray()));
<%}%>
stringStdout_<%=cid%>.append(stdout_<%=cid%>.toString());
stringStderr_<%=cid%>.append(stderr_<%=cid%>.toString());
final java.io.InputStream invertedOut_<%=cid%> = channel_<%=cid%>.getInvertedOut();
final List<String> outLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedOut_<%=cid%>);
final java.io.InputStream invertedErr_<%=cid%> = channel_<%=cid%>.getInvertedErr();
final List<String> errorLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedErr_<%=cid%>);
stringStdout_<%=cid%>.append(outLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
stringStderr_<%=cid%>.append(errorLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
channel_<%=cid%>.close();
if(stringStdout_<%=cid%>.length() >0 && stringStdout_<%=cid%>.charAt(stringStdout_<%=cid%>.length()-1) == '\n'){
stringStdout_<%=cid%>.deleteCharAt(stringStdout_<%=cid%>.length()-1);

View File

@@ -50,7 +50,11 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
<%
if (("PUBLICKEY").equals(authMethod)) {
%>
try {
java.nio.file.Files.write(privateKey_<%=cid%>,lines_<%=cid%>);
} catch (java.lang.Exception e) {
//ignore
}
<%}%>
if(14 == se_<%=cid%>.getDisconnectCode()){
throw new IllegalArgumentException("Authentication failed.");
@@ -78,7 +82,12 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
}
%>
cmd_<%=cid%>.append("exit\n");
channel_<%=cid%>.setIn(new java.io.ByteArrayInputStream(cmd_<%=cid%>.toString().getBytes()));
channel_<%=cid%>.open().verify(<%=("true").equals(useTimeout)?timeout + " * 1000L":""%>);
final java.io.OutputStream invertedIn_<%=cid%> = channel_<%=cid%>.getInvertedIn();
invertedIn_<%=cid%>.write(cmd_<%=cid%>.toString().getBytes());
invertedIn_<%=cid%>.flush();
invertedIn_<%=cid%>.close();
<%
}else{
if(commands.size() > 0){
@@ -97,6 +106,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
}
%>
channel_<%=cid %> = session_<%=cid %>.createExecChannel((command_<%=cid %>).toString());
channel_<%=cid%>.open();
@@ -110,29 +120,41 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
<%
}
%>
java.io.ByteArrayOutputStream stdout_<%=cid %> = new java.io.ByteArrayOutputStream();
java.io.ByteArrayOutputStream stderr_<%=cid %> = new java.io.ByteArrayOutputStream();
channel_<%=cid%>.setOut(stdout_<%=cid %>);
channel_<%=cid%>.setErr(stderr_<%=cid %>);
channel_<%=cid%>.open();
java.util.Set<org.apache.sshd.client.channel.ClientChannelEvent> clientChannelEvents_<%=cid %> =
channel_<%=cid%>.waitFor(java.util.EnumSet.of(
org.apache.sshd.client.channel.ClientChannelEvent.CLOSED,org.apache.sshd.client.channel.ClientChannelEvent.EXIT_STATUS), 0L);
exit_code_<%=cid%> = channel_<%=cid%>.getExitStatus();
channel_<%=cid%>.close();
session_<%=cid%>.close();
<%if(isLog4jEnabled){%>
log.debug("Channel Events: "+ java.util.Arrays.toString(clientChannelEvents_<%=cid %>.toArray()));
<%}%>
stringStdout_<%=cid%>.append(stdout_<%=cid%>.toString());
stringStderr_<%=cid%>.append(stderr_<%=cid%>.toString());
final java.io.InputStream invertedOut_<%=cid%> = channel_<%=cid%>.getInvertedOut();
final List<String> outLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedOut_<%=cid%>);
final java.io.InputStream invertedErr_<%=cid%> = channel_<%=cid%>.getInvertedErr();
final List<String> errorLines_<%=cid%> = org.apache.sshd.common.util.io.IoUtils.readAllLines(invertedErr_<%=cid%>);
stringStdout_<%=cid%>.append(outLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
stringStderr_<%=cid%>.append(errorLines_<%=cid%>.stream().collect(java.util.stream.Collectors.joining("\n")));
channel_<%=cid%>.close();
session_<%=cid%>.close();
if(stringStdout_<%=cid%>.length() >0 && stringStdout_<%=cid%>.charAt(stringStdout_<%=cid%>.length()-1) == '\n'){
stringStdout_<%=cid%>.deleteCharAt(stringStdout_<%=cid%>.length()-1);
}
out_content_<%=cid%> = stringStdout_<%=cid%>.toString();
err_content_<%=cid%> = stringStderr_<%=cid%>.toString();
<%if(isLog4jEnabled){%>
log.debug("<%=cid%> - Command line standard result: " + out_content_<%=cid%>);
log.debug("<%=cid%> - Command line error result: " + err_content_<%=cid%>);

View File

@@ -455,7 +455,7 @@
<IMPORT MODULE="httpclient-cache-4.3.1.jar" NAME="httpclient-cache" MVN="mvn:org.apache.httpcomponents/httpclient-cache/4.3.1" REQUIRED="true"/>
<IMPORT NAME="httpcore-4.4.13" MODULE="httpcore-4.4.13.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.13" REQUIRED="true"/>
<IMPORT MODULE="httpmime-4.3.1.jar" NAME="httpmime" MVN="mvn:org.apache.httpcomponents/httpmime/4.3.1" REQUIRED="true"/>
<IMPORT MODULE="org.json.jar" NAME="json" MVN="mvn:org.talend.libraries/org.json/6.0.0" REQUIRED="true"/>
<IMPORT NAME="json" MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED="true"/>
<IMPORT NAME="components-servicenow" MODULE="components-servicenow-1.0.1-20210428.jar" MVN="mvn:org.talend.components/components-servicenow/1.0.1-20210428" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -426,7 +426,7 @@
<IMPORT MODULE="httpclient-cache-4.3.1.jar" NAME="httpclient-cache" MVN="mvn:org.apache.httpcomponents/httpclient-cache/4.3.1" REQUIRED="true"/>
<IMPORT NAME="httpcore-4.4.13" MODULE="httpcore-4.4.13.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.13" REQUIRED="true"/>
<IMPORT MODULE="httpmime-4.3.1.jar" NAME="httpmime" MVN="mvn:org.apache.httpcomponents/httpmime/4.3.1" REQUIRED="true"/>
<IMPORT MODULE="org.json.jar" NAME="json" MVN="mvn:org.talend.libraries/org.json/6.0.0" REQUIRED="true"/>
<IMPORT NAME="json" MODULE="json-20230227.jar" MVN="mvn:org.json/json/20230227" REQUIRED="true"/>
<IMPORT MODULE="commons-io-2.8.0.jar" NAME="commons-io" MVN="mvn:commons-io/commons-io/2.8.0" REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -381,6 +381,9 @@ public enum EParameterName {
REPAINT("REPAINT"), //$NON-NLS-1$
// for joblet short unique name
SHORT_UNIQUE_NAME("SHORT_UNIQUE_NAME"), //$NON-NLS-1$
// for automap algorithms
LEVENSHTEIN("LEVENSHTEIN"), //$NON-NLS-1$
JACCARD("JACCARD"), //$NON-NLS-1$

View File

@@ -727,7 +727,7 @@ public class ConnectionCreateAction extends SelectionAction {
listArgs.add(meta.getTableName());
}
} else {
listArgs.add(node.getUniqueName());
listArgs.add(node.getUniqueName(false));
}
String baseName = node.getConnectionName();

View File

@@ -99,6 +99,7 @@ import org.talend.core.model.repository.ExternalNodesFactory;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.model.utils.NodeUtil;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.model.utils.TalendTextUtils;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
@@ -608,6 +609,23 @@ public class Node extends Element implements IGraphicalNode {
}
setPropertyValue(EParameterName.UNIQUE_NAME.getName(), uniqueName2);
IElementParameter shortUniqueNameParam = getElementParameter(EParameterName.SHORT_UNIQUE_NAME.getName());
if (shortUniqueNameParam != null) {
// Only for SHORT_UNIQUE_NAME element parameter exist.
// Joblet SHORT_UNIQUE_NAME init in AbstractJobletComponent.createElementParameters(INode)
String shortUniqueName = "";
if (shortUniqueNameParam.getValue() != null && !"".equals(shortUniqueNameParam.getValue())) {
shortUniqueName = (String) shortUniqueNameParam.getValue();
}
if (!reloadingComponent && shortUniqueName != null
&& (shortUniqueNameParam.getValue() == null || "".equals(shortUniqueNameParam.getValue()))) {
shortUniqueName = ((Process) getProcess()).generateUniqueNodeName(this, true);
((Process) getProcess()).addUniqueNodeName(shortUniqueName);
}
setPropertyValue(EParameterName.SHORT_UNIQUE_NAME.getName(), shortUniqueName);
}
/*
* for implements [TESB-10335], need to replace "__NODE_UNIQUE_NAME__" to node unique name in expression.
*/
@@ -876,17 +894,28 @@ public class Node extends Element implements IGraphicalNode {
*/
@Override
public String getUniqueName() {
return getUniqueName(TalendPropertiesUtil.isEnabledUseShortJobletName());
}
public String getUniqueName(boolean enableShortName) {
String uniqueName = null;
IElementParameter param = getElementParameter(EParameterName.UNIQUE_NAME.getName());
if (param != null) {
uniqueName = (String) param.getValue();
}
if (enableShortName) {
IElementParameter parameter = getElementParameter(EParameterName.SHORT_UNIQUE_NAME.getName());
if (parameter != null) {
uniqueName = (String) parameter.getValue();
}
}
return uniqueName;
}
// can only be set with the properties
private void setUniqueName(String uniqueName) {
((Process) getProcess()).removeUniqueNodeName(getUniqueName());
((Process) getProcess()).removeUniqueNodeName(getUniqueName(false));
((Process) getProcess()).addUniqueNodeName(uniqueName);
}
@@ -2074,7 +2103,7 @@ public class Node extends Element implements IGraphicalNode {
externalNode.setIncomingConnections(inputs);
externalNode.setOutgoingConnections(outputs);
externalNode.setElementParameters(getElementParameters());
externalNode.setUniqueName(getUniqueName());
externalNode.setUniqueName(getUniqueName(false));
externalNode.setSubProcessStart(isSubProcessStart());
externalNode.setProcess(getProcess());
externalNode.setComponent(getComponent());

View File

@@ -124,6 +124,7 @@ import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.model.update.IUpdateManager;
import org.talend.core.model.utils.NodeUtil;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.model.utils.TalendTextUtils;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.utils.ConvertJobsUtil;
@@ -745,6 +746,10 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
String uniqueName = nodeContainer.getNode().getUniqueName();
removeUniqueNodeName(uniqueName);
if (nodeContainer instanceof AbstractJobletContainer) {
// remove SHORT_UNIQUE_NAME and UNIQUE_NAME for joblet
String name = nodeContainer.getNode().getUniqueName(false);
removeUniqueNodeName(name);
// use readedContainers to record the containers alreay be read, in case of falling into dead loop
Set<NodeContainer> readedContainers = new HashSet<NodeContainer>();
removeUniqueNodeNamesInJoblet((AbstractJobletContainer) nodeContainer, readedContainers);
@@ -1153,7 +1158,8 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|| param.getFieldType().equals(EParameterFieldType.PROPERTY_TYPE)
|| param.getFieldType().equals(EParameterFieldType.VALIDATION_RULE_TYPE)
|| param.getFieldType().equals(EParameterFieldType.UNIFIED_COMPONENTS)
|| param.getName().equals(EParameterName.UPDATE_COMPONENTS.getName())) {
|| param.getName().equals(EParameterName.UPDATE_COMPONENTS.getName())
|| param.getName().equals(EParameterName.SHORT_UNIQUE_NAME.getName())) {
return;
}
if (param.getParentParameter() != null) {
@@ -1284,6 +1290,19 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
}
} else if (param.getFieldType().equals(EParameterFieldType.PASSWORD) && value instanceof String) {
pType.setRawValue((String) value);
} else if (param.getFieldType().equals(EParameterFieldType.COMPONENT_LIST) && value != null) {
String componentValue = value.toString();
if (TalendPropertiesUtil.isEnabledUseShortJobletName() && (param.getElement() instanceof INode)) {
INode node = (INode) param.getElement();
String completeValue = DesignerUtilities.getNodeInJobletCompleteUniqueName(node, componentValue);
// possible blank when joblet node removed from process
componentValue = completeValue;
if (StringUtils.isBlank(completeValue) && param.isContextMode()
&& !DesignerUtilities.validateJobletShortName(value.toString())) {
componentValue = value.toString();
}
}
pType.setValue(componentValue);
} else {
if (value == null) {
pType.setValue(""); //$NON-NLS-1$
@@ -1820,10 +1839,11 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
for (Connection element : connList) {
connec = element;
cType = fileFact.createConnectionType();
cType.setSource(node.getUniqueName());
cType.setSource(node.getUniqueName(false));
INode jTarget = connec.getTarget();
String targetUniqueName = jTarget.getUniqueName();
if (jTarget instanceof Node) {
targetUniqueName = ((Node) jTarget).getUniqueName(false);
Node jn = (Node) jTarget.getJobletNode();
if (jn != null) {
targetUniqueName = jn.getUniqueName();
@@ -2195,6 +2215,7 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
loadNotes(processType);
loadSubjobs(processType);
checkNodeComponentListElementParameters();
initExternalComponents();
initJobletComponents();
setActivate(true);
@@ -2230,6 +2251,32 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
}
}
public void checkNodeComponentListElementParameters() {
if (!TalendPropertiesUtil.isEnabledUseShortJobletName()) {
return;
}
// load short unique name value for component list value
for (INode node : getGraphicalNodes()) {
for (IElementParameter param : node.getElementParameters()) {
loadComponentListShortNameValue(node, param);
Collection<IElementParameter> childrenParameter = param.getChildParameters().values();
for (IElementParameter childParameter : childrenParameter) {
loadComponentListShortNameValue(node, childParameter);
}
}
}
}
private void loadComponentListShortNameValue(INode node, IElementParameter param) {
if (param != null && EParameterFieldType.COMPONENT_LIST == param.getFieldType()) {
String originalValue = param.getValue().toString();
String shortUniqueName = DesignerUtilities.getNodeInJobletShortUniqueName(node, originalValue);
if (StringUtils.isNotBlank(shortUniqueName)) {
param.setValue(shortUniqueName);
}
}
}
@SuppressWarnings("unchecked")
private void checkNodeTableParameters() {
for (INode node : getGraphicalNodes()) {
@@ -2543,7 +2590,7 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
}
loadElementParameters(nc, listParamType);
if (nodesHashtable.containsKey(nc.getUniqueName())) {
if (nodesHashtable.containsKey(nc.getUniqueName(false))) {
// if the uniquename is already in the list, there must be a problem with the job.
// simply don't load the component
return null;
@@ -2586,7 +2633,7 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
NodeContainer nodeContainer = loadNodeContainer(nc, isJunitContainer);
addNodeContainer(nodeContainer);
nodesHashtable.put(nc.getUniqueName(), nc);
nodesHashtable.put(nc.getUniqueName(false), nc);
updateAllMappingTypes();
nc.setNeedLoadLib(false);
if (nc.isJoblet()) {
@@ -3455,12 +3502,18 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
}
public String generateUniqueNodeName(INode node) {
return generateUniqueNodeName(node, false);
}
public String generateUniqueNodeName(INode node, boolean useShortName) {
IComponent component = node.getComponent();
if (node instanceof Node) {
component = ((Node) node).getDelegateComponent();
}
String baseName = component.getOriginalName();
if (EComponentType.GENERIC.equals(component.getComponentType())) {
if (useShortName) {
baseName = component.getShortName();
} else if (EComponentType.GENERIC.equals(component.getComponentType())) {
baseName = component.getDisplayName();
}
return UniqueNodeNameGenerator.generateUniqueNodeName(baseName, uniqueNodeNameList);

View File

@@ -330,6 +330,7 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
processContextVars.add(param.getName());
}
Map<String, JobContext> newGroupMap = new HashMap<>();
ContextUtils.clearMissingContextCache();
for (IContextParameter param : defaultContext.getContextParameterList()) {
if (!param.isBuiltIn()) {
String source = param.getSource();
@@ -430,7 +431,7 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
ContextUtils.clearMissingContextCache();
for (IContext context : contextManager.getListContext()) {
for (IContextParameter param : context.getContextParameterList()) {
if (!param.isBuiltIn()) {
@@ -470,6 +471,9 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
}
}
}
// re-check deleteParams from repositoryRenamedMap
repositoryRenamedMap.forEach((item, renameMap) -> renameMap.forEach((_new, _old) -> deleteParams.remove(item, _old)));
// built-in
if (contextManager instanceof JobContextManager) { // add the lost source for init process
Set<String> lostParameters = ((JobContextManager) contextManager).getLostParameters();
@@ -504,7 +508,8 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
}
}
}
checkNewAddParameterForRef(existedParams, contextManager, ContextUtils.isPropagateContextVariable());
checkNewAddParameterForRef(existedParams, repositoryRenamedMap, contextManager,
ContextUtils.isPropagateContextVariable());
// see 0004661: Add an option to propagate when add or remove a variable in a repository context to
// jobs/joblets.
checkPropagateContextVariable(contextResults, contextManager, deleteParams, allContextItem, refContextIds);
@@ -556,7 +561,8 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
return contextResults;
}
private void checkNewAddParameterForRef(Map<Item, Set<String>> existedParams, final IContextManager contextManager,
private void checkNewAddParameterForRef(Map<Item, Set<String>> existedParams,
Map<Item, Map<String, String>> repositoryRenamedMap, final IContextManager contextManager,
boolean isPropagateContextVariable) {
if (!isPropagateContextVariable) {
return;
@@ -567,14 +573,15 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
ContextType contextType = ContextUtils.getContextTypeByName(contextItem, null);
List<ContextParameterType> contextParameter = contextType.getContextParameter();
Set<String> existedParName = existedParams.get(contextItem);
Map<String, String> renameMap = repositoryRenamedMap.get(contextItem);
for (ContextParameterType parameterType : contextParameter) {
if (!existedParName.contains(parameterType.getName())) {
if (!existedParName.contains(parameterType.getName())
&& (renameMap == null || !renameMap.containsKey(parameterType.getName()))) {
if (newParametersMap.get(contextItem) == null) {
newParametersMap.put(contextItem, new HashSet<String>());
}
// To avoid the case: serval contexts contain more than one same name parameters, but we only can
// add
// one of them
// To avoid the case: several contexts contain more than one same name parameters
// but we only can add one of them
IContext processContext = ((JobContextManager) contextManager).getDefaultContext();
if (processContext.getContextParameter(parameterType.getName()) == null) {
newParametersMap.get(contextItem).add(parameterType.getName());

View File

@@ -31,6 +31,7 @@ import org.talend.core.ui.metadata.dialog.CustomTableManager;
import org.talend.core.ui.metadata.dialog.MetadataDialog;
import org.talend.core.ui.metadata.editor.MetadataTableEditor;
import org.talend.core.ui.metadata.editor.MetadataTableEditorView;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.ui.editor.connections.Connection;
import org.talend.designer.core.ui.editor.properties.controllers.AbstractElementPropertySectionController;
import org.talend.designer.core.ui.views.properties.MultipleThreadDynamicComposite;
@@ -78,8 +79,10 @@ public class MainConnectionComposite extends MultipleThreadDynamicComposite {
// Composite compositeEditorView = new Composite(composite, SWT.BORDER);
// compositeEditorView.setLayoutData(data);
String elementName = (String) ((Connection) elem).getSource()
.getElementParameter(EParameterName.UNIQUE_NAME.getName()).getValue();
metadataTableEditor = new MetadataTableEditor(outputMetaTable, "Schema from " //$NON-NLS-1$
+ ((Connection) elem).getSource().getElementName() + " output "); //$NON-NLS-1$
+ elementName + " output "); //$NON-NLS-1$
metadataTableEditorView = new MetadataTableEditorView(composite, SWT.NONE, metadataTableEditor, true, false,
true, false);
MetadataDialog.initializeMetadataTableView(metadataTableEditorView, ((Connection) elem).getSource(),

View File

@@ -18,6 +18,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.jface.fieldassist.DecoratedField;
@@ -48,6 +49,7 @@ import org.talend.core.model.process.IElement;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.runtime.services.IGenericService;
import org.talend.core.ui.IJobletProviderService;
import org.talend.core.ui.process.IGraphicalNode;
@@ -57,6 +59,7 @@ import org.talend.designer.core.ui.AbstractMultiPageTalendEditor;
import org.talend.designer.core.ui.editor.AbstractTalendEditor;
import org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand;
import org.talend.designer.core.ui.editor.nodes.Node;
import org.talend.designer.core.utils.DesignerUtilities;
/**
* DOC nrousseau class global comment. Detailled comment <br/>
@@ -305,19 +308,23 @@ public class ComponentListController extends AbstractElementPropertySectionContr
if (node.getJobletNode() != null) {
node = node.getJobletNode();
}
final String uniqueName = node.getUniqueName();
String uniqueName = node.getUniqueName();
if (uniqueName.equals(currentNode.getUniqueName())) {
continue;
}
String displayName = (String) node.getElementParameter("LABEL").getValue(); //$NON-NLS-1$
String displayUniqueName = getDisplayUniqueName(node, uniqueName);
if (displayName == null) {
displayName = uniqueName;
displayName = displayUniqueName;
}
if (displayName.indexOf("__UNIQUE_NAME__") != -1) { //$NON-NLS-1$
displayName = displayName.replaceAll("__UNIQUE_NAME__", uniqueName); //$NON-NLS-1$
displayName = displayName.replaceAll("__UNIQUE_NAME__", displayUniqueName); //$NON-NLS-1$
}
if (!displayName.equals(uniqueName)) {
displayName = uniqueName + " - " + displayName; //$NON-NLS-1$
if (!uniqueName.equals(displayUniqueName) && displayName.indexOf(uniqueName) != -1) {
displayName = displayName.replaceAll(uniqueName, displayUniqueName);
}
if (!displayName.equals(displayUniqueName)) {
displayName = displayUniqueName + " - " + displayName; //$NON-NLS-1$
}
componentUniqueNames.add(uniqueName);
componentDisplayNames.add(displayName);
@@ -361,6 +368,13 @@ public class ComponentListController extends AbstractElementPropertySectionContr
}
}
private static String getDisplayUniqueName(INode node, String uniqueName) {
if (TalendPropertiesUtil.isEnabledUseShortJobletName()) {
return DesignerUtilities.getNodeInJobletCompleteUniqueName(node, uniqueName);
}
return uniqueName;
}
SelectionListener listenerSelection = new SelectionAdapter() {
@Override
@@ -391,9 +405,18 @@ public class ComponentListController extends AbstractElementPropertySectionContr
}
if (param.isContextMode()) {
String paramValue = (String) value;
if (elem instanceof INode) {
INode currentNode = (INode) elem;
String completeValue = getDisplayUniqueName(currentNode, paramValue);
if (StringUtils.isNotBlank(completeValue)
|| StringUtils.isBlank(completeValue) && DesignerUtilities.validateJobletShortName(paramValue)) {
paramValue = completeValue;
}
}
combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
combo.setEnabled(false);
combo.setText((String) value);
combo.setText(paramValue);
} else {
combo.setItems(curComponentNameList);
if (numValue == -1) {

View File

@@ -21,6 +21,8 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -36,7 +38,7 @@ public class OpenContextChooseComboDialog extends Dialog {
@Override
protected Point getInitialSize() {
return new Point(300, 100);
return new Point(400, 180);
}
private List<IContext> allContexts;
@@ -82,29 +84,16 @@ public class OpenContextChooseComboDialog extends Dialog {
// basicComp = new Composite(parent.getShell(), SWT.NONE);
basicComp = (Composite) super.createDialogArea(parent);
basicComp.setLayout(new FormLayout());
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
basicComp.setLayout(gridLayout);
basicComp.setSize(200, 200);
Label label = new Label(basicComp, SWT.NONE);
label.setText(Messages.getString("OpenContextChooseComboDialog.context")); //$NON-NLS-1$
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
contextCombo = new Combo(basicComp, SWT.DROP_DOWN | SWT.READ_ONLY);
// layout for label
FormData labelCompData = new FormData();
labelCompData.top = new FormAttachment(20, 0);
labelCompData.bottom = new FormAttachment(50, 10);
labelCompData.left = new FormAttachment(0, 10);
labelCompData.right = new FormAttachment(contextCombo, 0);
label.setLayoutData(labelCompData);
// layout for combo
FormData contexComboFormData = new FormData();
contexComboFormData.top = new FormAttachment(10, 0);
contexComboFormData.bottom = new FormAttachment(50, 10);
contexComboFormData.left = new FormAttachment(label, 30);
contexComboFormData.right = new FormAttachment(60, 10);
contextCombo.setLayoutData(contexComboFormData);
contextCombo.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, false, false));
List<String> names = new ArrayList<String>();
for (IContext context : allContexts) {

View File

@@ -512,7 +512,7 @@ public class SubjobContainer extends Element implements ISubjobContainer {
String subjobStartUniqueName = (String) getPropertyValue(EParameterName.UNIQUE_NAME.getName());
if (process != null && (List<Node>) process.getGraphicalNodes() != null) {
for (Node node : (List<Node>) process.getGraphicalNodes()) {
if (node.getUniqueName() != null && node.getUniqueName().equals(subjobStartUniqueName)) {
if (node.getUniqueName(false) != null && node.getUniqueName(false).equals(subjobStartUniqueName)) {
return node;
}
}
@@ -521,7 +521,7 @@ public class SubjobContainer extends Element implements ISubjobContainer {
}
public void setSubjobStartNode(Node node) {
setPropertyValue(EParameterName.UNIQUE_NAME.getName(), node.getUniqueName());
setPropertyValue(EParameterName.UNIQUE_NAME.getName(), node.getUniqueName(false));
if (node.getComponent().getName().equals("tPrejob") || node.getComponent().getName().equals("tPostjob")) { //$NON-NLS-1$ //$NON-NLS-2$
setPropertyValue(EParameterName.SHOW_SUBJOB_TITLE.getName(), Boolean.TRUE);

View File

@@ -114,6 +114,7 @@ public class UpdateContextParameterCommand extends Command {
checkNewRepositoryParameters(process, names);
return;
}
ContextUtils.clearMissingContextCache();
for (IContext context : listContext) {
for (IContextParameter param : context.getContextParameterList()) {
Item item = null;

View File

@@ -17,6 +17,7 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.collections.BidiMap;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.ui.celleditor.ExtendedComboBoxCellEditor;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CommandStack;
@@ -56,6 +57,7 @@ import org.talend.core.model.process.Element;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.process.IGEFProcess;
import org.talend.core.ui.properties.tab.IDynamicProperty;
@@ -472,12 +474,28 @@ public class AdvancedContextComposite extends ScrolledComposite implements IDyna
@Override
public Object get(IElementParameter bean) {
final Object value = bean.getValue();
Object value = bean.getValue();
if (EParameterFieldType.COMPONENT_LIST == bean.getFieldType()
&& TalendPropertiesUtil.isEnabledUseShortJobletName()) {
String completeValue = DesignerUtilities.getNodeInJobletCompleteUniqueName(node, value.toString());
if (StringUtils.isNotBlank(completeValue)
|| StringUtils.isBlank(completeValue)
&& DesignerUtilities.validateJobletShortName(value.toString())) {
value = completeValue;
}
}
return value == null ? "" : String.valueOf(value); //$NON-NLS-1$
}
@Override
public void set(IElementParameter bean, Object value) {
if (EParameterFieldType.COMPONENT_LIST == bean.getFieldType()
&& TalendPropertiesUtil.isEnabledUseShortJobletName()) {
String shortValue = DesignerUtilities.getNodeInJobletShortUniqueName(node, value.toString());
if (StringUtils.isNotBlank(shortValue)) {
value = shortValue;
}
}
if (value != null && !value.equals(bean.getValue())) {
executeCommand(new PropertyChangeCommand(node, bean.getName(), value));
getTableViewerCreator().refresh();

View File

@@ -553,7 +553,7 @@ public class ComponentSettingsView extends ViewPart implements IComponentSetting
Node node = (Node) elem;
label = node.getLabel();
String uniqueName = node.getUniqueName();
String uniqueName = node.getUniqueName(false);
if (!label.equals(uniqueName)) {
label = label + "(" + uniqueName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}

View File

@@ -14,7 +14,10 @@ package org.talend.designer.core.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
@@ -23,6 +26,8 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.CorePlugin;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.PluginChecker;
@@ -264,4 +269,97 @@ public class DesignerUtilities {
}
return null;
}
/**
* Get the complete unique name for the node in joblet by short unique name.
*
* e.g. jc_1_tDBConnection_1 =>testjoblet_1_tDBConnection_1
*
* @param node
* @param shortUniqueName
* @return
*/
public static String getNodeInJobletCompleteUniqueName(INode node, String shortUniqueName) {
if (StringUtils.isBlank(shortUniqueName) || !validateJobletShortName(shortUniqueName)) {
return shortUniqueName;
}
String graphicalName = "";
StringBuffer graphNameBuffer = new StringBuffer();
boolean findOut = findGraphicNodeInJoblet(node.getProcess(), shortUniqueName, graphNameBuffer, true);
if (findOut) {
graphicalName = graphNameBuffer.toString();
} else {
if (CommonsPlugin.isDebugMode()) {
ExceptionHandler.process(new Exception("Can't find out " + shortUniqueName + " in " + node.getProcess()
+ " for node " + node.getElementParameter(EParameterName.UNIQUE_NAME.getName())));
}
}
return graphicalName;
}
public static boolean validateJobletShortName(String shortUniqueName) {
if (StringUtils.isBlank(shortUniqueName)) {
return false;
}
Matcher matcher = Pattern.compile("jc[0-9]+_[0-9]").matcher(shortUniqueName);
return matcher.find();
}
/**
* Get the complete unique name for the node in joblet by short unique name.
*
* e.g. testjoblet_1_tDBConnection_1 => jc_1_tDBConnection_1
*
* @param node
* @param shortUniqueName
* @return
*/
public static String getNodeInJobletShortUniqueName(INode node, String completeUniqueName) {
if (StringUtils.isBlank(completeUniqueName)) {
return completeUniqueName;
}
String graphicalName = "";
StringBuffer graphNameBuffer = new StringBuffer();
boolean findOut = findGraphicNodeInJoblet(node.getProcess(), completeUniqueName, graphNameBuffer, false);
if (findOut) {
graphicalName = graphNameBuffer.toString();
} else {
if (CommonsPlugin.isDebugMode()) {
ExceptionHandler.process(new Exception("Can't find out " + completeUniqueName + " in " + node.getProcess()
+ " for node " + node.getElementParameter(EParameterName.UNIQUE_NAME.getName())));
}
}
return graphicalName;
}
private static boolean findGraphicNodeInJoblet(IProcess process, String uniqueName, StringBuffer graphNameBuffer,
boolean matchShortName) {
List<? extends INode> nodes = process.getGraphicalNodes();
for (INode iNode : nodes) {
Node graphNode = (Node) iNode;
String graphNodeName = graphNode.getUniqueName(matchShortName);
if (isJobletComponent(graphNode) && uniqueName.startsWith(graphNodeName)) {
if (graphNodeName.equals(uniqueName)) {
graphNameBuffer.append(graphNode.getUniqueName(!matchShortName));
return true;
}
String nonJobletName = uniqueName.replaceFirst(graphNodeName + "_", "");
graphNameBuffer.append(graphNode.getUniqueName(!matchShortName)).append("_");
boolean findOut = findGraphicNodeInJoblet(graphNode.getComponent().getProcess(), nonJobletName, graphNameBuffer,
matchShortName);
if (findOut) {
return true;
}
}
if (graphNodeName.equals(uniqueName)) {
graphNameBuffer.append(uniqueName);
return true;
}
}
return false;
}
public static boolean isJobletComponent(INode node) {
return node.getComponent().getComponentType() == EComponentType.JOBLET;
}
}

View File

@@ -145,6 +145,7 @@
<fileSet> <!-- add items -->
<directory>${items.dir}</directory>
<outputDirectory>${talend.job.name}</outputDirectory>
<useDefaultExcludes>false</useDefaultExcludes>
<includes>
<include>**</include>
</includes>

View File

@@ -641,7 +641,7 @@ public class RunProcessContext {
// job doesn't verify if code is
// correct
// before launching
if (!JobErrorsChecker.hasErrors(shell)) {
if (isRemoteRun || !JobErrorsChecker.hasErrors(shell)) {
ps = processor
.run(getStatisticsPort(), getTracesPort(), watchParam,
log4jRuntimeLevel, progressMonitor,

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/talend_file_enhanced-1.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/talend_file_enhanced-1.3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>

View File

@@ -4,7 +4,7 @@ Bundle-Name: Custom
Bundle-SymbolicName: org.talend.libraries.custom;singleton:=true
Bundle-Version: 7.3.1.qualifier
Bundle-ClassPath: .,
lib/talend_file_enhanced-1.1.jar
lib/talend_file_enhanced-1.3.jar
Export-Package: org.talend.fileprocess,
org.talend.fileprocess.delimited
Bundle-ActivationPolicy: lazy

View File

@@ -46,7 +46,7 @@
<artifactItem>
<groupId>org.talend.components</groupId>
<artifactId>talendzip</artifactId>
<version>1.3</version>
<version>1.4</version>
</artifactItem>
<artifactItem>
<groupId>org.talend.components</groupId>
@@ -61,7 +61,7 @@
<artifactItem>
<groupId>org.talend.components.lib</groupId>
<artifactId>talend_file_enhanced</artifactId>
<version>1.1</version>
<version>1.3</version>
</artifactItem>
</artifactItems>
</configuration>

View File

@@ -3726,6 +3726,24 @@
name="Encrypt passwords for nexus proxy password in project setting preference"
version="7.3.1">
</projecttask>
<projecttask
beforeLogon="false"
breaks="7.3.0"
class="org.talend.repository.model.migration.RemoveDuplicateContextReferencesMigrationTask"
description="Remove duplicate context references from item"
id="org.talend.repository.model.migration.RemoveDuplicateContextReferencesMigrationTask"
name="RemoveDuplicateContextReferencesMigrationTask"
version="7.3.1">
</projecttask>
<projecttask
beforeLogon="true"
breaks="7.3.0"
class="org.talend.repository.model.migration.RemoveUnwantedUsageDataMigrationTask"
description="Remove unwanted old entried from prefrence store for Usage Data Collection"
id="org.talend.repository.model.migration.RemoveUnwantedUsageDataMigrationTask"
name="RemoveUnwantedUsageDataMigrationTask"
version="7.3.1">
</projecttask>
</extension>
<extension

View File

@@ -0,0 +1,77 @@
package org.talend.repository.model.migration;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.collections.map.MultiKeyMap;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.model.migration.AbstractItemMigrationTask;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
public class RemoveDuplicateContextReferencesMigrationTask extends AbstractItemMigrationTask {
@Override
public Date getOrder() {
GregorianCalendar gc = new GregorianCalendar(2023, 3, 20, 12, 0, 0);
return gc.getTime();
}
@SuppressWarnings("unchecked")
@Override
public ExecutionResult execute(Item item) {
EList<ContextType> contexts = null;
if (item instanceof ProcessItem) {
ProcessItem processItem = (ProcessItem) item;
contexts = processItem.getProcess().getContext();
} else if (item instanceof JobletProcessItem) {
JobletProcessItem jobletItem = (JobletProcessItem) item;
contexts = jobletItem.getJobletProcess().getContext();
}
try {
if (!contexts.isEmpty()) {
distinct(contexts);
ProxyRepositoryFactory.getInstance().save(item, true);
return ExecutionResult.SUCCESS_NO_ALERT;
}
} catch (Exception e) {
ExceptionHandler.process(e);
return ExecutionResult.FAILURE;
}
return ExecutionResult.NOTHING_TO_DO;
}
@SuppressWarnings("unchecked")
private void distinct(EList<ContextType> contexts) {
contexts.forEach(context -> {
EList<ContextParameterType> params = context.getContextParameter();
List<ContextParameterType> toRemove = new ArrayList<>();
MultiKeyMap map = new MultiKeyMap();
params.forEach(param -> {
if (!map.containsKey(param.getName(), param.getRepositoryContextId())) {
map.put(param.getName(), param.getRepositoryContextId(), null);
} else {
toRemove.add(param);
}
});
params.removeAll(toRemove);
});
}
@Override
public List<ERepositoryObjectType> getTypes() {
return Stream.concat(ERepositoryObjectType.getAllTypesOfProcess().stream(),
ERepositoryObjectType.getAllTypesOfJoblet().stream()).collect(Collectors.toList());
}
}

View File

@@ -0,0 +1,82 @@
package org.talend.repository.model.migration;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.core.model.general.Project;
import org.talend.core.model.migration.AbstractProjectMigrationTask;
import org.talend.repository.RepositoryPlugin;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import us.monoid.json.JSONObject;
public class RemoveUnwantedUsageDataMigrationTask extends AbstractProjectMigrationTask {
private static final String PREF_TOS_JOBS_RECORDS = "TOS_Jobs_Records";
@SuppressWarnings("unchecked")
@Override
public ExecutionResult execute(Project project) {
boolean isDataUpdated = false;
IPreferenceStore preferenceStore = RepositoryPlugin.getDefault().getPreferenceStore();
String oldData = preferenceStore.getString(PREF_TOS_JOBS_RECORDS);
try {
ObjectMapper objectMapper = new ObjectMapper();
HashMap<String,Object> result = (HashMap<String,Object>) objectMapper.readValue(oldData, Map.class);
isDataUpdated = deletedUnwantedData(result, "nb.route.osgi");
// store the updated value
if(isDataUpdated) {
JSONObject jsonObject = new JSONObject(result);
preferenceStore.setValue(PREF_TOS_JOBS_RECORDS, jsonObject.toString());
}
return ExecutionResult.SUCCESS_NO_ALERT;
} catch (Exception e) {
// the value is not set, or is empty
e.printStackTrace();
}
return ExecutionResult.NOTHING_TO_DO;
}
@Override
public Date getOrder() {
GregorianCalendar gc = new GregorianCalendar(2017, 4, 17, 12, 0, 0);
return gc.getTime();
}
@SuppressWarnings("unchecked")
private static boolean deletedUnwantedData(HashMap<String, Object> result, String keyToRemove) throws JsonProcessingException, JsonMappingException {
boolean isDataUpdated = false;
for(Entry<String, Object> entry : result.entrySet()) {
HashMap<String,Object> mainValue = (HashMap<String, Object>) entry.getValue();
HashMap<String,Object> projectsObj = (HashMap<String, Object>) mainValue.get("projects");
if(null != projectsObj) {
HashMap<String,Object> processObject = (HashMap<String, Object>) projectsObj.get("PROCESS");
if(null != processObject) {
HashMap<String,Object> detailsObject = (HashMap<String, Object>) processObject.get("details");
if(null != detailsObject && detailsObject.containsKey(keyToRemove)) {
detailsObject.remove(keyToRemove);
isDataUpdated = true;
}
}
}
}
return isDataUpdated;
}
}

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
@@ -13,6 +13,7 @@
package org.talend.repository.preference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -29,6 +30,7 @@ import org.eclipse.ui.PlatformUI;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.core.model.components.ComponentUtilities;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.process.IProcess2;
@@ -38,6 +40,7 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.properties.SQLPatternItem;
import org.talend.core.model.properties.impl.AdditionalInfoMapImpl;
import org.talend.core.model.relationship.Relation;
import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.DynaEnum;
@@ -67,6 +70,46 @@ import us.monoid.json.JSONObject;
*/
public class TosTokenCollector extends AbstractTokenCollector {
private static final String NB_ROUTE_MS = "nb.route.ms";
private static final String NB_ROUTE_OSGI = "nb.route.osgi";
private static final String NB_ROUTERESTDS_APIFILE_MS = "nb.routerestds.apifile.ms";
private static final String NB_ROUTERESTDS_APIDESIGNER_MS = "nb.routerestds.apidesigner.ms";
private static final String NB_ROUTERESTDS_APIFILE_OSGI = "nb.routerestds.apifile.osgi";
private static final String NB_ROUTERESTDS_APIDESIGNER_OSGI = "nb.routerestds.apidesigner.osgi";
private static final String NB_ROUTERESTDS_BUILTIN_MS = "nb.routerestds.builtin.ms";
private static final String NB_ROUTERESTDS_BUILTIN_OSGI = "nb.routerestds.builtin.osgi";
private static final String NB_ROUTESOAPDS_MS = "nb.routesoapds.ms";
private static final String NB_ROUTESOAPDS_OSGI = "nb.routesoapds.osgi";
private static final String ROUTE_MICROSERVICE = "ROUTE_MICROSERVICE";
private static final String ROUTE = "ROUTE";
private static final String REST_MS = "REST_MS";
private static final String OSGI = "OSGI";
private static final String NB_DSREST_APIFILE_MS = "nb.dsrest.apifile.ms";
private static final String NB_DSREST_APIDESIGNER_MS = "nb.dsrest.apidesigner.ms";
private static final String NB_DSREST_APIFILE_OSGI = "nb.dsrest.apifile.osgi";
private static final String NB_DSREST_APIDESIGNER_OSGI = "nb.dsrest.apidesigner.osgi";
private static final String NB_DSREST_BUILTIN_MS = "nb.dsrest.builtin.ms";
private static final String NB_DSREST_BUILTIN_OSGI = "nb.dsrest.builtin.osgi";
private static final String PREF_TOS_JOBS_RECORDS = "TOS_Jobs_Records"; //$NON-NLS-1$
private static final TokenKey PROJECTS = new TokenKey("projects"); //$NON-NLS-1$
@@ -78,7 +121,18 @@ public class TosTokenCollector extends AbstractTokenCollector {
private static final String NODE_CAMEL_COMPONENTS = "camel.components";
private static final String NODE_CUSTOM_CAMEL_COMPONENTS = "custom.camel.components";
//data service components used in DI jobs
private static final List<String> dsComponentsInDIJobs = Arrays.asList("tESBProviderRequest","tRESTRequest");
private static final List<String> tDBComponentNameList = Arrays.asList("tDB2Input", "tDB2Output", "tDB2Connection",
"tMSSqlInput", "tMSSqlOutput", "tMSSqlConnection", "tMysqlInput", "tMysqlOutput", "tMysqlConnection",
"tOracleInput", "tOracleOutput", "tOracleConnection", "tPostgresqlInput", "tPostgresqOutput",
"tPostgresqConnection", "tAmazonAuroraInput", "tAmazonAuroraOutput", "tAmazonAuroraConnection",
"cSQLConnection");
private static final List<String> JDBCComponentNameList = Arrays.asList("tDeltaLakeInput","tDeltaLakeConnection","tDeltaLakeOutput",
"tJDBCInput","tJDBCOutput","tJDBCConnection","tSingleStoreInput","tSingleStoreOutput","tSingleStoreConnection");
/**
* ggu JobTokenCollector constructor comment.
*/
@@ -117,6 +171,7 @@ public class TosTokenCollector extends AbstractTokenCollector {
JSONObject repoStats = new JSONObject();
// metadata
Integer nbdssoap = 0;
for (DynaEnum type : ERepositoryObjectType.values()) {
if (type instanceof ERepositoryObjectType && ((ERepositoryObjectType) type).isResourceItem()) {
try {
@@ -164,9 +219,37 @@ public class TosTokenCollector extends AbstractTokenCollector {
if (ERepositoryObjectType.getAllTypesOfProcess().contains(type)) {
JSONObject jobDetails = new JSONObject();
collectJobDetails(all, jobDetails, type);
if (ERepositoryObjectType.PROCESS.equals(type)) {
typeStats.put("nbwithoutds", jobDetails.get("nbwithoutds")); //$NON-NLS-1$
jobDetails.remove("nbwithoutds"); //$NON-NLS-1$
typeStats.put("nbds", jobDetails.get("nbds")); //$NON-NLS-1$
jobDetails.remove("nbds"); //$NON-NLS-1$
nbdssoap = (Integer)jobDetails.get("nbdssoap"); //$NON-NLS-1$
jobDetails.remove("nbdssoap"); //$NON-NLS-1$
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_BUILTIN_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_BUILTIN_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIDESIGNER_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIFILE_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIDESIGNER_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIFILE_MS);
}else if (ERepositoryObjectType.PROCESS_ROUTE.equals(type)) {
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTESOAPDS_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTESOAPDS_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_BUILTIN_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_BUILTIN_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_APIDESIGNER_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_APIFILE_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_APIDESIGNER_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_APIFILE_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTE_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTE_MS);
}
typeStats.put("details", jobDetails); //$NON-NLS-1$
}
if (ERepositoryObjectType.ROUTINES.equals(type)
|| ((ERepositoryObjectType) type).getFolder().startsWith("metadata/") //$NON-NLS-1$
|| ERepositoryObjectType.CONTEXT.equals(type) || type.equals(ERepositoryObjectType.JOBLET)) {
@@ -203,6 +286,10 @@ public class TosTokenCollector extends AbstractTokenCollector {
}
}
}
if(repoStats.has("SERVICES")) {
JSONObject serviceJson = (JSONObject)repoStats.get("SERVICES");
serviceJson.put("nbdssoap", nbdssoap);
}
jObject.put(PROJECTS.getKey(), repoStats); //$NON-NLS-1$
jObject.put(TYPE.getKey(), ProjectManager.getInstance().getProjectType(currentProject));
int nbRef = ProjectManager.getInstance().getAllReferencedProjects().size();
@@ -213,6 +300,183 @@ public class TosTokenCollector extends AbstractTokenCollector {
return jObject;
}
private void addCountInComponent(String key, JSONObject component_names) throws JSONException {
if (component_names.has(key)) {
component_names.put(key,
((Integer) component_names.get(key)) + 1);
} else {
component_names.put(key, 1);
}
}
private void removeUnwantedNodeFromjobDetails(JSONObject typeStats, JSONObject jobDetails, String key) throws JSONException {
if(jobDetails.has(key)) {
typeStats.put(key, jobDetails.get(key)); //$NON-NLS-1$
jobDetails.remove(key); //$NON-NLS-1$
}
}
@SuppressWarnings("unchecked")
private void extractBuildTypeData(NodeType node, Item item, String itemID, String componentName,
Set<String> checkedItemSet, Map<String, Integer> buildTypeDetails, Set<String> componentNamesList) {
List<AdditionalInfoMapImpl> properties = item.getProperty().getAdditionalProperties();
boolean isItemChecked = false;
boolean buildTypeIsPresent = false;
String buildType = null;
for (AdditionalInfoMapImpl property : properties) {
String buildTypeKey = property.getKey().toString();
String buildTypeValue = property.getValue().toString();
if("BUILD_TYPE".equals(buildTypeKey) && null != buildTypeValue) {
buildType = buildTypeValue;
buildTypeIsPresent = true;
break;
}
}
String nodeType = ComponentUtilities.getNodePropertyValue(node, "PROPERTY:PROPERTY_TYPE"); //$NON-NLS-1$
String apiID = ComponentUtilities.getNodePropertyValue(node, "API_ID"); //$NON-NLS-1$
// decide build type for Job/Route
// if build type is missing then it is treated as OSGI type i.e. for JOB buildType = OSGI and for Route buildType = ROUTE
// for Microservice if buildType is missing then it will treated as OSGI type always
if(!buildTypeIsPresent || null==buildType) {
if (componentName.startsWith("t")) {
// if Build type is not present then treat this job as OSGI
buildType = OSGI;
}else if (componentName.startsWith("c")){
// if Build type is not present then treat this Route as OSGI
buildType = ROUTE;
}
}
if(null != buildType) {
if (componentNamesList.contains("tRESTRequest")) {
extractDataWhenItemHastRESTRequest(buildTypeDetails, buildType, nodeType, apiID);
isItemChecked =true;
} else if(componentNamesList.contains("cSOAP")) {
extractDataWhenItemHascSOAP(buildTypeDetails, buildType);
isItemChecked =true;
}else if(componentNamesList.contains("cREST")) {
extractDataWhenItemHascREST(buildTypeDetails, buildType, nodeType, apiID);
isItemChecked =true;
}else if(!componentNamesList.contains("cSOAP") && !componentNamesList.contains("cREST") && !checkedItemSet.contains(itemID)) {
extractDataForRouteWithoutcRESTorcSOAP(buildTypeDetails, buildType);
isItemChecked =true;
}
}
if(isItemChecked) {
checkedItemSet.add(itemID);
}
}
private void extractDataForRouteWithoutcRESTorcSOAP(Map<String, Integer> buildTypeDetails, String buildType) {
// nb of jobs which doesn't contains cSOAP or cREST components
if(buildType.equals(ROUTE)) {
// nb routes without cSOAP or cREST as producer where build type = OSGI
String key = NB_ROUTE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes without cSOAP or cREST as producer where build type = Microservice
String key = NB_ROUTE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
private void extractDataWhenItemHascREST(Map<String, Integer> buildTypeDetails, String buildType, String nodeType, String apiID) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
if(buildType.equals(ROUTE)) {
// nb routes with cREST as producer where build type = OSGI and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cREST as producer where build build type = Microservice and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(ROUTE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
}
}
private void extractDataWhenItemHascSOAP(Map<String, Integer> buildTypeDetails, String buildType) {
if(buildType.equals(ROUTE)) {
// nb routes with cSOAP as producer where build type = OSGI
String key = NB_ROUTESOAPDS_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
//break;
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cSOAP as producer where build type = Microservice
String key = NB_ROUTESOAPDS_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
//break;
}
}
private void extractDataWhenItemHastRESTRequest(Map<String, Integer> buildTypeDetails, String buildType,
String nodeType, String apiID) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
// when API Definition = built-in
if(buildType.equals(OSGI)) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = Built-in
String key = NB_DSREST_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(REST_MS)) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = Built-in
String key = NB_DSREST_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(OSGI)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from local file
String key = NB_DSREST_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(buildType.equals(REST_MS)) {
if(null!=apiID && !apiID.isEmpty()) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from local file
String key = NB_DSREST_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
}
}
/**
* DOC nrousseau Comment method "collectJobDetails".
*
@@ -221,6 +485,7 @@ public class TosTokenCollector extends AbstractTokenCollector {
* @param type
* @throws JSONException
*/
@SuppressWarnings("unchecked")
private void collectJobDetails(List<IRepositoryViewObject> allRvo, JSONObject jobDetails, DynaEnum type)
throws JSONException {
IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
@@ -240,14 +505,27 @@ public class TosTokenCollector extends AbstractTokenCollector {
int contextVarsNum = 0;
int nbComponentsUsed = 0;
int pureDIJobs = 0; // nb of PROCESS without (tESBProviderRequest, tRESTRequest)
List<String> soapWsdlWithImpl = new ArrayList<String>();
int restJobInDIJob = 0;
Map<String, JSONObject> camelComponentMap = new HashMap<>();
Map<String, JSONObject> customCamelComponentMap = new HashMap<>();
Map<String,Integer> buildTypeDetails = new HashMap<String,Integer>();
Set<String> checkedIteSetForBuildTypes = new HashSet<String>();
for (IRepositoryViewObject rvo : allRvo) {
Item item = rvo.getProperty().getItem();
String itemID = ((ProcessItem) item).getProperty().getId();
if (item instanceof ProcessItem) {
boolean has_tRestRequest = false;
boolean has_tESBProviderRequest = false;
boolean has_tESBProviderRequest_Or_tRESTRequest = false;
ProcessType processType = ((ProcessItem) item).getProcess();
for (NodeType node : (List<NodeType>) processType.getNode()) {
List<NodeType> nodeTypeList = (List<NodeType>) processType.getNode();
Set<String> componentNamesList = new HashSet<String>();
for (NodeType node : nodeTypeList) {
componentNamesList.add(node.getComponentName());
}
for (NodeType node : nodeTypeList) {
JSONObject component_names = null;
String componentName = node.getComponentName();
int nbComp = 0;
@@ -266,6 +544,41 @@ public class TosTokenCollector extends AbstractTokenCollector {
component_names.put("component_name", componentName);
component_names.put("count", nbComp + 1);
extractRuntimeFeature(node, component_names, componentName);
if(!checkedIteSetForBuildTypes.contains(itemID)) {
extractBuildTypeData(node, item, itemID, componentName, checkedIteSetForBuildTypes, buildTypeDetails, componentNamesList);
}
if (dsComponentsInDIJobs.contains(componentName)) {
has_tESBProviderRequest_Or_tRESTRequest = true;
if ("tRESTRequest".equals(componentName) && !has_tRestRequest) {
// More than one tRESTRequest will cause compile error, but save operation is allowed. So give a double check here.
has_tRestRequest = true;
restJobInDIJob++;
}
if ("tESBProviderRequest".equals(componentName) && !has_tESBProviderRequest) {
// More than one tESBProviderRequest will cause compile error, but save operation is allowed. So give a double check here.
has_tESBProviderRequest = true;
EList elementParameter = node.getElementParameter();
for (Object obj : elementParameter) {
if (obj instanceof ElementParameterType) {
ElementParameterType ep = (ElementParameterType) obj;
if (ep.getName().equalsIgnoreCase("PROPERTY:REPOSITORY_PROPERTY_TYPE")) {
String value = ep.getValue();
// get serviceId from "serviceId - portId - operationId"
String serviceId = value.substring(0, value.indexOf(" - "));
if (!soapWsdlWithImpl.contains(serviceId)) {
soapWsdlWithImpl.add(serviceId);
}
break;
}
}
}
}
}
if (TARGET_COMPONENT.equals(componentName)
&& (type == ERepositoryObjectType.PROCESS_ROUTE || type == ERepositoryObjectType.PROCESS_ROUTELET)) {
@@ -320,8 +633,12 @@ public class TosTokenCollector extends AbstractTokenCollector {
ContextType contextType = (ContextType) contexts.get(0);
contextVarsNum += contextType.getContextParameter().size();
}
if (!has_tESBProviderRequest_Or_tRESTRequest) {
pureDIJobs++;
}
}
if (factory.getStatus(item) != ERepositoryStatus.LOCK_BY_USER && !idsOpened.contains(item.getProperty().getId())) {
// job is not locked and not opened by editor, so we can unload.
if (item.getParent() instanceof FolderItem) {
@@ -337,6 +654,124 @@ public class TosTokenCollector extends AbstractTokenCollector {
jobDetails.put("components", components);
jobDetails.put("nb.contextVars", contextVarsNum);
jobDetails.put("nb.components", nbComponentsUsed);
if (ERepositoryObjectType.PROCESS.equals(type)) {
// will be moved to upper hierarchy/projects.repository/PROCESS/nbwithoutds
jobDetails.put("nbwithoutds", pureDIJobs);
// nb of Data Services:
// (nb PROCESS with (tRESTRequest)) + (nb Services (SOAP WSDL) with at least one operation implemented as job with tESBProviderRequest)
jobDetails.put("nbds", restJobInDIJob + soapWsdlWithImpl.size());
// nb Services (SOAP WSDL) with at least one operation implemented as job with tESBProviderRequest
jobDetails.put("nbdssoap", soapWsdlWithImpl.size());
}
// put build type data
for(Map.Entry<String,Integer> entry : buildTypeDetails.entrySet()){
jobDetails.put(entry.getKey(), entry.getValue());
}
}
private void extractRuntimeFeature(NodeType node, JSONObject component_names, String componentName)
throws JSONException {
if (tDBComponentNameList.contains(componentName)) {
EList elementParameter = node.getElementParameter();
for (Object obj : elementParameter) {
if (obj instanceof ElementParameterType) {
ElementParameterType ep = (ElementParameterType) obj;
if ((ep.getName().equals("SPECIFY_DATASOURCE_ALIAS")
|| (componentName.equals("cSQLConnection")
&& ep.getName().equals("USE_DATA_SOURCE_ALIAS"))) && ep.getValue().equals("true")) {
addCountInComponent("count_use_datasource_alias", component_names);
}
}
}
}
if (JDBCComponentNameList.contains(componentName)) {
EList elementParameter = node.getElementParameter();
for (Object obj : elementParameter) {
if (obj instanceof ElementParameterType) {
ElementParameterType ep = (ElementParameterType) obj;
if ((ep.getName().equals("PROPERTIES"))) {
JSONObject properties = new JSONObject(ep.getValue());
JSONObject useDs = (JSONObject) properties.get("useDataSource");
JSONObject storedValue = (JSONObject) useDs.get("storedValue");
Object value = storedValue.get("value");
if(value.equals(true)) {
addCountInComponent("count_use_datasource_alias", component_names);
}
}
}
}
}
// Runtime feature count
if (Arrays.asList("cREST", "tRESTRequest", "tRESTClient", "cSOAP", "tESBConsumer").contains(componentName)) {
EList elementParameter = node.getElementParameter();
boolean useAuthentication = false;
for (Object obj : elementParameter) {
if (obj instanceof ElementParameterType) {
ElementParameterType ep = (ElementParameterType) obj;
if (!ep.isShow()) {
continue;
}
// check if service locator is used
if ((ep.getName().equals("SERVICE_LOCATOR") || ep.getName().equals("ENABLE_SL")) && ep.getValue().equals("true")) {
addCountInComponent("count_use_service_locator", component_names);
}
// check if service registry is used
if ((ep.getName().equals("ENABLE_REGISTRY") || ep.getName().equals("USE_SR"))
&& ep.getValue().equals("true")) {
addCountInComponent("count_use_service_registry", component_names);
}
// check if service activity monitoring is used
if ((ep.getName().equals("SERVICE_ACTIVITY_MONITOR") || ep.getName().equals("ENABLE_SAM"))
&& ep.getValue().equals("true")) {
addCountInComponent("count_use_service_activity_monitoring", component_names);
}
// check if authentication is used.
if ((ep.getName().equals("ENABLE_SECURITY") || ep.getName().equals("NEED_AUTH"))
&& ep.getValue().equals("true")) {
useAuthentication = true;
}
// get authentication type
if (useAuthentication
&& (ep.getName().equals("SECURITY_TYPE") || ep.getName().equals("AUTH_TYPE"))) {
if (ep.getValue().equals("SAML")) {
addCountInComponent("count_use_authent_SAML_token", component_names);
}
if (ep.getValue().equals("BASIC")) {
addCountInComponent("count_use_authent_http_basic", component_names);
}
// check if use authent Open ID connect is used
if (ep.getValue().equals("OIDC") || ep.getValue().equals("OIDC_PASSWORD_GRANT")) {
addCountInComponent("count_use_authent_Open_ID_connect", component_names);
}
if(ep.getValue().equals("OAUTH2_BEARER")) {
addCountInComponent("count_use_OAuth2_Bearer", component_names);
}
if(ep.getValue().equals("HTTP Digest") || ep.getValue().equals("DIGEST")) {
addCountInComponent("count_use_authent_http_digest", component_names);
}
if (ep.getValue().equals("USER") || ep.getValue().equals("TOKEN")) {
addCountInComponent("count_use_authent_UsernameToken", component_names);
}
}
if ((ep.getName().equals("USE_AUTHORIZATION") || ep.getName().equals("NEED_AUTHORIZATION"))
&& ep.getValue().equals("true")) {
addCountInComponent("count_use_authorization", component_names);
}
// check if use business correlation is checked
if ((ep.getName().equals("ENABLE_CORRELATION") || ep.getName().equals("USE_BUSINESS_CORRELATION"))
&& ep.getValue().equals("true")) {
addCountInComponent("count_use_business_correlation", component_names);
}
}
}
}
}
private void record(JSONArray componentsArray, Map<String, JSONObject> camelComponentMap, String component) {

View File

@@ -14,7 +14,7 @@
<description>Studio integration of the Talend Component Kit framework.</description>
<properties>
<component-runtime.version>1.38.8</component-runtime.version>
<component-runtime.version>1.38.9</component-runtime.version>
<commons-lang3.version>3.11</commons-lang3.version>
<mockito.version>2.23.0</mockito.version>
<oro.version>2.0.8</oro.version>

View File

@@ -13,12 +13,11 @@
package org.talend.sqlbuilder.dbdetail.tab;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import net.sourceforge.squirrel_sql.fw.sql.ITableInfo;
import org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase;
import org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils;
import org.talend.sqlbuilder.Messages;
@@ -27,6 +26,8 @@ import org.talend.sqlbuilder.dbstructure.nodes.INode;
import org.talend.sqlbuilder.dbstructure.nodes.TableNode;
import org.talend.sqlbuilder.sessiontree.model.SessionTreeNode;
import net.sourceforge.squirrel_sql.fw.sql.ITableInfo;
/**
* @author Davy Vanherbergen
*
@@ -100,11 +101,12 @@ public class ColumnInfoTab extends AbstractDataSetTab {
public String getTableNameBySynonym(Connection conn, String name) {
try {
// This query is used for getting real table name from system tables, it is used only for Oracle.
String sql = "select TABLE_NAME from USER_SYNONYMS where SYNONYM_NAME = '" + name + "'"; //$NON-NLS-1$ //$NON-NLS-2$
String sql = "select TABLE_NAME from USER_SYNONYMS where SYNONYM_NAME = ? "; //$NON-NLS-1$ //$NON-NLS-2$
Statement sta;
sta = conn.createStatement();
ExtractMetaDataUtils.getInstance().setQueryStatementTimeout(sta);
ResultSet resultSet = sta.executeQuery(sql);
PreparedStatement prepareStatement = conn.prepareStatement(sql);
prepareStatement.setString(1, name);
ExtractMetaDataUtils.getInstance().setQueryStatementTimeout(prepareStatement);
ResultSet resultSet = prepareStatement.executeQuery();
while (resultSet.next()) {
return resultSet.getString("TABLE_NAME"); //$NON-NLS-1$
}