Compare commits
123 Commits
master
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dba3b1b0a1 | ||
|
|
e12b4545ee | ||
|
|
95d7273962 | ||
|
|
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 |
58
PATCH_RELEASE_NOTE.md
Normal file
58
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
version: 7.2.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-4346
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| Patch Name | Patch\_20200901\_TPS-4346\_v1-7.2.1 |
|
||||
| Release Date | 2020-09-01 |
|
||||
| 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-4346 [7.2.1] NPE exception on tWaitForSQLData with snowflake connection (TDI-44643)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Talend Studio 7.2.1 must be installed.
|
||||
- If already installed one of the 4 patches(TPS-4193,TPS-3855,TPS-4183,TPS-3858), please install TPS-4186 or later cumulative patch before installing current patch.
|
||||
|
||||
## 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>
|
||||
|
||||
@@ -59,88 +59,76 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
|
||||
List<String> needToEndConnNames = new ArrayList<String>();
|
||||
INode nextNode = node.getOutgoingConnections(EConnectionType.ITERATE).get(0).getTarget();
|
||||
NodeUtil.fillConnectionsForStat(needToEndConnNames, nextNode);
|
||||
%>
|
||||
|
||||
<%if(stat) {%>
|
||||
if(execStat){
|
||||
<%
|
||||
for(String connName : needToEndConnNames){
|
||||
if(!needToEndConnNames.isEmpty()) {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatOnConnection("<%=connName%>"+iterateId,2, 0);
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
|
||||
<%
|
||||
} else {
|
||||
if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {//now only finish the log, not send, TODO%>
|
||||
if(enableLogStash){
|
||||
runStat.log(iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {//now only finish the log, not send, TODO%>
|
||||
if(enableLogStash){
|
||||
<%
|
||||
for(String connName : needToEndConnNames){
|
||||
%>
|
||||
runStat.logStatOnConnection("<%=connName%>"+iterateId,2, 0);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
}
|
||||
if(connSet.size()>0){
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
%>
|
||||
<%if(stat) {%>
|
||||
if(execStat){
|
||||
if(resourceMap.get("inIterateVComp") == null || !((Boolean)resourceMap.get("inIterateVComp"))){
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName()%>"+iterateId,2, 0);
|
||||
}
|
||||
|
||||
if(connSet.size()>0) {
|
||||
if(stat && logstashCurrent && (connSet.size()==1)) {//the most common case, write this ugly logic for 65535 issue
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(runStat.updateStatAndLog(execStat,enableLogStash,resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(stat){
|
||||
%>
|
||||
if(execStat){
|
||||
runStat.updateStat(resourceMap,iterateId,2,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash){
|
||||
if(resourceMap.get("inIterateVComp") == null || !((Boolean)resourceMap.get("inIterateVComp"))){
|
||||
<%
|
||||
if(logstashCurrent){
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
<%
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
RunStat.StatBean talend_statebean = runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId,2, 0);
|
||||
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addConnectionMessage(
|
||||
"<%=sourceNodeId%>",
|
||||
"<%=sourceNodeComponent%>",
|
||||
false,
|
||||
"<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>",
|
||||
"<%=con.getUniqueName()%>",
|
||||
talend_statebean.getNbLine(),
|
||||
talend_statebean.getStartTime(),
|
||||
talend_statebean.getEndTime()
|
||||
);
|
||||
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addConnectionMessage(
|
||||
"<%=node.getUniqueName()%>",
|
||||
"<%=node.getComponent().getName()%>",
|
||||
true,
|
||||
"input",
|
||||
"<%=con.getUniqueName()%>",
|
||||
talend_statebean.getNbLine(),
|
||||
talend_statebean.getStartTime(),
|
||||
talend_statebean.getEndTime()
|
||||
);
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
if(runStat.log(resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
break;
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -146,83 +146,82 @@
|
||||
boolean logstashCurrent = !cid.startsWith("tJobStructureCatcher") && !cid.startsWith("talend") && enableLogStash;
|
||||
|
||||
if ((codePart.equals(ECodePart.BEGIN))&&(stat || logstashCurrent)&&connSet.size()>0) {
|
||||
for(IConnection con:connSet){
|
||||
%>
|
||||
if (<%if(stat){%>execStat<%}%><%if(stat && logstashCurrent){%> || <%}%><%if(logstashCurrent){%>enableLogStash<%}%>) {
|
||||
if(resourceMap.get("inIterateVComp") == null){
|
||||
<%if(containsTPartitioner){%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=con.getUniqueName() %> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=con.getUniqueName() %>.putIfAbsent("<%=con.getUniqueName() %>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=con.getUniqueName() %> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=con.getUniqueName() %>.get("<%=con.getUniqueName() %>" + iterateLoop);
|
||||
int step_<%=con.getUniqueName() %> = stats_<%=con.getUniqueName() %>.incrementAndGet()<=1?0:1;
|
||||
<%if(stat) {%>
|
||||
if(execStat) {
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId, step_<%=con.getUniqueName()%>, 0);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId, step_<%=con.getUniqueName()%>, 0);
|
||||
}
|
||||
<%}%>
|
||||
<%}else{%>
|
||||
<%if(stat) {%>
|
||||
if(execStat) {
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId, 0, 0);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId, 0, 0);
|
||||
}
|
||||
<%}%>
|
||||
<%}%>
|
||||
if(containsTPartitioner) {
|
||||
%>
|
||||
if(<%if(stat){%>execStat<%}%><%if(stat && logstashCurrent){%> || <%}%><%if(logstashCurrent){%>enableLogStash<%}%>) {
|
||||
runStat.updateStatOnConnectionAndLog(resourceMap,globalMap,iterateLoop,iterateId,<%if(stat){%>execStat<%} else {%>false<%}%>,enableLogStash,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
<%
|
||||
} else {
|
||||
if(stat) {
|
||||
%>
|
||||
if(execStat) {
|
||||
runStat.updateStatOnConnection(resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
<%
|
||||
|
||||
if(logstashCurrent) {
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if((codePart.equals(ECodePart.MAIN))&&(stat || logstashCurrent)&&connSet.size()>0){
|
||||
for(IConnection con:connSet){
|
||||
%>
|
||||
|
||||
//<%=con.getUniqueName()%>
|
||||
//<%=(String)codeGenArgument.getIncomingName()%>
|
||||
|
||||
|
||||
<%if (!node.getComponent().useMerge()) {%>
|
||||
<%if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
|
||||
}
|
||||
<%}%>
|
||||
<%
|
||||
} else if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){
|
||||
if(!node.getComponent().useMerge()) {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
<%if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
<%
|
||||
} else {
|
||||
if(stat) {
|
||||
%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
|
||||
if(logstashCurrent) {
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
<%}%>
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
for(IConnection connection:connSet){
|
||||
if(connection.getUniqueName().equals((String)codeGenArgument.getIncomingName())){
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
<%
|
||||
} else {
|
||||
if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
}
|
||||
<%}
|
||||
|
||||
if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
}
|
||||
<%}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +250,7 @@
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addComponentMessage("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
@@ -266,46 +265,37 @@
|
||||
List<String> needToStartConnNames = new ArrayList<String>();
|
||||
INode nextNode = node.getOutgoingConnections(EConnectionType.ITERATE).get(0).getTarget();
|
||||
NodeUtil.fillConnectionsForStat(needToStartConnNames, nextNode);
|
||||
if(needToStartConnNames.isEmpty()) {
|
||||
//do nothing
|
||||
} else if(containsTPartitioner){
|
||||
%>
|
||||
if(<%if(stat){%>execStat<%}%><%if(stat && logstashCurrent){%> || <%}%><%if(logstashCurrent){%>enableLogStash<%}%>){
|
||||
<%
|
||||
for(String connName : needToStartConnNames){
|
||||
%>
|
||||
<%if(containsTPartitioner){%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=connName%> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=connName%>.putIfAbsent("<%=connName%>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=connName%> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=connName%>.get("<%=connName%>" + iterateLoop);
|
||||
|
||||
int step_<%=connName %> = stats_<%=connName%>.incrementAndGet()<=1?0:1;
|
||||
<%if(stat) {%>
|
||||
if(execStat) {
|
||||
runStat.updateStatOnConnection("<%=connName%>"+iterateId, step_<%=connName%>, 0);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=connName%>"+iterateId, step_<%=connName%>, 0);
|
||||
}
|
||||
<%}%>
|
||||
<%}else{%>
|
||||
<%if(stat) {%>
|
||||
if(execStat) {
|
||||
runStat.updateStatOnConnection("<%=connName%>"+iterateId, 0, 0);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.logStatOnConnection("<%=connName%>"+iterateId, 0, 0);
|
||||
}
|
||||
<%}%>
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
runStat.updateStatOnConnectionAndLog(globalMap,iterateLoop,iterateId,<%if(stat){%>execStat<%} else {%>false<%}%>,enableLogStash,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
|
||||
<%
|
||||
} else {
|
||||
if(stat){
|
||||
%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%if(logstashCurrent) {%>
|
||||
if(enableLogStash){
|
||||
runStat.log(iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
<%
|
||||
}else if(codePart.equals(ECodePart.MAIN)){
|
||||
%>
|
||||
resourceMap.put("inIterateVComp", true);
|
||||
|
||||
@@ -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*/%>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
@@ -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){
|
||||
|
||||
@@ -3,6 +3,7 @@ imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.utils.NodeUtil
|
||||
"
|
||||
%>
|
||||
|
||||
@@ -17,7 +18,15 @@ String operator = ElementParameterParser.getValue(node,"__OPERATOR__");
|
||||
String value = ElementParameterParser.getValue(node,"__VALUE__");
|
||||
boolean isEnableWhereClause = ("true").equals(ElementParameterParser.getValue(node,"__ENABLE_WHERE_CLAUSE__"));
|
||||
boolean isEnableSQLStmt = ("true").equals(ElementParameterParser.getValue(node,"__ENABLE_SQL_STMT__"));
|
||||
String conn = "conn_" + connection ;
|
||||
|
||||
final String conn;
|
||||
INode connNode = NodeUtil.getNodeByUniqueName(node.getProcess(), connection);
|
||||
if((connNode!=null) && "tSnowflakeConnection".equals(connNode.getComponent().getName())){
|
||||
conn = connection + "_Connection";
|
||||
}else{
|
||||
conn = "conn_" + connection;
|
||||
}
|
||||
|
||||
String query = "SELECT COUNT(*) FROM ";
|
||||
%>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,15 +100,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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,34 @@ 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 Expression(String expressionString) {
|
||||
this.expressionString = expressionString;
|
||||
@@ -145,14 +175,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;
|
||||
@@ -784,13 +815,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 +869,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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,11 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
|
||||
String targetValue;
|
||||
|
||||
public MultipleComponentParameterValue(String target, String value) {
|
||||
StringTokenizer token = new StringTokenizer(target, "."); //$NON-NLS-1$
|
||||
this(target, value, ".");
|
||||
}
|
||||
|
||||
public MultipleComponentParameterValue(String target, String value, String seperator) {
|
||||
StringTokenizer token = new StringTokenizer(target, seperator);
|
||||
targetComponent = token.nextToken();
|
||||
targetValue = token.nextToken();
|
||||
|
||||
@@ -41,6 +45,7 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
|
||||
sourceValue = value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.designer.core.model.components;
|
||||
|
||||
/**
|
||||
* DOC hzhao class global comment. Detailled comment
|
||||
*/
|
||||
public class MultipleGenricComponentManager extends MultipleComponentManager {
|
||||
|
||||
public MultipleGenricComponentManager(boolean lookupMode) {
|
||||
super(lookupMode);
|
||||
}
|
||||
|
||||
public MultipleGenricComponentManager(String inputName, String outputName, String connector) {
|
||||
super(inputName, outputName, connector);
|
||||
}
|
||||
|
||||
public MultipleGenricComponentManager(String inputName, String outputName) {
|
||||
super(inputName, outputName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParamSeperator() {
|
||||
return "#";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.gef.palette.PaletteEntry;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
@@ -31,6 +32,7 @@ import org.talend.core.model.process.IReplaceNodeInProcess;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryEditorInput;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
|
||||
@@ -143,7 +145,7 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DOC qzhang Comment method "canDeleteNode".
|
||||
*
|
||||
@@ -257,5 +259,10 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
public boolean canHandleNode(INode node) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public IRepositoryEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
Boolean openedInJob) throws PersistenceException{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.BidiMap;
|
||||
@@ -36,6 +37,7 @@ import org.talend.components.api.properties.VirtualComponentProperties;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.hadoop.HadoopConfJarBean;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
|
||||
import org.talend.core.model.components.ComponentCategory;
|
||||
@@ -778,7 +780,7 @@ public class DataProcess implements IGeneratingProcess {
|
||||
DataConnection dataConnec = new DataConnection();
|
||||
dataConnec.setActivate(graphicalNode.isActivate());
|
||||
dataConnec.setLineStyle(EConnectionType.getTypeFromName(curConnec.getConnectionType()));
|
||||
dataConnec.setConnectorName(curConnec.getConnectionType());
|
||||
dataConnec.setConnectorName(curConnec.getConnectorName());
|
||||
if (nodeSource.getMetadataList() != null) {
|
||||
dataConnec.setMetadataTable(nodeSource.getMetadataList().get(0));
|
||||
}
|
||||
@@ -1011,6 +1013,7 @@ public class DataProcess implements IGeneratingProcess {
|
||||
curNode.setActivate(false);
|
||||
curNode.setStart(false);
|
||||
}
|
||||
curItem.updateNode(curNode, graphicalNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1948,7 +1951,7 @@ public class DataProcess implements IGeneratingProcess {
|
||||
}
|
||||
}
|
||||
|
||||
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS()) {
|
||||
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS() && !Boolean.getBoolean("deactivate_extended_component_log")) {
|
||||
final String talendJobLogComponent = "tJobStructureCatcher";
|
||||
final String uid4TalendJobLogComponent = "talendJobLog";
|
||||
IComponent jobStructComponent = ComponentsFactoryProvider.getInstance().get(talendJobLogComponent, ComponentCategory.CATEGORY_4_DI.getName());
|
||||
@@ -3249,8 +3252,8 @@ public class DataProcess implements IGeneratingProcess {
|
||||
if (!hadoopClusterService.isUseDynamicConfJar(hadoopClusterItemId)) {
|
||||
return null;
|
||||
}
|
||||
String confsJarName = hadoopClusterService.getCustomConfsJarName(hadoopClusterItemId, false, false);
|
||||
if (confsJarName == null) {
|
||||
Optional<HadoopConfJarBean> confJarBean = hadoopClusterService.getCustomConfsJar(hadoopClusterItemId, false, false);
|
||||
if (!confJarBean.isPresent()) {
|
||||
return null;
|
||||
}
|
||||
IComponent component = ComponentsFactoryProvider.getInstance().get(componentName, componentCategory.getName());
|
||||
@@ -3266,7 +3269,21 @@ public class DataProcess implements IGeneratingProcess {
|
||||
clusterIdParam.setValue(hadoopClusterItemId);
|
||||
}
|
||||
IElementParameter confLibParam = confNode.getElementParameter("CONF_LIB"); //$NON-NLS-1$
|
||||
confLibParam.setValue(TalendTextUtils.addQuotes(confsJarName));
|
||||
confLibParam.setValue(TalendTextUtils.addQuotes(confJarBean.get().getCustomConfJarName()));
|
||||
IElementParameter setConfParam = confNode.getElementParameter("SET_HADOOP_CONF"); //$NON-NLS-1$
|
||||
if (setConfParam != null) {
|
||||
setConfParam.setValue(Boolean.valueOf(confJarBean.get().isOverrideCustomConf()));
|
||||
}
|
||||
IElementParameter confPathParam = confNode.getElementParameter("HADOOP_CONF_SPECIFIC_JAR"); //$NON-NLS-1$
|
||||
if (confPathParam != null) {
|
||||
String jarPath = null;
|
||||
if (confJarBean.get().isContextMode()) {
|
||||
jarPath = confJarBean.get().getOverrideCustomConfPath();
|
||||
} else {
|
||||
jarPath = TalendTextUtils.addQuotes(confJarBean.get().getOriginalOverrideCustomConfPath());
|
||||
}
|
||||
confPathParam.setValue(jarPath);
|
||||
}
|
||||
return confNode;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -15,16 +15,25 @@ package org.talend.designer.core.model.process.jobsettings;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.avro.Schema;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IMultipleComponentItem;
|
||||
import org.talend.core.model.components.IMultipleComponentManager;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.MetadataToolAvroHelper;
|
||||
import org.talend.core.model.metadata.builder.ConvertionHelper;
|
||||
import org.talend.core.model.param.EConnectionParameterName;
|
||||
import org.talend.core.model.process.EConnectionType;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
@@ -33,11 +42,15 @@ import org.talend.core.model.process.INodeConnector;
|
||||
import org.talend.core.model.process.INodeReturn;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.temp.ECodePart;
|
||||
import org.talend.core.runtime.services.IGenericService;
|
||||
import org.talend.core.ui.component.ComponentsFactoryProvider;
|
||||
import org.talend.designer.core.model.components.EParameterName;
|
||||
import org.talend.designer.core.model.components.ElementParameter;
|
||||
import org.talend.designer.core.model.components.EmfComponent;
|
||||
import org.talend.designer.core.model.components.MultipleComponentConnection;
|
||||
import org.talend.designer.core.model.components.MultipleComponentItem;
|
||||
import org.talend.designer.core.model.components.MultipleComponentManager;
|
||||
import org.talend.designer.core.model.components.MultipleGenricComponentManager;
|
||||
import org.talend.designer.core.model.process.jobsettings.JobSettingsConstants.ContextLoadInfo;
|
||||
|
||||
/**
|
||||
@@ -65,9 +78,22 @@ public class JobContextLoadComponent implements IComponent {
|
||||
|
||||
private final boolean isFile;
|
||||
|
||||
public JobContextLoadComponent(boolean isFile, String dbComponent) {
|
||||
private IComponent component;
|
||||
|
||||
public JobContextLoadComponent(boolean isFile, String dbComponent, String componentType) {
|
||||
this.isFile = isFile;
|
||||
this.dbComponent = dbComponent;
|
||||
try {
|
||||
String compType = componentType;
|
||||
if (StringUtils.isBlank(componentType)) {
|
||||
ExceptionHandler.log(
|
||||
this.getClass().getName() + ": componentType is empty, will use DI type for component " + dbComponent);
|
||||
compType = ComponentCategory.CATEGORY_4_DI.getName();
|
||||
}
|
||||
component = ComponentsFactoryProvider.getInstance().get(dbComponent, compType);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
loadMultipleComponentManager();
|
||||
}
|
||||
|
||||
@@ -87,17 +113,46 @@ public class JobContextLoadComponent implements IComponent {
|
||||
if (dbComponent == null) {
|
||||
return;
|
||||
}
|
||||
multipleComponentManager = new MultipleComponentManager(DB_INPUT, CONTEXT_LOAD);
|
||||
|
||||
IMultipleComponentItem currentItem = multipleComponentManager.addItem(DB_INPUT, dbComponent);
|
||||
currentItem.getOutputConnections().add(
|
||||
new MultipleComponentConnection(EConnectionType.FLOW_MAIN.getName(), CONTEXT_LOAD));
|
||||
MultipleComponentConnection multiCompConnection = new MultipleComponentConnection(EConnectionType.FLOW_MAIN.getName(),
|
||||
CONTEXT_LOAD);
|
||||
IMultipleComponentItem currentItem = null;
|
||||
if (isTcompv0(component)) {
|
||||
multipleComponentManager = new MultipleGenricComponentManager(DB_INPUT, CONTEXT_LOAD);
|
||||
multiCompConnection.setConnectorName("MAIN");
|
||||
currentItem = new MultipleComponentItem() {
|
||||
|
||||
public void updateNode(INode newNode, INode oldNode) {
|
||||
super.updateNode(newNode, oldNode);
|
||||
if (newNode != null) {
|
||||
List<IMetadataTable> metadataList = newNode.getMetadataList();
|
||||
if (0 < metadataList.size() && isTcompv0(newNode.getComponent())) {
|
||||
IMetadataTable newMetadata = metadataList.get(0);
|
||||
newMetadata.setAttachedConnector("MAIN");
|
||||
ComponentProperties tcomp_properties = newNode.getComponentProperties();
|
||||
Schema schema = MetadataToolAvroHelper.convertToAvro(ConvertionHelper.convert(newMetadata));
|
||||
tcomp_properties.setValue("main.schema", schema);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
currentItem.setName(DB_INPUT);
|
||||
currentItem.setComponent(dbComponent);
|
||||
|
||||
((MultipleGenricComponentManager) multipleComponentManager).addItem(currentItem);
|
||||
} else {
|
||||
multipleComponentManager = new MultipleComponentManager(DB_INPUT, CONTEXT_LOAD);
|
||||
currentItem = multipleComponentManager.addItem(DB_INPUT, dbComponent);
|
||||
}
|
||||
|
||||
currentItem.getOutputConnections().add(multiCompConnection);
|
||||
|
||||
currentItem = multipleComponentManager.addItem(CONTEXT_LOAD, CONTEXTLOAD_COMPONENT);
|
||||
|
||||
}
|
||||
multipleComponentManager.validateItems();
|
||||
multipleComponentManagers.add(multipleComponentManager);
|
||||
|
||||
createMultipleComponentsParameters();
|
||||
}
|
||||
|
||||
@@ -181,6 +236,11 @@ public class JobContextLoadComponent implements IComponent {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isTcompv0(IComponent comp) {
|
||||
return comp != null
|
||||
&& Optional.ofNullable(IGenericService.getService()).map(s -> s.isTcompv0(comp)).orElse(Boolean.FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -242,10 +302,10 @@ public class JobContextLoadComponent implements IComponent {
|
||||
}
|
||||
|
||||
protected void createMultipleComponentsParameters() {
|
||||
final String self = "self."; //$NON-NLS-1$
|
||||
// create parameters
|
||||
if ((multipleComponentManagers != null) && (multipleComponentManagers.size() > 0)) {
|
||||
IMultipleComponentManager multipleComponentManager = multipleComponentManagers.get(0);
|
||||
final String self = "self" + multipleComponentManager.getParamSeperator(); //$NON-NLS-1$
|
||||
if (isFile) {
|
||||
String source = self + EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName();
|
||||
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".FILENAME"); //$NON-NLS-1$
|
||||
@@ -257,84 +317,140 @@ public class JobContextLoadComponent implements IComponent {
|
||||
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".IGNORE_ERROR_MESSAGE"); //$NON-NLS-1$
|
||||
|
||||
} else {
|
||||
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".URL");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_JAR");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_CLASS");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.HOST.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".HOST"); //$NON-NLS-1$
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".SERVER"); //$NON-NLS-1$
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DSN"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PORT.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PORT"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DBNAME"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_VERSION.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DB_VERSION"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTIES.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PROPERTIES"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.SCHEMA_DB.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".SCHEMA_DB"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".USER"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PASS"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DBTABLE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_TYPE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DB_TYPE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.CONNECTION_TYPE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".CONNECTION_TYPE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.QUERY;
|
||||
multipleComponentManager.addParam(source, DB_INPUT + "." + JobSettingsConstants.QUERY); //$NON-NLS-1$
|
||||
boolean initDefault = true;
|
||||
if (isTcompv0(component)) {
|
||||
if ("tJDBCInput".equalsIgnoreCase(dbComponent)) {
|
||||
initDefault = false;
|
||||
initTcompv0ParamMapping(self, multipleComponentManager);
|
||||
} else {
|
||||
ExceptionHandler.log(this.getClass().getName()
|
||||
+ ": MultipleComponentsParameters mapping is not prepared for tcompv0 " + dbComponent);
|
||||
}
|
||||
}
|
||||
if (initDefault) {
|
||||
initDefaultParameterMapping(self, multipleComponentManager);
|
||||
}
|
||||
|
||||
}
|
||||
// context parameter
|
||||
final String context = CONTEXT_LOAD + "."; //$NON-NLS-1$
|
||||
|
||||
String source = self + EParameterName.LOAD_NEW_VARIABLE.getName();
|
||||
String target = context + EParameterName.LOAD_NEW_VARIABLE.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
|
||||
target = context + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.PRINT_OPERATIONS.getName();
|
||||
target = context + EParameterName.PRINT_OPERATIONS.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_ERROR.getName();
|
||||
target = context + EParameterName.DISABLE_ERROR.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_INFO.getName();
|
||||
target = context + EParameterName.DISABLE_INFO.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_WARNINGS.getName();
|
||||
target = context + EParameterName.DISABLE_WARNINGS.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
initContextParamMapping(self, multipleComponentManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initTcompv0ParamMapping(final String self, IMultipleComponentManager multipleComponentManager) {
|
||||
|
||||
final String seperator = multipleComponentManager.getParamSeperator();
|
||||
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + seperator + EConnectionParameterName.GENERIC_URL.getDisplayName());
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_DRIVER_JAR.getDisplayName());
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_DRIVER_CLASS.getDisplayName());
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_TABLENAME.getDisplayName()); // $NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_USERNAME.getDisplayName()); // $NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_PASSWORD.getDisplayName()); // $NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
|
||||
multipleComponentManager.addParam(source,
|
||||
DB_INPUT + seperator + EConnectionParameterName.GENERIC_TABLENAME.getDisplayName()); // $NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.QUERY;
|
||||
multipleComponentManager.addParam(source, DB_INPUT + seperator + "sql"); //$NON-NLS-1$
|
||||
|
||||
}
|
||||
|
||||
private void initContextParamMapping(final String self, IMultipleComponentManager multipleComponentManager) {
|
||||
// context parameter
|
||||
final String context = CONTEXT_LOAD + multipleComponentManager.getParamSeperator();
|
||||
|
||||
String source = self + EParameterName.LOAD_NEW_VARIABLE.getName();
|
||||
String target = context + EParameterName.LOAD_NEW_VARIABLE.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
|
||||
target = context + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.PRINT_OPERATIONS.getName();
|
||||
target = context + EParameterName.PRINT_OPERATIONS.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_ERROR.getName();
|
||||
target = context + EParameterName.DISABLE_ERROR.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_INFO.getName();
|
||||
target = context + EParameterName.DISABLE_INFO.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
|
||||
source = self + EParameterName.DISABLE_WARNINGS.getName();
|
||||
target = context + EParameterName.DISABLE_WARNINGS.getName();
|
||||
multipleComponentManager.addParam(source, target);
|
||||
}
|
||||
|
||||
private void initDefaultParameterMapping(final String self, IMultipleComponentManager multipleComponentManager) {
|
||||
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".URL");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_JAR");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_CLASS");
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.HOST.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".HOST"); //$NON-NLS-1$
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".SERVER"); //$NON-NLS-1$
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DSN"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PORT.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PORT"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DBNAME"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_VERSION.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DB_VERSION"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTIES.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PROPERTIES"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.SCHEMA_DB.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".SCHEMA_DB"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".USER"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".PASS"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DBTABLE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_TYPE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".DB_TYPE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.CONNECTION_TYPE.getName());
|
||||
multipleComponentManager.addParam(source, DB_INPUT + ".CONNECTION_TYPE"); //$NON-NLS-1$
|
||||
|
||||
source = self + JobSettingsConstants.QUERY;
|
||||
multipleComponentManager.addParam(source, DB_INPUT + "." + JobSettingsConstants.QUERY); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends IElementParameter> createElementParameters(INode node) {
|
||||
|
||||
@@ -380,8 +496,17 @@ public class JobContextLoadComponent implements IComponent {
|
||||
IElementParameter newParam = new ElementParameter(node);
|
||||
newParam.setName(JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName()));
|
||||
newParam.setFieldType(EParameterFieldType.TABLE);
|
||||
newParam.setListItemsDisplayName(new String[] { EmfComponent.TEXT_BUILTIN, EmfComponent.TEXT_REPOSITORY });
|
||||
newParam.setListItemsDisplayCodeName(new String[] { EmfComponent.BUILTIN, EmfComponent.REPOSITORY });
|
||||
if (isTcompv0(component)) {
|
||||
/**
|
||||
* seems that tcompv0 will check the list using the display name when generating codes:
|
||||
* GenericTableUtils#setTableValues
|
||||
*/
|
||||
newParam.setListItemsDisplayName(new String[0]);
|
||||
newParam.setListItemsDisplayCodeName(new String[0]);
|
||||
} else {
|
||||
newParam.setListItemsDisplayName(new String[] { EmfComponent.TEXT_BUILTIN, EmfComponent.TEXT_REPOSITORY });
|
||||
newParam.setListItemsDisplayCodeName(new String[] { EmfComponent.BUILTIN, EmfComponent.REPOSITORY });
|
||||
}
|
||||
elemParamList.add(newParam);
|
||||
|
||||
newParam = new ElementParameter(node);
|
||||
|
||||
@@ -928,7 +928,7 @@ public class JobSettingsManager {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
IComponent tContextLoadComponent = new JobContextLoadComponent(fileFlag, dbInput);
|
||||
IComponent tContextLoadComponent = new JobContextLoadComponent(fileFlag, dbInput, process.getComponentsType());
|
||||
|
||||
final String uniqueName = "Implicit_Context"; //$NON-NLS-1$
|
||||
DataNode tContextLoadNode = new DataNode(tContextLoadComponent, uniqueName);
|
||||
@@ -1023,7 +1023,8 @@ public class JobSettingsManager {
|
||||
String dbType = getDatabaseTypeFromParameter(process);
|
||||
if (dbType != null) {
|
||||
// TDI-18161:the SQL script's syntax is not right because of the implicit context of General JDBC.
|
||||
if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
|
||||
if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())
|
||||
|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getProduct())) {
|
||||
dbType = findRealDbTypeForJDBC(process, dbType);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.process.ITargetExecutionConfig;
|
||||
import org.talend.core.model.runprocess.IEclipseProcessor;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
@@ -44,7 +43,6 @@ import org.talend.core.runtime.process.TalendProcessOptionConstants;
|
||||
import org.talend.designer.codegen.ICodeGenerator;
|
||||
import org.talend.designer.core.ISyntaxCheckableEditor;
|
||||
import org.talend.designer.core.i18n.Messages;
|
||||
import org.talend.designer.maven.model.MavenSystemFolders;
|
||||
import org.talend.designer.runprocess.IProcessMessageManager;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.designer.runprocess.ProcessorException;
|
||||
@@ -361,11 +359,7 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
|
||||
protected Process exec(String[] cmd, String path) throws ProcessorException {
|
||||
try {
|
||||
if (path == null || !new File(path).exists()) {
|
||||
if (getSpecialWorkingDir() != null) {
|
||||
return Runtime.getRuntime().exec(cmd, null, getSpecialWorkingDir());
|
||||
} else {
|
||||
return Runtime.getRuntime().exec(cmd);
|
||||
}
|
||||
return Runtime.getRuntime().exec(cmd);
|
||||
} else {
|
||||
return Runtime.getRuntime().exec(cmd, null, new File(path));
|
||||
}
|
||||
@@ -374,23 +368,6 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (TUP-20459)For a job which dependencies resources need set the working dir DOC jding
|
||||
* Comment method "getSpecialWorkingDir".
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private File getSpecialWorkingDir() {
|
||||
if (!(process instanceof IProcess2)) {
|
||||
return null;
|
||||
}
|
||||
File workingDir = project.getFile(MavenSystemFolders.EXT_RESOURCES.getPath()).getLocation().toFile();
|
||||
if (workingDir.exists()) {
|
||||
return workingDir;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Thread createProdConsThread(final InputStream input, final boolean isError, final int bufferSize,
|
||||
final StringBuffer out, final StringBuffer err) {
|
||||
Thread thread = new Thread() {
|
||||
|
||||
@@ -313,9 +313,11 @@ public class GEFPasteAction extends SelectionAction {
|
||||
(org.talend.designer.core.ui.editor.process.Process) editor.getProcess(), gefPoint);
|
||||
mpc.setSelectedSubjobs(subjobParts);
|
||||
mpc.setSelectedExpandedJoblet(expandedJobletNodes);
|
||||
mpc.setCheckNodeExist(false);
|
||||
execute(mpc);
|
||||
} else if (nodeParts.size() != 0) {
|
||||
NodesPasteCommand cmd = new NodesPasteCommand(nodeParts, editor.getProcess(), gefPoint);
|
||||
cmd.setCheckNodeExist(false);
|
||||
cmd.setSelectedSubjobs(subjobParts);
|
||||
cmd.setSelectedExpandedJoblet(expandedJobletNodes);
|
||||
execute(cmd);
|
||||
|
||||
@@ -607,7 +607,7 @@ public final class TalendEditorPaletteFactory {
|
||||
while (iter.hasNext()) {
|
||||
IComponent xmlComponent = iter.next();
|
||||
|
||||
Matcher matcher = pattern.matcher(xmlComponent.getName().toLowerCase());
|
||||
Matcher matcher = pattern.matcher(xmlComponent.getDisplayName().toLowerCase());
|
||||
if (matcher.find()) {
|
||||
resultByName.add(new ComponentHit(xmlComponent, matcher.start()));
|
||||
continue;
|
||||
@@ -643,7 +643,7 @@ public final class TalendEditorPaletteFactory {
|
||||
private static void addDelegateComponents(IComponentsFactory compFac, Collection<IComponent> componentSet,
|
||||
String lowerCasedKeyword) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) {
|
||||
IUnifiedComponentService service = (IUnifiedComponentService) GlobalServiceRegister.getDefault().getService(
|
||||
IUnifiedComponentService service = GlobalServiceRegister.getDefault().getService(
|
||||
IUnifiedComponentService.class);
|
||||
service.filterUnifiedComponentForPalette(compFac, componentSet, lowerCasedKeyword);
|
||||
|
||||
@@ -730,13 +730,12 @@ public final class TalendEditorPaletteFactory {
|
||||
return null;
|
||||
}
|
||||
IComponent delegateComponent = UnifiedComponentUtil.getDelegateComponent(component);
|
||||
String name = component.getName();
|
||||
String filter = null;
|
||||
if (delegateComponent != component) {
|
||||
// emf component name
|
||||
filter = component.getName();
|
||||
name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
|
||||
}
|
||||
String name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
|
||||
ImageDescriptor imageSmall = delegateComponent.getIcon16();
|
||||
IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceStore();
|
||||
ImageDescriptor imageLarge;
|
||||
|
||||
@@ -19,15 +19,21 @@ import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.jdt.internal.ui.JavaPlugin;
|
||||
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
|
||||
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
|
||||
import org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy;
|
||||
import org.eclipse.jdt.internal.ui.text.JavaReconciler;
|
||||
import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
|
||||
import org.eclipse.jdt.ui.text.IJavaPartitions;
|
||||
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
|
||||
import org.eclipse.jdt.ui.text.JavaTextTools;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.text.FindReplaceDocumentAdapter;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.Region;
|
||||
import org.eclipse.jface.text.source.IOverviewRuler;
|
||||
import org.eclipse.jface.text.source.ISourceViewer;
|
||||
import org.eclipse.jface.text.source.IVerticalRuler;
|
||||
import org.eclipse.jface.text.source.SourceViewerConfiguration;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.part.FileEditorInput;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
@@ -297,5 +303,41 @@ public class TalendJavaEditor extends CompilationUnitEditor implements ISyntaxCh
|
||||
super.initializeDragAndDrop(viewer);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor#createJavaSourceViewer(org.eclipse.swt.widgets.
|
||||
* Composite, org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IOverviewRuler, boolean,
|
||||
* int, org.eclipse.jface.preference.IPreferenceStore)
|
||||
*/
|
||||
@Override
|
||||
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
|
||||
boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
|
||||
return new TalendAdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
|
||||
}
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
protected class TalendAdaptedSourceViewer extends AdaptedSourceViewer {
|
||||
|
||||
public TalendAdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
|
||||
boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
|
||||
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(SourceViewerConfiguration configuration) {
|
||||
super.configure(configuration);
|
||||
if (fReconciler == null) {
|
||||
JavaCompositeReconcilingStrategy strategy = new JavaCompositeReconcilingStrategy(this, TalendJavaEditor.this,
|
||||
configuration.getConfiguredDocumentPartitioning(this));
|
||||
JavaReconciler reconciler = new JavaReconciler(TalendJavaEditor.this, strategy, false);
|
||||
reconciler.setIsAllowedToModifyDocument(false);
|
||||
reconciler.setDelay(500);
|
||||
fReconciler = reconciler;
|
||||
fReconciler.install(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -560,8 +560,8 @@ public class ChangeMetadataCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE)) {
|
||||
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED)) {
|
||||
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE, true)) {
|
||||
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED, true)) {
|
||||
String type = (String) node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
|
||||
if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) {
|
||||
// for one node has several schema_type,set mode for the current one
|
||||
@@ -624,8 +624,10 @@ public class ChangeMetadataCommand extends Command {
|
||||
setTableMAPPING();
|
||||
|
||||
if (!internal) {
|
||||
updateColumnList(oldOutputMetadata, newOutputMetadata);
|
||||
((Process) node.getProcess()).checkProcess();
|
||||
if (!oldOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE)) {
|
||||
updateColumnList(oldOutputMetadata, newOutputMetadata);
|
||||
((Process) node.getProcess()).checkProcess();
|
||||
}
|
||||
}
|
||||
refreshMetadataChanged();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ public class MultiplePasteCommand extends CompoundCommand {
|
||||
private NodesPasteCommand nodeCmd;
|
||||
|
||||
private NotesPasteCommand noteCmd;
|
||||
|
||||
private boolean isCheckNodeExist = true;
|
||||
|
||||
public MultiplePasteCommand(List<NodePart> nodeParts, List<NoteEditPart> noteParts, Process process, Point cursorLocation) {
|
||||
// List<NodePart> nodePartList = new ArrayList<NodePart>();
|
||||
@@ -67,6 +69,8 @@ public class MultiplePasteCommand extends CompoundCommand {
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
nodeCmd.setCheckNodeExist(isCheckNodeExist);
|
||||
|
||||
AbstractMultiPageTalendEditor multiPageTalendEditor = (AbstractMultiPageTalendEditor) PlatformUI.getWorkbench()
|
||||
.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
|
||||
GraphicalViewer viewer = multiPageTalendEditor.getTalendEditor().getViewer();
|
||||
@@ -85,7 +89,7 @@ public class MultiplePasteCommand extends CompoundCommand {
|
||||
for (EditPart editPart : (List<EditPart>) processPart.getChildren()) {
|
||||
if (editPart instanceof NodePart) {
|
||||
Node currentNode = (Node) editPart.getModel();
|
||||
if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) {
|
||||
if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer()) || !isCheckNodeExist) {
|
||||
sel.add(editPart);
|
||||
}
|
||||
} else if (editPart instanceof NoteEditPart) {
|
||||
@@ -150,4 +154,13 @@ public class MultiplePasteCommand extends CompoundCommand {
|
||||
nodeCmd.setSelectedExpandedJoblet(selectedExpandedJoblet);
|
||||
}
|
||||
|
||||
|
||||
public boolean isCheckNodeExist() {
|
||||
return isCheckNodeExist;
|
||||
}
|
||||
|
||||
|
||||
public void setCheckNodeExist(boolean isCheckNodeExist) {
|
||||
this.isCheckNodeExist = isCheckNodeExist;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,8 @@ public class NodesPasteCommand extends Command {
|
||||
private boolean isJobletRefactor = false;
|
||||
|
||||
private boolean isJunitCreate = false;
|
||||
|
||||
private boolean isCheckNodeExist = true;
|
||||
|
||||
/**
|
||||
* Getter for isJunitCreate.
|
||||
@@ -385,7 +387,7 @@ public class NodesPasteCommand extends Command {
|
||||
// create the nodes
|
||||
for (NodePart copiedNodePart : nodeParts) {
|
||||
IGraphicalNode copiedNode = (IGraphicalNode) copiedNodePart.getModel();
|
||||
if (!containNodeInProcess(copiedNode)) {
|
||||
if (this.isCheckNodeExist && !containNodeInProcess(copiedNode)) {
|
||||
continue;
|
||||
}
|
||||
IComponent component = ComponentsFactoryProvider.getInstance().get(copiedNode.getComponent().getName(),
|
||||
@@ -1008,4 +1010,16 @@ public class NodesPasteCommand extends Command {
|
||||
public void setSelectedExpandedJoblet(List<NodePart> selectedExpandedJoblet) {
|
||||
this.selectedExpandedJoblet = selectedExpandedJoblet;
|
||||
}
|
||||
|
||||
|
||||
public boolean isCheckNodeExist() {
|
||||
return isCheckNodeExist;
|
||||
}
|
||||
|
||||
|
||||
public void setCheckNodeExist(boolean isCheckNodeExist) {
|
||||
this.isCheckNodeExist = isCheckNodeExist;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -302,12 +302,14 @@ public class PropertyChangeCommand extends Command {
|
||||
List<? extends IConnection> connections = ((Node) elem).getOutgoingConnections();
|
||||
for (IConnection connection : connections) {
|
||||
if (!connection.getName().equals(oldELTValue)) {
|
||||
// do nothing when custom connection name.
|
||||
// Update if use custom connection name.
|
||||
ChangeConnTextCommand command = new ChangeConnTextCommand(connection, newELTValue);
|
||||
command.execute();
|
||||
continue;
|
||||
}
|
||||
INode targetNode = connection.getTarget();
|
||||
String componentName = targetNode.getComponent().getName();
|
||||
if (componentName.matches("tELT.+Map")) { //$NON-NLS-1$
|
||||
if (componentName.matches("tELT.*Map")) { //$NON-NLS-1$
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDbMapDesignerService.class)) {
|
||||
IDbMapDesignerService service = GlobalServiceRegister.getDefault().getService(
|
||||
IDbMapDesignerService.class);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user