Compare commits

...

123 Commits

Author SHA1 Message Date
wwang-talend
dba3b1b0a1 fix readme 2020-08-31 16:08:50 +08:00
wwang-talend
e12b4545ee add readme 2020-08-31 10:43:04 +08:00
wang wei
95d7273962 fix(TDI-44643): NPE exception on tWaitForSQLData with snowflake
connection(#5006)
2020-08-31 10:13:38 +08:00
msheverda-talend
6cf2cae1b6 fix(TDI-42522): avoid 65535 issue (#3636) (#3893) (#4895)
Co-authored-by: wang wei <wwang@talend.com>
2020-07-30 18:08:10 +03:00
Chao MENG
604fb23a71 patch(TPS-4193): remove localprovider, make it compatible with javajet modifications (#4984)
* patch(TPS-4193): remove localprovider, make it compatible with javajet
modifications

* patch(TPS-4193): remove localprovider, make it compatible with javajet
modifications
2020-07-23 18:56:58 +08:00
apoltavtsev
e3f6f81cde TESB-29647 Bundle version for Jobs is corrected 2020-07-20 15:23:29 +02:00
Andreas Mattes
26ff46ddeb TESB-27583 TESB-29690 Ensure WSDL is included in WS consumer build. (#4966)
This fix corrects TESB-27081 and TESB-27583 ensuring SOAP Action is set from binding definition in WSDL, and TESB-2960 ensuring the WSDL is present for properly configuring the SOAP 1.2 binding. This fix is identical with the temporarily reverted fix from pull request #4926.
2020-07-20 11:25:28 +02:00
Andreas Mattes
cd955b7ad4 Revert "TESB-29690 Ensure WSDL is included in WS consumer build". 2020-07-14 11:36:46 +02:00
Andreas Mattes
dc11694fd1 TESB-29690 Ensure WSDL is included in WS consumer build. (#4926)
This fix includes fixes for TESB-27081 and TESB-27583 handling missing SOAP Action due to missing WSDL and TESB-2960 ensuring the WSDL is present for properly configuring the SOAP 1.2 binding.
2020-07-13 18:25:54 +02:00
hzhao-talendbj
b1598aca9f tup-27447 backport to patch721 (#4822) 2020-07-02 14:28:41 +08:00
hzhao-talendbj
938c1dadb2 TUP-27070 (#4855)
on patch721, eltmap don't have 'update' option  so remove this junit
from 721
2020-06-24 15:36:07 +08:00
hzhao-talendbj
ba7622b528 tup-27070 (#4848)
add this junit by mistake,it should not in branch patch721, so remove it
2020-06-23 18:18:04 +08:00
hzhao-talendbj
2cdfb08e18 tup-27070 fix junit failed on patch 7.2.1 (#4846) 2020-06-23 09:18:11 +08:00
bhe-talendbj
33fb855c55 fix(TUP-27053): backport (#4767) (#4801) 2020-06-19 15:13:02 +08:00
hzhao-talendbj
e6458bc956 Hengzhao/backport patch721/tup 27070 (#4774)
* Tup-27070 (#4734)
backport to 7.2.1 and fix conflicts

Conflicts:
	main/plugins/org.talend.designer.dbmap/src/main/java/org/talend/designer/dbmap/language/generation/DbGenerationManager.java

* TUP-27070  fix cross join cases

* Fix(TDI-43264):Fix issues. (#4182)

Co-authored-by: vyu-talend <49019399+vyu-talend@users.noreply.github.com>
2020-06-19 15:01:05 +08:00
hcyi
699ac6f1d4 fix(TUP-26939:Tmap shows null values when using Expression Builder. (#4802)
(#4632)

Conflicts:
	main/plugins/org.talend.expressionbuilder/src/main/java/org/talend/expressionbuilder/test/shadow/VirtualRowGeneratorNode.java
2020-06-19 14:55:49 +08:00
Zhiwei Xue
eeb99e841b fix(TUP-27199): remove wrapping space for condition. 2020-05-26 15:02:58 +08:00
hcyi
5af3d5faa2 fix(TUP-26924):tELTXXX: link name won't be updated after updating (#4729)
"default table name" in tELTInput
2020-05-22 17:11:20 +08:00
bhe-talendbj
cd90676406 fix(TUP-26728): backport 2020-05-14 10:30:47 +08:00
undx
df3e6451d9 fix(TCOMP-1681): Make ESB Studio job export TaCoKit compliant 2020-05-13 12:08:33 +02:00
undx
67c2ee7982 feat(TCOMP-1681): Make ESB Studio job export TaCoKit compliant 2020-05-12 14:22:48 +02:00
hwang-talend
44c8adafc5 Hwang/tup 26059 (#4436)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"
2020-05-07 17:47:49 +08:00
hzhao-talendbj
9b05cd445d TUP-26388 fix missing DB context value (#4614) (#4620)
* TUP-26388 fix missing DB context value

* fix missing db value issue

* remove useless isTcompv0
2020-05-07 17:44:12 +08:00
hzhao-talendbj
feccc56372 TUP-26388 fix SQL script's syntax issue (#4603) (#4605)
* TUP-26388  fix SQL script's syntax issue

* TUP-26388  fix SQL script's syntax issue
2020-05-07 17:43:44 +08:00
hzhao-talendbj
4002ebf11c fix(TUP-26388)Amazon Redshift Driver class not working with Implicit (#4585) (#4595)
* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context

* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context
2020-05-07 17:43:02 +08:00
hwang-talend
ca0734292e bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)
bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from Repository
2020-05-07 17:13:41 +08:00
hwang
ade3d8ea9f Revert "bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)"
This reverts commit 73b0ef1715.
2020-04-29 18:28:51 +08:00
hwang
642afd4c61 Revert "Hwang/tup 26059 (#4436)"
This reverts commit a88d5d7da6.
2020-04-29 18:28:41 +08:00
hwang-talend
73b0ef1715 bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)
bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from Repository
2020-04-29 18:06:14 +08:00
hwang-talend
a88d5d7da6 Hwang/tup 26059 (#4436)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"
2020-04-29 18:04:08 +08:00
hcyi
66baf2369a TPS-3953:[7.2.1] Table name in eltinput component, the default table is (#4628)
taken into consideration (TUP-26750)
2020-04-20 09:32:57 +08:00
jiezhang-tlnd
a71f6b26b9 Temp patch tps 3844 (#4615)
* Fix TUP-26399 Items in Studio get deleted and cannot be recovered, even (#4533)

if items are locked
https://jira.talendforge.org/browse/TUP-26399

* fix(TUP-26231)Relative path not working in Talend v721 (#4530) (#4549) (#4597)

* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231):Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

Conflicts:
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/runprocess/Processor.java
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/ui/editor/dependencies/util/ResourceDependenciesUtil.java

* fix(TUP-24310):routines is duplicated in the reactor (#3909)

* fix(TUP-26482):[Studio] Studio is very slow to build the job(the (#4546)

performance issue)

* bugfix(TUP-26475):Job is referring to the joblet present in the (#4543)

bugfix(TUP-26475):Job is referring to the joblet present in the
reference job even after we delete it from the main job

* fix(TDI-43619): Null Value Treated as <TALEND_NULL> in Subjob (#4488)

* fix(TDI-43619): Null Value Treated as <TALEND_NULL> in Subjob

* fix(TDI-43619): fix for all types to avoid the parse warn log or message
when null

* fix the compiler issue for password field

* fix(TUP-26213):Compilation issue after migration to v7.2 (#4478)

Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
Co-authored-by: Zhiwei Xue <zwxue@talend.com>
Co-authored-by: hwang-talend <hwang@talend.com>
Co-authored-by: wang wei <wwang@talend.com>
2020-04-13 16:12:08 +08:00
hcyi
68f7ea24cc TPS-3921: tELTHiveMap doesn't pass context variable properly (TUP-24955) (#4580) 2020-04-01 14:33:44 +08:00
Dmytro Sylaiev
c32f6c1097 Dsylaiev/tdi 43810 add ignore service attr checkbox for xml (#4539)
* fix(TDI-43810): Fix for xml component

* fix(TDI-43810): Do not ignore service attr when checkbox is hidden

* fix(TDI-43810): Use hashset instead of arraylist

* fix(TDI-43810): Minor refactoring
2020-03-24 14:52:41 +02:00
hzhao-talendbj
0234a23a9c https://jira.talendforge.org/browse/TPS-3452 2020-03-24 17:15:34 +08:00
hzhao-talendbj
a604485e3a fix column names are same (#4551) (#4552) 2020-03-24 16:51:52 +08:00
kjwang
1337af08ad fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure (#4505)
fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure
https://jira.talendforge.org/browse/TUP-26189
2020-03-23 14:46:55 +08:00
SunChaoqun
a0669d27fc TESB-28130:Duplicate dependencies in POM.xml for routes lead to compile issues (#4536) 2020-03-20 18:07:17 +08:00
Mike Yan
a62487a9f0 fix(TESB-28255): Solve reference error for java ws and mdm lib in java 8 2020-03-18 15:45:25 +08:00
Zhiwei Xue
51f7668e49 fix(TUP-26132):Cannot build a job by CI (maven) after updating multiple (#4442)
job versions
2020-03-09 15:01:05 +08:00
Jane Ding
5db747c247 fix(TUP-25820)TMC: error show in error log when logon TMC project (#4318)
https://jira.talendforge.org/browse/TUP-25820
2020-03-09 15:00:36 +08:00
kjwang
9a8d085a05 Kjwang/fix tup 26264 t elt map generated query has extra symbols (#4489) (#4499)
* Fix TUP-26264 tELTMap generated query has extra symbols generated when
more input mapping in component
https://jira.talendforge.org/browse/TUP-26264

* Fix TUP-26264 tELTMap generated query has extra symbols generated when
more input mapping in component
https://jira.talendforge.org/browse/TUP-26264

Conflicts:
	test/plugins/org.talend.designer.dbmap.test/src/org/talend/designer/dbmap/language/generation/DbGenerationManagerTest.java
2020-03-09 14:58:53 +08:00
hwang-talend
39c9616bb5 bugfix(TUP-25959):Incorrect message is observed in the tWarn component (#4464)
bugfix(TUP-25959):Incorrect message is observed in the tWarn component
2020-03-09 14:58:12 +08:00
apoltavtsev
691e5ed912 TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error 2020-02-26 18:31:30 +08:00
jiezhang-tlnd
24c60f1920 Temp patch tps 3681 (#4482)
* backpot72(TUP-25951)Syncing of project and pom files doesnt happen (#4393)

* backpot72(TUP-25951)Syncing of project and pom files doesnt happen
initally

* backport72(TUP-25951)Syncing of project and pom files doesnt happen
initally

* remove synchronized

* Kjwang/fix tup 25777 interger values are read as string (#4403) (#4421)

* Fix TUP-25777 Integer values are read as string after applying TPS-3637
https://jira.talendforge.org/browse/TUP-25777

* kjwang/Fix TUP-25777 Interger values are read as string after applying (#4440) (#4441)

kjwang/Fix TUP-25777 Interger values are read as string after applying  TPS-3637 (Fix failed tuj)
https://jira.talendforge.org/browse/TUP-25777

* Fix: TUP-25943 tELTMap generated query has extra symbols generated
(#4415) (#4424)

* Fix: TUP-25943 tELTMap generated query has extra symbols generated
https://jira.talendforge.org/browse/TUP-25943

Conflicts:
	main/plugins/org.talend.designer.dbmap/src/main/java/org/talend/designer/dbmap/language/generation/DbGenerationManager.java

* fix(TUP-25649):ERROR when Job in MDM project calling Job in Reference DI (#4331) (#4355)

project:import routines.DataQuality cannot be resolved.

* Revert "fix(TUP-25649):ERROR when Job in MDM project calling Job in Reference DI (#4331) (#4355)"

This reverts commit 499a44fb3c.

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in (#3738)

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789
Add a junit.

* Revert "TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error"

This reverts commit 0b047b73b6.

Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>
Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: hcyi <hcyi@talend.com>
Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
2020-02-24 14:38:15 +08:00
apoltavtsev
0b047b73b6 TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error 2020-02-19 18:42:08 +01:00
jiezhang-tlnd
d1b60e2e3f Tps 3636 temp patch721 (#4327)
* fix(TUP-25460)schema hardcoded in guess query in tDBInput component (#4206)

https://jira.talendforge.org/browse/TUP-25406

* Revert "Revert "bugfix(TUP-25409) Improve building speed of CI builder (#4253)""

This reverts commit 956891d18c.

Co-authored-by: bhe-talendbj <52311292+bhe-talendbj@users.noreply.github.com>
2020-01-16 11:07:57 +08:00
Chao MENG
7329a7558e Patch/7.2.1 tps 3583 (#4310) 2020-01-09 17:20:26 +01:00
bhe-talendbj
956891d18c Revert "bugfix(TUP-25409) Improve building speed of CI builder (#4253)"
This reverts commit 50810ed439.
2020-01-09 17:47:38 +08:00
bhe-talendbj
50810ed439 bugfix(TUP-25409) Improve building speed of CI builder (#4253)
* bugfix(TUP-25409) Generate source code for main job only

* bugfix(TUP-25409) Resolve comments
2020-01-09 17:19:18 +08:00
Chao MENG
9420056b37 Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#4228)"
This reverts commit a1fd9f361b.
2020-01-02 11:20:19 +08:00
Chao MENG
5957b4993c Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable (#4283)"
This reverts commit c6647a76a8.
2020-01-02 11:20:12 +08:00
Chao MENG
5b664d9852 Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"
This reverts commit 5d4c8cc9d9.
2020-01-02 11:20:05 +08:00
Chao MENG
7cbef2f37f Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"
This reverts commit 564ed2618d.
2020-01-02 11:19:51 +08:00
Chao MENG
4cc93be67f fix(TUP-24148): tNetsuiteInput throws cast error when switching from use (#4036)
fix(TUP-24148): tNetsuiteInput throws cast error when switching from use tNetsuiteConnection to use this component
https://jira.talendforge.org/browse/TUP-24148
2019-12-31 10:50:31 +08:00
hcyi
f120c7c4dd fix(TUP-25099):NPE when using joblets from reference Projects. (#4132) (#4146) 2019-12-30 14:20:56 +08:00
Chao MENG
564ed2618d feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-27 18:17:01 +08:00
Chao MENG
5d4c8cc9d9 feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-27 17:15:31 +08:00
Chao MENG
c6647a76a8 feat(TUP-25226): Make the hadoop conf jar path a contextualizable (#4283)
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-26 19:08:45 +08:00
Chao MENG
a1fd9f361b feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#4228)
* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226

* fix(TUP-25585): [BUG]Data viewer failed for HDFS

https://jira.talendforge.org/browse/TUP-25585
2019-12-24 11:29:47 +08:00
Mike Yan
2ad1c00b63 fix(TESB-27266):Exclude tdm-lib-di from REST DS, but keep package info (#4231)
* TESB-26951 Dependencies from SubJob are added to manifest of ParentJob

* fix(TESB-27266):Exclude tdm-lib-di from REST DS, but keep package info
2019-12-13 14:20:13 +08:00
mbasiuk-talend
98db49e280 fix(TDI-43212): improve code generation for query string (#4149) 2019-12-12 08:58:20 +02:00
Jane Ding
6a6be36610 Jding/72/tup 22361 elt map bug in column expression while using context variable as a parameter (#3990) (#4209)
* fix(TUP-22361)ELTMap bug in column expression while using context (#3938)

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361
2019-12-09 10:45:35 +08:00
Chao MENG
ddb69232e5 fix(TUP-24749): [7.2.1] issue to download component jar via https proxy (#4167) (#4184)
fix(TUP-24749): [7.2.1] issue to download component jar via https proxy
https://jira.talendforge.org/browse/TUP-24749
2019-12-02 10:52:01 +08:00
jiezhang-tlnd
a4ffd73a24 Jzhang/test patch tps 3491 (#4193)
* kjwang/Fix TUP-24748 CLONE - Modification in Context Variables is not (#4009) (#4047)

propagating to all jobs
https://jira.talendforge.org/browse/TUP-24748

* Jding/test patch tps 3474 (#4170)

* fix(TUP-24732) Studio Code tab doesn't generate code/show errors in Job (#4113)

https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job (#4169)

https://jira.talendforge.org/browse/TUP-24732
2019-12-02 10:45:03 +08:00
Hanna Liashchuk
6bb63c2a6d backport(TPS-3600): tBigQueryBulkExec get error when run with big file (#4190) 2019-11-29 16:51:11 +01:00
AlixMetivier
e7881d1ecd patch(tps-3592): cherry pick (#4189)
* cherry pick

* cherry pick
2019-11-29 15:34:46 +01:00
hwang
8b879dcbbd bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-22 16:17:12 +08:00
hwang
87b860b0b1 Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap"
This reverts commit 9b736bf30a.
2019-11-22 16:12:07 +08:00
hwang
3f5a74d847 Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap"
This reverts commit dd6501d8c6.
2019-11-22 16:11:15 +08:00
hwang
dd6501d8c6 bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-21 22:09:08 +08:00
hwang
9b736bf30a bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-21 22:07:22 +08:00
hcyi
09b2ad8aa6 fix(TUP-25218):tELTXXXMap: Output table : Expression & Column set to
blank if you add a Column without Expression on Mac OS X.
2019-11-15 16:45:02 +08:00
hcyi
245f1c42c2 TPS-3542 : [7.2.1] ELTMap / Teradata connexion fixes (#4136)
* fix(TUP-24885):tELTTeradataMap: Output table : Expression & Column set (#4048)

to blank if you add a Column without Expression.

* fix(TUP-24937):Propagate changes in tELTInput schema to tELTMap.
2019-11-14 11:31:13 +08:00
apoltavtsev
03085d1574 TESB-27110 Missing tSendMail dependencies are added 2019-11-13 09:20:23 +01:00
hwang
5fb4589799 bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job 2019-11-11 15:00:43 +08:00
nrousseau
7a69ed4c4d Nrousseau/tup 24884 backport (#4110)
* bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4042)

bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job

* bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4101)

bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
2019-11-08 14:12:54 +08:00
Zhiwei Xue
a38fec9792 fix(TUP-24323):_tdm folder is missing after build thmap job (#3885) 2019-11-06 15:57:58 +08:00
nrousseau
4cef94aff4 upgrade tacokit 1.1.14 (#4033) 2019-11-04 16:34:11 +08:00
jiezhang-tlnd
09169a8664 fix(TUP-24786)Jobs are failing with the error "Cannot find or load the (#4077) (#4098)
main class" when imported the project export from 6.3 to 7.2
https://jira.talendforge.org/browse/TUP-24786
2019-11-04 15:08:22 +08:00
SunChaoqun
391704ac42 TESB-27139:"Could not find the context Default" is shown in runtime when
deploy a route into runtime



* TESB-27139:"Could not find the context Default" is shown in runtime
when

deploy a route into runtime
2019-11-01 15:56:03 +08:00
Zhiwei Xue
9e693e6f89 fix(TUP-23637):7.x missing local_project for big data spark batch job (#3671) (#3823) 2019-11-01 15:56:01 +08:00
Zhiwei Xue
eee97f1977 Revert "TESB-27123:Context does not transmit to Job called by route in the second call in runtime (#4073)"
This reverts commit 2884b847d5.
2019-11-01 15:55:58 +08:00
hzhao-talendbj
095c79cbf2 fix(TUP-24613)routine section does not allow user to edit required (#4011)
checkbox
2019-11-01 15:47:20 +08:00
SunChaoqun
2884b847d5 TESB-27123:Context does not transmit to Job called by route in the second call in runtime (#4073) 2019-10-28 18:58:52 +08:00
Zhiwei Xue
96d4930a0a fix(TUP-24623):fix regression. 2019-10-24 14:21:09 +08:00
apoltavtsev
e8f2adce2d TESB-26789 Bean called in routelet not found by main route 2019-10-24 11:54:53 +08:00
Zhiwei Xue
34396d7182 fix(TUP-24623):Compilation error on the job with project references (#4010) 2019-10-18 18:30:49 +08:00
hzhao-talendbj
82d238deff fix(TUP-24607)Not able to see the component error in the Studio Designer (#3968)
* fix(TUP-24607)Not able to see the component error in the Studio Designer

* fix(TUP-24607)Not able to see the component error in the Studio Designer
2019-10-18 18:04:22 +08:00
slushatel
4487a6d33e fix(TDI-43010): [ADLSgen2] Short term solution for columns selector i… (#3979)
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field. Refactoring
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field. Add Output component check
(cherry picked from commit 47deaa8326)
2019-10-17 14:53:40 +02:00
hcyi
70469391d8 fix(TUP-24784):Build error with tRunJob on a spark job. (#4025) (#4029) 2019-10-16 17:33:14 +08:00
Denis Sergent
7ea110dc3c TESB-26300: disable message dialog when checking build errors (#3654) (#4019)
* TESB-23600 : do not open dialog anymore when checking errors

* TESB-23600 : refactor/cleanup

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java
2019-10-14 09:08:31 +02:00
jiezhang-tlnd
fcad4148f5 fix(TUP-24392)JDBCInput component not working as expected when values as provided using context (#3875) (#3880)
* fix(TUP-24392)JDBCInput component not working as expected when values as
provided using context
https://jira.talendforge.org/browse/TUP-24392

* fix(TUP-24392)JDBCInput component not working as expected when values as
provided using context
https://jira.talendforge.org/browse/TUP-24392
2019-10-14 14:29:04 +08:00
hwang-talend
ebe98a4d67 bugfix(TUP-23894):Fix all failed junit for both java 8 and 11 #3761 (#3781)
bugfix(TUP-23894):Fix all failed junit for both java 8 and 11
2019-10-11 11:41:25 +08:00
yanbasic
cd23062e30 Revert "TESB-26300: disable message dialog when checking build errors (#3654)"
This reverts commit c9c9d4df22.
2019-10-08 15:14:19 +08:00
hcyi
5990df09b0 fix(TUP-23790):Can't guess schema for metadata (#3692)
item(delimited/positional/regex/excel/ldif/ldap)
2019-10-08 12:05:59 +08:00
hwang-talend
4f5b39d2da bugfix(TUP-24355):Default Context environment appended after migrating (#3927)
* bugfix(TUP-24355):Default Context environment appended after migrating
to 7.2.1
2019-10-08 11:56:19 +08:00
Stéphane Bouchet
c9c9d4df22 TESB-26300: disable message dialog when checking build errors (#3654)
* TESB-23600 : do not open dialog anymore when checking errors

* TESB-23600 : refactor/cleanup

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java
2019-10-07 11:43:03 +02:00
SunChaoqun
9f4d4fc832 TESB-27079:Data Service Micro-service is failing from TMC (#3983) 2019-09-27 20:47:47 +08:00
Mike Yan
cc93b9959b fix(TESB-27046): Job run failed with pure DI license in studio (#3966) 2019-09-24 15:24:19 +08:00
hcyi
94e2442e11 fix(TUP-24084):Change the display of the new Couchbase component names. (#3934) 2019-09-23 15:23:30 +08:00
hwang-talend
079ce620ab bugfix(TUP-23967):Studio can't run jobs when path has spaces, Windows 10 (#3768) (#3789)
bugfix(TUP-23967):Studio can't run jobs when path has spaces, Windows 10
2019-09-23 15:20:26 +08:00
hcyi
535af6359e fix(TUP-23264):Studio can't find dependencies for tacokit components. 2019-09-23 15:20:24 +08:00
jiezhang-tlnd
0544da1147 Jzhang/maintenance72/bugfix/tup 22646 path in textbox of to archive file is incomplete when building job (#3960)
* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when building job (#3931)

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when
building job
https://jira.talendforge.org/browse/TUP-22646

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when
building job
https://jira.talendforge.org/browse/TUP-22646

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when (#3857)

building job
https://jira.talendforge.org/browse/TUP-22646
2019-09-23 14:47:33 +08:00
Laurent BOURGEOIS
bdb27eaf55 fix(TBD-9137) : tBigQueryInput does not support backtick in query (#3953) 2019-09-20 17:08:13 +02:00
hwang
c4b9def853 bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx
components
2019-09-18 14:16:37 +08:00
hwang
9b31f616f7 Revert "bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx (#3906)"
This reverts commit 3c8552e58c.
2019-09-18 14:15:56 +08:00
hwang-talend
3c8552e58c bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx (#3906)
bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx components
2019-09-16 13:37:53 +08:00
heng zhao
81f603037b feat(TUP-24028)Add Azure datacenter part of the studio connection 2019-09-12 13:47:28 +08:00
hzhao-talendbj
3c9ff7e553 Hengzhao/backportpatch721/tup 24028 add azure datacenter part of the studio connection (#3910)
* feat(TUP-24028)Add Azure datacenter part of the studio connection

* feat(TUP-24028)Add Azure datacenter part of the studio connection

* feat(TUP-24028)Add Azure datacenter part of the studio connection
2019-09-09 15:21:47 +08:00
hcyi
6611515bd6 fix(TUP-23743):ERROR when Job in MDM project calling Job in Reference DI (#3709)
project:import routines.DataQuality cannot be resolved.
2019-08-26 11:49:10 +08:00
SunChaoqun
66dfb4f0bf TESB-26736:DS OSGi bundles are failing on runtime after the docker patch 2019-08-15 16:30:20 +08:00
yanbasic
75b74d2c17 fix(TESB-24597): Fixed OSGi job build missing OSGI-INF folder issue 2019-08-14 18:07:41 +08:00
SunChaoqun
92e5a0801d TESB-26736:DS OSGi bundles are failing on runtime after the docker patch 2019-08-13 19:22:39 +08:00
SunChaoqun
62ce41a0e9 TESB-24597 Docker Support for Microservice - CI Part (#3797)
* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part (#3782)
2019-08-07 18:17:49 +08:00
apoltavtsev
aa9c2b08b9 TESB-26293 Duplicated libraries in private & import packages of the build manifest file 2019-07-15 11:26:07 +08:00
kjwang-talend
37c58a98cd kjwang/Fix TUP-23809 changes in column
Fix TUP-23809 [Studio] changes in column order are not saved (no
propagate changes dialog)
https://jira.talendforge.org/browse/TUP-23809
2019-07-15 10:34:31 +08:00
nrousseau
9c31c2869d fix(TDI-42522) add option to deactivate component log 2019-06-19 18:58:02 +08:00
Jane Ding
e91f8c1b5d fix(TUP-23506)Job use tsapconnection component run fail when use the (#3623) (#3633)
* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14.
https://jira.talendforge.org/browse/TUP-23506

* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14.
https://jira.talendforge.org/browse/TUP-23506

* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14
https://jira.talendforge.org/browse/TUP-23506
2019-06-18 14:22:33 +08:00
hwang-talend
6d16ec2e3e bugfix(TUP-23510):There is compile error job in TDI demo project (#3632)
* bugfix(TUP-23510):There is compile error job in TDI demo project

* bugfix(TUP-23510):There is compile error job in TDI demo project (#3628)
2019-06-18 12:11:46 +08:00
Chao MENG
d5dfa732da Cmeng/backport/7.2.1/tup 20054 tck refresh issue (#3624)
* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* main/plugins/org.talend.sdk.component.studio-integration/src/main/java/org/talend/sdk/component/studio/ui/wizard/TaCoKitConfigurationWizard.java

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* Cmeng/bugfix/tup 20054 fix junit issue (#3627)

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

Fix junit issue

* add junit source

* add junit source

* fix(TUP-20054): Due to checking fields it is hard to type (#3630)

credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

Fix junit issue
2019-06-18 11:29:06 +08:00
Antoine Parent
49d093c671 fix(): typo in a pattern (#3626)
fix a pattern used to display job status
2019-06-17 16:46:08 +02:00
Jenkins Continuous Build server
0f3b302525 Set version to 7.2.1 2019-06-14 11:49:03 +02:00
273 changed files with 5453 additions and 1307 deletions

58
PATCH_RELEASE_NOTE.md Normal file
View 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}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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;
}
%>
}
}
%>
}
<%
}
<%}%>
<%
}
}
}
}
%>

View File

@@ -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);

View File

@@ -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*/%>

View File

@@ -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)

View File

@@ -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>

View File

@@ -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());

View File

@@ -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());
}

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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){

View File

@@ -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;
<%

View File

@@ -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);

View File

@@ -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();

View File

@@ -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;

View File

@@ -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

View File

@@ -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() });
<%}%>

View File

@@ -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>

View File

@@ -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){

View File

@@ -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 ";
%>

View File

@@ -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"

View File

@@ -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)

View File

@@ -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();

View File

@@ -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>

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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));
}
}
}

View File

@@ -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);

View File

@@ -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

View File

@@ -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) {

View File

@@ -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);
}
}

View File

@@ -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>

View File

@@ -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.

View File

@@ -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();
}
}

View File

@@ -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);

View File

@@ -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;
}
/*

View File

@@ -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
}
}

View File

@@ -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 ".";
}
}

View File

@@ -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();
}

View File

@@ -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)
*

View File

@@ -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 "#";
}
}

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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() {

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);
}
}
}
}

View File

@@ -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();
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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