Compare commits

...

108 Commits

Author SHA1 Message Date
wang wei
79bd65e0ff fix(TDI-43670): tSSH component hangs if Command takes time to complete 2020-06-19 14:37:38 +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
266 changed files with 3593 additions and 1045 deletions

57
PATCH_RELEASE_NOTE.md Normal file
View File

@@ -0,0 +1,57 @@
---
version: 7.2.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-4158
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20200619\_TPS-4158\_v1-7.2.1 |
| Release Date | 2020-06-19 |
| 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-4158 [7.2.1] tSSH component hangs if Command takes time to complete (TDI-43670)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 7.2.1 must be installed.
## Installation
### Installing the patch using Software update
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
### Installing the patch using Talend Studio
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
### Installing the patch using Commandline
Execute the following commands:
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.abstractmap.nl</artifactId> <artifactId>org.talend.designer.abstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId> <artifactId>org.talend.designer.alfrescooutput.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.business.diagram.nl</artifactId> <artifactId>org.talend.designer.business.diagram.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.codegen.nl</artifactId> <artifactId>org.talend.designer.codegen.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.components.exchange.nl</artifactId> <artifactId>org.talend.designer.components.exchange.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.core.nl</artifactId> <artifactId>org.talend.designer.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.dbmap.nl</artifactId> <artifactId>org.talend.designer.dbmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.documentation.nl</artifactId> <artifactId>org.talend.designer.documentation.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId> <artifactId>org.talend.designer.fileoutputxml.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId> <artifactId>org.talend.designer.gefabstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.mapper.nl</artifactId> <artifactId>org.talend.designer.mapper.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.maven.job.nl</artifactId> <artifactId>org.talend.designer.maven.job.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.rowgenerator.nl</artifactId> <artifactId>org.talend.designer.rowgenerator.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.runprocess.nl</artifactId> <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. ShadowProcess.notGeneratedOutputException=Sortie non g\u00E9n\u00E9r\u00E9e.
ProcessComposite.contextGroup=Contexte ProcessComposite.contextGroup=Contexte
prefs.clientConfiguration=Configuration du client Talend 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}) ProcessView.title=Ex\u00E9cuter({0})
Processor.configurePerl=L'interpr\u00E9teur Perl n'est pas configur\u00E9. Processor.configurePerl=L'interpr\u00E9teur Perl n'est pas configur\u00E9.
JavaProcessor.notFoundedFolderException=Dossier introuvable dans le projet .Java JavaProcessor.notFoundedFolderException=Dossier introuvable dans le projet .Java

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.scd.nl</artifactId> <artifactId>org.talend.designer.scd.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.webservice.nl</artifactId> <artifactId>org.talend.designer.webservice.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.xmlmap.nl</artifactId> <artifactId>org.talend.designer.xmlmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.expressionbuilder.nl</artifactId> <artifactId>org.talend.expressionbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId> <artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId> <artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.repository.ftp.nl</artifactId> <artifactId>org.talend.repository.ftp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.repository.json.nl</artifactId> <artifactId>org.talend.repository.json.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.repository.nl</artifactId> <artifactId>org.talend.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.repository.view.di.nl</artifactId> <artifactId>org.talend.repository.view.di.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.sbi.engines.client.nl</artifactId> <artifactId>org.talend.sbi.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.spagic.engines.client.nl</artifactId> <artifactId>org.talend.spagic.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.sqlbuilder.nl</artifactId> <artifactId>org.talend.sqlbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.business.feature</artifactId> <artifactId>org.talend.designer.business.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.feature</artifactId> <artifactId>org.talend.designer.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.fragment.jars.di.feature</artifactId> <artifactId>org.talend.fragment.jars.di.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.rcp.branding.tos.feature</artifactId> <artifactId>org.talend.rcp.branding.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId> <artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.repository.feature</artifactId> <artifactId>org.talend.repository.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.sbi.feature</artifactId> <artifactId>org.talend.sbi.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.spagic.feature</artifactId> <artifactId>org.talend.spagic.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.tos.components.feature</artifactId> <artifactId>org.talend.tos.components.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.tos.core.feature</artifactId> <artifactId>org.talend.tos.core.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.tos.feature</artifactId> <artifactId>org.talend.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.tos.libraries.feature</artifactId> <artifactId>org.talend.tos.libraries.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.abstractmap</artifactId> <artifactId>org.talend.designer.abstractmap</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.alfrescooutput</artifactId> <artifactId>org.talend.designer.alfrescooutput</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.business.diagram</artifactId> <artifactId>org.talend.designer.business.diagram</artifactId>

View File

