Compare commits

...

197 Commits

Author SHA1 Message Date
Zhiwei Xue
5210b033d0 feat(TUP-38140):SAP CDS Views over Talend (#6178) 2023-06-08 15:17:17 +08:00
hzhao
e91b347450 fix(TUP-38590): CI/CD Pipeline generating different code (#6177) 2023-06-08 09:38:58 +08:00
Emmanuel GALLOIS
ea459b8710 feat(TDI-49854): bump component-runtime to 1.57 (#6207) 2023-06-07 15:48:28 +02:00
wang wei
2ee58ac9d0 fix(TDI-49753): improve tsetkeystore 2023-06-07 18:14:12 +08:00
Jane Ding
0e668b3239 feat(TUP-38589):Managed updates improvements (#6196)
* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589

* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589
2023-06-07 16:41:28 +08:00
msjian
1fe8bec5cf fix(TDQ-21109): fix Dialog on tStandardizeRow support dark mode (#6212) 2023-06-07 16:03:11 +08:00
zyuan-talend
74d5eb4d90 fix(TUP-38922): Clear old storage of git project. (#6210) 2023-06-05 15:25:09 +08:00
jiezhang-tlnd
12a842a565 Add localized files (#6221) (#6225)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-05 14:10:09 +08:00
sponomarova
9419f94c07 feat(TBD-15036): Beta - Universal Spark 3.1 for HDInsight 5.0 (#6203) 2023-06-01 08:26:53 +03:00
Abdulhamid Rashankar
0beef6b531 APPINT-35612:Metadata failed to propagate modifications to routes (#6197)
* APPINT-35612:Metadata failed to propagate modifications to routes

* APPINT-35612:Metadata failed to propagate modifications to routes

* APPINT-35612:Metadata failed to propagate modifications to routes
2023-05-31 09:11:42 +02:00
jiezhang-tlnd
d19f0dbce7 feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X (#6173)
* feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X
https://jira.talendforge.org/browse/TUP-38935

* update mysql driver

* add dbversion for drag and drop

* set default version

* add libray needed
2023-05-29 10:45:59 +08:00
jiezhang-tlnd
6ff18c0449 Add localized files (#6208) (#6209)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-26 16:10:23 +08:00
jiezhang-tlnd
4c93a1bed0 chore(TUP-38346)maven-core:3.8.6 (#6079)
* chore(TUP-38346)maven-core:3.8.6

* for update time stamp
2023-05-24 09:38:22 +08:00
kjwang
2462a7a792 Kjwang/feat tup 31305 improve the code to avoid encrypt (#6135)
* TUP-31305 Improve the code to avoid encrypt the password in job
everytime
https://jira.talendforge.org/browse/TUP-31305
2023-05-22 17:33:54 +08:00
jiezhang-tlnd
e18ffe5f0f Add localized files (#6194) (#6195)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-19 19:06:56 +08:00
sbliu
b22b9decce chore(TUP-38577) upgrade spring-framework-bom to 5.2.9.RELEASE (#6188) 2023-05-18 16:41:36 +08:00
sbliu
9a3307bace chore(TUP-38415) upgrade xercesImpl to 2.12.2 (#6143) 2023-05-17 17:19:20 +08:00
jiezhang-tlnd
dd5400af61 chore(TUP-38624)Request for an API to determine if a joblet refactoring (#6166)
is ongoing
2023-05-15 18:52:38 +08:00
jiezhang-tlnd
505609aa4b Add localized files (#6183) (#6184)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-12 16:08:06 +08:00
msjian
99da8e2286 fix(TDQ-21121): upgrade snowflake connection driver (#6142) 2023-05-11 15:07:09 +08:00
Emmanuel GALLOIS
239ece2966 feat(TDI-49707): bump component-runtime to 1.56.1 (#6128)
Co-authored-by: jzhao-talend <jzhao@talend.com>
2023-05-10 15:37:43 +02:00
apoltavtsev
ce4740ce83 fix(APPINT-35554) Missing build type for child job is added 2023-05-09 15:49:19 +02:00
Dmytro Sylaiev
7c795f724c fix(TDI-49659): Add new version of lib to module (#6150) 2023-05-09 12:59:44 +03:00
wang wei
67784188df fix(TDI-49546): CVE-2022-45688, org.json:json:(<=20220924) (#6063) 2023-05-09 16:52:26 +08:00
kjwang
248a7d74dc kjwang/Fix TUP-38901 Studio can invoke SSO client if no jre on mac os (#6163)
Fix TUP-38901 Studio can invoke SSO client if no jre on mac os
https://jira.talendforge.org/browse/TUP-38901
2023-05-09 10:39:18 +08:00
sbliu
c09c406c32 fix(TUP-38551) improvement, avoid potential NPE (#6156) 2023-05-08 16:22:50 +08:00
sponomarova
bd5b8b0f51 fix(TBD-15065): add missing property in EHadoopProperties (#6169) 2023-05-08 10:57:08 +08:00
sbliu
eb7c195d3e fix(TUP-38462) add junit to check if invaid report generated (#6133)
* fix(TUP-38462) add junit to check if invaid report generated

* update test data

* update test data, remove sap connection and system objects
2023-05-08 09:32:11 +08:00
sponomarova
33162c8be4 feat(TBD-15065): Synapse with universal : GA (#6149) 2023-05-05 15:45:59 +03:00
hcyi
7169a3101a fix(TUP-38348):[8.0.1] Retrieve scheme for DB2 database in Talend does (#6068)
not retrieve PK.
2023-05-05 15:56:30 +08:00
Abdulhamid Rashankar
192e47b6a3 APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage (#6161) 2023-05-03 11:17:06 +02:00
sbliu
28eda4c880 Add localized files (#6151) (#6153)
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-28 15:00:06 +08:00
zyuan-talend
309c2ac056 fix(TUP-38557): fix XXE issues. (#6125) 2023-04-28 10:59:05 +08:00
sbliu
64c530b6b4 chore(TUP-38551) json-smart:2.4.7 ( CVE-2023-1370) (#6094)
* chore(TUP-38551) json-smart:2.4.7 ( CVE-2023-1370)

* update json-smart version 2.4.10 to 2.4.9

* update maven url index for upgrade json-smart
2023-04-26 10:28:33 +08:00
sbliu
71f93b5165 Add localized files (#6146) (#6148)
Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-26 10:06:35 +08:00
hcyi
41b50e16c1 fix(TUP-38181):Remove old arvo libraries. (#6104) 2023-04-25 16:11:47 +08:00
jiezhang-tlnd
b7711e1dd5 chore(TUP-38578CVE-2020-13956 (#6111)
org.apache.httpcomponents:httpclient:4.2.6)
2023-04-25 15:43:02 +08:00
jiezhang-tlnd
8ed759c0d8 chore(TUP-38552)Remove source code of libs (#6134) 2023-04-25 14:12:02 +08:00
zyuan-talend
3ff40da876 fix(TUP-38735): velocity:1.5 | CVE-2020-13936 on TOS. (#6138) 2023-04-24 15:24:04 +08:00
sbliu
da6a983f29 Add localized files (#6136) (#6137)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-20 17:48:06 +08:00
kjwang
2913c80aef Fix TUP-38743 Dark Mode: Job editor color is still using light theme in (#6130) (#6131)
Fix TUP-38743 Dark Mode: Job editor color is still using light theme in Remote Project
https://jira.talendforge.org/browse/TUP-38743
2023-04-18 16:56:14 +08:00
kjwang
fa2abaf8f3 Kjwang/fix tup 38656 improve job designer in dark mode (#6121) (#6126)
* TUP-38645 On dark mode, Job designer & subjob color can't restore to
correct default color
https://jira.talendforge.org/browse/TUP-38645
2023-04-17 18:14:54 +08:00
sbliu
81e63ecab0 chore(TUP-38572) upgrade xstream to 1.4.20 (#6101) 2023-04-14 10:21:05 +08:00
Emmanuel GALLOIS
3b647c2316 feat(TDI-49562): bump component-runtime to 1.55 (#6054) 2023-04-13 12:00:27 +02:00
kjwang
4ff0184a49 TUP-38591 Text in unselected row isn't clear in FileJson wizard>"Fields (#6116)
TUP-38591 Text in unselected row isn't clear in FileJson wizard>"Fields to extract"
https://jira.talendforge.org/browse/TUP-38591
2023-04-13 14:35:24 +08:00
sbliu
0e37b9632e fix(TUP-38637) fix context update problem from TUP-38212 (#6114) 2023-04-13 10:58:40 +08:00
bhe-talendbj
f2a4328037 fix(TUP-38617): add new api (#6103) 2023-04-13 09:52:12 +08:00
Jane Ding
771a1bf810 fix(TUP-37227):Issue building when items names too long (#6067) (#6087)
https://jira.talendforge.org/browse/TUP-37227
2023-04-12 16:38:38 +08:00
kjwang
3f7d1a83d9 TUP-37441 Improve mapper display in dark mode (#5906)
* TUP-37441 Improve mapper display in dark mode
2023-04-12 10:35:08 +08:00
Jane Ding
c20078c3d1 feat(TUP-38424):Add dark mode info to the pendo of Login Project (#6088)
https://jira.talendforge.org/browse/TUP-38424
2023-04-11 17:09:46 +08:00
Zhiwei Xue
d13ae7e637 fix(TUP-38316):[801 CI/CD] Duplicate Parameter error in the artifact and (#6058)
creating the task
2023-04-11 09:23:44 +08:00
bhe-talendbj
6b094dd4fd feat(TUP-38297): Improve Update settings for user/password (#6075)
* feat(TUP-38297): delete basic auth credential

* feat(TUP-38297): throw error
2023-04-10 16:54:41 +08:00
sponomarova
1ebdb18d27 feat(TBD-12991): Azure Synapse with Universal (#6070) 2023-04-10 11:40:44 +03:00
sbliu
98930c8c96 Add localized files (#6093) (#6098)
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-07 10:47:55 +08:00
sbliu
a7ab220672 fix(TUP-38212) using updated context (#6089) 2023-04-06 15:59:34 +08:00
sbliu
553b2770c9 fix(TUP-37855) add log to network check exception (#5987)
* fix(TUP-37855) add log to network check exception

* fix(TUP-37855) add check ulr to networkutil error log
2023-04-03 11:28:28 +08:00
jiezhang-tlnd
dd851d3202 Add localized files (#6082) (#6084)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-30 17:20:09 +08:00
vyu-talend
f47f991977 chore(TDI-49458):bump file enhanced. (#6076) 2023-03-30 16:31:59 +08:00
Zhiwei Xue
a2e44cb5c2 fix(TUP-37990):remove custom bundle org.bouncycastle.bcprov (#6049) 2023-03-29 17:08:03 +08:00
hcyi
e36f0690f0 fix(TUP-38199):Remove updates section from Studio preferences. (#6052) 2023-03-29 11:49:58 +08:00
Jill Yan
9c4a9c1589 8.0/APPINT-35452 correct snapshot post fix (#6060)
* APPINT-35452 correct snapshot post fix

* APPINT-35452 correct snapshot post fix

* APPINT-35452 correct snapshot post fix
2023-03-28 09:34:25 +08:00
sbliu
da4ba3f1a0 Add localized files (#6066) (#6071)
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-27 15:20:18 +08:00
bhe-talendbj
087dac391d chore(TUP-38259): refactor proxyrepositoryfactory (#6057) 2023-03-27 09:22:03 +08:00
dicarcab
ab843f7a55 fix(TBD-14951):OracleDB Migration task affecting DI Jobs (#6041) 2023-03-23 09:16:02 +01:00
jiezhang-tlnd
5949ce647d chore(TUP-38180)CVE-2022-45787,org.apache.james:apache-mime4j:0.6 (#6050) 2023-03-21 17:05:55 +08:00
hcyi
f9e7be104e fix(TUP-38139):context tab doesn't get updated after press 'undo'. (#6017) 2023-03-21 09:48:48 +08:00
sbliu
774e6dea26 Add localized files (#6051) (#6056)
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-17 11:03:54 +08:00
Oleksandr Zhelezniak
3eccad0352 fix(TDI-31777): bump talendcsv (#5926) 2023-03-10 12:46:52 +02:00
kjwang
ada4bcf7e3 Fix TUP-38298 Can't edit the two default contexts in testcase (#6046)
* Fix TUP-38298 Can't edit the two default contexts in testcase
https://jira.talendforge.org/browse/TUP-38298
2023-03-10 17:39:34 +08:00
jiezhang-tlnd
7c72d190de Add localized files (#6040) (#6045)
Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-10 09:29:09 +08:00
jiezhang-tlnd
025cec4828 Add localized files (#6039)
* Add localized files

* Add localized files (#6038)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2023-03-09 18:20:50 +08:00
bhe-talendbj
91df21afcd feat(TUP-38202): Preference for repositories where the username and password can be set in the settings (Window > preferences > Talend > Update settings) of the Talend studio (#6032)
* feat(TUP-38202): Add p2 credential api

* feat(TUP-38202): add basic auth api

* feat(TUP-38202): add basic auth api

* feat(TUP-38202): add check for forbidden status code
2023-03-08 15:20:11 +08:00
Jane Ding
a3af2de13a feat(TUP-37093):Send Mapper data to PTP (#5982)
* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093

* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093

* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093
2023-03-08 11:11:00 +08:00
kjwang
5c6fd374f1 Kjwang/tup 35058 issues on tmc after publishing (#5954)
TUP-35058 Issues on TMC after publishing artifact with Int type parameter but string values
https://jira.talendforge.org/browse/TUP-35058
2023-03-07 16:45:17 +08:00
AlixMetivier-zz
c11aa42cee feat(TBD-13123): K8S with Livy (#5090)
* feat(TBD-13123): K8S with Livy

* fix for wizard

---------

Co-authored-by: unknown <ametivier@talend.com>
2023-03-03 11:03:33 +01:00
Jill Yan
5506094ec3 tcommon-studio-se/m80/APPINT-35365 (#6006)
* APPINT-35365 fix output flow empty

* APPINT-35365 fix output flow empty

* APPINT-35365 fix empty outflow name

* APPINT-35365 fix empty outflow name
2023-03-03 10:24:36 +08:00
sbliu
a0a7b7cc52 chore(TUP-37430) cleanup orgtalendlibraries (#5985)
* chore(TUP-37430) cleanup default group id org.talend.libraries

* remove extension of library needed

* recovery last removed 'librariesNeeded' extension for unit test

* revert , keep not changed

* revert for org.talend.libraries
2023-03-02 20:29:19 +08:00
sbliu
0a7eb0653f Add localized files (#6027) (#6028)
Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-02 20:03:44 +08:00
sbliu
baabcf9167 Add localized files (#6024) (#6026)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-02 17:46:06 +08:00
Jane Ding
d24160aaf7 Revert "fix(TUP-37227):Issue building when items names too long (#5905)" (#6023)
This reverts commit 6e88e334a3.
2023-03-02 15:59:50 +08:00
Emmanuel GALLOIS
ff42b63947 feat(TDI-49432): bump component-runtime to 1.54 (#5994) 2023-03-01 16:48:33 +01:00
kjwang
bc536f772e TUP-38032 [Studio 8.0]"Overwrite existing item" option is not display (#5983)
TUP-38032 [Studio 8.0]"Overwrite existing item" option is not display even increase the window height to maximum
https://jira.talendforge.org/browse/TUP-38032
2023-03-01 09:32:50 +08:00
Jane Ding
6e88e334a3 fix(TUP-37227):Issue building when items names too long (#5905)
* fix(TUP-37227):Issue building when items names too long (#5828)

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

Conflicts:
	main/plugins/org.talend.designer.maven.ui/src/main/java/messages.properties
2023-02-27 19:04:04 +08:00
Jane Ding
5b86f87d99 Add localized files (#6010) (#6011)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-24 16:46:50 +08:00
Jane Ding
11ff6ac63d fix(TUP-37569):Update Support>Documentation link with CLM link (#5979)
* fix(TUP-37569):Update Support>Documentation link with CLM link
https://jira.talendforge.org/browse/TUP-37569

* fix(TUP-37569):Update Support>Documentation link with CLM link
https://jira.talendforge.org/browse/TUP-37569
2023-02-24 16:22:00 +08:00
Jane Ding
a4679a906a fix(TUP-37568):Edits to the Help Contents menu (#5981)
* fix(TUP-37568):Edits to the Help Contents menu
https://jira.talendforge.org/browse/TUP-37568

* fix(TUP-37568):Edits to the Help Contents menu
https://jira.talendforge.org/browse/TUP-37568
2023-02-24 16:21:45 +08:00
Oleksandr Zhelezniak
a4a0bc0649 fix(TDI-49284): talend file enhanced (#5989) 2023-02-23 13:49:05 +02:00
jiezhang-tlnd
0709202ae3 fix(TUP-37874)SQL inject risk (#6007) 2023-02-23 15:13:12 +08:00
ypiel
899c5a03f6 Revert "chore(TDI-49432): bump component-runtime:1.54.0 (#6001)" (#6003)
This reverts commit 5e1bca282f.
2023-02-22 14:20:32 +01:00
ypiel
5e1bca282f chore(TDI-49432): bump component-runtime:1.54.0 (#6001) 2023-02-22 14:04:54 +01:00
jiezhang-tlnd
61a8ed2b73 fix(TUP-37874)SQL inject risk (#5955)
* fix(TUP-37874)SQL inject risk

* add back

* add back

* SQL inject risk
2023-02-22 18:17:19 +08:00
kjwang
ab88eda019 TUP-37176 SSO logs out way too often on the Studio (#5800)
* TUP-37176 SSO logs out way too often on the Studio
https://jira.talendforge.org/browse/TUP-37176
2023-02-22 17:35:43 +08:00
zyuan-talend
c4942af4b0 fix(TUP-35060): tWarn does not show the TalendDate.TO_CHAR method. (#5962) 2023-02-21 11:57:43 +08:00
Jane Ding
80ccccb407 Add localized files (#5995)
* Add localized files (#5986)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

* Add localized files (#5991)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2023-02-21 11:22:27 +08:00
hcyi
4063e6888b fix(TUP-37696):Issue on redshift SSO metadata after update aws-java-sdk. (#5925)
* fix(TUP-37696):Issue on redshift SSO metadata after update aws-java-sdk.

* fix(TUP-37696):Issue on redshift SSO metadata after update aws-java-sdk.
2023-02-21 09:57:27 +08:00
Colm O hEigeartaigh
54d1a85c1f TDI-49282 - maxDate in TalendDate is not validated (#5944) 2023-02-13 14:21:53 +08:00
Jane Ding
a2c23dd110 Add localized files (#5978)
* Add localized files (#5976)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

* Add localized files (#5977)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2023-02-10 09:44:10 +08:00
Zhiwei Xue
9e56acd4e5 feat(TUP-37353):Guess Schema for tBigQueryInput (#5953) 2023-02-09 17:00:24 +08:00
Zhiwei Xue
a9f5e42f6d fix(TUP-37971):Studio 8 failed to update using "NIGHTLY" Update URL if (#5973)
Studio was used before
2023-02-09 11:30:22 +08:00
zyuan-talend
e4250d1120 fix(TUP-37700):generate microservice dependencies into componentIndex (#5923)
file.
2023-02-07 15:14:37 +08:00
sbliu
7225c51654 fix(TUP-37692) XPath json use context can't get any data when running job (#5909)
* fix(TUP-37692) some change not finished

* to show tree node according to if add root or add root/object
2023-02-07 09:32:21 +08:00
bhe-talendbj
11bf826613 feat(TUP-37595): reintroduce ingres/vectorwise in metedata (#5902)
* feat(TUP-37595): add back ingres and vectorwise db

* feat(TUP-37595): add back ingres and vectorwise db

* feat(TUP-37595): enable ingres and vectorwise
2023-02-06 17:24:29 +08:00
bhe-talendbj
2039df6058 fix(TUP-37920): fix sqllite retrieve tables (#5959) 2023-02-06 17:22:22 +08:00
hcyi
59147d2bf3 fix(TUP-36823):Generated SQL Query for Teradata misses reserved word (#5915)
"TIME"
2023-02-06 15:29:54 +08:00
bhe-talendbj
a272ce7fe3 feat(TUP-37841): Generating jsonform for all of components automatically (#5947)
* feat(TUP-37841): add jsonform generator

* feat(TUP-37841): add jsonform generator

* feat(TUP-37841): correct class path

* feat(TUP-37841): correct class path

* feat(TUP-37841): refactor

* feat(TUP-37841): refactor
2023-02-06 10:00:19 +08:00
jiezhang-tlnd
d32d4c1c2c fix(TUP-37349)Data viewer for tCouchBaseInput get npe error (#5848)
* fix(TUP-37349)Data viewer for tCouchBaseInput get npe error
https://jira.talendforge.org/browse/TUP-37349

* Data viewer for tCouchBaseInput get npe error
2023-02-06 09:39:51 +08:00
Emmanuel GALLOIS
51ca13e2ee fix(TCOMP-2368): align log4j version (#5966) 2023-02-03 14:31:10 +01:00
Zhiwei Xue
3d697f472c fix(TUP-35407):project rootPom template not considered anymore. (#5917)
* fix(TUP-35407):project rootPom template not considered anymore.

* fix(TUP-35407):improve UI
2023-02-03 17:41:07 +08:00
kjwang
0dcd60f44b TUP-37344 If access token & refresh token change to invalid, can't show (#5835)
TUP-37344 If access token & refresh token change to invalid, can't show log in dialog when user selected auto login
https://jira.talendforge.org/browse/TUP-37344
2023-02-03 11:02:47 +08:00
Jane Ding
8f59c857d8 fix(TUP-37358):Adding org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j (#5868)
* fix(TUP-37358):Adding
org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j
https://jira.talendforge.org/browse/TUP-37358

* fix(TUP-37358):Adding
org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j
https://jira.talendforge.org/browse/TUP-37358
2023-02-02 17:26:06 +08:00
Jane Ding
442631c61b fix(TUP-37253):Excel Metadata fails to set column names and results in (#5816)
IndexOutOfBounds for æ character
https://jira.talendforge.org/browse/TUP-37253
2023-02-02 17:25:45 +08:00
Emmanuel GALLOIS
31303fa608 feat(TDI-49275): bump component-runtime to 1.53.0 (#5943) 2023-02-01 11:21:34 +01:00
bhe-talendbj
fea26cbefa fix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5950)
* fix(TUP-37425): fix retrieve schema

* fix(TUP-37425): check NPE
2023-01-30 19:38:16 +08:00
Jane Ding
21254ffaca Add localized files (#5945) (#5946)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-01-28 11:48:39 +08:00
bhe-talendbj
caa4b51cc4 chore(TUP-37660): upgrade sqlite-jdbc (#5899) 2023-01-18 14:37:10 +08:00
bhe-talendbj
b2fdccc3e7 chore: fix junit exe resolve (#5936)
* chore: fix exe resolve

* chore: revert unnecessay changes

* chore: remove exe dependency test
2023-01-17 17:55:34 +08:00
jiezhang-tlnd
da208c72f6 force update time stamp (#5934) 2023-01-17 16:11:39 +08:00
bhe-talendbj
bd6a271805 bugfix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5864)
* fix(TUP-37425): retrieve table comment once

* fix(TUP-37425): add busy indicator

* fix(TUP-37425): fix UI responsiveness
2023-01-16 19:26:43 +08:00
Zhiwei Xue
cd5af34395 fix(TUP-37751):Data view/Guess schema fail if set java interpreter to (#5924)
jdk 8
2023-01-11 21:15:09 +08:00
bhe-talendbj
ba71689fac feat(TUP-37030): Research: Enable signing GIT commits from GPG (#5767)
* feat(TUP-37030): enable git preference page

* feat(TUP-37030): enable egit preference page for standard mode
2023-01-11 10:29:30 +08:00
hzhao
f6a123ad2b feat(TUP-37472): Oracle version cleanup (#5895)
* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup
2023-01-11 10:10:58 +08:00
sbliu
14d9caec2e feat(TUP-36197) Remove git branch name in project setting (#5898)
* feat(TUP-36197) retrieve branch name for build/publish job

* set branch value from null to empty
2023-01-10 15:26:20 +08:00
hzhao
96f177cb95 chore(TUP-35265): upgrade 'crypto-utils' jar in low level (#5647)
* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level
2023-01-10 14:42:34 +08:00
kjwang
4a34141e6f TUP-30674 Support rename on custom jar and inner code. (#5831)
TUP-30674 Support rename on custom jar and inner code.
https://jira.talendforge.org/browse/TUP-30674
2023-01-10 11:51:31 +08:00
Wei Hua
9bf06c26bb APPINT-35260 CVE-2022-36033, jsoup:1.14.2 (#5892) 2023-01-09 18:15:17 +08:00
Jane Ding
51010064c7 fix(TUP-37012):Help Pane: Online Tools menu: (#5858)
* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012

* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012

* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012
2023-01-09 10:36:43 +08:00
Zhiwei Xue
d0a5c76459 feat(TUP-36692):Modify Studio launcher ini for more --add-opens when apply monthly update (#5824)
* feat(TUP-36692):Modify Studio launcher ini for more --add-opens when
apply monthly update

* Revert "feat(TUP-36692):Modify Studio launcher ini for more --add-opens when apply monthly update"

This reverts commit 7ce834063440af5b87c9a35f1ecfbbdc67413829.

* feat(TUP-36692): include p2.inf for patch only
2023-01-06 16:25:16 +08:00
Emmanuel GALLOIS
4b308e1d34 feat(TCOMP-2235): bump cxf to 3.5.5 2023-01-05 12:02:14 +01:00
Emmanuel GALLOIS
b39332b706 feat(TCOMP-2235): bump component-runtime to 1.52.1 (#5908) 2023-01-05 11:58:17 +01:00
hcyi
556ab359d9 fix(TUP-37587):CVE : upgrade redshift-jdbc42 to 2.1.0.10 or latest (#5886) 2023-01-05 11:25:54 +08:00
jiezhang-tlnd
55f8537c15 chore(TUP-37524)CVE-2022-46364,org.apache.cxf:cxf-core:3.4.4,3.5.2 (#5878) 2023-01-04 16:36:08 +08:00
jiezhang-tlnd
98f0a248dc chore(TUP-37124)CVE-2022-36033,org.jsoup:jsoup:1.14.2 (#5793)
* chore(TUP-37124)CVE-2022-36033,org.jsoup:jsoup:1.14.2

* change verison to 1.15.3
2022-12-30 14:41:42 +08:00
Jane Ding
360c36b6bb fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as (#5876)
* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467
2022-12-28 17:41:01 +08:00
kjwang
c5e48b7e97 feat: TUP-37444 DI Repository view improvements (#5881) (#5897)
* feat: TUP-37444 DI Repository view improvements
https://jira.talendforge.org/browse/TUP-37444
2022-12-27 10:24:43 +08:00
Chao MENG
8b3040a4f6 feat(TUP-37052): dark theme support (#5849)
feat(TUP-37052): dark theme support
https://jira.talendforge.org/browse/TUP-37052
2022-12-26 15:27:53 +08:00
Jane Ding
fac09dcc63 Revert "fix(TUP-37227):Issue building when items names too long (#5828)" (#5889)
This reverts commit 00a777d477.
2022-12-23 11:43:18 +08:00
pyzhou
f97757fa8e fix(TDI-49103):bump up tck 1.52.0 (#5884) 2022-12-22 10:30:14 +08:00
wchen-talend
3a557a7658 feat(TUP-36415): fix tuj (#5879) 2022-12-20 09:58:37 +08:00
Jane Ding
00a777d477 fix(TUP-37227):Issue building when items names too long (#5828)
* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227
2022-12-19 12:02:00 +08:00
jiezhang-tlnd
eb661b81c5 80 loc ja jp 2022 12 15 08 15 (#5875)
* Add localized files (#5873)

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

* Add localized files (#5874)

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-12-16 11:35:38 +08:00
Zhiwei Xue
557afc2b02 feat(TUP-36415): set java 17 options unselected by default (#5871) 2022-12-15 15:11:22 +08:00
zyuan-talend
965a4d5a3b fix(TUP-36936):CVE: CVE-not-disclosed, upgrade org.sonatype.plexus:plexus-cipher:1.4 to org.codehaus.plexus:1.8. (#5859) 2022-12-14 16:31:44 +08:00
Wei Hua
bde2e73cfa - remove duplicate classes ItemReportRecorder/ItemsReportUtil/MigrationReportHelper/MigrationReportRecorder (#5782) 2022-12-12 10:19:25 +01:00
bhe-talendbj
421dde4b8e feat(TUP-37162): Improvement needed for standard Git mode (#5805)
* feat(TUP-37162): add new repository node status api

* feat(TUP-37162): init impl

* feat(TUP-37162): add new api

* feat(TUP-37162): remove unnecessary changes

* feat(TUP-37162): fix logoff

* feat(TUP-37162): compute invalid referenced projects

* feat(TUP-37162): add ref project
2022-12-09 15:50:44 +08:00
jiezhang-tlnd
037502c43c Add localized files (#5862) (#5863)
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-12-09 09:24:38 +08:00
jiezhang-tlnd
12345b5216 Add localized files (#5860) (#5861)
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-12-08 18:21:17 +08:00
Emmanuel GALLOIS
850a8cbdf6 feat(TDI-48896): bump component-runtime to 1.51.2 (#5853) 2022-12-06 08:47:05 +01:00
pyzhou
fe6ed85b34 fix(TDI-48873):reload4j wrong artifactId (#5856) 2022-12-06 11:55:56 +08:00
pyzhou
46a2aac8c1 fix(TDI-48873):sl4j upgrade 1.7.34 (#5833)
* fix(TDI-48873):sl4j upgrade 1.7.34

# Conflicts:
#	main/plugins/org.talend.designer.maven.repo.tck/pom.xml

* slf4j-reload4j

* reload4j
2022-12-06 10:36:33 +08:00
Zhiwei Xue
424266a771 feat(TUP-36415):fix junit failure (#5854) 2022-12-06 10:10:31 +08:00
Zhiwei Xue
d2751b3e59 workitem(TUP-37424):Add a system property to setup global module access (#5851) 2022-12-05 17:35:50 +08:00
Chao MENG
90aeb07148 fix(TUP-37051): Studio perspective continuously reset after install R2022-09 patch (#5803)
* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051
2022-12-05 11:19:09 +08:00
Zhiwei Xue
ef76386e26 feat(TUP-36415):Add needed --add-opens parameters for job execution (#5650)
* feat(TUP-36415):Add needed --add-opens parameters for job execution

* feat(TUP-36415): Fix parse java version error.

* feat(TUP-36415): append components info in module_access.properties

* feat(TUP-36415):enable internal access by default for new project

* Revert "feat(TUP-36415): Fix parse java version error."

This reverts commit 0286bcf31a90127aabe3b541d4dc61ff7c464411.

* feat(TUP-36415): fix tuj (#5739)

* feat(TUP-36415):fix testcase related problem

* feat(TUP-36415):fix tck guess schema

* feat(TUP-37053):Handle Studio not managed --add-opens for JDBC and user
component for Job execution

* feat(TUP-36415):add junit

* feat(TUP-36415):fix tDqReportRun action

* fix(TUP-37335):the setting is not updated timely

* fix(TUP-37342):[bug] Dataview Database schema fail

* fix(TUP-37352):MongoDBOutput is unable work in the Java 17

* fix(TUP-37374):[bug] guess schema for couchbase get error
2022-12-02 15:43:28 +08:00
jiezhang-tlnd
a76d9081dc Add localized files (#5845) (#5850)
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-12-02 15:16:46 +08:00
hzhao
6d10555da1 fix(TUP-37161): Pop up windows can not be closed when log on a migrate (#5838)
* fix(TUP-37161): Pop up windows can not be closed when log on a migrate
big project

* fix(TUP-37161): Pop up windows can not be closed when log on a migrate
2022-12-02 10:53:49 +08:00
Jane Ding
6aec89ed62 Fix MetadataTalendTypeFilterTest.sparkDynamicTypeTest junit fail (#5842) 2022-11-29 17:08:57 +01:00
hcyi
4d5c0aba06 feat(TUP-35746):Change the download of jars (#5840) 2022-11-29 15:41:58 +08:00
sbliu
156a67b79a chore(TUP-36969) upgrade slf4j (#5810)
* chore(TUP-36969) upgrade slf4j

* add dependency to slf4j 1.7.34

* replace slf4j-log4j12 with slf4j-reload4j

* slf4j-log4j12-1.7.34.jar replaced with slf4j-reload4j-1.7.34.jar
2022-11-25 17:41:43 +08:00
Chao MENG
0de0c82b35 fix(TUP-37228): Studio errors when attempting to create a Cloudera Dynamic Distro when repository.apache.org port 80 is blocked (#5822)
* fix(TUP-37228): Studio errors when attempting to create a Cloudera
Dynamic Distro when repository.apache.org port 80 is blocked
https://jira.talendforge.org/browse/TUP-37228

* fix(TUP-37228): Studio errors when attempting to create a Cloudera
Dynamic Distro when repository.apache.org port 80 is blocked
https://jira.talendforge.org/browse/TUP-37228
2022-11-25 14:49:41 +08:00
Zhiwei Xue
83d720a6df fix(TUP-37254):Error in selectively generating all poms when a job is (#5813)
used as child job from multiple jobs
2022-11-23 11:37:29 +08:00
Jane Ding
bba3a2a7ff fix(TUP-36933):[7.3.1] import dependencies is not working when we do a (#5790)
* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933
2022-11-22 11:08:34 +08:00
kjwang
33e9a9bf7c TUP-37007 Disable DTDs feature for DocumentBuilder in class org.eclipse.urischeme.patched.internal.registration.PlistFileWriter (#5763)
* TUP-37007 Disable DTDs feature for DocumentBuilder in class
org.eclipse.urischeme.patched.internal.registration.PlistFileWriter
https://jira.talendforge.org/browse/TUP-37007
2022-11-22 10:10:33 +08:00
Jane Ding
865d4317ea Add localized files (#5825)
* Add localized files (#5811)

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

* Add localized files (#5814)

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: jzhangbj <jzhang@talend.com>
2022-11-22 09:53:15 +08:00
zyuan-talend
8949a8291a fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1. (#5806) (#5807) 2022-11-17 11:45:08 +08:00
Samuel ANTOINE
620a43e169 feat(TBD-14288): add dynamic schema on tAvroInput (#5659)
feat(TBD-14288): add dynamic schema on tavroinput
2022-11-16 09:07:12 +01:00
hcyi
6143714a75 feat(TUP-35746):Change the download of jars (#5789) 2022-11-16 10:41:58 +08:00
pyzhou
613ec4e1ae fix(TDI-48676):ResumeUtil OOM
* fix(TDI-48676):ResumeUtil OOM

* replace duplicate variable
2022-11-15 20:15:49 +08:00
zyuan-talend
c2f33ca3c7 fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1 (#5783) (#5762) 2022-11-15 15:07:20 +08:00
Jane Ding
ee7e8a0a32 Add localized files (#5795)
* Add localized files (#5784)

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

* Add localized files (#5785)

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

* Add localized files (#5786)

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>
Co-authored-by: jzhangbj <jzhang@talend.com>
2022-11-15 09:44:45 +08:00
bhe-talendbj
f28610deb2 feat(TUP-35957): Use standard git storage mode in workspace (#5447)
* feat(TUP-35957): add new api

* feat(TUP-35957): reference project checking for new git mode

* feat(TUP-35957): support multiple git repo for reference projects

* feat(TUP-35957): add new api

* feat(TUP-35957): revert ICoreService changes

* feat(TUP-35957): fix NPE

* feat(TUP-35957): add switch check

* feat(TUP-35957): add new api

* feat(TUP-35957): add api

* feat(TUP-35957): add notifiction service

* feat(TUP-35957): fix popup and jobInfo
2022-11-10 17:53:37 +08:00
pyzhou
77b762d835 fix(TDI-48441):CVE reload4j 1.2.22 (#5776) 2022-11-10 17:31:35 +08:00
Wei Hua
c8ff7f0115 fix(APPINT-35058) [8.0.1] Add optional mechanism to align project models BUILD_TYPE (#5780) 2022-11-09 16:43:18 +01:00
Emmanuel GALLOIS
257085413d feat(TDI-48644): bump component-runtime to 1.50 (#5664) 2022-11-09 13:17:49 +01:00
sbliu
743861d278 chore(TUP-36964) commons-text upgrade to 1.10.0 (#5765)
* chore(TUP-36964) commons-text upgrade to 1.10.0

* update reference part of commons-text
recovery tcksdk/pom.xml (will be upgraded by DI team)

* remove unused lower version jar
2022-11-09 14:38:51 +08:00
sbliu
a464909db1 feat(TUP-32228) Load multiple libraries with routine by detect the selected module (#5672)
* feat(TUP-32228) allow add direct dependencies for select module, for global routine,custom routine jars, global beans, custom bean jars

* share dependencies to custom nexus if needed

* add progress dialog for maven command execution
2022-11-09 09:54:18 +08:00
zyuan-talend
33121074d8 fix(TUP-36566):CVE:upgrade reload4j to 1.2.22. (#5735)
* fix(TUP-36566):CVE:upgrade reload4j to 1.2.22.

* fix(TUP-36566):CVE:upgrade reload4j to 1.2.22.
2022-11-08 15:10:26 +08:00
pyzhou
3e3eca887d fix(TDI-48793):CVE Apache commons text 1.10.0 (#5768) 2022-11-08 12:13:37 +08:00
hcyi
81991f3acf feat(TUP-33031):List invalid items with Project analysis of 8.0 (#5726)
* feat(TUP-33031):List invalid items with Project analysis of 8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
2022-11-07 18:42:23 +08:00
Jane Ding
cc7f8e4183 fix(TUP-36862):Transfer pendo to EE (#5723)
* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862
2022-11-04 15:14:14 +08:00
Wei Hua
718c7055c5 APPINT-35058 [8.0.1] Add optional mechanism to align project models BUILD_TYPE (#5678)
Co-authored-by: apoltavtsev <apoltavtsev@gmail.com>
2022-11-03 17:28:37 +08:00
sbieliaievl
74b613a5e4 fix(APPINT-35116) - fix for nexus versions (#5743) 2022-11-03 10:25:50 +02:00
sbliu
c1e0c419e3 chore(TUP-36930) upgrade jackson-databind to 2.13.4.2,jackson-core/jackson-annotations to 2.13.4 (#5719) 2022-11-01 14:37:05 +08:00
Xilai Dai
4b5b9ad5c5 feat(APPINT-34707) add new getService() into BundleUtils class (#5610) 2022-10-31 17:25:01 +08:00
Zhiwei Xue
0b9dc184ec feat(TUP-36683):Selective generateAllPoms (#5753) 2022-10-31 16:45:23 +08:00
kjwang
65fc3816e2 Fix TUP-32606 Support SSO on Studio fix build error on 80 (#5752)
Fix TUP-32606 Support SSO on Studio fix build error on 80
2022-10-31 12:02:35 +08:00
Jane Ding
0ac2233c7f Add localized files (#5750)
* Add localized files (#5745)

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

* Add localized files (#5725)

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

* Add localized files (#5732)

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

* Add localized files (#5747)

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

* Add localized files (#5746)

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>
Co-authored-by: jzhangbj <jzhang@talend.com>
2022-10-27 16:55:08 +08:00
Zhiwei Xue
a5fce652e2 feat(TUP-36683):Selective generateAllPoms (#5676) 2022-10-26 20:47:35 +08:00
Svitlana Anulich
62c3cd96fc fix(TBD-14328): ClassNotFoundException when check service for CDP 7.x knox (#5715) (#5740) 2022-10-24 17:05:11 +03:00
kjwang
617d7a0971 TUP-36904 Ubuntu ARM64: Cannot "login with TalendCloud" with installed (#5714)
TUP-36904 Ubuntu ARM64: Cannot "login with TalendCloud" with installed studio
https://jira.talendforge.org/browse/TUP-36904
2022-10-21 17:59:49 +08:00
sbliu
8e71165264 fix(TUP-36726) change tooltip message (#5730) 2022-10-21 11:16:54 +08:00
Emmanuel GALLOIS
cee928c438 Revert "feat(TDI-48595): REVERT bump component-runtime dependencies (#5708)" (#5727)
This reverts commit 30139714d4.
2022-10-20 12:41:22 +02:00
Emmanuel GALLOIS
30139714d4 feat(TDI-48595): REVERT bump component-runtime dependencies (#5708) 2022-10-20 10:49:08 +02:00
sbieliaievl
d31a64654e fix(APPINT-34581) - fixed versions 2022-10-18 14:31:48 +02:00
Liu Xinquan
22f590c376 fix(TDQ-20751) tDqReportRun Snowflake Context (#5694) 2022-10-17 17:32:10 +08:00
jiezhang-tlnd
aba7988f3b Add localized files (#5695) (#5697)
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-10-17 09:32:23 +08:00
Laurent BOURGEOIS
7e0ef66029 fix(TBD-14263):Support MongoDB v4+ - Spark Batch 3.1+ - GA (#5686) (#5698) 2022-10-14 15:50:59 +02:00
Samuel ANTOINE
cc953fa42f (fix-bug) junit on dynamic schema component declaration (#5692)
Co-authored-by: samuel_antoine <santoine@talend.com>
2022-10-13 18:03:22 +08:00
1429 changed files with 12252 additions and 306787 deletions

View File

@@ -56,5 +56,12 @@
install-size="0"
version="0.0.0"
unpack="true"/>
<plugin
id="org.talend.signon.util"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@@ -5,7 +5,6 @@
<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.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

@@ -9,4 +9,7 @@
</parent>
<artifactId>org.talend.utils.feature</artifactId>
<packaging>eclipse-feature</packaging>
<properties>
<tycho.buildtimestamp.format>${timestamp}</tycho.buildtimestamp.format>
</properties>
</project>

View File

@@ -4,4 +4,6 @@ bin.includes = META-INF/,\
plugin.xml,\
icons/,\
icons1/,\
.
.,\
resources/

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

View File

@@ -1,5 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.e4.ui.css.swt.theme">
<stylesheet
uri="resources/theme/light_preferencestyle.css">
<themeid
refid="org.talend.themes.css.talend.default"></themeid>
</stylesheet>
<stylesheet
uri="resources/theme/dark_preferencestyle.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
</stylesheet>
</extension>
</plugin>

View File

@@ -0,0 +1,8 @@
/* ############################## Eclipse UI properties ############################## */
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
preferences:
'table.background=#org-eclipse-ui-workbench-DARK_BACKGROUND'
'table.foreground=#org-eclipse-ui-workbench-DARK_FOREGROUND'
}

View File

@@ -0,0 +1,8 @@
/* ############################## Eclipse UI properties ############################## */
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
preferences:
'table.background=COLOR-LIST-BACKGROUND'
'table.foreground=COLOR_LIST_FOREGROUND'
}

View File

@@ -12,14 +12,22 @@
// ============================================================================
package org.talend.commons.ui.runtime;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ColorConstants {
static final String BUNDLE_ID_COMMON_UI_RUNTIME = "org.talend.common.ui.runtime";
static final String KEY_TABLE_BACKGROUND = "table.background";
static final String KEY_TABLE_FOREGROUND = "table.foreground";
static final Color WHITE_COLOR = new Color(null, 255, 255, 255);
static final Color GREY_COLOR = new Color(null, 215, 215, 215);
@@ -29,6 +37,8 @@ public interface ColorConstants {
static final Color YELLOW_COLOR = new Color(null, 255, 173, 37);// 254, 182, 84
static final Color RED_COLOR = new Color(null, new RGB(204, 87, 89));// 255
static final Color ERROR_FONT_COLOR = new Color(null, new RGB(255, 0, 0));// 255
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);
@@ -45,4 +55,19 @@ public interface ColorConstants {
static final Color SUCCEED_COLOR = new Color(null, 221, 242, 217);
static Color getTableBackgroundColor() {
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_BACKGROUND)
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
}
static Color getTableForegroundColor() {
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_FOREGROUND)
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
}
static Color getTableReadOnlyForegroundColor() {
return ITalendThemeService.getColor("CONTEXT_TABLE_READONLY_FOREGROUND")
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
}
}

View File

@@ -23,6 +23,8 @@ import org.talend.commons.ui.runtime.exception.ExceptionServiceImpl;
public class CommonUIPlugin implements BundleActivator {
public static String BUNDLE_ID = "org.talend.common.ui.runtime";
private static Boolean fullyHeadless = null;
/*

View File

@@ -0,0 +1,154 @@
// ============================================================================
//
// 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.commons.ui.runtime;
import java.util.Optional;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.graphics.Color;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
import org.talend.commons.exception.ExceptionHandler;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ITalendThemeService {
public static String DEFAULT_PREFERENCE_ID = "org.eclipse.ui.workbench";
public static String THEME_PREFERENCE_ID = "org.eclipse.e4.ui.css.swt.theme";
/**
* Get color from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
* uses
*
* @param prop
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
*/
static Optional<Color> getColor(String prop) {
return getColor(DEFAULT_PREFERENCE_ID, prop);
}
/**
* Get color from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
*
* @param bundleId the instance scope preference which stores the prop
* @param prop
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
*/
static Optional<Color> getColor(String bundleId, String prop) {
ITalendThemeService theme = get();
if (theme != null) {
return Optional.ofNullable(theme.getColorForTheme(bundleId, prop));
}
return Optional.ofNullable(null);
}
Color getColorForTheme(String bundleId, String prop);
/**
* Get property from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
* uses
*
* @param key
* @return
*/
static Optional<String> getProperty(String key) {
return getProperty(DEFAULT_PREFERENCE_ID, key);
}
/**
* Get property from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
*
* @param bundleId the instance scope preference which stores the key
* @param key
* @return
*/
static Optional<String> getProperty(String bundleId, String key) {
ITalendThemeService theme = get();
String value = null;
if (theme != null) {
value = theme.getPropertyForTheme(bundleId, key);
}
if (StringUtils.isBlank(value)) {
return Optional.ofNullable(null);
} else {
return Optional.ofNullable(value);
}
}
String getPropertyForTheme(String bundleId, String key);
static void addPropertyChangeListener(IPropertyChangeListener listener) {
ITalendThemeService theme = get();
if (theme != null) {
theme.addPropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
}
}
static void addPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
ITalendThemeService theme = get();
if (theme != null) {
theme.addPropertyChangeListenerFor(bundleId, listener);
}
}
void addPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
static boolean containsPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
ITalendThemeService theme = get();
if (theme != null) {
return theme.containsPropertyChangeListenerFor(bundleId, listener);
}
return false;
}
boolean containsPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
static void removePropertyChangeListener(IPropertyChangeListener listener) {
ITalendThemeService theme = get();
if (theme != null) {
theme.removePropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
}
}
static void removePropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
ITalendThemeService theme = get();
if (theme != null) {
theme.removePropertyChangeListenerFor(bundleId, listener);
}
}
void removePropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
IPreferenceStore getThemePreferenceStore();
static ITalendThemeService get() {
try {
BundleContext bc = FrameworkUtil.getBundle(ITalendThemeService.class).getBundleContext();
ServiceReference<ITalendThemeService> serviceReference = bc.getServiceReference(ITalendThemeService.class);
if (serviceReference == null) {
return null;
}
return bc.getService(serviceReference);
} catch (Exception e) {
ExceptionHandler.process(e);
}
return null;
}
}

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=la table est null.
TableViewerCreator.TableColumn.AssertMsg=La TableColumn de TableEditorColumn avec idProperty '{0}' n'a pas la bonne Table parente
TreeToTablesLinker.Type.Unsupported=Ce type de currentControl n'est pas support\u00E9
commons.error=Erreur
exception.message={0}\nConsultez le log pour plus de d\u00E9tails.
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
ModelSelectionDialog.Option=Option

View File

@@ -96,7 +96,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
Rule.rule=\u30EB\u30FC\u30EB[{0}]
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
SWTCalendarWithTime.contentEvening=\u5915\u65B9
SWTCalendarWithTime.contentHr=\u6642:
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u3067\u3059
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306B\u306F\u3001\u6B63\u3057\u3044\u89AA\u30C6\u30FC\u30D6\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
TreeToTablesLinker.Type.Unsupported=currentControl\u306E\u3053\u306E\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
commons.error=\u30A8\u30E9\u30FC
exception.message={0}\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
commons.error=\u9519\u8BEF
exception.message={0}\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
ModelSelectionDialog.Option=\u9009\u9879

View File

@@ -40,8 +40,8 @@ public enum EImage implements IImage {
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$
CREATE_CONNECTION_ICON("/icons/connection.gif"), //$NON-NLS-1$

View File

@@ -57,6 +57,8 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.talend.commons.ui.runtime.ColorConstants;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.swt.proposal.IShowInvisibleCellEditorMethods;
import org.talend.commons.ui.runtime.swt.tableviewer.behavior.DefaultHeaderColumnSelectionListener;
@@ -291,7 +293,8 @@ public class TableViewerCreatorNotModifiable<B> {
public TableViewerCreatorNotModifiable(Composite compositeParent) {
super();
this.compositeParent = compositeParent;
this.emptyZoneColor = compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE);
this.emptyZoneColor = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
.orElse(compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
}
@@ -669,8 +672,22 @@ public class TableViewerCreatorNotModifiable<B> {
table.addListener(SWTFacade.Paint, paintListener);
}
setBackgroundColor(backgroundColor != null ? backgroundColor : table.getDisplay().getSystemColor(SWT.COLOR_WHITE));
setForegroundColor(foregroundColor != null ? foregroundColor : table.getDisplay().getSystemColor(SWT.COLOR_BLACK));
Color prefBackgroundColor = backgroundColor;
if (prefBackgroundColor == null) {
prefBackgroundColor = ColorConstants.getTableBackgroundColor();
if (prefBackgroundColor == null) {
prefBackgroundColor = table.getDisplay().getSystemColor(SWT.COLOR_WHITE);
}
}
Color prefForegroundColor = foregroundColor;
if (prefForegroundColor == null) {
prefForegroundColor = ColorConstants.getTableForegroundColor();
if (prefForegroundColor == null) {
prefForegroundColor = table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
}
}
setBackgroundColor(prefBackgroundColor);
setForegroundColor(prefForegroundColor);
if (useCustomItemColoring) {
setUseCustomItemColoring(true);

View File

@@ -12,9 +12,14 @@
// ============================================================================
package org.talend.commons.ui.runtime.utils;
import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.DataFormatException;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.StringConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
/**
@@ -102,4 +107,16 @@ public class TalendColorPalette {
public static final java.awt.Color TERTIARY_ORANGE_AWT = new java.awt.Color(244, 175, 128);
public static final java.awt.Color TERTIARY_YELLOW_AWT = new java.awt.Color(255, 217, 143);
public static Color convertToColor(String rgbStr) throws DataFormatException {
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
Color color = colorRegistry.get(rgbStr);
if (color != null) {
return color;
}
RGB rgb = StringConverter.asRGB(rgbStr);
colorRegistry.put(rgbStr, rgb);
return colorRegistry.get(rgbStr);
}
}

View File

@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import org.apache.tools.zip.ZipEntry;
@@ -169,8 +170,52 @@ public class ZipFileUtils {
inputStream.close();
}
}
public static void unZipFileEntry(File destFile, java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry) throws IOException {
InputStream inputStream;
FileOutputStream fileOut;
if (entry.isDirectory()) {
destFile.mkdirs();
} else {
File parent = destFile.getParentFile();
if (parent != null && !parent.exists()) {
parent.mkdirs();
}
inputStream = zipFile.getInputStream(entry);
fileOut = new FileOutputStream(destFile);
byte[] buf = new byte[bufSize];
int readedBytes;
while ((readedBytes = inputStream.read(buf)) > 0) {
fileOut.write(buf, 0, readedBytes);
}
fileOut.close();
inputStream.close();
}
}
public void setBufSize(int bufSize) {
ZipFileUtils.bufSize = bufSize;
}
public static boolean isValidJarFile(String moduleFilePath) {
if (moduleFilePath == null) {
return false;
}
if (!new File(moduleFilePath).exists()) {
return false;
}
try (JarFile zip = new JarFile(moduleFilePath)) {
zip.getManifest();
} catch (IOException e) {
return false;
}
return true;
}
}

View File

@@ -283,6 +283,7 @@
<KEYWORD1>smallint</KEYWORD1>
<KEYWORD1>smallmoney</KEYWORD1>
<KEYWORD1>text</KEYWORD1>
<KEYWORD1>TIME</KEYWORD1>
<KEYWORD1>timestamp</KEYWORD1>
<KEYWORD1>tinyint</KEYWORD1>
<KEYWORD1>uniqueidentifier</KEYWORD1>

View File

@@ -92,12 +92,12 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.19</version>
<version>1.2.22</version>
</dependency>
</dependencies>

View File

@@ -36,6 +36,11 @@ public final class CommonExceptionHandler {
Priority priority = getPriority(ex);
process(ex, priority);
}
public static void process(Throwable ex, String msg) {
Priority priority = getPriority(ex);
process(ex, msg, priority);
}
public static void process(Throwable ex, Priority priority) {
String message = ex.getMessage();
@@ -43,6 +48,13 @@ public final class CommonExceptionHandler {
log.log(priority, message, ex);
}
public static void process(Throwable ex, String msg, Priority priority) {
String message = ex.getMessage() + ": " + msg;
log.log(priority, message, ex);
}
public static void log(String message) {
log.log(Level.INFO, message);

View File

@@ -0,0 +1,85 @@
// ============================================================================
//
// Copyright (C) 2006-2023 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.commons.runtime.model.emf;
import java.util.Iterator;
import java.util.Map;
import java.util.StringJoiner;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.XMLSave;
import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLString;
/**
* DOC jding class global comment. Detailled comment
*/
public class CustomXMIResource extends TalendXMIResource {
public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
CustomXMISave xmiSave;
public CustomXMIResource() {
super();
}
public CustomXMIResource(URI uri) {
super(uri);
}
@Override
protected void init() {
super.init();
encoding = ENCODING;
}
@Override
protected XMLSave createXMLSave() {
xmiSave = new CustomXMISave(createXMLHelper());
return xmiSave;
}
public String getResourceContent(Map<?, ?> options) {
if (xmiSave == null) {
createXMLSave();
}
return xmiSave.getXMLContent(this, options);
}
}
class CustomXMISave extends XMISaveImpl {
public CustomXMISave(XMLHelper helper) {
super(helper);
}
public String getXMLContent(XMLResource resource, Map<?, ?> options) {
StringJoiner strJoin = new StringJoiner("");
super.init(resource, options);
super.traverse(resource.getContents());
XMLString xmlString = this.doc;
Iterator<String> iterator = xmlString.stringIterator();
while (iterator.hasNext()) {
String string = (String) iterator.next();
if (string != null) {
strJoin.add(string);
}
}
return strJoin.toString();
}
}

View File

@@ -16,6 +16,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -263,4 +264,12 @@ public class EmfHelper {
return result;
}
public static String getEmfModelContent(EObject model) throws Exception {
String content = "";
CustomXMIResource xmiResource = new CustomXMIResource();
xmiResource.getContents().add(model);
content = xmiResource.getResourceContent(Collections.EMPTY_MAP);
return content;
}
}

View File

@@ -145,7 +145,30 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
*/
@Override
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
return new DB2ForZosResultSet();
ResultSet rs = super.getPrimaryKeys(catalog, schema, table);
if (rs == null) {
rs = new DB2ForZosResultSet();
}
return rs;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
* java.lang.String)
*/
@Override
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
ResultSet rs = super.getExportedKeys(catalog, schema, table);
if (rs == null) {
if (this.metaData != null) {
rs = this.metaData.getExportedKeys(catalog, schema, table);
} else {
rs = new DB2ForZosResultSet();
}
}
return rs;
}
/*
@@ -174,17 +197,6 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
return tableResultSet;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
* java.lang.String)
*/
@Override
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
return new DB2ForZosResultSet();
}
/*
* (non-Javadoc)
*

View File

@@ -33,6 +33,7 @@ import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.runtime.utils.io.FileCopyUtils;
@@ -108,6 +109,7 @@ public class NetworkUtil {
return true;
}
} catch (Exception e) {
CommonExceptionHandler.process(e, getCheckUrl());
return false;
} finally {
conn.disconnect();
@@ -120,7 +122,7 @@ public class NetworkUtil {
if (StringUtils.isNotBlank(customUrl)) {
return customUrl;
} else {
return "https://talend-update.talend.com/nexus/content/repositories/libraries/";
return "https://talend-update.talend.com/nexus/content/groups/studio-libraries/";
}
}
@@ -144,6 +146,7 @@ public class NetworkUtil {
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
conn.getResponseMessage();
} catch (Exception e) {
CommonExceptionHandler.process(e, urlString);
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
// invalid server
return false;

View File

@@ -92,7 +92,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
Rule.rule=\u30EB\u30FC\u30EB[{0}]
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
SWTCalendarWithTime.contentEvening=\u5915\u65B9
SWTCalendarWithTime.contentHr=\u6642:

View File

@@ -18,12 +18,12 @@ import java.util.Iterator;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.StringConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
/**
@@ -33,7 +33,7 @@ import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
*
*/
public class ColorManager {
public static final RGB DEFAULT_STRING_COLOR = new RGB(0, 0, 0);
public static final RGB DEFAULT_KEYWORD1_COLOR = new RGB(50, 32, 160);
@@ -106,15 +106,19 @@ public class ColorManager {
}
public Color getColor(String colorName) {
RGB prefColor = PreferenceConverter.getColor(store, colorName);
Color color = null;
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).getRGB().equals(prefColor)) {
color = (Color) colorMap.get(colorName);
Color prefColor = getThemeColor(colorName);
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).equals(prefColor)) {
return colorMap.get(colorName);
} else {
color = new Color(Display.getDefault(), prefColor);
colorMap.put(colorName, color);
colorMap.put(colorName, prefColor);
}
return color;
return prefColor;
}
private static Color getThemeColor(String colorName) {
Color c = ITalendThemeService.getColor(colorName)
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
return c;
}
public void dispose() {
@@ -164,20 +168,20 @@ public class ColorManager {
}
public static void initDefaultColors(IPreferenceStore store) {
store.setDefault(NULL_COLOR, StringConverter.asString(DEFAULT_STRING_COLOR));
store.setDefault(COMMENT1_COLOR, StringConverter.asString(DEFAULT_COMMENT1_COLOR));
store.setDefault(COMMENT2_COLOR, StringConverter.asString(DEFAULT_COMMENT2_COLOR));
store.setDefault(LITERAL1_COLOR, StringConverter.asString(DEFAULT_LITERAL1_COLOR));
store.setDefault(LITERAL2_COLOR, StringConverter.asString(DEFAULT_LITERAL2_COLOR));
store.setDefault(LABEL_COLOR, StringConverter.asString(DEFAULT_LABEL_COLOR));
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(DEFAULT_KEYWORD1_COLOR));
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(DEFAULT_KEYWORD2_COLOR));
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(DEFAULT_KEYWORD3_COLOR));
store.setDefault(FUNCTION_COLOR, StringConverter.asString(DEFAULT_FUNCTION_COLOR));
store.setDefault(MARKUP_COLOR, StringConverter.asString(DEFAULT_MARKUP_COLOR));
store.setDefault(OPERATOR_COLOR, StringConverter.asString(DEFAULT_OPERATOR_COLOR));
store.setDefault(DIGIT_COLOR, StringConverter.asString(DEFAULT_DIGIT_COLOR));
store.setDefault(INVALID_COLOR, StringConverter.asString(DEFAULT_INVALID_COLOR));
store.setDefault(NULL_COLOR, StringConverter.asString(getThemeColor(NULL_COLOR).getRGB()));
store.setDefault(COMMENT1_COLOR, StringConverter.asString(getThemeColor(COMMENT1_COLOR).getRGB()));
store.setDefault(COMMENT2_COLOR, StringConverter.asString(getThemeColor(COMMENT2_COLOR).getRGB()));
store.setDefault(LITERAL1_COLOR, StringConverter.asString(getThemeColor(LITERAL1_COLOR).getRGB()));
store.setDefault(LITERAL2_COLOR, StringConverter.asString(getThemeColor(LITERAL2_COLOR).getRGB()));
store.setDefault(LABEL_COLOR, StringConverter.asString(getThemeColor(LABEL_COLOR).getRGB()));
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(getThemeColor(KEYWORD1_COLOR).getRGB()));
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(getThemeColor(KEYWORD2_COLOR).getRGB()));
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(getThemeColor(KEYWORD3_COLOR).getRGB()));
store.setDefault(FUNCTION_COLOR, StringConverter.asString(getThemeColor(FUNCTION_COLOR).getRGB()));
store.setDefault(MARKUP_COLOR, StringConverter.asString(getThemeColor(MARKUP_COLOR).getRGB()));
store.setDefault(OPERATOR_COLOR, StringConverter.asString(getThemeColor(OPERATOR_COLOR).getRGB()));
store.setDefault(DIGIT_COLOR, StringConverter.asString(getThemeColor(DIGIT_COLOR).getRGB()));
store.setDefault(INVALID_COLOR, StringConverter.asString(getThemeColor(INVALID_COLOR).getRGB()));
String bold = BOLD_SUFFIX;
store.setDefault(COMMENT1_COLOR + bold, false);

View File

@@ -1,368 +1,384 @@
// ============================================================================
//
// 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.commons.ui.swt.colorstyledtext;
import java.util.ArrayList;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ExtendedModifyEvent;
import org.eclipse.swt.custom.ExtendedModifyListener;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.runtime.xml.XmlUtil;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
import org.talend.commons.utils.threading.ExecutionLimiter;
/**
* This component is an adaptation of a Color Editor for a StyledText.
*
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
*
* <b>How to use it, example :</b> <br/>
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
* <br/>
*
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
*
*/
public class ColorStyledText extends StyledText {
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
private final ColorManager colorManager;
private final ColoringScanner scanner;
private final String languageMode;
private final MenuItem pasteItem;
private boolean coloring = true;
private UndoRedoManager undoRedoManager;
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
super(parent, style);
this.languageMode = languageMode;
this.colorManager = new ColorManager(store);
/*
* set the Shortcuts of the undo/redo
*/
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
UndoRedoManager undoManager = new UndoRedoManager(50);
undoManager.connect(this);
this.setUndoManager(undoManager);
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
Menu popupMenu = new Menu(this);
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
redoItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
redo();
}
});
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
undoItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
undo();
}
});
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
copyItem.setImage(image);
copyItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
copy();
}
});
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
pasteItem.setData(this);
pasteItem.setImage(image);
pasteItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
paste();
}
});
pasteItem.setEnabled(getEditable());
this.setMenu(popupMenu);
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
selectAllItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
selectAll();
}
});
this.setMenu(popupMenu);
Listener selectAllListener = new Listener() {
public void handleEvent(Event event) {
if (event.character == '\u0001') { // CTRL + A
selectAll();
}
}
};
addListener(SWT.KeyDown, selectAllListener);
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
scanner = new ColoringScanner(mode, colorManager);
addExtendedModifyListener(modifyListener);
}
/**
* DOC qli Comment method "invokeAction".
*
* @param action
*
* */
public void invokeAction(int action) {
super.invokeAction(action);
switch (action) {
case ActionCode.UNDO:
undo(); // ctrl+Z
break;
case ActionCode.REDO:
redo(); // ctrl+Y
break;
}
}
/**
* Getter for undoRedoManager.
*
* @return the undoRedoManager
*/
public UndoRedoManager getUndoManager() {
return this.undoRedoManager;
}
/**
* Sets the undoRedoManager.
*
* @param undoRedoManager the undoRedoManager to set
*/
public void setUndoManager(UndoRedoManager undoRedoManager) {
this.undoRedoManager = undoRedoManager;
}
public static class ActionCode {
public static final int UNDO = Integer.MAX_VALUE;
public static final int REDO = UNDO - 1;
}
private void undo() {
if (undoRedoManager != null) {
undoRedoManager.undo();
}
}
private void redo() {
if (undoRedoManager != null) {
undoRedoManager.redo();
}
}
protected void colorize(final ColoringScanner scanner) {
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
if (this.coloring) {
IToken token;
if (this.isDisposed()) {
return;
}
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
do {
token = scanner.nextToken();
if (!token.isEOF()) {
if (token instanceof CToken) {
CToken ctoken = (CToken) token;
StyleRange styleRange;
styleRange = new StyleRange();
styleRange.start = scanner.getTokenOffset();
styleRange.length = scanner.getTokenLength();
if (ctoken.getType() == null) {
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
styleRange.foreground = colorManager.getColor(ctoken.getColor());
} else {
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
}
styles.add(styleRange);
}
}
} while (!token.isEOF());
setStyles(styles);
} else {
StyleRange styleRange = new StyleRange();
styles.add(styleRange);
styleRange.start = 0;
styleRange.length = this.getText().getBytes().length;
styleRange.foreground = null;
setStyles(styles);
}
}
public void setStyles(final ArrayList<StyleRange> styles) {
if (ColorStyledText.this.isDisposed()) {
return;
}
int countChars = getCharCount();
for (int i = 0; i < styles.size(); i++) {
StyleRange styleRange = styles.get(i);
// System.out.println("styleRange.start=" + styleRange.start);
// System.out.println("styleRange.length=" + styleRange.length);
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
continue;
}
setStyleRange(styleRange);
}
}
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
public void modifyText(ExtendedModifyEvent event) {
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
colorizeLimiter.resetTimer();
colorizeLimiter.startIfExecutable(true, null);
} else {
getDisplay().asyncExec(new Runnable() {
public void run() {
colorize(scanner);
}
});
}
}
};
public ColorManager getColorManager() {
return this.colorManager;
}
public String getLanguageMode() {
return this.languageMode;
}
public ColoringScanner getScanner() {
return this.scanner;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
*/
@Override
public void setEditable(boolean editable) {
super.setEditable(editable);
if (pasteItem != null) {
pasteItem.setEnabled(editable);
}
}
/**
* Getter for coloring.
*
* @return the coloring
*/
public boolean isColoring() {
return this.coloring;
}
/**
* Sets the coloring.
*
* @param coloring the coloring to set
*/
public void setColoring(boolean coloring) {
boolean wasDifferent = this.coloring != coloring;
this.coloring = coloring;
if (!coloring) {
removeExtendedModifyListener(modifyListener);
} else if (wasDifferent) {
colorizeLimiter.resetTimer();
colorizeLimiter.startIfExecutable(true, null);
addExtendedModifyListener(modifyListener);
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.widgets.Widget#dispose()
*/
@Override
public void dispose() {
super.dispose();
colorManager.dispose();
}
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
@Override
public void execute(final boolean isFinalExecution, Object data) {
if (!isDisposed()) {
getDisplay().asyncExec(new Runnable() {
public void run() {
colorize(scanner);
}
});
}
}
};
}
// ============================================================================
//
// 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.commons.ui.swt.colorstyledtext;
import java.util.ArrayList;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ExtendedModifyEvent;
import org.eclipse.swt.custom.ExtendedModifyListener;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.runtime.xml.XmlUtil;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
import org.talend.commons.utils.threading.ExecutionLimiter;
/**
* This component is an adaptation of a Color Editor for a StyledText.
*
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
*
* <b>How to use it, example :</b> <br/>
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
* <br/>
*
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
*
*/
public class ColorStyledText extends StyledText {
public static final String PREFERENCE_COLOR_FOREGROUND= "ColorStyledText.Color.Foreground"; //$NON-NLS-1$
public static final String PREFERENCE_COLOR_BACKGROUND= "ColorStyledText.Color.Background"; //$NON-NLS-1$
public static final String PREFERENCE_COLOR_SELECTION_FOREGROUND= "ColorStyledText.Color.SelectionForeground"; //$NON-NLS-1$
public static final String PREFERENCE_COLOR_SELECTION_BACKGROUND= "ColorStyledText.Color.SelectionBackground"; //$NON-NLS-1$
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
private final ColorManager colorManager;
private final ColoringScanner scanner;
private final String languageMode;
private final MenuItem pasteItem;
private boolean coloring = true;
private UndoRedoManager undoRedoManager;
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
super(parent, style);
this.languageMode = languageMode;
this.colorManager = new ColorManager(store);
/*
* set the Shortcuts of the undo/redo
*/
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
UndoRedoManager undoManager = new UndoRedoManager(50);
undoManager.connect(this);
this.setUndoManager(undoManager);
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
Menu popupMenu = new Menu(this);
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
redoItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
redo();
}
});
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
undoItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
undo();
}
});
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
copyItem.setImage(image);
copyItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
copy();
}
});
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
pasteItem.setData(this);
pasteItem.setImage(image);
pasteItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
paste();
}
});
pasteItem.setEnabled(getEditable());
this.setMenu(popupMenu);
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
selectAllItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
selectAll();
}
});
this.setMenu(popupMenu);
Listener selectAllListener = new Listener() {
public void handleEvent(Event event) {
if (event.character == '\u0001') { // CTRL + A
selectAll();
}
}
};
addListener(SWT.KeyDown, selectAllListener);
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
scanner = new ColoringScanner(mode, colorManager);
addExtendedModifyListener(modifyListener);
initColorSetting();
}
protected void initColorSetting() {
this.setForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_FOREGROUND).orElse(null));
this.setBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_BACKGROUND).orElse(null));
this.setSelectionBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_BACKGROUND).orElse(null));
this.setSelectionForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_FOREGROUND).orElse(null));
}
/**
* DOC qli Comment method "invokeAction".
*
* @param action
*
* */
public void invokeAction(int action) {
super.invokeAction(action);
switch (action) {
case ActionCode.UNDO:
undo(); // ctrl+Z
break;
case ActionCode.REDO:
redo(); // ctrl+Y
break;
}
}
/**
* Getter for undoRedoManager.
*
* @return the undoRedoManager
*/
public UndoRedoManager getUndoManager() {
return this.undoRedoManager;
}
/**
* Sets the undoRedoManager.
*
* @param undoRedoManager the undoRedoManager to set
*/
public void setUndoManager(UndoRedoManager undoRedoManager) {
this.undoRedoManager = undoRedoManager;
}
public static class ActionCode {
public static final int UNDO = Integer.MAX_VALUE;
public static final int REDO = UNDO - 1;
}
private void undo() {
if (undoRedoManager != null) {
undoRedoManager.undo();
}
}
private void redo() {
if (undoRedoManager != null) {
undoRedoManager.redo();
}
}
protected void colorize(final ColoringScanner scanner) {
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
if (this.coloring) {
IToken token;
if (this.isDisposed()) {
return;
}
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
do {
token = scanner.nextToken();
if (!token.isEOF()) {
if (token instanceof CToken) {
CToken ctoken = (CToken) token;
StyleRange styleRange;
styleRange = new StyleRange();
styleRange.start = scanner.getTokenOffset();
styleRange.length = scanner.getTokenLength();
if (ctoken.getType() == null) {
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
styleRange.foreground = colorManager.getColor(ctoken.getColor());
} else {
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
}
styles.add(styleRange);
}
}
} while (!token.isEOF());
setStyles(styles);
} else {
StyleRange styleRange = new StyleRange();
styles.add(styleRange);
styleRange.start = 0;
styleRange.length = this.getText().getBytes().length;
styleRange.foreground = null;
setStyles(styles);
}
}
public void setStyles(final ArrayList<StyleRange> styles) {
if (ColorStyledText.this.isDisposed()) {
return;
}
int countChars = getCharCount();
for (int i = 0; i < styles.size(); i++) {
StyleRange styleRange = styles.get(i);
// System.out.println("styleRange.start=" + styleRange.start);
// System.out.println("styleRange.length=" + styleRange.length);
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
continue;
}
setStyleRange(styleRange);
}
}
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
public void modifyText(ExtendedModifyEvent event) {
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
colorizeLimiter.resetTimer();
colorizeLimiter.startIfExecutable(true, null);
} else {
getDisplay().asyncExec(new Runnable() {
public void run() {
colorize(scanner);
}
});
}
}
};
public ColorManager getColorManager() {
return this.colorManager;
}
public String getLanguageMode() {
return this.languageMode;
}
public ColoringScanner getScanner() {
return this.scanner;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
*/
@Override
public void setEditable(boolean editable) {
super.setEditable(editable);
if (pasteItem != null) {
pasteItem.setEnabled(editable);
}
}
/**
* Getter for coloring.
*
* @return the coloring
*/
public boolean isColoring() {
return this.coloring;
}
/**
* Sets the coloring.
*
* @param coloring the coloring to set
*/
public void setColoring(boolean coloring) {
boolean wasDifferent = this.coloring != coloring;
this.coloring = coloring;
if (!coloring) {
removeExtendedModifyListener(modifyListener);
} else if (wasDifferent) {
colorizeLimiter.resetTimer();
colorizeLimiter.startIfExecutable(true, null);
addExtendedModifyListener(modifyListener);
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.widgets.Widget#dispose()
*/
@Override
public void dispose() {
super.dispose();
colorManager.dispose();
}
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
@Override
public void execute(final boolean isFinalExecution, Object data) {
if (!isDisposed()) {
getDisplay().asyncExec(new Runnable() {
public void run() {
colorize(scanner);
}
});
}
}
};
}

View File

@@ -12,6 +12,8 @@
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import java.util.Map;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.talend.commons.ui.utils.image.ColorUtils;
@@ -29,5 +31,7 @@ public interface IConfigModuleDialog {
public String getMavenURI();
public int open();
public Map<String, String> getModulesMVNUrls();
}

View File

@@ -20,12 +20,14 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable.LAYOUT_MODE;
import org.talend.commons.ui.runtime.swt.tableviewer.selection.ILineSelectionListener;
import org.talend.commons.ui.runtime.swt.tableviewer.selection.LineSelectionEvent;
@@ -156,6 +158,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
final Table table = getTableViewerCreator().getTable();
final ILineSelectionListener beforeLineSelectionListener = new ILineSelectionListener() {
@Override
public void handle(LineSelectionEvent e) {
if (e.selectionByMethod && !selectionHelper.isMouseSelectionning() && !forceExecuteSelectionEvent) {
executeSelectionEvent = false;
@@ -166,6 +169,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
};
final ILineSelectionListener afterLineSelectionListener = new ILineSelectionListener() {
@Override
public void handle(LineSelectionEvent e) {
executeSelectionEvent = true;
}
@@ -175,6 +179,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
DisposeListener disposeListener = new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
selectionHelper.removeBeforeSelectionListener(beforeLineSelectionListener);
selectionHelper.removeAfterSelectionListener(afterLineSelectionListener);
@@ -185,6 +190,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
table.addListener(SWT.KeyUp, new Listener() {
@Override
public void handleEvent(Event event) {
if (event.character == '\u0001') { // CTRL + A
@@ -251,7 +257,9 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
newTableViewerCreator.setLazyLoad(TableViewerCreator.getRecommandLazyLoad());
newTableViewerCreator.setFirstVisibleColumnIsSelection(false);
newTableViewerCreator.setCheckboxInFirstColumn(false);
newTableViewerCreator.setBgColorForEmptyArea(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
Color bgColorForEmptyArea = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
.orElse(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
newTableViewerCreator.setBgColorForEmptyArea(bgColorForEmptyArea);
}
/**
@@ -271,6 +279,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
getExtendedTableModel().addBeforeOperationListListener(1, new IListenableListListener() {
@Override
public void handleEvent(ListenableListEvent event) {
handleBeforeListenableListOperationEvent(event);
}
@@ -279,6 +288,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
getExtendedTableModel().addAfterOperationListListener(1, new IListenableListListener() {
@Override
public void handleEvent(ListenableListEvent event) {
handleAfterListenableListOperationEvent(event);
}
@@ -287,6 +297,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
getExtendedTableModel().addAfterOperationListListener(100, new IListenableListListener<B>() {
@Override
public void handleEvent(ListenableListEvent<B> event) {
if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
// tableViewerCreator.getTable().forceFocus();
@@ -368,6 +379,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
tableViewerCreator.setInputList(getBeansList());
new AsynchronousThreading(100, true, tableViewerCreator.getTable().getDisplay(), new Runnable() {
@Override
public void run() {
tableViewerCreator.layout();
}

View File

@@ -16,8 +16,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ColorConstants;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.swt.tableviewer.data.ModifiedObjectInfo;
import org.talend.commons.ui.runtime.thread.AsynchronousThreading;
@@ -39,6 +41,8 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
protected TableViewerCreatorColumn column;
protected TableViewerCreator tableViewerCreator;
private Color tableBackground = ColorConstants.getTableBackgroundColor();
/**
* DOC amaumont CellEditorListener constructor comment.
@@ -89,7 +93,7 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
final String errorMessage = validateValue(newValue, beanPosition);
if (errorMessage == null) {
newValidValueTyped(beanPosition, lastValidValue, newValue, state);
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WHITE));
text.setBackground(tableBackground);
lastValidValue = newValue;
} else {
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_RED));

View File

@@ -31,6 +31,7 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.commons.ui.runtime.ITalendThemeService;
/**
* Figure managing some simple HTML styles. <br/>
@@ -77,6 +78,8 @@ public class SimpleHtmlFigure extends Figure {
private static Font boldFont = null;
private static Font boldItalicFont = null;
private static final Color DEFAULT_LABEL_COLOR = ITalendThemeService.getColor("NODE_FIGURE_LABEL_FORCEGROUND").orElse(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
/**
* Constructs a new SimpleHtmlFigure.
@@ -262,6 +265,8 @@ public class SimpleHtmlFigure extends Figure {
label.setFont(fontToUse);
if (colorStack.size() > 0) {
label.setForegroundColor(colorStack.get(colorStack.size() - 1));
} else {
label.setForegroundColor(DEFAULT_LABEL_COLOR); // Set label default foreground color
}
horizContainer.add(label);
}

View File

@@ -285,6 +285,30 @@
type="INFORMIX">
</DBType>
</RepositoryComponent>
<RepositoryComponent
name="INGRES"
withSchema="true"
input="tIngresInput"
output="tIngresOutput">
<Item
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
</Item>
<DBType
type="INGRES">
</DBType>
</RepositoryComponent>
<RepositoryComponent
name="VECTORWISE"
withSchema="true"
input="tVectorWiseInput"
output="tVectorWiseOutput">
<Item
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
</Item>
<DBType
type="VECTORWISE">
</DBType>
</RepositoryComponent>
<RepositoryComponent
name="JAVADB"
withSchema="true"

View File

@@ -175,6 +175,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
ProjectRepositoryNode.sapBWInfoObject=SAP InfoObject
ProjectRepositoryNode.sapContentExtractor=SAP BI Content Extractor
ProjectRepositoryNode.sapCDSView=SAP CDS View
RepositoryDropAdapter_copyingItems=Copying items...
RepositoryDropAdapter_errorMsg=This directory contains the locked item,it can not be moved now
RepositoryDropAdapter_lockedByOthers=This item is locked by other users, it can not be moved now.
@@ -204,3 +205,4 @@ RenameFolderAction.warning.cannotFind.title=Action not available
ConvertJobsUtil.warning.title=Warning
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Create stats log and implicit parameters
WizardPageAPIDefinition_operationIdMissing=API is missing operationIds. operationIds are used to initialize tRESTRequest/cRest output flows. See tRESTRequest/cRest online help.

View File

@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=Action non disponible
ConvertJobsUtil.warning.title=Avertissement
ConvertJobsUtil.warning.message=Le framework cible n'est pas totalement support\u00E9 dans cette version.
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Cr\u00E9er des logs de stat et des param\u00E8tres implicites.
WizardPageAPIDefinition_operationIdMissing=Des operationIds manquent dans l'API. Ces operationIds sont utilis\u00E9s pour initialiser les flux de sortie du tRESTRequest/cRest. Consultez l'aide en ligne des composants tRESTRequest/cRest.

View File

@@ -56,7 +56,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
PropertiesWizardPage.Description=\u8AAC\u660E
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
PropertiesWizardPage.Name=\u540D\u524D
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
@@ -156,7 +156,7 @@ ProjectRepositoryNode.invalidItem=\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0
ProjectRepositoryNode.columns=\u30AB\u30E9\u30E0
ProjectRepositoryNode.validationRules=\u691C\u8A3C\u30EB\u30FC\u30EB
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.genericSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE
ProjectRepositoryNode.genericSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE
ProjectRepositoryNode.queries=\u30AF\u30A8\u30EA\u30FC
ProjectRepositoryNode.synonymSchemas=\u30B7\u30CE\u30CB\u30E0\u30B9\u30AD\u30FC\u30DE
ProjectRepositoryNode.calculationViewSchemas=\u8A08\u7B97\u30D3\u30E5\u30FC\u30B9\u30AD\u30FC\u30DE
@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=\u4F7F\u7528\u3067\u304D\u306A\u3044
ConvertJobsUtil.warning.title=\u8B66\u544A
ConvertJobsUtil.warning.message=\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u304C\u5B8C\u5168\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u7D71\u8A08\u30ED\u30B0\u3068\u6697\u9ED9\u7684\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u4F5C\u6210
WizardPageAPIDefinition_operationIdMissing=API\u3067operationIds\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002operationIds\u306F\u3001tRESTRequest/cRest\u51FA\u529B\u30D5\u30ED\u30FC\u3092\u521D\u671F\u5316\u3059\u308B\u305F\u3081\u306B\u4F7F\u308F\u308C\u307E\u3059\u3002tRESTRequest/cRest\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30D8\u30EB\u30D7\u3092\u3054\u89A7\u304F\u3060\u3055\u3044\u3002

View File

@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=\u64CD\u4F5C\u4E0D\u53EF\u7528
ConvertJobsUtil.warning.title=\u8B66\u544A
ConvertJobsUtil.warning.message=\u6B64\u7248\u672C\u4E0D\u5B8C\u5168\u652F\u6301\u76EE\u6807\u6846\u67B6.
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u521B\u5EFA\u7EDF\u8BA1\u65E5\u5FD7\u548C\u9690\u5F0F\u53C2\u6570
WizardPageAPIDefinition_operationIdMissing=API \u7F3A\u5931 operationId \u53C2\u6570\uFF0C\u8FD9\u4E9B operationId \u53C2\u6570\u7528\u6765\u521D\u59CB\u5316 tRESTRequest \u6216 cRest \u8F93\u51FA\u6D41\u3002\u8BF7\u53C2\u89C1 tRESTRequest \u6216 cRest \u5728\u7EBF\u5E2E\u52A9\u6587\u6863\u3002

View File

@@ -67,6 +67,7 @@ import org.talend.core.model.repository.Folder;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.LockInfo;
import org.talend.core.model.repository.RepositoryViewObject;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.utils.XmiResourceManager;
import org.talend.core.runtime.CoreRuntimePlugin;
@@ -260,6 +261,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
return false;
}
boolean isAllowMultipleName = (type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
String path = "";
if (item.getState() != null) {

View File

@@ -27,10 +27,6 @@ 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;
@@ -39,22 +35,22 @@ 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.AbstractPendoTrackManager;
import org.talend.core.pendo.PendoDataTrackFactory;
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.TrackEvent;
import org.talend.core.pendo.properties.IPendoDataProperties;
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();
public class PendoItemSignatureManager extends AbstractPendoTrackManager {
private static PendoItemSignatureManager manager;
@@ -63,7 +59,7 @@ public class PendoItemSignatureManager {
static {
manager = new PendoItemSignatureManager();
try {
isTrackAvailable = PluginChecker.isTIS() && PendoTrackSender.getInstance().isTrackSendAvailable();
isTrackAvailable = PluginChecker.isTIS() && PendoDataTrackFactory.getInstance().isTrackSendAvailable();
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
@@ -87,11 +83,12 @@ public class PendoItemSignatureManager {
}
}
public void collectProperties() {
public IPendoDataProperties collectProperties() {
ICoreService coreService = ICoreService.get();
if (coreService == null || !isTrackAvailable) {
return;
return null;
}
PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
try {
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
@@ -188,6 +185,7 @@ public class PendoItemSignatureManager {
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
return itemSignProperties;
}
@@ -258,23 +256,12 @@ public class PendoItemSignatureManager {
if (!isTrackAvailable) {
return;
}
Job job = new Job("send pendo track") {
super.sendTrackToPendo();
}
@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();
@Override
public TrackEvent getTrackEvent() {
return TrackEvent.ITEM_SIGNATURE;
}
}

View File

@@ -102,6 +102,7 @@ import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.SAPBWTableHelper;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper;
import org.talend.cwm.helper.TaggedValueHelper;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.BinRepositoryNode;
@@ -1751,6 +1752,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
// 10. BW Business Content Extractor:
createSAPContentExtractorNodes(repObj, metadataConnection, node, validationRules);
// 11. CDS views:
createSAPCDSViewNodes(repObj, metadataConnection, node, validationRules);
} else if (metadataConnection instanceof SalesforceSchemaConnection) {
createSalesforceModuleNodes(repObj, metadataConnection, node, validationRules);
} else {
@@ -1784,7 +1788,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
for (MetadataTable tablesWithOrder : tablesWithOrders) {
EMap<String, String> properties = tablesWithOrder.getAdditionalProperties();
String partitionKey = properties.get(EProperties.CONTENT_TYPE.name());
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)) {
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)
&& !ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
tables.add(tablesWithOrder);
}
}
@@ -1967,6 +1973,32 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
private void createSAPCDSViewNodes(IRepositoryViewObject repObj, Connection metadataConnection, RepositoryNode node,
List<IRepositoryViewObject> validationRules) {
StableRepositoryNode tableContainer = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.sapCDSView"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
tableContainer.setChildrenObjectType(ERepositoryObjectType.METADATA_CON_TABLE);
tableContainer.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_CDS_VIEW);
IRepositoryNode cacheNode = nodeCache.getCache(tableContainer);
if (cacheNode != null && cacheNode instanceof StableRepositoryNode) {
tableContainer = (StableRepositoryNode) cacheNode;
tableContainer.getChildren().clear();
} else {
nodeCache.addCache(tableContainer, true);
}
node.getChildren().add(tableContainer);
List<MetadataTable> tablesWithOrders = ConnectionHelper.getTablesWithOrders(metadataConnection);
EList<MetadataTable> tables = new BasicEList<>();
for (MetadataTable tablesWithOrder : tablesWithOrders) {
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
if (ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
tables.add(tablesWithOrder);
}
}
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
private void createSalesforceModuleNodes(IRepositoryViewObject rebObj, Connection metadataConnection,
RepositoryNode connectionNode, List<IRepositoryViewObject> validationRules) {
EList modules = ((SalesforceSchemaConnection) metadataConnection).getModules();

View File

@@ -54,9 +54,7 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
import org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
@@ -153,6 +151,7 @@ import org.talend.core.runtime.services.IMavenUIService;
import org.talend.core.runtime.util.ItemDateParser;
import org.talend.core.runtime.util.JavaHomeUtil;
import org.talend.core.runtime.util.SharedStudioUtils;
import org.talend.core.service.IComponentJsonformGeneratorService;
import org.talend.core.service.ICoreUIService;
import org.talend.core.service.IDetectCVEService;
import org.talend.core.utils.CodesJarResourceCache;
@@ -239,14 +238,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
return singleton;
}
private ICoreService getCoreService() {
public ICoreService getCoreService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
}
return null;
}
private IRunProcessService getRunProcessService() {
public IRunProcessService getRunProcessService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
return GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
}
@@ -351,7 +350,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
* @param project
* @throws LoginException
*/
private void checkProjectCompatibility(Project project) throws LoginException {
public void checkProjectCompatibility(Project project) throws LoginException {
IMigrationToolService migrationToolService = GlobalServiceRegister.getDefault().getService(
IMigrationToolService.class);
// update migration system.
@@ -446,12 +445,10 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (currentShell == null) {
currentShell = DisplayUtils.getDefaultShell(false);
}
MessageBox box = new MessageBox(currentShell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
box.setText(Messages.getString("ProxyRepositoryFactory.JobNameErroe")); //$NON-NLS-1$
box.setMessage(Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " + Messages.getString("ProxyRepositoryFactory.ReplaceJob")); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
if (box.open() == SWT.OK) {
if (MessageDialog.openQuestion(currentShell,
Messages.getString("ProxyRepositoryFactory.JobNameErroe"), //$NON-NLS-1$
Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Messages.getString("ProxyRepositoryFactory.ReplaceJob"))) { //$NON-NLS-1$
ok[0] = true;
}
}
@@ -1848,7 +1845,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
* @param project
* @throws PersistenceException
*/
private void emptyTempFolder(Project project) throws PersistenceException {
public void emptyTempFolder(Project project) throws PersistenceException {
try {
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
FilesUtils.deleteFolder(new File(str), false);
@@ -2379,11 +2376,22 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
String str[] = new String[] { getRepositoryContext().getUser() + "", projectManager.getCurrentProject() + "" }; //$NON-NLS-1$ //$NON-NLS-2$
log.info(Messages.getString("ProxyRepositoryFactory.log.loggedOn", str)); //$NON-NLS-1$
// no performance impact for studio or commandline
if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentJsonformGeneratorService.class)) {
IComponentJsonformGeneratorService jsonformSvc = GlobalServiceRegister.getDefault().getService(IComponentJsonformGeneratorService.class);
if (jsonformSvc != null && IComponentJsonformGeneratorService.isEnabled()) {
jsonformSvc.generate(null);
}
}
} catch (LoginException e) {
try {
logOffProject();
} catch (Exception e1) {
ExceptionHandler.process(e1);
if (!LoginException.RESTART.equals(e.getKey())) {
try {
logOffProject();
} catch (Exception e1) {
ExceptionHandler.process(e1);
}
}
throw e;
} catch (PersistenceException e) {
@@ -2516,7 +2524,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
}
private void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
public void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
if (ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet().size() > 0) {
StringBuffer sb = new StringBuffer();
for (String technicalLabel : ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet()) {
@@ -2561,7 +2569,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
public void logOffProject() {
// getRepositoryContext().setProject(null);
repositoryFactoryFromProvider.logOffProject();
if (!CommonsPlugin.isHeadless()) {
ProjectRepositoryNode root = ProjectRepositoryNode.getInstance();
if (root != null) {
@@ -2617,6 +2624,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ReferenceProjectProvider.clearTacReferenceList();
ReferenceProjectProblemManager.getInstance().clearAll();
repositoryFactoryFromProvider.logOffProject();
fullLogonFinished = false;
}
@@ -3014,4 +3022,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
this.repositoryFactoryFromProvider.saveProject(project);
}
public void setCancelled(boolean cancelled) {
this.isCancelled = cancelled;
}
public boolean isCancelled() {
return this.isCancelled;
}
}

View File

@@ -52,6 +52,8 @@ public interface IGitInfoService extends IService {
public Map<String, String> getGitInfo(Property property) throws Exception;
public boolean isPushedToRemote(Property property) throws Exception;
public String getProjectBranch(Project project)throws Exception;
public static IGitInfoService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGitInfoService.class)) {

View File

@@ -17,14 +17,20 @@ import java.util.Map;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.talend.commons.runtime.model.repository.ECDCStatus;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.IImage;
@@ -77,13 +83,19 @@ import org.talend.utils.string.DigestUtil;
*/
public class RepositoryLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
private static final String MERGED_PREFERENCED_ITEMS = "org.talend.core.repository.REPO_MERGED_REFERENCED_ITEMS_COLOR";
private static final Color STABLE_PRIMARY_ENTRY_COLOR = new Color(null, 0, 0, 0);
private static final String LOCKED_ENTRY = "org.talend.core.repository.REPO_LOCKED_ENTRY";
private static final String STABLE_PRIMARY_ENTRY = "org.talend.core.repository.REPO_STABLE_PRIMARY_ENTRY_COLOR";
private static final String STABLE_SECONDARY_ENTRY = "org.talend.core.repository.REPO_STABLE_SECONDARY_ENTRY_COLOR";
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
protected static final Color INACTIVE_ENTRY_COLOR = new Color(null, 200, 200, 200);
private static final Color LOCKED_ENTRY = new Color(null, 200, 0, 0);
private static final Color LOCKED_ENTRY_COLOR = new Color(null, 200, 0, 0);
private static final Color MERGED_REFERENCED_ITEMS_COLOR = new Color(null, 120, 120, 120);
@@ -100,6 +112,18 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
return view;
}
private Color getStableSecondaryEntryColor() {
return ITalendThemeService.getColor(STABLE_SECONDARY_ENTRY).orElse(STABLE_SECONDARY_ENTRY_COLOR);
}
private Color getLockedEntryColor() {
return ITalendThemeService.getColor(LOCKED_ENTRY).orElse(LOCKED_ENTRY_COLOR);
}
private Color getMergedReferencedItemsColor() {
return ITalendThemeService.getColor(MERGED_PREFERENCED_ITEMS).orElse(MERGED_REFERENCED_ITEMS_COLOR);
}
public String getText(IRepositoryViewObject object) {
StringBuffer string = new StringBuffer();
string.append(object.getLabel());
@@ -482,23 +506,13 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
RepositoryNode node = (RepositoryNode) element;
switch (node.getType()) {
case REFERENCED_PROJECT:
return STABLE_PRIMARY_ENTRY_COLOR;
case STABLE_SYSTEM_FOLDER:
if (node.getLabel().equals(ERepositoryObjectType.SNIPPETS.toString())) {
return INACTIVE_ENTRY_COLOR;
}
if (node.getContentType() == ERepositoryObjectType.METADATA) {
return STABLE_PRIMARY_ENTRY_COLOR;
}
case SYSTEM_FOLDER:
if (node.getContentType() == ERepositoryObjectType.PROCESS) {
return STABLE_PRIMARY_ENTRY_COLOR;
}
return STABLE_SECONDARY_ENTRY_COLOR;
return getStableSecondaryEntryColor();
default:
ERepositoryStatus repositoryStatus = node.getObject().getRepositoryStatus();
if (repositoryStatus == ERepositoryStatus.LOCK_BY_OTHER) {
return LOCKED_ENTRY;
return getLockedEntryColor();
} else {
if (PluginChecker.isRefProjectLoaded()) {
IReferencedProjectService service = (IReferencedProjectService) GlobalServiceRegister.getDefault()
@@ -510,7 +524,7 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
.getCurrentProject().getEmfProject();
String projectLabel = object.getProjectLabel();
if (!mainProject.getLabel().equals(projectLabel)) {
return MERGED_REFERENCED_ITEMS_COLOR;
return getMergedReferencedItemsColor();
}
}
}
@@ -536,4 +550,43 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
refreshProperty = refresh;
}
public static IPropertyChangeListener createPropertyChangeListener(TreeViewer treeViewer) {
return new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
String property = event.getProperty();
if (property == null) {
return;
}
boolean changed = false;
switch (property) {
case RepositoryLabelProvider.STABLE_PRIMARY_ENTRY:
// case RepositoryLabelProvider.INACTIVE_ENTRY:
// case RepositoryLabelProvider.LOCKED_ENTRY:
// case RepositoryLabelProvider.MERGED_PREFERENCED_ITEMS:
// case RepositoryLabelProvider.STABLE_SECONDARY_ENTRY:
changed = true;
break;
default:
break;
}
if (changed) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
if (treeViewer != null) {
Control control = treeViewer.getControl();
if (!control.isDisposed()) {
treeViewer.refresh();
}
}
}
});
}
}
};
}
}

View File

@@ -40,6 +40,7 @@ import org.talend.core.model.utils.CloneConnectionUtils;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.model.bridge.ReponsitoryContextBridge;
@@ -67,6 +68,7 @@ public class StandaloneConnectionContextUtils {
String server = getOriginalValue(contextProperties, dbConn.getServerName());
String username = getOriginalValue(contextProperties, dbConn.getUsername());
String password = getOriginalValue(contextProperties, dbConn.getRawPassword());
String originEncryptedPassword = getOriginalValue(contextProperties, dbConn.getPassword());
String port = getOriginalValue(contextProperties, dbConn.getPort());
String sidOrDatabase = getOriginalValue(contextProperties, dbConn.getSID());
String datasource = getOriginalValue(contextProperties, dbConn.getDatasourceName());
@@ -87,6 +89,8 @@ public class StandaloneConnectionContextUtils {
cloneConn.setDatasourceName(datasource);
cloneConn.setDBRootPath(dbRootPath);
cloneConn.setFileFieldName(filePath);
//To avoid encrypt the same value
cloneConn.setPassword(originEncryptedPassword);
cloneConn.setRawPassword(password); // the password is raw.
cloneConn.setPort(port);
cloneConn.setUiSchema(schemaOracle);

View File

@@ -48,6 +48,8 @@ import org.talend.commons.runtime.model.emf.provider.EmfResourcesFactoryReader;
*/
public class TalendResourceSet extends ResourceSetImpl {
private boolean showLog;
public TalendResourceSet() {
super();
@@ -58,6 +60,14 @@ public class TalendResourceSet extends ResourceSetImpl {
getLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE);
}
public boolean isShowLog() {
return this.showLog;
}
public void setShowLog(boolean showLog) {
this.showLog = showLog;
}
/*
* (non-Javadoc)
*
@@ -83,7 +93,13 @@ public class TalendResourceSet extends ResourceSetImpl {
Resource resource = map.get(uri);
if (resource != null) {
if (loadOnDemand && !resource.isLoaded()) {
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
}
return resource;
}
@@ -99,7 +115,13 @@ public class TalendResourceSet extends ResourceSetImpl {
}
if (theURIConverter.normalize(resource.getURI()).equals(normalizedURI)) {
if (loadOnDemand && !resource.isLoaded()) {
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
}
if (map != null) {
@@ -125,7 +147,13 @@ public class TalendResourceSet extends ResourceSetImpl {
+ "'; a registered resource factory is needed");
}
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
if (map != null) {
map.put(uri, resource);

View File

@@ -390,6 +390,10 @@ public class XmiResourceManager {
}
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad) {
return getItemResource(getResourceSet(), item, forceLoad, false);
}
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad, boolean showLog) {
if (item == null) {
return null;
}
@@ -402,13 +406,23 @@ public class XmiResourceManager {
} else {
itemResourceURI = getItemResourceURI(getItemURI(item));
}
Resource itemResource = resourceSet.getResource(itemResourceURI, false);
if (forceLoad && itemResource == null) {
if (item instanceof FileItem) {
itemResource = new ByteArrayResource(itemResourceURI);
resourceSet.getResources().add(itemResource);
Resource itemResource = null;
try {
if (resourceSet instanceof TalendResourceSet) {
((TalendResourceSet) resourceSet).setShowLog(showLog);
}
itemResource = resourceSet.getResource(itemResourceURI, false);
if (forceLoad && itemResource == null) {
if (item instanceof FileItem) {
itemResource = new ByteArrayResource(itemResourceURI);
resourceSet.getResources().add(itemResource);
}
itemResource = resourceSet.getResource(itemResourceURI, true);
}
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
itemResource = resourceSet.getResource(itemResourceURI, true);
}
return itemResource;
}
@@ -628,7 +642,7 @@ public class XmiResourceManager {
boolean isTestContainer = false;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
ITestContainerProviderService testContainerService = GlobalServiceRegister
.getDefault().getService(ITestContainerProviderService.class);
if (testContainerService != null) {
isTestContainer = testContainerService.isTestContainerItem(property.getItem());

View File

@@ -139,3 +139,5 @@ Bundle-ClassPath: .,
lib/delight-rhino-sandbox-0.0.15.jar,
lib/rhino-1.7.13.jar
Eclipse-RegisterBuddy: org.talend.testutils
Import-Package: org.eclipse.equinox.p2.repository,
org.eclipse.equinox.security.storage

View File

@@ -21,7 +21,8 @@ bin.includes = META-INF/,\
plugin_ja.properties,\
plugin_ru.properties,\
plugin_swtbot.properties,\
plugin_zh_CN.properties
plugin_zh_CN.properties,\
resources/
src.includes = META-INF/,\
mappingMetadataTypes.xml,\
mappings/,\

View File

@@ -0,0 +1,216 @@
<?xml version="1.0"?>
<mapping>
<dbms product="INGRES" id="ingres_id" label="Mapping Ingres"
default="true">
<dbTypes>
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="C" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" ignorePre="true" />
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
<dbType type="LONG NVARCHAR" ignorePre="true" />
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
<dbType type="VARCHAR" default="true" defaultLength="1200" ignorePre="true"/>
</dbTypes>
<language name="java">
<talendToDbTypes><!-- Adviced mappings -->
<talendType type="id_List"/>
<talendType type="id_Boolean">
<dbType type="BOOLEAN" default="true" />
</talendType>
<talendType type="id_Byte">
<dbType type="BYTE" default="true" />
<dbType type="BYTE VARYING" />
</talendType>
<talendType type="id_byte[]">
</talendType>
<talendType type="id_Character">
<dbType type="CHAR" default="true" />
<dbType type="VARCHAR"/>
<dbType type="C"/>
<dbType type="TEXT"/>
<dbType type="LONG VARCHAR"/>
<dbType type="NCHAR"/>
<dbType type="NVARCHAR"/>
<dbType type="LONG NVARCHAR"/>
</talendType>
<talendType type="id_Date">
<dbType type="DATE" default="true" />
<dbType type="ANSIDATE" />
<dbType type="INGRESDATE" />
<dbType type="TIME" />
<dbType type="TIMESTAMP" />
<dbType type="INTERVAL"/>
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DECIMAL" default="true" />
<dbType type="FLOAT4" />
<dbType type="FLOAT"/>
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Double">
<dbType type="FLOAT" default="true" />
<dbType type="FLOAT4" />
<dbType type="DECIMAL"/>
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT4" default="true" />
<dbType type="FLOAT"/>
<dbType type="DECIMAL" />
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Integer">
<dbType type="INTEGER" default="true" />
<dbType type="BIGINT" />
<dbType type="SMALLINT"/>
<dbType type="TINYINT"/>
</talendType>
<talendType type="id_Long">
<dbType type="BIGINT" default="true" />
<dbType type="INTEGER"/>
<dbType type="SMALLINT"/>
<dbType type="TINYINT"/>
</talendType>
<talendType type="id_Object">
<dbType type="MONEY" default="true"/>
<dbType type="OBJECT_KEY" />
<dbType type="TABLE_KEY" />
</talendType>
<talendType type="id_Short">
<dbType type="SMALLINT" default="true" />
<dbType type="INTEGER" />
<dbType type="BIGINT"/>
<dbType type="TINYINT" />
</talendType>
<talendType type="id_String">
<dbType type="VARCHAR" default="true" />
<dbType type="LONG VARCHAR" />
<dbType type="NCHAR"/>
<dbType type="NVARCHAR" />
<dbType type="LONG NVARCHAR" />
<dbType type="TEXT" />
<dbType type="C"/>
<dbType type="CHAR"/>
</talendType>
</talendToDbTypes>
<dbToTalendTypes>
<dbType type="ANSIDATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="BOOLEAN">
<talendType type="id_Boolean" default="true" />
</dbType>
<dbType type="BIGINT">
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BYTE">
<talendType type="id_Byte" default="true" />
</dbType>
<dbType type="BYTE VARYING">
<talendType type="id_Byte" default="true" />
</dbType>
<dbType type="C">
<talendType type="id_String" default="true" />
<talendType type="id_Character"/>
</dbType>
<dbType type="CHAR">
<talendType type="id_String" default="true" />
<talendType type="id_Character"/>
</dbType>
<dbType type="DECIMAL">
<talendType type="id_Float"/>
<talendType type="id_BigDecimal" default="true"/>
</dbType>
<dbType type="DATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="FLOAT">
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="FLOAT4">
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="INTEGER">
<talendType type="id_Integer" default="true" />
<talendType type="id_Long"/>
<talendType type="id_Short"/>
</dbType>
<dbType type="INGRESDATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="INTERVAL">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="LONG NVARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="LONG VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="MONEY">
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="NCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="NVARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="OBJECT_KEY">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="SMALLINT">
<talendType type="id_Short" default="true" />
<talendType type="id_Integer" />
<talendType type="id_Long"/>
</dbType>
<dbType type="TEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="TINYINT">
<talendType type="id_Byte" default="true" />
<talendType type="id_Integer" />
<talendType type="id_Short"/>
<talendType type="id_Long" />
</dbType>
<dbType type="TIME">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TABLE_KEY">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
</dbToTalendTypes>
</language>
</dbms>
</mapping>

View File

@@ -0,0 +1,211 @@
<?xml version="1.0"?>
<mapping>
<dbms product="VECTORWISE" id="vectorwise_id" label="Mapping VectorWise"
default="true">
<dbTypes>
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="C" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" ignorePre="true" />
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
<dbType type="LONG NVARCHAR" ignorePre="true" />
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
<dbType type="VARCHAR" default="true" defaultLength="1200" ignorePre="true"/>
</dbTypes>
<language name="java">
<talendToDbTypes><!-- Adviced mappings -->
<talendType type="id_List"/>
<talendType type="id_Boolean">
</talendType>
<talendType type="id_Byte">
<dbType type="BYTE" default="true" />
<dbType type="BYTE VARYING" />
</talendType>
<talendType type="id_byte[]">
</talendType>
<talendType type="id_Character">
<dbType type="CHAR" default="true" />
<dbType type="VARCHAR"/>
<dbType type="C"/>
<dbType type="TEXT"/>
<dbType type="LONG VARCHAR"/>
<dbType type="NCHAR"/>
<dbType type="NVARCHAR"/>
<dbType type="LONG NVARCHAR"/>
</talendType>
<talendType type="id_Date">
<dbType type="ANSIDATE" default="true"/>
<dbType type="DATE"/>
<dbType type="INGRESDATE" />
<dbType type="TIME" />
<dbType type="TIMESTAMP" />
<dbType type="INTERVAL"/>
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DECIMAL" default="true" />
<dbType type="FLOAT4" />
<dbType type="FLOAT"/>
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Double">
<dbType type="FLOAT" default="true" />
<dbType type="FLOAT4" />
<dbType type="DECIMAL"/>
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT4" default="true" />
<dbType type="FLOAT"/>
<dbType type="DECIMAL" />
<dbType type="MONEY"/>
</talendType>
<talendType type="id_Integer">
<dbType type="INTEGER" default="true" />
<dbType type="BIGINT" />
<dbType type="SMALLINT"/>
<dbType type="TINYINT"/>
</talendType>
<talendType type="id_Long">
<dbType type="BIGINT" default="true" />
<dbType type="INTEGER"/>
<dbType type="SMALLINT"/>
<dbType type="TINYINT"/>
</talendType>
<talendType type="id_Object">
<dbType type="MONEY" default="true"/>
<dbType type="OBJECT_KEY" />
<dbType type="TABLE_KEY" />
</talendType>
<talendType type="id_Short">
<dbType type="SMALLINT" default="true" />
<dbType type="INTEGER" />
<dbType type="BIGINT"/>
<dbType type="TINYINT" />
</talendType>
<talendType type="id_String">
<dbType type="VARCHAR" default="true" />
<dbType type="LONG VARCHAR" />
<dbType type="NCHAR"/>
<dbType type="NVARCHAR" />
<dbType type="LONG NVARCHAR" />
<dbType type="TEXT" />
<dbType type="C"/>
<dbType type="CHAR"/>
</talendType>
</talendToDbTypes>
<dbToTalendTypes>
<dbType type="ANSIDATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="BIGINT">
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BYTE">
<talendType type="id_Byte" default="true" />
</dbType>
<dbType type="BYTE VARYING">
<talendType type="id_Byte" default="true" />
</dbType>
<dbType type="C">
<talendType type="id_String" default="true" />
<talendType type="id_Character"/>
</dbType>
<dbType type="CHAR">
<talendType type="id_String" default="true" />
<talendType type="id_Character"/>
</dbType>
<dbType type="DECIMAL">
<talendType type="id_Float"/>
<talendType type="id_BigDecimal" default="true"/>
</dbType>
<dbType type="DATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="FLOAT">
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="FLOAT4">
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="INTEGER">
<talendType type="id_Integer" default="true" />
<talendType type="id_Long"/>
<talendType type="id_Short"/>
</dbType>
<dbType type="INGRESDATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="INTERVAL">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="LONG NVARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="LONG VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="MONEY">
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="NCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="NVARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="OBJECT_KEY">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="SMALLINT">
<talendType type="id_Short" default="true" />
<talendType type="id_Integer" />
<talendType type="id_Long"/>
</dbType>
<dbType type="TEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="TINYINT">
<talendType type="id_Byte" default="true" />
<talendType type="id_Integer" />
<talendType type="id_Short"/>
<talendType type="id_Long" />
</dbType>
<dbType type="TIME">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TABLE_KEY">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
</dbToTalendTypes>
</language>
</dbms>
</mapping>

View File

@@ -0,0 +1,59 @@
# Component
tSnowflakeConnection=java.base/java.nio
tSnowflakeClose=java.base/java.nio
tSnowflakeCommit=java.base/java.nio
tSnowflakeInput=java.base/java.nio
tSnowflakeOutput=java.base/java.nio
tSnowflakeOutputBulk=java.base/java.nio
tSnowflakeOutputBulkExec=java.base/java.nio
tSnowflakeRow=java.base/java.nio
tSnowflakeBulkExec=java.base/java.nio
tSnowflakeRollback=java.base/java.nio
tCouchbaseInput=java.base/java.lang.invoke
tCouchbaseOutput=java.base/java.lang.invoke
tCouchbaseDCPInput=java.base/java.lang.invoke
tCouchbaseDCPOutput=java.base/java.lang.invoke
tWriteJSONField=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
tFTPClose=java.base/sun.security.ssl,java.base/sun.security.util
tFTPConnection=java.base/sun.security.ssl,java.base/sun.security.util
tFTPDelete=java.base/sun.security.ssl,java.base/sun.security.util
tFTPFileExist=java.base/sun.security.ssl,java.base/sun.security.util
tFTPFileList=java.base/sun.security.ssl,java.base/sun.security.util
tFTPFileProperties=java.base/sun.security.ssl,java.base/sun.security.util
tFTPGet=java.base/sun.security.ssl,java.base/sun.security.util
tFTPPut=java.base/sun.security.ssl,java.base/sun.security.util
tFTPRename=java.base/sun.security.ssl,java.base/sun.security.util
tFTPTruncate=java.base/sun.security.ssl,java.base/sun.security.util
tNeo4jBatchOutput=java.base/java.lang,java.base/sun.nio.ch
tNeo4jBatchOutputRelationship=java.base/java.lang,java.base/sun.nio.ch
tNeo4jBatchSchema=java.base/java.lang,java.base/sun.nio.ch
tNeo4jClose=java.base/java.lang,java.base/sun.nio.ch
tNeo4jConnection=java.base/java.lang,java.base/sun.nio.ch
tNeo4jImportTool=java.base/java.lang,java.base/sun.nio.ch
tNeo4jInput=java.base/java.lang,java.base/sun.nio.ch
tNeo4jRow=java.base/java.lang,java.base/sun.nio.ch
tMongoDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
tCosmosDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
tMatchGroup=java.base/java.io
tRuleSurvivorship=java.base/java.lang
tRecordMatching=java.base/java.io
tDqReportRun=java.base/java.lang,java.base/java.nio
tWebService=java.base/java.lang
tWebServiceInput=java.base/java.lang
# TCK framework
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
# BigData distribution
SPARK_3_3_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
SPARK_3_2_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
SPARK_3_1_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
SPARK_2_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar

View File

@@ -33,6 +33,13 @@ public class AnalysisReportRecorder extends ItemReportRecorder {
this.detailMessage = detailMessage;
}
public AnalysisReportRecorder(IItemAnalysisTask task, SeverityOption severity, String detailMessage) {
super();
this.task = task;
this.severity = severity;
this.detailMessage = detailMessage;
}
public String getTaskName() {
return task.getName();
}

View File

@@ -0,0 +1,43 @@
// ============================================================================
//
// 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.analysistask;
import java.util.List;
import java.util.Set;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
/**
* created by hcyi on Oct 26, 2022
* Detailled comment
*
*/
public class DefaultItemsAnalysisTask extends AbstractItemAnalysisTask {
public DefaultItemsAnalysisTask() {
}
@Override
public Set<ERepositoryObjectType> getRepositoryObjectTypeScope() {
return null;
}
@Override
public List<AnalysisReportRecorder> execute(Item item) {
// TODO Auto-generated method stub
return null;
}
}

View File

@@ -20,6 +20,7 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -50,7 +51,9 @@ import org.talend.core.model.general.Project;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.i18n.Messages;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryService;
@@ -73,7 +76,7 @@ public class ItemAnalysisReportManager {
private AtomicBoolean inGenerating = new AtomicBoolean(false);
public List<AnalysisReportRecorder> executeAnalysisTask(Project project) {
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();
List<AnalysisReportRecorder> analysisResultList = new ArrayList<AnalysisReportRecorder>();
List<IItemAnalysisTask> analysisTasks = ItemAnalysisTaskRegistryReader.getInstance().getItemAnalysisTasks();
@@ -105,6 +108,16 @@ public class ItemAnalysisReportManager {
}
}
}
//
ItemAnalysisTaskRegistryReader.getInstance().getAllItemURIsMap().clear();
ItemAnalysisTaskRegistryReader.getInstance().getDuplicatedItemURIsMap().clear();
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
if (designerCoreService != null) {
List<AnalysisReportRecorder> recorder = designerCoreService.analysis(project);
if (recorder != null && !recorder.isEmpty()) {
analysisResultList.addAll(recorder);
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
@@ -190,6 +203,42 @@ public class ItemAnalysisReportManager {
inGenerating.set(newValue);
}
public String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
ERepositoryObjectType rootItemType = itemType;
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
List<String> typeLabels = new ArrayList<String>();
findOutCompleteTypePath(rootItemType, typeLabels);
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
IRepositoryService repositoryService = IRepositoryService.get();
if (repositoryService != null) {
String standardNodeLabel = repositoryService.getStandardNodeLabel();
if (StringUtils.isNotBlank(standardNodeLabel)) {
typeLabels.add(standardNodeLabel);
}
}
}
StringBuffer buffer = new StringBuffer();
if (!typeLabels.isEmpty()) {
for (int i = 0; i < typeLabels.size(); i++) {
if (i != 0) {
buffer.append("/");
}
buffer.append(typeLabels.get(i));
}
}
return buffer.toString();
}
public void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
if (parentType != null) {
findOutCompleteTypePath(parentType, typeLabels);
}
typeLabels.add(type.getLabel());
}
}
class AnalysisReportAccessDialog extends Dialog {

View File

@@ -32,6 +32,10 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
private static final ItemAnalysisTaskRegistryReader INSTANCE = new ItemAnalysisTaskRegistryReader();
private Map<String, String> allItemURIsMap = new HashMap<String, String>();
private Map<String, List<String>> duplicatedItemURIsMap = new HashMap<String, List<String>>();
public static ItemAnalysisTaskRegistryReader getInstance() {
return INSTANCE;
}
@@ -81,4 +85,17 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
idItemAnalysisTaskMap.clear();
}
/**
* Getter for allItemURIsMap.
*
* @return the allItemURIsMap
*/
public Map<String, String> getAllItemURIsMap() {
return this.allItemURIsMap;
}
public Map<String, List<String>> getDuplicatedItemURIsMap() {
return this.duplicatedItemURIsMap;
}
}

View File

@@ -12,10 +12,8 @@
// ============================================================================
package org.talend.commons.report;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.talend.analysistask.ItemAnalysisReportManager;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.GlobalServiceRegister;
@@ -23,7 +21,6 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.ui.ITestContainerCoreService;
import org.talend.repository.model.IRepositoryService;
/**
* DOC jding class global comment. Detailled comment
@@ -34,8 +31,15 @@ public class ItemReportRecorder {
protected String detailMessage;
protected String currentItemPath;
protected String currentItemType;
public String getItemType() {
String type = "";
if (item == null) {
return currentItemType;
}
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
if (itemType != null) {
if (ERepositoryObjectType.getAllTypesOfTestContainer().contains(itemType)) {
@@ -43,7 +47,7 @@ public class ItemReportRecorder {
if (parentJobItem != null) {
ERepositoryObjectType parentJobType = ERepositoryObjectType.getItemType(parentJobItem);
if (parentJobType != null) {
String parentTypePath = getCompleteObjectTypePath(parentJobType);
String parentTypePath = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(parentJobType);
if (StringUtils.isNotBlank(parentTypePath)) {
type = parentTypePath + "/";
}
@@ -51,7 +55,7 @@ public class ItemReportRecorder {
}
type += itemType;
} else {
type = getCompleteObjectTypePath(itemType);
type = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(itemType);
}
}
return type;
@@ -59,6 +63,9 @@ public class ItemReportRecorder {
public String getItemPath() {
String path = "";
if (this.currentItemPath != null) {
return this.currentItemPath;
}
StringBuffer buffer = new StringBuffer();
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
@@ -104,42 +111,6 @@ public class ItemReportRecorder {
return parentJobItem;
}
private String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
ERepositoryObjectType rootItemType = itemType;
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
List<String> typeLabels = new ArrayList<String>();
findOutCompleteTypePath(rootItemType, typeLabels);
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
IRepositoryService repositoryService = IRepositoryService.get();
if (repositoryService != null) {
String standardNodeLabel = repositoryService.getStandardNodeLabel();
if (StringUtils.isNotBlank(standardNodeLabel)) {
typeLabels.add(standardNodeLabel);
}
}
}
StringBuffer buffer = new StringBuffer();
if (!typeLabels.isEmpty()) {
for (int i = 0; i < typeLabels.size(); i++) {
if (i != 0) {
buffer.append("/");
}
buffer.append(typeLabels.get(i));
}
}
return buffer.toString();
}
private void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
if (parentType != null) {
findOutCompleteTypePath(parentType, typeLabels);
}
typeLabels.add(type.getLabel());
}
public Item getItem() {
return item;
}
@@ -148,6 +119,22 @@ public class ItemReportRecorder {
this.item = item;
}
public String getCurrentItemPath() {
return this.currentItemPath;
}
public void setCurrentPath(String currentItemPath) {
this.currentItemPath = currentItemPath;
}
public String getCurrentItemType() {
return this.currentItemType;
}
public void setCurrentItemType(String currentItemType) {
this.currentItemType = currentItemType;
}
public String getDetailMessage() {
return detailMessage;
}

View File

@@ -58,6 +58,10 @@ public final class JavaUtils {
public static final List<String> AVAILABLE_VERSIONS = Arrays.asList(JavaCore.VERSION_1_8 );
public static final String ALLOW_JAVA_INTERNAL_ACCESS = "allow.java.internal.access"; //$NON-NLS-1$
public static final String CUSTOM_ACCESS_SETTINGS = "custom.access.settings"; //$NON-NLS-1$
public static final String PROCESSOR_TYPE = "javaProcessor"; //$NON-NLS-1$
public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$

View File

@@ -16,6 +16,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -157,7 +158,7 @@ public interface ILibraryManagerService extends IService {
public void clearCache(boolean cleanIndex);
public void deployLibsFromCustomComponents();
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
@Deprecated
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);

View File

@@ -53,5 +53,5 @@ public interface ILibraryManagerUIService extends IService {
public boolean confirmDialog(String originalJarFileName);
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue);
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
}

View File

@@ -34,6 +34,9 @@ public enum EDatabase4DriverClassName {
INFORMIX(EDatabaseTypeName.INFORMIX, "com.informix.jdbc.IfxDriver"), //$NON-NLS-1$
INGRES(EDatabaseTypeName.INGRES, "com.ingres.jdbc.IngresDriver"),
VECTORWISE(EDatabaseTypeName.VECTORWISE, "com.ingres.jdbc.IngresDriver"),
JAVADB_DERBYCLIENT(EDatabaseTypeName.JAVADB_DERBYCLIENT, "org.apache.derby.jdbc.ClientDriver"), //$NON-NLS-1$
JAVADB_EMBEDED(EDatabaseTypeName.JAVADB_EMBEDED, "org.apache.derby.jdbc.EmbeddedDriver"), //$NON-NLS-1$
JAVADB_JCCJDBC(EDatabaseTypeName.JAVADB_JCCJDBC, "com.ibm.db2.jcc.DB2Driver"), //$NON-NLS-1$
@@ -49,6 +52,7 @@ public enum EDatabase4DriverClassName {
MYSQL8(EDatabaseTypeName.MYSQL, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
MARIADB(EDatabaseTypeName.MYSQL, "org.mariadb.jdbc.Driver"), //$NON-NLS-1$
AMAZON_AURORA(EDatabaseTypeName.AMAZON_AURORA, "org.gjt.mm.mysql.Driver"), //$NON-NLS-1$
AMAZON_AURORA_3(EDatabaseTypeName.AMAZON_AURORA, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
NETEZZA(EDatabaseTypeName.NETEZZA, "org.netezza.Driver"), //$NON-NLS-1$
ORACLEFORSID(EDatabaseTypeName.ORACLEFORSID, "oracle.jdbc.OracleDriver", "oracle.jdbc.driver.OracleDriver"), //$NON-NLS-1$ //$NON-NLS-2$

View File

@@ -347,8 +347,7 @@ public enum EDatabaseTypeName {
isSupport = isSupportODBC;
} else if (EDatabaseTypeName.SAS == this) {
isSupport = false;
} else if (EDatabaseTypeName.INGRES == this || EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.VECTORWISE == this
|| EDatabaseTypeName.PARACCEL == this) {
} else if (EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.PARACCEL == this) {
return false;
}

View File

@@ -24,7 +24,7 @@ import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
*/
public enum ERedshiftDriver {
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.3.jar" }),
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.10.jar" }),
DRIVER_V1("Driver v1", new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar" });
private String displayName;

View File

@@ -252,6 +252,8 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_EXECUTOR_CORES = "CONN_PARA_KEY_EXECUTOR_CORES";
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
/******************************************/
@@ -366,7 +368,57 @@ public class ConnParameterKeys {
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";
/**kubernetes*/
public static final String CONN_PARA_KEY_K8S_SUBMIT_MODE="CONN_PARA_KEY_K8S_SUBMIT_MODE";
public static final String CONN_PARA_KEY_K8S_MASTER="CONN_PARA_KEY_K8S_MASTER";
public static final String CONN_PARA_KEY_K8S_INSTANCES="CONN_PARA_KEY_K8S_INSTANCES";
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK="CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK";
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET="CONN_PARA_KEY_K8S_REGISTRYSECRET";
public static final String CONN_PARA_KEY_K8S_IMAGE="CONN_PARA_KEY_K8S_IMAGE";
public static final String CONN_PARA_KEY_K8S_NAMESPACE="CONN_PARA_KEY_K8S_NAMESPACE";
public static final String CONN_PARA_KEY_K8S_SERVICEACCOUNT="CONN_PARA_KEY_K8S_SERVICEACCOUNT";
public static final String CONN_PARA_KEY_K8S_DISTUPLOAD="CONN_PARA_KEY_K8S_DISTUPLOAD";
public static final String CONN_PARA_KEY_K8S_S3BUCKET="CONN_PARA_KEY_K8S_S3BUCKET";
public static final String CONN_PARA_KEY_K8S_S3FOLDER="CONN_PARA_KEY_K8S_S3FOLDER";
public static final String CONN_PARA_KEY_K8S_S3CREDENTIALS="CONN_PARA_KEY_K8S_S3CREDENTIALS";
public static final String CONN_PARA_KEY_K8S_S3ACCESSKEY="CONN_PARA_KEY_K8S_S3ACCESSKEY";
public static final String CONN_PARA_KEY_K8S_S3SECRETKEY="CONN_PARA_KEY_K8S_S3SECRETKEY";
public static final String CONN_PARA_KEY_K8S_BLOBACCOUNT="CONN_PARA_KEY_K8S_BLOBACCOUNT";
public static final String CONN_PARA_KEY_K8S_BLOBCONTAINER="CONN_PARA_KEY_K8S_BLOBCONTAINER";
public static final String CONN_PARA_KEY_K8S_BLOBSECRETKEY="CONN_PARA_KEY_K8S_BLOBSECRETKEY";
public static final String CONN_PARA_KEY_K8S_AZUREACCOUNT="CONN_PARA_KEY_K8S_AZUREACCOUNT";
public static final String CONN_PARA_KEY_K8S_AZURECREDENTIALS="CONN_PARA_KEY_K8S_AZURECREDENTIALS";
public static final String CONN_PARA_KEY_K8S_AZURECONTAINER="CONN_PARA_KEY_K8S_AZURECONTAINER";
public static final String CONN_PARA_KEY_K8S_AZURESECRETKEY="CONN_PARA_KEY_K8S_AZURESECRETKEY";
public static final String CONN_PARA_KEY_K8S_AZUREAADKEY="CONN_PARA_KEY_K8S_AZUREAADKEY";
public static final String CONN_PARA_KEY_K8S_AZUREAADCLIENTID="CONN_PARA_KEY_K8S_AZUREAADCLIENTID";
public static final String CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID="CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID";
/**
* Override hadoop configuration
*/

View File

@@ -112,6 +112,13 @@ public enum EDatabaseConnTemplate {
SQLITE(new DbConnStr(EDatabaseTypeName.SQLITE, //
"jdbc:sqlite:/<filename>")), //$NON-NLS-1$
INGRES(new DbConnStr(EDatabaseTypeName.INGRES, //
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
"II7")), //$NON-NLS-1$
VECTORWISE(new DbConnStr(EDatabaseTypeName.VECTORWISE, //
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
"II7")),
FIREBIRD(new DbConnStr(EDatabaseTypeName.FIREBIRD, //
"jdbc:firebirdsql:<host>/<port>:<filename>?<property>", //$NON-NLS-1$
"3050")), //$NON-NLS-1$
@@ -421,6 +428,8 @@ public enum EDatabaseConnTemplate {
case PSQL:
case PLUSPSQL:
case GREENPLUM:
case INGRES:
case VECTORWISE:
case FIREBIRD:
case JAVADB_EMBEDED:
case JAVADB_JCCJDBC:
@@ -447,6 +456,8 @@ public enum EDatabaseConnTemplate {
case SYBASEASE_16_SA:
case IBMDB2:
case IBMDB2_ZOS:
case INGRES:
case VECTORWISE:
case MSSQL:
case INFORMIX:
case TERADATA:

View File

@@ -27,25 +27,20 @@ import org.talend.core.database.conn.DatabaseConnConstants;
public enum EDatabaseVersion4Drivers {
// access
ACCESS_JDBC(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, new String[] {
"jackcess-2.1.0.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.1.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackcess-encrypt-2.1.0.jar", "bcprov-jdk15on-1.51.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
"jackcess-2.1.12.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.3.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackcess-encrypt-2.1.4.jar", "bcprov-jdk15on-1.70.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
ACCESS_2003(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2003", "Access_2003")), //$NON-NLS-1$ //$NON-NLS-2$
ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
// oracle
ORACLE_18(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 18 and above", "ORACLE_18", "ojdbc8-19.3.0.0.jar")),
ORACLE_12(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12", "ORACLE_12", "ojdbc7.jar")),
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12 (Deprecated)", "ORACLE_12",
"ojdbc7.jar")),
ORACLE_11(new DbVersion4DriversForOracle11(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID,
EDatabaseTypeName.ORACLESN, EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM },
"Oracle 11", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
"Oracle 11 (Deprecated)", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
DbVersion4DriversForOracle11.DRIVER_1_6 })),
ORACLE_10(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 10", "ORACLE_10", "ojdbc14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ORACLE_9(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 9", "ORACLE_9", "ojdbc14-9i.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ORACLE_8(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 8", "ORACLE_8", "ojdbc12.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// AS400
AS400_V7R1_V7R3(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V7R1 to V7R3", "AS400_V7R1_V7R3", "jt400-9.8.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AS400_V6R1_V7R2(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V6R1 to V7R2", "AS400_V6R1_V7R2", "jt400_V6R1.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -60,7 +55,7 @@ public enum EDatabaseVersion4Drivers {
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.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$
@@ -69,12 +64,12 @@ public enum EDatabaseVersion4Drivers {
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
SAS_9_1(new DbVersion4Drivers(EDatabaseTypeName.SAS, "SAS 9.1", "SAS_9.1", new String[] { "sas.core.jar", //$NON-NLS-1$
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
// MYSQL, add for 9594
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-j-8.0.33.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.49.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-2.5.3.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// add for 9594
@@ -83,10 +78,10 @@ public enum EDatabaseVersion4Drivers {
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
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.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.34.jar", "slf4j-reload4j-1.7.34.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.13.4.jar",
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "jcip-annotations-1.0-1.jar",
"json-smart-2.4.9.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.9.jar", "asm-9.5.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$
@@ -113,6 +108,8 @@ public enum EDatabaseVersion4Drivers {
EXASOL(new DbVersion4Drivers(EDatabaseTypeName.EXASOL, "exajdbc-6.0.9302.jar")), //$NON-NLS-1$
MAXDB(new DbVersion4Drivers(EDatabaseTypeName.MAXDB, "sapdbc.jar")), //$NON-NLS-1$
INGRES(new DbVersion4Drivers(EDatabaseTypeName.INGRES, "iijdbc-10.2-4.1.10.jar")),
VECTORWISE(new DbVersion4Drivers(EDatabaseTypeName.VECTORWISE, "iijdbc-10.2-4.1.10.jar")),
// HIVE(new DbVersion4Drivers(EDatabaseTypeName.HIVE, "STANDALONE", "STANDALONE", new String[] {
// "hive-jdbc-0.8.1.jar",
// "hive-metastore-0.8.1.jar", "hive-exec-0.8.1.jar", "hive-service-0.8.1.jar", "libfb303_new.jar",
@@ -153,12 +150,16 @@ public enum EDatabaseVersion4Drivers {
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.11.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"jackson-databind-2.11.4.jar", "jackson-annotations-2.11.4.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"aws-java-sdk-redshift-internal-1.12.x.jar" })), //$NON-NLS-1$
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "jackson-core-2.13.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"httpclient-4.5.13.jar", "joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
"aws-java-sdk-redshift-internal-1.12.x.jar", "aws-java-sdk-core-1.12.315.jar", //$NON-NLS-1$ //$NON-NLS-2$
"aws-java-sdk-sts-1.12.315.jar", "aws-java-sdk-redshift-1.12.315.jar", "jmespath-java-1.12.315.jar" })), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 5", "MYSQL_5", //$NON-NLS-1$
"mysql-connector-java-5.1.49.jar")),
AMAZON_AURORA_3(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 8", "MYSQL_8", //$NON-NLS-1$
"mysql-connector-j-8.0.33.jar"));
private DbVersion4Drivers dbVersionBean;

View File

@@ -15,8 +15,10 @@ package org.talend.core.hadoop;
import java.util.Collection;
import java.util.HashSet;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.ExceptionHandler;
@@ -25,6 +27,9 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.runtime.hd.IDynamicDistributionManager;
import org.talend.core.runtime.i18n.Messages;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
/**
* created by cmeng on Jul 20, 2015 Detailled comment
@@ -145,4 +150,58 @@ public class BigDataBasicUtil {
return null;
}
public static String getDistributionByVersion(String version) {
if (StringUtils.isEmpty(version))
return null;
if (version.startsWith("EMR")) {
return "AMAZON_EMR";
} else if (version.equals("SYNAPSE")) {
return "AZURE_SYNAPSE";
} else if (version.contains("CDH") || version.contains("CDP")) {
return "CLOUDERA";
} else if (version.startsWith("Databricks")) {
return "DATABRICKS";
} else if (version.contains("HDP")) {
return "HORTONWORKS";
} else if (version.startsWith("MICROSOFT_HD_INSIGHT")) {
return "MICROSOFT_HD_INSIGHT";
} else if (version.startsWith("SPARK")) {
return "SPARK";
}
return null;
}
public static void setDistribution(NodeType node, String dbVersionName) {
if (node == null || dbVersionName == null) {
return;
}
EList<ElementParameterType> elementParameters = node.getElementParameter();
String distribution = null;
String dbVersion = null;
// Iterate over the item elementParameters in order to find the "DISTRIBUTION" and "SPARK_VERSION"
// parameters values.
for (int i = 0; i < elementParameters.size(); i++) {
ElementParameterType param = elementParameters.get(i);
if (dbVersionName.equals(param.getName())) {
dbVersion = param.getValue();
break;
}
}
try {
ElementParameterType property = TalendFileFactory.eINSTANCE.createElementParameterType();
distribution = BigDataBasicUtil.getDistributionByVersion(dbVersion);
if (distribution != null) {
property.setName("DISTRIBUTION"); //$NON-NLS-1$
property.setField("CLOSED_LIST"); //$NON-NLS-1$
property.setValue(distribution);
elementParameters.add(property);
} else {
ExceptionHandler.log("no matched distribution for version " + dbVersion);//$NON-NLS-1$
}
} catch (Exception e) {
ExceptionHandler.log(e.getMessage());
}
}
}

View File

@@ -38,7 +38,10 @@ public class HadoopClassLoaderFactory2 {
public static ClassLoader getHDFSClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
return getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb);
}
public static ClassLoader getHDFSKnoxClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
return HadoopClassLoaderFactory2.getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb,
IHadoopArgs.HDFS_ARG_KNOX);
}
public static ClassLoader getMRClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
return getClassLoader(relatedClusterId, EHadoopCategory.MAP_REDUCE, distribution, version, useKrb);
}

View File

@@ -28,6 +28,10 @@ public class HadoopConstants {
public static final String SPARK_MODE_YARN_CLUSTER = "YARN_CLUSTER";
public static final String SPARK_MODE_DATAPROC = "DATAPROC";
public static final String SPARK_MODE_SYNAPSE = "SYNAPSE";
public static final String SPARK_MODE_HDI = "HDI";
public static final String FRAMEWORK = "FRAMEWORK";

View File

@@ -22,4 +22,6 @@ public interface IHadoopArgs {
public static final String HIVE_ARG_STANDALONE = "STANDALONE"; //$NON-NLS-1$
public static final String HDFS_ARG_KNOX = "USE_KNOX"; //$NON-NLS-1$
}

View File

@@ -142,6 +142,8 @@ public enum EHadoopProperties {
SPARK_EXECUTOR_MEMORY,
SPARK_EXECUTOR_CORES,
DATABRICKS_ENDPOINT,
DATABRICKS_CLOUD_PROVIDER,
@@ -153,6 +155,52 @@ public enum EHadoopProperties {
DATABRICKS_TOKEN,
DATABRICKS_DBFS_DEP_FOLDER,
K8S_SUBMIT_MODE,
K8S_MASTER,
K8S_INSTANCES,
K8S_REGISTRYSECRET,
K8S_IMAGE,
K8S_NAMESPACE,
K8S_SERVICEACCOUNT,
K8S_DISTUPLOAD,
K8S_S3BUCKET,
K8S_S3FOLDER,
K8S_S3CREDENTIALS,
K8S_S3ACCESSKEY,
K8S_S3SECRETKEY,
K8S_BLOBACCOUNT,
K8S_BLOBCONTAINER,
K8S_BLOBSECRETKEY,
K8S_AZUREACCOUNT,
K8S_AZURECREDENTIALS,
K8S_AZURECONTAINER,
K8S_AZURESECRETKEY,
K8S_AZUREAADKEY,
K8S_AZUREAADCLIENTID,
K8S_AZUREAADDIRECTORYID,
DATABRICKS_NODE_TYPE,

View File

@@ -984,6 +984,14 @@ public class ContextUtils {
}
public boolean remove(Item item, String param) {
Set<String> params = map.get(item);
if (params != null && params.contains(param)) {
return params.remove(param);
}
return false;
}
public boolean isEmpty() {
return map.isEmpty();
}

View File

@@ -33,6 +33,7 @@ import org.talend.core.model.properties.ContextItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.cwm.helper.ResourceHelper;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
@@ -335,6 +336,8 @@ public class JobContextManager implements IContextManager {
} else {
contextParam.setType(MetadataTalendType.getDefaultTalendType());
}
//To avoid encrypt the same value}
contextParam.setOriginEncryptedValue(contextParamType.getValue());
contextParam.setValue(contextParamType.getRawValue());
contextParam.setPromptNeeded(contextParamType.isPromptNeeded());
@@ -560,7 +563,10 @@ public class JobContextManager implements IContextManager {
contextParamType.setName(contextParam.getName());
contextParamType.setPrompt(contextParam.getPrompt());
contextParamType.setType(contextParam.getType());
//To avoid encrypt the same value
contextParamType.setValue(contextParam.getOriginEncryptedValue());
contextParamType.setRawValue(contextParam.getValue());
contextParam.setOriginEncryptedValue(contextParamType.getValue()); // For origin encrypted value is null or encryption key upgrade
contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
contextParamType.setComment(contextParam.getComment());
if (!contextParam.isBuiltIn()) {

View File

@@ -46,6 +46,9 @@ public class JobContextParameter implements IContextParameter, Cloneable {
String[] valueList;
String internalId;
/*This value may dirty, only use to cache encrypted value*/
String originEncryptedValue;
/**
* change to save id always for bug 13184.
@@ -301,6 +304,15 @@ public class JobContextParameter implements IContextParameter, Cloneable {
this.source = source;
}
public String getOriginEncryptedValue() {
return originEncryptedValue;
}
public void setOriginEncryptedValue(String originEncryptedValue) {
this.originEncryptedValue = originEncryptedValue;
}
/*
* (non-Javadoc)
*

View File

@@ -20,7 +20,7 @@ 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.pendo.PendoDataTrackFactory;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.service.ICloudSignOnService;
import org.talend.repository.model.RepositoryConstants;
@@ -254,7 +254,7 @@ public class ConnectionBean implements Cloneable {
String user = conDetails.getString(USER);
if (isToken()) {
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
user = PendoTrackSender.getInstance().getTmcUser(url, getPassword());
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
if (StringUtils.isNotBlank(user)) {
setUser(user);
}

View File

@@ -293,7 +293,8 @@ public final class MetadataToolHelper {
boolean isKeyword = KeywordsValidator.isKeyword(originalColumnName);
StringBuilder sb = new StringBuilder();
int[] charBit = new int[columnName.length()];
// keep charBit length align with the length of originalColumnName (StringBuilder)
int[] charBit = new int[originalColumnName.length()];
if (!isKeyword) {
boolean isAllowSpecific = isAllowSpecificCharacters();

View File

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

View File

@@ -433,6 +433,16 @@ public class ComponentToRepositoryProperty {
connection.setDatabaseType(EDatabaseTypeName.IBMDB2.getDisplayName());
connection.setProductId(EDatabaseTypeName.IBMDB2.getProduct());
}
// Ingres
else if (EDatabaseTypeName.INGRES.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.INGRES.getDisplayName());
connection.setProductId(EDatabaseTypeName.INGRES.getProduct());
}
// VECTORWISE
else if (EDatabaseTypeName.VECTORWISE.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.VECTORWISE.getDisplayName());
connection.setProductId(EDatabaseTypeName.VECTORWISE.getProduct());
}
// Sqlite
else if (EDatabaseTypeName.SQLITE.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.SQLITE.getDisplayName());

View File

@@ -1091,6 +1091,10 @@ public class RepositoryToComponentProperty {
if (dbVersionString != null) {
return dbVersionString.toUpperCase();
}
} else if (EDatabaseConnTemplate.AMAZON_AURORA.getDBDisplayName().equals(databaseType)) {
if (dbVersionString != null) {
return dbVersionString.toUpperCase();
}
} else if (EDatabaseTypeName.HIVE.getDisplayName().equals(databaseType)) {
return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
} else if (EDatabaseTypeName.HBASE.getDisplayName().equals(databaseType)) {
@@ -1115,7 +1119,9 @@ public class RepositoryToComponentProperty {
|| EDatabaseConnTemplate.SAPHana.getDBDisplayName().equals(databaseType)
|| EDatabaseConnTemplate.MSSQL.getDBDisplayName().equals(databaseType)) {
if (dbVersionString != null) {
driverValue = dbVersionString.toUpperCase();
if (EDatabaseVersion4Drivers.getDbVersionName(databaseType, dbVersionString) != null) {
driverValue = dbVersionString.toUpperCase();
}
}
}
if (isContextMode(connection, dbVersionString)) {

View File

@@ -18,6 +18,7 @@ import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import org.apache.commons.codec.binary.StringUtils;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.components.IMultipleComponentManager;
@@ -509,7 +510,7 @@ public abstract class AbstractNode implements INode {
}
for (String key : childParameters.keySet()) {
IElementParameter param = childParameters.get(key);
if (param.getName().equals(name)) {
if (StringUtils.equals(name, param.getName())) {
return param;
}
}
@@ -676,7 +677,8 @@ public abstract class AbstractNode implements INode {
return null;
}
for (IMetadataTable table : metadataList) {
if (table.getAttachedConnector().equals(connector)) {
String attachedConnector = table.getAttachedConnector();
if (attachedConnector != null && attachedConnector.equals(connector)) {
return table;
}
}

View File

@@ -38,6 +38,7 @@ public enum EParameterFieldType {
SCHEMA_XPATH_QUERYS,
QUERYSTORE_TYPE,
GUESS_SCHEMA,
DYNAMIC_GUESS_SCHEMA,
PROPERTY_TYPE,
EXTERNAL,
FILE,

View File

@@ -75,4 +75,9 @@ public interface IContextParameter {
public String getInternalId();
public void setInternalId(String internalId);
/*This value may dirty, only use to cache encrypted value*/
public String getOriginEncryptedValue();
public void setOriginEncryptedValue(String originEncryptedValue);
}

View File

@@ -234,4 +234,9 @@ public interface IElementParameter {
public void setSerialized(boolean isSerialized);
public boolean isSelectedFromItemValue();
/*This value may dirty, only use to cache encrypted value*/
public String getOrignEncryptedValue();
public void setOrignEncryptedValue(String value);
}

View File

@@ -71,6 +71,9 @@ public interface IProcess2 extends IRepositoryObject, IProcess {
@Override
void setActivate(boolean b);
public boolean isRefactoringToJoblet();
public void refactoringToJoblet(boolean isRefactoring);
/**
* DOC qzhang Comment method "checkStartNodes".
*/

View File

@@ -368,6 +368,9 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
"repository.metadataCalculationView", "METADATA_CON_CALCULATION_VIEW", 106, true, true, new String[] { PROD_DI },
new String[] {}, false);
public final static ERepositoryObjectType METADATA_SAP_CDS_VIEW = new ERepositoryObjectType("repository.SAPTable", //$NON-NLS-1$
"METADATA_SAP_CDS_VIEW", 107, true, true, new String[] { PROD_DI }, new String[] {}, false);
private String label;
private String alias;
@@ -1477,12 +1480,8 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return allTypes;
}
public static List<ERepositoryObjectType> getAllTypesOfJoblet() {
public static List<ERepositoryObjectType> getAllBigDataTypesOfJoblet(){
List<ERepositoryObjectType> allTypes = new ArrayList<ERepositoryObjectType>();
if (ERepositoryObjectType.JOBLET != null) {
allTypes.add(ERepositoryObjectType.JOBLET);
}
if (ERepositoryObjectType.SPARK_JOBLET != null) {
allTypes.add(ERepositoryObjectType.SPARK_JOBLET);
}
@@ -1492,6 +1491,15 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return allTypes;
}
public static List<ERepositoryObjectType> getAllTypesOfJoblet() {
List<ERepositoryObjectType> allTypes = new ArrayList<ERepositoryObjectType>();
allTypes.addAll(getAllBigDataTypesOfJoblet());
if (ERepositoryObjectType.JOBLET != null) {
allTypes.add(ERepositoryObjectType.JOBLET);
}
return allTypes;
}
public static List<ERepositoryObjectType> getAllTypesOfTestContainer() {
List<ERepositoryObjectType> allTypes = new ArrayList<ERepositoryObjectType>();

View File

@@ -79,4 +79,8 @@ public final class TalendPropertiesUtil {
public static String getProductApp() {
return System.getProperty(PROD_APP);
}
public static boolean isEnabledUseShortJobletName() {
return isEnabled("talend.job.build.useShortJobletName"); //$NON-NLS-1$
}
}

View File

@@ -85,7 +85,7 @@ public class TalendLibsServerManager {
public static final String TALEND_LIB_PASSWORD = "";//$NON-NLS-1$
public static final String TALEND_LIB_REPOSITORY = "libraries";//$NON-NLS-1$
public static final String TALEND_LIB_REPOSITORY = "studio-libraries";//$NON-NLS-1$
private static TalendLibsServerManager manager = null;

View File

@@ -10,7 +10,7 @@
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.pendo.mapper;
package org.talend.core.pendo;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -18,16 +18,24 @@ 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;
import org.talend.core.pendo.properties.IPendoDataProperties;
/**
* DOC jding class global comment. Detailled comment
*/
public abstract class AbstractPendoTMapManager {
public abstract class AbstractPendoTrackManager {
protected abstract PendoTMapProperties calculateProperties();
public abstract TrackEvent getTrackEvent();
public abstract IPendoDataProperties collectProperties();
public boolean isTrackSendAvailable() throws Exception {
return PendoDataTrackFactory.getInstance().isTrackSendAvailable();
}
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
PendoDataTrackFactory.getInstance().sendTrackData(event, properties);
}
public void sendTrackToPendo() {
Job job = new Job("send pendo track") {
@@ -35,9 +43,9 @@ public abstract class AbstractPendoTMapManager {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (PendoTrackSender.getInstance().isTrackSendAvailable()) {
PendoTMapProperties properties = calculateProperties();
PendoTrackSender.getInstance().sendTrackData(TrackEvent.TMAP, properties);
if (isTrackSendAvailable()) {
IPendoDataProperties properties = collectProperties();
sendTrackData(getTrackEvent(), properties);
}
} catch (Exception e) {
// warning only

View File

@@ -0,0 +1,73 @@
// ============================================================================
//
// 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 org.talend.core.pendo.properties.IPendoDataProperties;
import org.talend.core.service.ICoreTisRuntimeService;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoDataTrackFactory {
private static PendoDataTrackFactory instance;
private static ICoreTisRuntimeService coreRuntimeService;
static {
instance = new PendoDataTrackFactory();
coreRuntimeService = ICoreTisRuntimeService.get();
}
private PendoDataTrackFactory() {
}
public static PendoDataTrackFactory getInstance() {
return instance;
}
public boolean isTrackSendAvailable() throws Exception {
if (coreRuntimeService != null) {
return coreRuntimeService.isPendoTrackAvailable();
}
return false;
}
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
if (coreRuntimeService != null) {
coreRuntimeService.sendPendoTrackData(event, properties);
}
}
public void sendProjectLoginTrack() {
if (coreRuntimeService != null) {
AbstractPendoTrackManager pendoProjectLoginManager = coreRuntimeService.getPendoProjectLoginManager();
pendoProjectLoginManager.sendTrackToPendo();
}
}
public void sendGenericTrack(TrackEvent event, IPendoDataProperties properties) {
if (coreRuntimeService != null) {
AbstractPendoTrackManager genericManager = coreRuntimeService.getPendoGenericManager(event, properties);
genericManager.sendTrackToPendo();
}
}
public String getTmcUser(String url, String token) {
if (coreRuntimeService != null) {
return coreRuntimeService.getTmcUser(url, token);
}
return "";
}
}

View File

@@ -12,26 +12,12 @@
// ============================================================================
package org.talend.core.pendo;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
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;
@@ -64,47 +50,6 @@ public class PendoTrackDataUtil {
return content;
}
public static IPendoDataProperties getLoginEventProperties() {
String studioPatch = getLatestPatchInstalledVersion();
PendoLoginProperties loginEvent = new PendoLoginProperties();
IStudioLiteP2Service studioLiteP2Service = IStudioLiteP2Service.get();
try {
if (studioLiteP2Service != null) {
List<String> enabledFeatures = new ArrayList<String>();
List<String> enabledFeaturesList = studioLiteP2Service.getCurrentProjectEnabledFeatures();
enabledFeaturesList.stream().forEach(feature -> {
String result = feature;
if (result.startsWith(FEATURE_PREFIX)) {
result = result.substring(FEATURE_PREFIX.toCharArray().length);
}
if (result.endsWith(FEATURE_TAIL)) {
result = result.substring(0, result.lastIndexOf(FEATURE_TAIL));
}
enabledFeatures.add(result);
});
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);
}
loginEvent.setStudioVersion(VersionUtils.getInternalMajorVersion());
loginEvent.setStudioPatch(studioPatch);
return loginEvent;
}
public static String getLatestPatchInstalledVersion() {
String studioPatch = "";
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
@@ -114,52 +59,6 @@ public class PendoTrackDataUtil {
return studioPatch;
}
private static void setUpRefProjectsStructure(PendoLoginProperties loginEvent) {
ProjectManager projectManager = ProjectManager.getInstance();
Project currentProject = projectManager.getCurrentProject();
Map<String, Project> teclabelProjectMap = new HashMap<String, Project>();
List<Project> allReferencedProjects = projectManager.getAllReferencedProjects();
allReferencedProjects.forEach(refProject -> {
String technicalLabel = refProject.getTechnicalLabel();
if (StringUtils.isNotBlank(technicalLabel)) {
teclabelProjectMap.put(technicalLabel, refProject);
}
});
int[] refCount = new int[] {0};
List<String> resultList = new ArrayList<String>();
Map<String, String> desensitiveLabelMap = new HashMap<String, String>();
findReferencePorjectPath(currentProject, "Main", resultList, refCount, desensitiveLabelMap, teclabelProjectMap);
loginEvent.setRefProjectList(resultList);
loginEvent.setRefProjectCount(String.valueOf(desensitiveLabelMap.keySet().size()));
}
public static void findReferencePorjectPath(Project currentProject, String path, List<String> resultList, int[] refCount,
Map<String, String> desensitiveLabelMap, Map<String, Project> teclabelProjectMap) {
List<ProjectReference> projectReferenceList = currentProject.getProjectReferenceList();
for (ProjectReference projectReference : projectReferenceList) {
String structPath = path;
if (projectReference.getReferencedProject() == null) {
continue;
}
String technicalLabel = projectReference.getReferencedProject().getTechnicalLabel();
Project refProject = teclabelProjectMap.get(technicalLabel);
if (StringUtils.isBlank(technicalLabel) || refProject == null) {
continue;
}
String desensitiveLabel = desensitiveLabelMap.get(technicalLabel);
if (StringUtils.isBlank(desensitiveLabel)) {
refCount[0] = refCount[0] + 1;
desensitiveLabel = "Ref" + refCount[0];
desensitiveLabelMap.put(technicalLabel, desensitiveLabel);
}
structPath = structPath + "/" + desensitiveLabel;
resultList.add(structPath);
findReferencePorjectPath(refProject, structPath, resultList, refCount, desensitiveLabelMap, teclabelProjectMap);
}
}
public static String convertEntityJsonString(Object entity) {
ObjectMapper mapper = new ObjectMapper();
try {
@@ -173,30 +72,4 @@ public class PendoTrackDataUtil {
return "";
}
public enum TrackEvent {
PROJECT_LOGIN("Project Login"),
IMPORT_API_DEF("Import API Definition"),
UPDATE_API_DEF("Update API Definition"),
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"),
AUTOMAP("tMap Automap"),
TMAP("tMap"),
ITEM_IMPORT("Import items"),
ITEM_SIGNATURE("Item Signature");
private String event;
TrackEvent(String event) {
this.event = event;
}
public String getEvent() {
return event;
}
}
}

View File

@@ -1,325 +0,0 @@
// ============================================================================
//
// 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.pendo;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.StatusLine;
import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
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.commons.utils.network.IProxySelectorProvider;
import org.talend.commons.utils.network.NetworkUtil;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.nexus.HttpClientTransport;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.properties.IPendoDataProperties;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.service.IRemoteService;
import org.talend.repository.model.RepositoryConstants;
import org.talend.utils.json.JSONObject;
/**
* DOC jding class global comment. Detailled comment
*/
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";
private static final String PENDO_TRACK = "/monitoring/pendo/track";
private static final String HEAD_AUTHORIZATION = "Authorization";
private static final String HEAD_CONTENT_TYPE = "Content-Type";
private static final String HEAD_PENDO_KEY = "x-pendo-integration-key";
private static PendoTrackSender instance;
private static String adminUrl;
private static String apiBaseUrl;
private static String pendoInfo;
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) {
adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
}
}
return instance;
}
public void sendToPendo(TrackEvent event, IPendoDataProperties properties) {
Job job = new Job("send pendo track") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (isTrackSendAvailable()) {
sendTrackData(event, properties);
}
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
}
return Status.OK_STATUS;
}
};
job.setUser(false);
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
if (isPendoLocalDebug()) {
ExceptionHandler.log(event.getEvent() + ":" + PendoTrackDataUtil.convertEntityJsonString(properties));
return;
}
DefaultHttpClient client = null;
CloseableHttpResponse response = null;
IProxySelectorProvider proxySelectorProvider = null;
try {
String pendoInfo = getPendoInfo();
if (StringUtils.isBlank(pendoInfo)) {
throw new Exception("Pendo information is empty");
}
String pendoKey = getPendoKeyFromLicense();
if (StringUtils.isBlank(pendoKey)) {
throw new Exception("Pendo key is empty");
}
client = new DefaultHttpClient();
String url = getBaseUrl() + PENDO_TRACK;
HttpPost httpPost = new HttpPost(url);
httpPost.setHeader(HEAD_CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());
httpPost.setHeader(HEAD_PENDO_KEY, pendoKey);
proxySelectorProvider = HttpClientTransport.addProxy(client, new URI(url));
EntityBuilder entityBuilder = EntityBuilder.create();
String trackData = PendoTrackDataUtil.generateTrackData(pendoInfo, event, properties);
entityBuilder.setText(trackData).setContentType(ContentType.APPLICATION_JSON);
HttpEntity entity = entityBuilder.build();
httpPost.setEntity(entity);
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 + "]");
}
} finally {
HttpClientTransport.removeProxy(proxySelectorProvider);
client.getConnectionManager().shutdown();
if (response != null) {
try {
response.close();
} catch (Throwable e) {
ExceptionHandler.process(e);
}
}
if (client != null) {
try {
client.close();
} catch (Throwable e) {
ExceptionHandler.process(e);
}
}
}
}
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());
}
return pendoInfo;
}
private String getPendoInfo(String baseUrl, String token) throws Exception {
DefaultHttpClient client = null;
CloseableHttpResponse response = null;
IProxySelectorProvider proxySelectorProvider = null;
try {
client = new DefaultHttpClient();
String url = baseUrl + PENDO_INFO;
HttpGet httpGet = new HttpGet(url);
httpGet.setHeader(HEAD_AUTHORIZATION, "Bearer " + token);
proxySelectorProvider = HttpClientTransport.addProxy(client, new URI(url));
response = client.execute(httpGet, HttpClientContext.create());
StatusLine statusLine = response.getStatusLine();
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
}
return responseStr;
} finally {
HttpClientTransport.removeProxy(proxySelectorProvider);
client.getConnectionManager().shutdown();
if (response != null) {
try {
response.close();
} catch (Throwable e) {
ExceptionHandler.process(e);
}
}
if (client != null) {
try {
client.close();
} catch (Throwable e) {
ExceptionHandler.process(e);
}
}
}
}
private boolean checkTokenUsed(String adminUrl) throws Exception {
if (StringUtils.isNotBlank(adminUrl) && GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
IRemoteService service = GlobalServiceRegister.getDefault().getService(IRemoteService.class);
return service.isTokenUsed(adminUrl);
}
return false;
}
public String getBaseUrl() throws Exception {
return getBaseUrl(adminUrl, false);
}
public String getBaseUrl(String adminUrl, boolean token) throws Exception {
if (StringUtils.isNotBlank(apiBaseUrl) && !token) {
return apiBaseUrl;
}
try {
URL url = new URL(adminUrl);
// tmc.int.cloud.talend.com
String authority = url.getAuthority();
String regex = "(\\w*\\-*\\w*\\.?){2}\\.(talend.com)";
Pattern pattern= Pattern.compile(regex);
Matcher match = pattern.matcher(authority);
if (match.find()) {
// int.cloud.talend.com
authority = match.group(0);
URL apiURL = new URL(url.getProtocol(), PREFIX_API + "." + authority, "");
// https://api.int.cloud.talend.com
apiBaseUrl = apiURL.toString();
} else {
throw new Exception("Can't match pendo url from " + adminUrl);
}
} catch (MalformedURLException e) {
throw new Exception("Invalid url " + adminUrl, e.getCause());
}
return apiBaseUrl;
}
private String getToken() {
return getRepositoryContext().getClearPassword();
}
public String getTmcUser(String url, String token) {
try {
String pendoInfo = getPendoInfo(getBaseUrl(url, true), token);
if (StringUtils.isNotBlank(pendoInfo)) {
JSONObject infoJson = new JSONObject(pendoInfo);
return ((JSONObject) infoJson.get("visitor")).getString("id"); //$NON-NLS-1$ //$NON-NLS-2$
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return ""; //$NON-NLS-1$
}
private String getPendoKeyFromLicense() throws Exception {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
IRemoteService service = GlobalServiceRegister.getDefault().getService(IRemoteService.class);
return service.getPendoKeyFromLicense();
}
return null;
}
private static RepositoryContext getRepositoryContext() {
RepositoryContext repositoryContext = (RepositoryContext) CoreRuntimePlugin.getInstance().getContext()
.getProperty(Context.REPOSITORY_CONTEXT_KEY);
return repositoryContext;
}
public void setAdminUrl(String adminUrl) {
PendoTrackSender.adminUrl = adminUrl;
}
public void setApiBaseUrl(String apiBaseUrl) {
PendoTrackSender.apiBaseUrl = apiBaseUrl;
}
}

View File

@@ -0,0 +1,79 @@
// ============================================================================
//
// 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;
/**
* DOC jding class global comment. Detailled comment
*/
public enum TrackEvent {
/**
* create by TUP-33421 update by TUP-34791, TUP-35523, TUP-36780
*/
PROJECT_LOGIN("Project Login"),
/**
* create by TUP-33990
*/
IMPORT_API_DEF("Import API Definition"),
/**
* create by TUP-33990
*/
UPDATE_API_DEF("Update API Definition"),
/**
* create by TUP-33990
*/
USE_API_DEF("Use API Definition"),
/**
* create by TUP-33990
*/
OPEN_IN_APIDesigner("Open in API Designer"),
/**
* create by TUP-33990
*/
OPEN_IN_APITester("Open in API Tester"),
/**
* create by TUP-33990
*/
OPEN_API_DOCUMENTATION("Open API Documentation"),
/**
* create by TUP-35644
*/
AUTOMAP("tMap Automap"),
/**
* create by TUP-35644 update by TUP-36710
*/
TMAP("tMap"),
/**
* create by TUP-35712 update by TUP-36893
*/
ITEM_IMPORT("Import items"),
/**
* create by TUP-35712
*/
ITEM_SIGNATURE("Item Signature");
private String event;
TrackEvent(String event) {
this.event = event;
}
public String getEvent() {
return event;
}
}

View File

@@ -12,8 +12,9 @@
// ============================================================================
package org.talend.core.pendo.mapper;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.AbstractPendoTrackManager;
import org.talend.core.pendo.TrackEvent;
import org.talend.core.pendo.properties.IPendoDataProperties;
import org.talend.core.pendo.properties.PendoAutoMapProperties;
/**
@@ -21,7 +22,7 @@ import org.talend.core.pendo.properties.PendoAutoMapProperties;
*
* DOC jding class global comment. Detailled comment
*/
public class PendoAutoMapManager {
public class PendoAutoMapManager extends AbstractPendoTrackManager {
private int mappingChangeCount = 0;
@@ -45,9 +46,18 @@ public class PendoAutoMapManager {
if (mappingChangeCount < 1) {
return;
}
PendoAutoMapProperties properties = new PendoAutoMapProperties();
properties.setAutoMappings(mappingChangeCount);
PendoTrackSender.getInstance().sendToPendo(TrackEvent.AUTOMAP, properties);
super.sendTrackToPendo();
}
@Override
public TrackEvent getTrackEvent() {
return TrackEvent.AUTOMAP;
}
@Override
public IPendoDataProperties collectProperties() {
PendoAutoMapProperties properties = new PendoAutoMapProperties();
properties.setAutoMappings(mappingChangeCount);
return properties;
}
}

View File

@@ -1,171 +0,0 @@
// ============================================================================
//
// 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 PendoLoginProperties implements IPendoDataProperties {
@JsonProperty("studio_version")
private String studioVersion;
@JsonProperty("studio_patch")
private String studioPatch;
@JsonProperty("enabled_features")
private List<String> enabledFeatures;
@JsonProperty("referenced_project_number")
private String refProjectCount;
@JsonProperty("referenced_projects")
private List<String> refProjectList;
@JsonProperty("one_click_login")
private String isOneClickLogin;
@JsonProperty("managed_update")
private String managedUpdate;
/**
* Getter for studio_version.
*
* @return the studio_version
*/
public String getStudioVersion() {
return studioVersion;
}
/**
* Sets the studio_version.
*
* @param studio_version the studio_version to set
*/
public void setStudioVersion(String studioVersion) {
this.studioVersion = studioVersion;
}
/**
* Getter for studio_patch.
*
* @return the studio_patch
*/
public String getStudioPatch() {
return studioPatch;
}
/**
* Sets the studio_patch.
*
* @param studio_patch the studio_patch to set
*/
public void setStudioPatch(String studioPatch) {
this.studioPatch = studioPatch;
}
/**
* Getter for enabled_features.
*
* @return the enabled_features
*/
public List<String> getEnabledFeatures() {
return enabledFeatures;
}
/**
* Sets the enabled_features.
*
* @param enabled_features the enabled_features to set
*/
public void setEnabledFeatures(List<String> enabledFeatures) {
this.enabledFeatures = enabledFeatures;
}
/**
* Getter for refProjectCount.
*
* @return the refProjectCount
*/
public String getRefProjectCount() {
return refProjectCount;
}
/**
* Sets the refProjectCount.
*
* @param refProjectCount the refProjectCount to set
*/
public void setRefProjectCount(String refProjectCount) {
this.refProjectCount = refProjectCount;
}
/**
* Getter for refProjectList.
*
* @return the refProjectList
*/
public List<String> getRefProjectList() {
return refProjectList;
}
/**
* Sets the refProjectList.
*
* @param refProjectList the refProjectList to set
*/
public void setRefProjectList(List<String> refProjectList) {
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

@@ -203,4 +203,12 @@ public interface ITalendCorePrefConstants {
public static final boolean NEXUS_SHARE_LIBS_DEFAULT = false;
public static final String PERSPECTIVE_PERSIST_SCOPE = "PERSPECTIVE_PERSIST_SCOPE"; //$NON-NLS-1$
public static final String PERSPECTIVE_PERSIST_SCOPE_PROJECT_AND_BRANCH = "PROJECT_AND_BRANCH"; //$NON-NLS-1$
public static final String PERSPECTIVE_PERSIST_SCOPE_STUDIO = "STUDIO"; //$NON-NLS-1$
public static final String PERSPECTIVE_PERSIST_SCOPE_DEFAULT = PERSPECTIVE_PERSIST_SCOPE_PROJECT_AND_BRANCH;
}

View File

@@ -655,4 +655,9 @@ ItemAnalysisReportManager.Warning.message=Can't run a new analysis now. Wait for
AnalysisReportAccessDialog.shellTitle=Project analysis
AnalysisReportAccessDialog.generateSuccess=Project analysis completed successfully.
AnalysisReportAccessDialog.completeReportAvailable=Check the report
AnalysisReportAccessDialog.accessReport=here
AnalysisReportAccessDialog.accessReport=here
AbstractPomTemplateProjectSettingPage.defaultTabLabel=Default
AbstractPomTemplateProjectSettingPage.customTabLabel=Custom
AbstractPomTemplateProjectSettingPage.previewButton=Preview
AbstractPomTemplateProjectSettingPage.previewButtonTip=Preview the complete customized project POM settings.
AbstractPomTemplateProjectSettingPage.learnMoreLink=Learn more

View File

@@ -620,7 +620,7 @@ ProgressMonitorDialogWithCancel.executeTimeout=Suspension de l'ex\u00E9cution, l
ProgressMonitorDialogWithCancel.CheckingConnectionJob.waitingFinish=en attente de la fin de {0}...
ProgressMonitorDialogWithCancel.CheckingConnectionJob.emptyWaitingfinish=en attente de la fin...
OverTimePopupDialogTask.title=Ex\u00E9cution...
OverTimePopupDialogTask.message=T\u00E2che d'ex\u00E9cution en arri\u00E8re plan, patientez...
OverTimePopupDialogTask.message=T\u00E2che d'ex\u00E9cution en arri\u00E8re-plan, patientez...
OverTimePopupDialogTask.executeTimeout=Suspension de l'ex\u00E9cution, le Studio a essay\u00E9 d'interrompre la v\u00E9rification en t\u00E2che de fond.
OverTimePopupDialogTask.killed=Ex\u00E9cution arr\u00EAt\u00E9e
OverTimePopupDialogTask.waitingFinishMessage.default=Interruption impossible de la t\u00E2che en fond,\n
@@ -656,3 +656,7 @@ AnalysisReportAccessDialog.shellTitle=Analyse du projet
AnalysisReportAccessDialog.generateSuccess=Analyse du projet termin\u00E9e.
AnalysisReportAccessDialog.completeReportAvailable=Consulter le rapport
AnalysisReportAccessDialog.accessReport=ici
AbstractPomTemplateProjectSettingPage.defaultTabLabel=Par d\u00E9faut
AbstractPomTemplateProjectSettingPage.customTabLabel=Personnalis\u00E9
AbstractPomTemplateProjectSettingPage.previewButton=Aper\u00E7u
AbstractPomTemplateProjectSettingPage.learnMoreLink=En savoir plus

View File

@@ -281,7 +281,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
PropertiesWizardPage.Description=\u8AAC\u660E
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
PropertiesWizardPage.Name=\u540D\u524D
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
@@ -637,8 +637,8 @@ DynamicPlugin.addExtension.empty=ExtensionPoint\u307E\u305F\u306FID\u304C\u7A7A\
BigDataBasicUtil.loadDynamicDistribution.IDynamicDistributionManager.notFound={0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
TalendLibsServerManager.connectUserLibraryFailureMessage=\u7BA1\u7406\u8005\u30E2\u30FC\u30C9\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u30E6\u30FC\u30B6\u30FC\u30E9\u30A4\u30D6\u30E9\u30EA\u30FC\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304C\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002{0}\u3078\u306E\u63A5\u7D9A\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F
TalendLibsServerManager.cannotGetUserLibraryServer=\u30EA\u30E2\u30FC\u30C8\u7BA1\u7406\u8005\u304B\u3089\u30E6\u30FC\u30B6\u30FC\u30E9\u30A4\u30D6\u30E9\u30EA\u30FC\u30B5\u30FC\u30D0\u30FC\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093
MigrationReportAccessDialog.title=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30A2\u30A4\u30C6\u30E0\u3092\u79FB\u884C
MigrationReportAccessDialog.migrateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30A2\u30A4\u30C6\u30E0\u304C\u6B63\u3057\u304F\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002
MigrationReportAccessDialog.title=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u3092\u79FB\u884C
MigrationReportAccessDialog.migrateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u304C\u6B63\u3057\u304F\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002
MigrationReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
MigrationReportAccessDialog.accessReport=\u3053\u3061\u3089
MigrationReportAccessDialog.provideAnalysisTool=\u4ECA\u3059\u3050\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u3092\u5B9F\u884C\u3057\u3066\u3001\u79FB\u884C\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u5206\u6790\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u8A66\u9A13\u7684\u306A\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u3001\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u308B\u30EC\u30DD\u30FC\u30C8\u304C\u751F\u6210\u3055\u308C\u307E\u3059:
@@ -656,3 +656,7 @@ AnalysisReportAccessDialog.shellTitle=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206
AnalysisReportAccessDialog.generateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u304C\u6B63\u3057\u304F\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
AnalysisReportAccessDialog.accessReport=\u3053\u3061\u3089
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u30C7\u30D5\u30A9\u30EB\u30C8
AbstractPomTemplateProjectSettingPage.customTabLabel=\u30AB\u30B9\u30BF\u30E0
AbstractPomTemplateProjectSettingPage.previewButton=\u30D7\u30EC\u30D3\u30E5\u30FC
AbstractPomTemplateProjectSettingPage.learnMoreLink=\u8A73\u7D30

View File

@@ -656,3 +656,7 @@ AnalysisReportAccessDialog.shellTitle=\u5DE5\u7A0B\u5206\u6790
AnalysisReportAccessDialog.generateSuccess=\u5DE5\u7A0B\u5206\u6790\u6210\u529F\u5B8C\u6210\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
AnalysisReportAccessDialog.accessReport=\u6B64\u5904
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u9ED8\u8BA4
AbstractPomTemplateProjectSettingPage.customTabLabel=\u81EA\u5B9A\u4E49
AbstractPomTemplateProjectSettingPage.previewButton=\u9884\u89C8
AbstractPomTemplateProjectSettingPage.learnMoreLink=\u4E86\u89E3\u66F4\u591A

View File

@@ -41,6 +41,8 @@ public interface MavenConstants {
static final String DEFAULT_VERSION = "6.0.0";
static final String SNAPSHOT = "-SNAPSHOT";
static final String DOT_SNAPSHOT = ".SNAPSHOT";
static final String POM_FILTER = "POM_FILTER";

View File

@@ -0,0 +1,183 @@
// ============================================================================
//
// 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.runtime.projectsetting;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.i18n.Messages;
import org.talend.repository.model.IProxyRepositoryFactory;
public abstract class AbstractPomTemplateProjectSettingPage extends AbstractProjectSettingPage {
private static final Color COLOR_LINK = new Color(null, 0, 0, 255);
protected StyledText defaultText;
protected StyledText customText;
private boolean isDefaultPresentedForScriptTxt = false;
private boolean readonly;
public AbstractPomTemplateProjectSettingPage() {
super();
IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
readonly = factory.isUserReadOnlyOnCurrentProject();
}
protected boolean isReadonly() {
return readonly;
}
public void setReadonly(boolean readonly) {
this.readonly = readonly;
}
protected abstract String getPreferenceKey();
protected StyledText getScriptTxt() {
return customText;
}
@Override
protected Control createContents(Composite p) {
Composite parent = (Composite) super.createContents(p);
Composite noteComposite = new Composite(parent, SWT.NONE);
noteComposite.setLayout(new GridLayout(2, false));
Label scriptLabel = new Label(noteComposite, SWT.NONE);
String headerMessages = getHeaderMessage();
scriptLabel.setText(headerMessages);
Hyperlink link = new Hyperlink(noteComposite, SWT.NONE);
link.setText(Messages.getString("AbstractPomTemplateProjectSettingPage.learnMoreLink")); //$NON-NLS-1$
link.setUnderlined(true);
link.setForeground(COLOR_LINK);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
Program.launch(getMoreInfoUrl());
}
});
CTabFolder tabFolder = new CTabFolder(parent, SWT.BORDER);
// tabFolder.setTabPosition(SWT.BOTTOM);
tabFolder.setSimple(false);
GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
tabFolder.setLayoutData(data);
data.heightHint = 280;
data.minimumHeight = 280;
data.widthHint = 500;
data.minimumWidth = 500;
CTabItem defaultTabItem = new CTabItem(tabFolder, SWT.NULL);
defaultTabItem.setText(Messages.getString("AbstractPomTemplateProjectSettingPage.defaultTabLabel")); //$NON-NLS-1$
CTabItem customTabItem = new CTabItem(tabFolder, SWT.NULL);
customTabItem.setText(Messages.getString("AbstractPomTemplateProjectSettingPage.customTabLabel")); //$NON-NLS-1$
tabFolder.setSelection(defaultTabItem);
int style = SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
defaultText = new StyledText(tabFolder, style);
defaultText.setText(getDefaultText());
defaultText.setBackground(new Color(null, 233, 233, 233));
defaultText.setEditable(false);
defaultTabItem.setControl(defaultText);
customText = new StyledText(tabFolder, style);
customText.setText(getCustomText());
customText.setEditable(!isReadonly());
customTabItem.setControl(customText);
customText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
isDefaultPresentedForScriptTxt = false;
}
});
Button preview = new Button(parent, SWT.NONE);
preview.setText(Messages.getString("AbstractPomTemplateProjectSettingPage.previewButton")); //$NON-NLS-1$
preview.setToolTipText(Messages.getString("AbstractPomTemplateProjectSettingPage.previewButtonTip")); //$NON-NLS-1$
preview.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
checkModel(true);
}
});
return parent;
}
protected abstract String getHeaderMessage();
protected abstract String getDefaultText();
protected String getCustomText() {
return getPreferenceStore().getString(getPreferenceKey());
}
protected abstract boolean checkModel(boolean preview);
protected abstract String getMoreInfoUrl();
@Override
protected void performDefaults() {
super.performDefaults();
if (customText != null && !customText.isDisposed()) {
isDefaultPresentedForScriptTxt = true;
customText.setText(getPreferenceStore().getDefaultString(getPreferenceKey()));
}
}
@Override
public boolean performOk() {
boolean ok = super.performOk();
if (customText != null && !customText.isDisposed()) {
if (isDefaultPresentedForScriptTxt) {
getPreferenceStore().setToDefault(getPreferenceKey());
return ok;
}
if (!checkModel(false)) {
return false;
}
getPreferenceStore().setValue(getPreferenceKey(), customText.getText());
}
return ok;
}
}

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