Compare commits
27 Commits
TPS-5484
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b66f32b84 | ||
|
|
b34123c9f3 | ||
|
|
250e20f13e | ||
|
|
aa2ba7d199 | ||
|
|
8b57520df9 | ||
|
|
e8020483f1 | ||
|
|
ad532744ed | ||
|
|
b2f1602a30 | ||
|
|
492fdc5b46 | ||
|
|
b650de6411 | ||
|
|
14cdcbed05 | ||
|
|
3db5b96350 | ||
|
|
3f3dce5bc5 | ||
|
|
0f992cff7a | ||
|
|
6365b7a741 | ||
|
|
6e720df1cc | ||
|
|
5313413799 | ||
|
|
9180096b87 | ||
|
|
a1a28c0a61 | ||
|
|
ecd3952727 | ||
|
|
df7974265f | ||
|
|
4bcc864761 | ||
|
|
a0e04938fa | ||
|
|
9706a0f82b | ||
|
|
f99b6129ad | ||
|
|
8f25b6380d | ||
|
|
c61694066d |
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20090211</version>
|
||||
<version>20230227</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20150729</version>
|
||||
<version>20230227</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<IMPORTS>
|
||||
<IMPORT
|
||||
NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 -->
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
@@ -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'"));
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talend File Enhanced" MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
|
||||
@@ -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="" />
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.2.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.3.jar" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -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.2.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__");
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
|
||||
@@ -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.2.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__");
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
<IMPORTS>
|
||||
<IMPORT
|
||||
NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<IMPORTS>
|
||||
<IMPORT
|
||||
NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.2.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.2" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.2.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>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -27597,7 +27597,7 @@
|
||||
<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.4" MODULE="commons-fileupload-1.4.jar" MVN="mvn:commons-fileupload/commons-fileupload/1.4" 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-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')" />
|
||||
@@ -27614,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"
|
||||
@@ -27880,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')))" />
|
||||
|
||||
@@ -38354,7 +38354,7 @@
|
||||
<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.4" MODULE="commons-fileupload-1.4.jar" MVN="mvn:commons-fileupload/commons-fileupload/1.4" 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')" />
|
||||
@@ -38370,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"
|
||||
@@ -38642,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'))" />
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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$
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
<fileSet> <!-- add items -->
|
||||
<directory>${items.dir}</directory>
|
||||
<outputDirectory>${talend.job.name}</outputDirectory>
|
||||
<useDefaultExcludes>false</useDefaultExcludes>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/talend_file_enhanced-1.2.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"/>
|
||||
|
||||
@@ -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.2.jar
|
||||
lib/talend_file_enhanced-1.3.jar
|
||||
Export-Package: org.talend.fileprocess,
|
||||
org.talend.fileprocess.delimited
|
||||
Bundle-ActivationPolicy: lazy
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend_file_enhanced</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>1.3</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user