Compare commits

...

109 Commits

Author SHA1 Message Date
Zhiwei Xue
fae1ce455c feat(TUP-36683):Selective generateAllPoms (#5772)
* feat(TUP-36683):Selective generateAllPoms (#5753)

* feat(TUP-36683):Selective generateAllPoms (#5676)
2022-11-04 17:19:48 +08:00
sbliu
bbc391c7ab fix(TUP-36726) change tooltip message (#5729) 2022-10-21 11:11:34 +08:00
sbieliaievl
bbc7dffd22 fix(APPINT-34581) - fixed versions 2022-10-18 14:00:31 +02:00
Liu Xinquan
39f3b4d0f6 fix(TDQ-20751) tDqReportRun Snowflake Context (#5704) 2022-10-17 17:18:22 +08:00
Laurent BOURGEOIS
7893b956e6 fix(TBD-14263):Support MongoDB v4+ - Spark Batch 3.1+ - GA (#5686) 2022-10-14 15:09:33 +02:00
sbieliaievl
6efda8ecae fix(APPINT-34581) - Studio cloud publish Talend Runtime versions (#5614)
* Revert "Revert "Route and data services features versions behave differently in Talend Runtime (#5531)" (#5575)"

This reverts commit e1743f86d3.

* fix(APPINT-34581) - code refactoring for getting versions

* Revert "Revert "Route and data services features versions behave differently in Talend Runtime (#5531)" (#5575)"

This reverts commit e1743f86d3.

* fix(APPINT-34581) - code refactoring for getting versions

* fix(APPINT-34581) - removed CI cloud publish related changes

* fix(APPINT-34581) - added get version methods for feature and bundle

* fix(APPINT-34581)

* fix(APPINT-34581) - changed

* fix(APPINT-34581) - code refactoring

* fix(APPINT-34581) - code refactoring
2022-10-13 10:25:00 +03:00
kjwang
396f9ef099 TUP-36732 Studio can not fetch SSO access token automatically if stay on (#5689)
TUP-36732 Studio can not fetch SSO access token automatically if stay on logon dialog for long time
https://jira.talendforge.org/browse/TUP-36732
2022-10-13 15:04:36 +08:00
Jane Ding
d6acf0a5be fix(TUP-36893):Add new column import_product for Import items pendo (#5690)
event
https://jira.talendforge.org/browse/TUP-36893
2022-10-13 15:03:51 +08:00
sbliu
50cdd7f3c6 fix(TUP-36726) add warning icon and tip message. (#5683) 2022-10-13 14:49:23 +08:00
Jane Ding
508867dce3 fix(TUP-36284):Compile error in Studio (#5607)
* fix(TUP-36284):Compile error in Studio
https://jira.talendforge.org/browse/TUP-36284

* fix(TUP-36284):Compile error in Studio
https://jira.talendforge.org/browse/TUP-36284
2022-10-13 11:13:39 +08:00
Svitlana Anulich
7cf9823f64 fix(TBD-14194): add knox session timeout variable (#5685) 2022-10-12 23:29:30 +03:00
sbieliaievl
80f3b27c0c feat(APPINT-26700) - Ability to modify microservice application properties file within Talend Studio (#5590)
Co-authored-by: arashankar <abdulhamid0606@gmail.com>
2022-10-12 12:30:28 +02:00
kjwang
d872ced133 Fix TUP-36747 Improve logs when Log in with Talend Cloud (#5679)
Fix TUP-36747 Improve logs when Log in with Talend Cloud
https://jira.talendforge.org/browse/TUP-36747
2022-10-12 16:48:20 +08:00
Emmanuel GALLOIS
2d9fffa6d4 feat(TDI-48595): bump component-runtime to 1.49 (#5649) 2022-10-12 10:21:06 +02:00
kjwang
bf8135943a TUP-36812 If user installed JAVA version less than 11, Web browser can't (#5673)
* TUP-36812 If user installed JAVA version less than 11, Web browser can't
call back SSO client.
https://jira.talendforge.org/browse/TUP-36812
2022-10-12 15:26:02 +08:00
Jane Ding
83ec5c0d42 fix(TUP-36780):Add tracking to Studio (#5655)
https://jira.talendforge.org/browse/TUP-36780
2022-10-12 10:47:26 +08:00
Jane Ding
26a119649b fix(TUP-36710):Some tMap data not show in pendo (#5636)
https://jira.talendforge.org/browse/TUP-36710
2022-10-12 10:46:21 +08:00
jiezhang-tlnd
be594bc22c 80 loc fr fr 2022 10 06 04 08 (#5670)
* Add localized files (#5662)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5665)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-10-09 10:38:50 +08:00
jiezhang-tlnd
f917599a0c 80 2022 09 29 07 23 (#5657)
* Add localized files (#5653)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5656)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
2022-09-30 15:54:05 +08:00
Samuel ANTOINE
90c5220f08 feat(TBD-13810): add dynamic schema on tfileinputdelimited (#5599)
feat(TBD-13810): add dynamic schema on tfileinputdelimited (#5599)
2022-09-30 09:47:13 +02:00
sbliu
b963938b24 fix(TUP-36169) Performance issue when execute "Generate Doc as html" (#5579) 2022-09-30 14:33:18 +08:00
dicarcab
37af226974 fix(TBD-10400): Reject flow doesn't work correctly for dates in extra… (#5630) 2022-09-27 10:31:23 +02:00
kjwang
3a7614ee6a TUP-36748 Studio send request to wrong data center when token invalid (#5633) (#5646)
* TUP-36748 Studio send request to wrong data center when token invalid
https://jira.talendforge.org/browse/TUP-36748
2022-09-26 18:31:12 +08:00
kjwang
efd27e4ec9 Fix TUP-36733 Fix junit error on maintenance/8.0 (#5628)
Fix TUP-36733 Fix junit error on maintenance/8.0
https://jira.talendforge.org/browse/TUP-36733
2022-09-23 19:48:24 +08:00
kjwang
e12e687963 Fix TUP-36740 When open tmc login page, we should encode all the (#5631) (#5632)
Fix TUP-36740 When open tmc login page, we should encode all the parameters in URL
https://jira.talendforge.org/browse/TUP-36740
2022-09-22 21:06:41 +08:00
jiezhang-tlnd
9c1122e971 Add localized files (#5627) (#5629)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-22 18:23:50 +08:00
zyuan-talend
b684d299f4 fix(TUP-36519):"Detect and update all jobs" does not update all jobs. (#5596) 2022-09-22 12:55:26 +08:00
sbliu
c6b22629fd feat(TUP-36340) fix problem that still show missing orai18n jar . (#5616) 2022-09-22 09:58:42 +08:00
kjwang
355d94e5de Fix TUP-36723 can not list project when use old way to fetch from token (#5613) (#5621)
Fix TUP-36723 can not list project when use old way to fetch from token
https://jira.talendforge.org/browse/TUP-36723
2022-09-22 09:54:16 +08:00
kjwang
6318fb8131 kjwang/Fix TUP-36721 Only display SSO page for Talend Studio (#5611) (#5620)
kjwang/Fix TUP-36721 Only display SSO page for Talend Studio
https://jira.talendforge.org/browse/TUP-36721
2022-09-22 09:35:49 +08:00
kjwang
a490fe61ab Fix: TUP-36714 Improve the code for SSO feature (#5608) (#5612)
* Fix: TUP-36714 Improve the code for SSO feature
https://jira.talendforge.org/browse/TUP-36714
2022-09-21 13:03:39 +08:00
zshen-talend
2b6fe49b09 fix(TDQ-19700):snowflake type don't should show on the combo list of DB (#5605)
* fix(TDQ-19700):snowflake type don't should show on the combo list of DB
wizard

* fix(TDQ-19700): second time switch context failed when schema is empty
2022-09-20 12:23:27 +08:00
kjwang
351bf44095 Temp commit (#5271)
TUP-32606 Support SSO on Studio
https://jira.talendforge.org/browse/TUP-32606
2022-09-16 15:06:03 +08:00
jiezhang-tlnd
5bab4f7de2 Add localized files (#5598) (#5600)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-16 10:23:48 +08:00
Emmanuel GALLOIS
9479f25100 feat(TDI-48418): Bump component-runtime to 1.48 (#5593) 2022-09-15 11:42:52 +02:00
zshen-talend
fc7cae42bf fix(TDQ-19700): fix the bug about second time switch change original value(#5595) 2022-09-15 12:19:23 +08:00
jiezhang-tlnd
c8dcf3e70e Add localized files (#5585) (#5589)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-09 17:52:07 +08:00
jiezhang-tlnd
3b7f69525c Add localized files (#5583) (#5587)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-09 17:18:33 +08:00
AlixMetivier-zz
996d2ee452 feat(TBD-13647): allow switch from transient to interactive cluster (#5424)
Co-authored-by: unknown <ametivier@talend.com>
2022-09-08 16:35:11 +02:00
sbliu
a695e44d7f feat(TUP-36340) oracle add support of orai18n.jar (#5528)
orai18n jar version using 19, same as ojdbc version of oracle 18,
   support nls feature only apply to oracle 18
2022-09-08 10:41:39 +08:00
Liu Xinquan
f77aadd99f Xqliu/tdq 20610 lucene core 8.0 (#5566) 2022-09-06 17:19:27 +08:00
sbieliaievl
e1743f86d3 Revert "Route and data services features versions behave differently in Talend Runtime (#5531)" (#5575)
This reverts commit c88e5002b3.
2022-09-06 11:13:24 +03:00
hzhao
5ef866743b fix(TUP-36593): Nexus proxy password is stored in clear text in project (#5562) 2022-09-05 23:34:20 +08:00
zshen-talend
656987c139 feat(TDQ-19700): add condition to avoid junit failed (#5573) 2022-09-05 22:12:38 +08:00
zshen-talend
e8902f55cc Zshen/feat/tdq 19700 3support switch context for snowflake jdbc (#5567) 2022-09-02 15:57:46 +08:00
sbliu
024bd7bf5c fix junit failure on 8.0 (#5559) 2022-09-02 09:32:00 +08:00
msjian
5e1d06edf6 chore(TDQ-20612): a wording issue (#5561) 2022-09-01 16:35:54 +08:00
sbieliaievl
73699ce3c1 Version in Cloud Artifact tab is not updated (#5538)
* fix(APPINT-34899) - added new constants for cloud publish event

* fix(APPINT-34899) - added cloud name constant for cloud version event
2022-09-01 10:52:03 +03:00
Oleksandr Zhelezniak
b218688c82 fix(TDI-48431): synchronize flush resumeutil (#5552) 2022-09-01 10:08:17 +03:00
bhe-talendbj
5fb4b545f4 feat(TUP-36373): Delete .m2 with UI option when apply a monthly update (#5549)
* feat(TUP-36373): initial impl

* feat(TUP-36373): delete m2 during startup

* feat(TUP-36373): delete m2 during startup
2022-09-01 10:10:58 +08:00
sbliu
4d9fa8adee chore(TUP-36502) upgrade org.postgresql:postgresql:42.2.25 to 42.2.26 (#5545) 2022-08-31 09:34:14 +08:00
hcyi
75c8efe0f0 fix(TUP-36483):Code generation fails with xmlmap. (#5540) 2022-08-30 17:56:58 +08:00
jiezhang-tlnd
cfc2a29f92 fix(TUP-35898)Studio does not display an error message when importing (#5397)
* fix(TUP-35898)Studio does not display an error message when importing
bad zip job archive

* format code
2022-08-30 09:32:17 +08:00
bhe-talendbj
3c2ccf0f38 feat(TUP-35886): add new method to rename tck component name (#5436)
* feat(TUP-35886): add new method to rename tck component name

* feat(TUP-35886): add junit

* feat(TUP-35886): add junit

* feat(TUP-35886): refactor name

* feat(TUP-35886): fix junit

* feat(TUP-35886): fix junit

* feat(TUP-35886): refactor and update doc
2022-08-29 17:45:27 +08:00
Jane Ding
48905f03a9 feat(TUP-35712):Track item signature with Pendo (#5499)
* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712

* feat(TUP-35712):Track item signature with Pendo
https://jira.talendforge.org/browse/TUP-35712
2022-08-29 09:35:15 +08:00
sbieliaievl
c88e5002b3 Route and data services features versions behave differently in Talend Runtime (#5531)
* fix(APPINT-34581) - added try take cloud version

* fix(APPINT-34581) - removed version hardcode

* fix(APPINT-34581) - added version for features

* fix(APPINT-34962) - added bundle version to feature

* fix(APPINT-34581)
2022-08-26 11:27:13 +03:00
AlixMetivier
af3ca0c30d Revert "feat(TBD-13810): add dynamic schema on thdfsinputformat components (#5442)" (#5544)
This reverts commit a5df51204e.
2022-08-17 17:15:55 +02:00
jiezhang-tlnd
dc687f1a50 Revert "feat(TUP-35808)Generate module name from maven url (#5425)" (#5536)
This reverts commit 4c0b9c6f91.
2022-08-11 15:03:30 +08:00
hzhao-talendbj
14a610a72b fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud (#5517)
* fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud

* fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud

* (TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud
2022-08-09 16:21:30 +08:00
zyuan-talend
153a831b0b fix(TUP-35909):add missed context items for demo. (#5518) 2022-08-09 11:12:08 +08:00
hcyi
2bcc470833 fix(TUP-36012):CVE:com.h2database:h2:2.1.210 (#5454) 2022-08-09 11:00:19 +08:00
ypiel
88d10b08ec Chore: bump tck 1.47.0 on maintenance 8.0 (#5491)
* bump to component-runtime 1.47.1

Co-authored-by: Emmanuel GALLOIS <egallois@talend.com>
2022-08-08 13:42:28 +02:00
jiezhang-tlnd
5687315bd2 fix(TUP-36127)Upgrade commons-configuration to 2.8.0 (#5514)
* fix(TUP-36127)Upgrade commons-configuration to 2.8.0

* exclude commons-configuration2

* chore(TUP-36127) exclude commons-configuration2

* add dependency commons-text
2022-08-08 14:09:34 +08:00
wang wei
7cfce8de2a fix(TDI-48203): fix for microservice case (#5526) 2022-08-05 15:05:42 +08:00
Jane Ding
da7f173be2 feat(TUP-35644):tMap - possible simplified metrics to send to Pendo (#5524)
https://jira.talendforge.org/browse/TUP-35644
2022-08-05 10:08:26 +08:00
jiezhang-tlnd
f5a6347377 Add localized files (#5520) (#5523)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-08-04 17:17:37 +08:00
Zhiwei Xue
e7ba1d5016 fix(TUP-36175):align bcprov-jdk15on to 1.70 (#5461) 2022-08-02 10:23:42 +08:00
zyuan-talend
ba1ee02e4e Add localized files (#5507)
* Add localized files (#5505)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5506)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-07-29 15:51:09 +08:00
Samuel ANTOINE
a5df51204e feat(TBD-13810): add dynamic schema on thdfsinputformat components (#5442)
* feat(TBD-13810): add dynamic schema on thdfsinputformat components
2022-07-29 07:26:46 +02:00
kjwang
dfe132d87e TUP-36242 jobs changing Hadoop metadata distribution after changing (#5484)
TUP-36242 jobs changing Hadoop metadata distribution after changing project/branch
https://jira.talendforge.org/browse/TUP-36242
2022-07-28 16:03:38 +08:00
jiezhang-tlnd
4c0b9c6f91 feat(TUP-35808)Generate module name from maven url (#5425)
* feat(TUP-35808)Generate module name from maven url

* handle for component and plugin.xml

* handle for component

* move to moduleNeeded.java

* format code

* feat(TUP-35808)Generate module name from maven url

* feat(TUP-35808)Generate module name from maven url

* add junits

* feat(TUP-35808)Generate module name from maven url

* add warning for incorrect module name

* add warning log for module name

* Use MODULE (name in plugin.xml) to build MVN_URI

* handle log

* handle mssql metedata
2022-07-27 18:38:21 +08:00
sbliu
16b6699cc9 feat(TUP-29393) replace nexus connection timeout with default connection timeout (#5475) 2022-07-27 17:42:01 +08:00
jiezhang-tlnd
3f57a592d1 fix(TUP-35446)CVE: org.apache.maven:maven-core:3.8.3 (#5446) 2022-07-27 11:25:19 +08:00
wang wei
74bc5ee66f fix(TDI-48203): [CVE]: routines.system.JSONObject(Object bean) use reflect to call method invoke, that's dangerous for evil script inject (#5426) 2022-07-27 09:29:03 +08:00
sbliu
6a0c96627f fix(TUP-36252) fix NPE for tos studio build job (#5482) 2022-07-26 14:25:12 +08:00
sbliu
ecf339a6ca chore(TUP-35865) upgrade wstx-asl-3.2.9.jar with wstx-core-asl-4.4.1 and stax2-api-4.2.1 (#5438) 2022-07-22 17:28:02 +08:00
Zhiwei Xue
dc5c3d0ec9 fix(TUP-18979):fix junit failure (#5492) 2022-07-22 16:15:34 +08:00
Jane Ding
503924aa75 Jding/add localized files 2022 07 21 (#5488)
* Add localized files (#5486)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5487)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-07-21 17:43:39 +08:00
hzhao-talendbj
4ed461840a fix jackson cve (#5480) 2022-07-19 20:37:51 +08:00
hzhao-talendbj
cafa72f52a Revert "chore(TUP-35265): upgrade 'crypto-utils' jar in low level (#5372)" (#5476)
This reverts commit aed39722eb.
2022-07-19 16:25:28 +08:00
pyzhou
af62f01007 fix(TDI-48024): ResumeUtil performance issue (#5458)
* fix(TDI-48024): ResumeUtil performance issue

* NPE
2022-07-19 12:01:41 +08:00
zyuan-talend
5e4b9311a9 fix(TUP-36231,TUP31721): deploy libs from custom component. (#5468) (#5473) 2022-07-19 10:07:24 +08:00
Zhiwei Xue
a6164bf006 fix(TUP-18979):fix sync mapping file error of job project (#5470) 2022-07-18 16:55:14 +08:00
sbliu
24622068ec chore(TUP-35863) remove lower version of maven-settings (#5419)
* chore(TUP-35863) remove lower version of maven-settings
2022-07-18 09:44:36 +08:00
Jane Ding
ad085163f9 feat(TUP-35644):tMap - possible simplified metrics to send to Pendo (#5409)
* feat(TUP-35644):tMap - possible simplified metrics to send to Pendo
https://jira.talendforge.org/browse/TUP-35644

* feat(TUP-35644):tMap - possible simplified metrics to send to Pendo
https://jira.talendforge.org/browse/TUP-35644

* feat(TUP-35644):tMap - possible simplified metrics to send to Pendo
https://jira.talendforge.org/browse/TUP-35644

* feat(TUP-35644):tMap - possible simplified metrics to send to Pendo
https://jira.talendforge.org/browse/TUP-35644
2022-07-14 17:23:15 +08:00
sbliu
4ba9104034 chore(TUP-35948) TP_ALL as cloud/on-prem license (#5445) 2022-07-14 15:53:26 +08:00
sbieliaievl
216082efac fix(APPINT-33559) - fixed screenshot is not available in demos (#5344)
* fix(APPINT-33559) - added sreenshots to DI demo jobs

* fix(APPINT-33559) - fix for saving screenshot after duplicating

* fix(APPINT-33559) - removed exception

* fix(APPINT-33559) - added io exception
2022-07-14 10:50:58 +03:00
sponomarova
d652f86bf2 feat(TBD-13825): GA - Azure Synapse Spark pools with Azure AD Service Principal (#5427) 2022-07-14 10:05:25 +03:00
zshen-talend
c6620e03e6 feat(TDQ-19828): make sure tDataQualityRule support spark job (#5435) 2022-07-14 12:32:25 +08:00
Zhiwei Xue
d44180bf64 fix(TUP-18979):Fix UI import issue (#5457) 2022-07-13 18:22:40 +08:00
Zhiwei Xue
e754516075 fix(TUP-18979):Migration tasks including mapping files (#5441) 2022-07-13 11:02:27 +08:00
Laurent BOURGEOIS
e192a5a747 fix(TBD-13998):Issue with Use Kerberos authentication checkbox in tImpalaConnection and tImpalaInput components (#5443) (#5451) 2022-07-11 15:28:20 +02:00
sbliu
9e602c54ad fix(TUP-32331) fix unit failure. (#5448) 2022-07-11 18:06:04 +08:00
hcyi
0d098da3bc fix(TUP-35774):The prompt feature for context variables. (#5376) 2022-07-07 17:09:40 +08:00
Emmanuel GALLOIS
8843c51255 feat(TDI-48200) bump component-runtime to 1.46 (#5422)
* feat(TDI-48200): bump component-runtime to 1.46.1
2022-07-07 10:29:48 +02:00
sbliu
3207338fe6 fix(TUP-32331) fix cannot translate to valid file path when url contains special '#' (#5355) 2022-07-07 14:48:39 +08:00
hzhao-talendbj
aed39722eb chore(TUP-35265): upgrade 'crypto-utils' jar in low level (#5372) 2022-07-04 17:42:03 +08:00
hzhao-talendbj
6e0d5400bf fix(TUP-35645): Studio update git for nothing (#5335) 2022-07-01 12:57:46 +08:00
zyuan-talend
afa700b229 fix(TUP-31721):Not clear studio index cache in normal case. (#5350) 2022-06-30 14:54:07 +08:00
jiezhang-tlnd
bb48918802 fix(TUP-35979)Adjust nimbus-jose-jwt-9.3.jar to nimbus-jose-jwt-9.22 (#5413) 2022-06-30 12:08:31 +08:00
jiezhang-tlnd
54e08f8d10 chore(TUP-35857)CVE: bsh-2.0b4.jar (#5375) 2022-06-30 09:47:30 +08:00
bhe-talendbj
ce221bc5b3 fix(TUP-35637): not clean target folders (#5374) 2022-06-28 16:51:43 +08:00
zyuan-talend
45ee6a61eb fix(TUP-35823): CVE consolidate maven-artifact-manager to 2.2.1. (#5383) 2022-06-28 15:39:44 +08:00
bhe-talendbj
d03c572ed4 chore(TUP-35849): add classifier support (#5408) 2022-06-28 15:27:54 +08:00
msjian
5cd44b8318 fix(TDQ-19435): fxi NPE and remove useless jars (#5393) 2022-06-28 14:18:08 +08:00
zyuan-talend
e4cff52913 Add localized files. (#5407)
* Add localized files (#5384)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5401)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
2022-06-24 09:38:47 +08:00
Chao MENG
21a9fcae19 chore: update plugin timestamp (#5403) 2022-06-23 17:13:44 +08:00
Jane Ding
4c2ed00331 fix(TUP-35599):SuggestionValues.Item support of user friendly UI label (#5351)
* fix(TUP-35599):SuggestionValues.Item support of user friendly UI label
different from it's id
https://jira.talendforge.org/browse/TUP-35599

* fix(TUP-35599):SuggestionValues.Item support of user friendly UI label
different from it's id
https://jira.talendforge.org/browse/TUP-35599
2022-06-21 22:03:15 +08:00
Liu Xinquan
b16c6c5d0e fix(TDQ-20360) snowflake jdbc connection context mode issue (#5388) 2022-06-17 16:38:41 +08:00
236 changed files with 10021 additions and 2563 deletions

View File

@@ -5,7 +5,7 @@
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<requires>
<import plugin="org.bouncycastle.bcprov" version="1.69.0" match="greaterOrEqual"/>
<import plugin="org.bouncycastle.bcprov" version="1.70.0" match="greaterOrEqual"/>
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>

View File

@@ -72,12 +72,27 @@ public final class MessageBoxExceptionHandler {
}
}
public static void process(Throwable ex, Shell shell, boolean wrapMessage) {
CommonExceptionHandler.process(ex);
if (CommonsPlugin.isHeadless() || CommonsPlugin.isJUnitTest()) {
return;
}
if (shell != null) {
showMessage(ex, shell, wrapMessage);
}
}
public static void showMessage(Throwable ex, Shell shell) {
showMessage(ex, shell, true);
}
/**
* Open a message box showing a generic message and exception message.
*
* @param ex - exception to show
*/
public static void showMessage(Throwable ex, Shell shell) {
public static void showMessage(Throwable ex, Shell shell, boolean wrapMessage) {
if (ex.equals(lastShowedAction)) {
return;
}
@@ -85,10 +100,14 @@ public final class MessageBoxExceptionHandler {
// TODO smallet use ErrorDialogWidthDetailArea ?
String title = Messages.getString("commons.error"); //$NON-NLS-1$
String msg = Messages.getString("exception.errorOccured", ex.getMessage()); //$NON-NLS-1$
String excepMsg = ex.getMessage();
//add for tup-19726/19790, as for exception detailMessage will show more details on log area.
if(ex.getCause()!=null) {
msg = Messages.getString("exception.errorOccured", ex.getCause().getMessage()); //$NON-NLS-1$
excepMsg = ex.getCause().getMessage();
}
String msg = Messages.getString("exception.errorOccured", excepMsg); //$NON-NLS-1$
if (!wrapMessage) {
msg = Messages.getString("exception.message", excepMsg); //$NON-NLS-1$
}
Priority priority = CommonExceptionHandler.getPriority(ex);

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=table is null
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
commons.error=Error
exception.message={0}\nSee log for more details.
exception.errorOccured=An error occured ({0}).\nSee log for more details.
ModelSelectionDialog.Message=Please choose one option, or cancel.
ModelSelectionDialog.Option=option

View File

@@ -16,8 +16,14 @@ import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
@@ -158,8 +164,35 @@ public class ImageUtils {
return imageDes;
}
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = new HashMap<byte[], ImageDataProvider>();
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = Collections.synchronizedMap(new HashMap<byte[], ImageDataProvider>());
private static Map<Long, byte[]> cachedImagesTimeKeeping = Collections.synchronizedMap(new HashMap<Long, byte[]>());
private static Thread clearImageFromDataCachedImages = new Thread() {
@SuppressWarnings("static-access")
public void run() {
long timeout = 5 * 60 * 1000;
while(true) {//remove older than 5 mins
Set<Entry<Long, byte[]>> collect = cachedImagesTimeKeeping.entrySet().stream()
.filter(entry -> (System.currentTimeMillis() - entry.getKey()) > timeout).collect(Collectors.toSet());
for(Entry<Long, byte[]> entry: collect) {
Long key = entry.getKey();
cachedImagesTimeKeeping.remove(key);
imageFromDataCachedImages.remove(entry.getValue());
}
try {
sleep(timeout);
} catch (InterruptedException e) {//
}
}
};
};
static {
clearImageFromDataCachedImages.setDaemon(true);
clearImageFromDataCachedImages.start();
}
/**
* By default, keep in memory the .
*
@@ -169,12 +202,17 @@ public class ImageUtils {
*/
public static ImageDescriptor createImageFromData(byte[] data, boolean... keepInMemory) {
if (data != null) {
ImageDataProvider imageProvider = imageFromDataCachedImages.get(data);
ImageDataProvider imageProvider = null;
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
if(findKey.isPresent()) {
imageProvider = imageFromDataCachedImages.get(findKey.get());
}
if (imageProvider == null) {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
ImageData img = new ImageData(bais);
imageProvider = new TalendImageProvider(img);
imageFromDataCachedImages.put(data, imageProvider);
cachedImagesTimeKeeping.put(System.currentTimeMillis(), data);
}
return ImageDescriptor.createFromImageDataProvider(imageProvider);
}
@@ -183,8 +221,9 @@ public class ImageUtils {
public static void disposeImages(byte[] data) {
if (data != null) {
if (imageFromDataCachedImages.get(data) != null) {
imageFromDataCachedImages.remove(data);
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
if(findKey.isPresent()) {
imageFromDataCachedImages.remove(findKey.get());
}
}
}

View File

@@ -55,6 +55,11 @@ public class NetworkUtil {
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
/*
* see ITalendCorePrefConstants.PERFORMANCE_TAC_READ_TIMEOUT
*/
private static final String PERFORMANCE_TAC_READ_TIMEOUT = "PERFORMANCE_TAC_READ_TIMEOUT"; //$NON-NLS-1$
private static final String PROP_DISABLEDSCHEMES_USE_DEFAULT = "talend.studio.jdk.http.auth.tunneling.disabledSchemes.useDefault";
@@ -149,10 +154,10 @@ public class NetworkUtil {
}
public static int getNexusTimeout() {
int timeout = DEFAULT_NEXUS_TIMEOUT;
int timeout = Integer.getInteger("nexus.timeout.min", DEFAULT_NEXUS_TIMEOUT);
try {
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
timeout = Math.max(timeout, node.getInt(PERFORMANCE_TAC_READ_TIMEOUT, 0) * 1000);
} catch (Throwable e) {
ExceptionHandler.process(e);
}

View File

@@ -88,13 +88,17 @@ public class EclipseCommandLine {
static public final String TALEND_CONTINUE_LOGON = "-talendContinueLogon";
static public final String TALEND_CONTINUE_UPDATE = "-talendContinueUpdate";
static public final String TALEND_CLEAN_M2 = "-talendCleanM2";
static public final String TALEND_CLEAN_UNINSTALLED_BUNDLES = "-talendCleanUninstalledBundles";
static public final String PROP_KEY_PROFILE_ID = "eclipse.p2.profile";
static public final String ARG_BRANCH = "-branch";
static public final String ARG_PROJECT = "-project";
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$

View File

@@ -39,6 +39,19 @@ public final class Constant {
*/
public static final String ITEM_EVENT_PROPERTY_KEY = "item"; //$NON-NLS-1$
/**
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
* cloudVersion string.
*/
public static final String VERSION_EVENT_CLOUD_KEY = "cloudVersion"; //$NON-NLS-1$
/**
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
* cloudName string.
*/
public static final String VERSION_EVENT_CLOUD_NAME = "cloudName"; //$NON-NLS-1$
/**
* key used to get/set the property of an event related to a list of files modified in the repository
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
@@ -56,6 +69,11 @@ public final class Constant {
*/
public static final String PROJECT_RELOAD_EVENT_SUFFIX = "project"; //$NON-NLS-1$
/**
* suffix used when issuing an event on the OSGI event bus when published to cloud.
*/
public static final String CLOUD_PUBLISH_EVENT_SUFFIX = "cloud"; //$NON-NLS-1$
/**
* key used to get/set the property of an event related to a list of files modified in the repository

View File

@@ -19,6 +19,8 @@ import org.talend.repository.model.RepositoryConstants;
*/
public interface FileConstants {
String DOT = ".";
String OLD_TALEND_PROJECT_FILENAME = "talendProject"; //$NON-NLS-1$
String LOCAL_PROJECT_FILENAME = "talend.project"; //$NON-NLS-1$
@@ -112,5 +114,4 @@ public interface FileConstants {
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
String MAVEN_FOLDER_NAME = "MAVEN-INF";
}

View File

@@ -0,0 +1,280 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.repository.model;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.ICoreService;
import org.talend.core.PluginChecker;
import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.properties.SQLPatternItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.pendo.PendoItemSignatureUtil;
import org.talend.core.pendo.PendoItemSignatureUtil.SignatureStatus;
import org.talend.core.pendo.PendoItemSignatureUtil.TOSProdNameEnum;
import org.talend.core.pendo.PendoItemSignatureUtil.ValueEnum;
import org.talend.core.pendo.PendoTrackDataUtil;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.properties.PendoSignLogonProperties;
import org.talend.utils.migration.MigrationTokenUtil;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoItemSignatureManager {
private PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
private static PendoItemSignatureManager manager;
private static boolean isTrackAvailable;
static {
manager = new PendoItemSignatureManager();
try {
isTrackAvailable = PluginChecker.isTIS() && PendoTrackSender.getInstance().isTrackSendAvailable();
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
}
private PendoItemSignatureManager() {
}
public static PendoItemSignatureManager getInstance() {
return manager;
}
private Set<String> signByLoginMigrationItems = new HashSet<String>();
public void countItemSignByMigration(String file) {
if (!isTrackAvailable) {
return;
}
if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
signByLoginMigrationItems.add(file);
}
}
public void collectProperties() {
ICoreService coreService = ICoreService.get();
if (coreService == null || !isTrackAvailable) {
return;
}
try {
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
String seperator = "@";
Map<String, Integer> tosUnsignItemMap = new HashMap<String, Integer>();
Map<String, Integer> invalidItemVersionMap = new HashMap<String, Integer>();
Set<String> checkedItem = new HashSet<String>();
ProxyRepositoryFactory proxyRepositoryFactory = ProxyRepositoryFactory.getInstance();
ERepositoryObjectType[] types = (ERepositoryObjectType[]) ERepositoryObjectType.values();
for (ERepositoryObjectType type : types) {
List<IRepositoryViewObject> allObjectList = proxyRepositoryFactory.getAll(type);
for (IRepositoryViewObject repositoryObject : allObjectList) {
Property property = repositoryObject.getProperty();
if (property == null || property.eResource() == null) {
continue;
}
String itemKey = repositoryObject.getRepositoryObjectType() + seperator + property.getId() + seperator
+ property.getVersion();
if (isBuiltInItem(repositoryObject) || checkedItem.contains(itemKey)) {
continue;
}
checkedItem.add(itemKey);
Integer verifyResult = null;
try {
verifyResult = coreService.getSignatureVerifyResult(property, null, false);
if (verifyResult != null) {
switch (verifyResult) {
case SignatureStatus.V_VALID:
itemSignProperties.setValidItems(itemSignProperties.getValidItems() + 1);
break;
case SignatureStatus.V_UNSIGNED:
String itemProductName = PendoItemSignatureUtil
.getItemProductName(property);
if (StringUtils.isNotBlank(itemProductName)) {
String tosCategory = TOSProdNameEnum.getTOSCategoryByProdName(itemProductName);
if (StringUtils.isBlank(tosCategory)) {
itemSignProperties.setUnsignEEItems(itemSignProperties.getUnsignEEItems() + 1);
} else {
if (tosUnsignItemMap.get(tosCategory) == null) {
tosUnsignItemMap.put(tosCategory, 0);
}
tosUnsignItemMap.put(tosCategory, tosUnsignItemMap.get(tosCategory) + 1);
}
}
addInvalidItemVersion(property, invalidItemVersionMap);
break;
default:
addInvalidItemVersion(property, invalidItemVersionMap);
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
}
}
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
if (verifyResult == null) {
// exception during verify
addInvalidItemVersion(property, invalidItemVersionMap);
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
}
}
}
}
itemSignProperties.setInvalidItemSourceVersion(getSortInvalidItems(invalidItemVersionMap));
itemSignProperties.setUnsignSEItems(getSortTOSUnsignItems(tosUnsignItemMap));
itemSignProperties.setStudioVersion(PendoItemSignatureUtil.getStudioVersion());
if (coreService.isInValidGP()) {
itemSignProperties.setGracePeriod(ValueEnum.YES.getDisplayValue());
} else {
itemSignProperties.setGracePeriod(ValueEnum.NO.getDisplayValue());
}
String prodDate = PendoItemSignatureUtil.formatDate(System.getProperty(PendoItemSignatureUtil.PROD_DATE_ID),
"yyyy-MM-dd");
itemSignProperties.setInstallDate(prodDate);
String projectCreateDate = PendoItemSignatureUtil.getCurrentProjectCreateDate();
itemSignProperties.setProjectCreateDate(PendoItemSignatureUtil.formatDate(projectCreateDate, "yyyy-MM-dd"));
String value = System.getProperty(PendoItemSignatureUtil.MIGRATION_TOKEN_KEY);
Map<String, Date> tokenTime = MigrationTokenUtil.getMigrationTokenTime(value);
if (tokenTime == null || tokenTime.isEmpty()) {
itemSignProperties.setValidMigrationToken(ValueEnum.NOT_APPLICATE.getDisplayValue());
} else {
String customer = coreService.getLicenseCustomer();
Date tokenDate = tokenTime.get(customer);
Date currentDate = new Date();
if (tokenDate != null && tokenDate.after(currentDate)) {
itemSignProperties.setValidMigrationToken(ValueEnum.YES.getDisplayValue());
} else {
itemSignProperties.setValidMigrationToken(ValueEnum.NO.getDisplayValue());
}
}
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
}
private void addInvalidItemVersion(Property property, Map<String, Integer> invalidItemVersionMap) {
String itemProductVersion = PendoItemSignatureUtil.getItemProductVersion(property);
if (StringUtils.isNotBlank(itemProductVersion)) {
if (invalidItemVersionMap.get(itemProductVersion) == null) {
invalidItemVersionMap.put(itemProductVersion, 0);
}
invalidItemVersionMap.put(itemProductVersion, invalidItemVersionMap.get(itemProductVersion) + 1);
}
}
private boolean isBuiltInItem(IRepositoryViewObject repositoryObject) {
if (repositoryObject.getProperty().getItem() instanceof SQLPatternItem) {
SQLPatternItem sqlPatternItem = (SQLPatternItem) repositoryObject.getProperty().getItem();
if (sqlPatternItem.isSystem()) {
return true;
}
}
if (repositoryObject.getProperty().getItem() instanceof RoutineItem) {
RoutineItem routineItem = (RoutineItem) repositoryObject.getProperty().getItem();
if (routineItem.isBuiltIn()) {
return true;
}
}
return false;
}
private String getSortTOSUnsignItems(Map<String, Integer> tosUnsignItemMap) {
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(tosUnsignItemMap.entrySet());
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>() {
@Override
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
List<TOSProdNameEnum> categoryList = Arrays.asList(TOSProdNameEnum.values());
TOSProdNameEnum category1 = TOSProdNameEnum.valueOf(o1.getKey());
TOSProdNameEnum category2 = TOSProdNameEnum.valueOf(o2.getKey());
return categoryList.indexOf(category1) - categoryList.indexOf(category2);
}
});
Map<String, Integer> tosUnsignMap = new LinkedHashMap<String, Integer>();
resultMapList.forEach(entry -> {
tosUnsignMap.put(entry.getKey(), entry.getValue());
});
return PendoTrackDataUtil.convertEntityJsonString(tosUnsignMap);
}
private String getSortInvalidItems(Map<String, Integer> invalidItemVersionMap) {
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(
invalidItemVersionMap.entrySet());
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>(){
@Override
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
return o1.getKey().compareTo(o2.getKey());
}
});
Map<String, Integer> invalidMap = new LinkedHashMap<String, Integer>();
resultMapList.forEach(entry -> {
invalidMap.put(entry.getKey(), entry.getValue());
});
return PendoTrackDataUtil.convertEntityJsonString(invalidMap);
}
public void sendTrackToPendo() {
if (!isTrackAvailable) {
return;
}
Job job = new Job("send pendo track") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
collectProperties();
PendoTrackSender.getInstance().sendTrackData(TrackEvent.ITEM_SIGNATURE, itemSignProperties);
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
}
return Status.OK_STATUS;
}
};
job.setUser(false);
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
}

View File

@@ -16,7 +16,6 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.Dictionary;
@@ -94,12 +93,12 @@ import org.talend.core.context.CommandLineContext;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.exception.TalendInternalPersistenceException;
import org.talend.core.hadoop.BigDataBasicUtil;
import org.talend.core.hadoop.IHadoopDistributionService;
import org.talend.core.model.components.IComponentsService;
import org.talend.core.model.general.ILibrariesService;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.migration.IMigrationToolService;
@@ -2211,6 +2210,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ExceptionHandler.process(e);
}
// init dynamic distirbution after `beforeLogon`, before loading libraries.
initDynamicDistribution(monitor);
// need to set m2
LoginTaskRegistryReader loginTaskRegistryReader = new LoginTaskRegistryReader();
ILoginTask[] allLoginTasks = loginTaskRegistryReader.getAllCommandlineTaskListInstance();
@@ -2278,14 +2280,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
try {
// for new added mapping file, sync to project mapping folder
MetadataTalendType.syncNewMappingFileToProject();
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
}
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
ProjectManager.getInstance().getMigrationRecords().clear();
@@ -2325,6 +2319,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException(""); //$NON-NLS-1$
}
PendoItemSignatureManager.getInstance().sendTrackToPendo();
boolean isCommandLineLocalRefProject = false;
CommandLineContext commandLineContext = (CommandLineContext) CoreRuntimePlugin.getInstance().getContext()
@@ -2363,17 +2358,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
}
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
@@ -2425,6 +2409,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
throw e;
}
}
private void initDynamicDistribution(IProgressMonitor monitor) {
try {
if (BigDataBasicUtil.isDynamicDistributionLoaded(monitor)) {
BigDataBasicUtil.reloadAllDynamicDistributions(monitor);
} else {
BigDataBasicUtil.loadDynamicDistribution(monitor);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
// to fix the ops4j and m2e.core maven handler conflict issue TUP-31484
private void unregisterM2EServiceBeforeLogon() {

View File

@@ -1,125 +1,127 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// 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.core.repository.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.events.SelectionListener;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ui.branding.IBrandingService;
/**
* Provides, using extension points, implementation of many factories.
*
* <ul>
* <li>IProcessFactory</li>
* </ul>
*
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
*/
public class RepositoryFactoryProvider {
private static List<IRepositoryFactory> list = null;
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
"RepositoryFactory", 1, -1); //$NON-NLS-1$
public static List<IRepositoryFactory> getAvailableRepositories() {
if (list == null) {
list = new ArrayList<IRepositoryFactory>();
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
String hiddenRepository[] = new String[]{};
if (hiddenRepos != null) {
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
}
boolean isPoweredByTalend = false;
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
.getService(IBrandingService.class);
isPoweredByTalend = brandingService.isPoweredbyTalend();
for (IConfigurationElement current : extension) {
try {
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
continue;
}
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
continue;
}
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
// Getting dynamic login fields:
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
currentAction.getFields().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
currentAction.getButtons().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name")); //$NON-NLS-1$
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
key.addChoice(value, label);
}
currentAction.getChoices().add(key);
}
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
continue;
}
list.add(currentAction);
} catch (CoreException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
}
return list;
}
public static IRepositoryFactory getRepositoriyById(String id) {
for (IRepositoryFactory current : getAvailableRepositories()) {
if (current.getId().equals(id)) {
return current;
}
}
return null;
}
}
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// 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.core.repository.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.events.SelectionListener;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ui.branding.IBrandingService;
/**
* Provides, using extension points, implementation of many factories.
*
* <ul>
* <li>IProcessFactory</li>
* </ul>
*
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
*/
public class RepositoryFactoryProvider {
private static List<IRepositoryFactory> list = null;
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
"RepositoryFactory", 1, -1); //$NON-NLS-1$
public static synchronized List<IRepositoryFactory> getAvailableRepositories() {
if (list == null) {
list = new ArrayList<IRepositoryFactory>();
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
String hiddenRepository[] = new String[]{};
if (hiddenRepos != null) {
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
}
boolean isPoweredByTalend = false;
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
.getService(IBrandingService.class);
isPoweredByTalend = brandingService.isPoweredbyTalend();
for (IConfigurationElement current : extension) {
try {
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
continue;
}
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
continue;
}
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
// Getting dynamic login fields:
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
currentAction.getFields().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
currentAction.getButtons().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name")); //$NON-NLS-1$
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
key.addChoice(value, label);
}
currentAction.getChoices().add(key);
}
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
continue;
}
list.add(currentAction);
} catch (CoreException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
}
return list;
}
public static IRepositoryFactory getRepositoriyById(String id) {
for (IRepositoryFactory current : getAvailableRepositories()) {
if (current.getId().equals(id)) {
return current;
}
}
ExceptionHandler.log("Can't find repository factory for: " + id);
return null;
}
}

View File

@@ -25,6 +25,7 @@ import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.RoutinesJarItem;
import org.talend.core.model.repository.AbstractRepositoryContentHandler;
import org.talend.core.model.repository.ERepositoryObjectType;
import java.io.IOException;
public abstract class AbstractResourceRepositoryContentHandler extends AbstractRepositoryContentHandler {
@@ -83,6 +84,10 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
}
return itemResource;
}
protected void copyScreenshotFile(Item originalItem, Item newItem) throws IOException {
getXmiResourceManager().copyScreenshotFile(originalItem, newItem);
}
protected XmiResourceManager getXmiResourceManager() {
if (null == xmiResourceManager) {

View File

@@ -52,6 +52,7 @@ Export-Package: org.talend.analysistask,
org.talend.core.model.xml,
org.talend.core.nexus,
org.talend.core.pendo,
org.talend.core.pendo.mapper,
org.talend.core.pendo.properties,
org.talend.core.prefs,
org.talend.core.repository,
@@ -128,7 +129,8 @@ Require-Bundle: org.eclipse.jdt.core,
jackson-core-asl,
org.talend.libraries.jackson,
org.eclipse.m2e.core,
org.talend.libraries.apache.common
org.talend.libraries.apache.common,
org.talend.signon.util
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,

View File

@@ -0,0 +1,238 @@
{
"mapping_AS400.xml": {
"28fe6b6c94e4e486d431873ba556c1c18ae09140": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"3d4845af057220e02773029683a0fd99dee489e5": "a9861e98b581dfdafa7839238710bd930989960a",
"458d597928478f43c94098dfe47d9bb8d07e89e2": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"76a4aa354d986ed5682797337817a8ddbb80ae89": "d568bf814d7b27fc7c63cbd07ea6b4a3b0ad3ff8"
},
"mapping_Access.xml": {
"55d314ed9708263bfcec193abb57a1e25806626e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"718db25f8e86d6b61284a4ffdc1fd19faffb98a9": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_AmazonAurora.xml": {
"a93c809bdf8e5df8095580e3f23b29658e044302": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
"ba16c203a8a993e13ebab0da5cccb7a5e1c01e56": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_BigQuery.xml": {
"db723e5b4a38bbc8316593be33ab9d74f57776e6": "e1770847f656589810753c19d420228326462f34",
"e12df204d9f5081971d03c64b43de2456557e02e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"e9c02d3e9bc3a3649fd33803353e61db6fcd2ea8": "01749151dcc171ebb6457ba872ee352d58a1dfd4"
},
"mapping_Cassandra.xml": {
"20ed188f8824c14852304920cf82ca7119eb1be0": "ab7b23e6c94946ca2358cc0cfd82c4d77a4c5839",
"692353c474569bafd44854b7f7343929beddee83": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"e42bdadd0009e7595773edcc1652f181a8fdf151": "76ed27054255165c23d8c0c8db081a41a50430c9",
"ff005c2bfc47789e5715e949f98bd6d72c934b54": "ebe76b0edd0eda3488527b95f2a6d925d091a408"
},
"mapping_Cassandra22_datastax.xml": {
"2ddd561eac2a04a7b08949c0764c5e76f80c89f5": "b0378fb45ae238b884417db468872341e156f138",
"33b483680a44a8229b09698df3803f5834987f18": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Cassandra40.xml": {
"e92b373950021eb425db9e3eba8391f98ce7e4a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Cassandra_datastax.xml": {
"3cb6b5cf167fb5ba82b3ebdc602f22ecdacdafb5": "56fad9370b27d03a9636d8368350274480fc2bce",
"ca09b169eee6e6dcfa81f976bd98ef4aae81cdf2": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"e1620c54d6793c6d1885e3e2fcdf242c0e3a4059": "df28e2b92f57ba0486215f334edb649a58788712"
},
"mapping_Databricks_Delta_Lake.xml": {
"d48793d7173ea7d07090f5e683045c3f60cc12c8": "21f5ac777158fc55288af7337737aa675e20bdf3",
"dcbe4533fe16fee70f24702edddec78b81e26463": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Exasol.xml": {
"21ff2b1a69b7242fa48a1218b0d5f8a6b0ba607e": "a0d36282ff5d6825b206ab6f794d13e048ac2192",
"3768b1e7a941e66f8a70ad7e1a65aa7d2b598daa": "7ef9ede0f988f10489c1f5ffe16ea24d2d14ecdd",
"6babf3080a3baa05bcd8a2815d2f31a0b15e1550": "02a98e53d3b6457272768ce0ae5c82992b403465",
"7de8a81bc2eb7c4da639af148c2c67b5c6de4bc0": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"a728306274b817e8afa0101d3b7621398addc2f3": "b5b116b3758f58e7500058e1805bf93bf5a2f0c1",
"dc2eba14e50ce7c413fb7696355e67d26fe5fb9b": "57bacf1f97951fcf6f650f1afdec35b5ea22638c",
"f670268dfd5a8f80fbdbe6fe4ad668cb6c8f25d6": "ead0fb11f124cf05ad0f7fde21cdedbb3cf2160b"
},
"mapping_Firebird.xml": {
"51a041d0b43678433f6303aebac5f92bfdb7b8a6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"d504ece6ca9e10e23f5e0f05660e5f49e7d999ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_Greenplum.xml": {
"16418522006e4505c7fb7d44c4d06928de20eaf8": "ec04f46618ef0586081fd3b17ad7b85239958194",
"4f3e1b53baca729eef796979e97592c8724a2d91": "caf54e3d2b6c6d685cdcf2a243c28c408a9cd652",
"525a7ca1a48599a840b1feca641ef6a413d7384b": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"c4ed635e67d7d82c24008677f313e17df98f5d08": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_H2.xml": {
"4e3ed630d3133326a0cf4728865b3efa4cbecc63": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"84b0b863c0532f93bffc0ab54d98a449f331e319": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"cb093084dc1dc3f999707a1b9d1474f87bbf6d17": "341b1220b6bc6bf59eef81e97c694d06134bd8a2"
},
"mapping_HSQLDB.xml": {
"0a37e2aec423d0c401aff092e4fda9e01c5dd4ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"73af8e3e8646ea58f4cfe60fe4905e90340b3e12": "890a391388725c112ffbbd2dd8b8d267305df4a7",
"98819a80cd8994a02579ea1d9b0992a0b68a5403": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Hive.xml": {
"0265c6f16ab2c9eea7da660e4e1c8a3ec7bc0ab3": "37ef13c438cda4cd1c3e091d99a00036b328e57f",
"1f5811f41b2836cd7baeb23daef91d2ea313f2c6": "3646a1bcd980a3209501a5c846338823f55d74b2",
"21a44cd9d32a5478a4de61a86b398a9ef80401ac": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"5444fa9a484704d774259430623e0db1495a867f": "ef872732cde37c6c7684dc773641be0b78f5c57c",
"e7f128915578dd29538a7debeb5f47528b5a6e59": "86ba7c19d9300a02dbcb0801852e728acd261132"
},
"mapping_IBMDB2.xml": {
"dc42cf143f3a0f10ad8c280f16ef44ae1f907123": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"f8aea23cc5b48ebb3cdd229be3f66b28890ff4f8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Impala.xml": {
"55ed99aa28c989bd5777f41b7c87ed4eb9f245a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Informix.xml": {
"40da9213cf85b1712f38474dea4f2ec3447dfe3c": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"938e41f3719c29248d4f58c303464bbfb50e343a": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_Ingres.xml": {
"811e8bf4e7bc2e6b9c3fcb5f074601a873f15e1d": "15afc1b074c8a6e4aee39c1d5a3347555dbe36a0",
"95873faa81ee3de2eea02efab5c127e6188df796": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"9c5682f564e861e1db3b5184fd40e718e0912a4a": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
},
"mapping_Interbase.xml": {
"4d37474d07991154aa0148e7a030c4725d45ef0d": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"71e8386c3e21f726550234c52d3ca50dcfa655de": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
},
"mapping_JavaDB.xml": {
"652fd7f2f11fc27903d333e1699cc419804caa66": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"66dbe13a0043798498f37b6e5495bc3aaa8fb90b": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_MSSQL.xml": {
"305eeb294ae8bb07bee7d1e182e431e2e7f6273d": "d7761630e63b399f89eaaeb9e19e775bf1579dde",
"b93c0825ffd799d89608239385d7e4b60de96209": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_MaxDB.xml": {
"586fc7ac94a9abec8a76a587dc6aa0fae0079bf3": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_MicrosoftCrm.xml": {
"e1c5e77e19adea1406e5bb511a1c6adb8b610bfe": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_MicrosoftCrm_odata.xml": {
"1166b9ce6ce163d11a57046db5ee2dc9d5e496df": "e86fd3fd5c3b4ba9ff613155fba014a80c40cf01",
"3f25ced1039b99d1c07b23e3d27cac1562e52a6f": "c1190dfa35e839496745516dbcfeb8a309fa49d0",
"750541f00f3c5da6007623f3514add6dc3417a5f": "54331fa4ec501557eb9c32d434c332cf3d121349",
"9612a2611bd29461dd46fc70f0e2841892f3f096": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_MsOdbc.xml": {
"01561cb7b5630a4a6aed576215ccdb3991d2db52": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"a9c94a6255061e8100b15590da35196464b77d46": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Mysql.xml": {
"128d7d66eb994a032128949fcbe0c953c158beaa": "956802047d6623ba61e2da68aba2db8f38bca48a",
"522654fad6fa3d008ef386fc9360ae51df910729": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"5dfc7b71e1f6a9fad6ebf47a1d748893c85bbe5e": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
"894b0d1d2c23c98f2e14920013b82524334dd255": "74b3640e2923d4c60c92042ff03d15b4ac4e9341",
"8cb3d2b06d8a2b12e8673e6e9519f85ec08b35ec": "f22d442cbde13623a1b96c15ea2df8dd1a7d755e",
"a94341e5bd6c4ba0eef57f9d6d3cc6c0006c785b": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
"d7e74c8e9f8a47ab258472ec43236d2933c70838": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"edc9d1453c8f9ac8548822ff2f90a4defcd02094": "fd4d974c755ced1969b27126844b3f462bca1a52"
},
"mapping_Netezza.xml": {
"0c769aa277190990fb33a918cc57189b9ba6306f": "c8ca64da55ceb677fd97169f6a924ec80f01b2fc",
"0f5e9677f936a5414ce6593229aa47ea5b757276": "3074a57eee1407a413e460ed27e31d48d21d609b",
"b3e25e55f8281cb616b3f549e6a2e5a83d4ad62a": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Oracle.xml": {
"0407cea7e87144cb601bc9a3f039121feca79b65": "cb6b87dabdc71be0f1db4bdca694bcb61b679c05",
"064d2a5940379346638412dd7f4cb7dbcc30e672": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"26a2295f6401de6e17feb61b261f7fbdfc4d609d": "e7604a488f339028a3cf14ae4031b0fb3fd50bcc",
"9b0306aacec772d9d82be49ab702254ce1e08bea": "912702dc8ea921a34ea0522235db65f8655bf8e9",
"df2537b329d0b09828c281e62208daf379f7b60a": "544faa63bbe63dd070a94c84139c705ac6432314"
},
"mapping_ParAccel.xml": {
"1ba71027d3a60773c7c008143c2146e4db2ef112": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"5085a1e922f77895a2f7c85e2347acfe03034493": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
},
"mapping_Postgres.xml": {
"ce8b7f58644b8f7814a5522d172b4192ff89bd4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"e1c1f04f95222bcadda336d6a4f0ea07c6ebb08e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_PostgresPlus.xml": {
"69b7d7f722538a322fb0bf867177d1ce5a0d7ad6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"f576a7bb0327eeff1fd63a9a09106ae33f3ec90e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_Redshift.xml": {
"0cc6e153fe35041a009cb222e0276e35ddbc92f1": "2023289b9965fc14b959463ba5050be6aead361a",
"3b941be88a5f13bd8fd905fb1fa5f2a241e89ed9": "915a307b629c7a75bcbedc86267db1e8995b77f3",
"85ba89fdadfca4a2d755856a75e904f6015926a9": "de08533f6561319fc2914181a2705ccd75e29c40",
"8f3eda24c1f413b17b2b8c48695dbd786fa29b6b": "93112768d7eea6df44d92a3efbd4f1dfa20e06b6",
"ab86d7fda94e0b368f739f73994ce2a2147be12d": "0fd3f58b7aa78aaae6fb40d042780bec64da75e6",
"ad0eecc7e9f25c3b904cc11b062a8185456478ee": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Redshift_new.xml": {
"43085952e178e2c570ab7d2a262278dd2896dd96": "699efe42a33aab3ca0bbaa7a1abee23368e61606"
},
"mapping_SAPHana.xml": {
"1a07a8174468a5a1d55378dd0e21d7c1f9e531bc": "48ea42be6b348a3c993760e7f2c94c58ac08fdae",
"331ae8a035e6b1f2cd722be6411df4ae4a95bb33": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_SQLite.xml": {
"0a97b6e8acf8bd16aa34a3c01707f1e2a9eeff1f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"b7b7b7c690efacc208316c911571a8513b5ea713": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_SingleStore.xml": {
"9da7d92af5e9b0697436f74fffd190e8af061567": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Snowflake.xml": {
"d459c6be3786f9358615eaf692a1c7920b4c6e74": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_Sybase.xml": {
"081038547cac8342cf5cadf8bfd02fe4d2929323": "1ff9877dce90e2ef39b267ea60de534796035a95",
"09a0f4dc71ff9a844e1162600409317e92e1ff18": "28534ffb4ae599adec53853776856e82c23c815a",
"4ee2c12f372953e77404481a962b3aca14abadb0": "f02b1b6902098b2da90cde6b22a9a49ec328970a",
"5752dcfa409e903af77587f151d580c68c9e4ac7": "3db0fa1fbed8ae378d52aa8c36b6fed55d184e5b",
"6f4e7913b4b31e8fb4e097690c8b903a58842283": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"7676e2d94473564322ce37cad92b7f8b09751b1b": "1cc6237de63892e097c77637ac8457cf8fefbf6f",
"8bbad7895713f3a399ddb195c40353e18d3e83b9": "984ca27e4ee0177793b2111797700390424cb746",
"bbc091c50a7bd8a8fe630d99a9c2e3f2f878ac88": "67a9b521c9d698b3411fb49410ac61a15f4bc7db",
"d841719dcf79a12d0189301e40c0e9e973a45c4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"e103a9671d9bcf360fd2e61ee97f4547d0d52241": "e19031add3dc54bf9d0e731f3a05738af48ebb6d",
"e1c42d74cc0dc3681b5bd45a901a3bedeb53ec68": "75df15acaa5c8d1dcd4a8e855e0df969fdea25d5",
"e30d1f01e88bdaf926855e00d1aef3a37a7eb6e4": "c91dd79086a42dce5417de77bb7ce61c0bd6cbbf",
"ee5d7f5f9510f63c340f87862327b869bf4cb743": "607764748cdbff669d2ccfcbaafdaa0d83598f32"
},
"mapping_Teradata.xml": {
"10ed107c1d66b38d51739ffdd0820db676c42cef": "45dbf10541f6dd32283038bcc5b04b10e305770a",
"55e6a511c2cb39aca11de302a3850eb2d1f6e3a5": "fc652f1cc70f6caa05d5c65e57115f86653f7841",
"ac9ffae887ab4d20d4eca0eddc83163e99507ec8": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"f9b0367424f721cd8029d3540c9a82f39d74a6b4": "c002b50a69b8a0193780e7c0d1788bbd9a5145c3"
},
"mapping_VectorWise.xml": {
"06f86121a9492b3104047691b19718a5d9d49be9": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb",
"edf255202bcfad77ff6f3fac11714891934225c4": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
},
"mapping_Vertica.xml": {
"28153eaab1c47b8718ca3c49553ec40b047d2878": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
"2ee78d7679d4201ad29adba4cc0a48084f161e25": "eecc481d671d330bfb46406ab2533830c668bf22",
"819be4680c04a7f77c51fc65ebd1d964a714aa78": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"9218d5e7b682513ddf1b891f5f0467ab9938fec3": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
"d9745a57d9f1b6c638ebd57cd5281be020e0614c": "e8f788c5c260f9b82eaaa88d0402423d86a5680d",
"dec55a19094d1bcc20f12a8888b27460e83c2e67": "3b582b21fc5ac7ccfb05321c7923591433ced716"
},
"mapping_XSD.xml": {
"1ef837521e274c5b93f5f228955204285b3dd28a": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"9c454252343dfe1400d356cbf41bf88e842b4e1e": "c615b3a622e2f6ba8577e812e71977d9f1b1930d"
},
"mapping_dynamodb.xml": {
"891099e88d8074570dc029f9b7d8b04bbc241383": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_ebcdic.xml": {
"b47b25edc9e40d312b548270dbb3f978475be4e7": "7007071c9cf718d34da7d61208ceea7f05de94d0"
},
"mapping_sap.xml": {
"0339bc60ae47e3796c343eee7e2fb1cb1869cefa": "ee49a27e5c3ba3217ab497b1cd4467c088e59f5e",
"1f41a55f6f7f1d6d2118e766daf7e3dbfd77551d": "7007071c9cf718d34da7d61208ceea7f05de94d0",
"64c23be0c363ab703528677c999e4ef707d54497": "27908d5685066221f02cd3890a5319838215eb8b",
"83688cf3134e60d9f5a08b316643a41246717e92": "740c431e0b623cc7d41166588961028ad3efab80",
"9df72b6a1f1a72d9be1a4a7fd428873ad9b75bff": "94804b5e96a71d63a294eb9bcfbbb5290824009f",
"a300fcd290aa65c254c44d683d30a9fa6ae14a2f": "45e5d88e9c49cb87b47413468073c571f60c0117",
"b74c01dff88a52afca5f8c84fbe41d71a34eb6b5": "32832fe0edfbd10d50ed85528481e5c9ca2ec8e0",
"c814f616005e1637ec107dd8c0f269bd69661d2e": "7d07608dceb06f7364b5bb8babc0f6e921fc443a"
},
"mapping_sas.xml": {
"4aeb0deb41f61dbe69e85e780fb1e985c9f3d758": "fd44bfb0ee3fc8288465507b937c53619f43c0ec"
}
}

View File

@@ -31,6 +31,7 @@ import org.talend.core.model.metadata.ColumnNameChanged;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
@@ -116,6 +117,7 @@ public interface ICoreService extends IService {
public String validateValueForDBType(String columnName);
@Deprecated
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
public IPreferenceStore getPreferenceStore();
@@ -124,6 +126,7 @@ public interface ICoreService extends IService {
public IMetadataTable convert(MetadataTable originalTable);
@Deprecated
public void syncMappingsFileFromSystemToProject();
/**
@@ -132,4 +135,17 @@ public interface ICoreService extends IService {
*/
void installComponents(IProgressMonitor monitor);
Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception;
String getLicenseCustomer();
boolean isInValidGP();
public static ICoreService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
}
return null;
}
}

View File

@@ -154,6 +154,10 @@ public interface ILibraryManagerService extends IService {
public boolean contains(String jarName);
public void clearCache();
public void clearCache(boolean cleanIndex);
public void deployLibsFromCustomComponents();
@Deprecated
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);

View File

@@ -12,12 +12,12 @@
// ============================================================================
package org.talend.core;
import org.talend.core.model.process.AbstractExternalNode;
import org.talend.core.model.process.IExternalNode;
import org.talend.core.model.process.INode;
public interface ITDQComponentService extends IService {
public boolean isTDQExternalComponent(String componentName);
public AbstractExternalNode createExternalComponent(INode node);
public IExternalNode createExternalComponent(INode node);
}

View File

@@ -15,8 +15,10 @@ package org.talend.core.context;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.model.general.Project;
import org.talend.core.model.properties.User;
import org.talend.core.service.ICloudSignOnService;
/**
* DOC smallet class global comment. Detailled comment <br/>
@@ -139,6 +141,14 @@ public class RepositoryContext {
* @return the clearPassword
*/
public String getClearPassword() {
try {
if (ICloudSignOnService.get() != null && ICloudSignOnService.get().isSignViaCloud()) {
return ICloudSignOnService.get().getLatestToken().getAccessToken();
}
}catch (Exception ex) {
ExceptionHandler.process(ex);
}
return clearPassword;
}

View File

@@ -147,8 +147,15 @@ public enum EDatabaseTypeName {
MAPRDB(
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SNOWFLAKE(
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
"SNOWFLAKE",
"SNOWFLAKE",
Boolean.TRUE,
"SNOWFLAKE",
EDatabaseSchemaOrCatalogMapping.None,
EDatabaseSchemaOrCatalogMapping.None,
true);
// displayName is used in Java code.
private String displayName;

View File

@@ -238,6 +238,10 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_KEY = "CONN_PARA_KEY_SYNAPSE_CLIENT_KEY"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
@@ -347,11 +351,19 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE = "CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE";
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
public static final String CONN_PARA_KEY_DATABRICKS_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_NODE_TYPE";
public static final String CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE";
public static final String CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION="CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION";
public static final String CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER="CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER";
@@ -375,6 +387,8 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
public static final String CONN_PARA_KEY_KNOX_TIMEOUT="CONN_PARA_KEY_KNOX_TIMEOUT";
// CDE
public static final String CONN_PARA_KEY_CDE_API_ENDPOINT="CONN_PARA_KEY_CDE_API_ENDPOINT";
public static final String CONN_PARA_KEY_CDE_TOKEN="CONN_PARA_KEY_CDE_TOKEN";

View File

@@ -207,7 +207,13 @@ public enum EDatabaseConnTemplate {
"2181")), //$NON-NLS-1$
MAPRDB(new DbConnStr(EDatabaseTypeName.MAPRDB, "127.0.0.1", //$NON-NLS-1$
"5181")); //$NON-NLS-1$
"5181")), //$NON-NLS-1$
SNOWFLAKE(
new DbConnStr(EDatabaseTypeName.SNOWFLAKE, //
"jdbc:snowflake://<host>:<port>/?<property>",
"3306" //$NON-NLS-1$
)); // $NON-NLS-1$
private DbConnStr connStr;

View File

@@ -56,14 +56,14 @@ public enum EDatabaseVersion4Drivers {
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
@@ -86,7 +86,7 @@ public enum EDatabaseVersion4Drivers {
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.19.jar", "jackson-core-2.13.2.jar",
"jackson-databind-2.13.2.2.jar", "jackson-annotations-2.13.2.jar", "jcip-annotations-1.0-1.jar",
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.9.3.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -95,12 +95,12 @@ public enum EDatabaseVersion4Drivers {
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$

View File

@@ -130,6 +130,10 @@ public enum EHadoopProperties {
SYNAPSE_CLIENT_KEY,
SYNAPSE_USE_CERTIFICATE,
SYNAPSE_CLIENT_CERTIFICATE,
DEPLOY_FOLDER,
SPARK_DRIVER_MEM,
@@ -150,6 +154,14 @@ public enum EHadoopProperties {
DATABRICKS_DBFS_DEP_FOLDER,
DATABRICKS_NODE_TYPE,
DATABRICKS_DRIVER_NODE_TYPE,
DATABRICKS_RUNTIME_VERSION,
DATABRICKS_CLUSTER_TYPE,
UNIV_STANDALONE_MASTER,
UNIV_STANDALONE_EXEC_MEMORY,

View File

@@ -222,6 +222,32 @@ public class ContextUtils {
}
return parameterType;
}
// TUP-36519:For possible duplicate internalid scenario(TUP-36667) after several times' renaming in joblet. Loop all and find the nearest
// one.
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem, String paraName) {
if (contextType == null || uuId == null) {
return null;
}
ContextParameterType parameterType = null;
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
String paramId = null;
if (isFromContextItem) {
paramId = ResourceHelper.getUUID(param);
} else {
paramId = param.getInternalId();
}
if (uuId.equals(paramId)) {
parameterType = param;
if (paraName != null && StringUtils.equals(paraName, param.getName())) {
break;
}
}
}
return parameterType;
}
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem) {
@@ -846,7 +872,7 @@ public class ContextUtils {
if (item != null) {
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
paramLink.getId(), item instanceof ContextItem);
paramLink.getId(), item instanceof ContextItem, contextParameterType.getName());
if (repoContextParam != null
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
@@ -915,7 +941,7 @@ public class ContextUtils {
if (item != null) {
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
parameterLink.getId(), item instanceof ContextItem);
parameterLink.getId(), item instanceof ContextItem, parameterType.getName());
if (repoParameterType != null
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
renamedMap.put(repoParameterType.getName(), parameterType.getName());
@@ -975,7 +1001,7 @@ public class ContextUtils {
ContextParameterType contextParameterType = null;
if (paramLink != null && paramLink.getId() != null && contextType != null) {
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
contextItem instanceof ContextItem);
contextItem instanceof ContextItem, paramName);
}
if (contextParameterType != null) {// Compare use UUID
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {

View File

@@ -17,10 +17,15 @@ import java.util.Iterator;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.service.ICloudSignOnService;
import org.talend.repository.model.RepositoryConstants;
import org.talend.signon.util.TMCRepositoryUtil;
import org.talend.signon.util.TokenMode;
import org.talend.utils.json.JSONException;
import org.talend.utils.json.JSONObject;
@@ -58,12 +63,14 @@ public class ConnectionBean implements Cloneable {
private static final String TOKEN = "token"; //$NON-NLS-1$
private static final String URL = "url"; //$NON-NLS-1$
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
private String credentials = ""; //$NON-NLS-1$
public static final String CLOUD_TOKEN_ID ="cloud_token"; //$NON-NLS-1$
private static final String LOGIN_VIA_CLOUD = "login_via_cloud"; //$NON-NLS-1$
/**
* DOC smallet ConnectionBean constructor comment.
*/
@@ -89,6 +96,24 @@ public class ConnectionBean implements Cloneable {
newConnection.setPassword(""); //$NON-NLS-1$
return newConnection;
}
public static ConnectionBean getDefaultCloudConnectionBean(String dataCenter) {
ConnectionBean newConnection = new ConnectionBean();
newConnection.setName(Messages.getString("ConnectionBean.Cloud.name", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
newConnection.setDescription(Messages.getString("ConnectionBean.CloudConnection.description", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
newConnection.setRepositoryId(TMCRepositoryUtil.getRepositoryId(dataCenter));
newConnection.setToken(true);
newConnection.setStoreCredentials(true);
newConnection.setComplete(true);
newConnection.setLoginViaCloud(true);
newConnection.setWorkSpace(getRecentWorkSpace());
return newConnection;
}
protected static String getRecentWorkSpace() {
String filePath = new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
return filePath;
}
/**
* Getter for ID.
@@ -184,13 +209,22 @@ public class ConnectionBean implements Cloneable {
*/
public String getPassword() {
try {
if (conDetails.has(PASSWORD)) {
if (isStoreCredentials() && credentials != null) {
return this.credentials;
}
return conDetails.getString(PASSWORD);
} else if (conDetails.has(CLOUD_TOKEN_ID)){
String object = conDetails.getString(CLOUD_TOKEN_ID);
TokenMode token = TokenMode.parseFromJson(object, null);
if (ICloudSignOnService.get() != null) {
token = ICloudSignOnService.get().getLatestToken();
this.setConnectionToken(token);
}
return token.getAccessToken();
}
} catch (JSONException e) {
} catch (Exception e) {
ExceptionHandler.process(e);
}
return "";
@@ -215,7 +249,7 @@ public class ConnectionBean implements Cloneable {
* @return the user
*/
public String getUser() {
try {
try {
if (conDetails.has(USER)) {
String user = conDetails.getString(USER);
if (isToken()) {
@@ -226,7 +260,7 @@ public class ConnectionBean implements Cloneable {
}
}
return user;
}
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
@@ -320,6 +354,25 @@ public class ConnectionBean implements Cloneable {
ExceptionHandler.process(e);
}
}
public boolean isLoginViaCloud() {
try {
if (conDetails.has(LOGIN_VIA_CLOUD)) {
return (Boolean) conDetails.get(LOGIN_VIA_CLOUD);
}
} catch (JSONException e) {
// do nothing
}
return false;
}
public void setLoginViaCloud(boolean isLoginViaCloud) {
try {
conDetails.put(LOGIN_VIA_CLOUD, isLoginViaCloud);
} catch (JSONException e) {
// do nothing
}
}
@Override
public ConnectionBean clone() throws CloneNotSupportedException {
@@ -418,14 +471,21 @@ public class ConnectionBean implements Cloneable {
public String getUrl() {
try {
if (conDetails.has(URL)) {
return conDetails.getString(URL);
if (dynamicFields.containsKey(RepositoryConstants.REPOSITORY_URL)) {
return dynamicFields.get(RepositoryConstants.REPOSITORY_URL);
}
if (conDetails.has(RepositoryConstants.REPOSITORY_URL)) {
return conDetails.getString(RepositoryConstants.REPOSITORY_URL);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
public void setUrl(String url) {
dynamicFields.put(RepositoryConstants.REPOSITORY_URL, url);
}
public boolean isStoreCredentials() {
try {
@@ -453,4 +513,27 @@ public class ConnectionBean implements Cloneable {
public void setCredentials(String credentials) {
this.credentials = credentials;
}
public TokenMode getConnectionToken() {
try {
if (conDetails.has(CLOUD_TOKEN_ID)) {
String object = conDetails.getString(CLOUD_TOKEN_ID);
return TokenMode.parseFromJson(object, null);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return null;
}
public void setConnectionToken(TokenMode connectionToken) {
try {
conDetails.put(CLOUD_TOKEN_ID, TokenMode.writeToJson(connectionToken));
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
}

View File

@@ -194,6 +194,10 @@ public interface IMetadataConnection extends IMetadata {
public String getContextName();
public void setContextName(String contextName);
public boolean isSupportNLS();
public void setSupportNLS(boolean newSupportNLS);
/**
* Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For

View File

@@ -16,6 +16,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -24,18 +25,20 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.CoreException;
@@ -46,9 +49,9 @@ import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.SystemException;
import org.talend.commons.runtime.xml.XmlUtil;
import org.talend.commons.utils.io.FilesUtils;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.language.LanguageManager;
@@ -59,6 +62,8 @@ import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.RepositoryConstants;
import org.talend.utils.json.JSONObject;
import org.talend.utils.xml.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -75,14 +80,13 @@ import org.xml.sax.SAXException;
*/
public final class MetadataTalendType {
/**
*
*/
public static final String INTERNAL_MAPPINGS_FOLDER = "mappings"; //$NON-NLS-1$
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
public static final String FILE_MAPPING_REVISION = "mapping_revision.json"; //$NON-NLS-1$
public static final String MAPPING_FILE_PATTERN = "^mapping_.*\\.xml$"; //$NON-NLS-1$
private static ECodeLanguage codeLanguage;
@@ -459,13 +463,14 @@ public final class MetadataTalendType {
return list;
}
public static URL getSystemForderURLOfMappingsFile() throws SystemException {
public static URL getSystemFolderURLOfMappingsFile() throws SystemException {
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
URL url = null;
Path filePath = new Path(dirPath);
Bundle b = Platform.getBundle(CoreRuntimePlugin.PLUGIN_ID);
if (b != null) {
try {
// Enumeration<URL> entries = b.findEntries(dirPath, "mapping_*.xml", false);
url = FileLocator.toFileURL(FileLocator.find(b, filePath, null));
} catch (IOException e) {
throw new SystemException(e);
@@ -474,46 +479,169 @@ public final class MetadataTalendType {
return url;
}
public static URL getProjectForderURLOfMappingsFile() throws SystemException {
public static URL getProjectFolderURLOfMappingsFile() throws SystemException {
try {
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
IPath settingPath = new ProjectScope(project).getLocation();
IPath mappingPath = settingPath.append(dirPath);
File mappingFolder = mappingPath.toFile();
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
ICoreService service = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
service.syncMappingsFileFromSystemToProject();
}
}
return mappingFolder.toURL();
File mappingFolder = settingPath.append(dirPath).toFile();
return mappingFolder.toURI().toURL();
} catch (Exception e) {
throw new SystemException(e);
}
}
private static String getSha1OfFile(File file) {
String sha1 = null;
FileInputStream fileInputStream = null;
public static URL getProjectTempMappingFolder() {
try {
fileInputStream = new FileInputStream(file);
sha1 = DigestUtils.shaHex(fileInputStream);
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
File folder = ResourceUtils
.getFolder(project, RepositoryConstants.TEMP_DIRECTORY + "/" + INTERNAL_MAPPINGS_FOLDER, false).getLocation()
.toFile();
syncMappingFiles(folder, false);
return folder.toURI().toURL();
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
e.printStackTrace(); // Just print the exception for debug.
return null;
}
}
public static void syncMappingFiles(File target, boolean rename) {
if (!target.exists()) {
target.mkdir();
}
File[] arr = target.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
if (arr == null) {
arr = new File[0];
}
try {
Map<String, File> targetFileMap = Stream.of(arr).collect(Collectors.toMap(File::getName, Function.identity()));
Map<String, File> workingFileMap = getWorkingMappingFiles().stream()
.collect(Collectors.toMap(f -> getTargetName(f, rename), Function.identity(), (f1, f2) -> f1));
targetFileMap.entrySet().stream().filter(entry -> !workingFileMap.containsKey(entry.getKey()))
.forEach(entry -> entry.getValue().delete());
for (Entry<String, File> entry : workingFileMap.entrySet()) {
String targetName = entry.getKey();
File workingMappingFile = entry.getValue();
boolean needUpdate = false;
File targetMappingFile = targetFileMap.get(targetName);
if (targetMappingFile == null) {
targetMappingFile = new File(target, targetName);
needUpdate = true;
} else if (!getSha1OfFile(workingMappingFile).equals(getSha1OfFile(targetMappingFile))) {
needUpdate = true;
}
if (needUpdate) {
if (targetMappingFile.exists()) {
targetMappingFile.delete();
}
FilesUtils.copyFile(workingMappingFile, targetMappingFile);
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return sha1;
}
public static String getTargetName(File file, boolean rename) {
String targetName = file.getName();
if (!rename) {
return targetName;
}
try {
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
Document document = analyser.parse(file);
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
String dbmsIdValue = "";
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
Node dbmsNode = dbmsNodes.item(iDbms);
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
}
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
final String[] fileNameSplit = targetName.split("_");
String idA = "_id";
String idB = "id_";
final int indexA = dbmsIdValue.indexOf(idA);
final int indexB = dbmsIdValue.indexOf(idB);
String secondeName = "";
if (indexA > 0) {
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
} else if (indexB == 0) {
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
} else if (indexA == -1 && indexB == -1) {
secondeName = dbmsIdValue;
}
if (secondeName != null && !"".equals(secondeName)) {
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
}
}
} catch (ParserConfigurationException e) {
ExceptionHandler.process(e);
} catch (SAXException e) {
ExceptionHandler.process(e);
} catch (IOException e) {
ExceptionHandler.process(e);
}
return targetName;
}
public static JSONObject getRevisionObject() {
try {
File revisonFile = new File(MetadataTalendType.getSystemFolderURLOfMappingsFile().getFile(),
MetadataTalendType.FILE_MAPPING_REVISION);
String jsonStr = new String(Files.readAllBytes(revisonFile.toPath()));
return new JSONObject(jsonStr);
} catch (Exception e) {
ExceptionHandler.process(e);
}
return new JSONObject();
}
public static boolean restoreMappingFiles() throws Exception {
List<File> toDelete = new ArrayList<>();
JSONObject revision = getRevisionObject();
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
if (projectMappingFolder.exists()) {
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
if (projectMappingFiles != null) {
for (File file : projectMappingFiles) {
if (revision.has(file.getName())) {
String sha1 = MetadataTalendType.getSha1OfFile(file);
if (revision.getJSONObject(file.getName()).has(sha1)) {
toDelete.add(file);
}
}
}
}
File xsd = new File(projectMappingFolder, "mapping_validate.xsd"); //$NON-NLS-1$
if (xsd.exists()) {
xsd.delete();
}
}
toDelete.forEach(File::delete);
return !toDelete.isEmpty();
}
public static String getSha1OfFile(File file) {
try {
String text = new String(Files.readAllBytes(file.toPath()));
return getSha1OfText(text);
} catch (IOException e) {
ExceptionHandler.process(e);
}
return null;
}
public static String getSha1OfText(String text) {
text = text.replace("\r\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
return DigestUtils.sha1Hex(text);
}
public static void copyFile(File in, IFile out) throws CoreException, IOException {
FileInputStream fis = new FileInputStream(in);
if (out.exists()) {
@@ -524,49 +652,6 @@ public final class MetadataTalendType {
fis.close();
}
public static void syncNewMappingFileToProject() throws SystemException {
try {
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
File projectMappingFiles = new File(projectMappingFolder.getLocationURI());
if (!sysMappingFiles.exists() || !projectMappingFiles.exists()) {
return;
}
for (File sysMapping : sysMappingFiles.listFiles()) {
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
if (projectMapping.exists() && StringUtils.equals(sysMapping.getName(), "mapping_Greenplum.xml")) {
String sha1OfFile = DigestUtils.shaHex(projectMapping.getContents());
String shalOfOldSystem = "8431f19215dacb3caa126778ae695954552cce2a";
if (StringUtils.equals(sha1OfFile, shalOfOldSystem)) {
copyFile(sysMapping, projectMapping);
}
}
if (!projectMapping.exists()) {
FileInputStream fis = null;
try {
fis = new FileInputStream(sysMapping);
projectMapping.create(fis, true, null);
} catch (CoreException coreExc) {
throw new SystemException(coreExc);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioExc) {
throw new SystemException(ioExc);
}
}
}
}
}
} catch (Exception e) {
throw new SystemException(e);
}
}
/**
*
* Load db types and mapping with the current activated language (Java, Perl, ...).
@@ -574,20 +659,38 @@ public final class MetadataTalendType {
* @throws SystemException
*/
public static void loadCommonMappings() throws SystemException {
URL url = getProjectForderURLOfMappingsFile();
File dir = new File(url.getPath());
metadataMappingFiles = new ArrayList<File>();
dbmsSet.clear();
if (dir.isDirectory()) {
File[] files = dir.listFiles();
for (File file : files) {
if (file.getName().matches("^mapping_.*\\.xml$")) { //$NON-NLS-1$
loadMapping(file);
metadataMappingFiles.add(file);
}
}
for (File file : getWorkingMappingFiles()) {
loadMapping(file);
metadataMappingFiles.add(file);
}
}
public static List<File> getWorkingMappingFiles() throws SystemException {
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
File systemMappingFolder = new File(getSystemFolderURLOfMappingsFile().getFile());
File[] systemMappingFiles = systemMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
if (projectMappingFiles == null || projectMappingFiles.length == 0) {
return Arrays.asList(systemMappingFiles);
}
List<File> workingMappingFiles = new ArrayList<>();
Map<String, File> projectMappingFilesMap = Stream.of(projectMappingFiles)
.collect(Collectors.toMap(File::getName, Function.identity()));
workingMappingFiles.addAll(projectMappingFilesMap.values());
Stream.of(systemMappingFiles).filter(f -> !projectMappingFilesMap.containsKey(f.getName()))
.forEach(f -> workingMappingFiles.add(f));
return workingMappingFiles;
}
public static String getSha1OfSystemMappingFile(String fileName) {
try {
return getSha1OfFile(new File(getSystemFolderURLOfMappingsFile().getFile(), fileName));
} catch (SystemException e) {
ExceptionHandler.process(e);
return null;
}
}
private static void loadMapping(File file) throws SystemException {

View File

@@ -13,10 +13,15 @@ public class SparkBatchMetadataTalendTypeFilter extends SparkMetadataTalendTypeF
public static List<String> dynamicTypeCompatibleComponents = Arrays.asList(
"tDeltaLakeInput",
"tDeltaLakeOutput",
"tFileInputDelimited",
"tFileInputParquet",
"tFileOutputParquet",
"tJDBCInput",
"tJDBCOutput", "tLogRow", "tSqlRow"
"tJDBCOutput",
"tLogRow",
"tMongoDBInput",
"tMongoDBOutput",
"tSqlRow"
);
public SparkBatchMetadataTalendTypeFilter(INode node) {

View File

@@ -260,6 +260,7 @@ public final class ConvertionHelper {
result.setContentModel(connection.isContextMode());
result.setContextId(sourceConnection.getContextId());
result.setContextName(sourceConnection.getContextName());
result.setSupportNLS(sourceConnection.isSupportNLS());
// handle oracle database connnection of general_jdbc.
result.setSchema(getMeataConnectionSchema(result));
convertOtherParameters(result, connection);

View File

@@ -113,6 +113,7 @@ public class MetadataConnection implements IMetadataConnection {
private String contextName;
private boolean supportNLS = false;
// ~
private String comment;
@@ -729,6 +730,14 @@ public class MetadataConnection implements IMetadataConnection {
public void setContextName(String contextName) {
this.contextName = contextName;
}
public boolean isSupportNLS() {
return supportNLS;
}
public void setSupportNLS(boolean supportNLS) {
this.supportNLS = supportNLS;
}
/*
* (non-Javadoc)

View File

@@ -1250,6 +1250,11 @@ public class RepositoryToComponentProperty {
return value2;
}
if(value.equals("SUPPORT_NLS")) {
return connection.isSupportNLS();
}
if (value.equals("CDC_TYPE_MODE")) { //$NON-NLS-1$
return new Boolean(CDCTypeMode.LOG_MODE.getName().equals(connection.getCdcTypeMode()));
}

View File

@@ -24,6 +24,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.PasswordEncryptUtil;
import org.talend.commons.utils.generation.CodeGenerationUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.language.LanguageManager;
import org.talend.core.model.metadata.types.JavaType;
@@ -37,6 +38,7 @@ import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.model.utils.SQLPatternUtils;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.service.IDesignerXMLMapperService;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
@@ -293,8 +295,7 @@ public final class ElementParameterParser {
List<IElementParameter> params = (List<IElementParameter>) element.getElementParametersWithChildrens();
if (params != null && !params.isEmpty()) {
for (int i = 0; i < params.size(); i++) {
IElementParameter param = params.get(i);
for (IElementParameter param : params) {
if (text.indexOf(param.getVariableName()) != -1
|| (param.getVariableName() != null && param.getVariableName().contains(text))) {
if (param.getFieldType() == EParameterFieldType.TABLE) {
@@ -422,8 +423,8 @@ public final class ElementParameterParser {
}
IElementParameter param;
for (int i = 0; i < element.getElementParameters().size(); i++) {
param = element.getElementParameters().get(i);
for (IElementParameter element2 : element.getElementParameters()) {
param = element2;
if (text.indexOf(param.getVariableName()) != -1) {
if (param.getFieldType() == EParameterFieldType.TABLE) {
return createTableValuesXML((List<Map<String, Object>>) param.getValue(), param);
@@ -483,7 +484,21 @@ public final class ElementParameterParser {
if (element instanceof INode) {
INode node = (INode) element;
if (node.getExternalNode() != null) {
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
Object obj = null;
if (node.isVirtualGenerateNode()) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerXMLMapperService.class)) {
final IDesignerXMLMapperService service = GlobalServiceRegister.getDefault()
.getService(IDesignerXMLMapperService.class);
if (service != null) {
obj = service.rebuildXmlMapData(node.getExternalNode());
}
}
}
if (obj != null) {
return obj;
} else {
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
}
}
}
return null;
@@ -496,8 +511,8 @@ public final class ElementParameterParser {
}
IElementParameter param;
newText = text;
for (int i = 0; i < element.getElementParameters().size(); i++) {
param = element.getElementParameters().get(i);
for (IElementParameter element2 : element.getElementParameters()) {
param = element2;
if (newText.contains(param.getVariableName())) {
String value = getDisplayValue(param);
newText = newText.replace(param.getVariableName(), value);

View File

@@ -0,0 +1,86 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.model.process;
import java.util.Objects;
import org.apache.commons.lang.StringUtils;
/**
* DOC jding class global comment. Detailled comment
*/
public class ElementParameterValueModel {
private String label;
private String value;
/**
* Getter for lebel.
*
* @return the lebel
*/
public String getLabel() {
return label;
}
/**
* Sets the lebel.
*
* @param lebel the lebel to set
*/
public void setLabel(String label) {
this.label = label;
}
/**
* Getter for value.
*
* @return the value
*/
public String getValue() {
return value;
}
/**
* Sets the value.
*
* @param value the value to set
*/
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return StringUtils.isNotBlank(this.label) ? this.label : this.value;
}
@Override
public int hashCode() {
return Objects.hash(label, value);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ElementParameterValueModel other = (ElementParameterValueModel) obj;
return Objects.equals(label, other.label) && Objects.equals(value, other.value);
}
}

View File

@@ -37,7 +37,7 @@ public abstract class AbstractJobParameterInRepositoryRelationshipHandler extend
Set<Relation> relationSet = new HashSet<Relation>();
for (ElementParameterType paramType : parametersMap.values()) {
if (paramType.getName().endsWith(":" + getRepositoryTypeName())) { //$NON-NLS-1$
if (paramType.getName() != null && paramType.getName().endsWith(":" + getRepositoryTypeName())) { //$NON-NLS-1$
String name = paramType.getName().split(":")[0]; //$NON-NLS-1$
ElementParameterType repositoryTypeParam = parametersMap.get(name + ":" //$NON-NLS-1$
+ getRepositoryTypeName());

View File

@@ -359,7 +359,9 @@ public abstract class RepositoryUpdateManager {
List<UpdateResult> checkedResults = null;
if (parameter == null) { // update all job
checkedResults = filterSpecialCheckedResult(results);
// TUP-36519: comment out the filter for only opening job
// checkedResults = filterSpecialCheckedResult(results);
checkedResults = results;
} else { // filter
checkedResults = filterCheckedResult(results);
}

View File

@@ -27,6 +27,7 @@ import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.core.service.IRemoteService;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.RepositoryConstants;
import org.talend.utils.security.StudioEncryption;
/**
* created by wchen on 2015年6月16日 Detailled comment
@@ -255,7 +256,7 @@ public class TalendLibsServerManager {
if (enableProxyFlag) {
serverBean.setServer(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_URL));
serverBean.setUserName(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_USERNAME));
serverBean.setPassword(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD));
serverBean.setPassword(StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM).decrypt(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD)));
serverBean.setRepositoryId(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_REPOSITORY_ID));
serverBean.setType(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_TYPE));
}

View File

@@ -0,0 +1,161 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EMap;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.model.general.Project;
import org.talend.core.model.properties.Property;
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.core.runtime.util.EmfResourceUtil;
import org.talend.repository.ProjectManager;
import org.talend.utils.security.CryptoMigrationUtil;
import org.talend.utils.security.StudioEncryption;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoItemSignatureUtil {
public static final String MIGRATION_TOKEN_KEY = "force_import_unsupported_job";
public static final String REPOSITORY_PLUGIN_ID = "org.talend.repository";
public static final String PROJ_DATE_ID = "repository.project.id";
public static final String PROD_DATE_ID = "product.date.id";
public static String getCurrentProjectCreateDate() {
Project currentProject = ProjectManager.getInstance().getCurrentProject();
if (currentProject != null) {
ProjectPreferenceManager projectPrefManager = new ProjectPreferenceManager(
PendoItemSignatureUtil.REPOSITORY_PLUGIN_ID, false);
String projDate = projectPrefManager.getValue(PendoItemSignatureUtil.PROJ_DATE_ID);
if (StringUtils.isNotBlank(projDate)) {
String decrypt = null;
if (StudioEncryption.hasEncryptionSymbol(projDate)) {
decrypt = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.MIGRATION_TOKEN)
.decrypt(projDate);
} else {
decrypt = CryptoMigrationUtil.decrypt(projDate);
}
return decrypt;
}
}
return null;
}
public static String getStudioVersion() {
String studioVersion = VersionUtils.getDisplayVersion();
String patchInstalledVersion = PendoTrackDataUtil.getLatestPatchInstalledVersion();
if (StringUtils.isNotBlank(patchInstalledVersion)) {
studioVersion = patchInstalledVersion;
}
return studioVersion;
}
public static String getItemProductVersion(Property property) {
String productVersion = null;
EMap additionalProperties = property.getAdditionalProperties();
if (additionalProperties.get("modified_product_version") != null) {
productVersion = additionalProperties.get("modified_product_version").toString();
} else if (additionalProperties.get("created_product_version") != null) {
productVersion = additionalProperties.get("created_product_version").toString();
}
if (StringUtils.isNotBlank(productVersion)) {
productVersion = VersionUtils.getTalendPureVersion(productVersion);
}
return productVersion;
}
public static String getItemProductName(Property property) {
String productName = null;
EMap additionalProperties = property.getAdditionalProperties();
if (additionalProperties.get("modified_product_fullname") != null) {
productName = additionalProperties.get("modified_product_fullname").toString();
} else if (additionalProperties.get("created_product_fullname") != null) {
productName = additionalProperties.get("created_product_fullname").toString();
}
return productName;
}
public static String formatDate(String dateString, String pattern) {
String formattedDate = "";
if (StringUtils.isNotBlank(dateString)) {
Date date = new Date(Long.parseLong(dateString));
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
formattedDate = sdf.format(date);
}
return formattedDate;
}
public interface SignatureStatus {
public static final int V_VALID = 0;
public static final int V_INVALID = EmfResourceUtil.V_INVALID << 0;
public static final int V_UNSIGNED = V_INVALID << 1;
}
public enum TOSProdNameEnum {
TOS_DI("Talend Open Studio for Data Integration"),
TOS_BD("Talend Open Studio for Big Data"),
TOS_ESB("Talend Open Studio for ESB"),
TOS_TOP("Talend Open Studio for Data Quality");
private String prodName;
TOSProdNameEnum(String prodName) {
this.prodName = prodName;
}
public String getProdName() {
return prodName;
}
public static String getTOSCategoryByProdName(String prodName) {
String category = null;
for (TOSProdNameEnum tosProdNameEnum : TOSProdNameEnum.values()) {
if (tosProdNameEnum.getProdName().equals(prodName)) {
category = tosProdNameEnum.name();
break;
}
}
return category;
}
}
public enum ValueEnum {
YES("Y"),
NO("N"),
NOT_APPLICATE("N/A");
private String displayValue;
ValueEnum(String displayValue) {
this.displayValue = displayValue;
}
public String getDisplayValue() {
return displayValue;
}
}
}

View File

@@ -19,17 +19,22 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.model.general.Project;
import org.talend.core.model.properties.ProjectReference;
import org.talend.core.pendo.properties.IPendoDataProperties;
import org.talend.core.pendo.properties.PendoLoginProperties;
import org.talend.core.service.ICloudSignOnService;
import org.talend.core.service.IStudioLiteP2Service;
import org.talend.core.service.IStudioLiteP2Service.UpdateSiteConfig;
import org.talend.core.ui.IInstalledPatchService;
import org.talend.repository.ProjectManager;
import org.talend.utils.json.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
@@ -60,11 +65,7 @@ public class PendoTrackDataUtil {
}
public static IPendoDataProperties getLoginEventProperties() {
String studioPatch = null;
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
if (installedPatchService != null) {
studioPatch = installedPatchService.getLatestInstalledPatchVersion();
}
String studioPatch = getLatestPatchInstalledVersion();
PendoLoginProperties loginEvent = new PendoLoginProperties();
IStudioLiteP2Service studioLiteP2Service = IStudioLiteP2Service.get();
try {
@@ -84,6 +85,18 @@ public class PendoTrackDataUtil {
loginEvent.setEnabledFeatures(enabledFeatures);
}
setUpRefProjectsStructure(loginEvent);
loginEvent.setIsOneClickLogin(Boolean.FALSE.toString());
if (ICloudSignOnService.get() != null && ICloudSignOnService.get().isSignViaCloud()) {
loginEvent.setIsOneClickLogin(Boolean.TRUE.toString());
}
loginEvent.setManagedUpdate(Boolean.FALSE.toString());
if (IStudioLiteP2Service.get() != null) {
IProgressMonitor monitor = new NullProgressMonitor();
UpdateSiteConfig config = IStudioLiteP2Service.get().getUpdateSiteConfig(monitor);
if (config.isEnableTmcUpdateSettings(monitor) && !config.isOverwriteTmcUpdateSettings(monitor)) {
loginEvent.setManagedUpdate(Boolean.TRUE.toString());
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
@@ -92,6 +105,15 @@ public class PendoTrackDataUtil {
return loginEvent;
}
public static String getLatestPatchInstalledVersion() {
String studioPatch = "";
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
if (installedPatchService != null) {
studioPatch = installedPatchService.getLatestInstalledVersion(true);
}
return studioPatch;
}
private static void setUpRefProjectsStructure(PendoLoginProperties loginEvent) {
ProjectManager projectManager = ProjectManager.getInstance();
Project currentProject = projectManager.getCurrentProject();
@@ -138,6 +160,19 @@ public class PendoTrackDataUtil {
}
public static String convertEntityJsonString(Object entity) {
ObjectMapper mapper = new ObjectMapper();
try {
String content = mapper.writeValueAsString(entity);
if (StringUtils.isNotBlank(content)) {
return content;
}
} catch (JsonProcessingException e) {
ExceptionHandler.process(e);
}
return "";
}
public enum TrackEvent {
PROJECT_LOGIN("Project Login"),
@@ -146,7 +181,11 @@ public class PendoTrackDataUtil {
USE_API_DEF("Use API Definition"),
OPEN_IN_APIDesigner("Open in API Designer"),
OPEN_IN_APITester("Open in API Tester"),
OPEN_API_DOCUMENTATION("Open API Documentation");
OPEN_API_DOCUMENTATION("Open API Documentation"),
AUTOMAP("tMap Automap"),
TMAP("tMap"),
ITEM_IMPORT("Import items"),
ITEM_SIGNATURE("Item Signature");
private String event;

View File

@@ -55,6 +55,10 @@ import org.talend.utils.json.JSONObject;
*/
public class PendoTrackSender {
public static final String PROP_PENDO_LOCAL_CHECK = "talend.pendo.localDebug";
public static final String PROP_PENDO_LOG_DATA = "talend.pendo.logRuntimeData";
private static final String PREFIX_API = "api";
private static final String PENDO_INFO = "/monitoring/pendo/info";
@@ -75,10 +79,18 @@ public class PendoTrackSender {
private static String pendoInfo;
public static PendoTrackSender getInstance() {
if (instance == null) {
instance = new PendoTrackSender();
private PendoTrackSender() {
}
static {
instance = new PendoTrackSender();
RepositoryContext repositoryContext = getRepositoryContext();
if (repositoryContext != null) {
adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
}
}
public static PendoTrackSender getInstance() {
if (StringUtils.isBlank(adminUrl)) {
RepositoryContext repositoryContext = getRepositoryContext();
if (repositoryContext != null) {
@@ -94,7 +106,9 @@ public class PendoTrackSender {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
sendTrackData(event, properties);
if (isTrackSendAvailable()) {
sendTrackData(event, properties);
}
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
@@ -108,10 +122,10 @@ public class PendoTrackSender {
}
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
if (!checkTokenUsed(adminUrl) || !NetworkUtil.isNetworkValid()) {
if (isPendoLocalDebug()) {
ExceptionHandler.log(event.getEvent() + ":" + PendoTrackDataUtil.convertEntityJsonString(properties));
return;
}
DefaultHttpClient client = null;
CloseableHttpResponse response = null;
IProxySelectorProvider proxySelectorProvider = null;
@@ -141,6 +155,9 @@ public class PendoTrackSender {
response = client.execute(httpPost, HttpClientContext.create());
StatusLine statusLine = response.getStatusLine();
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
if (isLogPendoData()) {
ExceptionHandler.log(trackData);
}
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
}
@@ -164,6 +181,21 @@ public class PendoTrackSender {
}
}
public boolean isTrackSendAvailable() throws Exception {
if (isPendoLocalDebug() || checkTokenUsed(adminUrl) && NetworkUtil.isNetworkValid()) {
return true;
}
return false;
}
public boolean isPendoLocalDebug() {
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOCAL_CHECK));
}
public boolean isLogPendoData() {
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOG_DATA));
}
private String getPendoInfo() throws Exception {
if (StringUtils.isBlank(pendoInfo)) {
pendoInfo = getPendoInfo(getBaseUrl(), getToken());

View File

@@ -0,0 +1,54 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.mapper;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.properties.PendoTMapProperties;
/**
* DOC jding class global comment. Detailled comment
*/
public abstract class AbstractPendoTMapManager {
protected abstract PendoTMapProperties calculateProperties();
public void sendTrackToPendo() {
Job job = new Job("send pendo track") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (PendoTrackSender.getInstance().isTrackSendAvailable()) {
PendoTMapProperties properties = calculateProperties();
PendoTrackSender.getInstance().sendTrackData(TrackEvent.TMAP, properties);
}
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
}
return Status.OK_STATUS;
}
};
job.setUser(false);
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
}

View File

@@ -0,0 +1,53 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.mapper;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.properties.PendoAutoMapProperties;
/**
* Assume no multiple thread, one AutoMapper one PendoAutoMapManager
*
* DOC jding class global comment. Detailled comment
*/
public class PendoAutoMapManager {
private int mappingChangeCount = 0;
public void setMappingChangeCount(int mappingChangeCount) {
this.mappingChangeCount = mappingChangeCount;
}
public void incrementMappingChangeCount() {
this.mappingChangeCount++;
}
public void resetMappingChangeCount() {
this.mappingChangeCount = 0;
}
public int getMappingChangeCount() {
return mappingChangeCount;
}
public void sendTrackToPendo() {
if (mappingChangeCount < 1) {
return;
}
PendoAutoMapProperties properties = new PendoAutoMapProperties();
properties.setAutoMappings(mappingChangeCount);
PendoTrackSender.getInstance().sendToPendo(TrackEvent.AUTOMAP, properties);
}
}

View File

@@ -0,0 +1,45 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.properties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoAutoMapProperties implements IPendoDataProperties {
@JsonProperty("auto_mapping")
private int autoMappings;
/**
* Getter for autoMappings.
*
* @return the autoMappings
*/
public int getAutoMappings() {
return autoMappings;
}
/**
* Sets the autoMappings.
*
* @param autoMappings the autoMappings to set
*/
public void setAutoMappings(int autoMappings) {
this.autoMappings = autoMappings;
}
}

View File

@@ -36,6 +36,12 @@ public class PendoLoginProperties implements IPendoDataProperties {
@JsonProperty("referenced_projects")
private List<String> refProjectList;
@JsonProperty("one_click_login")
private String isOneClickLogin;
@JsonProperty("managed_update")
private String managedUpdate;
/**
* Getter for studio_version.
*
@@ -126,4 +132,40 @@ public class PendoLoginProperties implements IPendoDataProperties {
this.refProjectList = refProjectList;
}
/**
* Getter for isOneClickLogin.
*
* @return the isOneClickLogin
*/
public String getIsOneClickLogin() {
return isOneClickLogin;
}
/**
* Sets the isOneClickLogin.
*
* @param isOneClickLogin the isOneClickLogin to set
*/
public void setIsOneClickLogin(String isOneClickLogin) {
this.isOneClickLogin = isOneClickLogin;
}
/**
* Getter for managedUpdate.
*
* @return the managedUpdate
*/
public String getManagedUpdate() {
return managedUpdate;
}
/**
* Sets the managedUpdate.
*
* @param managedUpdate the managedUpdate to set
*/
public void setManagedUpdate(String managedUpdate) {
this.managedUpdate = managedUpdate;
}
}

View File

@@ -0,0 +1,232 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.properties;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoSignImportProperties implements IPendoDataProperties {
@JsonProperty("source_version")
private List<String> sourceVersion;
@JsonProperty("studio_version")
private String studioVersion;
@JsonProperty("valid_items")
private int validItems;
@JsonProperty("unsigned_items_from_SE")
private String unsignSEItems;
@JsonProperty("unsigned_items_from_EE")
private int unsignEEItems;
@JsonProperty("grace_period")
private String gracePeriod;
@JsonProperty("installed_date")
private String installDate;
@JsonProperty("project_creation_date")
private String projectCreateDate;
@JsonProperty("valid_migration_token")
private String validMigrationToken;
@JsonProperty("import_product")
private List<String> importProduct;
/**
* Getter for sourceVersion.
* @return the sourceVersion
*/
public List<String> getSourceVersion() {
return sourceVersion;
}
/**
* Sets the sourceVersion.
* @param sourceVersion the sourceVersion to set
*/
public void setSourceVersion(List<String> sourceVersion) {
this.sourceVersion = sourceVersion;
}
/**
* Getter for studioVersion.
*
* @return the studioVersion
*/
public String getStudioVersion() {
return studioVersion;
}
/**
* Sets the studioVersion.
*
* @param studioVersion the studioVersion to set
*/
public void setStudioVersion(String studioVersion) {
this.studioVersion = studioVersion;
}
/**
* Getter for validItems.
*
* @return the validItems
*/
public int getValidItems() {
return validItems;
}
/**
* Sets the validItems.
*
* @param validItems the validItems to set
*/
public void setValidItems(int validItems) {
this.validItems = validItems;
}
/**
* Getter for unsignSEItems.
* @return the unsignSEItems
*/
public String getUnsignSEItems() {
return unsignSEItems;
}
/**
* Sets the unsignSEItems.
* @param unsignSEItems the unsignSEItems to set
*/
public void setUnsignSEItems(String unsignSEItems) {
this.unsignSEItems = unsignSEItems;
}
/**
* Getter for unsignEEItems.
*
* @return the unsignEEItems
*/
public int getUnsignEEItems() {
return unsignEEItems;
}
/**
* Sets the unsignEEItems.
*
* @param unsignEEItems the unsignEEItems to set
*/
public void setUnsignEEItems(int unsignEEItems) {
this.unsignEEItems = unsignEEItems;
}
/**
* Getter for gracePeriod.
*
* @return the gracePeriod
*/
public String getGracePeriod() {
return gracePeriod;
}
/**
* Sets the gracePeriod.
*
* @param gracePeriod the gracePeriod to set
*/
public void setGracePeriod(String gracePeriod) {
this.gracePeriod = gracePeriod;
}
/**
* Getter for installDate.
*
* @return the installDate
*/
public String getInstallDate() {
return installDate;
}
/**
* Sets the installDate.
*
* @param installDate the installDate to set
*/
public void setInstallDate(String installDate) {
this.installDate = installDate;
}
/**
* Getter for projectCreateDate.
*
* @return the projectCreateDate
*/
public String getProjectCreateDate() {
return projectCreateDate;
}
/**
* Sets the projectCreateDate.
*
* @param projectCreateDate the projectCreateDate to set
*/
public void setProjectCreateDate(String projectCreateDate) {
this.projectCreateDate = projectCreateDate;
}
/**
* Getter for validMigrationToken.
*
* @return the validMigrationToken
*/
public String getValidMigrationToken() {
return validMigrationToken;
}
/**
* Sets the validMigrationToken.
*
* @param validMigrationToken the validMigrationToken to set
*/
public void setValidMigrationToken(String validMigrationToken) {
this.validMigrationToken = validMigrationToken;
}
/**
* Getter for importProduct.
* @return the importProduct
*/
public List<String> getImportProduct() {
return importProduct;
}
/**
* Sets the importProduct.
* @param importProduct the importProduct to set
*/
public void setImportProduct(List<String> importProduct) {
this.importProduct = importProduct;
}
}

View File

@@ -0,0 +1,251 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.properties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoSignLogonProperties implements IPendoDataProperties {
@JsonProperty("studio_version")
private String studioVersion;
@JsonProperty("valid_items")
private int validItems;
@JsonProperty("signature_invalid_items")
private int invalidSignItems;
@JsonProperty("unsigned_items_from_SE")
private String unsignSEItems;
@JsonProperty("unsigned_items_from_EE")
private int unsignEEItems;
@JsonProperty("invalid_item_source_version")
private String invalidItemSourceVersion;
@JsonProperty("signed_by_migration")
private int signByMigration;
@JsonProperty("grace_period")
private String gracePeriod;
@JsonProperty("installed_date")
private String installDate;
@JsonProperty("project_creation_date")
private String projectCreateDate;
@JsonProperty("valid_migration_token")
private String validMigrationToken;
/**
* Getter for studioVersion.
*
* @return the studioVersion
*/
public String getStudioVersion() {
return studioVersion;
}
/**
* Sets the studioVersion.
*
* @param studioVersion the studioVersion to set
*/
public void setStudioVersion(String studioVersion) {
this.studioVersion = studioVersion;
}
/**
* Getter for validItems.
*
* @return the validItems
*/
public int getValidItems() {
return validItems;
}
/**
* Sets the validItems.
*
* @param validItems the validItems to set
*/
public void setValidItems(int validItems) {
this.validItems = validItems;
}
/**
* Getter for invalidSignItems.
*
* @return the invalidSignItems
*/
public int getInvalidSignItems() {
return invalidSignItems;
}
/**
* Sets the invalidSignItems.
*
* @param invalidSignItems the invalidSignItems to set
*/
public void setInvalidSignItems(int invalidSignItems) {
this.invalidSignItems = invalidSignItems;
}
/**
* Getter for unsignSEItems.
* @return the unsignSEItems
*/
public String getUnsignSEItems() {
return unsignSEItems;
}
/**
* Sets the unsignSEItems.
* @param unsignSEItems the unsignSEItems to set
*/
public void setUnsignSEItems(String unsignSEItems) {
this.unsignSEItems = unsignSEItems;
}
/**
* Getter for unsignEEItems.
*
* @return the unsignEEItems
*/
public int getUnsignEEItems() {
return unsignEEItems;
}
/**
* Sets the unsignEEItems.
*
* @param unsignEEItems the unsignEEItems to set
*/
public void setUnsignEEItems(int unsignEEItems) {
this.unsignEEItems = unsignEEItems;
}
/**
* Getter for invalidItemSourceVersion.
*
* @return the invalidItemSourceVersion
*/
public String getInvalidItemSourceVersion() {
return invalidItemSourceVersion;
}
/**
* Sets the invalidItemSourceVersion.
*
* @param invalidItemSourceVersion the invalidItemSourceVersion to set
*/
public void setInvalidItemSourceVersion(String invalidItemSourceVersion) {
this.invalidItemSourceVersion = invalidItemSourceVersion;
}
/**
* Getter for signByMigration.
*
* @return the signByMigration
*/
public int getSignByMigration() {
return signByMigration;
}
/**
* Sets the signByMigration.
*
* @param signByMigration the signByMigration to set
*/
public void setSignByMigration(int signByMigration) {
this.signByMigration = signByMigration;
}
/**
* Getter for gracePeriod.
*
* @return the gracePeriod
*/
public String getGracePeriod() {
return gracePeriod;
}
/**
* Sets the gracePeriod.
*
* @param gracePeriod the gracePeriod to set
*/
public void setGracePeriod(String gracePeriod) {
this.gracePeriod = gracePeriod;
}
/**
* Getter for installDate.
*
* @return the installDate
*/
public String getInstallDate() {
return installDate;
}
/**
* Sets the installDate.
*
* @param installDate the installDate to set
*/
public void setInstallDate(String installDate) {
this.installDate = installDate;
}
/**
* Getter for projectCreateDate.
*
* @return the projectCreateDate
*/
public String getProjectCreateDate() {
return projectCreateDate;
}
/**
* Sets the projectCreateDate.
*
* @param projectCreateDate the projectCreateDate to set
*/
public void setProjectCreateDate(String projectCreateDate) {
this.projectCreateDate = projectCreateDate;
}
/**
* Getter for validMigrationToken.
*
* @return the validMigrationToken
*/
public String getValidMigrationToken() {
return validMigrationToken;
}
/**
* Sets the validMigrationToken.
*
* @param validMigrationToken the validMigrationToken to set
*/
public void setValidMigrationToken(String validMigrationToken) {
this.validMigrationToken = validMigrationToken;
}
}

View File

@@ -0,0 +1,462 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.pendo.properties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoTMapProperties implements IPendoDataProperties {
/**
* Number of input columns
*/
@JsonProperty("input_columns")
private int inputColumns;
/**
* Number of output columns
*/
@JsonProperty("output_columns")
private int outputColumns;
/**
* Number of var columns
*/
@JsonProperty("var_columns")
private int varColumns;
/**
* Number of input tables which have at least 1 mapping to an output table
*/
@JsonProperty("number_of_sources")
private int sourceNumber;
/**
* Number of output tables have mapping from the main input table 
*/
@JsonProperty("number_of_destinations")
private int destinationNumber;
/**
* Number of output tables
*/
@JsonProperty("number_of_outputs")
private int outputNumber;
/**
* Number of expressions without java transformation(expressions in input_columns/var_columns/output_columns but not
* include filter expressions)
*/
@JsonProperty("simple_expressions")
private int simpleExpressions;
/**
* Number of expressions with java transformation(expressions in input_columns/var_columns/output_columns but not
* include filter expressions)
*/
@JsonProperty("transformed_expressions")
private int transformExpressions;
/**
* Number of mappings(links) between input and var
*/
@JsonProperty("input_var_mapping")
private int inputVarMappings;
/**
* Number of mappings(links) between var and output
*/
@JsonProperty("var_output_mapping")
private int varOutputMappings;
/**
* Number of mappings(links) between input and output
*/
@JsonProperty("input_output_mapping")
private int inputOutputMappings;
/**
* Number of input columns which are mapped to multiple output columns, either mapped directly or mapped through the
* Var column
*/
@JsonProperty("mapping_1_to_n")
private int oneToNMappings;
/**
* Number of output columns which have multiple source columns, either input columns or var columns
*/
@JsonProperty("mapping_n_to_1")
private int nToOneMappings;
/**
* Number of mappings(links) between main input table and join tables
*/
@JsonProperty("join_mappings")
private int joinMappingCounts;
/**
* Number of left out join used in join table
*/
@JsonProperty("left_joins")
private int leftJoinCounts;
/**
* Number of inner join used in join table
*/
@JsonProperty("inner_joins")
private int innerJoinCounts;
/**
* Number of filter activated on input/output tables  
*/
@JsonProperty("filters")
private int filterCounts;
/**
* Number of field types for each type in OUTPUT tables
*/
@JsonProperty("field_types")
private String outputFieldTypes;
/**
* Getter for inputColumns.
* @return the inputColumns
*/
public int getInputColumns() {
return inputColumns;
}
/**
* Sets the inputColumns.
* @param inputColumns the inputColumns to set
*/
public void setInputColumns(int inputColumns) {
this.inputColumns = inputColumns;
}
/**
* Getter for outputColumns.
* @return the outputColumns
*/
public int getOutputColumns() {
return outputColumns;
}
/**
* Sets the outputColumns.
* @param outputColumns the outputColumns to set
*/
public void setOutputColumns(int outputColumns) {
this.outputColumns = outputColumns;
}
/**
* Getter for varColumns.
* @return the varColumns
*/
public int getVarColumns() {
return varColumns;
}
/**
* Sets the varColumns.
* @param varColumns the varColumns to set
*/
public void setVarColumns(int varColumns) {
this.varColumns = varColumns;
}
/**
* Getter for sourceNumber.
* @return the sourceNumber
*/
public int getSourceNumber() {
return sourceNumber;
}
/**
* Sets the sourceNumber.
* @param sourceNumber the sourceNumber to set
*/
public void setSourceNumber(int sourceNumber) {
this.sourceNumber = sourceNumber;
}
/**
* Getter for destinationNumber.
* @return the destinationNumber
*/
public int getDestinationNumber() {
return destinationNumber;
}
/**
* Sets the destinationNumber.
* @param destinationNumber the destinationNumber to set
*/
public void setDestinationNumber(int destinationNumber) {
this.destinationNumber = destinationNumber;
}
/**
* Getter for outputNumber.
* @return the outputNumber
*/
public int getOutputNumber() {
return outputNumber;
}
/**
* Sets the outputNumber.
* @param outputNumber the outputNumber to set
*/
public void setOutputNumber(int outputNumber) {
this.outputNumber = outputNumber;
}
/**
* Getter for simpleExpressions.
*
* @return the simpleExpressions
*/
public int getSimpleExpressions() {
return simpleExpressions;
}
/**
* Sets the simpleExpressions.
*
* @param simpleExpressions the simpleExpressions to set
*/
public void setSimpleExpressions(int simpleExpressions) {
this.simpleExpressions = simpleExpressions;
}
/**
* Getter for transformExpressions.
*
* @return the transformExpressions
*/
public int getTransformExpressions() {
return transformExpressions;
}
/**
* Sets the transformExpressions.
*
* @param transformExpressions the transformExpressions to set
*/
public void setTransformExpressions(int transformExpressions) {
this.transformExpressions = transformExpressions;
}
/**
* Getter for inputVarMappings.
* @return the inputVarMappings
*/
public int getInputVarMappings() {
return inputVarMappings;
}
/**
* Sets the inputVarMappings.
* @param inputVarMappings the inputVarMappings to set
*/
public void setInputVarMappings(int inputVarMappings) {
this.inputVarMappings = inputVarMappings;
}
/**
* Getter for varOutputMappings.
* @return the varOutputMappings
*/
public int getVarOutputMappings() {
return varOutputMappings;
}
/**
* Sets the varOutputMappings.
* @param varOutputMappings the varOutputMappings to set
*/
public void setVarOutputMappings(int varOutputMappings) {
this.varOutputMappings = varOutputMappings;
}
/**
* Getter for inputOutputMappings.
* @return the inputOutputMappings
*/
public int getInputOutputMappings() {
return inputOutputMappings;
}
/**
* Sets the inputOutputMappings.
* @param inputOutputMappings the inputOutputMappings to set
*/
public void setInputOutputMappings(int inputOutputMappings) {
this.inputOutputMappings = inputOutputMappings;
}
/**
* Getter for oneToNMappings.
* @return the oneToNMappings
*/
public int getOneToNMappings() {
return oneToNMappings;
}
/**
* Sets the oneToNMappings.
* @param oneToNMappings the oneToNMappings to set
*/
public void setOneToNMappings(int oneToNMappings) {
this.oneToNMappings = oneToNMappings;
}
/**
* Getter for nToOneMappings.
* @return the nToOneMappings
*/
public int getnToOneMappings() {
return nToOneMappings;
}
/**
* Sets the nToOneMappings.
* @param nToOneMappings the nToOneMappings to set
*/
public void setnToOneMappings(int nToOneMappings) {
this.nToOneMappings = nToOneMappings;
}
/**
* Getter for joinMappingCounts.
* @return the joinMappingCounts
*/
public int getJoinMappingCounts() {
return joinMappingCounts;
}
/**
* Sets the joinMappingCounts.
* @param joinMappingCounts the joinMappingCounts to set
*/
public void setJoinMappingCounts(int joinMappingCounts) {
this.joinMappingCounts = joinMappingCounts;
}
/**
* Getter for leftJoinCounts.
* @return the leftJoinCounts
*/
public int getLeftJoinCounts() {
return leftJoinCounts;
}
/**
* Sets the leftJoinCounts.
* @param leftJoinCounts the leftJoinCounts to set
*/
public void setLeftJoinCounts(int leftJoinCounts) {
this.leftJoinCounts = leftJoinCounts;
}
/**
* Getter for innerJoinCounts.
* @return the innerJoinCounts
*/
public int getInnerJoinCounts() {
return innerJoinCounts;
}
/**
* Sets the innerJoinCounts.
* @param innerJoinCounts the innerJoinCounts to set
*/
public void setInnerJoinCounts(int innerJoinCounts) {
this.innerJoinCounts = innerJoinCounts;
}
/**
* Getter for filterCounts.
* @return the filterCounts
*/
public int getFilterCounts() {
return filterCounts;
}
/**
* Sets the filterCounts.
* @param filterCounts the filterCounts to set
*/
public void setFilterCounts(int filterCounts) {
this.filterCounts = filterCounts;
}
/**
* Getter for outputFieldTypes.
* @return the outputFieldTypes
*/
public String getOutputFieldTypes() {
return outputFieldTypes;
}
/**
* Sets the outputFieldTypes.
* @param outputFieldTypes the outputFieldTypes to set
*/
public void setOutputFieldTypes(String outputFieldTypes) {
this.outputFieldTypes = outputFieldTypes;
}
}

View File

@@ -12,8 +12,6 @@
// ============================================================================
package org.talend.core.prefs;
import org.talend.commons.utils.network.ITalendNexusPrefConstants;
/**
* Core preferences. Detailled comment <br/>
*
@@ -187,8 +185,6 @@ public interface ITalendCorePrefConstants {
public static final String PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT = "PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT"; //$NON-NLS-1$
public static final String NEXUS_TIMEOUT = ITalendNexusPrefConstants.NEXUS_TIMEOUT;
public static final String NEXUS_REFRESH_FREQUENCY = "NEXUS_REFRESH_FREQUENCY"; //$NON-NLS-1$
/**

View File

@@ -449,7 +449,7 @@ repository.rulesSql=SQL
repository.rulesParser=Parser
repository.rulesMatcher=Match
repository.systemIndicators=System Indicators
repository.userDefineIndicators=User Defined Indicators
repository.userDefineIndicators=User-defined Indicators
repository.userDefineIndicators.lib=lib
repository.systemIndicators.advancedStatistics=Advanced Statistics
repository.systemIndicators.businessRules=Business Rules
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=Centre
ConnectionBean.Local=Local
ConnectionBean.Remote=Remote
ConnectionBean.DefaultConnection=Default connection
ConnectionBean.Cloud.name=Signed in: Cloud ({0})
ConnectionBean.CloudConnection.description=Remote connection to Cloud - Signed in: Cloud ({0})
InegerCellEditorListener.NegativeNumberMessage=The value of {0} can't be set by negative number.
InegerCellEditorListener.NumeralMessage=The value of {0} should be numeral.
OpenXSDFileDialog.cancel=Cancel

View File

@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=Centre
ConnectionBean.Local=Local
ConnectionBean.Remote=Distant
ConnectionBean.DefaultConnection=Connexion par d\u00E9faut
ConnectionBean.Cloud.name=Connect\u00E9(e) \u00E0\u00A0: Cloud ({0})
ConnectionBean.CloudConnection.description=Connexion distante au Cloud - Connect\u00E9(e) \u00E0\u00A0: Cloud ({0})
InegerCellEditorListener.NegativeNumberMessage=La valeur de {0} ne peut \u00EAtre un nombre n\u00E9gatif.
InegerCellEditorListener.NumeralMessage=La valeur de {0} doit \u00EAtre num\u00E9rique.
OpenXSDFileDialog.cancel=Annuler
@@ -575,7 +577,7 @@ repository.servicesPort=Port
BinRepositoryNode.label=Corbeille
HDFS=HDFS
HCAT=HCAT
AbstractRepositoryContentHandler.deleteNode.exception=\u00C9chec de la suppression des pertinences de noeud\u00A0: {0}
AbstractRepositoryContentHandler.deleteNode.exception=\u00C9chec de la suppression des pertinences de n\u0153ud\u00A0: {0}
HadoopCustomVersionDialog.topTitle=D\u00E9finition de la version Hadoop personnalis\u00E9e
HadoopCustomVersionDialog.title=D\u00E9finir la distribution Hadoop personnalis\u00E9e
HadoopCustomVersionDialog.msg=Configurer les biblioth\u00E8ques n\u00E9cessaires \u00E0 la version personnalis\u00E9e de Hadoop

View File

@@ -184,7 +184,7 @@ AbstractTalendFunctionParser.checkMethod=\u30EB\u30FC\u30C1\u30F3: "{0}.{1}\\"\u
JavaGlobalVariableProposal.Description=\u8AAC\u660E: {0}
JavaGlobalVariableProposal.VariableName=\n\n\u5909\u6570\u540D: {1}
JavaSimpleDateFormatProposalProvider.displaySingleQuote= ' : \u4E00\u91CD\u5F15\u7528\u7B26\u3092\u8868\u793A
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3067\uFF11\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3092\u793A\u3057\u307E\u3059\u3002
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3067\uFF11\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3092\u793A\u3057\u307E\u3059\u3002
JavaTypesManager.bigDecimal=BIGDECIMAL\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.integer=INTEGER\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.list=LIST\u306F\u6570\u5024\u3067\u3059:
@@ -402,7 +402,7 @@ repository.SAPIDoc=SAP iDoc
repository.SAPTable=SAP\u30C6\u30FC\u30D6\u30EB
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
repository.metadataSQLPatterns.alias=SQLTemplates
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited.alias=DELIM
repository.metadataTable=\u30E1\u30BF\u30C7\u30FC\u30BF\u30B9\u30AD\u30FC\u30DE
repository.metadataColumn=\u30E1\u30BF\u30C7\u30FC\u30BF\u30AB\u30E9\u30E0
@@ -449,7 +449,7 @@ repository.rulesSql=SQL
repository.rulesParser=\u30D1\u30FC\u30B5\u30FC
repository.rulesMatcher=\u4E00\u81F4
repository.systemIndicators=\u30B7\u30B9\u30C6\u30E0\u30A4\u30F3\u30C7\u30A3\u30B1\u30FC\u30BF\u30FC
repository.userDefineIndicators=\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30A4\u30F3\u30B8\u30B1\u30FC\u30BF\u30FC
repository.userDefineIndicators=\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u306E\u30A4\u30F3\u30B8\u30B1\u30FC\u30BF\u30FC
repository.userDefineIndicators.lib=lib
repository.systemIndicators.advancedStatistics=\u8A73\u7D30\u7D71\u8A08
repository.systemIndicators.businessRules=\u30D3\u30B8\u30CD\u30B9\u30EB\u30FC\u30EB
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=\u4E2D\u5FC3
ConnectionBean.Local=\u30ED\u30FC\u30AB\u30EB
ConnectionBean.Remote=\u30EA\u30E2\u30FC\u30C8
ConnectionBean.DefaultConnection=\u30C7\u30D5\u30A9\u30EB\u30C8\u63A5\u7D9A
ConnectionBean.Cloud.name=\u30B5\u30A4\u30F3\u30A4\u30F3\u6E08\u307F: \u30AF\u30E9\u30A6\u30C9({0})
ConnectionBean.CloudConnection.description=\u30AF\u30E9\u30A6\u30C9\u3078\u306E\u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A - \u30B5\u30A4\u30F3\u30A4\u30F3\u6E08\u307F: \u30AF\u30E9\u30A6\u30C9({0})
InegerCellEditorListener.NegativeNumberMessage={0}\u306B\u306F\u8CA0\u306E\u5024\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
InegerCellEditorListener.NumeralMessage={0}\u306B\u306F\u6570\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
OpenXSDFileDialog.cancel=\u30AD\u30E3\u30F3\u30BB\u30EB

View File

@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=\u4E2D\u592E
ConnectionBean.Local=\u672C\u5730
ConnectionBean.Remote=\u8FDC\u7A0B
ConnectionBean.DefaultConnection=\u9ED8\u8BA4\u8FDE\u63A5
ConnectionBean.Cloud.name=\u5DF2\u767B\u5F55: \u4E91\u7AEF ({0})
ConnectionBean.CloudConnection.description=\u4E91\u7AEF\u8FDC\u7A0B\u8FDE\u63A5 - \u5DF2\u767B\u5F55: \u4E91\u7AEF ({0})
InegerCellEditorListener.NegativeNumberMessage={0} \u7684\u503C\u4E0D\u80FD\u8BBE\u5B9A\u4E3A\u8D1F\u6570\u3002
InegerCellEditorListener.NumeralMessage={0} \u7684\u503C\u5E94\u8BE5\u4E3A\u6570\u5B57\u3002
OpenXSDFileDialog.cancel=\u53D6\u6D88

View File

@@ -48,6 +48,10 @@ public interface TalendProcessOptionConstants {
public static final int GENERATE_POM_NOT_CLEAR_CACHE = 1 << 11;
/**
* for DQ clean item
*/
public static final int GENERATE_NO_RESET_DQ = 1 << 12;
/**
* clean options
*/

View File

@@ -78,5 +78,10 @@ public interface IProjectSettingPreferenceConstants {
public static final String TEMPLATE_DOCKER_PROFILE_POM = "template_docker_profile_pom_script"; //$NON-NLS-1$
public static final String USE_STRICT_REFERENCE_JOBLET = "use_strict_reference_joblet"; //$NON-NLS-1$
/*
* Default microservices application properties
*/
public static final String MS_APPLICATION_PROPERTIES = "ms_application_properties";
}

View File

@@ -19,6 +19,8 @@ package org.talend.core.runtime.projectsetting;
public interface IProjectSettingTemplateConstants {
final static String PATH_RESOURCES = "resources";
final static String PATH_APPLICATION_PROPERTIES = PATH_RESOURCES + '/' + "application.properties";
final static String PATH_RESOURCES_TEMPLATES = PATH_RESOURCES + '/' + "templates";

View File

@@ -1,5 +1,6 @@
package org.talend.core.runtime.services;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.properties.Item;
@@ -9,4 +10,11 @@ public interface IFilterService extends IService {
public boolean isFilterAccepted(Item item, String filter);
public static IFilterService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IFilterService.class)) {
return GlobalServiceRegister.getDefault().getService(IFilterService.class);
}
return null;
}
}

View File

@@ -0,0 +1,58 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// 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.core.service;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.signon.util.TokenMode;
import org.talend.signon.util.listener.LoginEventListener;
public interface ICloudSignOnService extends IService {
TokenMode getToken(String authCode, String codeVerifier, String dataCenter) throws Exception;
void startHeartBeat() throws Exception;
void stopHeartBeat();
String generateCodeVerifier();
String getCodeChallenge(String seed) throws Exception;
boolean hasValidToken() throws Exception;
String getTokenUser(String url, TokenMode token) throws Exception;
void signonCloud(LoginEventListener listener) throws Exception;
TokenMode getLatestToken() throws Exception;
public boolean refreshToken() throws Exception;
boolean isSignViaCloud();
boolean isNeedShowSSOPage();
public void showReloginDialog();
public boolean isReloginDialogRunning();
public void reload();
public static ICloudSignOnService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICloudSignOnService.class)) {
return GlobalServiceRegister.getDefault().getService(ICloudSignOnService.class);
}
return null;
}
}

View File

@@ -30,4 +30,6 @@ public interface IDesignerXMLMapperService extends IService {
*/
public boolean isVirtualComponent(final INode node);
public Object rebuildXmlMapData(final INode node);
}

View File

@@ -94,7 +94,11 @@ public interface IDetectCVEService extends IService {
if (art == null) {
return null;
}
return String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
String gavc = String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
if (!StringUtils.isEmpty(art.getClassifier())) {
gavc += ":" + art.getClassifier();
}
return gavc;
}
return null;
}
@@ -112,6 +116,8 @@ public interface IDetectCVEService extends IService {
private String a;
private String v;
private String c;
/**
* @return the g
@@ -155,8 +161,28 @@ public interface IDetectCVEService extends IService {
this.v = v;
}
/**
* @return the c
*/
public String getC() {
return c;
}
/**
* @param c the c to set
*/
public void setC(String c) {
this.c = c;
}
public String getGAVString() {
return String.format("%s:%s:%s", g, a, v);
String gav = String.format("%s:%s:%s", g, a, v);
if (!StringUtils.isEmpty(c)) {
gav += ":" + c;
}
return gav;
}
public String getGA() {
@@ -168,13 +194,16 @@ public interface IDetectCVEService extends IService {
return null;
}
String[] gavs = gav.split(":");
if (gavs.length != 3) {
if (gavs.length < 3) {
return null;
}
GAV ret = new GAV();
ret.setG(gavs[0]);
ret.setA(gavs[1]);
ret.setV(gavs[2]);
if (gavs.length > 3) {
ret.setC(gavs[3]);
}
return ret;
}
@@ -184,19 +213,7 @@ public interface IDetectCVEService extends IService {
}
String gav = mavenUri2GAV(mavenURI);
if (StringUtils.isEmpty(gav)) {
return null;
}
String[] gavs = gav.split(":");
if (gavs.length != 3) {
return null;
}
GAV ret = new GAV();
ret.setG(gavs[0]);
ret.setA(gavs[1]);
ret.setV(gavs[2]);
return ret;
return parseFromGAV(gav);
}
public GAV clone() throws CloneNotSupportedException {
@@ -224,6 +241,12 @@ public interface IDetectCVEService extends IService {
sb.append(v);
sb.append(",");
}
if (!StringUtils.isEmpty(c)) {
sb.append("c:");
sb.append(c);
sb.append(",");
}
if (sb.lastIndexOf(",") > 0) {
sb.deleteCharAt(sb.length() - 1);
@@ -245,6 +268,9 @@ public interface IDetectCVEService extends IService {
if (!StringUtils.isEmpty(v)) {
hash += hash * 31 + v.hashCode();
}
if (!StringUtils.isEmpty(c)) {
hash += hash * 31 + c.hashCode();
}
return hash;
}
@@ -267,8 +293,12 @@ public interface IDetectCVEService extends IService {
if (!StringUtils.equals(a, gav.getA())) {
return false;
}
if (!StringUtils.equals(v, gav.getV())) {
return false;
}
return StringUtils.equals(v, gav.getV());
return StringUtils.equals(c, gav.getC());
}

View File

@@ -14,6 +14,7 @@ package org.talend.core.service;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.nexus.ArtifactRepositoryBean;
import org.talend.utils.json.JSONException;
@@ -38,4 +39,15 @@ public interface IRemoteService extends IService {
boolean isTokenUsed(String adminUrl) throws Exception;
String getPendoKeyFromLicense() throws Exception;
public boolean isCloudConnection();
public static IRemoteService get() {
GlobalServiceRegister gsr = GlobalServiceRegister.getDefault();
if (gsr.isServiceRegistered(IRemoteService.class)) {
return gsr.getService(IRemoteService.class);
}
return null;
}
}

View File

@@ -128,6 +128,12 @@ public interface IStudioLiteP2Service extends IService {
void setupTmcUpdate(IProgressMonitor monitor, IStudioUpdateConfig updateConfig) throws Exception;
boolean removeM2() throws Exception;
void saveRemoveM2(boolean remove) throws Exception;
void cleanM2(IProgressMonitor monitor);
public static IStudioLiteP2Service get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);

View File

@@ -50,6 +50,10 @@ public interface IBrandingService extends IService {
public boolean isPoweredOnlyCamel();
/**
* TP_All license also has the flag 'isCloud'
* @return
*/
public default boolean isCloudLicense() {
return false;
}

View File

@@ -160,6 +160,8 @@ public interface IRunProcessService extends IService {
public void checkLastGenerationHasCompilationError(boolean updateProblemsView) throws ProcessorException;
public void checkLastGenerationHasCompilationError(boolean updateProblemsView, boolean isJob) throws ProcessorException;
/**
* DOC ycbai Comment method "getResourceFilePath".
*

View File

@@ -380,24 +380,27 @@ public final class ProjectManager {
return null;
}
/**
* @deprecated unable to get project when resource is unloaded, use {@link #getProject(EObject)} instead
*/
public org.talend.core.model.properties.Project getProject(Project project, EObject object) {
if (object != null) {
if (object instanceof org.talend.core.model.properties.Project) {
return (org.talend.core.model.properties.Project) object;
}
if (object instanceof Property) {
return getProject(project, ((Property) object).getItem());
}
if (object instanceof Item) {
return getProject(project, ((Item) object).getParent());
}
}
// default
if (project != null) {
return project.getEmfProject();
}
return null;
// if (object != null) {
// if (object instanceof org.talend.core.model.properties.Project) {
// return (org.talend.core.model.properties.Project) object;
// }
// if (object instanceof Property) {
// return getProject(project, ((Property) object).getItem());
// }
// if (object instanceof Item) {
// return getProject(project, ((Item) object).getParent());
// }
// }
//
// // default
// if (project != null) {
// return project.getEmfProject();
// }
return getProject(object);
}
public IProject getResourceProject(org.talend.core.model.properties.Project project) {
@@ -443,7 +446,7 @@ public final class ProjectManager {
public boolean isInMainProject(Project mainProject, EObject object) {
if (object != null) {
org.talend.core.model.properties.Project project = getProject(mainProject, object);
org.talend.core.model.properties.Project project = getProject(object);
if (project != null && mainProject != null) {
return project.getTechnicalLabel().equals(mainProject.getEmfProject().getTechnicalLabel());
}

View File

@@ -32,6 +32,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.model.general.ConnectionBean;
import org.talend.core.service.ICloudSignOnService;
import org.talend.utils.json.JSONArray;
import org.talend.utils.json.JSONException;
import org.talend.utils.json.JSONObject;
@@ -158,6 +159,8 @@ public class ConnectionUserPerReader {
}
if (cons == null || cons.size() == 0) {
proper.remove("connection.users");//$NON-NLS-1$
proper.remove("connection.define");//$NON-NLS-1$
proper.remove("connection.lastConnection");//$NON-NLS-1$
} else {
JSONArray usersJsonArray = new JSONArray();
for (ConnectionBean currentConnection : cons) {
@@ -207,7 +210,6 @@ public class ConnectionUserPerReader {
} catch (Exception e) {
e.printStackTrace();
}
}
public void createPropertyFile() {

View File

@@ -581,3 +581,4 @@ I18nPreferencePage.restoreDefault=Restaurer les param\u00E8tres par d\u00E9faut
I18nPreferencePage.wait_process=Le processus va prendre plusieurs minutes, patientez...
MetadataPreferencePage.EnableBasic.name=Autorise l'en-t\u00EAte d'authentification basique
MetadataPreferencePage.MessageDialog.Restart=Le Studio doit red\u00E9marrer pour que ce param\u00E8tre soit pris en compte.\nContinuer malgr\u00E9 tout ?
TalendTabbedPropertyTitle.componentHelpTooltip=Ouvrir l'aide en ligne

View File

@@ -133,7 +133,7 @@ JavaFunctionParser.checkMethod=\u30EB\u30FC\u30C1\u30F3: "{0}.{1}"\u89E3\u6790\u
JavaGlobalVariableProposal.Description=\u8AAC\u660E: {0}
JavaGlobalVariableProposal.VariableName=\n\n\u5909\u6570\u540D: {1}
JavaSimpleDateFormatProposalProvider.displaySingleQuote= ' : \u4E00\u91CD\u5F15\u7528\u7B26\u3092\u8868\u793A
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3067\uFF11\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3092\u793A\u3057\u307E\u3059\u3002
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3067\uFF11\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3092\u793A\u3057\u307E\u3059\u3002
JavaTypesManager.bigDecimal=BIGDECIMAL\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.integer=INTEGER\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.list=LIST\u306F\u6570\u5024\u3067\u3059:
@@ -309,7 +309,7 @@ repository.metadataSAPConnections.alias=SAP
repository.SAPFunction=SAP\u30D5\u30A1\u30F3\u30AF\u30B7\u30E7\u30F3
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
repository.metadataSQLPatterns.alias=SQLTemplates
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited.alias=DELIM
repository.metadataFileLdif=LDIF\u30D5\u30A1\u30A4\u30EB
repository.metadataFileLdif.alias=LDIF

View File

@@ -581,3 +581,4 @@ I18nPreferencePage.restoreDefault=\u6062\u590D\u9ED8\u8BA4\u8BBE\u7F6E
I18nPreferencePage.wait_process=\u8FD9\u4E2A\u8FC7\u7A0B\u5C06\u6301\u7EED\u51E0\u5206\u949F\u65F6\u95F4\uFF0C\u8BF7\u7A0D\u5019...
MetadataPreferencePage.EnableBasic.name=\u542F\u7528\u57FA\u672C\u8EAB\u4EFD\u9A8C\u8BC1\u6807\u5934
MetadataPreferencePage.MessageDialog.Restart=\u6B64\u8BBE\u7F6E\u5C06\u5728 Studio \u91CD\u542F\u540E\u751F\u6548\u3002\n\u662F\u5426\u786E\u5B9A\uFF1F
TalendTabbedPropertyTitle.componentHelpTooltip=\u6253\u5F00\u5728\u7EBF\u5E2E\u52A9

View File

@@ -144,7 +144,7 @@ public class ContextTreeTable {
private IContextModelManager manager;
private final static int fixedCheckBoxWidth = 30;
private final static int fixedCheckBoxWidth = 90;
private final static int fixedTypeWidth = 90;
@@ -594,7 +594,7 @@ public class ContextTreeTable {
// the columns after "type" will caculated by the contexts
// 0=Name,1=Type,2=Comment.
int j = 3;
for (int i = 0; i < contexts.size(); i++) {
for (IContext context : contexts) {
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CONTEXT_VALUE });
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CHECK_PROPERTY });
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_PROMPT_PROPERTY });

View File

@@ -23,9 +23,9 @@ public class ContextTableConstants {
public static final String COLUMN_COMMENT_PROPERTY = "Comment"; //$NON-NLS-1$
public static final String COLUMN_CHECK_PROPERTY = ""; //$NON-NLS-1$
public static final String COLUMN_CHECK_PROPERTY = "Enable prompt"; //$NON-NLS-1$
public static final String COLUMN_PROMPT_PROPERTY = "Prompt"; //$NON-NLS-1$
public static final String COLUMN_PROMPT_PROPERTY = "Prompt label"; //$NON-NLS-1$
public static final String COLUMN_CONTEXT_VALUE = "Value"; //$NON-NLS-1$

View File

@@ -15,8 +15,8 @@ package org.talend.core.ui.preference.collector;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.service.IRemoteService;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
/**
* ggu class global comment. Detailled comment
@@ -33,7 +33,7 @@ public class TalendDataCollectorPreferenceInitializer extends AbstractPreference
IPreferenceStore preferenceStore = CoreUIPlugin.getDefault().getPreferenceStore();
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_UPLOAD_PERIOD, 5);
if(IBrandingService.get().isCloudLicense()) {
if(IRemoteService.get() != null && IRemoteService.get().isCloudConnection()) {
preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
}
}

View File

@@ -24,8 +24,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.service.IRemoteService;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.core.ui.i18n.Messages;
import org.talend.core.ui.token.TokenCollectorFactory;
@@ -47,7 +47,7 @@ public class TalendDataCollectorPreferencePage extends FieldEditorPreferencePage
@Override
protected void createFieldEditors() {
if(!IBrandingService.get().isCloudLicense()) {
if(!(IRemoteService.get() != null && IRemoteService.get().isCloudConnection())) {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED,
Messages.getString("TalendDataCollectorPreferencePage_EnableCapture"), getFieldEditorParent())); //$NON-NLS-1$
}

View File

@@ -115,7 +115,7 @@ GlobalServiceRegister.ServiceNotRegistered=\u30B5\u30FC\u30D3\u30B9{0}\u304C\u76
GroupByContextAction.groupContext=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3054\u3068\u306B\u30B0\u30EB\u30FC\u30D4\u30F3\u30B0
GroupByVariableAction.groupVariable=\u5909\u6570\u3054\u3068\u306B\u30B0\u30EB\u30FC\u30D4\u30F3\u30B0
JavaSimpleDateFormatProposalProvider.displaySingleQuote= ' : \u4E00\u91CD\u5F15\u7528\u7B26\u3092\u8868\u793A
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3067\uFF11\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3092\u793A\u3057\u307E\u3059\u3002
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3067\uFF11\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3092\u793A\u3057\u307E\u3059\u3002
JavaTypesManager.bigDecimal=BIGDECIMAL\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.integer=INTEGER\u306F\u6570\u5024\u3067\u3059:
JavaTypesManager.list=LIST\u306F\u6570\u5024\u3067\u3059:

View File

@@ -12,21 +12,10 @@
// ============================================================================
package org.talend.core;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -41,21 +30,19 @@ import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.exception.SystemException;
import org.talend.commons.runtime.xml.XmlUtil;
import org.talend.commons.ui.runtime.image.OverlayImageProvider;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.model.general.LibraryInfo;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.ColumnNameChanged;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.MetadataToolHelper;
import org.talend.core.model.metadata.QueryUtil;
import org.talend.core.model.metadata.builder.ConvertionHelper;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.process.ElementParameterParser;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryManager;
@@ -70,6 +57,7 @@ import org.talend.core.model.utils.TalendTextUtils;
import org.talend.core.prefs.PreferenceManipulator;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.services.ICoreTisService;
import org.talend.core.services.IJobCheckService;
import org.talend.core.utils.KeywordsValidator;
import org.talend.designer.codegen.ICodeGeneratorService;
@@ -77,16 +65,9 @@ import org.talend.designer.codegen.ITalendSynchronizer;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.repository.ProjectManager;
import org.talend.repository.RepositoryWorkUnit;
import org.talend.repository.model.RepositoryConstants;
import org.talend.utils.xml.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* DOC Administrator class global comment. Detailled comment
@@ -350,120 +331,15 @@ public class CoreService implements ICoreService {
}
@Override
@Deprecated
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject) {
try {
if (talendJavaProject == null) {
return;
}
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
File mappingSource = new File(url.getPath());
FilenameFilter filter = new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
if (XmlUtil.isXMLFile(name)) {
return true;
}
return false;
}
};
for (File file : mappingSource.listFiles(filter)) {
String targetName = getTargetName(file);
IFile targetFile = xmlMappingFolder.getFile(targetName);
copyFile(file, targetFile);
}
}
} catch (CoreException e) {
ExceptionHandler.process(e);
} catch (IOException e) {
ExceptionHandler.process(e);
} catch (SystemException e) {
ExceptionHandler.process(e);
}
//
}
@Override
@Deprecated
public void syncMappingsFileFromSystemToProject() {
RepositoryWorkUnit workUnit = new RepositoryWorkUnit("Sync mapping files from system to project") { //$NON-NLS-1$
@Override
protected void run() throws LoginException, PersistenceException {
try {
File sysMappingfolder = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()).getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
if (!projectMappingFolder.exists()) {
projectMappingFolder.create(true, true, null);
}
for (File in : sysMappingfolder.listFiles()) {
IFile out = projectMappingFolder.getFile(in.getName());
copyFile(in, out);
}
} catch (SystemException | CoreException | IOException e) {
ExceptionHandler.process(e);
}
}
};
workUnit.setAvoidUnloadResources(true);
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
}
public String getTargetName(File file) {
String targetName = file.getName();
try {
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
Document document = analyser.parse(file);
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
String dbmsIdValue = "";
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
Node dbmsNode = dbmsNodes.item(iDbms);
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
}
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
final String[] fileNameSplit = targetName.split("_");
String idA = "_id";
String idB = "id_";
final int indexA = dbmsIdValue.indexOf(idA);
final int indexB = dbmsIdValue.indexOf(idB);
String secondeName = "";
if (indexA > 0) {
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
} else if (indexB == 0) {
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
} else if (indexA == -1 && indexB == -1) {
secondeName = dbmsIdValue;
}
if (secondeName != null && !"".equals(secondeName)) {
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
}
}
} catch (ParserConfigurationException e) {
ExceptionHandler.process(e);
} catch (SAXException e) {
ExceptionHandler.process(e);
} catch (IOException e) {
ExceptionHandler.process(e);
}
return targetName;
}
public void copyFile(File in, IFile out) throws CoreException, IOException {
FileInputStream fis = new FileInputStream(in);
if (out.exists()) {
out.setContents(fis, true, false, null);
} else {
out.create(fis, true, null);
}
fis.close();
//
}
@Override
@@ -526,4 +402,31 @@ public class CoreService implements ICoreService {
}
});
}
@Override
public Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception {
ICoreTisService coreTisService = ICoreTisService.get();
if (coreTisService != null) {
return coreTisService.getSignatureVerifyResult(property, resourcePath, considerGP);
}
return null;
}
@Override
public String getLicenseCustomer() {
ICoreTisService coreTisService = ICoreTisService.get();
if (coreTisService != null) {
return coreTisService.getLicenseCustomer();
}
return null;
}
@Override
public boolean isInValidGP() {
ICoreTisService coreTisService = ICoreTisService.get();
if (coreTisService != null) {
return coreTisService.isInValidGP();
}
return false;
}
}

View File

@@ -21,6 +21,7 @@ import org.talend.commons.exception.PersistenceException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.components.conversions.IComponentConversion;
import org.talend.core.model.components.conversions.RenameComponentConversion;
import org.talend.core.model.components.conversions.DefaultRenameComponentConversion;
import org.talend.core.model.components.filters.IComponentFilter;
import org.talend.core.model.components.filters.NameComponentFilter;
import org.talend.core.model.properties.Item;
@@ -56,6 +57,20 @@ public class ModifyComponentsAction {
throws PersistenceException {
searchAndModify(item, item.getProcess(), filter, conversions);
}
/**
* Rename component name
* @param item job item
* @param processType Process type
* @param oldName old base name, for tck component, name does not include prefix "t", while for non tck components, name includes prefix "t".
* @param newName new base name, for tck component, name does not include prefix "t", while for non tck components, name includes prefix "t".
* @return
* @throws PersistenceException
*/
public static boolean searchAndRenameComponent(Item item, ProcessType processType, String oldName, String newName) throws PersistenceException {
return searchAndModify(item, processType, new NameComponentFilter(oldName), Arrays.<IComponentConversion> asList(new DefaultRenameComponentConversion(oldName, newName)));
}
public static boolean searchAndModify(Item item, ProcessType processType, IComponentFilter filter,
List<IComponentConversion> conversions) throws PersistenceException {

View File

@@ -0,0 +1,118 @@
// ============================================================================
//
// Copyright (C) 2006-2022 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.core.model.components.conversions;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.runtime.model.components.IComponentConstants;
import org.talend.core.model.components.ComponentUtilities;
import org.talend.designer.core.model.utils.emf.talendfile.ConnectionType;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.designer.core.model.utils.emf.talendfile.SubjobType;
/**
* @author bhe created on Jul 6, 2022
*
*/
public class DefaultRenameComponentConversion implements IComponentConversion {
private String newName;
private String oldName;
/**
* Rename component name
*
* @param oldName old base name of the component, e.g. NetSuiteV2019Input
* @param newName new base name of the component, e.g. NetSuiteNewInput
*/
public DefaultRenameComponentConversion(String oldName, String newName) {
super();
this.newName = newName;
this.oldName = oldName;
}
public void transform(NodeType node) {
node.setComponentName(newName);
ProcessType item = (ProcessType) node.eContainer();
String oldNodeUniqueName = ComponentUtilities.getNodeUniqueName(node);
ComponentUtilities.setNodeUniqueName(node, oldNodeUniqueName.replaceAll(oldName, newName));
replaceAllInAllNodesParameterValue(item, this.oldName, this.newName);
}
protected static void replaceAllInAllNodesParameterValue(ProcessType item, String oldName, String newName) {
for (Object o : item.getNode()) {
NodeType nt = (NodeType) o;
ComponentUtilities.replaceInNodeParameterValue(nt, oldName, newName);
EList metaList = nt.getMetadata();
if (metaList != null) {
if (!metaList.isEmpty()) {
for (Object obj : metaList) {
MetadataType meta = (MetadataType) obj;
if (meta.getName().contains(oldName)) {
meta.setName(meta.getName().replaceAll(oldName, newName));
}
}
}
}
}
for (Object o : item.getConnection()) {
ConnectionType currentConnection = (ConnectionType) o;
if (currentConnection.getSource().contains(oldName)) {
currentConnection.setSource(currentConnection.getSource().replaceAll(oldName, newName));
}
if (currentConnection.getTarget().contains(oldName)) {
currentConnection.setTarget(currentConnection.getTarget().replaceAll(oldName, newName));
}
if (currentConnection.getMetaname().contains(oldName)) {
currentConnection.setMetaname(currentConnection.getMetaname().replaceAll(oldName, newName));
}
if ("RUN_IF".equals(currentConnection.getConnectorName())) {
for (Object obj : currentConnection.getElementParameter()) {
ElementParameterType type = (ElementParameterType) obj;
if ("CONDITION".equals(type.getName())) {
if (type.getValue() != null && type.getValue().contains(oldName)) {
String replaceAll = type.getValue().replaceAll(oldName, newName);
type.setValue(replaceAll);
}
break;
}
}
}
}
for (Object o : item.getSubjob()) {
SubjobType sj = (SubjobType) o;
for (Object obj : sj.getElementParameter()) {
ElementParameterType p = (ElementParameterType) obj;
if (p.getName().equals(IComponentConstants.UNIQUE_NAME)) {
if (p.getValue() != null && p.getValue().contains(oldName)) {
String replaceAll = p.getValue().replaceAll(oldName, newName);
p.setValue(replaceAll);
}
}
}
}
}
public String getNewName() {
return this.newName;
}
public void setNewName(String newName) {
this.newName = newName;
}
}

View File

@@ -1,86 +1,103 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// 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.core.prefs;
import java.util.Arrays;
import java.util.ResourceBundle;
import org.talend.commons.i18n.MessagesCore;
/**
* Use to retrieve general application parameters.<br/>
*
* $Id: Messages.java 1 2006-09-29 17:06:40 +0000 (ven., 29 sept. 2006) nrousseau $
*
*/
public class GeneralParametersProvider extends MessagesCore {
private static final String BUNDLE_NAME = "parameters"; //$NON-NLS-1$
private static final String PLUGIN_ID = "org.talend.core"; //$NON-NLS-1$
private static ResourceBundle resourceBundle;
private static ResourceBundle getBundle() {
if (resourceBundle == null) {
try {
resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
} catch (Exception e) {
// Nothing to do (return null)
}
}
return resourceBundle;
}
/**
* Returns the value corresponding to the specified key.
*/
public static String getString(GeneralParameters key) {
return getString(key.getParamName(), PLUGIN_ID, getBundle());
}
/**
* Returns a sorted string array containing values corresponding to the specified key.
*/
public static String[] getStrings(GeneralParameters key) {
String value = getString(key);
String[] toReturn = value.split(","); //$NON-NLS-1$
Arrays.sort(toReturn);
return toReturn;
}
/**
* DOC smallet GeneralParametersProvider class global comment. Detailled comment <br/>
*
* $Id$
*/
public enum GeneralParameters {
AUTHORIZED_LANGUAGE("param.authorizedlanguage"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_WIN32("param.defaultPerlInterpreterPath.win32"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_LINUX("param.defaultPerlInterpreterPath.linux"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_EMBEDDED_SUFFIX_WIN32("param.defaultPerlInterpreterEmbeddedSuffix.win32"), //$NON-NLS-1$
DEFAULT_JAVA_INTERPRETER_SUFFIX_WIN32("param.defaultJavaInterpreterSuffix.win32"), //$NON-NLS-1$
DEFAULT_JAVA_INTERPRETER_SUFFIX_LINUX("param.defaultJavaInterpreterSuffix.linux"), //$NON-NLS-1$
PROJECTS_EXCLUDED_FROM_EXPORT("param.projectsExcludedFromExport"); //$NON-NLS-1$
private String paramName;
GeneralParameters(String paramName) {
this.paramName = paramName;
}
public String getParamName() {
return this.paramName;
}
}
}
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// 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.core.prefs;
import java.util.Arrays;
import java.util.Locale;
import java.util.ResourceBundle;
import org.apache.commons.lang3.StringUtils;
import org.talend.commons.i18n.MessagesCore;
import org.talend.core.CorePlugin;
/**
* Use to retrieve general application parameters.<br/>
*
* $Id: Messages.java 1 2006-09-29 17:06:40 +0000 (ven., 29 sept. 2006) nrousseau $
*
*/
public class GeneralParametersProvider extends MessagesCore {
private static final String BUNDLE_NAME = "parameters"; //$NON-NLS-1$
private static final String PLUGIN_ID = "org.talend.core"; //$NON-NLS-1$
private static ResourceBundle resourceBundle;
private static ResourceBundle getBundle() {
if (resourceBundle == null) {
try {
resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
} catch (Exception e) {
// Nothing to do (return null)
}
}
return resourceBundle;
}
/**
* Returns the value corresponding to the specified key.
*/
public static String getString(GeneralParameters key) {
return getString(key.getParamName(), PLUGIN_ID, getBundle());
}
/**
* Returns a sorted string array containing values corresponding to the specified key.
*/
public static String[] getStrings(GeneralParameters key) {
String value = getString(key);
String[] toReturn = value.split(","); //$NON-NLS-1$
Arrays.sort(toReturn);
return toReturn;
}
public static String getOnLineHelpLanguageSetting() {
String language = CorePlugin.getDefault().getPluginPreferences().getString(ITalendCorePrefConstants.LANGUAGE_SELECTOR);
if (StringUtils.isBlank(language)) {
language = Locale.getDefault().getLanguage();
}
if (Locale.FRENCH.getLanguage().equals(language)) {
return "fr";
}
if (Locale.JAPAN.getLanguage().equals(language)) {
return "ja";
}
return "en"; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* DOC smallet GeneralParametersProvider class global comment. Detailled comment <br/>
*
* $Id$
*/
public enum GeneralParameters {
AUTHORIZED_LANGUAGE("param.authorizedlanguage"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_WIN32("param.defaultPerlInterpreterPath.win32"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_LINUX("param.defaultPerlInterpreterPath.linux"), //$NON-NLS-1$
DEFAULT_PERL_INTERPRETER_EMBEDDED_SUFFIX_WIN32("param.defaultPerlInterpreterEmbeddedSuffix.win32"), //$NON-NLS-1$
DEFAULT_JAVA_INTERPRETER_SUFFIX_WIN32("param.defaultJavaInterpreterSuffix.win32"), //$NON-NLS-1$
DEFAULT_JAVA_INTERPRETER_SUFFIX_LINUX("param.defaultJavaInterpreterSuffix.linux"), //$NON-NLS-1$
PROJECTS_EXCLUDED_FROM_EXPORT("param.projectsExcludedFromExport"); //$NON-NLS-1$
private String paramName;
GeneralParameters(String paramName) {
this.paramName = paramName;
}
public String getParamName() {
return this.paramName;
}
}
}

View File

@@ -18,6 +18,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.util.URI;
import org.osgi.service.prefs.BackingStoreException;
@@ -84,9 +85,25 @@ public interface ICoreTisService extends IService {
public void afterImport (Property property) throws PersistenceException;
Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception;
String getLicenseCustomer();
void storeLicenseAndUpdateConfig(String licenseString) throws IOException;
boolean isInValidGP();
boolean hasNewPatchInPatchesFolder();
boolean isDefaultLicenseAndProjectType();
String getLicenseProductName(String licenseString) throws Exception;
String getLicenseProductEdition(String licenseString) throws Exception;
boolean isLicenseExpired(String licenseString) throws Exception;
boolean isLicenseVersionCorrect(String licenseString) throws Exception;
void syncProjectUpdateSettingsFromServer(IProgressMonitor monitor, Project proj) throws Exception;

View File

@@ -59,7 +59,6 @@ import org.talend.commons.utils.generation.JavaUtils;
import org.talend.commons.utils.time.TimeMeasure;
import org.talend.core.CorePlugin;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.ITDQItemService;
import org.talend.core.PluginChecker;
import org.talend.core.context.Context;
@@ -102,13 +101,11 @@ import org.talend.core.model.routines.CodesJarInfo;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.maven.MavenConstants;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.runtime.process.LastGenerationInfo;
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.core.runtime.repository.build.BuildExportManager;
import org.talend.core.runtime.services.IDesignerMavenService;
import org.talend.core.service.IResourcesDependenciesService;
@@ -139,8 +136,6 @@ public class ProcessorUtilities {
private static Logger log = Logger.getLogger(ProcessorUtilities.class);
public static final String PROP_MAPPINGS_URL = "talend.mappings.url"; //$NON-NLS-1$
/**
* For generating code in CI without param -pl
*/
@@ -283,6 +278,19 @@ public class ProcessorUtilities {
needExportItemsForDQ = false;
}
public static void resetExportConfig(boolean noResetDq) {
interpreter = null;
codeLocation = null;
libraryPath = null;
exportConfig = false;
exportAsOSGI = false;
exportTimeStamp = null;
exportJobAsMicroService = false;
if (!noResetDq) {
needExportItemsForDQ = false;
}
}
public static String getInterpreter() {
return interpreter;
}
@@ -734,30 +742,10 @@ public class ProcessorUtilities {
boolean hasDynamicMetadata = hasMetadataDynamic(currentProcess, jobInfo);
LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), hasDynamicMetadata);
if (hasDynamicMetadata) {
try {
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
IFolder xmlMappingFolder = jobInfo.getProcessor().getTalendJavaProject().getResourceSubFolder(null,
JavaUtils.JAVA_XML_MAPPING);
ProjectPreferenceManager manager = CoreRuntimePlugin.getInstance().getProjectPreferenceManager();
boolean updated = manager.getBoolean(MetadataTalendType.UPDATED_MAPPING_FILES);
if ((xmlMappingFolder.members().length == 0 || updated)
&& GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
ICoreService coreService =
GlobalServiceRegister.getDefault().getService(ICoreService.class);
coreService.synchronizeMapptingXML(jobInfo.getProcessor().getTalendJavaProject());
// reset
if (updated) {
manager.setValue(MetadataTalendType.UPDATED_MAPPING_FILES, false);
manager.save();
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
ITalendProcessJavaProject talendJavaProject = jobInfo.getProcessor().getTalendJavaProject();
if (talendJavaProject != null) {
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
MetadataTalendType.syncMappingFiles(xmlMappingFolder.getLocation().toFile(), true);
}
}
}
@@ -831,7 +819,8 @@ public class ProcessorUtilities {
// TDI-36930, just after compile, need check the compile errors first.
// only check current build
if (isMainJob) {
CorePlugin.getDefault().getRunProcessService().checkLastGenerationHasCompilationError(true);
CorePlugin.getDefault().getRunProcessService().checkLastGenerationHasCompilationError(true,
!ComponentCategory.CATEGORY_4_CAMEL.getName().equals(currentProcess.getComponentsType()));
}
}
@@ -1953,12 +1942,6 @@ public class ProcessorUtilities {
private static void updateCodeSources() throws ProcessorException {
if (isRemoteProject()) {
// TESB-29071
try {
ProxyRepositoryFactory.getInstance().initialize();
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.ROUTINES);
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.BEANS);
}

View File

@@ -56,7 +56,7 @@ _UI_TypeAlias_type=Type Alias
_UI_Union_type=Union
_UI_UnionMember_type=Membre de l'union
_UI_ExpressionNode_type=N\u0153ud d'expression
_UI_ConstantNode_type=Noeud constant
_UI_ConstantNode_type=N\u0153ud constant
_UI_ElementNode_type=N\u0153ud d'\u00E9l\u00E9ment
_UI_FeatureNode_type=N\u0153ud de fonctionnalit\u00E9
_UI_UniqueKey_type=Cl\u00E9 unique

View File

@@ -788,7 +788,7 @@ _UI_Term_concept_feature=\u30B3\u30F3\u30BB\u30D7\u30C8
_UI_Term_relatedTerm_feature=\u95A2\u9023\u7528\u8A9E
_UI_Term_term_feature=\u7528\u8A9E
_UI_Term_preferredTerm_feature=\u597D\u307E\u3057\u3044Term
_UI_Term_synonym_feature=\u540C\u7FA9\u8A9E
_UI_Term_synonym_feature=\u30B7\u30CE\u30CB\u30E0
_UI_Term_widerTerm_feature=\u5E45\u5E83\u3044Term
_UI_Term_narrowerTerm_feature=Narrower Term
_UI_WarehouseProcess_staticDefinition_feature=\u9759\u7684\u5B9A\u7FA9

View File

@@ -11,16 +11,16 @@
<packaging>eclipse-plugin</packaging>
<properties>
<tcomp.version>${component-runtime.version}</tcomp.version>
<cxf.version>3.5.1</cxf.version>
<cxf.version>3.5.2</cxf.version>
<geronimo.version>1.0.2</geronimo.version>
<jcache.version>1.0.5</jcache.version>
<jcache_spec.version>1.0-alpha-1</jcache_spec.version>
<johnzon.version>1.2.16</johnzon.version>
<meecrowave.version>1.2.13</meecrowave.version>
<johnzon.version>1.2.19</johnzon.version>
<meecrowave.version>1.2.14</meecrowave.version>
<microprofile.version>1.2.1</microprofile.version>
<owb.version>2.0.26</owb.version>
<slf4j.version>1.7.33</slf4j.version>
<tomcat.version>9.0.62</tomcat.version>
<owb.version>2.0.27</owb.version>
<slf4j.version>1.7.34</slf4j.version>
<tomcat.version>9.0.63</tomcat.version>
<xbean.version>4.20</xbean.version>
<reload4j.version>1.2.19</reload4j.version>
<log4j2.version>2.17.2</log4j2.version>

View File

@@ -27,6 +27,10 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
</exclusion>
<exclusion>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

View File

@@ -113,12 +113,12 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.0</version>
<version>2.13.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>

View File

@@ -84,12 +84,12 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.0</version>
<version>2.13.2.2</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>

View File

@@ -38,7 +38,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
</dependencies>
<build>

View File

@@ -13,7 +13,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>

View File

@@ -32,7 +32,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
@@ -123,7 +123,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
@@ -155,6 +155,11 @@
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache-extras.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>2.0b6</version>
</dependency>
</dependencies>
<build>
<plugins>

View File

@@ -38,8 +38,58 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.0.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
<version>3.3.3</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.0-jre</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
@@ -48,7 +98,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<version>2.8.2</version>
</dependency>
</dependencies>
<build>

View File

@@ -9,13 +9,13 @@
</parent>
<artifactId>studio-tcompv1-dependencies</artifactId>
<packaging>pom</packaging>
<properties>
<tcomp.version>1.45.2</tcomp.version>
<slf4j.version>1.7.32</slf4j.version>
<tcomp.version>1.49.1</tcomp.version>
<slf4j.version>1.7.34</slf4j.version>
<reload4j.version>1.2.19</reload4j.version>
</properties>
<repositories>
<repository>
<id>talend_open</id>
@@ -58,7 +58,7 @@
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
@@ -70,7 +70,7 @@
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.talend.sdk.component</groupId>
@@ -119,7 +119,7 @@
<version>${slf4j.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>

View File

@@ -24,9 +24,27 @@
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
@@ -87,7 +105,12 @@
<configuration>
<tasks>
<echo message="Unzip old repository..." />
<unzip src="${basedir}/../repository/maven_repository.zip" dest="${basedir}/../tmp/" />
<unzip src="${basedir}/../repository/maven_repository.zip" dest="${basedir}/../tmp/">
<patternset>
<exclude name="repository/org/apache/maven/maven-artifact-manager/2.0.9/"/>
<exclude name="repository/org/apache/maven/maven-artifact-manager/2.0.6/"/>
</patternset>
</unzip>
</tasks>
</configuration>
<goals>

View File

@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -100,7 +100,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -147,7 +147,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -199,12 +199,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -228,6 +228,11 @@
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
@@ -254,19 +259,29 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<version>2.8.2</version>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>

View File

@@ -61,6 +61,7 @@ import org.eclipse.osgi.util.NLS;
import org.talend.commons.CommonsPlugin;
import org.talend.core.prefs.SecurityPreferenceConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.service.IRemoteService;
import org.talend.utils.security.StudioEncryption;
/**
@@ -121,7 +122,7 @@ public class TalendMavenLaunchDelegate extends JavaLaunchDelegate implements Mav
this.extensionsSupport = MavenLaunchExtensionsSupport.create(configuration, launch);
log.info("" + getWorkingDirectory(configuration)); //$NON-NLS-1$
log.info(" mvn" + getProgramArguments(configuration, true)); //$NON-NLS-1$
log.info(" mvn" + getProgramArguments(configuration, IRemoteService.get() == null ? false: IRemoteService.get().isCloudConnection())); //$NON-NLS-1$
this.programArguments = null;
extensionsSupport.configureSourceLookup(configuration, launch, monitor);

View File

@@ -14,15 +14,16 @@ package org.talend.designer.maven.tools;
import static org.talend.designer.maven.model.TalendJavaProjectConstants.*;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -64,8 +65,10 @@ import org.talend.core.model.general.ILibrariesService;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus;
import org.talend.core.model.general.Project;
import org.talend.core.model.process.JobInfo;
import org.talend.core.model.process.ProcessUtils;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.ProjectReference;
import org.talend.core.model.properties.Property;
import org.talend.core.model.relationship.Relation;
@@ -525,7 +528,7 @@ public class AggregatorPomsHelper {
@Override
public void run(final IProgressMonitor monitor) throws CoreException {
try {
syncAllPomsWithoutProgress(monitor, PomIdsHelper.getPomFilter());
syncAllPomsWithoutProgress(monitor, PomIdsHelper.getPomFilter(), false);
} catch (Exception e) {
ExceptionHandler.process(e);
}
@@ -620,10 +623,11 @@ public class AggregatorPomsHelper {
}
public void syncAllPomsWithoutProgress(IProgressMonitor monitor) throws Exception {
syncAllPomsWithoutProgress(monitor, PomIdsHelper.getPomFilter());
syncAllPomsWithoutProgress(monitor, PomIdsHelper.getPomFilter(), false);
}
public void syncAllPomsWithoutProgress(IProgressMonitor monitor, String pomFilter) throws Exception {
public void syncAllPomsWithoutProgress(IProgressMonitor monitor, String pomFilter, boolean withDependencies)
throws Exception {
LOGGER.info("syncAllPomsWithoutProgress, pomFilter: " + pomFilter);
IRunProcessService runProcessService = IRunProcessService.get();
if (runProcessService == null) {
@@ -634,11 +638,43 @@ public class AggregatorPomsHelper {
Boolean isCIMode = IRunProcessService.get().isCIMode();
List<IRepositoryViewObject> objects = new ArrayList<>();
List<ERepositoryObjectType> allJobletTypes = ERepositoryObjectType.getAllTypesOfJoblet();
for (ERepositoryObjectType type : ERepositoryObjectType.getAllTypesOfProcess2()) {
if (isCIMode && withDependencies && allJobletTypes.contains(type)) {
continue;
}
objects.addAll(ProxyRepositoryFactory.getInstance().getAll(type, true, true));
}
Iterator<IRepositoryViewObject> iterator = objects.iterator();
while (iterator.hasNext()) {
IRepositoryViewObject object = iterator.next();
if (object.getProperty() == null || object.getProperty().getItem() == null) {
iterator.remove();
continue;
}
if (isCIMode && !allJobletTypes.contains(object.getRepositoryObjectType()) && IFilterService.get() != null
&& !IFilterService.get().isFilterAccepted(object.getProperty().getItem(), pomFilter)) {
iterator.remove();
continue;
}
if (isCIMode && object.isDeleted() && PomIdsHelper.getIfExcludeDeletedItems()) {
iterator.remove();
}
}
Set<Item> allItems;
if (withDependencies) {
allItems = objects.stream().flatMap(object -> {
ProcessItem item = (ProcessItem) object.getProperty().getItem();
Set<JobInfo> allJobInfos = ProcessorUtilities.getChildrenJobInfo(item, false, true);
allJobInfos.add(new JobInfo(item, item.getProcess().getDefaultContext()));
return allJobInfos.stream();
}).map(info -> info.getJobletProperty() != null ? info.getJobletProperty().getItem() : info.getProcessItem())
.collect(Collectors.toSet());
} else {
allItems = objects.stream().map(object -> object.getProperty().getItem()).collect(Collectors.toSet());
}
int size = 3 + objects.size();
int size = 3 + allItems.size();
monitor.setTaskName("Synchronize all poms"); //$NON-NLS-1$
monitor.beginTask("", size); //$NON-NLS-1$
// project pom
@@ -674,41 +710,17 @@ public class AggregatorPomsHelper {
}
// all jobs pom
List<String> modules = new ArrayList<>();
IFilterService filterService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IFilterService.class)) {
filterService = (IFilterService) GlobalServiceRegister.getDefault().getService(IFilterService.class);
}
List<Property> serviceRefJobs = getAllServiceReferencedJobs();
List<ERepositoryObjectType> allJobletTypes = ERepositoryObjectType.getAllTypesOfJoblet();
for (IRepositoryViewObject object : objects) {
if (filterService != null) {
if (isCIMode && !allJobletTypes.contains(object.getRepositoryObjectType())
&& !filterService.isFilterAccepted(object.getProperty().getItem(), pomFilter)) {
continue;
}
}
if (object.getProperty() != null && object.getProperty().getItem() != null) {
if (isCIMode && object.isDeleted() && PomIdsHelper.getIfExcludeDeletedItems()) {
continue;
}
Item item = object.getProperty().getItem();
if (ProjectManager.getInstance().isInCurrentMainProject(item)) {
monitor.subTask("Synchronize job pom: " + item.getProperty().getLabel() //$NON-NLS-1$
+ "_" + item.getProperty().getVersion()); //$NON-NLS-1$
if (runProcessService != null) {
// already filtered
runProcessService.generatePom(item, TalendProcessOptionConstants.GENERATE_POM_NO_FILTER);
} else {
ExceptionHandler.log("Cannot generate pom for " + object.getLabel()
+ " - Reason: RunProcessService is null.");
}
IFile pomFile = getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME);
// TODO if not work, use serviceRefJobs.contains(object.getProperty()) to judge
// filter esb data service node
if (isCIMode && !isSOAPServiceProvider(object.getProperty()) && pomFile.exists()) {
modules.add(getModulePath(pomFile));
}
for (Item item : allItems) {
if (ProjectManager.getInstance().isInCurrentMainProject(item)) {
monitor.subTask("Synchronize job pom: " + item.getProperty().getLabel() //$NON-NLS-1$
+ "_" + item.getProperty().getVersion()); //$NON-NLS-1$
runProcessService.generatePom(item, TalendProcessOptionConstants.GENERATE_POM_NO_FILTER);
IFile pomFile = getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME);
// filter esb data service node
// FIXME use serviceRefJobs.contains(item.getProperty()) if isSOAPServiceProvider() doesn't work.
if (isCIMode && !isSOAPServiceProvider(item.getProperty()) && pomFile.exists()) {
modules.add(getModulePath(pomFile));
}
}
monitor.worked(1);

View File

@@ -241,7 +241,8 @@ public class BuildCacheManager {
property.getVersion(), true);
if (obj != null) {
IRunProcessService.get().generatePom(obj.getProperty().getItem(),
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE);
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE
| TalendProcessOptionConstants.GENERATE_NO_RESET_DQ);
}
}
}
@@ -331,7 +332,7 @@ public class BuildCacheManager {
private ITalendProcessJavaProject getTalendJobJavaProject(Property property) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
return service.getTalendJobJavaProject(property);
}
@@ -347,7 +348,7 @@ public class BuildCacheManager {
private boolean isBuildJob() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
return service.isExportConfig();
}

View File

@@ -36,6 +36,7 @@ import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.designer.maven.utils.PomUtil;
import org.talend.designer.runprocess.IProcessor;
import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.utils.io.FilesUtils;
/**
@@ -123,6 +124,7 @@ public class MavenPomSynchronizer {
if (!jProject.isOpen()) {
jProject.open(monitor);
}
// empty the src/main/java...
IFolder srcFolder = codeProject.getSrcFolder();
codeProject.cleanFolder(monitor, srcFolder);
@@ -131,10 +133,12 @@ public class MavenPomSynchronizer {
IFolder resourcesFolder = codeProject.getExternalResourcesFolder();
codeProject.cleanFolder(monitor, resourcesFolder);
// empty the outputs, target
IFolder targetFolder = codeProject.getTargetFolder();
codeProject.cleanFolder(monitor, targetFolder);
// CI mode, need to depend on maven to clean target folder or not.
if (!ProcessorUtilities.isCIMode()) {
// empty the outputs, target
IFolder targetFolder = codeProject.getTargetFolder();
codeProject.cleanFolder(monitor, targetFolder);
}
// empty the src/test/java
IFolder testSrcFolder = codeProject.getTestSrcFolder();
codeProject.cleanFolder(monitor, testSrcFolder);

View File

@@ -140,8 +140,14 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
Exclusion jacksonExclusion = new Exclusion();
jacksonExclusion.setGroupId("com.fasterxml.jackson.core"); //$NON-NLS-1$
jacksonExclusion.setArtifactId("jackson-databind "); //$NON-NLS-1$
Exclusion configuration2Exclusion = new Exclusion();
configuration2Exclusion.setGroupId("org.apache.commons"); //$NON-NLS-1$
configuration2Exclusion.setArtifactId("commons-configuration2"); //$NON-NLS-1$
dependency.addExclusion(exclusion);
dependency.addExclusion(jacksonExclusion);
dependency.addExclusion(configuration2Exclusion);
}
existedDependencies.add(dependency);
}

View File

@@ -128,7 +128,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
if (ProcessUtils.isTestContainer(process)) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
ITestContainerProviderService testService = GlobalServiceRegister.getDefault()
.getService(ITestContainerProviderService.class);
try {
property = testService.getParentJobItem(property.getItem()).getProperty();
@@ -231,7 +231,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
Dependency mavenCoreDep = new Dependency();
mavenCoreDep.setGroupId("org.apache.maven");
mavenCoreDep.setArtifactId("maven-core");
mavenCoreDep.setVersion("3.8.3");
mavenCoreDep.setVersion("3.8.6");
shade.getDependencies().add(guavaDep);
shade.getDependencies().add(codecDep);
@@ -454,6 +454,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
*
* @param hasLoopDependency the hasLoopDependency to set
*/
@Override
public void setHasLoopDependency(boolean hasLoopDependency) {
this.hasLoopDependency = hasLoopDependency;
}

View File

@@ -300,6 +300,111 @@ public class PomIdsHelper {
return filter;
}
private static String getPublishCloudVersion(String latestVersion) {
if (null == latestVersion) {
return "0.1.0";
} else {
int i = latestVersion.lastIndexOf('.') + 1;
return latestVersion.substring(0, i) + (Long.parseLong(latestVersion.substring(i)) + 1);
}
}
/**
* @return "<bundleVersion>".
*/
public static String getNotIteratedBundleVersion(Property property, String bundleVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = bundleVersion;
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
/**
* @return "<featureVersion>".
*/
public static String getNotIteratedFeatureVersion(Property property, String featureVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = featureVersion;
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
/**
* @return "<bundleVersion>".
*/
public static String getBundleVersion(Property property, String bundleVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = getPublishCloudVersion(bundleVersion);
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
/**
* @return "<featureVersion>".
*/
public static String getFeatureVersion(Property property, String featureVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = getPublishCloudVersion(featureVersion);
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
public static boolean useProfileModule() {
String useProfileModule = System.getProperty("talend.profile.module");
if (useProfileModule != null) {
@@ -426,4 +531,4 @@ public class PomIdsHelper {
return preferenceManagers.get(projectTechName);
}
}
}

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/stax2-api-4.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-asl-4.4.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/woden-api-1.0M9.jar"/>
<classpathentry exported="true" kind="lib" path="lib/axiom-api-1.2.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/axiom-impl-1.2.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/neethi-3.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wstx-asl-3.2.9.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xmlschema-core-2.2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

View File

@@ -20,12 +20,13 @@ Bundle-ClassPath: lib/axiom-api-1.3.0.jar,
lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
lib/mail-1.4.jar,
lib/neethi-3.0.1.jar,
lib/wstx-asl-3.2.9.jar,
lib/xmlschema-core-2.2.1.jar,
lib/woden-api-1.0M9.jar,
lib/axis2-codegen-1.8.0.jar,
lib/axis2-java2wsdl-1.8.0.jar,
lib/axis2-metadata-1.8.0.jar,
lib/woodstox-core-asl-4.4.1.jar,
lib/stax2-api-4.2.1.jar,
.
Export-Package: com.ctc.wstx.api,
com.ctc.wstx.cfg,

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