@@ -584,7 +584,16 @@
} //endIf } //endIf
%> %>
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>"); 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")) { if (ctxParam.getType().equals("id_Password")) {
%> %>
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>"); String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
@@ -602,13 +611,7 @@
} }
} }
<% <%
continue; } else if(typeToGenerate.equals("java.util.Date")) {
}
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")) {
%> %>
try{ try{
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>"); String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
@@ -667,6 +670,10 @@
} }
<% <%
} }
%>
<%//{B1 block%>
}
<%
} }
%> %>
} <%/*close last method*/%> } <%/*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) for (IContextParameter ctxParam :params)

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.codegen</artifactId> <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.model.CodeGeneratorInternalTemplatesFactoryProvider;
import org.talend.designer.codegen.proxy.JetProxy; import org.talend.designer.codegen.proxy.JetProxy;
import org.talend.designer.core.generic.model.Component; import org.talend.designer.core.generic.model.Component;
import org.talend.designer.runprocess.ProcessorUtilities;
/** /**
* CodeGenerator. * CodeGenerator.
@@ -353,8 +354,12 @@ public class CodeGenerator implements ICodeGenerator {
.getDefault().getService(IResourcesDependenciesService.class); .getDefault().getService(IResourcesDependenciesService.class);
String resourcePathForContext = null; String resourcePathForContext = null;
if (process instanceof IProcess2) { if (process instanceof IProcess2) {
resourcePathForContext = resourceService.getResourcePathForContext(process, String value = contextPar.getValue();
contextPar.getValue()); // for runtime
if (!ProcessorUtilities.isExportConfig()) {
contextPar.setType(JavaTypesManager.FILE.getId());
}
resourcePathForContext = resourceService.getResourcePathForContext(process, value);
} else { } else {
// for PreviewFileInputContentDataProcess run // for PreviewFileInputContentDataProcess run
resourcePathForContext = resourceService.getResourceItemFilePath(contextPar.getValue()); 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 { private void syncRoutineItems(Collection<RoutineItem> routineObjects, boolean forceUpdate) throws SystemException {
for (RoutineItem routineItem : routineObjects) { for (RoutineItem routineItem : routineObjects) {
syncRoutine(routineItem, true, true, forceUpdate); syncRoutine(routineItem, true, forceUpdate);
} }
syncSystemRoutine(ProjectManager.getInstance().getCurrentProject()); syncSystemRoutine(ProjectManager.getInstance().getCurrentProject());
} }

View File

@@ -28,9 +28,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Lock; 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.ComponentManager;
import org.talend.core.model.components.ComponentProviderInfo; import org.talend.core.model.components.ComponentProviderInfo;
import org.talend.core.model.components.ComponentUtilities; 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.IComponent;
import org.talend.core.model.components.IComponentsFactory; import org.talend.core.model.components.IComponentsFactory;
import org.talend.core.model.components.IComponentsHandler; import org.talend.core.model.components.IComponentsHandler;
@@ -838,23 +837,21 @@ public class ComponentsFactory implements IComponentsFactory {
init(false); init(false);
} }
for (IComponent comp : componentList) { // check if reference joblet component presents
if (comp.getComponentType() != EComponentType.JOBLET) { JobletUtil jobletUtils = new JobletUtil();
continue; Optional<IComponent> result = jobletUtils.findComponentByName(componentList, name, paletteType);
} if (!result.isPresent()) {
String comName = comp.getName(); // check if any name matching joblet component presents
if (comp != null && paletteType.equals(comp.getPaletteType())) { if (jobletUtils.matchExpression(name)) {
if (comName.equals(name)) { name = StringUtils.substringAfterLast(name, ":"); //$NON-NLS-1$
return comp; if (StringUtils.isNotBlank(name)) {
} else if (new JobletUtil().matchExpression(comName)) { result = jobletUtils.findComponentByName(componentList, name, paletteType);
String[] names = comName.split(":"); //$NON-NLS-1$
comName = names[1];
if (comName.equals(name)) {
return comp;
}
} }
} }
} }
if (result.isPresent()) {
return result.get();
}
return null; return null;
} }

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.components.exchange</artifactId> <artifactId>org.talend.designer.components.exchange</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.components.libs</artifactId> <artifactId>org.talend.designer.components.libs</artifactId>

View File

@@ -569,17 +569,18 @@
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>); loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder(); com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
csvOptions_<%=cid%>.setAllowQuotedNewLines(true); csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
csvOptions_<%=cid%>.setSkipLeadingRows(<%=ElementParameterParser.getValue(node, "__GS_FILE_HEADER__")%>);
<%if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) { <%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"); loadJobBuilder_<%=cid%>.setNullMarker("\\N");
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build())); 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 (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {
<% <%
if(isLog4jEnabled){ if(isLog4jEnabled){

View File

@@ -221,10 +221,9 @@
} }
String query_<%=cid%> = <%=query%>; String query_<%=cid%> = <%=query%>;
String dataset = query_<%=cid%>.substring(query_<%=cid%>.indexOf("from") + 4, query_<%=cid%>.indexOf(".")).trim(); <% if(isLog4jEnabled) { %>
String temp_table = "temp_" + dataset + java.util.UUID.randomUUID().toString().replaceAll("-", "") log.info("<%=cid%> - query " + <%=query%>);
+ "<%=cid%>".toLowerCase().replaceAll("[^a-z0-9]", "0").replaceAll("^[^a-z]", "a") <% } %>
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
com.google.cloud.bigquery.BigQuery bigquery_<%=cid%> = com.google.cloud.bigquery.BigQueryOptions.newBuilder() com.google.cloud.bigquery.BigQuery bigquery_<%=cid%> = com.google.cloud.bigquery.BigQueryOptions.newBuilder()
.setCredentials(credentials_<%=cid%>) .setCredentials(credentials_<%=cid%>)
@@ -233,25 +232,55 @@
.getService(); .getService();
com.google.cloud.bigquery.QueryJobConfiguration.Builder queryConfiguration_<%=cid%> = com.google.cloud.bigquery.QueryJobConfiguration.newBuilder(<%=query%>).setUseLegacySql(<%=useLegacySql%>); 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 (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {%>
if(isLog4jEnabled){
%> 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%>); log.info("<%=cid%> - Sending job " + jobId_<%=cid%> + " with query: " + <%=query%>);
<% <% } %>
}
%>
job_<%=cid%> = job_<%=cid%>.waitFor(); job_<%=cid%> = job_<%=cid%>.waitFor();
if (job_<%=cid%> == null) { if (job_<%=cid%> == null) {
@@ -260,13 +289,9 @@
throw new RuntimeException(job_<%=cid%>.getStatus().getError().toString()); throw new RuntimeException(job_<%=cid%>.getStatus().getError().toString());
} }
<% <% if(isLog4jEnabled) { %>
if(isLog4jEnabled){
%>
log.info("<%=cid%> - Job " + jobId_<%=cid%> + " finished successfully."); log.info("<%=cid%> - Job " + jobId_<%=cid%> + " finished successfully.");
<% <% } %>
}
%>
com.google.cloud.bigquery.TableResult result_<%=cid%> = job_<%=cid%>.getQueryResults(); com.google.cloud.bigquery.TableResult result_<%=cid%> = job_<%=cid%>.getQueryResults();
long nb_line_<%=cid%> = 0; long nb_line_<%=cid%> = 0;
<% <%

View File

@@ -10,7 +10,10 @@ imports="
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument(); INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName(); 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")) { if (authMode.equals("OAUTH")) {
%> %>
} }
@@ -24,7 +27,10 @@ imports="
} else if (authMode.equals("SERVICEACCOUNT")) { } 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 { } else {
throw new IllegalArgumentException("authentication mode should be either \"SERVICEACCOUNT\" or \"OAUTH\", but it is " + authMode); throw new IllegalArgumentException("authentication mode should be either \"SERVICEACCOUNT\" or \"OAUTH\", but it is " + authMode);

View File

@@ -13,9 +13,22 @@
INode node = (INode)codeGenArgument.getArgument(); INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName(); String cid = node.getUniqueName();
String confLib = ElementParameterParser.getValue(node, "__CONF_LIB__"); 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%> { 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%>(); DealJobLibrary_<%=cid%> dealJobLibrary = new DealJobLibrary_<%=cid%>();
String confJarName = dealJobLibrary.getConfJarName(<%=confLib %>, this.contextStr); String confJarName = dealJobLibrary.getConfJarName(<%=confLib %>, this.contextStr);
String libPath_<%=cid %> = "";
<%if (ProcessorUtilities.isExportConfig()) {%> <%if (ProcessorUtilities.isExportConfig()) {%>
libPath_<%=cid %> = "../lib/" + confJarName; libPath_<%=cid %> = "../lib/" + confJarName;
<%} else { <%} else {
@@ -90,6 +98,11 @@ String libPath_<%=cid %> = "";
libPath_<%=cid %> = new java.io.File("<%=libFolder %>/" + confJarName).getAbsolutePath(); libPath_<%=cid %> = new java.io.File("<%=libFolder %>/" + confJarName).getAbsolutePath();
<%}%> <%}%>
libPath_<%=cid %> = dealJobLibrary.replaceJarPathsFromCrcMap(libPath_<%=cid %>); 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() }); method_<%=cid %>.invoke(currentLoader<%=cid %>, new Object[] { new java.io.File(libPath_<%=cid %>).toURL() });
<%}%> <%}%>

View File

@@ -42,6 +42,12 @@
> >
<DEFAULT></DEFAULT> <DEFAULT></DEFAULT>
</PARAMETER> </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> </PARAMETERS>
<CODEGENERATION></CODEGENERATION> <CODEGENERATION></CODEGENERATION>

View File

@@ -189,4 +189,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
} }
%> %>
StringBuilder stringStdout_<%=cid%> =new StringBuilder(); StringBuilder stringStdout_<%=cid%> =new StringBuilder();
StringBuilder stringStderr_<%=cid%> =new StringBuilder(); StringBuilder stringStderr_<%=cid%> =new StringBuilder();
String out_content_<%=cid%> = null;
String err_content_<%=cid%> = null;

View File

@@ -23,7 +23,7 @@ imports="
if("TO_CONSOLE".equals(standardOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(standardOutput)){ if("TO_CONSOLE".equals(standardOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(standardOutput)){
%> %>
if(stringStdout_<%=cid%>.length() > 0) { if(stringStdout_<%=cid%>.length() > 0) {
System.out.println(stringStdout_<%=cid%>.toString()); System.out.println(out_content_<%=cid%>);
} }
<% <%
} }
@@ -31,7 +31,7 @@ imports="
if("TO_CONSOLE".equals(errorOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(errorOutput)){ if("TO_CONSOLE".equals(errorOutput) || "TO_CONSOLE_AND_GLOBAL_VARIABLE".equals(errorOutput)){
%> %>
if(stringStderr_<%=cid%>.length() > 0) { if(stringStderr_<%=cid%>.length() > 0) {
System.out.println(stringStderr_<%=cid%>.toString()); System.out.println(err_content_<%=cid%>);
} }
<% <%
} }

View File

@@ -77,7 +77,9 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
<% <%
} }
%> %>
java.io.InputStream stdout_<%=cid%> = sess_<%=cid%>.getStdout(); java.io.InputStream stdout_<%=cid%> = new ch.ethz.ssh2.StreamGobbler(sess_<%=cid%>.getStdout());
java.io.InputStream stderr_<%=cid%> = new ch.ethz.ssh2.StreamGobbler(sess_<%=cid%>.getStderr());
java.io.BufferedReader brout_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stdout_<%=cid%>)); java.io.BufferedReader brout_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stdout_<%=cid%>));
String line_<%=cid%> = ""; String line_<%=cid%> = "";
@@ -91,7 +93,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
brout_<%=cid%>.close(); brout_<%=cid%>.close();
stdout_<%=cid%>.close(); stdout_<%=cid%>.close();
java.io.InputStream stderr_<%=cid%> = sess_<%=cid%>.getStderr();
java.io.BufferedReader breer_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stderr_<%=cid%>)); java.io.BufferedReader breer_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stderr_<%=cid%>));
String line1_<%=cid%> = ""; String line1_<%=cid%> = "";
@@ -110,37 +111,41 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
/* Close this session */ /* Close this session */
sess_<%=cid%>.close(); sess_<%=cid%>.close();
out_content_<%=cid%> = stringStdout_<%=cid%>.toString();
err_content_<%=cid%> = stringStderr_<%=cid%>.toString();
<%if(isLog4jEnabled){%> <%if(isLog4jEnabled){%>
log.debug("<%=cid%> - Command line standard result: " + stringStdout_<%=cid%>.toString()); log.debug("<%=cid%> - Command line standard result: " + out_content_<%=cid%>);
log.debug("<%=cid%> - Command line error result: " + stringStderr_<%=cid%>.toString()); log.debug("<%=cid%> - Command line error result: " + err_content_<%=cid%>);
<%}%> <%}%>
<% <%
//-----begin to handle output //-----begin to handle output
if(("TO_GLOBAL_VARIABLE").equals(standardOutput)){ if(("TO_GLOBAL_VARIABLE").equals(standardOutput)){
%> %>
globalMap.put("<%=cid %>_STDOUT", stringStdout_<%=cid%>.toString()); globalMap.put("<%=cid %>_STDOUT", out_content_<%=cid%>);
<% <%
}else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(standardOutput)){ }else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(standardOutput)){
%> %>
globalMap.put("<%=cid %>_STDOUT", stringStdout_<%=cid%>.toString()); globalMap.put("<%=cid %>_STDOUT", out_content_<%=cid%>);
<% <%
}else if(("NORMAL_OUTPUT").equals(standardOutput)){ }else if(("NORMAL_OUTPUT").equals(standardOutput)){
%> %>
output_<%=cid%>.add(stringStdout_<%=cid%>.toString()); output_<%=cid%>.add(out_content_<%=cid%>);
stringStdout_<%=cid%>.delete(0,stringStdout_<%=cid%>.length()); stringStdout_<%=cid%>.delete(0,stringStdout_<%=cid%>.length());
<% <%
} }
if(("TO_GLOBAL_VARIABLE").equals(errorOutput)){ if(("TO_GLOBAL_VARIABLE").equals(errorOutput)){
%> %>
globalMap.put("<%=cid %>_STDERR", stringStderr_<%=cid%>.toString()); globalMap.put("<%=cid %>_STDERR", err_content_<%=cid%>);
<% <%
}else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(errorOutput)){ }else if(("TO_CONSOLE_AND_GLOBAL_VARIABLE").equals(errorOutput)){
%> %>
globalMap.put("<%=cid %>_STDERR", stringStderr_<%=cid%>.toString()); globalMap.put("<%=cid %>_STDERR", err_content_<%=cid%>);
<% <%
}else if(("NORMAL_OUTPUT").equals(errorOutput)){ }else if(("NORMAL_OUTPUT").equals(errorOutput)){
%> %>
output_<%=cid%>.add(stringStderr_<%=cid%>.toString()); output_<%=cid%>.add(err_content_<%=cid%>);
stringStderr_<%=cid%>.delete(0, stringStderr_<%=cid%>.length()); stringStderr_<%=cid%>.delete(0, stringStderr_<%=cid%>.length());
<% <%
} }

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("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"); mc_<%=cid%>.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
javax.activation.CommandMap.setDefaultCommandMap(mc_<%=cid%>); 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 -- // -- Send the message --
javax.mail.Transport.send(msg_<%=cid %>); javax.mail.Transport.send(msg_<%=cid %>);
} catch(java.lang.Exception e){ } catch(java.lang.Exception e){

View File

@@ -106,7 +106,12 @@
REQUIRED="false" NUM_ROW="11"> REQUIRED="false" NUM_ROW="11">
<DEFAULT>true</DEFAULT> <DEFAULT>true</DEFAULT>
</PARAMETER> </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" <PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'"> SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT> <DEFAULT>false</DEFAULT>
@@ -173,6 +178,8 @@
TARGET="Out.CREATE" /> TARGET="Out.CREATE" />
<TEMPLATE_PARAM SOURCE="self.CREATE_EMPTY_ELEMENT" <TEMPLATE_PARAM SOURCE="self.CREATE_EMPTY_ELEMENT"
TARGET="Out.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" <TEMPLATE_PARAM SOURCE="self.EXPAND_EMPTY_ELM"
TARGET="Out.EXPAND_EMPTY_ELM" /> TARGET="Out.EXPAND_EMPTY_ELM" />
<TEMPLATE_PARAM SOURCE="self.OUTPUT_AS_XSD" <TEMPLATE_PARAM SOURCE="self.OUTPUT_AS_XSD"

View File

@@ -43,4 +43,5 @@ SCHEMA.NAME=Schema
THOUSANDS_SEPARATOR.NAME=Thousands separator THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column XMLFIELD.NAME=Output Column
XSD_FILE.NAME=XSD file path 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) 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 removeHeader = ElementParameterParser.getValue(node, "__REMOVE_HEADER__"); // add for feature7788
String encoding = ElementParameterParser.getValue(node, "__ENCODING__"); String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
boolean isAllowEmpty = ("true").equals(ElementParameterParser.getValue(node, "__CREATE_EMPTY_ELEMENT__")); 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__")); boolean expandEmptyElm = ("true").equals(ElementParameterParser.getValue(node, "__EXPAND_EMPTY_ELM__"));
String mode = ElementParameterParser.getValue(node, "__GENERATION_MODE__"); String mode = ElementParameterParser.getValue(node, "__GENERATION_MODE__");
List<Map<String, String>> rootTable = List<Map<String, String>> rootTable =
@@ -200,6 +201,18 @@ java.util.Map<String,String> arraysValueMap_<%=cid%> = new java.util.HashMap<Str
%> %>
class NestXMLTool_<%=cid%>{ 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){ public void parseAndAdd(org.dom4j.Element nestRoot, String value){
try { try {
org.dom4j.Document doc4Str = org.dom4j.DocumentHelper.parseText("<root>"+ value + "</root>"); 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()) { for (org.dom4j.Element tmp: (java.util.List<org.dom4j.Element>) root.elements()) {
removeEmptyElement(tmp); removeEmptyElement(tmp);
} }
if (root.content().size() == 0
&& root.attributes().size() == 0 boolean noSignificantDataAnnotationsExist = root.attributes().isEmpty() <%if (!isAllowEmpty && ignoreServiceAttributes) {%>|| isOnlyServiceAttributesDeclared(root.attributes()) <% } %>;
&& root.declaredNamespaces().size() == 0) { if (root.content().isEmpty()
if(root.getParent()!=null){ && noSignificantDataAnnotationsExist && root.declaredNamespaces().isEmpty()) {
root.getParent().remove(root); 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){ public String objectToString(Object value){
if(value.getClass().isArray()){ if(value.getClass().isArray()){
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View File

@@ -99,6 +99,11 @@
<DEFAULT>true</DEFAULT> <DEFAULT>true</DEFAULT>
</PARAMETER> </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" <PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'"> SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT> <DEFAULT>false</DEFAULT>

View File

@@ -44,5 +44,6 @@ THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column XMLFIELD.NAME=Output Column
XML_FIELD.NAME=XML Field XML_FIELD.NAME=XML Field
XSD_FILE.NAME=XSD file path 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) EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)
COMPACT_FORMAT.NAME = Compact Format COMPACT_FORMAT.NAME = Compact Format

View File

@@ -35,6 +35,7 @@ imports="
%> %>
String driverClass_<%=cid%> = "<%=this.getDirverClassName(node)%>"; String driverClass_<%=cid%> = "<%=this.getDirverClassName(node)%>";
java.lang.Class jdbcclazz_<%=cid%> = java.lang.Class.forName(driverClass_<%=cid%>); java.lang.Class jdbcclazz_<%=cid%> = java.lang.Class.forName(driverClass_<%=cid%>);
globalMap.put("driverClass_<%=cid%>", driverClass_<%=cid%>);
<% <%
newInstance(node); newInstance(node);
} }

View File

@@ -165,6 +165,12 @@ imports="
close_begin(); close_begin();
%> %>
conn_<%=cid%>.close(); 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(); close_end();
} }

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.components.localprovider</artifactId> <artifactId>org.talend.designer.components.localprovider</artifactId>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.core.generic</artifactId> <artifactId>org.talend.designer.core.generic</artifactId>

View File

@@ -16,6 +16,7 @@ import java.beans.PropertyChangeEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.gef.commands.Command; import org.eclipse.gef.commands.Command;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
@@ -126,7 +127,9 @@ public class ButtonController extends AbstractElementPropertySectionController {
continue; continue;
} }
for(String path : listString){ 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++) { for (int j = 0; j < param.getListItemsValue().length; j++) {
if (((CCombo) ctrl).getText().equals(param.getListItemsDisplayName()[j])) { if (((CCombo) ctrl).getText().equals(param.getListItemsDisplayName()[j])) {
value = (String) param.getListItemsValue()[j]; value = (String) param.getListItemsValue()[j];
if (j == 0 && (boolean) ((ElementParameter) propertyParameter) if (j == 0) {
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW)) {
// The first item in the combo is // The first item in the combo is
// this component // this component
props.referenceType props.referenceType
.setValue(ComponentReferenceProperties.ReferenceType.THIS_COMPONENT); .setValue(ComponentReferenceProperties.ReferenceType.THIS_COMPONENT);
props.componentInstanceId.setValue(null); props.componentInstanceId.setValue(null);
props.setReference(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 { } else {
props.referenceType props.referenceType
.setValue(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE); .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, //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 //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 //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)) { if (GenericTypeUtils.isSchemaType(property)) {
// Handles embedded escaped quotes which might occur // 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.PropertyChangeListener;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.net.ProxySelector;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean; 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.exception.ExceptionHandler;
import org.talend.commons.ui.gmf.util.DisplayUtils; import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.commons.ui.swt.dialogs.ErrorDialogWidthDetailArea; 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.component.Connector;
import org.talend.components.api.properties.ComponentProperties; import org.talend.components.api.properties.ComponentProperties;
import org.talend.components.api.service.ComponentService; import org.talend.components.api.service.ComponentService;
@@ -498,11 +500,27 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
monitor.beginTask(taskName, IProgressMonitor.UNKNOWN); monitor.beginTask(taskName, IProgressMonitor.UNKNOWN);
try { try {
exceptionResult = null; 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(); 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) { } catch (Throwable e) {
result.set(false); result.set(false);
exceptionResult = new InvocationTargetException(e); exceptionResult = new InvocationTargetException(e);
throw exceptionResult; 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); result.set(true);
} }
@@ -568,6 +586,7 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
this.drivedByForm = drivedByForm; this.drivedByForm = drivedByForm;
} }
@Override
public Property getProperty() { public Property getProperty() {
NamedThing content = widget.getContent(); NamedThing content = widget.getContent();
if (content instanceof Property) { 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.component.ComponentDefinition;
import org.talend.components.api.properties.ComponentProperties; import org.talend.components.api.properties.ComponentProperties;
import org.talend.components.api.properties.ComponentReferenceProperties; 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.EParameterFieldType;
import org.talend.core.model.process.IElementParameter; import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode; import org.talend.core.model.process.INode;
import org.talend.core.runtime.services.IGenericService; import org.talend.core.runtime.services.IGenericService;
import org.talend.daikon.properties.Properties; 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.model.GenericElementParameter;
import org.talend.designer.core.generic.utils.ComponentsUtils; import org.talend.designer.core.generic.utils.ComponentsUtils;
@@ -109,4 +111,9 @@ public class GenericService implements IGenericService {
return null; return null;
} }
@Override
public boolean isTcompv0(IComponent component) {
return Component.class.isInstance(component);
}
} }

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.talend.studio</groupId> <groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId> <artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version> <version>7.2.1</version>
<relativePath>../../../</relativePath> <relativePath>../../../</relativePath>
</parent> </parent>
<artifactId>org.talend.designer.core</artifactId> <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.checkVersion=Check only the last version when updating jobs or joblets
PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts
PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection. PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection.
PerformancePreferencePage.propagateContext=Propagate add context groups in repository contexts
PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds) PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds)
PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema) PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema)
PerformancePreferencePage.HBaseOrMaprDBScanLimitTip=If set it by zero, will be same as deactiving the limit. 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.problems.Problems;
import org.talend.designer.core.ui.views.properties.ComponentSettings; import org.talend.designer.core.ui.views.properties.ComponentSettings;
import org.talend.designer.core.ui.views.properties.ComponentSettingsView; 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.JavaProcessUtil;
import org.talend.designer.core.utils.UnifiedComponentUtil; import org.talend.designer.core.utils.UnifiedComponentUtil;
import org.talend.designer.runprocess.ProcessorException; import org.talend.designer.runprocess.ProcessorException;
@@ -874,4 +875,9 @@ public class DesignerCoreService implements IDesignerCoreService {
} }
return false; 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.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ArrayUtils;
import org.talend.commons.ui.runtime.exception.ExceptionHandler; import org.apache.commons.lang3.StringUtils;
import org.talend.commons.utils.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.commons.utils.system.EnvironmentUtils;
import org.talend.core.PluginChecker; import org.talend.core.PluginChecker;
import org.talend.core.language.LanguageManager; 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.IElement;
import org.talend.core.model.process.IElementParameter; import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode; 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.DistributionFactory;
import org.talend.hadoop.distribution.ESparkVersion; import org.talend.hadoop.distribution.ESparkVersion;
import org.talend.hadoop.distribution.spark.SparkVersionUtil; 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> * 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 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) { private Expression(String expressionString) {
this.expressionString = expressionString; this.expressionString = expressionString;
@@ -145,14 +175,15 @@ public final class Expression {
} }
public static boolean isThereCondition(String expression, String condition) { protected static boolean isThereCondition(String expression, String condition) {
// example for the reg exp: (.*)[')][ ]*or[ ]*[\w(](.*) expression = expression.toLowerCase();
String refixReg = "(.*)[') ][ ]*"; //$NON-NLS-1$ if (!expression.contains(condition)) {
String suffixReg = "[ ]*[ (](.*)"; //$NON-NLS-1$ return false;
if (expression.matches(refixReg + condition + suffixReg)) { }
if (AND.equals(condition) && conditionMatcher.matches(expression, andPattern)) {
return true; return true;
} }
if (expression.matches(refixReg + condition.toUpperCase() + suffixReg)) { if (OR.equals(condition) && conditionMatcher.matches(expression, orPattern)) {
return true; return true;
} }
return false; return false;
@@ -784,13 +815,15 @@ public final class Expression {
// should be private, but need to unitary tested // should be private, but need to unitary tested
public static boolean evaluateSparkVersion(String simpleExpression, List<? extends IElementParameter> listParam, public static boolean evaluateSparkVersion(String simpleExpression, List<? extends IElementParameter> listParam,
ElementParameter currentParam) { ElementParameter currentParam) {
if (!simpleExpression.contains(sparkVersionPrefix)) {
return false;
}
INode node = retrieveNodeElementFromParameter(currentParam, listParam); INode node = retrieveNodeElementFromParameter(currentParam, listParam);
ESparkVersion version = SparkVersionUtil.getSparkVersion(node); ESparkVersion version = SparkVersionUtil.getSparkVersion(node);
if (version == null) { if (version == null) {
return false; return false;
} }
Pattern p = java.util.regex.Pattern.compile("(lt|le|gt|ge|eq|ne)\\s*'(SPARK_.*)'"); //$NON-NLS-1$ Matcher m = sparkVersionPattern.matcher(simpleExpression);
Matcher m = p.matcher(simpleExpression);
if (m.find()) { if (m.find()) {
ESparkVersion versionToTest = ESparkVersion.valueOf(m.group(2)); ESparkVersion versionToTest = ESparkVersion.valueOf(m.group(2));
switch (m.group(1)) { switch (m.group(1)) {
@@ -836,7 +869,7 @@ public final class Expression {
private static List<String> getParaNamesFromIsShowFunc(String expr) { private static List<String> getParaNamesFromIsShowFunc(String expr) {
List<String> paraNames = new ArrayList<String>(); List<String> paraNames = new ArrayList<String>();
if (expr == null) { if (expr == null || !expr.contains(isShowPrefix)) {
return paraNames; return paraNames;
} }
Matcher matcher = isShowFuncPattern.matcher(expr); Matcher matcher = isShowFuncPattern.matcher(expr);

View File

@@ -31,9 +31,20 @@ public class MultipleComponentConnection implements IMultipleComponentConnection
String connectionType; String connectionType;
String connectorName;
public MultipleComponentConnection(String cType, String targetName) { public MultipleComponentConnection(String cType, String targetName) {
connectionType = cType; connectionType = cType;
nameTarget = targetName; 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.IMultipleComponentConnection;
import org.talend.core.model.components.IMultipleComponentItem; import org.talend.core.model.components.IMultipleComponentItem;
import org.talend.core.model.process.INode;
/** /**
* DOC nrousseau class global comment. Detailled comment <br/> * DOC nrousseau class global comment. Detailled comment <br/>
@@ -67,4 +68,10 @@ public class MultipleComponentItem implements IMultipleComponentItem {
public void setComponent(String component) { public void setComponent(String component) {
this.component = 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; 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) * (non-Javadoc)
* *
* @see org.talend.core.model.components.IMultipleComponentManager#addParam(java.lang.String, java.lang.String) * @see org.talend.core.model.components.IMultipleComponentManager#addParam(java.lang.String, java.lang.String)
*/ */
public void addParam(String source, String target) { 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) { 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() { public void validateItems() {
@@ -170,4 +189,9 @@ public class MultipleComponentManager implements IMultipleComponentManager {
return this.lookupMode; return this.lookupMode;
} }
@Override
public String getParamSeperator() {
return ".";
}
} }

View File

@@ -33,11 +33,15 @@ public class MultipleComponentParameter implements IMultipleComponentParameter {
String targetValue; String targetValue;
public MultipleComponentParameter(String source, String target) { 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(); sourceComponent = token.nextToken();
sourceValue = token.nextToken(); sourceValue = token.nextToken();
token = new StringTokenizer(target, "."); //$NON-NLS-1$ token = new StringTokenizer(target, seperator);
targetComponent = token.nextToken(); targetComponent = token.nextToken();
targetValue = token.nextToken(); targetValue = token.nextToken();
} }

View File

@@ -33,7 +33,11 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
String targetValue; String targetValue;
public MultipleComponentParameterValue(String target, String value) { 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(); targetComponent = token.nextToken();
targetValue = token.nextToken(); targetValue = token.nextToken();
@@ -41,6 +45,7 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
sourceValue = value; sourceValue = value;
} }
/* /*
* (non-Javadoc) * (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.gef.palette.PaletteEntry;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.talend.commons.exception.ExceptionHandler; import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.components.IComponent; import org.talend.core.model.components.IComponent;
import org.talend.core.model.process.INode; import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess; 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.Item;
import org.talend.core.model.properties.JobletProcessItem; import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryEditorInput;
import org.talend.core.model.update.UpdateResult; import org.talend.core.model.update.UpdateResult;
import org.talend.designer.core.ui.editor.process.Process; import org.talend.designer.core.ui.editor.process.Process;
@@ -143,7 +145,7 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
} }
} }
} }
/** /**
* DOC qzhang Comment method "canDeleteNode". * DOC qzhang Comment method "canDeleteNode".
* *
@@ -257,5 +259,10 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
public boolean canHandleNode(INode node) { public boolean canHandleNode(INode node) {
return false; 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.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set; import java.util.Set;
import org.apache.commons.collections.BidiMap; 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.GlobalServiceRegister;
import org.talend.core.PluginChecker; import org.talend.core.PluginChecker;
import org.talend.core.database.EDatabaseTypeName; import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.hadoop.HadoopConfJarBean;
import org.talend.core.hadoop.IHadoopClusterService; import org.talend.core.hadoop.IHadoopClusterService;
import org.talend.core.hadoop.repository.HadoopRepositoryUtil; import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
import org.talend.core.model.components.ComponentCategory; import org.talend.core.model.components.ComponentCategory;
@@ -778,7 +780,7 @@ public class DataProcess implements IGeneratingProcess {
DataConnection dataConnec = new DataConnection(); DataConnection dataConnec = new DataConnection();
dataConnec.setActivate(graphicalNode.isActivate()); dataConnec.setActivate(graphicalNode.isActivate());
dataConnec.setLineStyle(EConnectionType.getTypeFromName(curConnec.getConnectionType())); dataConnec.setLineStyle(EConnectionType.getTypeFromName(curConnec.getConnectionType()));
dataConnec.setConnectorName(curConnec.getConnectionType()); dataConnec.setConnectorName(curConnec.getConnectorName());
if (nodeSource.getMetadataList() != null) { if (nodeSource.getMetadataList() != null) {
dataConnec.setMetadataTable(nodeSource.getMetadataList().get(0)); dataConnec.setMetadataTable(nodeSource.getMetadataList().get(0));
} }
@@ -1011,6 +1013,7 @@ public class DataProcess implements IGeneratingProcess {
curNode.setActivate(false); curNode.setActivate(false);
curNode.setStart(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 talendJobLogComponent = "tJobStructureCatcher";
final String uid4TalendJobLogComponent = "talendJobLog"; final String uid4TalendJobLogComponent = "talendJobLog";
IComponent jobStructComponent = ComponentsFactoryProvider.getInstance().get(talendJobLogComponent, ComponentCategory.CATEGORY_4_DI.getName()); IComponent jobStructComponent = ComponentsFactoryProvider.getInstance().get(talendJobLogComponent, ComponentCategory.CATEGORY_4_DI.getName());
@@ -3249,8 +3252,8 @@ public class DataProcess implements IGeneratingProcess {
if (!hadoopClusterService.isUseDynamicConfJar(hadoopClusterItemId)) { if (!hadoopClusterService.isUseDynamicConfJar(hadoopClusterItemId)) {
return null; return null;
} }
String confsJarName = hadoopClusterService.getCustomConfsJarName(hadoopClusterItemId, false, false); Optional<HadoopConfJarBean> confJarBean = hadoopClusterService.getCustomConfsJar(hadoopClusterItemId, false, false);
if (confsJarName == null) { if (!confJarBean.isPresent()) {
return null; return null;
} }
IComponent component = ComponentsFactoryProvider.getInstance().get(componentName, componentCategory.getName()); IComponent component = ComponentsFactoryProvider.getInstance().get(componentName, componentCategory.getName());
@@ -3266,7 +3269,21 @@ public class DataProcess implements IGeneratingProcess {
clusterIdParam.setValue(hadoopClusterItemId); clusterIdParam.setValue(hadoopClusterItemId);
} }
IElementParameter confLibParam = confNode.getElementParameter("CONF_LIB"); //$NON-NLS-1$ 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 confNode;
} }
return null; return null;

View File

@@ -15,16 +15,25 @@ package org.talend.designer.core.model.process.jobsettings;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; 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.emf.common.util.EList;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils; 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.ComponentCategory;
import org.talend.core.model.components.EComponentType; import org.talend.core.model.components.EComponentType;
import org.talend.core.model.components.IComponent; import org.talend.core.model.components.IComponent;
import org.talend.core.model.components.IMultipleComponentItem; import org.talend.core.model.components.IMultipleComponentItem;
import org.talend.core.model.components.IMultipleComponentManager; import org.talend.core.model.components.IMultipleComponentManager;
import org.talend.core.model.general.ModuleNeeded; 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.EConnectionType;
import org.talend.core.model.process.EParameterFieldType; import org.talend.core.model.process.EParameterFieldType;
import org.talend.core.model.process.IElementParameter; 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.INodeReturn;
import org.talend.core.model.process.IProcess; import org.talend.core.model.process.IProcess;
import org.talend.core.model.temp.ECodePart; 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.EParameterName;
import org.talend.designer.core.model.components.ElementParameter; import org.talend.designer.core.model.components.ElementParameter;
import org.talend.designer.core.model.components.EmfComponent; import org.talend.designer.core.model.components.EmfComponent;
import org.talend.designer.core.model.components.MultipleComponentConnection; 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.MultipleComponentManager;
import org.talend.designer.core.model.components.MultipleGenricComponentManager;
import org.talend.designer.core.model.process.jobsettings.JobSettingsConstants.ContextLoadInfo; import org.talend.designer.core.model.process.jobsettings.JobSettingsConstants.ContextLoadInfo;
/** /**
@@ -65,9 +78,22 @@ public class JobContextLoadComponent implements IComponent {
private final boolean isFile; 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.isFile = isFile;
this.dbComponent = dbComponent; 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(); loadMultipleComponentManager();
} }
@@ -87,17 +113,46 @@ public class JobContextLoadComponent implements IComponent {
if (dbComponent == null) { if (dbComponent == null) {
return; return;
} }
multipleComponentManager = new MultipleComponentManager(DB_INPUT, CONTEXT_LOAD);
IMultipleComponentItem currentItem = multipleComponentManager.addItem(DB_INPUT, dbComponent); MultipleComponentConnection multiCompConnection = new MultipleComponentConnection(EConnectionType.FLOW_MAIN.getName(),
currentItem.getOutputConnections().add( CONTEXT_LOAD);
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); currentItem = multipleComponentManager.addItem(CONTEXT_LOAD, CONTEXTLOAD_COMPONENT);
} }
multipleComponentManager.validateItems(); multipleComponentManager.validateItems();
multipleComponentManagers.add(multipleComponentManager); multipleComponentManagers.add(multipleComponentManager);
createMultipleComponentsParameters(); createMultipleComponentsParameters();
} }
@@ -181,6 +236,11 @@ public class JobContextLoadComponent implements IComponent {
return false; return false;
} }
private boolean isTcompv0(IComponent comp) {
return comp != null
&& Optional.ofNullable(IGenericService.getService()).map(s -> s.isTcompv0(comp)).orElse(Boolean.FALSE);
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
@@ -242,10 +302,10 @@ public class JobContextLoadComponent implements IComponent {
} }
protected void createMultipleComponentsParameters() { protected void createMultipleComponentsParameters() {
final String self = "self."; //$NON-NLS-1$
// create parameters // create parameters
if ((multipleComponentManagers != null) && (multipleComponentManagers.size() > 0)) { if ((multipleComponentManagers != null) && (multipleComponentManagers.size() > 0)) {
IMultipleComponentManager multipleComponentManager = multipleComponentManagers.get(0); IMultipleComponentManager multipleComponentManager = multipleComponentManagers.get(0);
final String self = "self" + multipleComponentManager.getParamSeperator(); //$NON-NLS-1$
if (isFile) { if (isFile) {
String source = self + EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName(); String source = self + EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName();
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".FILENAME"); //$NON-NLS-1$ 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$ multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".IGNORE_ERROR_MESSAGE"); //$NON-NLS-1$
} else { } else {
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName()); boolean initDefault = true;
multipleComponentManager.addParam(source, DB_INPUT + ".URL"); if (isTcompv0(component)) {
if ("tJDBCInput".equalsIgnoreCase(dbComponent)) {
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName()); initDefault = false;
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_JAR"); initTcompv0ParamMapping(self, multipleComponentManager);
} else {
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName()); ExceptionHandler.log(this.getClass().getName()
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_CLASS"); + ": MultipleComponentsParameters mapping is not prepared for tcompv0 " + dbComponent);
}
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.HOST.getName()); }
multipleComponentManager.addParam(source, DB_INPUT + ".HOST"); //$NON-NLS-1$ if (initDefault) {
multipleComponentManager.addParam(source, DB_INPUT + ".SERVER"); //$NON-NLS-1$ initDefaultParameterMapping(self, multipleComponentManager);
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$
} }
// context parameter
final String context = CONTEXT_LOAD + "."; //$NON-NLS-1$
String source = self + EParameterName.LOAD_NEW_VARIABLE.getName(); initContextParamMapping(self, multipleComponentManager);
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 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 @Override
public List<? extends IElementParameter> createElementParameters(INode node) { public List<? extends IElementParameter> createElementParameters(INode node) {
@@ -380,8 +496,17 @@ public class JobContextLoadComponent implements IComponent {
IElementParameter newParam = new ElementParameter(node); IElementParameter newParam = new ElementParameter(node);
newParam.setName(JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName())); newParam.setName(JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName()));
newParam.setFieldType(EParameterFieldType.TABLE); newParam.setFieldType(EParameterFieldType.TABLE);
newParam.setListItemsDisplayName(new String[] { EmfComponent.TEXT_BUILTIN, EmfComponent.TEXT_REPOSITORY }); if (isTcompv0(component)) {
newParam.setListItemsDisplayCodeName(new String[] { EmfComponent.BUILTIN, EmfComponent.REPOSITORY }); /**
* 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); elemParamList.add(newParam);
newParam = new ElementParameter(node); newParam = new ElementParameter(node);

View File

@@ -928,7 +928,7 @@ public class JobSettingsManager {
return Collections.emptyList(); 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$ final String uniqueName = "Implicit_Context"; //$NON-NLS-1$
DataNode tContextLoadNode = new DataNode(tContextLoadComponent, uniqueName); DataNode tContextLoadNode = new DataNode(tContextLoadComponent, uniqueName);
@@ -1023,7 +1023,8 @@ public class JobSettingsManager {
String dbType = getDatabaseTypeFromParameter(process); String dbType = getDatabaseTypeFromParameter(process);
if (dbType != null) { if (dbType != null) {
// TDI-18161:the SQL script's syntax is not right because of the implicit context of General JDBC. // 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); 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.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.core.model.process.IContext; import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IProcess; 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.process.ITargetExecutionConfig;
import org.talend.core.model.runprocess.IEclipseProcessor; import org.talend.core.model.runprocess.IEclipseProcessor;
import org.talend.core.runtime.process.TalendProcessArgumentConstant; 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.codegen.ICodeGenerator;
import org.talend.designer.core.ISyntaxCheckableEditor; import org.talend.designer.core.ISyntaxCheckableEditor;
import org.talend.designer.core.i18n.Messages; 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.IProcessMessageManager;
import org.talend.designer.runprocess.IProcessor; import org.talend.designer.runprocess.IProcessor;
import org.talend.designer.runprocess.ProcessorException; 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 { protected Process exec(String[] cmd, String path) throws ProcessorException {
try { try {
if (path == null || !new File(path).exists()) { if (path == null || !new File(path).exists()) {
if (getSpecialWorkingDir() != null) { return Runtime.getRuntime().exec(cmd);
return Runtime.getRuntime().exec(cmd, null, getSpecialWorkingDir());
} else {
return Runtime.getRuntime().exec(cmd);
}
} else { } else {
return Runtime.getRuntime().exec(cmd, null, new File(path)); 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, public static Thread createProdConsThread(final InputStream input, final boolean isError, final int bufferSize,
final StringBuffer out, final StringBuffer err) { final StringBuffer out, final StringBuffer err) {
Thread thread = new Thread() { 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); (org.talend.designer.core.ui.editor.process.Process) editor.getProcess(), gefPoint);
mpc.setSelectedSubjobs(subjobParts); mpc.setSelectedSubjobs(subjobParts);
mpc.setSelectedExpandedJoblet(expandedJobletNodes); mpc.setSelectedExpandedJoblet(expandedJobletNodes);
mpc.setCheckNodeExist(false);
execute(mpc); execute(mpc);
} else if (nodeParts.size() != 0) { } else if (nodeParts.size() != 0) {
NodesPasteCommand cmd = new NodesPasteCommand(nodeParts, editor.getProcess(), gefPoint); NodesPasteCommand cmd = new NodesPasteCommand(nodeParts, editor.getProcess(), gefPoint);
cmd.setCheckNodeExist(false);
cmd.setSelectedSubjobs(subjobParts); cmd.setSelectedSubjobs(subjobParts);
cmd.setSelectedExpandedJoblet(expandedJobletNodes); cmd.setSelectedExpandedJoblet(expandedJobletNodes);
execute(cmd); execute(cmd);

View File

@@ -607,7 +607,7 @@ public final class TalendEditorPaletteFactory {
while (iter.hasNext()) { while (iter.hasNext()) {
IComponent xmlComponent = iter.next(); IComponent xmlComponent = iter.next();
Matcher matcher = pattern.matcher(xmlComponent.getName().toLowerCase()); Matcher matcher = pattern.matcher(xmlComponent.getDisplayName().toLowerCase());
if (matcher.find()) { if (matcher.find()) {
resultByName.add(new ComponentHit(xmlComponent, matcher.start())); resultByName.add(new ComponentHit(xmlComponent, matcher.start()));
continue; continue;
@@ -643,7 +643,7 @@ public final class TalendEditorPaletteFactory {
private static void addDelegateComponents(IComponentsFactory compFac, Collection<IComponent> componentSet, private static void addDelegateComponents(IComponentsFactory compFac, Collection<IComponent> componentSet,
String lowerCasedKeyword) { String lowerCasedKeyword) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) { if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) {
IUnifiedComponentService service = (IUnifiedComponentService) GlobalServiceRegister.getDefault().getService( IUnifiedComponentService service = GlobalServiceRegister.getDefault().getService(
IUnifiedComponentService.class); IUnifiedComponentService.class);
service.filterUnifiedComponentForPalette(compFac, componentSet, lowerCasedKeyword); service.filterUnifiedComponentForPalette(compFac, componentSet, lowerCasedKeyword);
@@ -730,13 +730,12 @@ public final class TalendEditorPaletteFactory {
return null; return null;
} }
IComponent delegateComponent = UnifiedComponentUtil.getDelegateComponent(component); IComponent delegateComponent = UnifiedComponentUtil.getDelegateComponent(component);
String name = component.getName();
String filter = null; String filter = null;
if (delegateComponent != component) { if (delegateComponent != component) {
// emf component name // emf component name
filter = component.getName(); filter = component.getName();
name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
} }
String name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
ImageDescriptor imageSmall = delegateComponent.getIcon16(); ImageDescriptor imageSmall = delegateComponent.getIcon16();
IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceStore(); IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceStore();
ImageDescriptor imageLarge; 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.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer; 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.actions.IJavaEditorActionDefinitionIds;
import org.eclipse.jdt.ui.text.IJavaPartitions; import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.FindReplaceDocumentAdapter; import org.eclipse.jface.text.FindReplaceDocumentAdapter;
import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Region; 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.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.part.FileEditorInput;
import org.talend.commons.exception.SystemException; import org.talend.commons.exception.SystemException;
@@ -297,5 +303,41 @@ public class TalendJavaEditor extends CompilationUnitEditor implements ISyntaxCh
super.initializeDragAndDrop(viewer); 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_NONE, true)) {
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED)) { if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED, true)) {
String type = (String) node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName()); String type = (String) node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) { if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) {
// for one node has several schema_type,set mode for the current one // for one node has several schema_type,set mode for the current one
@@ -624,8 +624,10 @@ public class ChangeMetadataCommand extends Command {
setTableMAPPING(); setTableMAPPING();
if (!internal) { if (!internal) {
updateColumnList(oldOutputMetadata, newOutputMetadata); if (!oldOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE)) {
((Process) node.getProcess()).checkProcess(); updateColumnList(oldOutputMetadata, newOutputMetadata);
((Process) node.getProcess()).checkProcess();
}
} }
refreshMetadataChanged(); refreshMetadataChanged();
} }

View File

@@ -42,6 +42,8 @@ public class MultiplePasteCommand extends CompoundCommand {
private NodesPasteCommand nodeCmd; private NodesPasteCommand nodeCmd;
private NotesPasteCommand noteCmd; private NotesPasteCommand noteCmd;
private boolean isCheckNodeExist = true;
public MultiplePasteCommand(List<NodePart> nodeParts, List<NoteEditPart> noteParts, Process process, Point cursorLocation) { public MultiplePasteCommand(List<NodePart> nodeParts, List<NoteEditPart> noteParts, Process process, Point cursorLocation) {
// List<NodePart> nodePartList = new ArrayList<NodePart>(); // List<NodePart> nodePartList = new ArrayList<NodePart>();
@@ -67,6 +69,8 @@ public class MultiplePasteCommand extends CompoundCommand {
*/ */
@Override @Override
public void execute() { public void execute() {
nodeCmd.setCheckNodeExist(isCheckNodeExist);
AbstractMultiPageTalendEditor multiPageTalendEditor = (AbstractMultiPageTalendEditor) PlatformUI.getWorkbench() AbstractMultiPageTalendEditor multiPageTalendEditor = (AbstractMultiPageTalendEditor) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getActiveEditor(); .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
GraphicalViewer viewer = multiPageTalendEditor.getTalendEditor().getViewer(); GraphicalViewer viewer = multiPageTalendEditor.getTalendEditor().getViewer();
@@ -85,7 +89,7 @@ public class MultiplePasteCommand extends CompoundCommand {
for (EditPart editPart : (List<EditPart>) processPart.getChildren()) { for (EditPart editPart : (List<EditPart>) processPart.getChildren()) {
if (editPart instanceof NodePart) { if (editPart instanceof NodePart) {
Node currentNode = (Node) editPart.getModel(); Node currentNode = (Node) editPart.getModel();
if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) { if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer()) || !isCheckNodeExist) {
sel.add(editPart); sel.add(editPart);
} }
} else if (editPart instanceof NoteEditPart) { } else if (editPart instanceof NoteEditPart) {
@@ -150,4 +154,13 @@ public class MultiplePasteCommand extends CompoundCommand {
nodeCmd.setSelectedExpandedJoblet(selectedExpandedJoblet); 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 isJobletRefactor = false;
private boolean isJunitCreate = false; private boolean isJunitCreate = false;
private boolean isCheckNodeExist = true;
/** /**
* Getter for isJunitCreate. * Getter for isJunitCreate.
@@ -385,7 +387,7 @@ public class NodesPasteCommand extends Command {
// create the nodes // create the nodes
for (NodePart copiedNodePart : nodeParts) { for (NodePart copiedNodePart : nodeParts) {
IGraphicalNode copiedNode = (IGraphicalNode) copiedNodePart.getModel(); IGraphicalNode copiedNode = (IGraphicalNode) copiedNodePart.getModel();
if (!containNodeInProcess(copiedNode)) { if (this.isCheckNodeExist && !containNodeInProcess(copiedNode)) {
continue; continue;
} }
IComponent component = ComponentsFactoryProvider.getInstance().get(copiedNode.getComponent().getName(), IComponent component = ComponentsFactoryProvider.getInstance().get(copiedNode.getComponent().getName(),
@@ -1008,4 +1010,16 @@ public class NodesPasteCommand extends Command {
public void setSelectedExpandedJoblet(List<NodePart> selectedExpandedJoblet) { public void setSelectedExpandedJoblet(List<NodePart> selectedExpandedJoblet) {
this.selectedExpandedJoblet = 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(); List<? extends IConnection> connections = ((Node) elem).getOutgoingConnections();
for (IConnection connection : connections) { for (IConnection connection : connections) {
if (!connection.getName().equals(oldELTValue)) { 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; continue;
} }
INode targetNode = connection.getTarget(); INode targetNode = connection.getTarget();
String componentName = targetNode.getComponent().getName(); 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)) { if (GlobalServiceRegister.getDefault().isServiceRegistered(IDbMapDesignerService.class)) {
IDbMapDesignerService service = GlobalServiceRegister.getDefault().getService( IDbMapDesignerService service = GlobalServiceRegister.getDefault().getService(
IDbMapDesignerService.class); IDbMapDesignerService.class);

View File

@@ -480,13 +480,6 @@ public class QueryGuessCommand extends Command {
String newQuery = null; String newQuery = null;
// Need update schema if table type as calculation view for SAP Hana Database // Need update schema if table type as calculation view for SAP Hana Database
updateSchema(dbType, newOutputMetadataTable); updateSchema(dbType, newOutputMetadataTable);
if (node != null && node instanceof INode) {
process = ((INode) node).getProcess();
boolean isContextMode = ContextParameterUtils.containContextVariables(schema);
if (isContextMode) {
schema = JavaProcessUtil.getContextOriginalValue(process, schema);
}
}
realTableName = QueryUtil.getTableName(node, newOutputMetadataTable, schema, dbType, realTableName); realTableName = QueryUtil.getTableName(node, newOutputMetadataTable, schema, dbType, realTableName);
if (realTableName.startsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.endsWith(TalendTextUtils.QUOTATION_MARK) if (realTableName.startsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.endsWith(TalendTextUtils.QUOTATION_MARK)

View File

@@ -14,7 +14,6 @@ package org.talend.designer.core.ui.editor.dependencies;
import java.util.Collection; import java.util.Collection;
import org.apache.commons.lang.StringUtils;
import org.eclipse.gef.commands.CommandStack; import org.eclipse.gef.commands.CommandStack;
import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.MessageDialog;
@@ -58,6 +57,7 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property; import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.IRepositoryViewObject; import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.resources.ResourceItem; import org.talend.core.model.resources.ResourceItem;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.ui.context.CustomDialogCellEditor; import org.talend.core.ui.context.CustomDialogCellEditor;
import org.talend.core.ui.context.model.table.ContextTableTabChildModel; import org.talend.core.ui.context.model.table.ContextTableTabChildModel;
@@ -256,12 +256,8 @@ public class ManageResourcePanel extends Composite {
} }
JobResourceDependencyModel model = new JobResourceDependencyModel((ResourceItem) item); JobResourceDependencyModel model = new JobResourceDependencyModel((ResourceItem) item);
Property property = process.getProperty(); Property property = process.getProperty();
StringBuffer joblabel = new StringBuffer(); String jobLabel = JavaResourcesHelper.getJobFolderName(property.getLabel(), property.getVersion());
if (StringUtils.isNotBlank(property.getItem().getState().getPath())) { model.setResourceDepPath(ResourceDependenciesUtil.getResourcePath(model, jobLabel, null));
joblabel.append(property.getItem().getState().getPath() + "/");
}
joblabel.append(property.getLabel() + "_" + property.getVersion());
model.setResourceDepPath(ResourceDependenciesUtil.getResourcePath(model, joblabel.toString(), null));
getInput().add(model); getInput().add(model);
resourcesTV.refresh(); resourcesTV.refresh();
resourcesTV.setSelection(new StructuredSelection(model)); resourcesTV.setSelection(new StructuredSelection(model));
@@ -362,13 +358,9 @@ public class ManageResourcePanel extends Composite {
final JobResourceDependencyModel model = (JobResourceDependencyModel) element; final JobResourceDependencyModel model = (JobResourceDependencyModel) element;
if (!model.getSelectedVersion().equals(value)) { if (!model.getSelectedVersion().equals(value)) {
Property property = process.getProperty(); Property property = process.getProperty();
StringBuffer joblabel = new StringBuffer(); String jobLabel = JavaResourcesHelper.getJobFolderName(property.getLabel(), property.getVersion());
if (StringUtils.isNotBlank(property.getItem().getState().getPath())) {
joblabel.append(property.getItem().getState().getPath() + "/");
}
joblabel.append(property.getLabel() + "_" + property.getVersion());
model.setSelectedVersion((String) value); model.setSelectedVersion((String) value);
model.setResourceDepPath(ResourceDependenciesUtil.getResourcePath(model, joblabel.toString(), (String) value)); model.setResourceDepPath(ResourceDependenciesUtil.getResourcePath(model, jobLabel, (String) value));
getViewer().update(element, null); getViewer().update(element, null);
try { try {
IRepositoryViewObject repoObject = ProxyRepositoryFactory.getInstance() IRepositoryViewObject repoObject = ProxyRepositoryFactory.getInstance()

View File

@@ -38,6 +38,7 @@ import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject; import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.resources.ResourceItem; import org.talend.core.model.resources.ResourceItem;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.service.IResourcesDependenciesService; import org.talend.core.service.IResourcesDependenciesService;
import org.talend.designer.core.ui.AbstractMultiPageTalendEditor; import org.talend.designer.core.ui.AbstractMultiPageTalendEditor;
@@ -45,6 +46,7 @@ import org.talend.designer.core.ui.editor.dependencies.dialog.DependenciesResour
import org.talend.designer.core.ui.editor.dependencies.model.JobResourceDependencyModel; import org.talend.designer.core.ui.editor.dependencies.model.JobResourceDependencyModel;
import org.talend.designer.core.ui.editor.dependencies.util.ResourceDependenciesUtil; import org.talend.designer.core.ui.editor.dependencies.util.ResourceDependenciesUtil;
import org.talend.designer.maven.tools.BuildCacheManager; import org.talend.designer.maven.tools.BuildCacheManager;
import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.repository.ProjectManager; import org.talend.repository.ProjectManager;
public class ResourcesDependenciesService implements IResourcesDependenciesService { public class ResourcesDependenciesService implements IResourcesDependenciesService {
@@ -89,12 +91,12 @@ public class ResourcesDependenciesService implements IResourcesDependenciesServi
if (repoObject != null) { if (repoObject != null) {
JobResourceDependencyModel model = new JobResourceDependencyModel( JobResourceDependencyModel model = new JobResourceDependencyModel(
(ResourceItem) repoObject.getProperty().getItem()); (ResourceItem) repoObject.getProperty().getItem());
StringBuffer joblabel = new StringBuffer(); String jobLabel = JavaResourcesHelper.getJobFolderName(property.getLabel(), property.getVersion());
if (StringUtils.isNotBlank(property.getItem().getState().getPath())) { if (ProcessorUtilities.isExportConfig()) {
joblabel.append(property.getItem().getState().getPath() + "/"); resPath = ResourceDependenciesUtil.getResourcePath(model, jobLabel, parts[1]);
}else {
resPath = ResourceDependenciesUtil.getJobExecuteResourceFilePath(model, property, jobLabel, parts[1]);
} }
joblabel.append(property.getLabel() + "_" + property.getVersion());
resPath = ResourceDependenciesUtil.getResourcePath(model, joblabel.toString(), parts[1]);
// to check if file exist, if not copy it // to check if file exist, if not copy it
ResourceDependenciesUtil.copyToExtResourceFolder(model, property.getId(), property.getVersion(), parts[1], ResourceDependenciesUtil.copyToExtResourceFolder(model, property.getId(), property.getVersion(), parts[1],
null); null);

Some files were not shown because too many files have changed in this diff Show More