Compare commits
159 Commits
master
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b357eb441 | ||
|
|
4ee4859ec8 | ||
|
|
7cff06e3ad | ||
|
|
89675c4b23 | ||
|
|
0133dd05e8 | ||
|
|
b9e13df05d | ||
|
|
f777b52c4a | ||
|
|
c5e0d7119b | ||
|
|
2819dc3566 | ||
|
|
ad979090a0 | ||
|
|
db0a65fcdb | ||
|
|
7b0ccc6793 | ||
|
|
2637f4f0e4 | ||
|
|
409131fac1 | ||
|
|
636c261cf5 | ||
|
|
0e09d928c1 | ||
|
|
7f2b14e9fe | ||
|
|
67dec82a79 | ||
|
|
7988529bfd | ||
|
|
6e5e614f62 | ||
|
|
9158251a31 | ||
|
|
2193cb5bc6 | ||
|
|
92143bc9d9 | ||
|
|
5886a9ea1e | ||
|
|
8e11d18951 | ||
|
|
18ae07abed | ||
|
|
89a48f51e3 | ||
|
|
6b0ccf8623 | ||
|
|
3df34392cd | ||
|
|
17687cbe3d | ||
|
|
386eec46c3 | ||
|
|
fd72c4d991 | ||
|
|
2f5a499389 | ||
|
|
759eaa73f0 | ||
|
|
d85a5c0e08 | ||
|
|
5c9f99b54e | ||
|
|
e5ce502008 | ||
|
|
ccfbf51dff | ||
|
|
d2b0c87288 | ||
|
|
6cf2cae1b6 | ||
|
|
604fb23a71 | ||
|
|
e3f6f81cde | ||
|
|
26ff46ddeb | ||
|
|
cd955b7ad4 | ||
|
|
dc11694fd1 | ||
|
|
b1598aca9f | ||
|
|
938c1dadb2 | ||
|
|
ba7622b528 | ||
|
|
2cdfb08e18 | ||
|
|
33fb855c55 | ||
|
|
e6458bc956 | ||
|
|
699ac6f1d4 | ||
|
|
eeb99e841b | ||
|
|
5af3d5faa2 | ||
|
|
cd90676406 | ||
|
|
df3e6451d9 | ||
|
|
67c2ee7982 | ||
|
|
44c8adafc5 | ||
|
|
9b05cd445d | ||
|
|
feccc56372 | ||
|
|
4002ebf11c | ||
|
|
ca0734292e | ||
|
|
ade3d8ea9f | ||
|
|
642afd4c61 | ||
|
|
73b0ef1715 | ||
|
|
a88d5d7da6 | ||
|
|
66baf2369a | ||
|
|
a71f6b26b9 | ||
|
|
68f7ea24cc | ||
|
|
c32f6c1097 | ||
|
|
0234a23a9c | ||
|
|
a604485e3a | ||
|
|
1337af08ad | ||
|
|
a0669d27fc | ||
|
|
a62487a9f0 | ||
|
|
51f7668e49 | ||
|
|
5db747c247 | ||
|
|
9a8d085a05 | ||
|
|
39c9616bb5 | ||
|
|
691e5ed912 | ||
|
|
24c60f1920 | ||
|
|
0b047b73b6 | ||
|
|
d1b60e2e3f | ||
|
|
7329a7558e | ||
|
|
956891d18c | ||
|
|
50810ed439 | ||
|
|
9420056b37 | ||
|
|
5957b4993c | ||
|
|
5b664d9852 | ||
|
|
7cbef2f37f | ||
|
|
4cc93be67f | ||
|
|
f120c7c4dd | ||
|
|
564ed2618d | ||
|
|
5d4c8cc9d9 | ||
|
|
c6647a76a8 | ||
|
|
a1fd9f361b | ||
|
|
2ad1c00b63 | ||
|
|
98db49e280 | ||
|
|
6a6be36610 | ||
|
|
ddb69232e5 | ||
|
|
a4ffd73a24 | ||
|
|
6bb63c2a6d | ||
|
|
e7881d1ecd | ||
|
|
8b879dcbbd | ||
|
|
87b860b0b1 | ||
|
|
3f5a74d847 | ||
|
|
dd6501d8c6 | ||
|
|
9b736bf30a | ||
|
|
09b2ad8aa6 | ||
|
|
245f1c42c2 | ||
|
|
03085d1574 | ||
|
|
5fb4589799 | ||
|
|
7a69ed4c4d | ||
|
|
a38fec9792 | ||
|
|
4cef94aff4 | ||
|
|
09169a8664 | ||
|
|
391704ac42 | ||
|
|
9e693e6f89 | ||
|
|
eee97f1977 | ||
|
|
095c79cbf2 | ||
|
|
2884b847d5 | ||
|
|
96d4930a0a | ||
|
|
e8f2adce2d | ||
|
|
34396d7182 | ||
|
|
82d238deff | ||
|
|
4487a6d33e | ||
|
|
70469391d8 | ||
|
|
7ea110dc3c | ||
|
|
fcad4148f5 | ||
|
|
ebe98a4d67 | ||
|
|
cd23062e30 | ||
|
|
5990df09b0 | ||
|
|
4f5b39d2da | ||
|
|
c9c9d4df22 | ||
|
|
9f4d4fc832 | ||
|
|
cc93b9959b | ||
|
|
94e2442e11 | ||
|
|
079ce620ab | ||
|
|
535af6359e | ||
|
|
0544da1147 | ||
|
|
bdb27eaf55 | ||
|
|
c4b9def853 | ||
|
|
9b31f616f7 | ||
|
|
3c8552e58c | ||
|
|
81f603037b | ||
|
|
3c9ff7e553 | ||
|
|
6611515bd6 | ||
|
|
66dfb4f0bf | ||
|
|
75b74d2c17 | ||
|
|
92e5a0801d | ||
|
|
62ce41a0e9 | ||
|
|
aa9c2b08b9 | ||
|
|
37c58a98cd | ||
|
|
9c31c2869d | ||
|
|
e91f8c1b5d | ||
|
|
6d16ec2e3e | ||
|
|
d5dfa732da | ||
|
|
49d093c671 | ||
|
|
0f3b302525 |
57
PATCH_RELEASE_NOTE.md
Normal file
57
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
version: 7.2.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-4894
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| Patch Name | Patch\_20210806\_TPS-4894\_v1-7.2.1 |
|
||||
| Release Date | 2021-08-06 |
|
||||
| Target Version | 20190620_1446-V7.2.1 |
|
||||
| Product affected | Talend Studio |
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a self-contained patch.
|
||||
|
||||
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
|
||||
|
||||
## Fixed issues
|
||||
|
||||
This patch contains the following fixes:
|
||||
|
||||
- TPS-4894 [7.2.1] FTPS issue with JAVA Open JDK - 1.8.0_282-b08 (TDI-46016)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Talend Studio 7.2.1 must be installed.
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing the patch using Software update
|
||||
|
||||
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
|
||||
|
||||
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
|
||||
|
||||
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
|
||||
|
||||
### Installing the patch using Talend Studio
|
||||
|
||||
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
|
||||
|
||||
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
|
||||
|
||||
### Installing the patch using Commandline
|
||||
|
||||
Execute the following commands:
|
||||
|
||||
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
|
||||
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
|
||||
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.documentation.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.mapper.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.job.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.runprocess.nl</artifactId>
|
||||
|
||||
@@ -52,7 +52,7 @@ ProcessDebugDialog.errortext=Impossible de d\u00E9bugger le job.\\nV\u00E9rifiez
|
||||
ShadowProcess.notGeneratedOutputException=Sortie non g\u00E9n\u00E9r\u00E9e.
|
||||
ProcessComposite.contextGroup=Contexte
|
||||
prefs.clientConfiguration=Configuration du client Talend
|
||||
ProcessComposite.endPattern=Le Job {0} s\'est termin\u00E9 \u00E0 {1,date,HH:mm dd/MM/yyyy}. [code de sortie={2,number}]
|
||||
ProcessComposite.endPattern=Job {0} termin\u00e9 \u00e0 {1,date,HH\:mm dd/MM/yyyy}. [Code sortie\=\{2,number}]
|
||||
ProcessView.title=Ex\u00E9cuter({0})
|
||||
Processor.configurePerl=L'interpr\u00E9teur Perl n'est pas configur\u00E9.
|
||||
JavaProcessor.notFoundedFolderException=Dossier introuvable dans le projet .Java
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.scd.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.webservice.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.xmlmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.expressionbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.ftp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.json.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.di.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sqlbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.libraries.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -584,7 +584,16 @@
|
||||
} //endIf
|
||||
%>
|
||||
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
|
||||
if(context.getStringValue("<%=ctxParam.getName()%>") == null) {
|
||||
context.<%=ctxParam.getName()%> = null;
|
||||
} else {
|
||||
<%//}B1 block%>
|
||||
<%
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
|
||||
if (ctxParam.getType().equals("id_Password")) {
|
||||
%>
|
||||
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -602,13 +611,7 @@
|
||||
}
|
||||
}
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
if(typeToGenerate.equals("java.util.Date")) {
|
||||
} else if(typeToGenerate.equals("java.util.Date")) {
|
||||
%>
|
||||
try{
|
||||
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -667,6 +670,10 @@
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%//{B1 block%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
} <%/*close last method*/%>
|
||||
@@ -1159,16 +1166,36 @@ if (execStat) {
|
||||
|
||||
<% if(exist_tSQLDB) { %>
|
||||
private void closeSqlDbConnections() {
|
||||
boolean shutdownAbandonedConnections = false;
|
||||
try {
|
||||
Object obj_conn;
|
||||
<% for (INode sqlDbComponent : sqlDbComponentsList) { %>
|
||||
obj_conn = globalMap.remove("conn_<%=sqlDbComponent.getUniqueName() %>");
|
||||
if (null != obj_conn) {
|
||||
((java.sql.Connection) obj_conn).close();
|
||||
|
||||
if (obj_conn != null) {
|
||||
java.sql.Connection conn = (java.sql.Connection)obj_conn;
|
||||
|
||||
String originalURL = conn.getMetaData().getURL();
|
||||
java.sql.Driver drv = java.sql.DriverManager.getDriver(originalURL);
|
||||
String driverClass = drv.getClass().getName();
|
||||
|
||||
conn.close();
|
||||
|
||||
if("com.mysql.cj.jdbc.Driver".equals(driverClass) && routines.system.BundleUtils.inOSGi()) {
|
||||
shutdownAbandonedConnections = true;
|
||||
}
|
||||
}
|
||||
|
||||
<% } %>
|
||||
} catch (java.lang.Exception e) {
|
||||
}
|
||||
if (shutdownAbandonedConnections) {
|
||||
try {
|
||||
Class.forName("com.mysql.cj.jdbc.AbandonedConnectionCleanupThread").
|
||||
getMethod("uncheckedShutdown").invoke(null, (Object[]) null);
|
||||
} catch(java.lang.Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
|
||||
|
||||
@@ -289,6 +289,15 @@ if(isRunInMultiThread){
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
|
||||
//if the stored or passed value is "<TALEND_NULL>" string, it mean null
|
||||
public String getStringValue(String key) {
|
||||
String origin_value = this.getProperty(key);
|
||||
if(NULL_VALUE_EXPRESSION_IN_COMMAND_STRING_FOR_CHILD_JOB_ONLY.equals(origin_value)) {
|
||||
return null;
|
||||
}
|
||||
return origin_value;
|
||||
}
|
||||
|
||||
<%
|
||||
for (IContextParameter ctxParam :params)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -66,6 +66,7 @@ import org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory;
|
||||
import org.talend.designer.codegen.model.CodeGeneratorInternalTemplatesFactoryProvider;
|
||||
import org.talend.designer.codegen.proxy.JetProxy;
|
||||
import org.talend.designer.core.generic.model.Component;
|
||||
import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
|
||||
/**
|
||||
* CodeGenerator.
|
||||
@@ -353,8 +354,12 @@ public class CodeGenerator implements ICodeGenerator {
|
||||
.getDefault().getService(IResourcesDependenciesService.class);
|
||||
String resourcePathForContext = null;
|
||||
if (process instanceof IProcess2) {
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process,
|
||||
contextPar.getValue());
|
||||
String value = contextPar.getValue();
|
||||
// for runtime
|
||||
if (!ProcessorUtilities.isExportConfig()) {
|
||||
contextPar.setType(JavaTypesManager.FILE.getId());
|
||||
}
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process, value);
|
||||
} else {
|
||||
// for PreviewFileInputContentDataProcess run
|
||||
resourcePathForContext = resourceService.getResourceItemFilePath(contextPar.getValue());
|
||||
|
||||
@@ -94,7 +94,7 @@ public class JavaRoutineSynchronizer extends AbstractRoutineSynchronizer {
|
||||
|
||||
private void syncRoutineItems(Collection<RoutineItem> routineObjects, boolean forceUpdate) throws SystemException {
|
||||
for (RoutineItem routineItem : routineObjects) {
|
||||
syncRoutine(routineItem, true, true, forceUpdate);
|
||||
syncRoutine(routineItem, true, forceUpdate);
|
||||
}
|
||||
syncSystemRoutine(ProjectManager.getInstance().getCurrentProject());
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@@ -70,7 +70,6 @@ import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.components.ComponentManager;
|
||||
import org.talend.core.model.components.ComponentProviderInfo;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
@@ -838,23 +837,21 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
init(false);
|
||||
}
|
||||
|
||||
for (IComponent comp : componentList) {
|
||||
if (comp.getComponentType() != EComponentType.JOBLET) {
|
||||
continue;
|
||||
}
|
||||
String comName = comp.getName();
|
||||
if (comp != null && paletteType.equals(comp.getPaletteType())) {
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
} else if (new JobletUtil().matchExpression(comName)) {
|
||||
String[] names = comName.split(":"); //$NON-NLS-1$
|
||||
comName = names[1];
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
}
|
||||
// check if reference joblet component presents
|
||||
JobletUtil jobletUtils = new JobletUtil();
|
||||
Optional<IComponent> result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
if (!result.isPresent()) {
|
||||
// check if any name matching joblet component presents
|
||||
if (jobletUtils.matchExpression(name)) {
|
||||
name = StringUtils.substringAfterLast(name, ":"); //$NON-NLS-1$
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>commons-net-ftps-proxy</artifactId>
|
||||
<version>3.6.1-talend-20190128</version>
|
||||
<version>3.6.1-talend-20190819</version>
|
||||
|
||||
<name>commons-net-talend</name>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.talend.ftp;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.Socket;
|
||||
import java.net.InetAddress;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
@@ -29,11 +30,13 @@ public class SSLSessionReuseFTPSClient extends FTPSClient {
|
||||
final Object cache = sessionHostPortCache.get(context);
|
||||
final Method putMethod = cache.getClass().getDeclaredMethod("put", Object.class, Object.class);
|
||||
putMethod.setAccessible(true);
|
||||
final Method getHostMethod = socket.getClass().getDeclaredMethod("getHost");
|
||||
getHostMethod.setAccessible(true);
|
||||
Object host = getHostMethod.invoke(socket);
|
||||
final String key =
|
||||
String.format("%s:%s", host, String.valueOf(socket.getPort())).toLowerCase(Locale.ROOT);
|
||||
InetAddress address = socket.getInetAddress();
|
||||
int port = socket.getPort();
|
||||
|
||||
String key = String.format("%s:%s", address.getHostName(), String.valueOf(port)).toLowerCase(Locale.ROOT);
|
||||
putMethod.invoke(cache, key, session);
|
||||
|
||||
key = String.format("%s:%s", address.getHostAddress(), String.valueOf(port)).toLowerCase(Locale.ROOT);
|
||||
putMethod.invoke(cache, key, session);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -569,17 +569,18 @@
|
||||
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
|
||||
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
|
||||
csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
|
||||
csvOptions_<%=cid%>.setSkipLeadingRows(<%=ElementParameterParser.getValue(node, "__GS_FILE_HEADER__")%>);
|
||||
|
||||
<%if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) {
|
||||
%>
|
||||
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>).build());
|
||||
csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.build());
|
||||
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
|
||||
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build()));
|
||||
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)), com.google.cloud.RetryOption.totalTimeout(org.threeten.bp.Duration.ofSeconds(30)));
|
||||
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)));
|
||||
if (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
|
||||
@@ -221,10 +221,9 @@
|
||||
}
|
||||
|
||||
String query_<%=cid%> = <%=query%>;
|
||||
String dataset = query_<%=cid%>.substring(query_<%=cid%>.indexOf("from") + 4, query_<%=cid%>.indexOf(".")).trim();
|
||||
String temp_table = "temp_" + dataset + java.util.UUID.randomUUID().toString().replaceAll("-", "")
|
||||
+ "<%=cid%>".toLowerCase().replaceAll("[^a-z0-9]", "0").replaceAll("^[^a-z]", "a")
|
||||
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
|
||||
<% if(isLog4jEnabled) { %>
|
||||
log.info("<%=cid%> - query " + <%=query%>);
|
||||
<% } %>
|
||||
|
||||
com.google.cloud.bigquery.BigQuery bigquery_<%=cid%> = com.google.cloud.bigquery.BigQueryOptions.newBuilder()
|
||||
.setCredentials(credentials_<%=cid%>)
|
||||
@@ -233,25 +232,55 @@
|
||||
.getService();
|
||||
|
||||
com.google.cloud.bigquery.QueryJobConfiguration.Builder queryConfiguration_<%=cid%> = com.google.cloud.bigquery.QueryJobConfiguration.newBuilder(<%=query%>).setUseLegacySql(<%=useLegacySql%>);
|
||||
|
||||
<%
|
||||
if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {
|
||||
%>
|
||||
queryConfiguration_<%=cid%>.setDestinationTable(com.google.cloud.bigquery.TableId.of(dataset, temp_table)).setAllowLargeResults(true);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId.of(java.util.UUID.randomUUID().toString());
|
||||
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.newBuilder(queryConfiguration_<%=cid%>.build()).setJobId(jobId_<%=cid%>).build());
|
||||
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
<%if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {%>
|
||||
|
||||
com.google.cloud.bigquery.QueryJobConfiguration jobConfDryRun_<%=cid%> = queryConfiguration_<%=cid%> .setDryRun(true).build();
|
||||
com.google.cloud.bigquery.Job jobDryRun_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(jobConfDryRun_<%=cid%>));
|
||||
|
||||
String queryLocation_<%=cid%> =jobDryRun_<%=cid%>.getJobId().getLocation();
|
||||
String location_<%=cid%> = queryLocation_<%=cid%> == null ? "US" : queryLocation_<%=cid%>;
|
||||
String tempDataset_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-", "")
|
||||
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt())
|
||||
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
|
||||
String tempTable_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-", "")
|
||||
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt())
|
||||
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
|
||||
<% if(isLog4jEnabled){ %>
|
||||
log.info("<%=cid%> - query location :" + queryLocation_<%=cid%>);
|
||||
log.info("<%=cid%> - temporary dataset location :" + location_<%=cid%>);
|
||||
log.info("<%=cid%> - temporary Dataset name : " + tempDataset_<%=cid%>);
|
||||
log.info("<%=cid%> - temporary table name : " + tempTable_<%=cid%>);
|
||||
<% } %>
|
||||
|
||||
com.google.cloud.bigquery.DatasetInfo datasetInfo_<%=cid%> = com.google.cloud.bigquery.DatasetInfo.newBuilder(tempDataset_<%=cid%>).setLocation(location_<%=cid%>).build();
|
||||
com.google.cloud.bigquery.Dataset dataset_<%=cid%> = bigquery_<%=cid%> .create(datasetInfo_<%=cid%>);
|
||||
|
||||
queryConfiguration_<%=cid%>
|
||||
.setDryRun(false)
|
||||
.setAllowLargeResults(true)
|
||||
.setDestinationTable(com.google.cloud.bigquery.TableId.of(tempDataset_<%=cid%>, tempTable_<%=cid%>));
|
||||
|
||||
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId
|
||||
.newBuilder().setProject(<%=projectId%>)
|
||||
.setJob(java.util.UUID.randomUUID().toString())
|
||||
.setLocation(location_<%=cid%>)
|
||||
.build();
|
||||
|
||||
<% if(isLog4jEnabled){ %>
|
||||
log.info("<%=cid%> - job location : " + jobId_<%=cid%>.getLocation());
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId.of(<%=projectId%>,java.util.UUID.randomUUID().toString());
|
||||
|
||||
<% } %>
|
||||
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.newBuilder(queryConfiguration_<%=cid%>.build()).setJobId(jobId_<%=cid%>).build());
|
||||
|
||||
|
||||
<% if(isLog4jEnabled) { %>
|
||||
log.info("<%=cid%> - Sending job " + jobId_<%=cid%> + " with query: " + <%=query%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<% } %>
|
||||
|
||||
job_<%=cid%> = job_<%=cid%>.waitFor();
|
||||
|
||||
if (job_<%=cid%> == null) {
|
||||
@@ -260,13 +289,9 @@
|
||||
throw new RuntimeException(job_<%=cid%>.getStatus().getError().toString());
|
||||
}
|
||||
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
<% if(isLog4jEnabled) { %>
|
||||
log.info("<%=cid%> - Job " + jobId_<%=cid%> + " finished successfully.");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<% } %>
|
||||
com.google.cloud.bigquery.TableResult result_<%=cid%> = job_<%=cid%>.getQueryResults();
|
||||
long nb_line_<%=cid%> = 0;
|
||||
<%
|
||||
|
||||
@@ -10,7 +10,10 @@ imports="
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
String authMode = ElementParameterParser.getValue(node,"__AUTH_MODE__");
|
||||
String authMode = ElementParameterParser.getValue(node,"__AUTH_MODE__");
|
||||
String projectId = ElementParameterParser.getValue(node,"__PROJECT_ID__");
|
||||
String resultSizeType = ElementParameterParser.getValue(node,"__RESULT_SIZE__");
|
||||
|
||||
if (authMode.equals("OAUTH")) {
|
||||
%>
|
||||
}
|
||||
@@ -24,7 +27,10 @@ imports="
|
||||
} else if (authMode.equals("SERVICEACCOUNT")) {
|
||||
%>
|
||||
}
|
||||
bigquery_<%=cid%>.delete(com.google.cloud.bigquery.TableId.of(dataset, temp_table));
|
||||
<% if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) { %>
|
||||
com.google.cloud.bigquery.DatasetId datasetId_<%=cid%> = com.google.cloud.bigquery.DatasetId.of(<%=projectId%>, tempDataset_<%=cid%>);
|
||||
bigquery_<%=cid%>.delete(datasetId_<%=cid%>, com.google.cloud.bigquery.BigQuery.DatasetDeleteOption.deleteContents());
|
||||
<% }%>
|
||||
<%
|
||||
} else {
|
||||
throw new IllegalArgumentException("authentication mode should be either \"SERVICEACCOUNT\" or \"OAUTH\", but it is " + authMode);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
org.talend.designer.dbmap.language.generation.GenericDbGenerationManager gm = new org.talend.designer.dbmap.language.generation.GenericDbGenerationManager();
|
||||
org.talend.designer.dbmap.language.mssql.MssqlGenerationManager gm = new org.talend.designer.dbmap.language.mssql.MssqlGenerationManager();
|
||||
String uniqueNameComponent = null;
|
||||
IDbLanguage currentLanguage = gm.getLanguage();
|
||||
|
||||
|
||||
@@ -305,48 +305,54 @@ for(Column colStmt:stmtStructure){
|
||||
|
||||
if(("INSERT").equals(dataAction)){
|
||||
%>
|
||||
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(insertQuery_<%=cid %>);
|
||||
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(insertQuery_<%=cid %>);
|
||||
|
||||
<%
|
||||
}else if (("UPDATE").equals(dataAction)){
|
||||
if(useUpdateStatement){
|
||||
if(useUpdateStatement){
|
||||
%>
|
||||
String updateQuery_<%=cid %> = select_query_<%=cid %>
|
||||
String updateQuery_<%=cid %> = select_query_<%=cid %>;
|
||||
<%
|
||||
}else{
|
||||
}else{
|
||||
%>
|
||||
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
|
||||
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> ";
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
if(useUpdateStatement){
|
||||
%>
|
||||
if(select_query_<%=cid %>.indexOf("WHERE")==-1){
|
||||
updateQuery_<%=cid %> +=" WHERE ";
|
||||
}else{
|
||||
updateQuery_<%=cid %> +=" AND ";
|
||||
}
|
||||
updateQuery_<%=cid %>+= <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
updateQuery_<%=cid %> += " WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(updateQuery_<%=cid %>);
|
||||
<%
|
||||
}else if (("DELETE").equals(dataAction)){
|
||||
%>
|
||||
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "
|
||||
<%
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
%>
|
||||
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
|
||||
+" AND " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
;
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(deleteQuery_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
;
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(updateQuery_<%=cid %>);
|
||||
<%
|
||||
}else if (("DELETE").equals(dataAction)){
|
||||
%>
|
||||
|
||||
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "
|
||||
<%
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
%>
|
||||
+" AND " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
;
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(deleteQuery_<%=cid %>);
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_updated_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -33,4 +33,4 @@ USE_DIFFERENT_TABLE.NAME=Use different table name
|
||||
DIFFERENT_TABLE_NAME.NAME=Table name
|
||||
IS_TABLE_NAME_VARIABLE.NAME=Table name from connection name is variable
|
||||
|
||||
USE_UPDATE_STATEMENT.NAME=Use update statement
|
||||
USE_UPDATE_STATEMENT.NAME=Use update statement without subqueries
|
||||
@@ -140,7 +140,15 @@
|
||||
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="USE_UPDATE_STATEMENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
SHOW_IF="DATA_ACTION=='UPDATE'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
|
||||
@@ -35,6 +35,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
String differenttable = ElementParameterParser.getValue(node, "__DIFFERENT_TABLE_NAME__");
|
||||
boolean useDifferentTable = "true".equals(ElementParameterParser.getValue(node, "__USE_DIFFERENT_TABLE__"));
|
||||
boolean isTableNameVariable="true".equals(ElementParameterParser.getValue(node, "__IS_TABLE_NAME_VARIABLE__"));
|
||||
boolean useUpdateStatement="true".equals(ElementParameterParser.getValue(node, "__USE_UPDATE_STATEMENT__"));
|
||||
%>
|
||||
String select_query_<%=cid %> = null;
|
||||
String tableName_<%=cid%> = null;
|
||||
@@ -156,21 +157,36 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
|
||||
if(("INSERT").equals(dataAction)){
|
||||
%>
|
||||
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
|
||||
<%
|
||||
} else if (("UPDATE").equals(dataAction)){
|
||||
%>
|
||||
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
|
||||
<%
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
%>
|
||||
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
;
|
||||
%>
|
||||
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
|
||||
<%
|
||||
} else if (("UPDATE").equals(dataAction)){
|
||||
if(useUpdateStatement){
|
||||
%>
|
||||
String updateQuery_<%=cid %> = select_query_<%=cid %>;
|
||||
<%
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
%>
|
||||
if (updateQuery_<%=cid %>.toUpperCase().contains(" WHERE ")) {
|
||||
updateQuery_<%=cid %> += " AND (" + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%> + ")";
|
||||
} else {
|
||||
updateQuery_<%=cid %> += " WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
|
||||
<%
|
||||
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
|
||||
%>
|
||||
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
;
|
||||
<%
|
||||
}
|
||||
} else if (("DELETE").equals(dataAction)){
|
||||
%>
|
||||
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "
|
||||
|
||||
@@ -40,4 +40,6 @@ TABLE_ACTION.ITEM.CREATE_IF_NOT_EXISTS=Create table if not exists
|
||||
TABLE_ACTION.ITEM.DROP_IF_EXISTS_AND_CREATE=Drop table if exists and create
|
||||
TABLE_ACTION.ITEM.DROP_CREATE=Drop and create table
|
||||
TABLE_ACTION.ITEM.NONE=None
|
||||
TABLE_ACTION.NAME=Action on table
|
||||
TABLE_ACTION.NAME=Action on table
|
||||
|
||||
USE_UPDATE_STATEMENT.NAME=Use update statement without subqueries
|
||||
@@ -239,7 +239,7 @@
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar" MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" REQUIRED_IF="(FTPS == 'true')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar" MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819" REQUIRED_IF="(FTPS == 'true')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -296,8 +296,8 @@
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -283,8 +283,8 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -261,8 +261,8 @@
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -258,8 +258,8 @@
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -302,8 +302,8 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -346,8 +346,8 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -264,8 +264,8 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -253,8 +253,8 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -13,9 +13,22 @@
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
String confLib = ElementParameterParser.getValue(node, "__CONF_LIB__");
|
||||
Boolean setHadoopConf = ElementParameterParser.getBooleanValue(node, "__SET_HADOOP_CONF__");
|
||||
String customHadoopConfPath = ElementParameterParser.getValue(node, "__HADOOP_CONF_SPECIFIC_JAR__");
|
||||
if (setHadoopConf == null) {
|
||||
setHadoopConf = Boolean.FALSE;
|
||||
}
|
||||
%>
|
||||
|
||||
<% if(confLib != null && confLib.length() > 0){%>
|
||||
<% if((confLib != null && confLib.length() > 0) || setHadoopConf){%>
|
||||
|
||||
String libPath_<%=cid %> = "";
|
||||
|
||||
<% if (setHadoopConf) { %>
|
||||
|
||||
libPath_<%=cid %> = <%=customHadoopConfPath %>;
|
||||
|
||||
<% } else { %>
|
||||
|
||||
class DealJobLibrary_<%=cid%> {
|
||||
|
||||
@@ -75,14 +88,9 @@ class DealJobLibrary_<%=cid%> {
|
||||
|
||||
}
|
||||
|
||||
java.net.URLClassLoader currentLoader<%=cid %> = (java.net.URLClassLoader) Thread.currentThread().getContextClassLoader();
|
||||
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
|
||||
method_<%=cid %>.setAccessible(true);
|
||||
|
||||
DealJobLibrary_<%=cid%> dealJobLibrary = new DealJobLibrary_<%=cid%>();
|
||||
String confJarName = dealJobLibrary.getConfJarName(<%=confLib %>, this.contextStr);
|
||||
|
||||
String libPath_<%=cid %> = "";
|
||||
<%if (ProcessorUtilities.isExportConfig()) {%>
|
||||
libPath_<%=cid %> = "../lib/" + confJarName;
|
||||
<%} else {
|
||||
@@ -90,6 +98,11 @@ String libPath_<%=cid %> = "";
|
||||
libPath_<%=cid %> = new java.io.File("<%=libFolder %>/" + confJarName).getAbsolutePath();
|
||||
<%}%>
|
||||
libPath_<%=cid %> = dealJobLibrary.replaceJarPathsFromCrcMap(libPath_<%=cid %>);
|
||||
<%}%>
|
||||
|
||||
java.net.URLClassLoader currentLoader<%=cid %> = (java.net.URLClassLoader) Thread.currentThread().getContextClassLoader();
|
||||
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
|
||||
method_<%=cid %>.setAccessible(true);
|
||||
method_<%=cid %>.invoke(currentLoader<%=cid %>, new Object[] { new java.io.File(libPath_<%=cid %>).toURL() });
|
||||
|
||||
<%}%>
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
>
|
||||
<DEFAULT></DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="SET_HADOOP_CONF" FIELD="CHECK" NUM_ROW="2" REPOSITORY_VALUE="SET_HADOOP_CONF" >
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="HADOOP_CONF_SPECIFIC_JAR" FIELD="TEXT" NUM_ROW="2" REPOSITORY_VALUE="HADOOP_CONF_SPECIFIC_JAR" >
|
||||
<DEFAULT>"path/to/hadoop_conf.jar"</DEFAULT>
|
||||
</PARAMETER>
|
||||
</PARAMETERS>
|
||||
|
||||
<CODEGENERATION></CODEGENERATION>
|
||||
|
||||
@@ -208,6 +208,8 @@ boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.ge
|
||||
mc_<%=cid%>.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
|
||||
mc_<%=cid%>.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
|
||||
javax.activation.CommandMap.setDefaultCommandMap(mc_<%=cid%>);
|
||||
// add com.sun.mail.handlers to job imports / depenencies (TESB-27110)
|
||||
com.sun.mail.handlers.text_plain text_plain_h_<%=cid%> = null;
|
||||
// -- Send the message --
|
||||
javax.mail.Transport.send(msg_<%=cid %>);
|
||||
} catch(java.lang.Exception e){
|
||||
|
||||
@@ -106,7 +106,12 @@
|
||||
REQUIRED="false" NUM_ROW="11">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
|
||||
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
|
||||
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
@@ -173,6 +178,8 @@
|
||||
TARGET="Out.CREATE" />
|
||||
<TEMPLATE_PARAM SOURCE="self.CREATE_EMPTY_ELEMENT"
|
||||
TARGET="Out.CREATE_EMPTY_ELEMENT" />
|
||||
<TEMPLATE_PARAM SOURCE="self.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY"
|
||||
TARGET="Out.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" />
|
||||
<TEMPLATE_PARAM SOURCE="self.EXPAND_EMPTY_ELM"
|
||||
TARGET="Out.EXPAND_EMPTY_ELM" />
|
||||
<TEMPLATE_PARAM SOURCE="self.OUTPUT_AS_XSD"
|
||||
|
||||
@@ -43,4 +43,5 @@ SCHEMA.NAME=Schema
|
||||
THOUSANDS_SEPARATOR.NAME=Thousands separator
|
||||
XMLFIELD.NAME=Output Column
|
||||
XSD_FILE.NAME=XSD file path
|
||||
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
|
||||
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)
|
||||
@@ -45,6 +45,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
String removeHeader = ElementParameterParser.getValue(node, "__REMOVE_HEADER__"); // add for feature7788
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
boolean isAllowEmpty = ("true").equals(ElementParameterParser.getValue(node, "__CREATE_EMPTY_ELEMENT__"));
|
||||
boolean ignoreServiceAttributes = ("true").equals(ElementParameterParser.getValue(node, "__IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY__"));
|
||||
boolean expandEmptyElm = ("true").equals(ElementParameterParser.getValue(node, "__EXPAND_EMPTY_ELM__"));
|
||||
String mode = ElementParameterParser.getValue(node, "__GENERATION_MODE__");
|
||||
List<Map<String, String>> rootTable =
|
||||
@@ -200,6 +201,18 @@ java.util.Map<String,String> arraysValueMap_<%=cid%> = new java.util.HashMap<Str
|
||||
%>
|
||||
|
||||
class NestXMLTool_<%=cid%>{
|
||||
<%
|
||||
if (!isAllowEmpty && ignoreServiceAttributes) {
|
||||
%>
|
||||
private java.util.Set<String> serviceAttributeNames = new java.util.HashSet<>();
|
||||
{
|
||||
serviceAttributeNames.add("type");
|
||||
serviceAttributeNames.add("class");
|
||||
serviceAttributeNames.add("array");
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
public void parseAndAdd(org.dom4j.Element nestRoot, String value){
|
||||
try {
|
||||
org.dom4j.Document doc4Str = org.dom4j.DocumentHelper.parseText("<root>"+ value + "</root>");
|
||||
@@ -235,16 +248,25 @@ class NestXMLTool_<%=cid%>{
|
||||
for (org.dom4j.Element tmp: (java.util.List<org.dom4j.Element>) root.elements()) {
|
||||
removeEmptyElement(tmp);
|
||||
}
|
||||
if (root.content().size() == 0
|
||||
&& root.attributes().size() == 0
|
||||
&& root.declaredNamespaces().size() == 0) {
|
||||
if(root.getParent()!=null){
|
||||
root.getParent().remove(root);
|
||||
|
||||
boolean noSignificantDataAnnotationsExist = root.attributes().isEmpty() <%if (!isAllowEmpty && ignoreServiceAttributes) {%>|| isOnlyServiceAttributesDeclared(root.attributes()) <% } %>;
|
||||
if (root.content().isEmpty()
|
||||
&& noSignificantDataAnnotationsExist && root.declaredNamespaces().isEmpty()) {
|
||||
if(root.getParent()!=null){
|
||||
root.getParent().remove(root);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<%
|
||||
if (!isAllowEmpty && ignoreServiceAttributes) {
|
||||
%>
|
||||
private boolean isOnlyServiceAttributesDeclared(List<org.dom4j.Attribute> attributes) {
|
||||
return attributes.stream().allMatch(a -> serviceAttributeNames.contains(a.getName().toLowerCase()));
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
public String objectToString(Object value){
|
||||
if(value.getClass().isArray()){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -99,6 +99,11 @@
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
|
||||
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
|
||||
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
|
||||
@@ -44,5 +44,6 @@ THOUSANDS_SEPARATOR.NAME=Thousands separator
|
||||
XMLFIELD.NAME=Output Column
|
||||
XML_FIELD.NAME=XML Field
|
||||
XSD_FILE.NAME=XSD file path
|
||||
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
|
||||
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)
|
||||
COMPACT_FORMAT.NAME = Compact Format
|
||||
@@ -35,6 +35,7 @@ imports="
|
||||
%>
|
||||
String driverClass_<%=cid%> = "<%=this.getDirverClassName(node)%>";
|
||||
java.lang.Class jdbcclazz_<%=cid%> = java.lang.Class.forName(driverClass_<%=cid%>);
|
||||
globalMap.put("driverClass_<%=cid%>", driverClass_<%=cid%>);
|
||||
<%
|
||||
newInstance(node);
|
||||
}
|
||||
|
||||
@@ -165,6 +165,12 @@ imports="
|
||||
close_begin();
|
||||
%>
|
||||
conn_<%=cid%>.close();
|
||||
<% /* TESB-24900 - graceful shutdown for MYSQL connection */ %>
|
||||
if("com.mysql.cj.jdbc.Driver".equals((String)globalMap.get("driverClass_<%=(connection!=null)?connection.replaceAll("'","").trim():""%>"))
|
||||
&& routines.system.BundleUtils.inOSGi()) {
|
||||
Class.forName("com.mysql.cj.jdbc.AbandonedConnectionCleanupThread").
|
||||
getMethod("checkedShutdown").invoke(null, (Object[]) null);
|
||||
}
|
||||
<%
|
||||
close_end();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.localprovider</artifactId>
|
||||
@@ -18,7 +18,7 @@
|
||||
<thashfile.dir>${project.basedir}/components/tHashInput</thashfile.dir>
|
||||
<thashfile.version>3.0-20170711</thashfile.version>
|
||||
<ftpProxy.dir>${project.basedir}/components/tFTPConnection</ftpProxy.dir>
|
||||
<ftpProxy.version>3.6.1-talend-20190128</ftpProxy.version>
|
||||
<ftpProxy.version>3.6.1-talend-20190819</ftpProxy.version>
|
||||
<talendMQRFH2.dir>${project.basedir}/components/tMomInput</talendMQRFH2.dir>
|
||||
<talendMQRFH2.version>1.0.1-20190206</talendMQRFH2.version>
|
||||
<talendMQConnectionUtil.dir>${project.basedir}/components/tMomConnection</talendMQConnectionUtil.dir>
|
||||
@@ -125,7 +125,7 @@
|
||||
<outputDirectory>${thashfile.dir}</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>commons-net-ftps-proxy</artifactId>
|
||||
<version>${ftpProxy.version}</version>
|
||||
<type>jar</type>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.generic</artifactId>
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.beans.PropertyChangeEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.swt.SWT;
|
||||
@@ -126,7 +127,9 @@ public class ButtonController extends AbstractElementPropertySectionController {
|
||||
continue;
|
||||
}
|
||||
for(String path : listString){
|
||||
jars.add(GenericTableUtils.getDriverJarPath(path));
|
||||
if (!StringUtils.isBlank(path)) {
|
||||
jars.add(GenericTableUtils.getDriverJarPath(path));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@ package org.talend.designer.core.generic.controller;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -41,6 +43,7 @@ import org.talend.components.api.properties.ComponentReferenceProperties;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IReplaceNodeHandler;
|
||||
import org.talend.core.model.utils.TalendTextUtils;
|
||||
import org.talend.core.ui.properties.tab.IDynamicProperty;
|
||||
import org.talend.designer.core.generic.constants.IGenericConstants;
|
||||
@@ -100,15 +103,20 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
|
||||
for (int j = 0; j < param.getListItemsValue().length; j++) {
|
||||
if (((CCombo) ctrl).getText().equals(param.getListItemsDisplayName()[j])) {
|
||||
value = (String) param.getListItemsValue()[j];
|
||||
if (j == 0 && (boolean) ((ElementParameter) propertyParameter)
|
||||
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW)) {
|
||||
if (j == 0) {
|
||||
// The first item in the combo is
|
||||
// this component
|
||||
props.referenceType
|
||||
.setValue(ComponentReferenceProperties.ReferenceType.THIS_COMPONENT);
|
||||
props.componentInstanceId.setValue(null);
|
||||
props.setReference(null);
|
||||
propertyParameter.setShow(true);
|
||||
boolean isPropertyShow = true;
|
||||
Object isPropertyShowObj = ((ElementParameter) propertyParameter)
|
||||
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW);
|
||||
if (isPropertyShowObj != null) {
|
||||
isPropertyShow = Boolean.valueOf(isPropertyShowObj.toString());
|
||||
}
|
||||
propertyParameter.setShow(isPropertyShow);
|
||||
} else {
|
||||
props.referenceType
|
||||
.setValue(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE);
|
||||
@@ -277,12 +285,12 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
|
||||
INode currentNode = (INode) elem;
|
||||
List<INode> refNodes = getRefNodes(param, props);
|
||||
List<String> itemsLabel = new ArrayList<>();
|
||||
List<String> itemsValue = new ArrayList<>();
|
||||
Map<String, INode> itemsValue = new LinkedHashMap<>();
|
||||
|
||||
// First item is this component (see also createComboCommand)
|
||||
// FIXME - I18N for this message
|
||||
itemsLabel.add("Use this Component");
|
||||
itemsValue.add(currentNode.getUniqueName());
|
||||
itemsValue.put(currentNode.getUniqueName(), currentNode);
|
||||
String selectedValue;
|
||||
Object referenceType = props.referenceType.getValue();
|
||||
if (referenceType != null && referenceType.equals(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE)) {
|
||||
@@ -306,19 +314,20 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
|
||||
displayName = uniqueName + " - " + displayName; //$NON-NLS-1$
|
||||
}
|
||||
itemsLabel.add(displayName);
|
||||
itemsValue.add(uniqueName);
|
||||
itemsValue.put(uniqueName, node);
|
||||
labelToValueMap.put(displayName, uniqueName);
|
||||
}
|
||||
List<String> itemValueList = new ArrayList<>(itemsValue.keySet());
|
||||
param.setListItemsDisplayName(itemsLabel.toArray(new String[0]));
|
||||
param.setListItemsDisplayCodeName(itemsLabel.toArray(new String[0]));
|
||||
param.setListItemsValue(itemsValue.toArray(new String[0]));
|
||||
param.setListItemsValue(itemValueList.toArray(new String[0]));
|
||||
combo.setItems(itemsLabel.toArray(new String[0]));
|
||||
String iLabel = null;
|
||||
int selection = 0;
|
||||
for (int i = 0; i < itemsValue.size(); i++) {
|
||||
String iValue = itemsValue.get(i);
|
||||
for (int i = 0; i < itemValueList.size(); i++) {
|
||||
String iValue = itemValueList.get(i);
|
||||
if ((selectedValue == null && (((INode) elem).getUniqueName()).equals(iValue))
|
||||
|| (selectedValue != null && StringUtils.isNotEmpty(iValue) && iValue.endsWith(selectedValue))) {
|
||||
|| isRefernceNode(currentNode, itemsValue.get(iValue), selectedValue, props)) {
|
||||
iLabel = itemsLabel.get(i);
|
||||
break;
|
||||
}
|
||||
@@ -331,6 +340,33 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
|
||||
|
||||
}
|
||||
|
||||
private boolean isRefernceNode(INode selectedNode, INode checkingNode, String selectedUniqueName, ComponentReferenceProperties props) {
|
||||
IReplaceNodeHandler selectedHandler = selectedNode.getReplaceNodeHandler();
|
||||
IReplaceNodeHandler checkingHandler = checkingNode.getReplaceNodeHandler();
|
||||
|
||||
String selectedPrefix = Optional.ofNullable(selectedHandler).map(h -> h.getPrefix()).orElse("");
|
||||
String checkingPrefix = Optional.ofNullable(checkingHandler).map(h -> h.getPrefix()).orElse("");
|
||||
if (checkingPrefix.startsWith(selectedPrefix)) {
|
||||
String selectedNameWithoutPrefix = selectedUniqueName;
|
||||
String checkingUniqueNameWithoutPrefix = checkingNode.getUniqueName();
|
||||
if (selectedNameWithoutPrefix.startsWith(selectedPrefix)) {
|
||||
selectedNameWithoutPrefix = selectedNameWithoutPrefix.substring(selectedPrefix.length());
|
||||
}
|
||||
if (checkingUniqueNameWithoutPrefix.startsWith(selectedPrefix)) {
|
||||
checkingUniqueNameWithoutPrefix = checkingUniqueNameWithoutPrefix.substring(selectedPrefix.length());
|
||||
}
|
||||
boolean isReferenceNode = StringUtils.equals(selectedNameWithoutPrefix, checkingUniqueNameWithoutPrefix);
|
||||
if (isReferenceNode && selectedNode != checkingNode) {
|
||||
props.componentInstanceId.setValue(selectedNameWithoutPrefix);
|
||||
props.setReference(checkingNode.getComponentProperties());
|
||||
}
|
||||
|
||||
return isReferenceNode;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private List<INode> getRefNodes(IElementParameter param, ComponentReferenceProperties props) {
|
||||
callBeforeActive(param);
|
||||
List<INode> refNodes = new ArrayList<>();
|
||||
|
||||
@@ -1473,7 +1473,12 @@ public class Component extends AbstractBasicComponent {
|
||||
//as sql type value may have newline and return characters, which make compiler issue in java code,
|
||||
//so have to convert the newline characters to visible "\r", "\n" for pass the compiler issue and can't only convert them to white space as TDI-41898
|
||||
//jdbc drivers, salesforce driver can work like that sql : select * \nfrom Account, so it is ok
|
||||
return NodeUtil.replaceCRLFInMEMO_SQL(value);
|
||||
String replacedString = NodeUtil.replaceCRLFInMEMO_SQL(value).trim();
|
||||
|
||||
// For the case when sql field ends with extra semicolon, it has to be removed to avoid compilation error.
|
||||
return replacedString.endsWith(";")
|
||||
? replacedString.substring(0, replacedString.length() -1)
|
||||
: replacedString;
|
||||
}
|
||||
if (GenericTypeUtils.isSchemaType(property)) {
|
||||
// Handles embedded escaped quotes which might occur
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.designer.core.generic.model;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.ProxySelector;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
@@ -30,6 +31,7 @@ import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.swt.dialogs.ErrorDialogWidthDetailArea;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
import org.talend.components.api.component.Connector;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.components.api.service.ComponentService;
|
||||
@@ -498,11 +500,27 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
|
||||
monitor.beginTask(taskName, IProgressMonitor.UNKNOWN);
|
||||
try {
|
||||
exceptionResult = null;
|
||||
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
|
||||
ExceptionHandler.log(
|
||||
"Before tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
|
||||
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
|
||||
}
|
||||
toDo();
|
||||
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
|
||||
ExceptionHandler.log(
|
||||
"After tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
|
||||
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
result.set(false);
|
||||
exceptionResult = new InvocationTargetException(e);
|
||||
throw exceptionResult;
|
||||
} finally {
|
||||
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
|
||||
ExceptionHandler.log(
|
||||
"Finally tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
|
||||
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
|
||||
}
|
||||
}
|
||||
result.set(true);
|
||||
}
|
||||
@@ -568,6 +586,7 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
|
||||
this.drivedByForm = drivedByForm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Property getProperty() {
|
||||
NamedThing content = widget.getContent();
|
||||
if (content instanceof Property) {
|
||||
|
||||
@@ -21,11 +21,13 @@ import java.util.Set;
|
||||
import org.talend.components.api.component.ComponentDefinition;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.components.api.properties.ComponentReferenceProperties;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.runtime.services.IGenericService;
|
||||
import org.talend.daikon.properties.Properties;
|
||||
import org.talend.designer.core.generic.model.Component;
|
||||
import org.talend.designer.core.generic.model.GenericElementParameter;
|
||||
import org.talend.designer.core.generic.utils.ComponentsUtils;
|
||||
|
||||
@@ -109,4 +111,9 @@ public class GenericService implements IGenericService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTcompv0(IComponent component) {
|
||||
return Component.class.isInstance(component);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core</artifactId>
|
||||
|
||||
@@ -736,6 +736,7 @@ PerformancePreferencePage.generateCode=Generate code when opening the job
|
||||
PerformancePreferencePage.checkVersion=Check only the last version when updating jobs or joblets
|
||||
PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts
|
||||
PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection.
|
||||
PerformancePreferencePage.propagateContext=Propagate add context groups in repository contexts
|
||||
PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds)
|
||||
PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema)
|
||||
PerformancePreferencePage.HBaseOrMaprDBScanLimitTip=If set it by zero, will be same as deactiving the limit.
|
||||
|
||||
@@ -99,6 +99,7 @@ import org.talend.designer.core.ui.views.jobsettings.JobSettings;
|
||||
import org.talend.designer.core.ui.views.problems.Problems;
|
||||
import org.talend.designer.core.ui.views.properties.ComponentSettings;
|
||||
import org.talend.designer.core.ui.views.properties.ComponentSettingsView;
|
||||
import org.talend.designer.core.utils.BigDataJobUtil;
|
||||
import org.talend.designer.core.utils.JavaProcessUtil;
|
||||
import org.talend.designer.core.utils.UnifiedComponentUtil;
|
||||
import org.talend.designer.runprocess.ProcessorException;
|
||||
@@ -874,4 +875,9 @@ public class DesignerCoreService implements IDesignerCoreService {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNeedContextInJar(IProcess process) {
|
||||
return new BigDataJobUtil(process).needsToHaveContextInsideJar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,106 +12,100 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.core.build;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.repository.utils.ItemResourceUtil;
|
||||
import org.talend.core.runtime.process.IBuildJobHandler;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.repository.build.BuildType;
|
||||
import org.talend.core.runtime.repository.build.IBuildExportHandler;
|
||||
import org.talend.core.runtime.repository.build.IMavenPomCreator;
|
||||
import org.talend.core.runtime.repository.build.RepositoryObjectTypeBuildProvider;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.maven.tools.creator.CreateMavenStandardJobOSGiPom;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.repository.constants.BuildJobConstants;
|
||||
import org.talend.repository.ui.wizards.exportjob.handler.BuildOSGiBundleHandler;
|
||||
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
* Build Provider for OSGI build type (ESB bundle)
|
||||
*/
|
||||
public class StandardJobOSGiBundleBuildProvider extends RepositoryObjectTypeBuildProvider {
|
||||
|
||||
private static final List<String> ESB_COMPONENTS;
|
||||
static {
|
||||
final List<String> esbComponents = Arrays.asList("tRESTClient", "tRESTRequest", "tRESTResponse", "tESBConsumer",
|
||||
"tESBProviderFault", "tESBProviderRequest", "tESBProviderResponse", "tRouteInput", "tREST");
|
||||
ESB_COMPONENTS = Collections.unmodifiableList(esbComponents);
|
||||
}
|
||||
private static final String OSGI = "OSGI";
|
||||
|
||||
@Override
|
||||
public boolean valid(Map<String, Object> parameters) {
|
||||
if (parameters == null || parameters.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ERepositoryObjectType type = null;
|
||||
Property property = null;
|
||||
boolean containsEsbComponent = false;
|
||||
|
||||
|
||||
Object object = parameters.get(PROCESS);
|
||||
if (object != null && object instanceof IProcess2) {
|
||||
|
||||
Property property = ((IProcess2) object).getProperty();
|
||||
if (isOsgiBuildType(property)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
IProcess2 process = (IProcess2) object;
|
||||
for (INode node : process.getGraphicalNodes()) {
|
||||
if (ESB_COMPONENTS.contains(node.getComponent().getName())) {
|
||||
containsEsbComponent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
property = ((IProcess2) object).getProperty();
|
||||
if (property != null) {
|
||||
type = ERepositoryObjectType.getType(property);
|
||||
}
|
||||
}
|
||||
|
||||
if (type == null) {
|
||||
object = parameters.get(ITEM);
|
||||
if (object != null && object instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) object;
|
||||
ProcessType process = processItem.getProcess();
|
||||
for (Object node : process.getNode()) {
|
||||
NodeType nodeType = (NodeType) node;
|
||||
if (ESB_COMPONENTS.contains(nodeType.getComponentName())) {
|
||||
containsEsbComponent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
property = ((Item) object).getProperty();
|
||||
if (property != null) {
|
||||
type = ERepositoryObjectType.getType(property);
|
||||
if (node.isActivate() && BuildJobConstants.esbComponents.contains(node.getComponent().getName())) {
|
||||
fixDefaultBuildType(property);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type == null) {
|
||||
object = parameters.get(REPOSITORY_OBJECT);
|
||||
if (object != null && object instanceof IRepositoryViewObject) {
|
||||
type = ((IRepositoryViewObject) object).getRepositoryObjectType();
|
||||
property = ((IRepositoryViewObject) object).getProperty();
|
||||
object = parameters.get(ITEM);
|
||||
if (object != null && object instanceof ProcessItem) {
|
||||
Property property = ((Item) object).getProperty();
|
||||
if (isOsgiBuildType(property)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ProcessItem processItem = (ProcessItem) object;
|
||||
for (Object node : processItem.getProcess().getNode()) {
|
||||
NodeType nodeType = (NodeType) node;
|
||||
if (BuildJobConstants.esbComponents.contains(nodeType.getComponentName())) {
|
||||
fixDefaultBuildType(property);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// && !isServiceOperation(property)
|
||||
if (containsEsbComponent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param property
|
||||
* @return true if the build type is OSGI
|
||||
*/
|
||||
private boolean isOsgiBuildType(Property property) {
|
||||
return property != null && "OSGI".equals(property.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the default build type if it is a ESB job
|
||||
* @param property
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private void fixDefaultBuildType(Property property) {
|
||||
if(CommonsPlugin.isHeadless() && property != null && property.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE) == null) {
|
||||
property.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, OSGI);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ERepositoryObjectType getObjectType() {
|
||||
return ERepositoryObjectType.PROCESS;
|
||||
@@ -204,5 +198,4 @@ public class StandardJobOSGiBundleBuildProvider extends RepositoryObjectTypeBuil
|
||||
contextGroup.toString(), (Map<ExportChoice, Object>) choiceOption);
|
||||
return buildHandler;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManag
|
||||
*/
|
||||
public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuildProvider {
|
||||
|
||||
private static final String REST_REQUEST = "tRESTRequest";
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -74,7 +76,7 @@ public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuil
|
||||
if (object != null && object instanceof IProcess2) {
|
||||
|
||||
for (INode node : ((IProcess2) object).getGraphicalNodes()) {
|
||||
if ("tRESTRequest".equals(node.getComponent().getName())) {
|
||||
if (node.isActivate() && REST_REQUEST.equals(node.getComponent().getName())) {
|
||||
isRestServiceProvider = true;
|
||||
break;
|
||||
}
|
||||
@@ -97,7 +99,7 @@ public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuil
|
||||
ProcessItem processItem = (ProcessItem) object;
|
||||
for (Object node : processItem.getProcess().getNode()) {
|
||||
NodeType nodeType = (NodeType) node;
|
||||
if ("tRESTRequest".equals(nodeType.getComponentName())) {
|
||||
if (REST_REQUEST.equals(nodeType.getComponentName())) {
|
||||
isRestServiceProvider = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -379,6 +379,8 @@ public enum EParameterName {
|
||||
|
||||
ACTIVE_DATABASE_DELIMITED_IDENTIFIERS("Active database delimited identifiers"), //$NON-NLS-1$
|
||||
|
||||
USE_ALIAS_IN_OUTPUT_TABLE("Use alias in output table"), //$NON-NLS-1$
|
||||
|
||||
// for tDataprepRun
|
||||
PREPARATION_ID("PREPARATION_ID");
|
||||
|
||||
|
||||
@@ -16,11 +16,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.oro.text.regex.MalformedPatternException;
|
||||
import org.apache.oro.text.regex.Pattern;
|
||||
import org.apache.oro.text.regex.Perl5Compiler;
|
||||
import org.apache.oro.text.regex.Perl5Matcher;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
@@ -35,10 +38,10 @@ import org.talend.core.model.process.IConnectionCategory;
|
||||
import org.talend.core.model.process.IElement;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
import org.talend.hadoop.distribution.DistributionFactory;
|
||||
import org.talend.hadoop.distribution.ESparkVersion;
|
||||
import org.talend.hadoop.distribution.spark.SparkVersionUtil;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
|
||||
/**
|
||||
* This class will test an expression in the element parameters. <br>
|
||||
@@ -74,7 +77,36 @@ public final class Expression {
|
||||
|
||||
private static final String LESS_THAN = "<"; //$NON-NLS-1$
|
||||
|
||||
private static final Pattern isShowFuncPattern = Pattern.compile("isShow\\[(\\w+)(\\.\\w+)*\\]"); //$NON-NLS-1$
|
||||
private static final String isShowPrefix = "isShow"; //$NON-NLS-1$
|
||||
|
||||
private static final java.util.regex.Pattern isShowFuncPattern = java.util.regex.Pattern
|
||||
.compile(isShowPrefix + "\\[(\\w+)(\\.\\w+)*\\]"); //$NON-NLS-1$
|
||||
|
||||
private static final String sparkVersionPrefix = "SPARK_"; //$NON-NLS-1$
|
||||
|
||||
private static final java.util.regex.Pattern sparkVersionPattern = java.util.regex.Pattern
|
||||
.compile("(lt|le|gt|ge|eq|ne)\\s*'(" + sparkVersionPrefix + ".*)'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private static Perl5Matcher conditionMatcher = new Perl5Matcher();
|
||||
|
||||
private static Pattern andPattern;
|
||||
|
||||
private static Pattern orPattern;
|
||||
|
||||
static {
|
||||
Perl5Compiler compiler = new Perl5Compiler();
|
||||
// example for the reg exp: (.*)[')][ ]*or[ ]*[\w(](.*)
|
||||
String prefixReg = "(.*)[') ][ ]*"; //$NON-NLS-1$
|
||||
String suffixReg = "[ ]*[ (](.*)"; //$NON-NLS-1$
|
||||
try {
|
||||
andPattern = compiler.compile(prefixReg + AND + suffixReg);
|
||||
orPattern = compiler.compile(prefixReg + OR + suffixReg);
|
||||
} catch (MalformedPatternException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static final String CONTAINS = "CONTAINS"; //$NON-NLS-1$
|
||||
|
||||
private Expression(String expressionString) {
|
||||
this.expressionString = expressionString;
|
||||
@@ -145,14 +177,15 @@ public final class Expression {
|
||||
|
||||
}
|
||||
|
||||
public static boolean isThereCondition(String expression, String condition) {
|
||||
// example for the reg exp: (.*)[')][ ]*or[ ]*[\w(](.*)
|
||||
String refixReg = "(.*)[') ][ ]*"; //$NON-NLS-1$
|
||||
String suffixReg = "[ ]*[ (](.*)"; //$NON-NLS-1$
|
||||
if (expression.matches(refixReg + condition + suffixReg)) {
|
||||
protected static boolean isThereCondition(String expression, String condition) {
|
||||
expression = expression.toLowerCase();
|
||||
if (!expression.contains(condition)) {
|
||||
return false;
|
||||
}
|
||||
if (AND.equals(condition) && conditionMatcher.matches(expression, andPattern)) {
|
||||
return true;
|
||||
}
|
||||
if (expression.matches(refixReg + condition.toUpperCase() + suffixReg)) {
|
||||
if (OR.equals(condition) && conditionMatcher.matches(expression, orPattern)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -274,6 +307,10 @@ public final class Expression {
|
||||
if ((simpleExpression.contains("SPARK_VERSION["))) { //$NON-NLS-1$
|
||||
return evaluateSparkVersion(simpleExpression, listParam, currentParam);
|
||||
}
|
||||
|
||||
if ((simpleExpression.contains(CONTAINS))) { //$NON-NLS-1$
|
||||
return evaluateContains(simpleExpression, listParam);
|
||||
}
|
||||
|
||||
List<String> paraNames = getParaNamesFromIsShowFunc(simpleExpression);
|
||||
if (paraNames.size() > 0) {
|
||||
@@ -784,13 +821,15 @@ public final class Expression {
|
||||
// should be private, but need to unitary tested
|
||||
public static boolean evaluateSparkVersion(String simpleExpression, List<? extends IElementParameter> listParam,
|
||||
ElementParameter currentParam) {
|
||||
if (!simpleExpression.contains(sparkVersionPrefix)) {
|
||||
return false;
|
||||
}
|
||||
INode node = retrieveNodeElementFromParameter(currentParam, listParam);
|
||||
ESparkVersion version = SparkVersionUtil.getSparkVersion(node);
|
||||
if (version == null) {
|
||||
return false;
|
||||
}
|
||||
Pattern p = java.util.regex.Pattern.compile("(lt|le|gt|ge|eq|ne)\\s*'(SPARK_.*)'"); //$NON-NLS-1$
|
||||
Matcher m = p.matcher(simpleExpression);
|
||||
Matcher m = sparkVersionPattern.matcher(simpleExpression);
|
||||
if (m.find()) {
|
||||
ESparkVersion versionToTest = ESparkVersion.valueOf(m.group(2));
|
||||
switch (m.group(1)) {
|
||||
@@ -836,7 +875,7 @@ public final class Expression {
|
||||
|
||||
private static List<String> getParaNamesFromIsShowFunc(String expr) {
|
||||
List<String> paraNames = new ArrayList<String>();
|
||||
if (expr == null) {
|
||||
if (expr == null || !expr.contains(isShowPrefix)) {
|
||||
return paraNames;
|
||||
}
|
||||
Matcher matcher = isShowFuncPattern.matcher(expr);
|
||||
@@ -1030,5 +1069,28 @@ public final class Expression {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean evaluateContains(String simpleExpression, List<? extends IElementParameter> listParam) {
|
||||
//Split to get param name and param value to look after
|
||||
String[] splitted = simpleExpression.split(CONTAINS);
|
||||
if (splitted.length != 2) {
|
||||
return false;
|
||||
}
|
||||
String paramName = splitted[0].trim();
|
||||
String paramValue = splitted[1].trim();
|
||||
|
||||
//Look for the param name in list
|
||||
IElementParameter param = listParam.stream()
|
||||
.filter(p -> paramName.equals(p.getName()))
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
if (param == null || ! EParameterFieldType.TABLE.equals(param.getFieldType())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if we can find paraValue among table lines
|
||||
return ((List<Map<String, Object>>) param.getValue()).stream()
|
||||
.anyMatch(line -> paramValue.equals(line.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,9 +31,20 @@ public class MultipleComponentConnection implements IMultipleComponentConnection
|
||||
|
||||
String connectionType;
|
||||
|
||||
String connectorName;
|
||||
|
||||
public MultipleComponentConnection(String cType, String targetName) {
|
||||
connectionType = cType;
|
||||
nameTarget = targetName;
|
||||
connectorName = cType;
|
||||
}
|
||||
|
||||
public String getConnectorName() {
|
||||
return connectorName;
|
||||
}
|
||||
|
||||
public void setConnectorName(String connectorName) {
|
||||
this.connectorName = connectorName;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
|
||||
import org.talend.core.model.components.IMultipleComponentConnection;
|
||||
import org.talend.core.model.components.IMultipleComponentItem;
|
||||
import org.talend.core.model.process.INode;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
@@ -67,4 +68,10 @@ public class MultipleComponentItem implements IMultipleComponentItem {
|
||||
public void setComponent(String component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateNode(INode newNode, INode oldNode) {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,17 +77,36 @@ public class MultipleComponentManager implements IMultipleComponentManager {
|
||||
return currentItem;
|
||||
}
|
||||
|
||||
public void addItem(IMultipleComponentItem currentItem) {
|
||||
String name = currentItem.getName();
|
||||
if (name.equals(inputName)) {
|
||||
input = currentItem;
|
||||
}
|
||||
if (name.equals(outputName)) {
|
||||
output = currentItem;
|
||||
}
|
||||
itemList.add(currentItem);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.model.components.IMultipleComponentManager#addParam(java.lang.String, java.lang.String)
|
||||
*/
|
||||
public void addParam(String source, String target) {
|
||||
paramList.add(new MultipleComponentParameter(source, target));
|
||||
paramList.add(createMultiCompParam(source, target));
|
||||
}
|
||||
|
||||
public void addValue(String target, String value) {
|
||||
paramList.add(new MultipleComponentParameterValue(target, value));
|
||||
paramList.add(createMultiCompParamValue(target, value));
|
||||
}
|
||||
|
||||
protected IMultipleComponentParameter createMultiCompParam(String target, String value) {
|
||||
return new MultipleComponentParameter(target, value, getParamSeperator());
|
||||
}
|
||||
|
||||
protected IMultipleComponentParameter createMultiCompParamValue(String target, String value) {
|
||||
return new MultipleComponentParameterValue(target, value, getParamSeperator());
|
||||
}
|
||||
|
||||
public void validateItems() {
|
||||
@@ -170,4 +189,9 @@ public class MultipleComponentManager implements IMultipleComponentManager {
|
||||
return this.lookupMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParamSeperator() {
|
||||
return ".";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,11 +33,15 @@ public class MultipleComponentParameter implements IMultipleComponentParameter {
|
||||
String targetValue;
|
||||
|
||||
public MultipleComponentParameter(String source, String target) {
|
||||
StringTokenizer token = new StringTokenizer(source, "."); //$NON-NLS-1$
|
||||
this(source, target, ".");
|
||||
}
|
||||
|
||||
public MultipleComponentParameter(String source, String target, String seperator) {
|
||||
StringTokenizer token = new StringTokenizer(source, seperator);
|
||||
sourceComponent = token.nextToken();
|
||||
sourceValue = token.nextToken();
|
||||
|
||||
token = new StringTokenizer(target, "."); //$NON-NLS-1$
|
||||
token = new StringTokenizer(target, seperator);
|
||||
targetComponent = token.nextToken();
|
||||
targetValue = token.nextToken();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user