Compare commits

...

351 Commits

Author SHA1 Message Date
Jill Yan
d9691eb405 Jill/r731/appint-35965 (#6510)
* APPINT-35965 downgrade plexus-io

* APPINT-35965 downgrade plexus-io
2023-10-27 18:08:01 +08:00
sbliu
46bb67ab7e add dependency to new version guava for maven-assembly-plugin plugin (#6501) 2023-10-26 14:35:09 +08:00
sbliu
22891b2e99 fix missing guava in junit (#6498) 2023-10-25 17:43:48 +08:00
jiezhang-tlnd
4b208e9fe4 fix junit (#6496) 2023-10-25 12:08:07 +08:00
sbliu
2387b83d0f fix(TUP-40275) upgrade guava to 32.0.1-jre (#6398)
* fix(TUP-40275) upgrade guava to 32.0.1-jre

* revert some changes
2023-10-24 10:09:45 +08:00
Jane Ding
aec62af46c fix(TUP-40439):In the ".sysConfig" of "support logs" that gather (#6451)
* fix(TUP-40439):In the ".sysConfig" of "support logs" that gather
"nexus.password" value is plain text
https://jira.talendforge.org/browse/TUP-40439

* fix(TUP-40439):In the ".sysConfig" of "support logs" that gather
"nexus.password" value is plain text
https://jira.talendforge.org/browse/TUP-40439
2023-10-20 11:29:32 +08:00
apoltavtsev
34a0e52678 APPINT-35122: Incorrect routelet module inside root pom is corrected (#6457) 2023-10-11 16:16:13 +02:00
apoltavtsev
274bfb2d40 APPINT-35949: [731] Compile error for CI+route+routelet (#6450)
* APPINT-35949: [731] Compile error for CI+route+routelet

* Update SyncChildrenSourceCodeProvider.java

* Update SyncChildrenTestReportsProvider.java

* Update SyncChildrenContextsResourcesProvider.java

* Update SyncChildrenSourceCodeProvider.java

* Update SyncChildrenContextsResourcesProvider.java

* Update SyncChildrenSourceCodeProvider.java

* Update SyncChildrenTestReportsProvider.java
2023-10-09 17:28:42 +02:00
apoltavtsev
984814d620 APPINT-35418: Refer to wrong route in blueprint.xml when two routes use same routelet and deploy by CI (#6433) 2023-10-05 16:06:31 +02:00
Fabien Désiles
bbc6e17412 chore(TDI-50354): Bump Connectors 1.27.26 in Studio 7.3 (#6438)
https://jira.talendforge.org/browse/TDI-50354
2023-10-02 17:35:54 +02:00
zyuan-talend
6665603efc fix(TUP-39924): upgrade org.codehaus.plexus:plexus-archiver to 4.8.0,plexus-io to 3.4.1 , maven-assembly-plugin to 3.6.0 and plexus-util to 4.0.0 for incompatibility.. (#6356)
* fix(TUP-39924): upgrade org.codehaus.plexus:plexus-archiver to 4.8.0,
plexus-io to 3.4.1 , maven-assembly-plugin to 3.6.0 and plexus-util to
4.0.0 for incompatibility.

* fix(TUP-39924): plexus-archiver:3.6.0/4.2.0/4.2.1/4.2.2 |
CVE-2023-37460.
2023-09-21 16:30:44 +08:00
Emmanuel GALLOIS
ae1b013c5f feat(TDI-50266): bump component-runtime to 1.38.11 (#6409) 2023-09-20 10:54:58 +02:00
Emmanuel GALLOIS
8b0ea868e9 feat(TDI-48822): bump component-runtime to 1.38.10 (#6381) 2023-09-12 10:59:26 +02:00
pyzhou
1a24f07710 fix(TDI-50189) Upgrade tck in studio 7.3 (#6359) 2023-08-16 14:58:20 +08:00
jiezhang-tlnd
43cdc97d1e fix junit (#6331)
* fix junit

* fix junit
2023-07-31 23:13:08 +08:00
jiezhang-tlnd
f1c40a3920 fix auto test (#6319) 2023-07-26 16:12:30 +08:00
jiezhang-tlnd
b47a7b2067 chore(TUP-39647)CVE-2017-1000487,plexus-utils-3.0.8 (#6305)
* chore(TUP-39647)CVE-2017-1000487,plexus-utils-3.0.8
https://jira.talendforge.org/browse/TUP-39647

* update to 2.22.2

* add surefire-api and surefire-booter

* keep 2.12.4

* update to 2.22.2

* update m2 from plugin

* code format

* code format

* rename pom

* code format

* add resouce module

* change to tos

* add repository

* remvoe resourse folder

* remove source folder

* install dependency

* code format

* code format
2023-07-24 16:26:44 +08:00
zyuan-talend
7c8614b4ac fix(TUP-39467): CVE-2022-29599,maven-shared-utils:0.9.0. (#6272) 2023-06-29 14:38:41 +08:00
jzhao
baacc284fd chore(TDI-49988):bump TCK connector 1.27.24 for R2023-07 (#6263) 2023-06-25 19:22:28 +08:00
sbliu
9d0fdc4532 chore(TUP-39233) upgrade json-smart, accessors-smart to 2.4.11 (#6217) 2023-06-20 16:19:35 +08:00
Zhiwei Xue
f3ad09604f fix(TUP-38235):Job in a project that references other projects load very (#6240)
slowly in Studio
2023-06-20 09:47:52 +08:00
jzhao
4615ebdb75 chore(TDI-49841):bump TCK connector 1.27.23 for R2023-06 (#6198) 2023-05-22 11:37:34 +08:00
msjian
5616d65272 fix(TDQ-21121): upgrade snowflake connection driver (#6141) 2023-05-11 15:09:00 +08:00
Abdulhamid Rashankar
ca85dd4b73 APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage (#6159) 2023-05-02 14:07:02 +02:00
sbliu
11d3c32066 chore(TUP-38551) json-smart:2.4.7 ( CVE-2023-1370) (#6097)
* 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:20 +08:00
wang wei
a866707aae fix(TDI-49452): CVE-2022-45143,org.apache.tomcat:tomcat-catalina:9.0.68 (#6122) 2023-04-24 15:35:21 +08:00
wang wei
53e052989f fix(TDI-49546): CVE-2022-45688, org.json:json:(<=20220924) (#6065) 2023-04-24 14:08:06 +08:00
jzhao
f52c747409 chore(TDI-49727):Bump TCK connector 1.27.22 for R2023-05 (#6139) 2023-04-23 12:04:10 +08:00
Zhiwei Xue
6d36ff79bb fix(TUP-38316):[801 CI/CD] Duplicate Parameter error in the artifact and (#6081)
creating the task
2023-04-20 18:33:36 +08:00
Jane Ding
c362aa776c fix(TUP-37227):Issue building when items names too long (#6067)
https://jira.talendforge.org/browse/TUP-37227
2023-03-30 18:15:46 +08:00
vyu-talend
318724d32c chore(TDI-49458):bump file enhanced. (#6077) 2023-03-30 16:21:46 +08:00
Oleksandr Zhelezniak
4b377af1aa chore(TDI-49600): bump connectors 1.27.21 2023-03-24 15:09:35 +02:00
Jane Ding
695dcba405 Revert "fix(TUP-37227):Issue building when items names too long (#5941)" (#6019)
This reverts commit 8d3832fdfb.
2023-03-02 09:44:55 +08:00
jiezhang-tlnd
4dc7e4e82f fix(TUP-37874)SQL inject risk (#6009) 2023-02-23 15:13:01 +08:00
jiezhang-tlnd
4c819add92 fix(TUP-37874)SQL inject risk (#5970)
* fix(TUP-37874)SQL inject risk

* SQL inject risk
2023-02-22 18:18:23 +08:00
zyuan-talend
9c0f5e966d fix(TUP-35060): tWarn does not show the TalendDate.TO_CHAR method. (#5969) 2023-02-21 17:45:05 +08:00
Oleksandr Zhelezniak
da5b7979fd chore(TDI-49419): bump connectors 1.27.20 2023-02-16 17:14:14 +02:00
Jane Ding
8d3832fdfb fix(TUP-37227):Issue building when items names too long (#5941)
* 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
2023-02-15 18:01:04 +08:00
bhe-talendbj
cd8ff90b5b fix(TUP-37920): fix sqllite retrieve tables (#5960) 2023-02-06 17:23:42 +08:00
bhe-talendbj
d98e5ea43c fix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5948)
* fix(TUP-37425): fix retrieve schema

* fix(TUP-37425): check NPE
2023-01-30 19:38:12 +08:00
AlixMetivier
13b57c8823 fix(TBD-14720): fix hadoop conf jar not found with context metadata (#5932) 2023-01-18 09:30:58 +01:00
bhe-talendbj
0436bc8dd2 chore: fix junit exe resolve (#5936) (#5939)
* chore: fix exe resolve

* chore: revert unnecessay changes

* chore: remove exe dependency test
2023-01-17 18:04:28 +08:00
pyzhou
091de02e75 fix(TDI-49256) Upgrade tck in studio 7.3 (#5933) 2023-01-16 21:21:40 +08:00
bhe-talendbj
eb84dfe75d bugfix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5929)
* fix(TUP-37425): retrieve table comment once

* fix(TUP-37425): add busy indicator

* fix(TUP-37425): fix UI responsiveness
2023-01-16 19:26:41 +08:00
bhe-talendbj
a7dd89cc3a fix(TUP-37723): Patch Installation: Need restart to generate correct jar version in pom after new patch has been installed (#5914)
* fix(TUP-37723): do not load dropped extensions

* fix(TUP-37723): fix dependencies
2023-01-16 11:19:55 +08:00
pyzhou
211abcac09 fix(TDI-49150) Upgrade tck in studio 7.3 (#5901) 2022-12-30 15:09:18 +08:00
jiezhang-tlnd
089f43ccd4 chore(TUP-37524)CVE-2022-46364,org.apache.cxf:cxf-core:3.4.4,3.5.2 (#5877) 2022-12-29 11:09:38 +08:00
Jane Ding
d008463ef1 fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as (#5882)
* 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:40:50 +08:00
wang wei
d7ed643621 fix(TDI-48822): Bump component-runtime to 1.38.8 in Studio 7.3.1 (#5896) 2022-12-28 13:58:56 +08:00
pyzhou
0972593afd fix(TDI-49113) Upgrade tck in studio 7.3 (#5894) 2022-12-26 16:22:24 +08:00
pyzhou
c50c5c2e46 fix(TDI-49004): backport tmap java17 7.3
* fix(TDI-46572): tMap support Java17 (#4659)

* fix(TDI-46572):add jboss dependency to routines

* add to .m2

* fix(TDI-46572):advancedPersistentLookup lib upgrade

* replace advancedPersistentLookupLib jar

* change name

* format

* upgrade jar

* add back dependency

* remove LGPL dependency

* Remove binary jar and copy during build

* fix NPE

* test remove jboss from build
# Conflicts:
#	main/plugins/org.talend.libraries.persist.lookup/META-INF/MANIFEST.MF
#	main/plugins/org.talend.librariesmanager/META-INF/MANIFEST.MF
#	main/plugins/org.talend.librariesmanager/build.properties

* fix(TDI-46923):add back jboss marshalling (#4711)

# Conflicts:
#	main/plugins/org.talend.designer.maven.tos/resources/build/pom.xml

* fix(TDI-46937): fix tmap tuj (#4723)

* fix(TDI-46937): fix tmap tuj

* fix(TDI-46937):fix tuj

* fix(TDI-47147):tMap TUJ fix (#4817)

* Revert "fix(TDI-46937): fix tmap tuj (#4723)"

This reverts commit aacc14f92b.

* delete middle version
2022-12-26 14:38:14 +08:00
Jane Ding
0b7b156f22 Revert "fix(TUP-37227):Issue building when items names too long (#5837)" (#5890)
This reverts commit 30aa2d25a6.
2022-12-23 11:43:03 +08:00
Jane Ding
30aa2d25a6 fix(TUP-37227):Issue building when items names too long (#5837)
* 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:00:44 +08:00
jzhao
6a813e2a73 chore(TDI-48946):Bump TCK connector 1.27.16 for 7.3.1-R2022-12 (#5839) 2022-11-28 16:33:54 +08:00
Chao MENG
4b7a59b497 fix(TUP-37228): Studio errors when attempting to create a Cloudera Dynamic Distro when repository.apache.org port 80 is blocked (#5823)
* 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:33 +08:00
Jane Ding
d5490d2663 fix(TUP-36933):[7.3.1] import dependencies is not working when we do a copy from brunch (#5794)
* 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

Conflicts:
	main/plugins/org.talend.repository.items.importexport.ui/src/main/java/org/talend/repository/items/importexport/ui/wizard/imports/ImportItemsWizardPage.java

* 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

Conflicts:
	main/plugins/org.talend.repository.items.importexport.ui/src/main/java/org/talend/repository/items/importexport/ui/wizard/imports/ImportItemsWizardPage.java

* 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:29 +08:00
zyuan-talend
fbfc3735ad fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1. (#5809) 2022-11-17 15:30:45 +08:00
zyuan-talend
76fbd6fd32 fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1. (#5766) (#5797) 2022-11-15 16:14:56 +08:00
sbliu
43ef7fa5e0 chore(TUP-36964) upgrade commons-text to 1.10.0 (#5770) 2022-11-09 14:39:39 +08:00
pyzhou
be28a0d122 fix(48799) Upgrade tck in studio 7.3 (#5771) 2022-11-03 23:13:04 +08:00
sbliu
e44522bb69 feat(TUP-35340) fix ui problem of show checkbox (#5755) 2022-10-31 16:59:10 +08:00
sbliu
67f04b7db3 feat(TUP-36340) oracle add support of orai18n.jar (#5703) 2022-10-31 16:04:37 +08:00
pyzhou
2502688e64 Pyzhou/tdi 48676 resume util oom 7.3 (#5742)
* fix(TDI-48676):ResumeUtil OOM

* replace duplicate variable
2022-10-27 14:51:53 +08:00
sbliu
6175aca630 chore(TUP-36930) upgrade jackson-databind to 2.13.4.2 (#5724)
upgrade jackson-databind to 2.13.4.2, jackson-core/jackson-annotations to 2.13.4
2022-10-27 11:06:25 +08:00
zyuan-talend
55f7531d68 fix(TUP-36820):Improve performance of importing large size metadata file (#5677)
xml.
2022-10-24 16:01:24 +08:00
Svitlana Anulich
d6c888e235 fix(TBD-14194): add knox session timeout variable (#5685) (#5718) 2022-10-24 10:24:32 +03:00
Svitlana Anulich
7db18b198f fix(TBD-14328): ClassNotFoundException when check service for CDP 7.x knox (#5715) 2022-10-24 10:20:15 +03:00
pyzhou
039ed90481 fix(TDI-48746) Upgrade tck in studio 7.3 (#5737) 2022-10-24 13:05:33 +08:00
apoltavtsev
eea9c85609 fix(APPINT-35054) Build type for child Jobs is corrected (#5675) 2022-10-10 11:54:35 +02:00
Jane Ding
ca9d09e04e fix(APPINT-35054) Add optional mechanism to align project models (#5671)
BUILD_TYPE
https://jira.talendforge.org/browse/APPINT-35054
2022-10-09 16:19:37 +08:00
jiezhang-tlnd
b5dadab5a5 chore(TUP-36715)CVE: xerces:xercesImpl:2.12.0 (#5609) 2022-10-08 11:07:28 +08:00
apoltavtsev
2add3ffc0e fix(APPINT-35054) Add optional mechanism to align project models BUILD_TYPE (#5661)
* Add files via upload

* Update MavenProjectSettingPage.java

* Update messages.properties

* Add files via upload

* Update MANIFEST.MF

* Update CorrectBuildTypeForRoutesMigrationTask.java

* Update CorrectBuildTypeForRoutesMigrationTask.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update CorrectBuildTypeForDsRestMigrationTask.java

* Update CorrectBuildTypeForRoutesMigrationTask.java

* Update CorrectBuildTypeForSOAPServiceJobMigrationTask.java

* Update BuildTypeManager.java

* Update MavenProjectSettingPage.java

* Update MavenProjectSettingPage.java

* Add files via upload

* Update MavenProjectSettingPage.java

* Update BuildTypeManager.java

* Update AbstractCorrectBuildItemMigrationTask.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update CorrectBuildTypeForDsRestMigrationTask.java

* Update CorrectBuildTypeForRoutesMigrationTask.java

* Update CorrectBuildTypeForSOAPServiceJobMigrationTask.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update BuildTypeManager.java

* Update BuildTypeManager.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update AbstractCorrectBuildItemMigrationTask.java

* Update CorrectBuildTypeForDIJobMigrationTask.java

* Update CorrectBuildTypeForDsRestMigrationTask.java

* Update CorrectBuildTypeForRoutesMigrationTask.java

* Update CorrectBuildTypeForSOAPServiceJobMigrationTask.java
2022-10-07 09:43:15 +02:00
pyzhou
38b02ee746 fix(TDI-48597) Upgrade tck in studio 7.3 (#5644) 2022-09-26 23:38:59 +08:00
jiezhang-tlnd
d8daf75329 fix(TUP-36674)align the version of com.google.code.gson:gson with (#5601)
component to be 2.8.9 for mssql metadata part
2022-09-23 15:14:42 +08:00
Liu Xinquan
555a722ade fix(TDQ-20610) org.apache.lucene:lucene-core (#5569) (#5570) 2022-09-06 17:20:00 +08:00
hzhao
8a003e1a21 fix(TUP-36593): Nexus proxy password is stored in clear text in project (#5563) 2022-09-02 16:54:57 +08:00
Oleksandr Zhelezniak
ce75b33a11 fix(TDI-48431): synchronize flush resumeutil (#5553) 2022-09-01 10:07:47 +03:00
hcyi
72fe8689bd fix(TUP-36483):Code generation fails with xmlmap. (#5548) 2022-08-30 17:57:31 +08:00
sbliu
f71f9c03ed chore(TUP-36502) upgrade org.postgresql:postgresql:42.2.25 to 42.2.26 (#5546) 2022-08-29 16:37:26 +08:00
Joe
7063b514ff fix(TUP-36341): add needExportItemsForDQ=false for reset (#5533) 2022-08-28 15:13:05 +08:00
jiezhang-tlnd
ee60d35aba chore(TUP-36397)CVE commons-collections commons-collections 3.1 (#5539) 2022-08-17 16:35:34 +08:00
jzhao
93db6863a8 chore(TDI-48330): update tck connectors to 1.27.12 (#5530) 2022-08-08 17:20:59 +08:00
wang wei
680031d91f fix(TDI-48203): fix for microservice case (#5526) 2022-08-05 14:52:09 +08:00
jiezhang-tlnd
e779dfec2d chore(TUP-36127)Upgrade commons-configuration to 2.8.0 (#5472)
* chore(TUP-36127)Upgrade commons-configuration to 2.8.0

* move commons-configuration-1.6 to commons-configuration2-2.8.0

* chore(TUP-36127)update in feature
2022-07-28 10:34:43 +08:00
wang wei
e16c7e1af3 fix(TDI-48203): [CVE]: routines.system.JSONObject(Object bean) use reflect to call method invoke, that's dangerous for evil script inject (#5426) 2022-07-27 09:37:32 +08:00
Zhiwei Xue
55aa8236ba fix(TUP-18979):Migration tasks including mapping files (#5452)
* fix(TUP-18979):Migration tasks including mapping files

* fix(TUP-18979):Fix UI import issue (#5457)

* fix(TUP-18979):fix sync mapping file error of job project (#5471)

* fix(TUP-18979):fix junit failure
2022-07-22 16:52:09 +08:00
pyzhou
e381b2f237 fix(TDI-48024): ResumeUtil performance issue (#5458)
* fix(TDI-48024): ResumeUtil performance issue

* NPE
2022-07-19 12:03:07 +08:00
jiezhang-tlnd
44b7aee6d0 add maven-shared-utils.3.3.3 to project templatle (#5467) 2022-07-18 08:53:45 +08:00
jiezhang-tlnd
499759ad39 chore(TUP-35938)CVE: dom4j:dom4j:1.6.1 (#5456) 2022-07-13 20:02:41 +08:00
Laurent BOURGEOIS
cf830accc0 fix(TBD-13998):Issue with Use Kerberos authentication checkbox in tImpalaConnection and tImpalaInput components (#5443) 2022-07-11 15:21:06 +02:00
jiezhang-tlnd
ae4cc4cdfd chore(TUP-35979)Adjust nimbus-jose-jwt-9.3.jar to (#5415)
nimbus-jose-jwt-9.22.jar
2022-06-30 12:08:37 +08:00
jiezhang-tlnd
909a8e4fb7 chore(TUP-35857)CVE: bsh-2.0b4.jar (#5381) 2022-06-30 09:47:42 +08:00
zyuan-talend
59d71296ce fix(TUP-31721): disable the warning in CI mode. (#5410) 2022-06-29 10:32:00 +08:00
bhe-talendbj
b80b862bcd chore(TUP-35849): add classifier support (#5408) (#5412) 2022-06-28 20:17:16 +08:00
Liu Xinquan
ed2b236467 fix(TDQ-20360) snowflake jdbc connection context mode issue (#5390) 2022-06-17 16:38:22 +08:00
Liu Xinquan
152a06856f fix(TDQ-20360) snowflake jdbc connection context mode issue (#5380) 2022-06-17 10:51:54 +08:00
sbliu
258be81901 chore(TUP-35708) upgrade maven-shared-utils to 3.3.3 (#5345) 2022-06-15 17:04:15 +08:00
zshen-talend
8c0bdc29bf fix(TDQ-20442):Split 'handelDQComponents()' so as to handle 2 DQ components(#5358) 2022-06-10 10:29:31 +08:00
bhe-talendbj
e09d3b98eb chore(TDI-47843): update tck connectors to 1.27.10 (#5348) 2022-06-02 19:48:00 +08:00
sbliu
774e01ef34 chore(TUP-35245) upgrade cxf to 3.4.7 (#5258)
* chore(TUP-35245) upgrade cxf to 3.4.7

* chore(TUP-35245) add package export
2022-06-02 09:30:57 +08:00
hzhao-talendbj
5dac1b510a fix(TUP-35310): after installed patch studio can only delete single (#5255) 2022-06-01 17:41:49 +08:00
sbliu
cdcba355d4 chore(TUP-35684) upgrade xmlbeans. (#5338)
* chore(TUP-35684) upgrade xmlbeans.

* chore(TUP-35684) update git ignore
2022-05-31 16:12:50 +08:00
bhe-talendbj
80d00edde3 chore(TUP-35685): upgrade database driver (#5331) 2022-05-31 11:39:00 +08:00
bhe-talendbj
b30b349b9b fix(TUP-35518): fix dropdownlist of context (#5285) 2022-05-26 16:07:19 +08:00
Zhiwei Xue
fc1c8d067b fix(TUP-31233):Routine pom is not updated after installed the required (#5313)
* fix(TUP-31233):Routine pom is not updated after installed the required
jar of user routine

* fix(TUP-31233):Routine pom is not updated after installed the required
jar of user routine
2022-05-25 18:04:53 +08:00
bhe-talendbj
b762239fa2 fix(TUP-35541): replace log4j1 by reload4j (#5291) 2022-05-13 10:38:55 +08:00
jiezhang-tlnd
13d7814fd5 fix(TUP-33047)Help links in Studio (#5259) 2022-05-09 10:38:44 +08:00
Chao MENG
bf855a7bb1 fix(TUP-35048): Job takes about 30-60 minutes to build in Studio (#5223)
* fix(TUP-35048): Job takes about 30-60 minutes to build in Studio
https://jira.talendforge.org/browse/TUP-35048

* fix(TUP-35048): Job takes about 30-60 minutes to build in Studio
https://jira.talendforge.org/browse/TUP-35048

Add junit
2022-05-05 17:28:06 +08:00
bhe-talendbj
f3b2637867 fix(TUP-34109): fix test case (#5270) 2022-05-05 11:44:01 +08:00
Emmanuel GALLOIS
e405558bd4 feat(TDI-47764): bump component-runtime to 1.38.6 (#5186) 2022-05-02 10:31:18 +02:00
Zhiwei Xue
915701e64b fix(TUP-35219):Nullpointer exception with building job on (#5262)
commandline-script mode
2022-04-29 15:00:42 +08:00
Zhiwei Xue
4038574557 fix(TUP-34109):[7.3.1] slow project export compared to studio 6.5.1 (#5203) 2022-04-29 15:00:29 +08:00
bhe-talendbj
69a2741416 feat(TUP-34987): backport (#5237) 2022-04-28 14:13:42 +08:00
bhe-talendbj
e43cc1f85b fix(TUP-28656): Run restclient job get error 'Error: Could not find or (#5190)
load main class' when using jdk11

Co-authored-by: Zhiwei Xue <zwxue@talend.com>
2022-04-26 15:39:26 +08:00
hzhao-talendbj
250ff496ba chore(TUP-35039):CVE: com.fasterxml.jackson (#5220) 2022-04-26 09:38:48 +08:00
Chao MENG
c99b037c7b chore: fix swtbot issue (#5239) 2022-04-19 11:12:46 +08:00
jiezhang-tlnd
810b694e5d add new line break (#5207) 2022-04-12 17:35:19 +08:00
jiezhang-tlnd
7e66cf70d2 remove old jar (#5196) 2022-04-08 10:36:46 +08:00
jiezhang-tlnd
0285fdc191 remove org.apache.log4j (#5189) 2022-04-07 10:44:14 +08:00
Liu Xinquan
59990aa2ca fix(TDQ-20222):Move backward 'handelDQComponents()' to avoid reset (#5176) 2022-04-06 16:13:54 +08:00
jiezhang-tlnd
2eff81da52 fix(TUP-35135)create a new plugin of org.apache.log4j (#5180)
* fix(TUP-35135)create a new plugin of org.apache.log4j

* add org.apache.log4j

* update to 1.2.19
2022-04-02 14:24:24 +08:00
wang wei
13a40cfda7 fix(TDI-47751): upgrade tcompv0 and tck connectors for studio 73 (#5171) 2022-03-30 22:32:12 +08:00
wang wei
e5ada32a75 fix(TDI-47633): CVE: Replace log4j1.x by reload4j or upgrade to log4j2 (#5145) 2022-03-30 18:26:44 +08:00
Zhiwei Xue
cdfd2170ba fix(TUP-35133):Run a job with subjob failed after applied a patch with (#5165)
new version of CI-Builder
2022-03-30 17:40:34 +08:00
jiezhang-tlnd
5a7f0e8fe9 fix(TUP-34954)CVE: Replace log4j1.x by reload4j (#5143)
* fix(TUP-34954)CVE: Replace log4j1.x by reload4j

* updated in HIVE classloader

* exclude log4j from slf4j-log4j12

* replace log4j1

* replace log4j with reload4j

* update maven-repository

* remove bundle type

* remove bundle type
2022-03-30 17:37:11 +08:00
Chao MENG
cacdff8623 fix(TUP-35034): CI - stop the build if custom component is missing (#5152)
* fix(TUP-35034): CI - stop the build if custom component is missing
https://jira.talendforge.org/browse/TUP-35034

* fix(TUP-35034): CI - stop the build if custom component is missing
https://jira.talendforge.org/browse/TUP-35034
2022-03-30 16:10:42 +08:00
bhe-talendbj
e462ba015b feat(TUP-33809): Studio commandline: DetectCVE to Get list of jobs impacted by CVE jars (#5022) (#5098)
* feat(TUP-33809): add detect cve service interface

* feat(TUP-33809): merge cveitem from different distributions

* feat(TUP-33809): add project name to report

* feat(TUP-33809): add columns to report header

* feat(TUP-33809): update report columns

* feat(TUP-33809): update report and cve index column names

* feat(TUP-33809): update usedbyTalend

* feat(TUP-33809): add getproductdate and test case

* feat(TUP-33809): fix test case

* feat(TUP-33809): revert from version changes

* feat(TUP-33809): by default not include fixed is false

* feat(TUP-33809): by default include not fixed is false

* feat(TUP-33809): add cvss colum for report

* feat(TUP-33809): update column name

* feat(TUP-33809): add clone of object
2022-03-30 11:40:21 +08:00
Oleksandr Zhelezniak
8223b8f650 fix(TDI-47651): bump Redshift driver to 1.2.55.1083 (#5131) 2022-03-24 11:02:05 +02:00
kjwang
489c28c19f Fix TUP-34930 Talend Studio 7.3 font color issues (#5102)
Fix TUP-34930 Talend Studio 7.3 font color issues
https://jira.talendforge.org/browse/TUP-34930
2022-03-17 10:30:33 +08:00
Pierre Teyssier
22f764d543 workitem(TUP-34590):improve performance of import items for tuj
backport 7.3
2022-03-06 15:15:12 +08:00
Hongchun Yi
6c48bc0f4e fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes
2022-03-02 12:06:37 +08:00
Hongchun Yi
5256afcd57 fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes
2022-03-02 12:02:51 +08:00
hcyi
38f32f5d5e fix(TUP-34593):Cannot connect to Salesforce with password starting with double-quotes (#5067)
* fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes

* fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes
2022-02-25 17:52:28 +08:00
Jill Yan
43b4b220d5 Revert "APPINT-34310 (#5049)" (#5072)
This reverts commit a046c641b0.
2022-02-25 15:40:40 +08:00
jiezhang-tlnd
c476f7bfbd fix(TUP-34772)CVE: com.h2database:h2:2.0.206 (#5056) 2022-02-24 17:22:17 +08:00
sbliu
448217029f fix(TUP-34769) Error fields for Rejects get dropped from tSalesforceOutput after Sync Columns. (#5060)
fix bug TUP-33497
2022-02-23 17:56:43 +08:00
Jill Yan
a046c641b0 APPINT-34310 (#5049)
Co-authored-by: jillyan <yan955599@gmail.com>
2022-02-22 14:42:22 +08:00
Xilai Dai
982e319f9d (APPINT-33481) fix the missing jetty-all when cHttp as server for MS (#5005) 2022-02-22 10:10:26 +08:00
ypiel
48ab34ef4a fix(TDI-47477): fix ParserUtils for date (#5047) 2022-02-18 10:19:45 +01:00
Jane Ding
b52c6e53e9 fix(TUP-34401):Detect Dependencies is not working (#5033) (#5036)
https://jira.talendforge.org/browse/TUP-34401
2022-02-16 10:34:56 +08:00
sponomarova
ae6b3f729b fix(TBD-13529): java.sql.SQLException: Illegal conversion after applying latest studio patch (#5020) 2022-02-08 11:30:40 +02:00
Jane Ding
185064bf0f fix(TUP-34401):Detect Dependencies is not working (#4964)
https://jira.talendforge.org/browse/TUP-34401
2022-01-30 11:25:11 +08:00
jiezhang-tlnd
7dfd4d8e81 fix(TUP-34483)CVE org.apache.maven.shared maven-shared-utils [0.4,0.1] (#4994)
* fix(TUP-34483)CVE org.apache.maven.shared maven-shared-utils [0.4,0.1]

* fix(TUP-34483)CVE org.apache.maven.shared:maven-shared-utils:[0.4,0.1]
2022-01-30 11:04:22 +08:00
pyzhou
a561e95c43 fix(TDI-47445) Upgrade tck in studio 7.3 (#4997) 2022-01-27 16:28:48 +08:00
jiezhang-tlnd
ea0b76f84c fix(TUP-34390)Wrong file selection dialog title for Export custom (#4988)
settings in Modules view
2022-01-25 10:12:28 +08:00
sbliu
b8a08d2228 chore(TUP-34444): remove unused jar (#4976) 2022-01-24 10:08:36 +08:00
kjwang
c36ca11190 TUP-34282 CVE: log4j-core(1.2-api)-[2-2.16.0) (#4924)
TUP-34282 CVE: log4j-core(1.2-api)-[2-2.16.0)
https://jira.talendforge.org/browse/TUP-34282
2022-01-07 10:01:23 +08:00
cbadillo1603
450cf88fbb fix(TBD-12184):Password field missing for tImpalaRow (#4520)
* Revert "Revert "fix(TBD-12184):Password field missing for tImpalaRow (#4472)" (#4507)"

This reverts commit f7fb174301.

* fix(TBD-12184):Password field missing for tImpalaRow

* fix(TBD-12184):Password field missing for tImpalaRow

* fix(TBD-12184):Password field missing for tImpalaRow

* fix(TBD-12184):Password field missing for tImpalaRow
2022-01-04 11:41:06 +01:00
Zhiwei Xue
273dbaff1d workitem(TUP-34111):slow studio build time for remote execution (#4885) 2021-12-30 16:05:10 +08:00
hzhao-talendbj
6d502306dc fix(TUP-33962): Error in handling default value as NULL (#4875)
* fix(TUP-33962): Error in handling default value as NULL

* fix(TUP-33962): Error in handling default value as NULL

* fix(TUP-33962): Error in handling default value as NULL
2021-12-29 18:32:39 +08:00
jiezhang-tlnd
4f7bd39423 chore(TUP-34027)CVE jackson-mapper(core)-asl-1.9.15-TALEND (#4908) 2021-12-29 16:46:07 +08:00
ypiel
44bfd08c04 chore: bump tck 1.28.5 (#4902) 2021-12-29 11:07:02 +08:00
zyuan-talend
2237c0b071 fix(TUP-33214):complement the tree node sorting logic. (#4905) 2021-12-29 10:19:58 +08:00
Jane Ding
6c77d40d68 fix(TUP-33830):[7.3] ref project compilation error (#4833)
* fix(TUP-33830):[7.3] ref project compilation error
https://jira.talendforge.org/browse/TUP-33830

* fix(TUP-33830):[7.3] ref project compilation error
https://jira.talendforge.org/browse/TUP-33830

* fix(TUP-33830):[7.3] ref project compilation error
https://jira.talendforge.org/browse/TUP-33830

* fix(TUP-33830):[7.3] ref project compilation error
https://jira.talendforge.org/browse/TUP-33830
2021-12-29 10:15:17 +08:00
Emmanuel GALLOIS
0017db5b19 feat(TDI-47278): bump component-runtime to 1.38.4 (#4896) 2021-12-20 14:23:59 +01:00
bhe-talendbj
09adee337e fix(TUP-34105): upgrade log4j2 to 2.16.0 (#4870) (#4871) 2021-12-15 17:30:01 +08:00
bhe-talendbj
b83227af06 fix(TUP-34105): upgrade log4j2 (#4853)
* fix(TUP-34105): upgrade log4j2

* fix(TUP-34105): upgrade log4j2

* fix(TUP-34105): revert to 2.15.0
2021-12-15 10:21:56 +08:00
bhe-talendbj
16586b7bfa feat(TUP-33718): backport (#4823) 2021-12-03 11:17:57 +08:00
Jane Ding
c2ce08daeb fix(TUP-33709):"Failed to create assembly" when compile a BD job with (#4783) (#4802) (#4820)
studio commandline
https://jira.talendforge.org/browse/TUP-33709
2021-12-02 17:30:25 +08:00
kjwang
40c71f6911 TUP-33443 The method tFileInputDelimited_1_onSubJobError(Exception, (#4811)
TUP-33443 The method tFileInputDelimited_1_onSubJobError(Exception,String, Map<String,Object>) is undefined for the type xxxxx
https://jira.talendforge.org/browse/TUP-33443
2021-11-29 10:06:29 +08:00
Emmanuel GALLOIS
776c0725b6 feat(TDI-46838): bump component-runtime to 1.38 (#4648) 2021-11-25 23:45:34 +01:00
sbliu
1228c42ed9 fix(TUP-33497) Bug in tDBOutput component when linking rejects to tMap. (#4773) 2021-11-24 17:10:07 +08:00
wang wei
75df15acaa fix(TDI-46962): tAmazonAuoraOutput compilation errors (#4761) 2021-11-16 10:11:33 +08:00
jiezhang-tlnd
992ae04ae9 Jzhang/73/tup 33498 (#4779)
* chore(TUP-33498)CVE Oauth 2.0 SDK with OpenID Connect extensions in

* CVE Oauth 2.0 SDK with OpenID Connect extensions in
2021-11-12 17:03:07 +08:00
pyzhou
2b8ff4f36a fix(TDI-46992): ResumeUtil throw BufferOverflowException (#4771)
* fix(TDI-46992): ResumeUtil throw BufferOverflowException

* replace variable
2021-11-12 10:00:06 +08:00
pyzhou
30d8840a31 Merge branch 'maintenance/7.3' of https://github.com/Talend/tcommon-studio-se into maintenance/7.3 2021-11-12 09:59:53 +08:00
Jane Ding
3ea2179438 fix(TUP-33617):java.io.OptionalDataException on tAvroInput (#4774)
* fix(TUP-33617):java.io.OptionalDataException on tAvroInput
https://jira.talendforge.org/browse/TUP-33617

* fix(TUP-33617):java.io.OptionalDataException on tAvroInput
https://jira.talendforge.org/browse/TUP-33617
2021-11-10 11:39:16 +08:00
pyzhou
e22daaaedf fix(TDI-46994) Upgrade tck in studio 7.3 (#4769) 2021-11-08 10:13:48 +08:00
pyzhou
571a496303 fix(TDI-46994) Upgrade tck in studio 7.3 2021-11-05 12:31:08 +08:00
hzhao-talendbj
86171f4473 fix(TUP-33485): [tELTMap] Delimited identifiers does not work for (#4716)
Snowflake
2021-10-27 16:38:43 +08:00
jiezhang-tlnd
ebe668a985 chore(TUP-33409)CVE commons-compress[1.7-1.17] (#4712) 2021-10-27 09:19:32 +08:00
Zhiwei Xue
cff7a54f6f fix(TUP-32812):Mvn package fail for route use custom routine jar/custom (#4691)
bean jar.
2021-10-26 14:32:05 +08:00
apoltavtsev
13309d3297 fix(APPINT-33907) Compile error for DemoRESTRoute when run in studio 2021-10-18 17:39:26 +02:00
sponomarova
311c5680d3 feat(TBD-12137): Synapse GA (#4679) 2021-10-15 17:03:29 +03:00
Xilai Dai
743d863776 (APPINT-33753) upgrade jsoup version (#4657) 2021-10-12 10:01:55 +08:00
jiezhang-tlnd
9a87e0c49e fix(TUP-33029)CVE: org.jsoup:jsoup:1.13.1 (#4664) 2021-10-12 09:59:48 +08:00
wang wei
78522294dc fix(TDI-46727): Cannot pass a global variable of type date to a spark subjob using tRunJob after R2021-06 (#4602) 2021-10-09 09:36:30 +08:00
Oleksandr Zhelezniak
2854fa80b5 chore: bump connectors 1.26.0 (#4652) 2021-10-08 15:24:22 +03:00
Emmanuel GALLOIS
7389610259 feat(TDI-46769): bump to component-runtime 1.37.0 (#4609) 2021-10-04 10:51:37 +02:00
zyuan-talend
ae319f0d85 fix(TUP-32857):add absent authentication parameters in mongodb metadata connection. (#4620) 2021-09-30 10:07:35 +08:00
sbliu
98a80d18b6 fix(TUP-32947): tELTOUTPUT: Concatenating context variables in the "Default schema" field not working. (#4612) 2021-09-28 16:39:38 +08:00
zyuan-talend
f878723f81 fix(TUP-32758):show in connection dropdown and keep the built-in while propertytype + db version are compatible.(#4594) 2021-09-26 15:04:50 +08:00
AlixMetivier
1ac0beea10 feat(TBD-12334): add run submit mode to dbr and wizard (#4569)
* feat(TBD-12334): add run submit mode to dbr and wizard

* wip

* wip

* Update ExtendedNodeConnectionContextUtils.java
2021-09-17 10:03:16 +02:00
hcyi
cc0cab9532 fix(TDI-46315):sap component and sap metadata have different module name/mvnurl.(#4567) 2021-09-14 14:54:29 +08:00
Oleksandr Zhelezniak
0d7971730f chore(TDI-46716): bump connectors 1.25.0 2021-09-13 10:31:22 +03:00
Emmanuel GALLOIS
75cc28c0be feat(TDI-46568): bump to component-runtime 1.36.1 (#4582)
* feat(TDI-46568): bump component-runtime to 1.36.0
* feat(TDI-46568): bump to component-runtime 1.36.1
2021-09-10 12:48:23 +02:00
Emmanuel GALLOIS
f8e3b6d5cb feat(TDI-46568): bump component-runtime to 1.36.0 (#4556) 2021-09-10 09:19:25 +02:00
hzhao-talendbj
8a82cff8f3 chore(TUP-32664): CVE: commons-compress-[1.19,1.20] (#4564)
* chore(TUP-32664): CVE: commons-compress-[1.19,1.20]

* chore(TUP-32664): CVE: commons-compress-[1.19,1.20]
2021-09-09 10:55:55 +08:00
sbliu
ab9d3d1db2 chore(TUP-32620) add default connection parameter to mysql connection. (#4562) 2021-09-08 17:51:20 +08:00
kjwang
05779d09a3 kjwang/TUP-31732 CVE maven-core-3.0 73 (#4568)
https://jira.talendforge.org/browse/TUP-31732
2021-09-08 10:32:00 +08:00
hzhao-talendbj
d40317d16a Revert "chore(TUP-32664): CVE: commons-compress-[1.19,1.20]"
This reverts commit 0c3625940c.
2021-09-06 19:15:00 +08:00
hzhao-talendbj
0c3625940c chore(TUP-32664): CVE: commons-compress-[1.19,1.20] 2021-09-06 18:53:21 +08:00
pyzhou
00c0652cbb fix(TDI-46615): resumeutil compiled jdk11 cannot run in jdk 8 (#4548)
* fix(TDI-46615): resumeutil compiled jdk11 cannot run in jdk 8

* fix clear() method
2021-08-27 15:45:47 +08:00
zyuan-talend
823b72bcd9 fix(TUP-32567): decode hex value in job script. (#4528) 2021-08-26 17:55:27 +08:00
wang wei
f760212388 fix(TDI-46252): Studio: MySQL Connection issues due to TLS 1.2 after (#4501) 2021-08-24 09:08:55 +08:00
cbadillo1603
9da9e8199a fix(TBD-12863):Error component tImpalaConnection (#4498)
* fix(TBD-12863):Error component tImpalaConnection

* fix(TBD-12863):Error component tImpalaConnection
2021-08-16 12:17:40 +02:00
apoltavtsev
baf574ea55 fix(APPINT-32979) Compile Route with child Jobs on codegen stage 2021-08-12 11:17:43 +02:00
qiongli
892065d2c4 fix(TDQ-19637):Check if it includes 'tdqReportRun' in main/sub-job when (#4504)
generate code

Co-authored-by: qiongli <qiongli@LT-6TNJ593.talend.com>
2021-08-11 15:48:45 +08:00
kjwang
724dc1b72d kjwang/Fix TUP-32327 CVE maven-core-[3.2.3-3.6.3] (#4484)
* kjwang/Fix TUP-32327 CVE maven-core-[3.2.3-3.6.3]
https://jira.talendforge.org/browse/TUP-32327
2021-08-11 14:33:23 +08:00
Jane Ding
132d794131 fix(TUP-32383):Migration executed at every logon (#4505)
* Revert "fix(TUP-32383):Migration executed at every logon (#4480)"

This reverts commit b06ee57323.

* fix(TUP-32383):Migration executed at every logon
https://jira.talendforge.org/browse/TUP-32383
2021-08-10 11:37:51 +08:00
pyzhou
2298c44339 fix(TDI-46373):Resuming logs refactor with NIO and FileLock (#4465)
* fix(TDI-46373):Resuming logs refactor with NIO and FileLock

* fix(TDI-46373):remove debug info

* Remove the double lock and release in finally

* Remove UTF-8 and refactor
2021-08-10 09:48:01 +08:00
Emmanuel GALLOIS
03e462f8ff chore(studio731): bump component-runtime to 1.35.1 (#4502) 2021-08-09 09:22:00 +02:00
cbadillo1603
f7fb174301 Revert "fix(TBD-12184):Password field missing for tImpalaRow (#4472)" (#4507)
This reverts commit b2c74643a7.
2021-08-09 08:28:03 +02:00
zyuan-talend
54fc6ecd51 feat(TUP-30465):remove older versions of job. (#4461) 2021-08-06 17:30:51 +08:00
Oleksandr Zhelezniak
779e9a8086 chore(TDI-46537): bump connectors 1.24.0 (#4500) 2021-08-05 23:04:18 +03:00
Max
f2d189c792 fix(TBD-12466): httpclient upgraded to 4.5.13 (#4422)
Co-authored-by: Svitlana Ponomarova <sponomarova@talend.com>
2021-08-05 19:36:22 +03:00
hzhao-talendbj
84edc461db chore(TUP-32326): CVE: maven-compat-3.0[3.2.3-3.6.3] (#4468)
* chore(TUP-32326): CVE: maven-compat-3.0[3.2.3-3.6.3]

* chore(TUP-32326): CVE: maven-compat-3.0[3.2.3-3.6.3]

* chore(TUP-32326): CVE: maven-compat-3.0[3.2.3-3.6.3]

* TUP-32326

* TUP-32326 change to fix conflict
2021-08-04 16:52:25 +08:00
Jane Ding
b06ee57323 fix(TUP-32383):Migration executed at every logon (#4480)
https://jira.talendforge.org/browse/TUP-32383
2021-08-03 17:53:50 +08:00
Jane Ding
4590b8456d fix(TUP-32333):Not able to access a repository resource file in TMC (#4466)
* fix(TUP-32333):Not able to access a repository resource file in TMC
https://jira.talendforge.org/browse/TUP-32333

* fix(TUP-32333):Not able to access a repository resource file in TMC
https://jira.talendforge.org/browse/TUP-32333
2021-08-03 10:02:28 +08:00
cbadillo1603
b2c74643a7 fix(TBD-12184):Password field missing for tImpalaRow (#4472) 2021-07-30 10:39:47 +02:00
sbliu
b35fb11251 chore(TUP-31799) upgrade plexus-archiver. (#4450) 2021-07-29 19:17:29 +08:00
Zhiwei Xue
576d3abf29 fix(TUP-32001):Tacokit slow to start (#4417) (#4427)
* fix(TUP-32001):Tacokit slow to start (#4417)

* fix(TUP-32001): fix TCK server readiness checker

Co-authored-by: bhe-talendbj <bhe@talend.com>
2021-07-26 11:01:08 +08:00
jiezhang-tlnd
14ca2dfaa7 fix(TUP-31656)Remove FilesUtils MD5 static helper methods (#4447)
* fix(TUP-31656)Remove FilesUtils MD5 static helper methods

* fix(TUP-31656 and TUP-31655)
2021-07-23 16:56:30 +08:00
Jane Ding
b607ed6fb3 feat(TUP-28580):Replace current "Copy to branch", with "Copy from (#4449) (#4451)
branch"
https://jira.talendforge.org/browse/TUP-28580
2021-07-19 17:29:20 +08:00
Jane Ding
acd02c4c18 feat(TUP-28580):Replace current "Copy to branch", with "Copy from (#4441)
branch"
https://jira.talendforge.org/browse/TUP-28580
2021-07-16 17:33:11 +08:00
cbadillo1603
615a4f209e fix(TBD-12715):Knox check HDFS service (#4408)
* fix(TBD-12715):Knox check HDFS service

* fix(TBD-12715):Knox check HDFS service

* fix(TBD-12715):Knox check HDFS service
2021-07-16 10:48:05 +02:00
jiezhang-tlnd
172f3c3483 fix(TUP-32130)CVE: json-smart-2.4.2.jar (#4432)
Co-authored-by: jie.zhang <jie.zhang@LT-DDC8R73.talend.com>
2021-07-16 10:21:10 +08:00
hcyi
a4ce2f457e feat(TUP-31123):In studio, do not store login credentials on disk for TAC and reprompt instead. (#4406)
* feat(TUP-31123):In studio, do not store login credentials on disk for
TAC and reprompt instead.

* feat(TUP-31123):In studio, do not store login credentials on disk for
TAC and reprompt instead.
2021-07-15 15:57:47 +08:00
Jane Ding
f2af89413f feat(TUP-28580):Replace current "Copy to branch", with "Copy from (#4392)
* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580

* feat(TUP-28580):Replace current "Copy to branch", with "Copy from
branch"
https://jira.talendforge.org/browse/TUP-28580
[bug] Select parent job, studio can't automatically select the sub-job
when check "import dependencies"
https://jira.talendforge.org/browse/TUP-32187
2021-07-15 00:55:25 +08:00
apoltavtsev
0c8c872bd6 fix(APPINT-33413) Java 11 dependencies are corrected 2021-07-14 10:53:57 +02:00
Emmanuel GALLOIS
38ed0b9f1f chore(studio731): bump component-runtime to 1.34.1 (#4423) 2021-07-13 09:39:31 +02:00
bhe-talendbj
4df14e99d0 chore(TUP-31163): upgrade daikon to 0.31.12 (#4377)
* chore(TUP-31163): upgrade daikon to 0.31.12

* chore(TUP-31163): execute UpdateDaikonCryptoUtilsMigrationTask always
2021-07-13 15:27:52 +08:00
jiezhang-tlnd
0c3e5175dd fix(TUP-31880)Build job failure due to joblet relationship didn't record (#4418)
https://jira.talendforge.org/browse/TUP-31880

Co-authored-by: jie.zhang <jie.zhang@LT-DDC8R73.talend.com>
2021-07-13 14:28:35 +08:00
Zhiwei Xue
4ed8a4a803 fix(TUP-31531):fix repository node order in remote mode (#4420) 2021-07-12 15:48:36 +08:00
chmyga
365700699e chore(TDI-46405): bump connectors to 1.23.0 (#4421)
Co-authored-by: Dmytro Chmyga <dmytro.chmyga@globallogic.com>
2021-07-09 18:01:57 +03:00
bhe-talendbj
dab6da165f fix(TUP-31736): fix junit (#4415) 2021-07-08 17:39:12 +08:00
bhe-talendbj
b33018d422 fix(TUP-31736): add functions of custom routine jars to auto complete (#4391)
* fix(TUP-31736): add functions of custom routine jars to auto complete

* fix(TUP-31736): using cache

* fix(TUP-31736): add warning message

* fix(TUP-31736): fix parsing functions

* fix(TUP-31736): remove log messages

* fix(TUP-31736): fix warning
2021-07-07 11:21:44 +08:00
Zhiwei Xue
81ec1966bd fix(TUP-31531):fix repository node order in remote mode (#4396) 2021-07-05 15:37:44 +08:00
Jane Ding
d3246a9713 feat(TUP-23337):Option to disable Job's screenshot creation. (#4365)
* feat(TUP-23337):Option to disable Job's screenshot creation.
https://jira.talendforge.org/browse/TUP-23337

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-23337):Option to disable Job's screenshot creation.
https://jira.talendforge.org/browse/TUP-23337

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-23337):Option to disable Job's screenshot creation.
https://jira.talendforge.org/browse/TUP-23337

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-23337):Option to disable Job's screenshot creation.
https://jira.talendforge.org/browse/TUP-23337

* feat(TUP-23337):Option to disable Job's screenshot creation.
https://jira.talendforge.org/browse/TUP-23337
2021-07-05 08:56:59 +08:00
zshen-talend
b098e18278 fix(TDQ-19281): make export parser rule with dq mode (#4383) 2021-07-01 15:40:34 +08:00
kjwang
f635d5a9f6 Fix TUP-31909 Shared mode for Talend Studio doesn't work 5921 (#4395)
Fix TUP-31909 Shared mode for Talend Studio doesn't work
https://jira.talendforge.org/browse/TUP-31909
2021-07-01 09:54:30 +08:00
bhe-talendbj
49b4be0929 fix(TUP-31858): Implicit Context Load using Snowflake - Object does not exist error (#4385) 2021-06-30 09:47:38 +08:00
zyuan-talend
39afb9e94a feat(TUP-26268): fix the NPE. (#4378) 2021-06-16 18:04:34 +08:00
hcyi
d119efe8d6 fix(TUP-31238):Library sync with JFrog/Nexus on studio startup doesn't use proxy. (#4356)
* fix(TUP-31238):Library sync with JFrog/Nexus on studio startup doesn't
use proxy.

* fix(TUP-31238):improve for Library sync with JFrog/Nexus on studio
startup doesn't use proxy.

* fix(TUP-31238):add log for Library sync with JFrog/Nexus on studio
startup doesn't use proxy.
2021-06-11 17:23:28 +08:00
Zhiwei Xue
66cdd796fd fix(TUP-31759):fix codes install issues on CI (#4362) 2021-06-11 15:26:50 +08:00
jiezhang-tlnd
af3def7767 feat(TUP-31122)new Data Center in AWS Australia (#4355)
https://jira.talendforge.org/browse/TUP-31122

Co-authored-by: jie.zhang <jie.zhang@LT-DDC8R73.talend.com>
2021-06-10 17:59:17 +08:00
Jane Ding
e7db5386c9 fix(TUP-31159):When use remote mode with Custom log / unlocked, have (#4325)
only one popup of commit
https://jira.talendforge.org/browse/TUP-31159
2021-06-10 17:29:13 +08:00
zyuan-talend
0b8f214c38 feat(TUP-26268): Add button of manipulating Db Column field. (#4354)
* feat(TUP-26268): Add button of manipulating Db Column field.
2021-06-10 15:29:44 +08:00
Emmanuel GALLOIS
3c9684f993 feat(TDI-46215): bump component-runtime to 1.33.1 (#4337) 2021-06-10 09:04:49 +02:00
chmyga
de29a9fee4 chore(TDI-46267): bump connectors to 1.22.0 (#4363)
Co-authored-by: Dmytro Chmyga <dmytro.chmyga@globallogic.com>
2021-06-09 13:43:49 +03:00
sbliu
e346460a75 fix(TUP-31252) Improve the data collector for AMC. (#4349) 2021-06-08 14:24:24 +08:00
sbliu
294bb6a9c9 feat(TUP-30849) add progress bar to install local patch. (#4339) 2021-06-08 14:21:24 +08:00
Xilai Dai
cb76ce50a7 chore(APPINT-32986) fix CVE commons-io 2.6 (#4351) 2021-06-07 18:07:08 +08:00
bhe-talendbj
e8e197e81c fix(TUP-31580): Exclude unnecessary libraries (#4353) 2021-06-07 15:11:52 +08:00
bhe-talendbj
a5d5c0ef55 fix(TUP-31580): replace javascriptengine (#4334)
* fix(TUP-31580): replace javascriptengine

* fix(TUP-31580): fix test case

* fix(TUP-31580): fix test case
2021-06-03 16:16:17 +08:00
sbliu
82b425506a feat(TUP-30834) fix unit test failure introduced by api change (#4340) 2021-06-03 10:53:26 +08:00
Xilai Dai
932e8d61e3 chore(APPINT-32603) Update plexus utils to 3.0.24 (#4330) 2021-06-02 20:55:41 +08:00
sbliu
6baf2b82be feat(TUP-30834) add 2 axis2 module to classpath and export package. (#4280)
add axis2 dependencies.
remove salesforce code&dependency from tup repository metadata, adpt the 'create salesforce connection' toolbar action to generic salesforce connection creation action.
2021-06-02 18:30:01 +08:00
zshen-talend
1331c1d70b fix(TDQ-19437): backport on 7.3 (#4318) 2021-06-02 07:27:49 +00:00
jiezhang-tlnd
e719944af0 chore(TUP-31527)CVE lucene-queryparser (#4333)
Co-authored-by: jie.zhang <jie.zhang@LT-DDC8R73.talend.com>
2021-06-02 15:19:28 +08:00
vdrokov
333f9ad538 APPINT-32815: Bug in springboot build (microservice) 2021-06-01 15:52:32 +02:00
jiezhang-tlnd
eede5c3bc2 Revert "Jzhang/73/tup 31527 (#4300)" (#4332)
This reverts commit c0fde38133.
2021-06-01 14:43:48 +08:00
bhe-talendbj
cafb7db6b8 chore(TUP-31095): Use prepareStatement instead of plain sql execution (#4248)
* fix(TUP-31095): initial impl

* fix(TUP-31095): initial impl

* chore(TUP-31095): use prepared statement

* chore(TUP-31095): fix param index

* fix(TUP-31095): fix parameter index
2021-06-01 11:07:26 +08:00
vdrokov
b042f20e49 APPINT-33123: Account TDI use case (#4329) 2021-05-31 17:26:34 +03:00
jiezhang-tlnd
c0fde38133 Jzhang/73/tup 31527 (#4300)
* fix(TUP-31527)CVE lucene-queries

* remove org.talend.libraries.apache.lucene4
2021-05-31 17:13:46 +08:00
vdrokov
5efc4dd8c4 APPINT-33113: Fix not available routines (#4322) 2021-05-28 19:04:14 +03:00
hcyi
f5833bb365 fix(TUP-31553):Hadoop Metadata Wizard when using custom distro dialog (#4305)
box doesnt pop up to import dependencies.
2021-05-28 14:37:45 +08:00
vdrokov
548f6a97fd APPINT-32815: Bug in springboot build (microservice) (#4288) 2021-05-26 13:26:30 +03:00
Jane Ding
864ba43149 fix(TUP-31316):Error connecting to Azure SQL database with Azure Active (#4271)
* fix(TUP-31316):Error connecting to Azure SQL database with Azure Active
directory method
https://jira.talendforge.org/browse/TUP-31316

* fix(TUP-31316):Error connecting to Azure SQL database with Azure Active
directory method
https://jira.talendforge.org/browse/TUP-31316
2021-05-26 17:30:03 +08:00
zyuan-talend
d0d955546b feat(TUP-30343):have the "Export Dependencies" option checked by default (#4312) 2021-05-26 11:38:03 +08:00
Jane Ding
51cb13c619 fix(TUP-30849):Improve build Job performance (#4151)
* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849
Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849

* feat(TUP-31117):Improve performances related to recursive jobs (#4290)

* feat(TUP-31117):Improve performances related to recursive jobs
https://jira.talendforge.org/browse/TUP-31117

* feat(TUP-31117):Improve performances related to recursive jobs
https://jira.talendforge.org/browse/TUP-31117
2021-05-25 18:10:48 +08:00
bhe-talendbj
e9d7c4a43c chore(TUP-30451): remove cve jars (#4301)
* chore(TUP-30415): remove cve jars

* chore(TUP-30415): remove cve jars
2021-05-25 14:33:51 +08:00
jiezhang-tlnd
67d44985fa fix(TUP-31164)Guess schema button on the informix tDBinput component (#4281)
* fix(TUP-31164)Guess schema button on the informix tDBinput component
returns zero length datatype

* Guess schema button on the informix tDBinput component returns zero
length datatype
2021-05-25 11:28:47 +08:00
jiezhang-tlnd
41f5d459f6 chore(TUP-30461)CVE plexus-utils (#4274)
* chore(TUP-30461)CVE plexus-utils

* remove from classpath file
2021-05-24 15:53:07 +08:00
hcyi
b38b96fedc feat(TUP-30619):Missing Additional parameters in SAP Connection. (#4284)
* feat(TUP-30619):Missing Additional parameters in SAP Connection.

* feat(TUP-30619):update key for Additional parameters in SAP Connection.
2021-05-24 09:49:54 +08:00
bhe-talendbj
df53ee1a1f fix(TUP-31380): include all needed modules for routines in CI mode (#4282) 2021-05-21 16:59:54 +08:00
kjwang
035bc4a39c TUP-31227 Studio populate UnstagedChanges for Global Routines and SQL (#4303)
Templates when opening a new Feature Branch (Improve the code)
https://jira.talendforge.org/browse/TUP-31227
2021-05-21 14:26:10 +08:00
kjwang
1105d9c65c Kjwang/fix tup 31227 studio populate unstaged changes (#4277)
* TUP-31227 Studio populate UnstagedChanges for Global Routines and SQL
Templates when opening a new Feature Branch
https://jira.talendforge.org/browse/TUP-31227
2021-05-21 10:54:25 +08:00
Liu Xinquan
488e7aaedb fix(TDQ-19429) tDqReportRun failed when dbconneciton is context mode (#4294) 2021-05-19 17:28:36 +08:00
vdrokov
681dd59eb2 APPINT-32987: Fix dublicate variable (#4278) 2021-05-13 12:08:54 +03:00
sbliu
7a3c23cdb5 fix(TUP-31060): store real routine id in case recreated routine with same name. 2021-05-12 19:14:38 +08:00
Jane Ding
a6f4581b0a chore(APPINT-32936):CVE:Upgrade commons-codec-1.11 to 1.15 (#4261)
https://jira.talendforge.org/browse/APPINT-32936

Co-authored-by: SunChaoqun <csun@talend.com>
2021-05-12 13:59:23 +08:00
Denis Sergent
40e63f3c01 Revert "APPINT-32905: Issue with Rest service flow (#4263)" (#4276)
This reverts commit d88d513e4e.
2021-05-10 11:36:24 +02:00
Jane Ding
d54cddaedf fix(TUP-31237):Invalid username or password when creating a Snowflake (#4232)
* fix(TUP-31237):Invalid username or password when creating a Snowflake
Metadata Connection with a Snowflake password that has a slash character
https://jira.talendforge.org/browse/TUP-31237

* fix(TUP-31237):Invalid username or password when creating a Snowflake
Metadata Connection with a Snowflake password that has a slash character
https://jira.talendforge.org/browse/TUP-31237
2021-05-10 16:04:00 +08:00
Jane Ding
41e2ef2d2d chore(TUP-31030):Update CXF to 3.3.10 (#4242)
* chore(TUP-31030):Update CXF to 3.3.10
https://jira.talendforge.org/browse/TUP-31030

* chore(TUP-31030):Update CXF to 3.3.10
https://jira.talendforge.org/browse/TUP-31030
2021-05-10 09:42:05 +08:00
mbasiuk-talend
bccc406937 chore(TDI-46032): bump connectors version to 1.21.0 (#4269) 2021-05-08 17:04:57 +08:00
hzhao-talendbj
a9b3d20e06 chore(TUP-31403): Add log4j dependency in maven.tis/maven.tos (#4267)
* chore(TUP-31403): Add log4j dependency in maven.tis/maven.tos

* add log4j-1.2-api

* TUP-31403 add maven-shared-utils 3.3.3
2021-05-08 09:44:59 +08:00
Liu Xinquan
47b5a7e251 Revert "Revert "fix(TDQ-19030): fix complier error (#4172)" (#4212)" (#4268)
This reverts commit 137c543bfd.
2021-05-07 14:37:05 +08:00
kjwang
e9b5fa3ba7 Feat:TUP-30377 Move the "Allow specific characters (UTF8,...)" (#4238)
Feat:TUP-30377 Move the "Allow specific characters (UTF8,...) preference setting to project setting.
https://jira.talendforge.org/browse/TUP-30377
2021-05-06 14:48:48 +08:00
jiezhang-tlnd
39a730cae4 fix(TUP-30451)maven-shared-utils-3.0.0.jar,maven-shared-utils-3.0.1.jar,maven-shared-utils-3.1.0.jar (#4262) 2021-05-06 11:01:59 +08:00
vdrokov
d88d513e4e APPINT-32905: Issue with Rest service flow (#4263) 2021-05-05 12:31:14 +03:00
kjwang
75176b6f45 Revert the commit of TUP-31096 to test tuj (#4253)
Co-authored-by: kjwang <kjwang@LT-B1Z2R73.talend.com>
2021-04-30 10:21:23 +08:00
hzhao-talendbj
11ecc1cbfd fix(TUP-31248):impala metadata connection issues for Cloudera (#4246)
* fix(TUP-31248):impala metadata connection issues for Cloudera

* TUP-31248 revert mistake remove

* TUP-31248 remove some useless code

* TUP-31248 add connection info to log when connection failed
2021-04-29 15:29:56 +08:00
jiezhang-tlnd
53efef8de0 fix(TUP-29866)CVE on maven-shared-utils (#4225)
* fix(TUP-29866)CVE on maven-shared-utils

* exclude maven-shared-utils 3.2.1

* update pom_project_template.xml

* exclude maven-shared-utils:jar:3.1.0
2021-04-29 14:27:16 +08:00
Jane Ding
db2eb01c38 fix(TUP-31234):Build job fail with option "Execute tests" if any test (#4244)
case fail
https://jira.talendforge.org/browse/TUP-31234
2021-04-28 17:59:19 +08:00
hzhao-talendbj
f9af16ba90 fix(TUP-30524): Commandline login svn project tag fail (#4228) 2021-04-28 11:59:24 +08:00
kjwang
23f2926741 Fix TUP-31096 Could not find or load main class error on the jobs (#4245)
Fix TUP-31096 Could not find or load main class error on the jobs created on the Feature Branch which has #
https://jira.talendforge.org/browse/TUP-31096
2021-04-27 17:57:52 +08:00
Jane Ding
48653aa380 feat(TUP-30730):Deprecate SAS from metadata wizard (#4210)
https://jira.talendforge.org/browse/TUP-30730
2021-04-27 15:15:31 +08:00
bhe-talendbj
d80fefc234 fix(TUP-31069): remove beanutils-core (#4227)
* fix(TUP-31069): remove beanutils-core

* chore(TUP-31069): change commons-io to 2.4

* chore(TUP-31069): change commons-io to 2.7

* chore(TUP-31069): change commons-io to 2.7

* chore(TUP-31069): only remove unsed cve jars
2021-04-26 18:21:31 +08:00
sbliu
a0b395cd3a feat(TUP-30846) Unify studio version information & patch info in studio logs. 2021-04-25 10:50:31 +08:00
hzhao-talendbj
98bcc66479 chore(TUP-31155): change the way to check if it's CI mode (#4208)
* chore(TUP-31155): change the way to check if it's CI mode

* TUP-31155 code change

* TUP-31155 add comments
2021-04-23 18:22:37 +08:00
ypiel
a716257dd0 chore: bump to tck:1.32.0 2021-04-22 12:13:51 +02:00
wang wei
b164f8c447 fix(TDI-43921): backport to 73 (#4231) 2021-04-21 18:08:04 +08:00
jiezhang-tlnd
dd352b4a8f fix(TUP-29381)CVE on (#4222)
commons-codec-1.6.jar/commons-codec-1.9.jar/commons-codec-1.10.jar
2021-04-19 15:43:12 +08:00
Jane Ding
08ac05c23e fix(TUP-30992):CVE: junit-4.11,4.13 (#4220)
https://jira.talendforge.org/browse/TUP-30992

Signed-off-by: jding-tlnd <jding@talend.com>
2021-04-16 19:19:40 +08:00
Zhiwei Xue
90a37f8418 fix(TUP-30187):rename maven property (#4216) 2021-04-16 15:36:36 +08:00
Liu Xinquan
137c543bfd Revert "fix(TDQ-19030): fix complier error (#4172)" (#4212)
This reverts commit c22eba9ead.
2021-04-15 16:39:40 +08:00
jiezhang-tlnd
42e94c6508 fix(TUP-30992)CVE: junit-4.11,4.13 (#4202)
* fix(TUP-30992)CVE: junit-4.11,4.13

* fix(TUP-30992)CVE: junit-4.11,4.13
2021-04-15 16:13:04 +08:00
hzhao-talendbj
ff9c4c021a fix(TUP-30921):Job fails with "Could not find the context Default" after migration 7.2.1 to 7.3.1 R2021-01 (#4154)
* fix(TUP-30921): Job fails with "Could not find the context Default"
after migration 7.2.1 to 7.3.1 R2021-01

* TUP-30921 new code change
2021-04-15 15:13:28 +08:00
Zhiwei Xue
291f56e505 fix(TUP-30586):Routine/Bean custom jars dependency management issues left todo (#4201)
* fix(TUP-30782):Fail to run job if use a custom routine jar without inner
jar.

* fix(TUP-30791): fix test case run failure
2021-04-14 16:54:11 +08:00
hzhao-talendbj
c67b2f479e chore(TUP-30942): upgrade to httpclient-4.5.13.jar (#4193) 2021-04-14 09:38:28 +08:00
mbasiuk-talend
45d373f447 chore(TDI-45894): bump connectors version to 1.20.0 (#4190) 2021-04-13 13:29:33 +03:00
Emmanuel GALLOIS
edff6eeeb8 feat(TDI-45842): bump component-runtime to 1.31.2 (#4164)
* feat(TDI-45842): bump component-runtime to 1.31.1-SNAPSHOT

* chore(TDI-45842): bump component-runtime to 1.31.2

Co-authored-by: jzhao-talend <jzhao@talend.com>
Co-authored-by: mbasiuk <mbasiuk@talend.com>
2021-04-13 12:39:28 +03:00
bhe-talendbj
acd1555a2b fix(TUP-26813): upgrade bcprov-jdk15on (#4053)
* fix(TUP-26813): upgrade bcprov-jdk15on

* fix(TUP-26813): upgrade bcprov-jdk15on

* fix(TUP-26813): add test case
2021-04-13 11:42:21 +08:00
sbliu
97a77ec401 feat(TUP-30953) record install additional packages. 2021-04-13 11:07:46 +08:00
bhe-talendbj
a5f6364467 bugfix(TUP-30203): Search required groups only (#4174)
* fix(TUP-30203): only search required library groups

* fix(TUP-30203): only search required library groups, refactor

* fix(TUP-30203): only search required library groups, refactor

* fix(TUP-30203): exclude class file

* fix(TUP-30203): exclude class file

* fix(TUP-30203): share libs in background

* fix(TUP-30203): add i18n
2021-04-12 18:05:35 +08:00
hcyi
db39d84224 feat(TUP-30291):Add Suggestable support for Table options (List<Row>) in (#4150)
Studio.
2021-04-12 15:24:23 +08:00
jiezhang-tlnd
d153fe9fa0 feat(TUP-30381)Support greenplum driver for Greenplum Database in studio (#4138)
* feat(TUP-30381)Support greenplum driver for Greenplum Database in studio
metadata
https://jira.talendforge.org/browse/TUP-30381

* add dbversion for greeenplu

* add dbversion

* update mapping_greenplum file

* update greenplum_mapping

* update greenplum mapping
2021-04-12 10:02:25 +08:00
hzhao-talendbj
939e974d1c fix(TUP-30429): the job export from v6.5.1 can't be imported to v7.3.1 (#4180) 2021-04-09 11:33:04 +08:00
Zhiwei Xue
722a0b1341 fix(TUP-30786):Avoid to click finish button more than once when do (#4184)
create custom routine jar/bean jar.
2021-04-08 18:32:55 +08:00
sbliu
7b391d516f TUP-30768 Can't reset performance_record if first patch use manual installation then the second use Software update 2021-04-08 17:26:50 +08:00
Xilai Dai
b5478c3f2f chore(APPINT-32718) override the httpclient version (#4189)
* chore(APPINT-32718) override the httpclient version

* chore(APPINT-32718) override the httpclient version
2021-04-08 16:27:29 +08:00
hzhao-talendbj
0726cb38fd chore(TUP-30942): CVE: httpclient-4.5.3.jar (#4157)
* chore(TUP-30942): CVE: httpclient-4.5.3.jar

* TUP-30942 modify manifest
2021-04-08 15:55:37 +08:00
pyzhou
687ab637be fix(TDI-45881):Update jackson mapper (#4188) 2021-04-08 15:27:31 +08:00
hzhao-talendbj
4cb1deb115 chore(TUP-27039): Update Commons Compress to 1.19 backport to 7.3 (#4140)
* chore(TUP-27039): Update Commons Compress to 1.19 backport to 7.3

* TUP-27093 fix wrong code dependency

* TUP-27039 revert tycho to 1.4.0

* TUP-27039 change karaf-maven-plugin to 4.2.7

* TUP-27039 change karaf-maven-plugin to 4.2.7

* TUP-27039 if packaging pom ,then use origin one
2021-04-08 10:51:39 +08:00
Zhiwei Xue
c594011902 fix(TUP-30187):CI: Add options to disable compile error of (#4177)
routines/beans/codejars pom
2021-04-07 09:46:54 +08:00
vdrokov
c6d7da2121 TESB-32416: Importing route from a zip file, imports all the other jobs (Clone TESB-32400) (#4147) 2021-04-06 15:00:36 +02:00
Zhiwei Xue
90951dced8 fix(TUP-30780):Only check used custom jars when run/build Job (#4173) 2021-04-06 15:51:34 +08:00
msjian
c22eba9ead fix(TDQ-19030): fix complier error (#4172) 2021-04-06 14:14:56 +08:00
Zhiwei Xue
e466c31b88 fix(TUP-30977):test run map using custom routines and beans doesn't work (#4159)
after switch branch
2021-04-06 12:05:53 +08:00
bhe-talendbj
6a601fadd2 fix(TUP-30047): fix missing joblet (#4107)
* fix(TUP-30047): fix missing joblet

* fix(TUP-30047): add missing joblets for test case job

* fix(TUP-30047): add missing joblets for test case job, infinite loop

* feat(TUP-30047): support running dynamic jobs

* feat(TUP-30047): change location of classpath.jar if running ci test
2021-04-02 16:14:23 +08:00
sbliu
28a216d0af fix(TUP-30685) Mvn package job use joblet in subref project fail to run the bat file correct. 2021-04-01 17:27:24 +08:00
hzhao-talendbj
5622490ca4 chore(TUP-29181): upgrade cxf backport to 73 (#4142)
* chore(TUP-29181): upgrade cxf backport to 73

* TUP-29181 remove extra bundle activationpolicy

* TUP-29181 try add source src

* TUP-29181 remove jars from lib folder

* TUP-29181 remove jars from lib
2021-03-30 16:14:45 +08:00
jiezhang-tlnd
283fa4ac93 Jzhang/73/tup 29381 (#4057)
* fix(TUP-29381)CVE on
commons-codec-1.6.jar/commons-codec-1.9.jar/commons-codec-1.10.jar

* fix(TUP-29381)CVE on
commons-codec-1.6.jar/commons-codec-1.9.jar/commons-codec-1.10.jar

* update on tos

* remove common-codec-1.6

* remove commons-dodec 1.6
2021-03-30 15:57:45 +08:00
Zhiwei Xue
b55a302e9f fix(TUP-30813):Add Junits for dependency management feature (#4144) 2021-03-25 09:39:16 +08:00
Jane Ding
887d1249dc fix(TUP-30216):Commandline install patch and login project throw NPE (#4114)
https://jira.talendforge.org/browse/TUP-30216

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-25 00:39:52 +08:00
Zhiwei Xue
caa73983c8 fix(TUP-30779):Custom jar resource unload issue after git pull&merge. (#4133) 2021-03-24 16:20:48 +08:00
Jane Ding
7a502a7dc1 fix(TUP-30615):Schema Update Detection popping up everytime upon opening (#4131)
the job
https://jira.talendforge.org/browse/TUP-30615

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-23 11:30:29 +08:00
hzhao-talendbj
c395d11c00 TUP-30558 (#4111) (#4130) 2021-03-23 09:53:34 +08:00
Zhiwei Xue
1fc99eaa02 feat(TUP-29014): bugfix 2021-03-16 (#4128) 2021-03-16 17:11:55 +08:00
jiezhang-tlnd
77a076cea1 revert the commit 94914d676b 2021-03-16 16:06:51 +08:00
jiezhang-tlnd
94914d676b check if custom nexus is available or not before deploy the jar 2021-03-16 16:01:53 +08:00
Laurent BOURGEOIS
1faf28843b fix(TBD-11964): Different time zone for Standard jobs and BD Batch (#4082) 2021-03-15 17:01:22 +01:00
Zhiwei Xue
f62e85356c feat(TUP-29014): bugfix 2021-03-11 (#4116)
* feat(TUP-29014):init custom jar cache before migration tasks

* feat(TUP-29014): bugfix 2021-03-11
2021-03-11 16:24:47 +08:00
Chao MENG
81a6422c0b item(TUP-30180): Studio slowness on merge operation (#4066)
* fix(TUP-29390): Improve the file commit logic in RepositoryWorkUnit (#3901)

fix(TUP-29390): Improve the file commit logic in RepositoryWorkUnit during Pull and Merge
https://jira.talendforge.org/browse/TUP-29390

* fix(TUP-30103): [7.1.1] Studio somtimes hangs for 20 seconds
https://jira.talendforge.org/browse/TUP-30103

* fix(TUP-30103): [7.1.1] Studio somtimes hangs for 20 seconds
https://jira.talendforge.org/browse/TUP-30103

Conflicts:
	main/plugins/org.talend.designer.maven/src/main/java/org/talend/designer/maven/tools/AggregatorPomsHelper.java
2021-03-11 09:51:38 +08:00
Zhiwei Xue
941c36921b feat(TUP-29014):fix junit failure (#4112) 2021-03-10 11:43:05 +08:00
sbliu
e01cecfb68 feat(TUP-30338) Data Collector improvement step 1
* log action activation, log perspective switch.
* reset performance record after install patch, read/write info from/to new performance file location.
* set default DATA_COLLECTOR_UPLOAD_PERIOD to 5.
* don't send data when closing studio.
* When there is no action or dialog popped , check data collector enable, network enable, data send period, if need sent, try to send data.
2021-03-10 10:34:56 +08:00
Zhiwei Xue
9d3fb2213b feat(TUP-29014): Add only compile code projects function for TDM (#4109) 2021-03-09 15:51:25 +08:00
sbliu
aa4ccadbaf fix(TUP-29586) Change repository context variable type would pop up job update dialog. 2021-03-09 14:22:49 +08:00
Zhiwei Xue
1c7f2a311c feat(TUP-29014): Only build and package beans/routines that are used in Route/Job (#4028)
* feat(TUP-29018): Rearrange single routines into jars

* feat(TUP-29019): Generation and Build: Build routine jars in different
maven projects.

* feat(TUP-29019): Build routine jars in different maven projects

* feat(TUP-29019): fix codesjar cache and update job maven project problem

* feat(TUP-29019): fix several issues

* feat(TUP-29943):codejars under recycle bin should be hierarchy (#3979)

* feat(TUP-29943):codejars under recycle bin should be hierarchy
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):codejars under recycle bin should be hierarchy
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014): refactor codesjar resource cache

* feat(TUP-29943):delete codejar forever should also delete child code (#3985)

items, include delete forever from recycle bin and empty recycle bin
Restore code should also restore parent node codeJar
https://jira.talendforge.org/browse/TUP-29943
Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):Fail to import custom Routine jar (#3987)

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

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014): fix codesjar dependencies can't set required issue

* feat(TUP-29943):delete forever should also delete codejar folder (#3991)

should not have duplicate nodes in import dialog
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):delete forever should also delete codejar folder (#3992)

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

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):import no value present issue and import to change inner (#4000)

code
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29019):fix missing codesjar module in CI without -pl

* feat(TUP-29019): improve update codesjar project logic

* feat(TUP-29014): fix generate pom and sync inner code issues

* feat(TUP-29014): fix opeing ref inner codes issue

* feat(TUP-29014): fix missing codesjars module for regenerate poms issue

* feat(TUP-29943):delete folder issue and build job routinesJar (#4003)

* feat(TUP-29943):delete folder issue and build job routinesJar
relationship
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):make impact analysis work for beansjar
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014):fix several import issue and build code jar problem

* feat(TUP-29014): avoid to fail all install if some code jar projects got
problem

* feat(TUP-29943): rename codejar should update package and folder path (#4012)

for inner code
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943):export and import to deploy libs issue (#4020)

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

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014):fix retrieve jar from nexus and aggregate build code jar
project issues

* feat(TUP-29014):fix several missing class in jar for custom jar issues

* feat(TUP-29014): update ref code projects after resolved dependencies

* Revert "feat(TUP-29014): update ref code projects after resolved dependencies"

This reverts commit e9256e359f.

* feat(TUP-29014): support shot class name for custom jars in component

* feat(TUP-29943):rename issues (#4044)

* feat(TUP-29943):rename issues
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29943)disable duplicate for codejar and innercode
https://jira.talendforge.org/browse/TUP-29943

Signed-off-by: jding-tlnd <jding@talend.com>

* fix(TUP-29014):fix generating code error.

* feat(TUP-29014): improve update codesjar project performance and fix
regression

* feat(TUP-29014):fix rename regressions and improve import performance

* feat(TUP-29943):fix some copy paste issues (#4069)

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

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014):fix codesjar modules not share problem

* feat(TUP-29014):fix git collaborative work issues

* feat(TUP-29943):image issue (#4071)

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

Signed-off-by: jding-tlnd <jding@talend.com>

* feat(TUP-29014):fix compilation error

* feat(TUP-29014):fix git pull deadlock and ref inner code sync issues

* fix(TESB-32252):Bundle is not compatible with this blueprint extender

* fix(TUP-30597):Fix junit failures caused by dependency management (#4099)

feature

* feat(TUP-29014):fix several git reset issues

* feat(TUP-29014): bugfix 2021-03-05

* feat(TUP-29014): bugfix 2021-03-08

* feat(TUP-29014): bugfix 2021-03-08 2

* feat(TUP-29014):bugfix 2021-03-09

Co-authored-by: Jane Ding <jding@talend.com>
2021-03-09 12:12:58 +08:00
hzhao-talendbj
0b7cba2a9d fix(TUP-29719): upgrade jackson to 2.11.4 (#4077) 2021-03-09 11:59:36 +08:00
nrousseau
f8dd9f0c1a Jzhang/73/tup 30093 (#4084)
* fix(TUP-30093)upgrade the commons-codec plugin

* TUP-30093 change crypto-utils

Co-authored-by: jiezhang-tlnd <jie.zhang@talend.com>
Co-authored-by: hzhao-talendbj <hzhao@talend.com>
2021-03-09 11:53:17 +08:00
bhe-talendbj
9c12a2e19e chore(TUP-27154): Upgrade commons-beanutils (#4017)
* chore(TUP-27154): Upgrade commons-beanutils

* TUP-27154 add include GroupIds to filter beanutils in generated in lib
folder

Co-authored-by: hzhao-talendbj <hzhao@talend.com>
2021-03-08 14:32:11 +08:00
Dmytro Sylaiev
a2132cb833 feat(TDI-45721): Bump TCK version for monthly (#4105) 2021-03-05 14:02:06 +02:00
jiezhang-tlnd
ed4655f2aa chore(TUP-27791 )remove feature (#4039) 2021-03-05 17:11:55 +08:00
jiezhang-tlnd
910e3fb601 TUP-26534 (#3400) (#4016)
* TUP-26534

* TUP-26534  revert for EHiveWithTezJars

* remove unknown version

Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>
Co-authored-by: hzhao-talendbj <hzhao@talend.com>
2021-03-05 14:43:20 +08:00
hzhao-talendbj
bda6b0a1a7 fix(TUP-30269) Snowflake components having schema cannot retrieve column (#4076)
* fix(TUP-30269) Snowflake components having schema cannot retrieve column
name in Japanese

* TUP-30269 fix when uncheck allowspecialchar will generate column0 always

* TUP-30269 add junit
2021-03-04 15:29:25 +08:00
Emmanuel GALLOIS
4ad4d3e5b2 feat(TDI-45704): bump component-runtime to 1.30.0 (#4091) 2021-03-03 10:05:59 +01:00
wang wei
8031d9adb3 fix(TDI-45563): Runtime Lineage: Compile error seen with "RESPONSE_HEADERS"(#4046) 2021-03-03 16:11:02 +08:00
jiezhang-tlnd
74232f3dc3 chore(TUP-27224)Update Daikon Crypto Utils to 1.15.0 (#4034)
* chore(TUP-27224)Update Daikon Crypto Utils to 1.15.0

* chore(TUP-27224)Update Daikon Crypto Utils to 1.15.0

* fix(TUP-27224)Update Daikon Crypto Utils to 1.15.0
2021-03-01 15:04:33 +08:00
bhe-talendbj
b2e5ab5630 chore(TUP-30230): Remove org.talend.libraries.apache.batik (#4014)
* chore(TUP-30230): Remove org.talend.libraries.apache.batik

* chore(TUP-30230): Remove org.talend.libraries.apache.batik
2021-02-26 14:39:18 +08:00
658 changed files with 20814 additions and 14708 deletions

View File

@@ -65,7 +65,7 @@ Module.view.download.external.modules.action.text=Download external modules
Module.view.download.external.modules.action.description=Download external modules Module.view.download.external.modules.action.description=Download external modules
download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules. download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules.
download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually. download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually.
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products download.external.dialog.help.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
AcceptModuleLicensesWizard.title=Download external modules AcceptModuleLicensesWizard.title=Download external modules
AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all
AcceptModuleLicensesWizardDialog.cancelConfirmation.title=Confirmation AcceptModuleLicensesWizardDialog.cancelConfirmation.title=Confirmation

View File

@@ -1136,7 +1136,7 @@ DatabaseForm.hc.link.none=None
DatabaseForm.hc.link.repository=Repository DatabaseForm.hc.link.repository=Repository
DatabaseForm.hc.link.title=Hadoop Cluster DatabaseForm.hc.link.title=Hadoop Cluster
DatabaseForm.checkFileExist=The file {0} is invalid or doesn't exist DatabaseForm.checkFileExist=The file {0} is invalid or doesn't exist
DatabaseForm.helpInfo.installDriverLink.url=https://help.talend.com/pages/viewpage.action?pageId=14230347 DatabaseForm.helpInfo.installDriverLink.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
DatabaseForm.helpInfo.installDriverLink.label=How to install a driver DatabaseForm.helpInfo.installDriverLink.label=How to install a driver
SelectorTableForm.toolTip=Not available with this database SelectorTableForm.toolTip=Not available with this database
FileStep1.modeButText=Read excel2007 file format(xlsx) FileStep1.modeButText=Read excel2007 file format(xlsx)

View File

@@ -29,7 +29,7 @@
<import plugin="org.eclipse.jdt.launching" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.eclipse.jdt.launching" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.eclipse.jdt.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.hamcrest.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
</requires> </requires>
<plugin id="org.eclipse.jdt.launching.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/> <plugin id="org.eclipse.jdt.launching.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.jdt.launching.ui.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/> <plugin id="org.eclipse.jdt.launching.ui.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

View File

@@ -6,7 +6,6 @@
<license url="http://www.example.com/license">[Enter License Description here.]</license> <license url="http://www.example.com/license">[Enter License Description here.]</license>
<plugin id="org.talend.libraries.jdbc.access" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.talend.libraries.jdbc.access" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.as400" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.talend.libraries.jdbc.as400" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.derby" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.exasol" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.talend.libraries.jdbc.exasol" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.h2" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.talend.libraries.jdbc.h2" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.hsql" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.talend.libraries.jdbc.hsql" download-size="0" install-size="0" version="0.0.0"/>

View File

@@ -12,15 +12,15 @@
<import plugin="com.thoughtworks.paranamer" version="0.0.0" match="greaterOrEqual"/> <import plugin="com.thoughtworks.paranamer" version="0.0.0" match="greaterOrEqual"/>
<import plugin="jackson-core-asl" version="0.0.0" match="greaterOrEqual"/> <import plugin="jackson-core-asl" version="0.0.0" match="greaterOrEqual"/>
<import plugin="jackson-mapper-asl" version="0.0.0" match="greaterOrEqual"/> <import plugin="jackson-mapper-asl" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.codec" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.apache.commons.codec" version="1.14.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.compress" version="1.10.0" match="greaterOrEqual"/> <import plugin="org.apache.commons.compress" version="1.10.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/> <import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/> <import plugin="org.apache.commons.commons-configuration2" version="2.8.0" match="greaterOrEqual"/>
</requires> </requires>
<plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/> <plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/> <plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

View File

@@ -132,3 +132,8 @@ GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been register
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=The xml can't parse. MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=The xml can't parse.
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=The xml can't parse in this format. MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=The xml can't parse in this format.
HibernateUtils.auditDBIsNotUsable=The audit database must be empty or only contains tables related to audit. HibernateUtils.auditDBIsNotUsable=The audit database must be empty or only contains tables related to audit.
CasePushButton.CaseButton.Tip=Uppercase/Lowercase Db column
QuotePushButton.QuoteButton.Tip=Add/Remove Quote on Db column
QuoteManipulateDialog.title=Add/Remove quote on Db column
QuoteManipulateDialog.addQuote=Add quote
QuoteManipulateDialog.removeQuote=Remove quote

View File

@@ -77,6 +77,7 @@ public enum ECoreImage implements IImage {
ROUTES_ICON("/icons1/routes_icon.png"), //$NON-NLS-1$ ROUTES_ICON("/icons1/routes_icon.png"), //$NON-NLS-1$
ROUTINE_ICON("/icons1/routine.png"), //$NON-NLS-1$ ROUTINE_ICON("/icons1/routine.png"), //$NON-NLS-1$
ROUTINE_EDITOR_ICON("/icons1/routine_editor.png"), //$NON-NLS-1$ ROUTINE_EDITOR_ICON("/icons1/routine_editor.png"), //$NON-NLS-1$
ROUTINESJAR_ICON("/icons1/routinesjar.png"), //$NON-NLS-1$
JOB_SCRIPTS_ICON("/icons1/job_scripts.png"), //$NON-NLS-1$ JOB_SCRIPTS_ICON("/icons1/job_scripts.png"), //$NON-NLS-1$
JOB_SCRIPTS_TOOLBAR_ICON("/icons1/job_script_toolbar.png"), //$NON-NLS-1$ JOB_SCRIPTS_TOOLBAR_ICON("/icons1/job_script_toolbar.png"), //$NON-NLS-1$
FTP_ICON("/icons1/ftp.png"), //$NON-NLS-1$ FTP_ICON("/icons1/ftp.png"), //$NON-NLS-1$

View File

@@ -88,6 +88,8 @@ public enum EImage implements IImage {
LEFTX_ICON("/icons/leftx.png"), //$NON-NLS-1$ LEFTX_ICON("/icons/leftx.png"), //$NON-NLS-1$
RIGHT_ICON("/icons/right.gif"), //$NON-NLS-1$ RIGHT_ICON("/icons/right.gif"), //$NON-NLS-1$
RIGHTX_ICON("/icons/rightx.png"), //$NON-NLS-1$ RIGHTX_ICON("/icons/rightx.png"), //$NON-NLS-1$
LOWERCASE_ICON("/icons/lowercase.jpg"), //$NON-NLS-1$
UPPERCASE_ICON("/icons/uppercase.jpg"), //$NON-NLS-1$
KEY_ICON("/icons/key.gif"), //$NON-NLS-1$ KEY_ICON("/icons/key.gif"), //$NON-NLS-1$
HIERARCHY_ICON("/icons/hierarchicalLayout.gif"), //$NON-NLS-1$ HIERARCHY_ICON("/icons/hierarchicalLayout.gif"), //$NON-NLS-1$

View File

@@ -92,14 +92,13 @@
<dependency> <dependency>
<groupId>xerces</groupId> <groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
<version>2.11.0</version> <version>2.12.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>ch.qos.reload4j</groupId>
<artifactId>log4j</artifactId> <artifactId>reload4j</artifactId>
<version>1.2.16</version> <version>1.2.19</version>
<type>bundle</type> </dependency>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@@ -57,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
// TESB-17856: For commandline builds ESB Micorservice bundle // TESB-17856: For commandline builds ESB Micorservice bundle
private static boolean isESBMicorservice = false; private static boolean isESBMicorservice = false;
private static Boolean isJunitWorking;
private static ServiceTracker proxyTracker; private static ServiceTracker proxyTracker;
public static boolean isWorkbenchCreated() { public static boolean isWorkbenchCreated() {
@@ -123,6 +125,35 @@ public class CommonsPlugin implements BundleActivator {
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$ return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
} }
public static boolean isJunitWorking() {
if (isJunitWorking == null) {
try {
String[] args = Platform.getCommandLineArgs();
String applicationId = null;
for (int i = 0; i < args.length - 1; i++) {
if (args[i].equalsIgnoreCase("-application")) { //$NON-NLS-1$
applicationId = args[i + 1];
}
}
if (applicationId != null
&& (applicationId.equals("org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication") //$NON-NLS-1$
|| applicationId.equals("org.eclipse.pde.junit.runtime.uitestapplication"))) { //$NON-NLS-1$
isJunitWorking = true;
} else {
isJunitWorking = false;
}
} catch (Throwable e) {
isJunitWorking = false;
}
}
if (isJunitWorking == null) {
isJunitWorking = false;
}
return isJunitWorking;
}
/** /**
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which * Answer the file associated with name. This handles the case of running as a plugin and running standalone which
* happens during testing. * happens during testing.

View File

@@ -0,0 +1,56 @@
package org.talend.commons.runtime.service;
import java.util.Collection;
import java.util.Collections;
import java.util.Properties;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.talend.commons.exception.CommonExceptionHandler;
public interface ICollectDataService {
final String KEY_SOURCE = "source";
//
final String AMC_FILE_TYPE_USED = "FILE_TYPE_USED";
final String AMC_DATABASE_TYPE_USED = "DATABASE_TYPE_USED";
final String AMC_PREVIEW_KEY = "amc.datasource";
final String AMC_PREVIEW_FILEVALUE = "File";
final String AMC_PREVIEW_DATABASEVALUE = "Database";
/**
* @return json string
*/
String getCollectedDataJSON();
Properties getCollectedData();
public static ICollectDataService getInstance(String from) throws Exception {
BundleContext bc = FrameworkUtil.getBundle(ICollectDataService.class).getBundleContext();
Collection<ServiceReference<ICollectDataService>> tacokitServices = Collections.emptyList();
try {
tacokitServices = bc.getServiceReferences(ICollectDataService.class, null);
} catch (InvalidSyntaxException e) {
CommonExceptionHandler.process(e);
}
if (tacokitServices != null) {
for (ServiceReference<ICollectDataService> sr : tacokitServices) {
if (from == null || from.equals(sr.getProperty(KEY_SOURCE))) {
ICollectDataService tacokitService = bc.getService(sr);
if (tacokitService != null) {
return tacokitService;
}
}
}
}
return null;
}
}

View File

@@ -12,6 +12,8 @@
// ============================================================================ // ============================================================================
package org.talend.commons.runtime.service; package org.talend.commons.runtime.service;
import org.eclipse.core.runtime.IProgressMonitor;
/** /**
* DOC ggu class global comment. Detailled comment * DOC ggu class global comment. Detailled comment
*/ */
@@ -19,6 +21,10 @@ public interface P2InstallComponent {
boolean install(); boolean install();
default boolean install(IProgressMonitor monitor) {
return false;
}
boolean needRelaunch(); boolean needRelaunch();
String getInstalledMessages(); String getInstalledMessages();

View File

@@ -57,6 +57,19 @@ public class Hex {
return out; return out;
} }
public static boolean isNeedConvertToHex(String value) {
if (value == null || "".equals(value.trim())) {
return false;
}
for (int i = 0; i < value.length(); i++) {
int ch = value.charAt(i);
if (ch < 32) {
return true;
}
}
return false;
}
private static int toDigit(char ch, int index) { private static int toDigit(char ch, int index) {
int digit = Character.digit(ch, 16); int digit = Character.digit(ch, 16);
if (digit == -1) { if (digit == -1) {

View File

@@ -30,6 +30,8 @@ public interface IExtendedList<T> extends List<T> {
public void swapElement(T object1, T object2); public void swapElement(T object1, T object2);
public void replaceElement(int index, T object2);
/** /**
* Getter for useEquals. * Getter for useEquals.
* *

View File

@@ -538,6 +538,11 @@ public class ListenableList<T> implements IExtendedList<T> {
return replacedObject; return replacedObject;
} }
@Override
public void replaceElement(int index, T element) {
this.list.set(index, element);
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View File

@@ -16,7 +16,6 @@ import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -109,11 +108,11 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
// MOD yyin 2012-05-15 TDQ-5190 // MOD yyin 2012-05-15 TDQ-5190
String sql = "SELECT DISTINCT CREATOR FROM SYSIBM.SYSTABLES"; //$NON-NLS-1$ String sql = "SELECT DISTINCT CREATOR FROM SYSIBM.SYSTABLES"; //$NON-NLS-1$
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String creator = rs.getString("CREATOR"); //$NON-NLS-1$ String creator = rs.getString("CREATOR"); //$NON-NLS-1$
@@ -331,18 +330,20 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
throws SQLException { throws SQLException {
// for real // for real
String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where TBNAME='" + tableNamePattern + "' AND TBCREATOR = '" //$NON-NLS-1$ //$NON-NLS-2$ String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where TBNAME=? AND TBCREATOR = ? ORDER BY TBCREATOR, TBNAME, COLNO"; //$NON-NLS-1$
+ schemaPattern + "' ORDER BY TBCREATOR, TBNAME, COLNO"; //$NON-NLS-1$
// for test // for test
// String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'"; // String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'";
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, tableNamePattern);
stmt.setString(2, schemaPattern);
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
// For real db2 for zos, should use these code. // For real db2 for zos, should use these code.

View File

@@ -25,7 +25,6 @@ public class JtdsDatabaseMetadata extends PackageFakeDatabaseMetadata {
@Override @Override
public ResultSet getSchemas() throws SQLException { public ResultSet getSchemas() throws SQLException {
java.sql.Statement statement = connection.createStatement();
String sql; String sql;
if (((PackageFakeDatabaseMetadata) connection).getDatabaseMajorVersion() >= 9) { if (((PackageFakeDatabaseMetadata) connection).getDatabaseMajorVersion() >= 9) {
sql = JDBC3 ? "SELECT name AS TABLE_SCHEM, NULL as TABLE_CATALOG FROM " + connection.getCatalog() + ".sys.schemas" sql = JDBC3 ? "SELECT name AS TABLE_SCHEM, NULL as TABLE_CATALOG FROM " + connection.getCatalog() + ".sys.schemas"
@@ -36,6 +35,7 @@ public class JtdsDatabaseMetadata extends PackageFakeDatabaseMetadata {
} }
sql += " ORDER BY TABLE_SCHEM"; sql += " ORDER BY TABLE_SCHEM";
return statement.executeQuery(sql); java.sql.PreparedStatement statement = connection.prepareStatement(sql);
return statement.executeQuery();
} }
} }

View File

@@ -13,9 +13,9 @@
package org.talend.commons.utils.database; package org.talend.commons.utils.database;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -152,15 +152,19 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
// check if the type is contained is in the types needed. // check if the type is contained is in the types needed.
String sqlcv = "SELECT OBJECT_NAME,PACKAGE_ID FROM _SYS_REPO.ACTIVE_OBJECT WHERE OBJECT_SUFFIX = 'calculationview'"; //$NON-NLS-1$ String sqlcv = "SELECT OBJECT_NAME,PACKAGE_ID FROM _SYS_REPO.ACTIVE_OBJECT WHERE OBJECT_SUFFIX = 'calculationview'"; //$NON-NLS-1$
if (tableNamePattern != null && !tableNamePattern.equals("%")) { //$NON-NLS-1$ if (tableNamePattern != null && !tableNamePattern.equals("%")) { //$NON-NLS-1$
sqlcv += " AND (OBJECT_NAME LIKE '" + tableNamePattern + "'"; //$NON-NLS-1$ //$NON-NLS-2$ sqlcv += " AND (OBJECT_NAME LIKE ?"; //$NON-NLS-1$ //$NON-NLS-2$
sqlcv += " OR PACKAGE_ID LIKE '" + tableNamePattern + "')"; //$NON-NLS-1$ //$NON-NLS-2$ sqlcv += " OR PACKAGE_ID LIKE ? )"; //$NON-NLS-1$ //$NON-NLS-2$
} }
ResultSet rscv = null; ResultSet rscv = null;
Statement stmtcv = null; PreparedStatement stmtcv = null;
List<String[]> listcv = new ArrayList<String[]>(); List<String[]> listcv = new ArrayList<String[]>();
try { try {
stmtcv = connection.createStatement(); stmtcv = connection.prepareStatement(sqlcv);
rscv = stmtcv.executeQuery(sqlcv); if (tableNamePattern != null && !tableNamePattern.equals("%")) {
stmtcv.setString(1, tableNamePattern);
stmtcv.setString(2, tableNamePattern);
}
rscv = stmtcv.executeQuery();
while (rscv.next()) { while (rscv.next()) {
String objectName = rscv.getString("OBJECT_NAME"); //$NON-NLS-1$ String objectName = rscv.getString("OBJECT_NAME"); //$NON-NLS-1$
if (objectName != null) { if (objectName != null) {
@@ -303,11 +307,11 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
if (!load) { if (!load) {
String sqlcv = "SELECT * from \"" + schemaPattern + "\".\"" + tableNamePattern + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String sqlcv = "SELECT * from \"" + schemaPattern + "\".\"" + tableNamePattern + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ResultSet rscv = null; ResultSet rscv = null;
Statement stmtcv = null; PreparedStatement stmtcv = null;
List<String[]> listcv = new ArrayList<String[]>(); List<String[]> listcv = new ArrayList<String[]>();
try { try {
stmtcv = connection.createStatement(); stmtcv = connection.prepareStatement(sqlcv);
rscv = stmtcv.executeQuery(sqlcv); rscv = stmtcv.executeQuery();
int i = 1; int i = 1;
while (rscv.next()) { while (rscv.next()) {
String tableName = tableNamePattern; String tableName = tableNamePattern;

View File

@@ -13,9 +13,9 @@
package org.talend.commons.utils.database; package org.talend.commons.utils.database;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -62,11 +62,11 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
// see the feature 5827 // see the feature 5827
String sql = "SELECT DISTINCT LIBNAME FROM SASHELP.VTABLE"; //$NON-NLS-1$ String sql = "SELECT DISTINCT LIBNAME FROM SASHELP.VTABLE"; //$NON-NLS-1$
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String creator = rs.getString("LIBNAME"); //$NON-NLS-1$ String creator = rs.getString("LIBNAME"); //$NON-NLS-1$
@@ -147,17 +147,21 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
public ResultSet getTables(String catalog, String schema, String tableNamePattern, String[] types) throws SQLException { public ResultSet getTables(String catalog, String schema, String tableNamePattern, String[] types) throws SQLException {
String sql; String sql;
if (schema != null) { if (schema != null) {
sql = "SELECT * FROM SASHELP.VTABLE where LIBNAME = '" + schema + "'"; //$NON-NLS-1$ //$NON-NLS-2$ sql = "SELECT * FROM SASHELP.VTABLE where LIBNAME = ?"; //$NON-NLS-1$ //$NON-NLS-2$
} else { } else {
sql = "SELECT * FROM SASHELP.VTABLE"; //$NON-NLS-1$ sql = "SELECT * FROM SASHELP.VTABLE"; //$NON-NLS-1$
} }
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); if (schema != null) {
stmt.setString(1, schema);
}
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String name = rs.getString("MEMNAME"); //$NON-NLS-1$ String name = rs.getString("MEMNAME"); //$NON-NLS-1$
@@ -229,18 +233,20 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
throws SQLException { throws SQLException {
// for real // for real
String sql = "SELECT * FROM SASHELP.VCOLUMN where MEMNAME='" + tableNamePattern + "' AND LIBNAME = '" //$NON-NLS-1$ //$NON-NLS-2$ String sql = "SELECT * FROM SASHELP.VCOLUMN where MEMNAME=? AND LIBNAME = ? ORDER BY LIBNAME, MEMNAME, VARNUM"; //$NON-NLS-1$
+ schemaPattern + "' ORDER BY LIBNAME, MEMNAME, VARNUM"; //$NON-NLS-1$
// for test // for test
// String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'"; // String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'";
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, tableNamePattern);
stmt.setString(2, schemaPattern);
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String tableName = rs.getString("MEMNAME"); //$NON-NLS-1$ String tableName = rs.getString("MEMNAME"); //$NON-NLS-1$
if (tableName != null) { if (tableName != null) {

View File

@@ -13,9 +13,9 @@
package org.talend.commons.utils.database; package org.talend.commons.utils.database;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -52,10 +52,12 @@ public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
for (String catalogName : catList) { for (String catalogName : catList) {
String sql = createSqlByLoginAndCatalog(login, catalogName); String sql = createSqlByLoginAndCatalog(login, catalogName);
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, login);
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
int temp = rs.getInt(1); int temp = rs.getInt(1);
@@ -113,8 +115,7 @@ public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
*/ */
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) { protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
String sql = "select count(*) from " + catalogName String sql = "select count(*) from " + catalogName
+ ".dbo.sysusers where suid in (select suid from "+catalogName+".dbo.syslogins where name = '" + loginName + ".dbo.sysusers where suid in (select suid from " + catalogName + ".dbo.syslogins where name = ? )";
+ "')";
return sql; return sql;
} }

View File

@@ -13,9 +13,9 @@
package org.talend.commons.utils.database; package org.talend.commons.utils.database;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -54,10 +54,13 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
for (String catalogName : catList) { for (String catalogName : catList) {
String sql = createSqlByLoginAndCatalog(login, catalogName); String sql = createSqlByLoginAndCatalog(login, catalogName);
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, login);
stmt.setString(2, login);
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
int temp = rs.getInt(1); int temp = rs.getInt(1);
@@ -92,11 +95,11 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException {
String sql = "SELECT DISTINCT name FROM " + catalog + ".dbo.sysusers where suid > 0"; //$NON-NLS-1$ //$NON-NLS-2$ String sql = "SELECT DISTINCT name FROM " + catalog + ".dbo.sysusers where suid > 0"; //$NON-NLS-1$ //$NON-NLS-2$
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String name = rs.getString("name"); //$NON-NLS-1$ String name = rs.getString("name"); //$NON-NLS-1$
@@ -136,9 +139,9 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
*/ */
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) { protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
return "select count(*) from " + catalogName //$NON-NLS-1$ return "select count(*) from " + catalogName //$NON-NLS-1$
+ ".dbo.sysusers where suid in (select suid from master.dbo.syslogins where name = '" + loginName //$NON-NLS-1$ + ".dbo.sysusers where suid in (select suid from master.dbo.syslogins where name = ?"
+ "') or suid in (select altsuid from " + catalogName //$NON-NLS-1$ + ") or suid in (select altsuid from " + catalogName //$NON-NLS-1$
+ ".dbo.sysalternates a, master.dbo.syslogins b where b.name = '" + loginName + "' and a.suid = b.suid)"; //$NON-NLS-1$ //$NON-NLS-2$ + ".dbo.sysalternates a, master.dbo.syslogins b where b.name = ? and a.suid = b.suid)"; //$NON-NLS-1$ //$NON-NLS-2$
} }
@Override @Override

View File

@@ -13,9 +13,9 @@
package org.talend.commons.utils.database; package org.talend.commons.utils.database;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -97,13 +97,12 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion(); int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion();
String sql = "HELP COLUMN \"" + schema + "\".\"" + table + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ String sql = "HELP COLUMN \"" + schema + "\".\"" + table + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
String columnName = null; String columnName = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
if (dbMajorVersion > 12) { if (dbMajorVersion > 12) {
sql = "SELECT * from DBC.INDICESV WHERE UPPER(databasename) = UPPER('" + schema //$NON-NLS-1$ sql = "SELECT * from DBC.INDICESV WHERE UPPER(databasename) = UPPER(?) AND UPPER(tablename) = UPPER(?) AND UPPER(UniqueFlag) = UPPER('Y')"; //$NON-NLS-1$ //$NON-NLS-2$
+ "') AND UPPER(tablename) = UPPER('" + table + "') AND UPPER(UniqueFlag) = UPPER('Y')"; //$NON-NLS-1$//$NON-NLS-2$
rs = getResultSet(catalog, schema, table, sql); rs = getResultSet(catalog, schema, table, sql);
while (rs.next()) { while (rs.next()) {
columnName = rs.getString("ColumnName").trim(); //$NON-NLS-1$ columnName = rs.getString("ColumnName").trim(); //$NON-NLS-1$
@@ -112,8 +111,11 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
list.add(r); list.add(r);
} }
} else { } else {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, schema);
stmt.setString(2, table);
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$ columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
String pk = rs.getString("Primary?");//$NON-NLS-1$ String pk = rs.getString("Primary?");//$NON-NLS-1$
@@ -138,10 +140,10 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
public ResultSet getResultSet(String catalog, String schema, String table, String sql) throws SQLException { public ResultSet getResultSet(String catalog, String schema, String table, String sql) throws SQLException {
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery();
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@@ -203,17 +205,15 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
sysTable = "DBC.TABLESV";//$NON-NLS-1$ sysTable = "DBC.TABLESV";//$NON-NLS-1$
} }
if (types != null && types.length > 0) { if (types != null && types.length > 0) {
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$ sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER(?) AND tablekind " + addTypesToSql(types); //$NON-NLS-1$
+ "') AND tablekind " + addTypesToSql(types); //$NON-NLS-1$
} else { } else {
// When the types is empty, all the tables and views will be retrieved. // When the types is empty, all the tables and views will be retrieved.
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$ sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER(?) AND (tablekind = 'T' or tablekind = 'V')"; //$NON-NLS-1$
+ "') AND (tablekind = 'T' or tablekind = 'V')"; //$NON-NLS-1$
} }
// add the filter for table/views // add the filter for table/views
if (!StringUtils.isEmpty(tableNamePattern)) { if (!StringUtils.isEmpty(tableNamePattern)) {
sql = sql + " AND tablename LIKE '" + tableNamePattern + "'";//$NON-NLS-1$//$NON-NLS-2$ sql = sql + " AND tablename LIKE ?";//$NON-NLS-1$ //$NON-NLS-2$
} }
if (types != null && types.length > 0) { if (types != null && types.length > 0) {
@@ -223,11 +223,18 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
} }
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); stmt.setString(1, database);
// add the filter for table/views
if (!StringUtils.isEmpty(tableNamePattern)) {
stmt.setString(2, tableNamePattern);
}
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String name = rs.getString("TableName").trim(); //$NON-NLS-1$ String name = rs.getString("TableName").trim(); //$NON-NLS-1$
@@ -326,21 +333,33 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
if (!StringUtils.isEmpty(database)) { if (!StringUtils.isEmpty(database)) {
sql = "HELP COLUMN \"" + database + "\".\"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ sql = "HELP COLUMN \"" + database + "\".\"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
if (dbMajorVersion > 12) { if (dbMajorVersion > 12) {
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$ sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(databasename) = UPPER(?) AND UPPER(tablename) = UPPER(?)" //$NON-NLS-1$
+ "') AND UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ + " Order by tablename "; //$NON-NLS-1$ //$NON-NLS-3$
} }
} else { } else {
sql = "HELP COLUMN \"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$ sql = "HELP COLUMN \"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$
if (dbMajorVersion > 12) { if (dbMajorVersion > 12) {
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(tablename) = UPPER(?)" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$
// //$NON-NLS-3$
} }
} }
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; PreparedStatement stmt = null;
List<String[]> list = new ArrayList<String[]>(); List<String[]> list = new ArrayList<String[]>();
try { try {
stmt = connection.createStatement(); stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery(sql); if (!StringUtils.isEmpty(database)) {
if (dbMajorVersion > 12) {
stmt.setString(1, database);
stmt.setString(2, tableNamePattern);
}
} else {
if (dbMajorVersion > 12) {
stmt.setString(1, tableNamePattern);
}
}
rs = stmt.executeQuery();
while (rs.next()) { while (rs.next()) {
String tableName = tableNamePattern; String tableName = tableNamePattern;
String columnName = null; String columnName = null;

View File

@@ -277,6 +277,10 @@ public class NetworkUtil {
if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) { if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) {
String addr = inetAddress.getHostAddress(); String addr = inetAddress.getHostAddress();
if (!addr.startsWith("[") || !addr.endsWith("]")) { if (!addr.startsWith("[") || !addr.endsWith("]")) {
int idx = addr.indexOf("%");
if (idx > 0) {
addr = addr.substring(0, idx);
}
addr = "[" + addr + "]"; addr = "[" + addr + "]";
} }
return addr; return addr;

View File

@@ -13,13 +13,13 @@
package org.talend.commons.utils.time; package org.talend.commons.utils.time;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Properties; import java.util.Properties;
import java.util.Random; import java.util.Random;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -82,7 +82,7 @@ public class PerformanceStatisticUtil {
public static void recordStartupEpapsedTime(double elapsedTimeInSeconds) { public static void recordStartupEpapsedTime(double elapsedTimeInSeconds) {
File file = getRecordingFile(); File file = getRecordingFile();
Properties props = read(file, true); Properties props = PropertiesFileUtil.read(file, true);
String propCount = props.getProperty(StatisticKeys.STARTUP_COUNT.get(), "0"); String propCount = props.getProperty(StatisticKeys.STARTUP_COUNT.get(), "0");
String propMax = props.getProperty(StatisticKeys.STARTUP_MAX.get(), "0"); String propMax = props.getProperty(StatisticKeys.STARTUP_MAX.get(), "0");
String propAverage = props.getProperty(StatisticKeys.STARTUP_AVERAGE.get(), "0"); String propAverage = props.getProperty(StatisticKeys.STARTUP_AVERAGE.get(), "0");
@@ -99,7 +99,7 @@ public class PerformanceStatisticUtil {
props.setProperty(StatisticKeys.STARTUP_MAX.get(), "" + iPropMax); props.setProperty(StatisticKeys.STARTUP_MAX.get(), "" + iPropMax);
props.setProperty(StatisticKeys.STARTUP_AVERAGE.get(), "" + iPropAverage); props.setProperty(StatisticKeys.STARTUP_AVERAGE.get(), "" + iPropAverage);
store(file, props); PropertiesFileUtil.store(file, props);
} }
public static File getRecordingFile() { public static File getRecordingFile() {
@@ -108,7 +108,27 @@ public class PerformanceStatisticUtil {
} }
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath(); String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
File file = new File(configurationLocation + "/" + recordingFileName); File file = new File(configurationLocation + "/data_collector/" + recordingFileName);
File oldFile = new File(configurationLocation + "/" + recordingFileName);
if(oldFile.exists()) {
if(!file.exists()) {
if(!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
try {
Files.move(Paths.get(oldFile.toURI()), Paths.get(file.toURI()), StandardCopyOption.ATOMIC_MOVE);
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
}
try {
Files.deleteIfExists(Paths.get(oldFile.toURI()));
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
}
return file; return file;
} }
@@ -116,67 +136,13 @@ public class PerformanceStatisticUtil {
recordingFile = _recordingFile; recordingFile = _recordingFile;
} }
public static synchronized Properties read(File recordFile, boolean createIfNotExist) { public static void reset() {
Properties props = new Properties(); File _recordingFile = getRecordingFile();
if (recordFile != null && exist(recordFile, createIfNotExist)) { try {
FileInputStream inStream = null; Files.deleteIfExists(Paths.get(_recordingFile.toURI()));
try { } catch (IOException e) {
inStream = new FileInputStream(recordFile); CommonExceptionHandler.log(e.getMessage());
props.load(inStream);
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (inStream != null) {
try {
inStream.close();
} catch (IOException e) {//
}
}
}
} }
return props;
}
public static synchronized void store(File recordFile, Properties props) {
if (props == null) {
return;
}
if (recordFile != null && exist(recordFile, true)) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(recordFile);
props.store(outputStream, "");
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//
}
}
}
}
}
private static boolean exist(File recordFile, boolean createIfNotExist) {
boolean exists = recordFile.exists();
if (!exists && createIfNotExist) {
try {
exists = recordFile.createNewFile();
if (!exists) {
throw new FileNotFoundException(recordFile.getName());
}
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
return false;
}
}
return exists;
} }
private static Lock lock = new ReentrantLock(); private static Lock lock = new ReentrantLock();
@@ -210,7 +176,7 @@ public class PerformanceStatisticUtil {
private static void _measureIO() { private static void _measureIO() {
File file = getRecordingFile(); File file = getRecordingFile();
Properties props = read(file, true); Properties props = PropertiesFileUtil.read(file, true);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
File workspace = root.getLocation().makeAbsolute().toFile(); File workspace = root.getLocation().makeAbsolute().toFile();
@@ -221,7 +187,7 @@ public class PerformanceStatisticUtil {
measureWrite(props, testFile); measureWrite(props, testFile);
measureRead(props, testFile); measureRead(props, testFile);
store(file, props); PropertiesFileUtil.store(file, props);
} }
} }

View File

@@ -0,0 +1,55 @@
// ============================================================================
//
// 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.utils.time;
import java.io.File;
import java.util.Properties;
import org.eclipse.core.runtime.Platform;
public class PropertiesCollectorUtil {
private static final String ROOT_NODE = "additional_packages_records"; // additional packages
private static final String PREF_ADDITIONAL_PACKAGES = "AdditionalPackages"; // preference node
private static final String ADDITONAL_PACKAGE_FILE = "additionalPackages";
public static String getAdditionalPackageRecording() {
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
Properties props = PropertiesFileUtil.read(file, true);
String records = props.getProperty(ROOT_NODE, "");
return records;
}
public static void storeAdditionalPackageRecording(String records) {
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
Properties props = PropertiesFileUtil.read(file, false);
props.setProperty(ROOT_NODE, records);
PropertiesFileUtil.store(file, props);
}
private static File getRecordFile(String fileName) {
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
File file = new File(configurationLocation + "/data_collector/" + fileName);
return file;
}
public static String getAdditionalPackagePreferenceNode() {
return PREF_ADDITIONAL_PACKAGES;
}
}

View File

@@ -0,0 +1,93 @@
// ============================================================================
//
// 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.utils.time;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
import org.talend.commons.exception.CommonExceptionHandler;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class PropertiesFileUtil {
public static synchronized Properties read(File recordFile, boolean createIfNotExist) {
Properties props = new Properties();
if (recordFile != null && exist(recordFile, createIfNotExist)) {
FileInputStream inStream = null;
try {
inStream = new FileInputStream(recordFile);
props.load(inStream);
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (inStream != null) {
try {
inStream.close();
} catch (IOException e) {//
}
}
}
}
return props;
}
public static synchronized void store(File recordFile, Properties props) {
if (props == null) {
return;
}
if (recordFile != null && exist(recordFile, true)) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(recordFile);
props.store(outputStream, "");
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//
}
}
}
}
}
public static boolean exist(File recordFile, boolean createIfNotExist) {
boolean exists = recordFile.exists();
if (!exists && createIfNotExist) {
try {
if(!recordFile.getParentFile().exists()) {
recordFile.getParentFile().mkdirs();
}
exists = recordFile.createNewFile();
if (!exists) {
throw new FileNotFoundException(recordFile.getName());
}
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
return false;
}
}
return exists;
}
}

View File

@@ -12,16 +12,28 @@
// ============================================================================ // ============================================================================
package org.talend.commons.utils.workbench.extensions; package org.talend.commons.utils.workbench.extensions;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.IllegalPluginConfigurationException; import org.talend.commons.exception.IllegalPluginConfigurationException;
import org.talend.commons.i18n.internal.Messages; import org.talend.commons.i18n.internal.Messages;
import org.talend.utils.json.JSONException;
import org.talend.utils.json.JSONObject;
/** /**
* Utilities class uses to get implementation of extension points defined by plug-ins. <br/> * Utilities class uses to get implementation of extension points defined by plug-ins. <br/>
@@ -36,6 +48,10 @@ public abstract class ExtensionImplementationProvider<I> {
private String plugInId; private String plugInId;
public final static String FILE_FEATURES_INDEX = "extra_feature.index";
public final static String DROP_BUNDLE_INFO = "drop.bundle.info";
/** /**
* Default Constructor. Must not be used. * Default Constructor. Must not be used.
*/ */
@@ -166,9 +182,17 @@ public abstract class ExtensionImplementationProvider<I> {
} }
IExtension[] extensions = pt.getExtensions(); IExtension[] extensions = pt.getExtensions();
Map<String, String> dropBundles = null;
try {
dropBundles = getDropBundleInfo();
} catch (IOException e) {
ExceptionHandler.process(e);
}
for (IExtension extension : extensions) { for (IExtension extension : extensions) {
if (dropBundles != null && dropBundles.containsKey(extension.getNamespaceIdentifier())
&& StringUtils.isEmpty(dropBundles.get(extension.getNamespaceIdentifier()))) {
continue;
}
if (plugInId == null || extension.getNamespaceIdentifier().equals(plugInId)) { if (plugInId == null || extension.getNamespaceIdentifier().equals(plugInId)) {
String configurationElementName = extensionPointLimiter.getConfigurationElementName(); String configurationElementName = extensionPointLimiter.getConfigurationElementName();
if (configurationElementName != null) { if (configurationElementName != null) {
@@ -196,6 +220,32 @@ public abstract class ExtensionImplementationProvider<I> {
return toReturn; return toReturn;
} }
/**********************************************************
* Copied from org.talend.commons.configurator
**********************************************************/
public Map<String, String> getDropBundleInfo() throws IOException {
File indexFile = new File(ConfigurationScope.INSTANCE.getLocation().toFile(), FILE_FEATURES_INDEX);
if (!indexFile.exists()) {
return Collections.emptyMap();
}
Map<String, String> dropInfoMap = new HashMap<>();
try {
String jsonStr = new String(Files.readAllBytes(indexFile.toPath()));
if (!jsonStr.isEmpty()) {
JSONObject obj = new JSONObject(jsonStr);
JSONObject dropInfo = obj.getJSONObject(DROP_BUNDLE_INFO);
Iterator<String> iterator = dropInfo.keys();
while (iterator.hasNext()) {
String key = iterator.next();
dropInfoMap.put(key, dropInfo.getString(key));
}
}
} catch (JSONException e) {
throw new IOException(e);
}
return dropInfoMap;
}
/** /**
* DOC amaumont Comment method "createAndAddImplementation". * DOC amaumont Comment method "createAndAddImplementation".
* *

View File

@@ -76,6 +76,8 @@ ExtendedTableMoveCommand.MoveLabel=Move up or down, one or more table entries
ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard
ExtendedTableRemoveCommand.Romve.Label=Remove table entries ExtendedTableRemoveCommand.Romve.Label=Remove table entries
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults
ExtendedTableCaseCommand.case.Label=Change selected DB columns to uppercase/lowercase
ExtendedTableQuoteCommand.Quote.Label=Quote selected DB columns
ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file
ImportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred ImportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
LabelledFileField.BrowseButton.Text=Browse... LabelledFileField.BrowseButton.Text=Browse...

View File

@@ -0,0 +1,172 @@
// ============================================================================
//
// 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.advanced.composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
/**
* This class is used for constructing 2 composites, putting 1 sashes in the middle composite, which is used for
* changing other 2 composites.
*
*/
public class TwoCompositesSashForm extends Composite {
public static final int SASH_WIDTH = 3;
private Composite leftComposite;
private Composite rightComposite;
private Sash midSash;
/**
* Initialize.
*
* @param parent
* @param style
*/
public TwoCompositesSashForm(Composite parent, int style) {
super(parent, style);
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
gridLayout.marginBottom = 0;
gridLayout.marginHeight = 0;
gridLayout.marginLeft = 0;
gridLayout.marginRight = 0;
gridLayout.marginTop = 0;
gridLayout.marginWidth = 0;
gridLayout.horizontalSpacing = 0;
setLayout(gridLayout);
final GridData gridData = new GridData(GridData.FILL_BOTH);
setLayoutData(gridData);
addComponents();
addSashListeners();
}
/**
* Changes all widgets's position when sash was moved.
*
* @param shift
*/
private void setCompositesBounds(int shift) {
// Set mid Composite Width.
int midSashPreLocation = midSash.getBounds().x;
midSash.setLocation(midSashPreLocation + shift, midSash.getBounds().y);
if (midSash.getBounds().x > 0) {
if (midSashPreLocation < 0) {
leftComposite.setSize(leftComposite.getBounds().width + shift + midSashPreLocation, leftComposite
.getBounds().height);
} else {
leftComposite.setSize(leftComposite.getBounds().width + shift, leftComposite.getBounds().height);
}
} else {
leftComposite.setSize(0, leftComposite.getBounds().height);
}
// Set Right Composte Width.
rightComposite.setLocation(rightComposite.getBounds().x + shift, rightComposite.getBounds().y);
rightComposite.setSize(rightComposite.getBounds().width - shift, rightComposite.getBounds().height);
}
public Composite getLeftComposite() {
return this.leftComposite;
}
public Composite getRightComposite() {
return this.rightComposite;
}
private void addSashListeners() {
midSash.addListener(SWT.Selection, new Listener() {
/*
* (non-Java)
*
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
public void handleEvent(Event event) {
int shift = event.x - midSash.getBounds().x;
setCompositesBounds(shift);
}
});
}
private void addComponents() {
leftComposite = new Composite(this, SWT.NONE);
GridLayout gridLayout = new GridLayout();
gridLayout.marginBottom = 0;
gridLayout.marginHeight = 0;
gridLayout.marginLeft = 0;
gridLayout.marginRight = 0;
gridLayout.marginTop = 0;
gridLayout.marginWidth = 0;
gridLayout.horizontalSpacing = 0;
GridData gridData = new GridData(GridData.FILL_BOTH);
leftComposite.setLayout(gridLayout);
leftComposite.setLayoutData(gridData);
midSash = new Sash(this, SWT.VERTICAL | SWT.SMOOTH);
GridData gridData2 = new GridData(GridData.FILL_VERTICAL);
midSash.setLayoutData(gridData2);
midSash.setSize(SASH_WIDTH, midSash.getBounds().height);
rightComposite = new Composite(this, SWT.NONE);
GridLayout gridLayout3 = new GridLayout();
gridLayout3.marginBottom = 0;
gridLayout3.marginHeight = 0;
gridLayout3.marginLeft = 0;
gridLayout3.marginRight = 0;
gridLayout3.marginTop = 0;
gridLayout3.marginWidth = 0;
gridLayout3.horizontalSpacing = 0;
rightComposite.setLayout(gridLayout3);
GridData gridData4 = new GridData(GridData.FILL_BOTH);
rightComposite.setLayoutData(gridData4);
}
public void setGridDatas() {
Composite composite = (Composite) leftComposite.getChildren()[0];
GridLayout gridLayout2 = new GridLayout();
gridLayout2.marginBottom = 0;
gridLayout2.marginHeight = 0;
gridLayout2.marginLeft = 0;
gridLayout2.marginRight = 0;
gridLayout2.marginTop = 0;
gridLayout2.marginWidth = 0;
gridLayout2.horizontalSpacing = 0;
composite.setLayout(gridLayout2);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite composite2 = (Composite) rightComposite.getChildren()[0];
gridLayout2 = new GridLayout();
gridLayout2.marginBottom = 0;
gridLayout2.marginHeight = 0;
gridLayout2.marginLeft = 0;
gridLayout2.marginRight = 0;
gridLayout2.marginTop = 0;
gridLayout2.marginWidth = 0;
gridLayout2.horizontalSpacing = 0;
composite2.setLayout(gridLayout2);
composite2.setLayoutData(new GridData(GridData.FILL_BOTH));
}
}

View File

@@ -27,11 +27,13 @@ import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveDownPushButtonFo
import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButtonForExtendedTable; import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButtonForExtendedTable;
import org.talend.commons.ui.swt.advanced.dataeditor.button.PastePushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.PastePushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.QuotePushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButtonForExtendedTable; import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButtonForExtendedTable;
import org.talend.commons.ui.swt.advanced.dataeditor.button.ResetDBTypesPushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.ResetDBTypesPushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.SaveAsGenericSchemaPushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.SaveAsGenericSchemaPushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.SelectContextVariablesPushButton; import org.talend.commons.ui.swt.advanced.dataeditor.button.SelectContextVariablesPushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.button.CasePushButton;
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton; import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer; import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
@@ -68,6 +70,10 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
protected SelectContextVariablesPushButton selectContextVariablesButton; protected SelectContextVariablesPushButton selectContextVariablesButton;
protected CasePushButton caseButton;
protected QuotePushButton quoteButton;
/** /**
* DOC amaumont MatadataToolbarEditor constructor comment. * DOC amaumont MatadataToolbarEditor constructor comment.
* *
@@ -104,6 +110,10 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
addallButton = createAddAllPushButton(); addallButton = createAddAllPushButton();
caseButton = createCasePushButton();
quoteButton = createQuotePushButton();
exportButton = createExportPushButton(); exportButton = createExportPushButton();
importButton = createImportPushButton(); importButton = createImportPushButton();
@@ -170,6 +180,14 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
return null; return null;
} }
protected CasePushButton createCasePushButton() {
return null;
}
protected QuotePushButton createQuotePushButton() {
return null;
}
/** /**
* Getter for addButton. * Getter for addButton.
* *
@@ -328,6 +346,14 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
list.add(getAddallButton()); list.add(getAddallButton());
} }
if (getCaseButton() != null) {
list.add(getCaseButton());
}
if (getQuoteButton() != null) {
list.add(getQuoteButton());
}
return list; return list;
} }
@@ -348,6 +374,26 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
public AddAllPushButton getAddallButton() { public AddAllPushButton getAddallButton() {
return this.addallButton; return this.addallButton;
} }
/**
* Getter for caseButton.
*
* @return the caseButton
*/
public CasePushButton getCaseButton() {
return this.caseButton;
}
/**
* Getter for quoteButton.
*
* @return the quoteButton
*/
public QuotePushButton getQuoteButton() {
return this.quoteButton;
}
} }
// //

View File

@@ -0,0 +1,48 @@
// ============================================================================
//
// 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.advanced.dataeditor.button;
import org.eclipse.gef.commands.Command;
import org.eclipse.swt.widgets.Composite;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
import org.talend.commons.ui.swt.extended.table.AbstractExtendedControlViewer;
public abstract class CasePushButton extends ExtendedPushButton {
/**
* DOC CasePushButton constructor comment.
*
* @param parent
* @param extendedControlViewer
*/
public CasePushButton(Composite parent, AbstractExtendedControlViewer extendedControlViewer) {
super(parent, extendedControlViewer,
Messages.getString("CasePushButton.CaseButton.Tip"), ImageProvider.getImage(EImage.UPPERCASE_ICON)); //$NON-NLS-1$
}
protected abstract Command getCommandToExecute();
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#getEnabledState()
*/
@Override
public boolean getEnabledState() {
return super.getEnabledState() && !getExtendedControlViewer().isReadOnly();
}
}

View File

@@ -0,0 +1,87 @@
// ============================================================================
//
// 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.advanced.dataeditor.button;
import java.util.Arrays;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Composite;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
public abstract class CasePushButtonForExtendedTable extends CasePushButton implements IExtendedTablePushButton {
private EnableStateListenerForTableButton enableStateHandler;
private boolean isUpperCase = true;
/**
* DOC CasePushButtonForExtendedTable constructor comment.
*
* @param parent
* @param extendedControlViewer
*/
public CasePushButtonForExtendedTable(Composite parent, AbstractExtendedTableViewer extendedTableViewer) {
super(parent, extendedTableViewer);
this.enableStateHandler = new EnableStateListenerForTableButton(this);
}
@Override
protected void afterCommandExecution(Command executedCommand) {
super.afterCommandExecution(executedCommand);
if (isUpperCase) {
this.getButton().setToolTipText( Messages.getString("CasePushButton.CaseButton.Tip"));
this.getButton().setImage(ImageProvider.getImage(EImage.LOWERCASE_ICON));
this.isUpperCase = false;
} else {
this.getButton().setToolTipText( Messages.getString("CasePushButton.CaseButton.Tip"));
this.getButton().setImage(ImageProvider.getImage(EImage.UPPERCASE_ICON));
this.isUpperCase = true;
}
}
@Override
protected Command getCommandToExecute() {
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
TableViewer tableViewer = extendedTableViewer.getTableViewerCreator().getTableViewer();
ISelection selection = tableViewer.getSelection();
StructuredSelection structuredSelection = (StructuredSelection) selection;
Object[] objects = structuredSelection.toArray();
int[] selectionIndices = extendedTableViewer.getTableViewerCreator().getTable().getSelectionIndices();
return getCommandToExecute(extendedTableModel, Arrays.asList(objects), selectionIndices, isUpperCase);
}
protected abstract Command getCommandToExecute(ExtendedTableModel extendedTable, List beansToUppercase, int[] selectionIndices, boolean isUpperCase);
/*
* (non-Javadoc)
*
* @see org.talend.core.ui.extended.button.IExtendedTablePushButton#getExtendedTableViewer()
*/
public AbstractExtendedTableViewer getExtendedTableViewer() {
return (AbstractExtendedTableViewer) getExtendedControlViewer();
}
@Override
public boolean getEnabledState() {
return super.getEnabledState() && this.enableStateHandler.getEnabledState();
}
}

View File

@@ -0,0 +1,57 @@
// ============================================================================
//
// 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.advanced.dataeditor.button;
import org.eclipse.swt.widgets.Composite;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
import org.talend.commons.ui.swt.extended.table.AbstractExtendedControlViewer;
public abstract class QuotePushButton extends ExtendedPushButton {
private String dbmsId = null;
/**
* DOC QuotePushButton constructor comment.
*
* @param parent
* @param extendedControlViewer
*/
public QuotePushButton(Composite parent, AbstractExtendedControlViewer extendedControlViewer) {
super(parent, extendedControlViewer,
Messages.getString("QuotePushButton.QuoteButton.Tip"), ImageProvider.getImage(EImage.EDIT_ICON)); //$NON-NLS-1$
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#getEnabledState()
*/
@Override
public boolean getEnabledState() {
return super.getEnabledState() && !getExtendedControlViewer().isReadOnly();
}
public String getDbmsId() {
return dbmsId;
}
public void setDbmsId(String dbmsId) {
this.dbmsId = dbmsId;
}
}

View File

@@ -0,0 +1,205 @@
// ============================================================================
//
// 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.advanced.dataeditor.button;
import java.util.Arrays;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
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.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
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.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
public abstract class QuotePushButtonForExtendedTable extends QuotePushButton implements IExtendedTablePushButton {
private String quote = null;
private boolean isAddingQuote = true;
private EnableStateListenerForTableButton enableStateHandler;
/**
* DOC SchemaTargetAddPushButton constructor comment.
*
* @param parent
* @param extendedControlViewer
*/
public QuotePushButtonForExtendedTable(Composite parent, AbstractExtendedTableViewer extendedTableViewer) {
super(parent, extendedTableViewer);
this.enableStateHandler = new EnableStateListenerForTableButton(this);
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#beforeCommandExecution()
*/
@Override
protected void beforeCommandExecution() {
QuoteManipulateDialog dlg = new QuoteManipulateDialog(getButton().getShell());
if (dlg.open() == Window.OK) {
this.quote = dlg.getQuote();
this.isAddingQuote = dlg.isAddingQuote();
}
}
protected Command getCommandToExecute() {
if (quote == null) return null;
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
TableViewer tableViewer = extendedTableViewer.getTableViewerCreator().getTableViewer();
ISelection selection = tableViewer.getSelection();
StructuredSelection structuredSelection = (StructuredSelection) selection;
Object[] objects = structuredSelection.toArray();
int[] selectionIndices = extendedTableViewer.getTableViewerCreator().getTable().getSelectionIndices();
return getCommandToExecute(extendedTableModel, Arrays.asList(objects), selectionIndices, quote, isAddingQuote );
}
protected abstract Command getCommandToExecute(ExtendedTableModel extendedTable, List beansToUppercase, int[] selectionIndices, String quote, boolean isAddingQuote);
/*
* (non-Javadoc)
*
* @see org.talend.core.ui.extended.button.IExtendedTablePushButton#getExtendedTableViewer()
*/
public AbstractExtendedTableViewer getExtendedTableViewer() {
return (AbstractExtendedTableViewer) getExtendedControlViewer();
}
@Override
public boolean getEnabledState() {
return super.getEnabledState() && this.enableStateHandler.getEnabledState();
}
class QuoteManipulateDialog extends Dialog {
private Button addBtn;
private Button removeBtn;
private Text quoteTxt;
private Button okBtn;
boolean isAddingQuote = true;
String quote = "";
public QuoteManipulateDialog(Shell parentShel) {
super(parentShel);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
*/
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(Messages.getString("QuoteManipulateDialog.title"));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
*/
protected void createButtonsForButtonBar(Composite parent) {
// create OK and Cancel buttons by default
okBtn = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
okBtn.setEnabled(false);
}
/*
* (non-Javadoc) Method declared on Dialog.
*/
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 4;
composite.setLayout(layout);
GridData layoutData = new GridData(GridData.FILL_BOTH);
layoutData.widthHint = 400;
composite.setLayoutData(layoutData);
addBtn = new Button(composite, SWT.RADIO);
addBtn.setSelection(true);
Label label = new Label(composite, SWT.WRAP);
label.setText(Messages.getString("QuoteManipulateDialog.addQuote")); //$NON-NLS-1$
removeBtn = new Button(composite, SWT.RADIO);
Label label1 = new Label(composite, SWT.WRAP);
label1.setText(Messages.getString("QuoteManipulateDialog.removeQuote")); //$NON-NLS-1$
quoteTxt = new Text(composite, SWT.SINGLE | SWT.BORDER);
layoutData = new GridData(GridData.FILL_HORIZONTAL);
layoutData.horizontalSpan = 4;
quoteTxt.setLayoutData(layoutData);
quoteTxt.setText("");
quoteTxt.setFocus();
addBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
isAddingQuote = true;
quoteTxt.setFocus();
quote = quoteTxt.getText();
}
});
removeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
isAddingQuote = false;
quoteTxt.setFocus();
quote = quoteTxt.getText();
}
});
quoteTxt.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
quote = quoteTxt.getText();
if ( quote != null && quote.length() > 0) {
okBtn.setEnabled(true);
} else {
okBtn.setEnabled(false);
}
}
});
return composite;
}
public boolean isAddingQuote() {
return this.isAddingQuote;
}
public String getQuote() {
return this.quote;
}
}
}

View File

@@ -0,0 +1,88 @@
// ============================================================================
//
// 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.advanced.dataeditor.commands;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
public abstract class ExtendedTableCaseCommand extends Command implements IExtendedTableCommand {
private ExtendedTableModel extendedTable;
private List beansToCovertCase;
private int[] selectionIndices;
private boolean isUpperCase;
public static final String LABEL = Messages.getString("ExtendedTableCaseCommand.case.Label"); //$NON-NLS-1$
/**
* DOC ExtendedTableCaseCommand constructor comment.
*/
@SuppressWarnings("unchecked")//$NON-NLS-1$
public ExtendedTableCaseCommand(ExtendedTableModel extendedTable, List beansToCovertCase, int[] selectionIndices, boolean isUpperCase) {
super(LABEL);
this.extendedTable = extendedTable;
this.beansToCovertCase = new ArrayList(beansToCovertCase);
this.selectionIndices = selectionIndices;
this.isUpperCase = isUpperCase;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.commands.Command#execute()
*/
@Override
public void execute() {
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
}
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#canUndo()
*/
@Override
public boolean canUndo() {
return false;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#redo()
*/
@Override
public void redo() {
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#undo()
*/
@Override
public void undo() {
}
}

View File

@@ -0,0 +1,90 @@
// ============================================================================
//
// 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.advanced.dataeditor.commands;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
public abstract class ExtendedTableQuoteCommand extends Command implements IExtendedTableCommand {
private ExtendedTableModel extendedTable;
private List beansToQuote;
private int[] selectionIndices;
private String quote;
boolean isAddingQuote;
public static final String LABEL = Messages.getString("ExtendedTableQuoteCommand.Quote.Label"); //$NON-NLS-1$
/**
* DOC ExtendedTableQuoteCommand constructor comment.
*/
@SuppressWarnings("unchecked")//$NON-NLS-1$
public ExtendedTableQuoteCommand(ExtendedTableModel extendedTable, List beansToQuote, int[] selectionIndices, String quote, boolean isAddingQuote) {
super(LABEL);
this.extendedTable = extendedTable;
this.beansToQuote = new ArrayList(beansToQuote);
this.selectionIndices = selectionIndices;
this.quote = quote;
this.isAddingQuote = isAddingQuote;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.commands.Command#execute()
*/
@Override
public void execute() {
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
}
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#canUndo()
*/
@Override
public boolean canUndo() {
return false;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#redo()
*/
@Override
public void redo() {
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.command.CommonCommand#undo()
*/
@Override
public void undo() {
}
}

View File

@@ -179,6 +179,23 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
beansList.setUseEquals(useEquals); beansList.setUseEquals(useEquals);
} }
/**
*
* Replace bean.
*
* @param bean
* @param index can be null
*/
public void replace(B bean, Integer index) {
if (tableViewer != null && !tableViewer.getTable().isDisposed()) {
tableViewer.replace(bean, index);
tableViewer.refresh(bean, true, true);
}
this.beansList.replaceElement(index, bean);
}
/** /**
* DOC amaumont Comment method "remove". * DOC amaumont Comment method "remove".
* *

View File

@@ -21,6 +21,7 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.relationship.AbstractJobItemRelationshipHandler; import org.talend.core.model.relationship.AbstractJobItemRelationshipHandler;
import org.talend.core.model.relationship.Relation; import org.talend.core.model.relationship.Relation;
import org.talend.core.model.relationship.RelationshipItemBuilder; import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType; import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType; import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType;
@@ -47,14 +48,24 @@ public class JobRoutinesItemRelationshipHandler extends AbstractJobItemRelations
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap(); Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
for (Object o : processType.getParameters().getRoutinesParameter()) { for (Object o : processType.getParameters().getRoutinesParameter()) {
RoutinesParameterType itemInfor = (RoutinesParameterType) o; RoutinesParameterType itemInfor = (RoutinesParameterType) o;
if (currentSystemRoutinesMap.containsValue(itemInfor.getName())) { if (itemInfor.getName() != null && currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
// exclude system routines relation // exclude system routines relation
continue; continue;
} }
Relation addedRelation = new Relation(); Relation addedRelation = new Relation();
addedRelation.setId(itemInfor.getName()); if (ERepositoryObjectType.ROUTINESJAR != null
addedRelation.setType(RelationshipItemBuilder.ROUTINE_RELATION); && ERepositoryObjectType.ROUTINESJAR.getType().equals(itemInfor.getType())) {
addedRelation.setId(itemInfor.getId());
addedRelation.setType(RelationshipItemBuilder.ROUTINES_JAR_RELATION);
} else if (ERepositoryObjectType.BEANSJAR != null
&& ERepositoryObjectType.BEANSJAR.getType().equals(itemInfor.getType())) {
addedRelation.setId(itemInfor.getId());
addedRelation.setType(RelationshipItemBuilder.BEANS_JAR_RELATION);
} else {
addedRelation.setId(itemInfor.getName());
addedRelation.setType(RelationshipItemBuilder.ROUTINE_RELATION);
}
addedRelation.setVersion(RelationshipItemBuilder.LATEST_VERSION); addedRelation.setVersion(RelationshipItemBuilder.LATEST_VERSION);
relationSet.add(addedRelation); relationSet.add(addedRelation);

View File

@@ -12,11 +12,14 @@
// ============================================================================ // ============================================================================
package org.talend.core.repository.model; package org.talend.core.repository.model;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -623,8 +626,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
stream.close(); stream.close();
byte[] currentContent = item.getContent().getInnerContent(); byte[] currentContent = item.getContent().getInnerContent();
if (!isSameStringContent(innerContent, currentContent)) {
if (!Arrays.equals(innerContent, currentContent)) {
item.getContent().setInnerContent(innerContent); item.getContent().setInnerContent(innerContent);
Project project = getRepositoryContext().getProject(); Project project = getRepositoryContext().getProject();
save(project, item); save(project, item);
@@ -642,6 +644,44 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
} }
} }
protected boolean isSameStringContent(byte[] data1, byte[] data2) throws IOException {
boolean isSame = true;
BufferedReader br1 = null, br2 = null;
try {
br1 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data1), StandardCharsets.UTF_8.toString()));
br2 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data2), StandardCharsets.UTF_8.toString()));
String line1 = null, line2 = null;
while (isSame) {
line1 = br1.readLine();
line2 = br2.readLine();
if ((line1 == null && line2 == null)) {
break;
}
if (!StringUtils.equals(line1, line2)) {
isSame = false;
break;
}
}
} finally {
if (br1 != null) {
try {
br1.close();
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
if (br2 != null) {
try {
br2.close();
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
return isSame;
}
private void createSQLPattern(URL url, String sqlPatternLabel, String categoryName) throws PersistenceException { private void createSQLPattern(URL url, String sqlPatternLabel, String categoryName) throws PersistenceException {
if (url == null) { if (url == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
@@ -693,8 +733,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
stream.close(); stream.close();
byte[] currentContent = item.getContent().getInnerContent(); byte[] currentContent = item.getContent().getInnerContent();
if (!isSameStringContent(innerContent, currentContent)) {
if (!Arrays.equals(innerContent, currentContent)) {
item.getContent().setInnerContent(innerContent); item.getContent().setInnerContent(innerContent);
Project project = getRepositoryContext().getProject(); Project project = getRepositoryContext().getProject();
save(project, item); save(project, item);
@@ -833,25 +872,38 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
@Override @Override
public IRepositoryViewObject getLastVersion(Project project, String id, String relativeFolder, ERepositoryObjectType type) public IRepositoryViewObject getLastVersion(Project project, String id, String relativeFolder, ERepositoryObjectType type)
throws PersistenceException { throws PersistenceException {
List<IRepositoryViewObject> serializableAllVersion = null; List<IRepositoryViewObject> serializableAllVersion = new ArrayList<>();
Object fullFolder = getFullFolder(project, type, relativeFolder); if (lastFolderForItemMap.containsKey(id)) {
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true); ERepositoryObjectType itemType = lastRepositoryTypeForItemMap.get(id);
String currentPath = lastFolderForItemMap.get(id);
Object fullFolder = getFullFolder(project, itemType, currentPath);
try {
if (fullFolder != null && (fullFolder instanceof FolderItem || ((IFolder) fullFolder).exists())) {
serializableAllVersion.addAll(getSerializableFromFolder(project, fullFolder, id, itemType, false, false, true, true));
}
} catch (PersistenceException e) {
// do nothing.
// if any exception happen or can't find the item, just try to look for it everywhere.
}
}
if (serializableAllVersion.isEmpty()) { if (serializableAllVersion.isEmpty()) {
// look in all folders for this item type Object fullFolder = getFullFolder(project, type, relativeFolder);
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true); serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
if (serializableAllVersion.isEmpty()) {
// look in all folders for this item type
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
}
} }
int size = serializableAllVersion.size(); int size = serializableAllVersion.size();
if (size > 1) { if (size > 1) {
String message = getItemsMessages(serializableAllVersion, size); String message = getItemsMessages(serializableAllVersion, size);
throw new PersistenceException(Messages.getString( throw new PersistenceException(Messages.getString(
"AbstractEMFRepositoryFactory.presistenceException.OnlyOneOccurenceMustbeFound", message)); //$NON-NLS-1$ "AbstractEMFRepositoryFactory.presistenceException.OnlyOneOccurenceMustbeFound", message)); //$NON-NLS-1$
} else if (size == 1) {
return serializableAllVersion.get(0);
} else {
return null;
} }
if (size == 1) {
return serializableAllVersion.get(0);
}
return null;
} }
protected void computePropertyMaxInformationLevel(Property property) { protected void computePropertyMaxInformationLevel(Property property) {

View File

@@ -15,6 +15,7 @@ package org.talend.core.repository.model;
import java.util.List; import java.util.List;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
@@ -186,7 +187,7 @@ public interface IRepositoryFactory {
* @throws PersistenceException * @throws PersistenceException
*/ */
public List<IRepositoryViewObject> getAll(Project project, ERepositoryObjectType type, boolean withDeleted, public List<IRepositoryViewObject> getAll(Project project, ERepositoryObjectType type, boolean withDeleted,
boolean allVersions) throws PersistenceException; boolean allVersions, IFolder... folders) throws PersistenceException;
/** /**
* Deletes logically the given object. <code>isDeleted</code> on this object will now returned <code>true</code>. * Deletes logically the given object. <code>isDeleted</code> on this object will now returned <code>true</code>.
@@ -462,4 +463,8 @@ public interface IRepositoryFactory {
public boolean isRepositoryBusy(); public boolean isRepositoryBusy();
public RepositoryWorkUnit getWorkUnitInProgress(); public RepositoryWorkUnit getWorkUnitInProgress();
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
public void batchDeleteOldVersionsPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote, IProgressMonitor monitor) throws PersistenceException;
} }

View File

@@ -20,6 +20,7 @@ import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ArrayUtils;
@@ -675,6 +676,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
} }
} }
List<IRepositoryViewObject> codeObjectList = new ArrayList<IRepositoryViewObject>();
Map<String, List<RepositoryNode>> labelCodeJarMap = new HashMap<String, List<RepositoryNode>>();
for (IRepositoryViewObject currentObject : elements) { for (IRepositoryViewObject currentObject : elements) {
RepositoryNode parent = getFolder(currentObject.getRepositoryObjectType(), currentObject.getPath(), rootNodes); RepositoryNode parent = getFolder(currentObject.getRepositoryObjectType(), currentObject.getPath(), rootNodes);
RepositoryNode parentNode = parent; RepositoryNode parentNode = parent;
@@ -682,20 +686,69 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
parentNode = rootNode; parentNode = rootNode;
} }
if (currentObject.isDeleted()) { if (currentObject.isDeleted()) {
boolean isCodeJarType = false;
ERepositoryObjectType repositoryObjectType = currentObject.getRepositoryObjectType();
if (ERepositoryObjectType.getAllTypesOfCodes().contains(repositoryObjectType)) {
codeObjectList.add(currentObject);
continue;
} else if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(repositoryObjectType)) {
isCodeJarType = true;
}
RepositoryNode repNode = new RepositoryNode(new RepositoryViewObject(currentObject.getProperty()), parentNode, RepositoryNode repNode = new RepositoryNode(new RepositoryViewObject(currentObject.getProperty()), parentNode,
ENodeType.REPOSITORY_ELEMENT); ENodeType.REPOSITORY_ELEMENT);
repNode.setProperties(EProperties.CONTENT_TYPE, currentObject.getRepositoryObjectType()); repNode.setProperties(EProperties.CONTENT_TYPE, currentObject.getRepositoryObjectType());
repNode.setProperties(EProperties.LABEL, currentObject.getLabel()); repNode.setProperties(EProperties.LABEL, currentObject.getLabel());
parentNode.getChildren().add(repNode); parentNode.getChildren().add(repNode);
repNode.setParent(parentNode); repNode.setParent(parentNode);
if (isCodeJarType) {
String label = currentObject.getProperty().getLabel();
if (labelCodeJarMap.get(label) == null) {
labelCodeJarMap.put(label, new ArrayList<RepositoryNode>());
}
labelCodeJarMap.get(label).add(repNode);
}
} else { } else {
addDeletedSubItems(currentObject.getProperty().getItem(), parentNode); addDeletedSubItems(currentObject.getProperty().getItem(), parentNode);
} }
} }
addDeletedCode(rootNode, codeObjectList, labelCodeJarMap);
objects.removeAll(elements); objects.removeAll(elements);
addDeletedTestCases(rootNode, objects); addDeletedTestCases(rootNode, objects);
} }
private void addDeletedCode(RepositoryNode rootNode, List<IRepositoryViewObject> codeObjectList, Map<String, List<RepositoryNode>> labelCodeJarMap) {
List<IRepositoryNode> rootNodes = rootNode.getChildren();
for (IRepositoryViewObject codeObject : codeObjectList) {
ERepositoryObjectType objectType = codeObject.getRepositoryObjectType();
RepositoryNode parent = getFolder(codeObject.getRepositoryObjectType(), codeObject.getPath(), rootNodes);
RepositoryNode parentNode = parent;
if (parentNode == null) {
parentNode = rootNode;
}
Item parentItem = (Item) codeObject.getProperty().getItem().getParent();
String folderItemLabel = parentItem.getProperty().getLabel();
if (labelCodeJarMap.get(folderItemLabel) != null) {
Optional node = labelCodeJarMap.get(folderItemLabel).stream()
.filter(n -> ERepositoryObjectType.CodeTypeEnum.isCodeRepositoryObjectTypeMatch(n.getObjectType(),
objectType))
.findFirst();
if (node.isPresent()) {
parentNode = (RepositoryNode) node.get();
}
}
RepositoryNode repNode = new RepositoryNode(new RepositoryViewObject(codeObject.getProperty()), parentNode,
ENodeType.REPOSITORY_ELEMENT);
repNode.setProperties(EProperties.CONTENT_TYPE, objectType);
repNode.setProperties(EProperties.LABEL, codeObject.getLabel());
parentNode.getChildren().add(repNode);
repNode.setParent(parentNode);
}
}
/** /**
* DOC nrousseau Comment method "addDeletedElements". * DOC nrousseau Comment method "addDeletedElements".
* *

View File

@@ -16,7 +16,6 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
import java.io.File; import java.io.File;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Dictionary; import java.util.Dictionary;
@@ -25,6 +24,7 @@ import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.log4j.Level; import org.apache.log4j.Level;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@@ -88,7 +88,6 @@ import org.talend.core.hadoop.BigDataBasicUtil;
import org.talend.core.model.general.ILibrariesService; import org.talend.core.model.general.ILibrariesService;
import org.talend.core.model.general.ModuleNeeded; import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.Project; import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject; import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
import org.talend.core.model.metadata.builder.connection.MetadataTable; import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.migration.IMigrationToolService; import org.talend.core.model.migration.IMigrationToolService;
@@ -106,8 +105,10 @@ import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.ProjectReference; import org.talend.core.model.properties.ProjectReference;
import org.talend.core.model.properties.PropertiesPackage; import org.talend.core.model.properties.PropertiesPackage;
import org.talend.core.model.properties.Property; import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.properties.SpagoBiServer; import org.talend.core.model.properties.SpagoBiServer;
import org.talend.core.model.properties.Status; import org.talend.core.model.properties.Status;
import org.talend.core.model.properties.TDQItem;
import org.talend.core.model.properties.User; import org.talend.core.model.properties.User;
import org.talend.core.model.properties.impl.FolderItemImpl; import org.talend.core.model.properties.impl.FolderItemImpl;
import org.talend.core.model.relationship.RelationshipItemBuilder; import org.talend.core.model.relationship.RelationshipItemBuilder;
@@ -121,6 +122,7 @@ import org.talend.core.model.repository.LockInfo;
import org.talend.core.model.repository.RepositoryContentManager; import org.talend.core.model.repository.RepositoryContentManager;
import org.talend.core.model.repository.RepositoryObject; import org.talend.core.model.repository.RepositoryObject;
import org.talend.core.model.repository.RepositoryViewObject; import org.talend.core.model.repository.RepositoryViewObject;
import org.talend.core.model.routines.CodesJarInfo;
import org.talend.core.repository.CoreRepositoryPlugin; import org.talend.core.repository.CoreRepositoryPlugin;
import org.talend.core.repository.constants.Constant; import org.talend.core.repository.constants.Constant;
import org.talend.core.repository.constants.FileConstants; import org.talend.core.repository.constants.FileConstants;
@@ -138,6 +140,8 @@ import org.talend.core.runtime.util.ItemDateParser;
import org.talend.core.runtime.util.SharedStudioUtils; import org.talend.core.runtime.util.SharedStudioUtils;
import org.talend.core.service.ICoreUIService; import org.talend.core.service.ICoreUIService;
import org.talend.core.service.IUpdateService; import org.talend.core.service.IUpdateService;
import org.talend.core.service.IDetectCVEService;
import org.talend.core.utils.CodesJarResourceCache;
import org.talend.cwm.helper.SubItemHelper; import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper; import org.talend.cwm.helper.TableHelper;
import org.talend.designer.runprocess.IRunProcessService; import org.talend.designer.runprocess.IRunProcessService;
@@ -407,7 +411,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
} }
boolean isThrow = true; boolean isThrow = true;
if (tdqRepService != null && CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) { if (tdqRepService != null && (CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()
|| item instanceof TDQItem)) {
// change MessageBox to DeleteModelElementConfirmDialog // change MessageBox to DeleteModelElementConfirmDialog
InputDialog inputDialog = tdqRepService.getInputDialog(item); InputDialog inputDialog = tdqRepService.getInputDialog(item);
if (MessageDialog.OK == inputDialog.open()) { if (MessageDialog.OK == inputDialog.open()) {
@@ -1348,6 +1353,35 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
return this.repositoryFactoryFromProvider.getAll(projectManager.getCurrentProject(), type, withDeleted, allVersions); return this.repositoryFactoryFromProvider.getAll(projectManager.getCurrentProject(), type, withDeleted, allVersions);
} }
@Override
public List<IRepositoryViewObject> getAll(Project project, ERepositoryObjectType type, boolean withDeleted,
boolean allVersions, IFolder... folders) throws PersistenceException {
return this.repositoryFactoryFromProvider.getAll(project, type, withDeleted, allVersions, folders);
}
@Override
public List<IRepositoryViewObject> getAllCodesJars(ERepositoryObjectType type) throws PersistenceException {
return getAllCodesJars(projectManager.getCurrentProject(), type);
}
@Override
public List<IRepositoryViewObject> getAllCodesJars(Project project, ERepositoryObjectType type) throws PersistenceException {
return getAll(project, type).stream().filter(obj -> !(obj.getProperty().getItem() instanceof RoutineItem))
.collect(Collectors.toList());
}
@Override
public List<IRepositoryViewObject> getAllInnerCodes(CodesJarInfo info) throws PersistenceException {
Project project = ProjectManager.getInstance().getProjectFromProjectTechLabel(info.getProjectTechName());
// empty folder won't be commit in git, create if not exist
IFolder folder = ResourceUtils.getProject(project).getFolder(ERepositoryObjectType.getFolderName(info.getType()))
.getFolder(info.getLabel());
if (!folder.exists()) {
ResourceUtils.createFolder(folder);
}
return repositoryFactoryFromProvider.getAll(project, info.getType(), false, false, folder);
}
@Override @Override
public List<String> getFolders(ERepositoryObjectType type) throws PersistenceException { public List<String> getFolders(ERepositoryObjectType type) throws PersistenceException {
return getFolders(projectManager.getCurrentProject(), type); return getFolders(projectManager.getCurrentProject(), type);
@@ -2165,6 +2199,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) { if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class); IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
updateService.syncComponentM2Jars(currentMonitor); updateService.syncComponentM2Jars(currentMonitor);
updateService.installComponents(currentMonitor);
} }
// init sdk component // init sdk component
@@ -2205,13 +2240,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$ TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
} }
try { CodesJarResourceCache.initCodesJarCache();
// for new added mapping file, sync to project mapping folder
MetadataTalendType.syncNewMappingFileToProject();
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
}
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE); currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$ currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
@@ -2246,6 +2275,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
IRunProcessService runProcessService = getRunProcessService(); IRunProcessService runProcessService = getRunProcessService();
if (runProcessService != null) { if (runProcessService != null) {
runProcessService.initMavenJavaProject(monitor, project); runProcessService.initMavenJavaProject(monitor, project);
// before afterLogon migration execute, check and update daikon dependency
runProcessService.checkAndUpdateDaikonDependencies();
} }
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE); currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
@@ -2308,17 +2340,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$ TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
} }
try {
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
}
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
}
if (runProcessService != null && !isCommandLineLocalRefProject) { if (runProcessService != null && !isCommandLineLocalRefProject) {
runProcessService.initializeRootPoms(monitor); runProcessService.initializeRootPoms(monitor);
@@ -2427,6 +2448,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (runProcessService != null) { if (runProcessService != null) {
runProcessService.clearProjectRelatedSettings(); runProcessService.clearProjectRelatedSettings();
} }
// clear detect CVE cache
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDetectCVEService.class)) {
IDetectCVEService detectCVESvc = GlobalServiceRegister.getDefault().getService(IDetectCVEService.class);
if (detectCVESvc != null) {
detectCVESvc.clearCache();
}
}
ReferenceProjectProvider.clearTacReferenceList(); ReferenceProjectProvider.clearTacReferenceList();
ReferenceProjectProblemManager.getInstance().clearAll(); ReferenceProjectProblemManager.getInstance().clearAll();
fullLogonFinished = false; fullLogonFinished = false;
@@ -2749,4 +2779,81 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
} }
} }
} }
@Override
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException {
if (project == null || objToDelete == null || objToDelete.getProperty() == null) {
return;
}
// RepositoryViewObject is dynamic, so force to use in all case the RepositoryObject with fixed object.
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
ICoreService coreService = getCoreService();
if (coreService != null) {
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
// delete the job launch, for bug 8878
coreService.removeJobLaunch(object);
}
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
service.deleteOldVersionTalendJobProject(objToDelete);
}
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, object, version);
// i18n
//log.info("Physical deletion [" + objToDelete + "] by " + getRepositoryContext().getUser() + ".");
String str[] = new String[] { object.toString()+ "_" + version, getRepositoryContext().getUser().toString() };
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$ }
}
@Override
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException {
if (project == null || objToDeleteList == null || objToDeleteList.size() == 0) {
return;
}
List<String> idList = new ArrayList<>();
List<IRepositoryViewObject> repositoryObjectList = new ArrayList<>();
String label = "",lastLabel = "";
for (IRepositoryViewObject objToDelete : objToDeleteList) {
label = objToDelete.getProperty().getLabel();
String versionedLabel = objToDelete.getProperty().getLabel() + "_" + objToDelete.getProperty().getVersion();
monitor.setTaskName("Removing " + objToDelete.getRepositoryObjectType() + ":"+ versionedLabel);
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
boolean isExtendPoint = false;
idList.add(object.getProperty().getId());
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
ICoreService coreService = getCoreService();
if (coreService != null) {
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
// delete the job launch, for bug 8878
coreService.removeJobLaunch(object);
}
}
repositoryObjectList.add(object);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
service.deleteOldVersionTalendJobProject(objToDelete);
}
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, objToDelete,objToDelete.getProperty().getVersion());
if (label != null && !label.equals(lastLabel)) monitor.worked(1); //for different versions in progress bar
lastLabel = label;
}
// save project will handle git/svn update
this.repositoryFactoryFromProvider.saveProject(project);
}
} }

View File

@@ -36,7 +36,6 @@ import org.eclipse.swt.widgets.Display;
import org.talend.commons.exception.BusinessException; import org.talend.commons.exception.BusinessException;
import org.talend.commons.exception.LoginException; import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException; import org.talend.commons.exception.PersistenceException;
import org.talend.commons.exception.SystemException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus; import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.commons.ui.runtime.exception.ExceptionHandler; import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.GlobalServiceRegister; import org.talend.core.GlobalServiceRegister;
@@ -54,11 +53,16 @@ import org.talend.core.model.properties.SQLPatternItem;
import org.talend.core.model.relationship.RelationshipItemBuilder; import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject; import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.routines.CodesJarInfo;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.ui.dialog.PastSelectorDialog; import org.talend.core.repository.ui.dialog.PastSelectorDialog;
import org.talend.core.repository.utils.RoutineUtils;
import org.talend.core.runtime.services.IDesignerMavenService;
import org.talend.core.runtime.services.IGenericDBService; import org.talend.core.runtime.services.IGenericDBService;
import org.talend.core.ui.ICDCProviderService; import org.talend.core.ui.ICDCProviderService;
import org.talend.core.ui.ITestContainerProviderService; import org.talend.core.ui.ITestContainerProviderService;
import org.talend.core.utils.CodesJarResourceCache;
import org.talend.designer.codegen.ICodeGeneratorService; import org.talend.designer.codegen.ICodeGeneratorService;
import org.talend.repository.RepositoryWorkUnit; import org.talend.repository.RepositoryWorkUnit;
import org.talend.repository.model.IProxyRepositoryFactory; import org.talend.repository.model.IProxyRepositoryFactory;
@@ -125,6 +129,44 @@ public class CopyObjectAction {
// return false; // return false;
// } // }
// disable copy for codejar
ERepositoryObjectType sourceObjectType = objectToCopy.getRepositoryObjectType();
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(sourceObjectType)) {
return false;
}
// disable paste between global code and custom code
if (ERepositoryObjectType.getAllTypesOfCodes().contains(sourceObjectType) && targetNode != null) {
IRepositoryViewObject targetObject = targetNode.getObject();
boolean isInnerCodeSourceNode = RoutinesUtil.isInnerCodes(objectToCopy.getProperty());
if (targetObject != null) {
if (sourceObjectType.equals(targetObject.getRepositoryObjectType())) {
return isInnerCodeSourceNode && RoutinesUtil.isInnerCodes(targetObject.getProperty());
}
if (isInnerCodeSourceNode
&& !ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetObject.getRepositoryObjectType())) {
return false;
}
if (!isInnerCodeSourceNode
&& ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetObject.getRepositoryObjectType())) {
return false;
}
} else {
// system folder node
if (isInnerCodeSourceNode) {
return false;
} else {
ERepositoryObjectType targetType = ((ERepositoryObjectType) targetNode
.getProperties(EProperties.CONTENT_TYPE));
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetType)) {
return false;
}
}
}
}
// Cannot copy system routines: // Cannot copy system routines:
if (objectToCopy.getRepositoryObjectType() == ERepositoryObjectType.ROUTINES) { if (objectToCopy.getRepositoryObjectType() == ERepositoryObjectType.ROUTINES) {
Property property = objectToCopy.getProperty(); Property property = objectToCopy.getProperty();
@@ -193,7 +235,8 @@ public class CopyObjectAction {
} }
// for bug 0005454: Copy paste with keyboard in the repository view doesn't work. // for bug 0005454: Copy paste with keyboard in the repository view doesn't work.
if (targetNode.getType() == ENodeType.REPOSITORY_ELEMENT) { if (targetNode.getType() == ENodeType.REPOSITORY_ELEMENT
&& !ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetNode.getObjectType())) {
targetNode = targetNode.getParent(); targetNode = targetNode.getParent();
} }
@@ -471,9 +514,23 @@ public class CopyObjectAction {
ICodeGeneratorService.class); ICodeGeneratorService.class);
if (codeGenService != null) { if (codeGenService != null) {
codeGenService.createRoutineSynchronizer().renameRoutineClass(item); codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
boolean isInnerCode = RoutinesUtil.isInnerCodes(item.getProperty());
if (isInnerCode) {
RoutineUtils.changeInnerCodePackage(item, true);
}
try { try {
codeGenService.createRoutineSynchronizer().syncRoutine(item, true); codeGenService.createRoutineSynchronizer().syncRoutine(item, true);
} catch (SystemException e) {
if (isInnerCode) {
CodesJarInfo info = CodesJarResourceCache.getCodesJarByInnerCode(item);
if (info != null) {
IDesignerMavenService designerMavenService = IDesignerMavenService.get();
if (designerMavenService != null) {
designerMavenService.updateCodeJarMavenProject(info, false);
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e); ExceptionHandler.process(e);
} }
} }

View File

@@ -111,7 +111,8 @@ public class CreateFolderAction extends AContextualAction {
|| property.equals(ERepositoryObjectType.JOB_DOC) || property.equals(ERepositoryObjectType.JOBLET_DOC) || property.equals(ERepositoryObjectType.JOB_DOC) || property.equals(ERepositoryObjectType.JOBLET_DOC)
|| ERepositoryObjectType.SQLPATTERNS.equals(property) || ERepositoryObjectType.SQLPATTERNS.equals(property)
|| ERepositoryObjectType.REFERENCED_PROJECTS.equals(property) || ERepositoryObjectType.REFERENCED_PROJECTS.equals(property)
|| ERepositoryObjectType.SVN_ROOT.equals(property)) { || ERepositoryObjectType.SVN_ROOT.equals(property) || ERepositoryObjectType.ROUTINESJAR.equals(property)
|| property.equals(ERepositoryObjectType.BEANSJAR)) {
canWork = false; canWork = false;
} else if (property != null } else if (property != null
&& GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) { && GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {

View File

@@ -21,6 +21,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import org.apache.commons.collections.map.MultiKeyMap; import org.apache.commons.collections.map.MultiKeyMap;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.resources.ResourcesPlugin;
@@ -54,6 +55,7 @@ import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.commons.ui.runtime.image.EImage; import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider; import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.utils.data.container.RootContainer; import org.talend.commons.utils.data.container.RootContainer;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.GlobalServiceRegister; import org.talend.core.GlobalServiceRegister;
import org.talend.core.IESBService; import org.talend.core.IESBService;
import org.talend.core.ITDQRepositoryService; import org.talend.core.ITDQRepositoryService;
@@ -714,6 +716,7 @@ public class DeleteAction extends AContextualAction {
removeConnFromSQLExplorer(repositoryNode); removeConnFromSQLExplorer(repositoryNode);
List<IRepositoryViewObject> batchDeleteObjectList = new ArrayList<IRepositoryViewObject>(); List<IRepositoryViewObject> batchDeleteObjectList = new ArrayList<IRepositoryViewObject>();
deleteTestCases(factory, deleteActionCache, repositoryNode, null, batchDeleteObjectList); deleteTestCases(factory, deleteActionCache, repositoryNode, null, batchDeleteObjectList);
deleteCodeSubItem(factory, deleteActionCache, repositoryNode, null, true);
return true; return true;
} }
@@ -1456,10 +1459,11 @@ public class DeleteAction extends AContextualAction {
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault() ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
.getService(ITestContainerProviderService.class); .getService(ITestContainerProviderService.class);
if(testService != null){ if(testService != null){
testService.deleteDataFiles(objToDelete);
} }
testService.deleteDataFiles(objToDelete);
} }
// delete codejar forever need to delete subitem also
deleteCodeSubItem(factory, deleteActionCache, currentJobNode, confirm, false);
if (!ProjectManager.getInstance().getCurrentProject().isLocal()) { if (!ProjectManager.getInstance().getCurrentProject().isLocal()) {
// if remote,batch delete later // if remote,batch delete later
@@ -1482,14 +1486,47 @@ public class DeleteAction extends AContextualAction {
factory.deleteObjectLogical(objToDelete); factory.deleteObjectLogical(objToDelete);
updateRelatedViews(); updateRelatedViews();
removeConnFromSQLExplorer(currentJobNode); removeConnFromSQLExplorer(currentJobNode);
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
deleteTestCases(factory, deleteActionCache, currentJobNode, confirm, null); deleteTestCases(factory, deleteActionCache, currentJobNode, confirm, null);
deleteCodeSubItem(factory, deleteActionCache, currentJobNode, confirm, true);
} }
} }
return needReturn; return needReturn;
} }
private void deleteCodeSubItem(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
final IRepositoryNode currentJobNode, Boolean confirm, boolean logicalDelete)
throws PersistenceException, BusinessException {
if (!ERepositoryObjectType.getAllTypesOfCodesJar().contains(currentJobNode.getObjectType())) {
return;
}
if (!currentJobNode.getChildren().isEmpty()) {
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
for (IRepositoryNode child : currentJobNode.getChildren()) {
deleteElements(factory, deleteActionCache, (RepositoryNode) child, confirm, deleteObjectList);
}
if (deleteObjectList != null && deleteObjectList.size() > 0) {
factory.batchDeleteObjectPhysical4Remote(ProjectManager.getInstance().getCurrentProject(), deleteObjectList);
}
}
// delete forever to delete codeJar folder
if (!logicalDelete) {
IFolder folder = ResourceUtils
.getFolder(ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()),
ERepositoryObjectType.getFolderName(currentJobNode.getObjectType()), true)
.getFolder(currentJobNode.getObject().getProperty().getLabel());
if (folder != null) {
try {
folder.delete(false, null);
} catch (CoreException e) {
throw new PersistenceException(e);
}
}
}
}
private void deleteTestCases(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache, private void deleteTestCases(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
final IRepositoryNode currentJobNode, Boolean confirm, List<IRepositoryViewObject> batchDeleteObjectList) final IRepositoryNode currentJobNode, Boolean confirm, List<IRepositoryViewObject> batchDeleteObjectList)
throws PersistenceException, BusinessException { throws PersistenceException, BusinessException {

View File

@@ -74,6 +74,7 @@ import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryContentHandler; import org.talend.core.model.repository.IRepositoryContentHandler;
import org.talend.core.model.repository.IRepositoryViewObject; import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryContentManager; import org.talend.core.model.repository.RepositoryContentManager;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.repository.i18n.Messages; import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.ui.dialog.DuplicateDialog; import org.talend.core.repository.ui.dialog.DuplicateDialog;
@@ -145,8 +146,14 @@ public class DuplicateAction extends AContextualAction {
canWork = false; canWork = false;
} else if (((StructuredSelection) selection).toArray().length == 1) { } else if (((StructuredSelection) selection).toArray().length == 1) {
Object obj = ((StructuredSelection) selection).toList().get(0); Object obj = ((StructuredSelection) selection).toList().get(0);
RepositoryNode sourceNode = (RepositoryNode) obj;
// disable duplicate for codejar / innercode now
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(sourceNode.getObjectType())
|| sourceNode.getObject() != null && sourceNode.getObject().getProperty() != null
&& RoutinesUtil.isInnerCodes(sourceNode.getObject().getProperty())) {
canWork = false;
}
if (canWork) { if (canWork) {
RepositoryNode sourceNode = (RepositoryNode) obj;
if (!CopyObjectAction.getInstance().validateAction(sourceNode, null)) { if (!CopyObjectAction.getInstance().validateAction(sourceNode, null)) {
canWork = false; canWork = false;
} else if (node.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.JOB_DOC } else if (node.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.JOB_DOC

View File

@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.resources.ResourcesPlugin;
@@ -45,6 +46,7 @@ import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler; import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.commons.ui.runtime.image.ECoreImage; import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.image.ImageProvider; import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.GlobalServiceRegister; import org.talend.core.GlobalServiceRegister;
import org.talend.core.ITDQRepositoryService; import org.talend.core.ITDQRepositoryService;
import org.talend.core.model.properties.ConnectionItem; import org.talend.core.model.properties.ConnectionItem;
@@ -343,6 +345,7 @@ public class EmptyRecycleBinAction extends AContextualAction {
testService.deleteDataFiles(objToDelete); testService.deleteDataFiles(objToDelete);
} }
} }
deleteCodeSubItem(factory, currentNode);
if (!ProjectManager.getInstance().getCurrentProject().isLocal()) { if (!ProjectManager.getInstance().getCurrentProject().isLocal()) {
// if remote, batch delete later // if remote, batch delete later
batchDeleteObjectList.add(objToDelete); batchDeleteObjectList.add(objToDelete);
@@ -355,6 +358,36 @@ public class EmptyRecycleBinAction extends AContextualAction {
} }
} }
private void deleteCodeSubItem(IProxyRepositoryFactory factory, final IRepositoryNode currentNode)
throws PersistenceException, BusinessException {
if (!ERepositoryObjectType.getAllTypesOfCodesJar().contains(currentNode.getObjectType())) {
return;
}
if (!currentNode.getChildren().isEmpty()) {
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
for (IRepositoryNode child : currentNode.getChildren()) {
deleteElements(factory, (RepositoryNode) child, deleteObjectList);
}
if (deleteObjectList != null && deleteObjectList.size() > 0) {
factory.batchDeleteObjectPhysical4Remote(ProjectManager.getInstance().getCurrentProject(), deleteObjectList);
}
}
// delete forever to delete codeJar folder
IFolder folder = ResourceUtils
.getFolder(ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()),
ERepositoryObjectType.getFolderName(currentNode.getObjectType()), true)
.getFolder(currentNode.getObject().getProperty().getLabel());
if (folder != null) {
try {
folder.delete(false, null);
} catch (CoreException e) {
throw new PersistenceException(e);
}
}
}
protected boolean isRelation(IEditorInput editorInput, String repoNodeProjectLabel, String repoNodeId) { protected boolean isRelation(IEditorInput editorInput, String repoNodeProjectLabel, String repoNodeId) {
IRepoViewLinker[] allRepoViewLinkers = RepoViewLinkerRegistryReader.getInstance().getAllRepoViewLinkers(); IRepoViewLinker[] allRepoViewLinkers = RepoViewLinkerRegistryReader.getInstance().getAllRepoViewLinkers();
for (IRepoViewLinker linker : allRepoViewLinkers) { for (IRepoViewLinker linker : allRepoViewLinkers) {

View File

@@ -193,7 +193,8 @@ public class RestoreAction extends AContextualAction {
node = node.getParent(); node = node.getParent();
if ((node.getObject().getProperty().getItem() instanceof FolderItem)) { if ((node.getObject().getProperty().getItem() instanceof FolderItem)) {
node.getObject().getProperty().getItem().getState().setDeleted(false); node.getObject().getProperty().getItem().getState().setDeleted(false);
} else if (isTestcase) { } else if (isTestcase
|| ERepositoryObjectType.getAllTypesOfCodesJar().contains(node.getObjectType())) {
restoreNode(node); restoreNode(node);
} }
} }

View File

@@ -389,6 +389,14 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
case STABLE_SYSTEM_FOLDER: case STABLE_SYSTEM_FOLDER:
case SYSTEM_FOLDER: case SYSTEM_FOLDER:
ERepositoryObjectType contentType = node.getContentType(); ERepositoryObjectType contentType = node.getContentType();
if (contentType != null) {
// special setting for system codeJar node
if (contentType.equals(ERepositoryObjectType.ROUTINESJAR)) {
nodeIcon = RepositoryImageProvider.getIcon(ERepositoryObjectType.ROUTINES);
} else if (contentType.equals(ERepositoryObjectType.BEANSJAR)) {
nodeIcon = RepositoryImageProvider.getIcon(ERepositoryObjectType.BEANS);
}
}
if (nodeIcon == null || EImage.DEFAULT_IMAGE.equals(nodeIcon)) { if (nodeIcon == null || EImage.DEFAULT_IMAGE.equals(nodeIcon)) {
Image image = getImageFromFramework(contentType); Image image = getImageFromFramework(contentType);
if (image != null) { if (image != null) {

View File

@@ -22,6 +22,7 @@ import org.talend.core.model.properties.ByteArray;
import org.talend.core.model.properties.FileItem; import org.talend.core.model.properties.FileItem;
import org.talend.core.model.properties.Item; import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem; import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.RoutinesJarItem;
import org.talend.core.model.repository.AbstractRepositoryContentHandler; import org.talend.core.model.repository.AbstractRepositoryContentHandler;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
@@ -66,6 +67,13 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
return itemResource; return itemResource;
} }
protected Resource save(RoutinesJarItem item) {
final Resource itemResource = getXmiResourceManager().getItemResource(item);
itemResource.getContents().clear();
itemResource.getContents().add(item.getRoutinesJarType());
return itemResource;
}
protected Resource saveScreenShots(ProcessItem item) throws PersistenceException { protected Resource saveScreenShots(ProcessItem item) throws PersistenceException {
Resource itemResource = getXmiResourceManager().getScreenshotResource(item, true, true); Resource itemResource = getXmiResourceManager().getScreenshotResource(item, true, true);
EMap screenshots = item.getProcess().getScreenshots(); EMap screenshots = item.getProcess().getScreenshots();
@@ -76,7 +84,7 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
return itemResource; return itemResource;
} }
private XmiResourceManager getXmiResourceManager() { protected XmiResourceManager getXmiResourceManager() {
if (null == xmiResourceManager) { if (null == xmiResourceManager) {
xmiResourceManager = new XmiResourceManager(); xmiResourceManager = new XmiResourceManager();
} }

View File

@@ -81,6 +81,12 @@ public class ProjectDataJsonProvider {
return strBuilder.toString(); return strBuilder.toString();
} }
public static String getMigrationTaskIndexPath() {
StringBuilder strBuilder = new StringBuilder();
strBuilder.append(FileConstants.SETTINGS_FOLDER_NAME).append("/").append(FileConstants.MIGRATION_TASK_FILE_NAME); //$NON-NLS-1$
return strBuilder.toString();
}
public static void saveProjectData(Project project) throws PersistenceException { public static void saveProjectData(Project project) throws PersistenceException {
saveProjectData(project, CONTENT_ALL); saveProjectData(project, CONTENT_ALL);
} }

View File

@@ -12,6 +12,10 @@
// ============================================================================ // ============================================================================
package org.talend.core.repository.utils; package org.talend.core.repository.utils;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Pattern;
import org.apache.oro.text.regex.PatternCompiler; import org.apache.oro.text.regex.PatternCompiler;
@@ -26,37 +30,65 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.RoutineItem; import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.services.IDesignerMavenService;
/** /**
* DOC nrousseau class global comment. Detailled comment * DOC nrousseau class global comment. Detailled comment
*/ */
public final class RoutineUtils { public final class RoutineUtils {
private static final String DEFAULT_PACKAGE_REGEX = "package(\\s)+" + JavaUtils.JAVA_ROUTINES_DIRECTORY //$NON-NLS-1$
+ "\\.((\\w)+)(\\s)*;"; //$NON-NLS-1$
private static final String DEFAULT_PACKAGE_STRING = "package " + JavaUtils.JAVA_ROUTINES_DIRECTORY + ";"; //$NON-NLS-1$ //$NON-NLS-2$
private static final String INNER_ROUTINES_PACKAGE_REGEX = "package\\s+([^;]+);";
public static void changeRoutinesPackage(Item item) { public static void changeRoutinesPackage(Item item) {
List<ERepositoryObjectType> allowedTypes = new ArrayList<ERepositoryObjectType>();
allowedTypes.add(ERepositoryObjectType.ROUTINES);
doChangeRoutinesPackage(item, DEFAULT_PACKAGE_REGEX, DEFAULT_PACKAGE_STRING, allowedTypes, false, true);
}
public static void changeInnerCodePackage(Item item, boolean avoidSave) {
changeInnerCodePackage(item, avoidSave, true);
}
public static void changeInnerCodePackage(Item item, boolean avoidSave, boolean commitMode) {
IDesignerMavenService service = IDesignerMavenService.get();
if (service != null && item instanceof RoutineItem) {
RoutineItem routineItem = (RoutineItem) item;
String codesJarPackageByInnerCode = service.getCodesJarPackageByInnerCode(routineItem);
if (StringUtils.isNotBlank(codesJarPackageByInnerCode)) {
String newPackageString = "package " + StringUtils.replace(codesJarPackageByInnerCode, "/", ".") + ";";
if (!routineItem.isBuiltIn()) {
String routineContent = new String(routineItem.getContent().getInnerContent());
if (routineContent != null && routineContent.contains(newPackageString)) {
return;
}
}
doChangeRoutinesPackage(item, INNER_ROUTINES_PACKAGE_REGEX, newPackageString,
ERepositoryObjectType.getAllTypesOfCodes(), avoidSave, commitMode);
}
}
}
public static void doChangeRoutinesPackage(Item item, String packageRegex, String newPackage,
List<ERepositoryObjectType> allowedTypes, boolean avoidSave, boolean commitMode) {
if (item == null) { if (item == null) {
return; return;
} }
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item); ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
if (ERepositoryObjectType.ROUTINES.equals(itemType) && item instanceof RoutineItem) { if (allowedTypes != null && allowedTypes.contains(itemType) && item instanceof RoutineItem) {
RoutineItem rItem = (RoutineItem) item; RoutineItem rItem = (RoutineItem) item;
if (!rItem.isBuiltIn()) { if (!rItem.isBuiltIn()) {
//
String routineContent = new String(rItem.getContent().getInnerContent()); String routineContent = new String(rItem.getContent().getInnerContent());
//
// String curProjectName =
// currentProject.getTechnicalLabel().toLowerCase();
String oldPackage = "package(\\s)+" + JavaUtils.JAVA_ROUTINES_DIRECTORY + "\\.((\\w)+)(\\s)*;"; //$NON-NLS-1$ //$NON-NLS-2$
// String newPackage = "package " +
// JavaUtils.JAVA_ROUTINES_DIRECTORY + "." + curProjectName +
// ";";
String newPackage = "package " + JavaUtils.JAVA_ROUTINES_DIRECTORY + ";"; //$NON-NLS-1$ //$NON-NLS-2$
try { try {
PatternCompiler compiler = new Perl5Compiler(); PatternCompiler compiler = new Perl5Compiler();
Perl5Matcher matcher = new Perl5Matcher(); Perl5Matcher matcher = new Perl5Matcher();
matcher.setMultiline(true); matcher.setMultiline(true);
Pattern pattern = compiler.compile(oldPackage); Pattern pattern = compiler.compile(packageRegex);
if (matcher.contains(routineContent, pattern)) { if (matcher.contains(routineContent, pattern)) {
// String group = matcher.getMatch().group(2); // String group = matcher.getMatch().group(2);
@@ -67,7 +99,14 @@ public final class RoutineUtils {
rItem.getContent().setInnerContent(routineContent.getBytes()); rItem.getContent().setInnerContent(routineContent.getBytes());
ProxyRepositoryFactory repFactory = ProxyRepositoryFactory.getInstance(); ProxyRepositoryFactory repFactory = ProxyRepositoryFactory.getInstance();
repFactory.save(rItem); if (!avoidSave) {
if (commitMode) {
repFactory.save(rItem);
} else {
// avoid deadlock in git pull event listener
new XmiResourceManager().saveResource(rItem.eResource());
}
}
// } // }
} }
} catch (MalformedPatternException e) { } catch (MalformedPatternException e) {

View File

@@ -70,6 +70,7 @@ import org.talend.core.model.properties.TDQItem;
import org.talend.core.model.properties.ValidationRulesConnectionItem; import org.talend.core.model.properties.ValidationRulesConnectionItem;
import org.talend.core.model.properties.helper.ByteArrayResource; import org.talend.core.model.properties.helper.ByteArrayResource;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.repository.constants.FileConstants; import org.talend.core.repository.constants.FileConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory; import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.utils.ResourceFilenameHelper.FileName; import org.talend.core.repository.utils.ResourceFilenameHelper.FileName;
@@ -209,7 +210,7 @@ public class XmiResourceManager {
* @return * @return
* @throws PersistenceException * @throws PersistenceException
*/ */
private IPath getFolderPath(IProject project, ERepositoryObjectType repositoryObjectType, IPath relativePath) private IPath getFolderPath(IProject project, ERepositoryObjectType repositoryObjectType, IPath relativePath, Item item)
throws PersistenceException { throws PersistenceException {
ERepositoryObjectType type = repositoryObjectType; ERepositoryObjectType type = repositoryObjectType;
if (ERepositoryObjectType.TDQ_SYSTEM_INDICATORS.equals(repositoryObjectType) if (ERepositoryObjectType.TDQ_SYSTEM_INDICATORS.equals(repositoryObjectType)
@@ -218,6 +219,10 @@ public class XmiResourceManager {
} else if (ERepositoryObjectType.TDQ_PATTERN_REGEX.equals(repositoryObjectType) } else if (ERepositoryObjectType.TDQ_PATTERN_REGEX.equals(repositoryObjectType)
|| ERepositoryObjectType.TDQ_PATTERN_SQL.equals(repositoryObjectType)) { || ERepositoryObjectType.TDQ_PATTERN_SQL.equals(repositoryObjectType)) {
type = ERepositoryObjectType.TDQ_PATTERN_ELEMENT; type = ERepositoryObjectType.TDQ_PATTERN_ELEMENT;
} else if (type == ERepositoryObjectType.ROUTINES && RoutinesUtil.isInnerCodes(item.getProperty())) {
type = ERepositoryObjectType.ROUTINESJAR;
} else if (type == ERepositoryObjectType.BEANS && RoutinesUtil.isInnerCodes(item.getProperty())) {
type = ERepositoryObjectType.BEANSJAR;
} }
IFolder folder = project.getFolder(ERepositoryObjectType.getFolderName(type)).getFolder(relativePath); IFolder folder = project.getFolder(ERepositoryObjectType.getFolderName(type)).getFolder(relativePath);
return folder.getFullPath(); return folder.getFullPath();
@@ -704,7 +709,7 @@ public class XmiResourceManager {
// MOD mzhao 2010-11-22, suppport TDQ item file extensions.(.ana, .rep, etc) // MOD mzhao 2010-11-22, suppport TDQ item file extensions.(.ana, .rep, etc)
private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item) private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item)
throws PersistenceException { throws PersistenceException {
IPath folderPath = getFolderPath(project, repositoryObjectType, path); IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
FileName fileName = ResourceFilenameHelper.create(item.getProperty()); FileName fileName = ResourceFilenameHelper.create(item.getProperty());
IPath resourcePath = null; IPath resourcePath = null;
if (item.getFileExtension() == null) { if (item.getFileExtension() == null) {
@@ -720,7 +725,7 @@ public class XmiResourceManager {
@Deprecated @Deprecated
private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item, private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item,
String fileExtension) throws PersistenceException { String fileExtension) throws PersistenceException {
IPath folderPath = getFolderPath(project, repositoryObjectType, path); IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
FileName fileName = ResourceFilenameHelper.create(item.getProperty()); FileName fileName = ResourceFilenameHelper.create(item.getProperty());
IPath resourcePath = ResourceFilenameHelper IPath resourcePath = ResourceFilenameHelper
.getExpectedFilePath(fileName, folderPath, fileExtension, item.isNeedVersion()); .getExpectedFilePath(fileName, folderPath, fileExtension, item.isNeedVersion());
@@ -730,7 +735,7 @@ public class XmiResourceManager {
// added by dlin 2011-7-14 to create the uri of file of .screenshot // added by dlin 2011-7-14 to create the uri of file of .screenshot
private URI getScreenshotResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item, private URI getScreenshotResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item,
String... fileExtension) throws PersistenceException { String... fileExtension) throws PersistenceException {
IPath folderPath = getFolderPath(project, repositoryObjectType, path); IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
FileName fileName = ResourceFilenameHelper.create(item.getProperty()); FileName fileName = ResourceFilenameHelper.create(item.getProperty());
IPath resourcePath = ResourceFilenameHelper.getExpectedFilePath(fileName, folderPath, FileConstants.SCREENSHOT_EXTENSION, IPath resourcePath = ResourceFilenameHelper.getExpectedFilePath(fileName, folderPath, FileConstants.SCREENSHOT_EXTENSION,
item.isNeedVersion()); item.isNeedVersion());

View File

@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/main/java"/>
<classpathentry exported="true" kind="lib" path="lib/resty-0.3.2.jar" /> <classpathentry exported="true" kind="lib" path="lib/delight-rhino-sandbox-0.0.15.jar"/>
<classpathentry exported="true" kind="lib" path="lib/rhino-1.7.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/resty-0.3.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/json_simple-1.1.jar"/> <classpathentry exported="true" kind="lib" path="lib/json_simple-1.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

View File

@@ -95,6 +95,7 @@ Export-Package: org.talend.commons.utils.generation,
org.talend.repository.documentation.generation, org.talend.repository.documentation.generation,
org.talend.repository.model, org.talend.repository.model,
org.talend.repository.model.nodes, org.talend.repository.model.nodes,
org.talend.repository.token,
org.talend.repository.ui.actions, org.talend.repository.ui.actions,
org.talend.repository.ui.dialog, org.talend.repository.ui.dialog,
org.talend.repository.ui.login.connections, org.talend.repository.ui.login.connections,
@@ -128,5 +129,7 @@ Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-ClassPath: ., Bundle-ClassPath: .,
lib/resty-0.3.2.jar, lib/resty-0.3.2.jar,
lib/json_simple-1.1.jar lib/json_simple-1.1.jar,
lib/delight-rhino-sandbox-0.0.15.jar,
lib/rhino-1.7.13.jar
Eclipse-RegisterBuddy: org.talend.testutils Eclipse-RegisterBuddy: org.talend.testutils

View File

@@ -12,7 +12,9 @@ bin.includes = META-INF/,\
lib/,\ lib/,\
talend_metadata_columns_schema.xsd,\ talend_metadata_columns_schema.xsd,\
talend_targetschema_columns_schema.xsd,\ talend_targetschema_columns_schema.xsd,\
dist/ dist/,\
lib/delight-rhino-sandbox-0.0.15.jar,\
lib/rhino-1.7.13.jar
src.includes = META-INF/,\ src.includes = META-INF/,\
mappingMetadataTypes.xml,\ mappingMetadataTypes.xml,\
mappings/,\ mappings/,\

View File

@@ -21,6 +21,8 @@
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" /> <dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
<dbType type="INT" ignorePre="true" /> <dbType type="INT" ignorePre="true" />
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" /> <dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignorePre="true" />
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" /> <dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" /> <dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/> <dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
@@ -38,7 +40,7 @@
<dbType type="SET" ignoreLen="true" ignorePre="true" /> <dbType type="SET" ignoreLen="true" ignorePre="true" />
<dbType type="TEXT" ignoreLen="true" ignorePre="true" /> <dbType type="TEXT" ignoreLen="true" ignorePre="true" />
<dbType type="TIME" ignoreLen="true" ignorePre="true" /> <dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" /> <dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" /> <dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
<dbType type="TINYINT" ignorePre="true" /> <dbType type="TINYINT" ignorePre="true" />
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" /> <dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
@@ -62,6 +64,13 @@
<dbType type="SMALLINT" /> <dbType type="SMALLINT" />
</talendType> </talendType>
<talendType type="id_byte[]"> <talendType type="id_byte[]">
<dbType type="VARBINARY" default="true" />
<dbType type="BINARY" />
<dbType type="BIT" />
<dbType type="BLOB" />
<dbType type="LONGBLOB" />
<dbType type="MEDIUMBLOB" />
<dbType type="TINYBLOB" />
</talendType> </talendType>
<talendType type="id_Character"> <talendType type="id_Character">
<dbType type="CHAR" default="true" /> <dbType type="CHAR" default="true" />
@@ -125,6 +134,7 @@
<dbType type="MULTILINESTRING" /> <dbType type="MULTILINESTRING" />
<dbType type="TEXT" /> <dbType type="TEXT" />
<dbType type="TINYTEXT" /> <dbType type="TINYTEXT" />
<dbType type="CHAR" />
</talendType> </talendType>
</talendToDbTypes> </talendToDbTypes>
<dbToTalendTypes> <dbToTalendTypes>
@@ -132,13 +142,16 @@
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
<dbType type="BINARY"> <dbType type="BINARY">
<talendType type="id_byte[]" />
<talendType type="id_Boolean" default="true" /> <talendType type="id_Boolean" default="true" />
</dbType> </dbType>
<dbType type="BIT"> <dbType type="BIT">
<talendType type="id_byte[]" />
<talendType type="id_Boolean" default="true" /> <talendType type="id_Boolean" default="true" />
</dbType> </dbType>
<dbType type="BLOB"> <dbType type="BLOB">
<talendType type="id_Object" default="true" /> <talendType type="id_byte[]" default="true" />
<talendType type="id_Object" />
</dbType> </dbType>
<dbType type="CHAR"> <dbType type="CHAR">
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
@@ -176,6 +189,10 @@
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
<talendType type="id_Long"/> <talendType type="id_Long"/>
</dbType> </dbType>
<dbType type="INTEGER">
<talendType type="id_Integer" default="true" />
<talendType type="id_Long"/>
</dbType>
<dbType type="LINESTRING"> <dbType type="LINESTRING">
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>
@@ -183,10 +200,12 @@
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>
<dbType type="LONGBLOB"> <dbType type="LONGBLOB">
<talendType type="id_Object" default="true" /> <talendType type="id_byte[]" default="true" />
<talendType type="id_Object" />
</dbType> </dbType>
<dbType type="MEDIUMBLOB"> <dbType type="MEDIUMBLOB">
<talendType type="id_Object" default="true" /> <talendType type="id_byte[]" default="true" />
<talendType type="id_Object" />
</dbType> </dbType>
<dbType type="MEDIUMINT"> <dbType type="MEDIUMINT">
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
@@ -228,7 +247,8 @@
<talendType type="id_Date" default="true" /> <talendType type="id_Date" default="true" />
</dbType> </dbType>
<dbType type="TINYBLOB"> <dbType type="TINYBLOB">
<talendType type="id_Object" default="true" /> <talendType type="id_byte[]" default="true" />
<talendType type="id_Object" />
</dbType> </dbType>
<dbType type="TINYINT"> <dbType type="TINYINT">
<talendType type="id_Byte" default="true" /> <talendType type="id_Byte" default="true" />
@@ -240,6 +260,7 @@
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>
<dbType type="VARBINARY"> <dbType type="VARBINARY">
<talendType type="id_byte[]" default="true" />
</dbType> </dbType>
<dbType type="VARCHAR"> <dbType type="VARCHAR">
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
@@ -260,6 +281,9 @@
<dbType type="INT UNSIGNED" > <dbType type="INT UNSIGNED" >
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
<dbType type="INTEGER UNSIGNED" >
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="MEDIUMINT UNSIGNED" > <dbType type="MEDIUMINT UNSIGNED" >
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
<talendType type="id_Long" /> <talendType type="id_Long" />

View File

@@ -12,17 +12,26 @@
<dbType type="BPCHAR" ignoreLen="true" ignorePre="true" /> <dbType type="BPCHAR" ignoreLen="true" ignorePre="true" />
<dbType type="BYTEA" ignoreLen="true" ignorePre="true" /> <dbType type="BYTEA" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" defaultLength="50" ignorePre="true"/> <dbType type="CHAR" defaultLength="50" ignorePre="true"/>
<dbType type="CHARACTER" defaultLength="50" ignorePre="true"/>
<dbType type="CID" ignoreLen="true" ignorePre="true" /> <dbType type="CID" ignoreLen="true" ignorePre="true" />
<dbType type="CIDR" ignoreLen="true" ignorePre="true" /> <dbType type="CIDR" ignoreLen="true" ignorePre="true" />
<dbType type="CIRCLE" ignoreLen="true" ignorePre="true" /> <dbType type="CIRCLE" ignoreLen="true" ignorePre="true" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" /> <dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" /> <dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
<dbType type="REAL" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT8" ignoreLen="true" ignorePre="true" /> <dbType type="FLOAT8" ignoreLen="true" ignorePre="true" />
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
<dbType type="INET" ignoreLen="true" ignorePre="true" /> <dbType type="INET" ignoreLen="true" ignorePre="true" />
<dbType type="INT2" ignoreLen="true" ignorePre="true" /> <dbType type="INT2" ignoreLen="true" ignorePre="true" />
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
<dbType type="INT2VECTOR" ignoreLen="true" ignorePre="true" /> <dbType type="INT2VECTOR" ignoreLen="true" ignorePre="true" />
<dbType type="INT4" ignoreLen="true" ignorePre="true" /> <dbType type="INT4" ignoreLen="true" ignorePre="true" />
<dbType type="INT8" ignoreLen="true" ignorePre="true" /> <dbType type="INT8" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
<dbType type="BIT VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="INTERVAL" ignorePre="true" /> <dbType type="INTERVAL" ignorePre="true" />
<dbType type="LINE" ignoreLen="true" ignorePre="true" /> <dbType type="LINE" ignoreLen="true" ignorePre="true" />
<dbType type="LSEG" ignoreLen="true" ignorePre="true" /> <dbType type="LSEG" ignoreLen="true" ignorePre="true" />
@@ -30,6 +39,7 @@
<dbType type="MONEY" ignoreLen="true" ignorePre="true" /> <dbType type="MONEY" ignoreLen="true" ignorePre="true" />
<dbType type="NAME" ignoreLen="true" ignorePre="true" /> <dbType type="NAME" ignoreLen="true" ignorePre="true" />
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/> <dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10"/>
<dbType type="OID" ignoreLen="true" ignorePre="true" /> <dbType type="OID" ignoreLen="true" ignorePre="true" />
<dbType type="OIDVECTOR" ignoreLen="true" ignorePre="true" /> <dbType type="OIDVECTOR" ignoreLen="true" ignorePre="true" />
<dbType type="PATH" ignoreLen="true" ignorePre="true" /> <dbType type="PATH" ignoreLen="true" ignorePre="true" />
@@ -111,15 +121,18 @@
<talendType type="id_List"/> <talendType type="id_List"/>
<talendType type="id_Boolean"> <talendType type="id_Boolean">
<dbType type="BOOL" default="true" /> <dbType type="BOOL" default="true" />
<dbType type="BOOLEAN" />
</talendType> </talendType>
<talendType type="id_Byte"> <talendType type="id_Byte">
</talendType> </talendType>
<talendType type="id_byte[]"> <talendType type="id_byte[]">
<dbType type="BIT" default="true" /> <dbType type="BIT" default="true" />
<dbType type="VARBIT" /> <dbType type="VARBIT" />
<dbType type="BIT VARYING" />
</talendType> </talendType>
<talendType type="id_Character"> <talendType type="id_Character">
<dbType type="CHAR" default="true" /> <dbType type="CHAR" default="true" />
<dbType type="CHARACTER" />
<dbType type="BPCHAR" /> <dbType type="BPCHAR" />
<dbType type="VARCHAR" /> <dbType type="VARCHAR" />
<dbType type="TEXT" /> <dbType type="TEXT" />
@@ -137,32 +150,46 @@
</talendType> </talendType>
<talendType type="id_BigDecimal"> <talendType type="id_BigDecimal">
<dbType type="NUMERIC" default="true" /> <dbType type="NUMERIC" default="true" />
<dbType type="DECIMAL" />
<dbType type="FLOAT4" /> <dbType type="FLOAT4" />
<dbType type="REAL" />
<dbType type="FLOAT8"/> <dbType type="FLOAT8"/>
<dbType type="DOUBLE PRECISION"/>
</talendType> </talendType>
<talendType type="id_Double"> <talendType type="id_Double">
<dbType type="FLOAT4" /> <dbType type="FLOAT4" />
<dbType type="REAL" />
<dbType type="FLOAT8" default="true" /> <dbType type="FLOAT8" default="true" />
<dbType type="NUMERIC" /> <dbType type="NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="DOUBLE PRECISION"/>
</talendType> </talendType>
<talendType type="id_Float"> <talendType type="id_Float">
<dbType type="FLOAT4" default="true" /> <dbType type="FLOAT4" default="true" />
<dbType type="FLOAT8" /> <dbType type="FLOAT8" />
<dbType type="REAL" />
<dbType type="NUMERIC" /> <dbType type="NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="DOUBLE PRECISION"/>
</talendType> </talendType>
<talendType type="id_Integer"> <talendType type="id_Integer">
<dbType type="INT2" /> <dbType type="INT2" />
<dbType type="SMALLINT" />
<dbType type="INT4" default="true" /> <dbType type="INT4" default="true" />
<dbType type="SERIAL" /> <dbType type="SERIAL" />
<dbType type="INT8" /> <dbType type="INT8" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" /> <dbType type="BIGSERIAL" />
<dbType type="INTEGER" />
</talendType> </talendType>
<talendType type="id_Long"> <talendType type="id_Long">
<dbType type="INT2" /> <dbType type="INT2" />
<dbType type="INT4" /> <dbType type="INT4" />
<dbType type="SERIAL" /> <dbType type="SERIAL" />
<dbType type="INT8" default="true" /> <dbType type="INT8" default="true" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" /> <dbType type="BIGSERIAL" />
<dbType type="SMALLINT" />
</talendType> </talendType>
<talendType type="id_Object"> <talendType type="id_Object">
<dbType type="_POINT" /> <dbType type="_POINT" />
@@ -209,18 +236,26 @@
<dbType type="_ABSTIME" /> <dbType type="_ABSTIME" />
<dbType type="_ACLITEM" /> <dbType type="_ACLITEM" />
<dbType type="_INT8" /> <dbType type="_INT8" />
<dbType type="BIGINT" />
<dbType type="BIT VARYING" />
<dbType type="_VARBIT" /> <dbType type="_VARBIT" />
<dbType type="_BIT" /> <dbType type="_BIT" />
<dbType type="_BOOL" /> <dbType type="_BOOL" />
<dbType type="BOOLEAN" />
<dbType type="BOX" /> <dbType type="BOX" />
<dbType type="_BOX" /> <dbType type="_BOX" />
<dbType type="_BYTEA" /> <dbType type="_BYTEA" />
<dbType type="_VARCHAR" /> <dbType type="_VARCHAR" />
<dbType type="CHARACTER VARYING" />
<dbType type="CHARACTER" />
<dbType type="INTEGER" />
<dbType type="REAL" />
<dbType type="_BPCHAR" /> <dbType type="_BPCHAR" />
<dbType type="_CID" /> <dbType type="_CID" />
<dbType type="_CIDR" /> <dbType type="_CIDR" />
<dbType type="_CIRCLE" /> <dbType type="_CIRCLE" />
<dbType type="_DATE" /> <dbType type="_DATE" />
<dbType type="DOUBLE PRECISION"/>
<dbType type="_FLOAT8" /> <dbType type="_FLOAT8" />
<dbType type="_INET" /> <dbType type="_INET" />
<dbType type="INT2VECTOR" /> <dbType type="INT2VECTOR" />
@@ -236,6 +271,7 @@
<dbType type="NAME" /> <dbType type="NAME" />
<dbType type="_NAME" /> <dbType type="_NAME" />
<dbType type="_NUMERIC" /> <dbType type="_NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="_OID" /> <dbType type="_OID" />
<dbType type="OIDVECTOR" /> <dbType type="OIDVECTOR" />
<dbType type="_OIDVECTOR" /> <dbType type="_OIDVECTOR" />
@@ -247,11 +283,14 @@
<dbType type="INT4" /> <dbType type="INT4" />
<dbType type="SERIAL" /> <dbType type="SERIAL" />
<dbType type="INT8" /> <dbType type="INT8" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" /> <dbType type="BIGSERIAL" />
<dbType type="SMALLINT" />
</talendType> </talendType>
<talendType type="id_String"> <talendType type="id_String">
<dbType type="BPCHAR" /> <dbType type="BPCHAR" />
<dbType type="VARCHAR" default="true" /> <dbType type="VARCHAR" default="true" />
<dbType type="CHARACTER VARYING" />
<dbType type="TEXT" /> <dbType type="TEXT" />
</talendType> </talendType>
</talendToDbTypes> </talendToDbTypes>
@@ -259,15 +298,30 @@
<dbType type="INT2" > <dbType type="INT2" >
<talendType type="id_Short" default="true" /> <talendType type="id_Short" default="true" />
</dbType> </dbType>
<dbType type="SMALLINT" >
<talendType type="id_Short" default="true" />
</dbType>
<dbType type="INT4" > <dbType type="INT4" >
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
</dbType> </dbType>
<dbType type="INTEGER" >
<talendType type="id_Integer" default="true" />
</dbType>
<dbType type="CHARACTER VARYING" >
<talendType type="id_String" default="true" />
</dbType>
<dbType type="BOOLEAN" >
<talendType type="id_Boolean" default="true" />
</dbType>
<dbType type="SERIAL" > <dbType type="SERIAL" >
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
</dbType> </dbType>
<dbType type="INT8" > <dbType type="INT8" >
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
<dbType type="BIGINT" >
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BIGSERIAL" > <dbType type="BIGSERIAL" >
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
@@ -275,14 +329,26 @@
<talendType type="id_Float" default="true" /> <talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/> <talendType type="id_BigDecimal"/>
</dbType> </dbType>
<dbType type="REAL" >
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="FLOAT8" > <dbType type="FLOAT8" >
<talendType type="id_Double" default="true" /> <talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/> <talendType type="id_BigDecimal"/>
</dbType> </dbType>
<dbType type="DOUBLE PRECISION" >
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="NUMERIC"> <dbType type="NUMERIC">
<talendType type="id_Double"/> <talendType type="id_Double"/>
<talendType type="id_BigDecimal" default="true" /> <talendType type="id_BigDecimal" default="true" />
</dbType> </dbType>
<dbType type="DECIMAL">
<talendType type="id_Double"/>
<talendType type="id_BigDecimal" default="true" />
</dbType>
<dbType type="BOOL" > <dbType type="BOOL" >
<talendType type="id_Boolean" default="true" /> <talendType type="id_Boolean" default="true" />
</dbType> </dbType>
@@ -292,9 +358,15 @@
<dbType type="VARBIT" > <dbType type="VARBIT" >
<talendType type="id_byte[]" default="true" /> <talendType type="id_byte[]" default="true" />
</dbType> </dbType>
<dbType type="BIT VARYING" >
<talendType type="id_byte[]" default="true" />
</dbType>
<dbType type="CHAR" > <dbType type="CHAR" >
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>
<dbType type="CHARACTER" >
<talendType type="id_String" default="true" />
</dbType>
<dbType type="BPCHAR" > <dbType type="BPCHAR" >
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>

View File

@@ -22,7 +22,7 @@
<dbType type="INT" ignorePre="true" /> <dbType type="INT" ignorePre="true" />
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" /> <dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignorePre="true" /> <dbType type="INTEGER" ignorePre="true" />
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" /> <dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" /> <dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" /> <dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/> <dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
@@ -190,9 +190,9 @@
<talendType type="id_Long"/> <talendType type="id_Long"/>
</dbType> </dbType>
<dbType type="INTEGER"> <dbType type="INTEGER">
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
<talendType type="id_Long"/> <talendType type="id_Long"/>
</dbType> </dbType>
<dbType type="LINESTRING"> <dbType type="LINESTRING">
<talendType type="id_String" default="true" /> <talendType type="id_String" default="true" />
</dbType> </dbType>
@@ -282,8 +282,8 @@
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
<dbType type="INTEGER UNSIGNED" > <dbType type="INTEGER UNSIGNED" >
<talendType type="id_Long" default="true" /> <talendType type="id_Long" default="true" />
</dbType> </dbType>
<dbType type="MEDIUMINT UNSIGNED" > <dbType type="MEDIUMINT UNSIGNED" >
<talendType type="id_Integer" default="true" /> <talendType type="id_Integer" default="true" />
<talendType type="id_Long" /> <talendType type="id_Long" />

View File

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

View File

@@ -9,19 +9,61 @@
</parent> </parent>
<artifactId>org.talend.core.runtime</artifactId> <artifactId>org.talend.core.runtime</artifactId>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.javadelight/delight-rhino-sandbox -->
<dependency>
<groupId>org.javadelight</groupId>
<artifactId>delight-rhino-sandbox</artifactId>
<version>0.0.15</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mozilla/rhino -->
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.13</version>
</dependency>
</dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>2.8.2</version> <executions>
<executions> <execution>
<execution> <id>copy-dependencies</id>
<id>default-deploy</id> <phase>generate-sources</phase>
<phase>deploy</phase> <goals>
</execution> <goal>copy</goal>
</executions> </goals>
</plugin> <configuration>
</plugins> <outputDirectory>${project.basedir}/lib</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.javadelight</groupId>
<artifactId>delight-rhino-sandbox</artifactId>
<version>0.0.15</version>
</artifactItem>
<artifactItem>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.13</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
</project> </project>

View File

@@ -89,6 +89,10 @@ public final class JavaUtils {
/** Java Routines Directory. */ /** Java Routines Directory. */
public static final String JAVA_ROUTINES_DIRECTORY = "routines"; //$NON-NLS-1$ public static final String JAVA_ROUTINES_DIRECTORY = "routines"; //$NON-NLS-1$
// TODO check refrerences of JAVA_ROUTINES_DIRECTORY
/** Java Routines Jar Directory. */
public static final String JAVA_ROUTINESJAR_DIRECTORY = "routinesjar"; //$NON-NLS-1$
/** Java Pig Directory. */ /** Java Pig Directory. */
public static final String JAVA_PIG_DIRECTORY = "pig"; //$NON-NLS-1$ public static final String JAVA_PIG_DIRECTORY = "pig"; //$NON-NLS-1$
@@ -98,6 +102,9 @@ public final class JavaUtils {
/** Java Beans Directory. */ /** Java Beans Directory. */
public static final String JAVA_BEANS_DIRECTORY = "beans"; //$NON-NLS-1$ public static final String JAVA_BEANS_DIRECTORY = "beans"; //$NON-NLS-1$
/** Java Beans Jar Directory. */
public static final String JAVA_BEANSJAR_DIRECTORY = "beansjar"; //$NON-NLS-1$
/** Java SQLTemplate Directory. */ /** Java SQLTemplate Directory. */
public static final String JAVA_SQLPATTERNS_DIRECTORY = "sqltemplates"; //$NON-NLS-1$ public static final String JAVA_SQLPATTERNS_DIRECTORY = "sqltemplates"; //$NON-NLS-1$

View File

@@ -116,6 +116,7 @@ public interface ICoreService extends IService {
public String validateValueForDBType(String columnName); public String validateValueForDBType(String columnName);
@Deprecated
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject); public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
public IPreferenceStore getPreferenceStore(); public IPreferenceStore getPreferenceStore();
@@ -124,6 +125,14 @@ public interface ICoreService extends IService {
public IMetadataTable convert(MetadataTable originalTable); public IMetadataTable convert(MetadataTable originalTable);
@Deprecated
public void syncMappingsFileFromSystemToProject(); public void syncMappingsFileFromSystemToProject();
public static ICoreService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
}
return null;
}
} }

View File

@@ -16,11 +16,13 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.talend.core.model.general.ModuleNeeded; import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.RetrieveResult;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.nexus.ArtifactRepositoryBean; import org.talend.core.nexus.ArtifactRepositoryBean;
import org.talend.core.nexus.TalendLibsServerManager; import org.talend.core.nexus.TalendLibsServerManager;
@@ -78,6 +80,8 @@ public interface ILibraryManagerService extends IService {
public void createModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap); public void createModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
public Map<String,String> buildModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
/** /**
* DOC ycbai Comment method "retrieve". * DOC ycbai Comment method "retrieve".
* *
@@ -107,6 +111,8 @@ public interface ILibraryManagerService extends IService {
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap); public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
RetrieveResult retrieveModules(ERepositoryObjectType codeType, Set<ModuleNeeded> modulesNeeded, String pathToStore,
boolean showDialog, IProgressMonitor... monitorWrap);
/** /**
* *
* Resolve the jar from custom nexus * Resolve the jar from custom nexus
@@ -150,18 +156,13 @@ public interface ILibraryManagerService extends IService {
public void clearCache(); public void clearCache();
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
@Deprecated @Deprecated
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap); public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
public boolean checkJarInstalledFromPlatform(String uriPath); public boolean checkJarInstalledFromPlatform(String uriPath);
/**
* deploy jars from lib/java to local maven if any jar already exist in maven and need update , for jars that not
* exist in maven won't be deploy by this funciton , those jars should be deploy when it is needed Comment method
* "synToLocalMaven".
*/
public void synToLocalMaven();
public String getMavenUriFromIndex(String jarName); public String getMavenUriFromIndex(String jarName);
public void setCustomMavenURI(String orignalURI, String customURI); public void setCustomMavenURI(String orignalURI, String customURI);

View File

@@ -138,6 +138,10 @@ public class PluginChecker {
public static final String HELP_PLUGIN_ID = "org.talend.help"; //$NON-NLS-1$ public static final String HELP_PLUGIN_ID = "org.talend.help"; //$NON-NLS-1$
public static final String APACHE_CXF_PLUGIN_ID = "org.talend.libraries.apache.cxf"; //$NON-NLS-1$
public static final String SWTBOT_PLUGIN_ID = "org.eclipse.swtbot.eclipse.core"; //$NON-NLS-1$
/** /**
* Check if specific plug-in is loaded. * Check if specific plug-in is loaded.
* *
@@ -370,6 +374,10 @@ public class PluginChecker {
return isPluginLoaded(BD_ROUTINE_PLUGIN_ID); return isPluginLoaded(BD_ROUTINE_PLUGIN_ID);
} }
public static boolean isSWTBotLoaded() {
return isPluginLoaded(SWTBOT_PLUGIN_ID);
}
public static String getBundlePath(String bundleName) { public static String getBundlePath(String bundleName) {
String bundlePath = ""; //$NON-NLS-1$ String bundlePath = ""; //$NON-NLS-1$
Bundle refBundle = Platform.getBundle(bundleName); Bundle refBundle = Platform.getBundle(bundleName);

View File

@@ -67,8 +67,8 @@ public enum EDatabase4DriverClassName {
// if change the order, it might break the audit for PSQL. // if change the order, it might break the audit for PSQL.
PSQL(EDatabaseTypeName.PSQL, "org.postgresql.Driver"), //$NON-NLS-1$ PSQL(EDatabaseTypeName.PSQL, "org.postgresql.Driver"), //$NON-NLS-1$
PLUSPSQL(EDatabaseTypeName.PLUSPSQL, "org.postgresql.Driver"), //$NON-NLS-1$ PLUSPSQL(EDatabaseTypeName.PLUSPSQL, "org.postgresql.Driver"), //$NON-NLS-1$
GREENPLUM(EDatabaseTypeName.GREENPLUM, "org.postgresql.Driver"), //$NON-NLS-1$ GREENPLUM(EDatabaseTypeName.GREENPLUM, "com.pivotal.jdbc.GreenplumDriver"), //$NON-NLS-1$
GREENPLUM_PSQL(EDatabaseTypeName.GREENPLUM, "org.postgresql.Driver"), //$NON-NLS-1$
SAS(EDatabaseTypeName.SAS, "com.sas.rio.MVADriver"), //$NON-NLS-1$ SAS(EDatabaseTypeName.SAS, "com.sas.rio.MVADriver"), //$NON-NLS-1$
SAPHana(EDatabaseTypeName.SAPHana, "com.sap.db.jdbc.Driver"), //$NON-NLS-1$ SAPHana(EDatabaseTypeName.SAPHana, "com.sap.db.jdbc.Driver"), //$NON-NLS-1$
SQLITE(EDatabaseTypeName.SQLITE, "org.sqlite.JDBC"), //$NON-NLS-1$ SQLITE(EDatabaseTypeName.SQLITE, "org.sqlite.JDBC"), //$NON-NLS-1$

View File

@@ -114,7 +114,10 @@ public enum EDatabaseTypeName {
"ParAccel", "ParAccel", Boolean.TRUE, "PARACCEL", "PARACCEL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "ParAccel", "ParAccel", Boolean.TRUE, "PARACCEL", "PARACCEL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
NETEZZA( NETEZZA(
"Netezza", "Netezza", Boolean.FALSE, "NETEZZA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "Netezza", "Netezza", Boolean.FALSE, "NETEZZA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SAS("SAS", "SAS", Boolean.TRUE, "SAS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ /**
* @deprecated
*/
SAS("SAS", "SAS (Deprecated)", Boolean.TRUE, "SAS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// General JDBC not support schema defalut // General JDBC not support schema defalut
GENERAL_JDBC( GENERAL_JDBC(
"General JDBC", "General JDBC", Boolean.FALSE, "JDBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "General JDBC", "General JDBC", Boolean.FALSE, "JDBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -146,7 +149,9 @@ public enum EDatabaseTypeName {
"HBase", "HBase", Boolean.FALSE, "HBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "HBase", "HBase", Boolean.FALSE, "HBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MAPRDB( MAPRDB(
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SNOWFLAKE(
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
// displayName is used in Java code. // displayName is used in Java code.
private String displayName; private String displayName;

View File

@@ -22,14 +22,14 @@ import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
*/ */
public enum EImpalaDriver { public enum EImpalaDriver {
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver"), HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver", "doSupportHive2"),
IMPALA40("IMPALA40", "IMPALA40", "com.cloudera.impala.jdbc4.Driver"), IMPALA("IMPALA", "IMPALA", "com.cloudera.impala.jdbc.Driver", "doSupportImpalaConnector");
IMPALA41("IMPALA41", "IMPALA41", "com.cloudera.impala.jdbc41.Driver");
EImpalaDriver(String displayName, String name, String driver) { EImpalaDriver(String displayName, String name, String driver, String supportDriverMethodName) {
this.displayName = displayName; this.displayName = displayName;
this.name = name; this.name = name;
this.driver = driver; this.driver = driver;
this.supportDriverMethodName = supportDriverMethodName;
} }
private String displayName; private String displayName;
@@ -38,6 +38,8 @@ public enum EImpalaDriver {
private String driver; private String driver;
private String supportDriverMethodName;
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@@ -50,6 +52,10 @@ public enum EImpalaDriver {
return driver; return driver;
} }
public String getSupportDriverMethodName() {
return supportDriverMethodName;
}
public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) { public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) {
return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName); return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName);
} }
@@ -57,7 +63,7 @@ public enum EImpalaDriver {
public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) { public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) {
List<String> list = new ArrayList<>(0); List<String> list = new ArrayList<>(0);
for (EImpalaDriver driver : EImpalaDriver.values()) { for (EImpalaDriver driver : EImpalaDriver.values()) {
if (isSupport(distribution, version, byDisplay, "doSupportImpalaConnector")) { if (isSupport(distribution, version, byDisplay, driver.getSupportDriverMethodName())) {
list.add(driver.getDisplayName()); list.add(driver.getDisplayName());
} }
} }

View File

@@ -214,6 +214,36 @@ public class ConnParameterKeys {
/******************************************/ /******************************************/
/*********** Azure Synapse keys ***************/
public static final String CONN_PARA_KEY_SYNAPSE_HOST = "CONN_PARA_KEY_SYNAPSE_HOST"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN = "CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_SPARK_POOLS = "CONN_PARA_KEY_SYNAPSE_SPARK_POOLS"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME = "CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_CONTAINER = "CONN_PARA_KEY_SYNAPSE_FS_CONTAINER"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_DRIVER_MEMORY = "CONN_PARA_KEY_DRIVER_MEMORY"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_DRIVER_CORES = "CONN_PARA_KEY_DRIVER_CORES"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
/******************************************/
/** /**
* HBase keys. * HBase keys.
*/ */
@@ -322,6 +352,8 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER"; public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID"; public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN"; public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
@@ -335,4 +367,19 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR"; public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR";
/**Knox*/
public static final String CONN_PARA_KEY_SPARK_MODE="CONN_PARA_KEY_SPARK_MODE";
public static final String CONN_PARA_KEY_USE_KNOX="CONN_PARA_KEY_USE_KNOX";
public static final String CONN_PARA_KEY_KNOX_URL="CONN_PARA_KEY_KNOX_URL";
public static final String CONN_PARA_KEY_KNOX_USER = "CONN_PARA_KEY_KNOX_USER";
public static final String CONN_PARA_KEY_KNOX_PASSWORD="CONN_PARA_KEY_KNOX_PASSWORD";
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
public static final String CONN_PARA_KEY_KNOX_TIMEOUT="CONN_PARA_KEY_KNOX_TIMEOUT";
} }

View File

@@ -114,6 +114,13 @@ public class DatabaseConnStrUtil {
&& EDatabaseVersion4Drivers.SYBASEIQ_16_SA.getVersionValue().equals(dbVersion)) { && EDatabaseVersion4Drivers.SYBASEIQ_16_SA.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.SYBASEASE_16_SA; connStr = EDatabaseConnTemplate.SYBASEASE_16_SA;
} }
if (EDatabaseTypeName.GREENPLUM.getDisplayName().equals(dbType)) {
if (EDatabaseVersion4Drivers.GREENPLUM.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.GREENPLUM;
}else if(EDatabaseVersion4Drivers.GREENPLUM_PSQL.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.GREENPLUM_PSQL;
}
}
EDatabaseVersion4Drivers version = EDatabaseVersion4Drivers.indexOfByVersion(dbVersion); EDatabaseVersion4Drivers version = EDatabaseVersion4Drivers.indexOfByVersion(dbVersion);
if (connStr != null) { if (connStr != null) {
String s = connStr.getUrlTemplate(version); String s = connStr.getUrlTemplate(version);
@@ -221,8 +228,10 @@ public class DatabaseConnStrUtil {
.get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA)); .get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA));
} }
String url = null; String url = null;
if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)) { String driver = dbConn.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal); if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)
|| template.startsWith(DbConnStrForHive.URL_IMPALA_TEMPLATE)) {
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal, driver);
} }
url = attachAdditionalHiveParameters(url, dbConn, false); url = attachAdditionalHiveParameters(url, dbConn, false);
return url; return url;
@@ -291,13 +300,20 @@ public class DatabaseConnStrUtil {
if (!url.endsWith(";")) { //$NON-NLS-1$ if (!url.endsWith(";")) { //$NON-NLS-1$
url = url + ";"; //$NON-NLS-1$ url = url + ";"; //$NON-NLS-1$
} }
url = url + "ssl=true;"; //$NON-NLS-1$
boolean isHiveDriver = url.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE);
url = url + ( isHiveDriver ? "ssl=true;" : "SSL=1;" ); //$NON-NLS-1$
String trustStorePath = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PATH); String trustStorePath = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PATH);
if (trustStorePath != null) { if (trustStorePath != null) {
url = url + "sslTrustStore=" + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$ url = url + ( isHiveDriver ? "sslTrustStore=" : "SSLTrustStore=" ) + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
} }
String trustStorePassword = null; String trustStorePassword = null;
trustStorePassword = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PASSWORD); trustStorePassword = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PASSWORD);
if (trustStorePassword != null) { if (trustStorePassword != null) {
if (encryptPassword) { if (encryptPassword) {
trustStorePassword = "encrypted"; //$NON-NLS-1$ trustStorePassword = "encrypted"; //$NON-NLS-1$
@@ -309,7 +325,7 @@ public class DatabaseConnStrUtil {
if (trustStorePassword == null) { if (trustStorePassword == null) {
trustStorePassword = ""; //$NON-NLS-1$ trustStorePassword = ""; //$NON-NLS-1$
} }
url = url + "trustStorePassword=" + trustStorePassword; //$NON-NLS-1$ url = url + ( isHiveDriver ? "trustStorePassword=" : "SSLTrustStorePwd=" ) + trustStorePassword; //$NON-NLS-1$
} }
if (url.endsWith(";")) { //$NON-NLS-1$ if (url.endsWith(";")) { //$NON-NLS-1$
url = url.substring(0, url.length() - 1); url = url.substring(0, url.length() - 1);
@@ -369,10 +385,15 @@ public class DatabaseConnStrUtil {
return s; return s;
} }
private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal) { private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal,
String s = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null); String driver) {
String standardURlString = getImpalaURlString(s, supportContext, server, port, sid); String template = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null);
String principalSuffix = "principal="; //$NON-NLS-1$ if (EDatabaseTypeName.IMPALA.getDbType().equals(driver)) {
template = EDatabaseConnTemplate.IMPALA_IMPALA_DRIVER.getUrlTemplate(null);
}
String standardURlString = getImpalaURlString(template, supportContext, server, port, sid);
String principalSuffix = "IMPALA".equals(driver) ? "AuthMech=1" : "principal="; //$NON-NLS-1$
boolean hasPrinc = false; boolean hasPrinc = false;
String[] urlArray = standardURlString.split(SEMICOLON); String[] urlArray = standardURlString.split(SEMICOLON);
if (urlArray[urlArray.length - 1].startsWith(principalSuffix)) { if (urlArray[urlArray.length - 1].startsWith(principalSuffix)) {
@@ -384,7 +405,21 @@ public class DatabaseConnStrUtil {
} }
} else { } else {
if (Principal != null) { if (Principal != null) {
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
if("IMPALA".equals(driver)) {
String krbServiceName = (Principal.split("/")[0]);
String krbHostFQDN = (Principal.split("/")[1].split("@")[0]);
String krbRealm = (Principal.split("/")[1].split("@")[1]);
String urlKerberosParameter = ";KrbServiceName=" + krbServiceName
+ ";KrbHostFQDN=" + krbHostFQDN
+ ";KrbRealm=" + krbRealm;
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(urlKerberosParameter);
} else {
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
}
} }
} }

View File

@@ -30,6 +30,8 @@ public class DbConnStrForHive extends DbConnStr {
public static final String URL_HIVE_2_TEMPLATE = "jdbc:hive2://";//$NON-NLS-1$ public static final String URL_HIVE_2_TEMPLATE = "jdbc:hive2://";//$NON-NLS-1$
public static final String URL_IMPALA_TEMPLATE = "jdbc:impala://";//$NON-NLS-1$
/** /**
* DOC Marvin DbConnStrForHive constructor comment. * DOC Marvin DbConnStrForHive constructor comment.
* *

View File

@@ -33,7 +33,7 @@ public enum EDatabaseConnTemplate {
MYSQL(new DbConnStr(EDatabaseTypeName.MYSQL, // MYSQL(new DbConnStr(EDatabaseTypeName.MYSQL, //
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$ "jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
"3306", //$NON-NLS-1$ "3306", //$NON-NLS-1$
"noDatetimeStringSync=true")), //$NON-NLS-1$ "noDatetimeStringSync=true&enabledTLSProtocols=TLSv1.2,TLSv1.1,TLSv1")), //$NON-NLS-1$
AMAZON_AURORA(new DbConnStr(EDatabaseTypeName.AMAZON_AURORA, // AMAZON_AURORA(new DbConnStr(EDatabaseTypeName.AMAZON_AURORA, //
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$ "jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
@@ -54,6 +54,11 @@ public enum EDatabaseConnTemplate {
"5432")), //$NON-NLS-1$ "5432")), //$NON-NLS-1$
GREENPLUM(new DbConnStr(EDatabaseTypeName.GREENPLUM, // GREENPLUM(new DbConnStr(EDatabaseTypeName.GREENPLUM, //
"jdbc:pivotal:greenplum://<host>:<port>;;DatabaseName=<sid>;<property>", //$NON-NLS-1$
"5432")), //$NON-NLS-1$
GREENPLUM_PSQL(new DbConnStr(EDatabaseTypeName.GREENPLUM, //
"jdbc:postgresql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$ "jdbc:postgresql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
"5432")), //$NON-NLS-1$ "5432")), //$NON-NLS-1$
@@ -209,6 +214,9 @@ public enum EDatabaseConnTemplate {
IMPALA(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:hive2://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$ IMPALA(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:hive2://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$
"21050", null, null, "localhost", "default")), //$NON-NLS-1$ "21050", null, null, "localhost", "default")), //$NON-NLS-1$
IMPALA_IMPALA_DRIVER(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:impala://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$
"21050", null, null, "localhost", "default")), //$NON-NLS-1$
HBASE(new DbConnStr(EDatabaseTypeName.HBASE, "127.0.0.1", //$NON-NLS-1$ HBASE(new DbConnStr(EDatabaseTypeName.HBASE, "127.0.0.1", //$NON-NLS-1$
"2181")), //$NON-NLS-1$ "2181")), //$NON-NLS-1$

View File

@@ -25,8 +25,8 @@ import org.talend.core.database.conn.DatabaseConnConstants;
public enum EDatabaseVersion4Drivers { public enum EDatabaseVersion4Drivers {
// access // access
ACCESS_JDBC(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, new String[] { 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-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.0.jar", "bcprov-jdk15on-1.51.jar", "talend-ucanaccess-utils-1.0.0.jar" })), "jackcess-encrypt-2.1.4.jar", "bcprov-jdk15on-1.69.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_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$ ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
// oracle // oracle
@@ -58,7 +58,7 @@ public enum EDatabaseVersion4Drivers {
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$ HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$ HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.4.198.jar")), //$NON-NLS-1$ H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
// //
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$ JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
@@ -71,20 +71,25 @@ public enum EDatabaseVersion4Drivers {
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$ 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_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", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ "sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS, 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", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ "SAS 9.2", "SAS_9.2", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19jar" })),
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$ SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
// MYSQL, add for 9594 // 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-java-8.0.18.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.30-bin.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$ 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 // add for 9594
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MSSQL_2012(new DbVersion4Drivers(EDatabaseTypeName.MSSQL, MSSQL_2012(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "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, MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
"Microsoft", "MSSQL_PROP", "mssql-jdbc.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.9.jar", "oauth2-oidc-sdk-9.7.jar",
"json-smart-2.4.11.jar", "nimbus-jose-jwt-9.22.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
"accessors-smart-2.4.11.jar", "asm-9.5.jar", "content-type-2.1.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$ 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$
VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -99,15 +104,15 @@ public enum EDatabaseVersion4Drivers {
VERTICA_3(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 3 (Deprecated)", "VERTICA_3", "vertica_3.0_jdk_5.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ VERTICA_3(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 3 (Deprecated)", "VERTICA_3", "vertica_3.0_jdk_5.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// for bug 0017930 // for bug 0017930
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM, "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")), // PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$ IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$ "db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$ IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
@@ -164,13 +169,15 @@ public enum EDatabaseVersion4Drivers {
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})), MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$ REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
"redshift-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$ 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$ 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.37.1061.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackson-databind-2.10.1.jar", "jackson-annotations-2.10.1.jar", "httpcore-4.4.11.jar", "httpclient-4.5.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$ "jackson-core-2.13.4.jar", //$NON-NLS-1$
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.11.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"httpclient-4.5.9.jar", //$NON-NLS-1$
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$ AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
private DbVersion4Drivers dbVersionBean; private DbVersion4Drivers dbVersionBean;

View File

@@ -38,7 +38,10 @@ public class HadoopClassLoaderFactory2 {
public static ClassLoader getHDFSClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) { public static ClassLoader getHDFSClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
return getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, 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) { public static ClassLoader getMRClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
return getClassLoader(relatedClusterId, EHadoopCategory.MAP_REDUCE, distribution, version, useKrb); return getClassLoader(relatedClusterId, EHadoopCategory.MAP_REDUCE, distribution, version, useKrb);
} }

View File

@@ -22,4 +22,6 @@ public interface IHadoopArgs {
public static final String HIVE_ARG_STANDALONE = "STANDALONE"; //$NON-NLS-1$ 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

@@ -102,21 +102,58 @@ public enum EHadoopProperties {
HD_JOB_RESULT_FOLDER, HD_JOB_RESULT_FOLDER,
SYNAPSE_ENDPOINT,
SYNAPSE_TOKEN,
SPARK_POOL_NAME,
SYNAPSE_STORAGE_HOST,
SYNAPSE_STORAGE_CONTAINER,
SYNAPSE_STORAGE_USERNAME,
SYNAPSE_STORAGE_PASSWORD,
DEPLOY_FOLDER,
SPARK_DRIVER_MEM,
SPARK_DRIVER_CORES,
SPARK_EXECUTOR_MEMORY,
QUBOLE_API_TOKEN, QUBOLE_API_TOKEN,
QUBOLE_CLUSTER, QUBOLE_CLUSTER,
QUBOLE_CLUSTER_LABEL, QUBOLE_CLUSTER_LABEL,
QUBOLE_ENDPOINT, QUBOLE_ENDPOINT,
QUBOLE_ENDPOINT_URL, QUBOLE_ENDPOINT_URL,
QUBOLE_S3_ACCESS_KEY, QUBOLE_S3_ACCESS_KEY,
QUBOLE_S3_SECRET_KEY, QUBOLE_S3_SECRET_KEY,
QUBOLE_S3_BUCKET_NAME, QUBOLE_S3_BUCKET_NAME,
QUBOLE_S3_BUCKET_KEY, QUBOLE_S3_BUCKET_KEY,
QUBOLE_S3_REGION, QUBOLE_S3_REGION,
DATABRICKS_ENDPOINT, DATABRICKS_ENDPOINT,
DATABRICKS_CLOUD_PROVIDER, DATABRICKS_CLOUD_PROVIDER,
DATABRICKS_RUN_MODE,
DATABRICKS_CLUSTER_ID, DATABRICKS_CLUSTER_ID,
DATABRICKS_TOKEN, DATABRICKS_TOKEN,
DATABRICKS_DBFS_DEP_FOLDER; DATABRICKS_DBFS_DEP_FOLDER;
public String getName() { public String getName() {

View File

@@ -35,6 +35,8 @@ public enum EHadoopDistributions {
MICROSOFT_HD_INSIGHT("Microsoft HD Insight"), //$NON-NLS-1$ MICROSOFT_HD_INSIGHT("Microsoft HD Insight"), //$NON-NLS-1$
AZURE_SYNAPSE("Azure Synapse Runtime for Apache Spark 3.0"), //$NON-NLS-1$
GOOGLE_CLOUD_DATAPROC("Google Cloud Dataproc"), //$NON-NLS-1$ GOOGLE_CLOUD_DATAPROC("Google Cloud Dataproc"), //$NON-NLS-1$
CUSTOM("Custom - Unsupported"); //$NON-NLS-1$ CUSTOM("Custom - Unsupported"); //$NON-NLS-1$

View File

@@ -0,0 +1,73 @@
// ============================================================================
//
// Copyright (C) 2006-2020 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.hadoop.version;
import java.util.ArrayList;
import java.util.List;
public enum ESynapseStorage {
ADLS_GEN2("ADLS Gen2"); //$NON-NLS-1$
private String displayName;
ESynapseStorage(String displayName) {
this.displayName = displayName;
}
public String getName() {
return name();
}
public String getDisplayName() {
return this.displayName;
}
public static List<String> getAllSynapseStorageDisplayNames() {
return getAllSynapseStorageNames(true);
}
public static List<String> getAllSynapseStorageNames(boolean display) {
List<String> names = new ArrayList<String>();
ESynapseStorage[] values = values();
for (ESynapseStorage storage : values) {
if (display) {
names.add(storage.getDisplayName());
} else {
names.add(storage.getName());
}
}
return names;
}
public static ESynapseStorage getSynapseStoragenByDisplayName(String name) {
return getSynapseStorageByName(name, true);
}
public static ESynapseStorage getSynapseStorageByName(String name, boolean display) {
if (name != null) {
for (ESynapseStorage storage : values()) {
if (display) {
if (name.equalsIgnoreCase(storage.getDisplayName())) {
return storage;
}
} else {
if (name.equalsIgnoreCase(storage.getName())) {
return storage;
}
}
}
}
return null;
}
}

View File

@@ -26,11 +26,6 @@ public enum ECustomVersionGroup {
MAPRDB, MAPRDB,
PIG,
PIG_HBASE,
PIG_HCATALOG,
MAP_REDUCE, MAP_REDUCE,
SPARK, SPARK,

View File

@@ -18,12 +18,6 @@ public enum ECustomVersionType {
MAPRDB("Maprdb", ECustomVersionGroup.MAPRDB), //$NON-NLS-1$ MAPRDB("Maprdb", ECustomVersionGroup.MAPRDB), //$NON-NLS-1$
PIG("Pig", ECustomVersionGroup.PIG), //$NON-NLS-1$
PIG_HBASE("Pig for HBase", ECustomVersionGroup.PIG_HBASE), //$NON-NLS-1$
PIG_HCATALOG("Pig for Hcatalog", ECustomVersionGroup.PIG_HCATALOG), //$NON-NLS-1$
MAP_REDUCE("Map Reduce", ECustomVersionGroup.MAP_REDUCE), //$NON-NLS-1$ MAP_REDUCE("Map Reduce", ECustomVersionGroup.MAP_REDUCE), //$NON-NLS-1$
SPARK("Spark", ECustomVersionGroup.SPARK), //$NON-NLS-1$ SPARK("Spark", ECustomVersionGroup.SPARK), //$NON-NLS-1$

View File

@@ -483,7 +483,7 @@ public class HadoopCustomVersionDefineDialog extends TitleAreaDialog {
private boolean isSupportHadoop() { private boolean isSupportHadoop() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) { if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {
hadoopService = (IHadoopService) GlobalServiceRegister.getDefault().getService(IHadoopService.class); hadoopService = GlobalServiceRegister.getDefault().getService(IHadoopService.class);
} }
return hadoopService != null; return hadoopService != null;
@@ -503,11 +503,7 @@ public class HadoopCustomVersionDefineDialog extends TitleAreaDialog {
private ECustomVersionType[] filterTypes(Object[] types) { private ECustomVersionType[] filterTypes(Object[] types) {
Object[] filteredTypes = ArrayUtils.removeElement(types, ECustomVersionType.ALL); Object[] filteredTypes = ArrayUtils.removeElement(types, ECustomVersionType.ALL);
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService(); IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
INode node = designerCoreService.getRefrenceNode("tPigLoad"); //$NON-NLS-1$ INode node = designerCoreService.getRefrenceNode("tMRConfiguration", ComponentCategory.CATEGORY_4_MAPREDUCE.getName());//$NON-NLS-1$
if (node == null) {
filteredTypes = ArrayUtils.removeElement(filteredTypes, ECustomVersionType.PIG);
}
node = designerCoreService.getRefrenceNode("tMRConfiguration", ComponentCategory.CATEGORY_4_MAPREDUCE.getName());//$NON-NLS-1$
if (node == null) { if (node == null) {
filteredTypes = ArrayUtils.removeElement(filteredTypes, ECustomVersionType.MAP_REDUCE); filteredTypes = ArrayUtils.removeElement(filteredTypes, ECustomVersionType.MAP_REDUCE);
} }

View File

@@ -425,7 +425,7 @@ public class HadoopVersionDialog extends TitleAreaDialog {
if (isFromExistVersion) { if (isFromExistVersion) {
IHadoopService hadoopService = null; IHadoopService hadoopService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) { if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {
hadoopService = (IHadoopService) GlobalServiceRegister.getDefault().getService(IHadoopService.class); hadoopService = GlobalServiceRegister.getDefault().getService(IHadoopService.class);
} }
if (hadoopService != null) { if (hadoopService != null) {
for (ECustomVersionGroup group : existVersionSelectionMap.keySet()) { for (ECustomVersionGroup group : existVersionSelectionMap.keySet()) {
@@ -437,10 +437,7 @@ public class HadoopVersionDialog extends TitleAreaDialog {
for (ECustomVersionType type : types) { for (ECustomVersionType type : types) {
if (type.getGroup() == group) { if (type.getGroup() == group) {
Set<String> hadoopLibraries = new HashSet<String>(); Set<String> hadoopLibraries = new HashSet<String>();
if (ECustomVersionType.PIG == type || ECustomVersionType.PIG_HBASE == type if (ECustomVersionType.MAP_REDUCE == type) {
|| ECustomVersionType.PIG_HCATALOG == type) {
hadoopLibraries = getLibrariesForPig(type);
} else if (ECustomVersionType.MAP_REDUCE == type) {
hadoopLibraries = getLibrariesForMapReduce(type); hadoopLibraries = getLibrariesForMapReduce(type);
} else if (ECustomVersionType.SPARK == type || ECustomVersionType.SPARK_STREAMING == type) { } else if (ECustomVersionType.SPARK == type || ECustomVersionType.SPARK_STREAMING == type) {
hadoopLibraries = getLibrariesForSpark(type); hadoopLibraries = getLibrariesForSpark(type);
@@ -542,42 +539,6 @@ public class HadoopVersionDialog extends TitleAreaDialog {
return neededLibraries; return neededLibraries;
} }
private Set<String> getLibrariesForPig(ECustomVersionType type) {
Set<String> neededLibraries = new HashSet<String>();
INode node = CoreRuntimePlugin.getInstance().getDesignerCoreService().getRefrenceNode("tPigLoad");//$NON-NLS-1$
IElementParameter elementParameter = node.getElementParameter("MAPREDUCE");//$NON-NLS-1$
if (elementParameter != null) {
elementParameter.setValue(true);
}
elementParameter = node.getElementParameter("DISTRIBUTION");//$NON-NLS-1$
if (elementParameter != null) {
elementParameter.setValue(distribution);
}
elementParameter = node.getElementParameter("PIG_VERSION");//$NON-NLS-1$
if (elementParameter != null) {
elementParameter.setValue(version);
}
elementParameter = node.getElementParameter("LOAD");//$NON-NLS-1$
if (elementParameter != null) {
if (ECustomVersionType.PIG_HBASE == type) {
elementParameter.setValue("HBASESTORAGE");//$NON-NLS-1$
} else if (ECustomVersionType.PIG_HCATALOG == type) {
elementParameter.setValue("HCATLOADER");//$NON-NLS-1$
}
}
List<ModuleNeeded> modulesNeeded = node.getModulesNeeded();
for (ModuleNeeded module : modulesNeeded) {
if (module.isRequired(node.getElementParameters())) {
neededLibraries.add(module.getModuleName());
}
}
return neededLibraries;
}
public Map<ECustomVersionType, Map<String, Object>> getTypeConfigurations() { public Map<ECustomVersionType, Map<String, Object>> getTypeConfigurations() {
return this.typeConfigurations; return this.typeConfigurations;
} }

View File

@@ -496,10 +496,15 @@ public class ContextUtils {
return itemMap; return itemMap;
} }
private static Set<String> missingContexts = new HashSet<>();
public static void clearMissingContextCache() {
missingContexts.clear();
}
/** /**
* * get the repository context item, now contextId can be either joblet node or context node.
* get the repository context item,now contextId can be either joblet node or context node. */
*/
public static Item getRepositoryContextItemById(String contextId) { public static Item getRepositoryContextItemById(String contextId) {
if (IContextParameter.BUILT_IN.equals(contextId)) { if (IContextParameter.BUILT_IN.equals(contextId)) {
return null; return null;
@@ -507,6 +512,9 @@ public class ContextUtils {
if (checkObject(contextId)) { if (checkObject(contextId)) {
return null; return null;
} }
if (missingContexts.contains(contextId)) {
return null;
}
List<ERepositoryObjectType> possibleTypes = new ArrayList<ERepositoryObjectType>(); List<ERepositoryObjectType> possibleTypes = new ArrayList<ERepositoryObjectType>();
possibleTypes.add(ERepositoryObjectType.CONTEXT); possibleTypes.add(ERepositoryObjectType.CONTEXT);
@@ -521,6 +529,8 @@ public class ContextUtils {
return item; return item;
} }
} }
missingContexts.add(contextId);
ExceptionHandler.log("Can't find Context item[id=" + contextId + "].");
} catch (PersistenceException e) { } catch (PersistenceException e) {
ExceptionHandler.process(e); ExceptionHandler.process(e);
} }
@@ -831,6 +841,7 @@ public class ContextUtils {
ItemContextLink itemContextLink) { ItemContextLink itemContextLink) {
Map<String, String> renamedMap = new HashMap<String, String>(); Map<String, String> renamedMap = new HashMap<String, String>();
Map<String, Item> tempItemMap = new HashMap<String, Item>(); Map<String, Item> tempItemMap = new HashMap<String, Item>();
clearMissingContextCache();
for (ContextType contextType : contextTypeList) { for (ContextType contextType : contextTypeList) {
for (Object obj : contextType.getContextParameter()) { for (Object obj : contextType.getContextParameter()) {
if (obj instanceof ContextParameterType) { if (obj instanceof ContextParameterType) {
@@ -893,6 +904,7 @@ public class ContextUtils {
*/ */
public static Map<String, String> calculateRenamedMapFromLinkFile(String projectLabel, String itemId, public static Map<String, String> calculateRenamedMapFromLinkFile(String projectLabel, String itemId,
List<IContext> contextList) { List<IContext> contextList) {
clearMissingContextCache();
Map<String, String> renamedMap = new HashMap<String, String>(); Map<String, String> renamedMap = new HashMap<String, String>();
Map<String, Item> idToItemMap = new HashMap<String, Item>(); Map<String, Item> idToItemMap = new HashMap<String, Item>();
try { try {
@@ -951,6 +963,14 @@ public class ContextUtils {
params.add(param); params.add(param);
} }
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;
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Set<String> get(Item item) { public Set<String> get(Item item) {
Set<String> params = map.get(item); Set<String> params = map.get(item);

View File

@@ -299,6 +299,7 @@ public class JobContextManager implements IContextManager {
} }
List<ContextItem> contextItemList = ContextUtils.getAllContextItem(); List<ContextItem> contextItemList = ContextUtils.getAllContextItem();
boolean setDefault = false; boolean setDefault = false;
ContextUtils.clearMissingContextCache();
for (int i = 0; i < contextTypeList.size(); i++) { for (int i = 0; i < contextTypeList.size(); i++) {
contextType = (ContextType) contextTypeList.get(i); contextType = (ContextType) contextTypeList.get(i);
String name = contextType.getName(); String name = contextType.getName();
@@ -526,6 +527,7 @@ public class JobContextManager implements IContextManager {
EList newcontextTypeList = new BasicEList(); EList newcontextTypeList = new BasicEList();
Map<String, Item> idToItemMap = new HashMap<String, Item>(); Map<String, Item> idToItemMap = new HashMap<String, Item>();
ContextUtils.clearMissingContextCache();
for (int i = 0; i < listContext.size(); i++) { for (int i = 0; i < listContext.size(); i++) {
IContext context = listContext.get(i); IContext context = listContext.get(i);
String contextGroupName = renameGroupContext.get(context); String contextGroupName = renameGroupContext.get(context);

View File

@@ -51,6 +51,7 @@ public abstract class AbstractItemContextLinkService implements IItemContextLink
itemContextLink.setItemId(itemId); itemContextLink.setItemId(itemId);
Map<String, Item> tempCache = new HashMap<String, Item>(); Map<String, Item> tempCache = new HashMap<String, Item>();
if (contextTypeList != null && contextTypeList.size() > 0) { if (contextTypeList != null && contextTypeList.size() > 0) {
ContextUtils.clearMissingContextCache();
for (Object object : contextTypeList) { for (Object object : contextTypeList) {
if (object instanceof ContextType) { if (object instanceof ContextType) {
ContextType jobContextType = (ContextType) object; ContextType jobContextType = (ContextType) object;

View File

@@ -206,6 +206,7 @@ public class ContextLinkService {
Map<String, Map<String, String>> changedContextParameterId) throws PersistenceException { Map<String, Map<String, String>> changedContextParameterId) throws PersistenceException {
List<Relation> relationList = RelationshipItemBuilder.getInstance() List<Relation> relationList = RelationshipItemBuilder.getInstance()
.getItemsHaveRelationWith(sourceId, RelationshipItemBuilder.LATEST_VERSION, false); .getItemsHaveRelationWith(sourceId, RelationshipItemBuilder.LATEST_VERSION, false);
ContextUtils.clearMissingContextCache();
for (Relation relation : relationList) { for (Relation relation : relationList) {
String id = relation.getId(); String id = relation.getId();
IFile linkFile = calContextLinkFile(ProjectManager.getInstance().getCurrentProject().getTechnicalLabel(), id); IFile linkFile = calContextLinkFile(ProjectManager.getInstance().getCurrentProject().getTechnicalLabel(), id);

View File

@@ -57,6 +57,11 @@ public class ConnectionBean implements Cloneable {
private static final String TOKEN = "token"; //$NON-NLS-1$ private static final String TOKEN = "token"; //$NON-NLS-1$
private static final String URL = "url"; //$NON-NLS-1$ private static final String URL = "url"; //$NON-NLS-1$
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
private String credentials = ""; //$NON-NLS-1$
/** /**
* DOC smallet ConnectionBean constructor comment. * DOC smallet ConnectionBean constructor comment.
*/ */
@@ -178,6 +183,9 @@ public class ConnectionBean implements Cloneable {
public String getPassword() { public String getPassword() {
try { try {
if (conDetails.has(PASSWORD)) { if (conDetails.has(PASSWORD)) {
if (isStoreCredentials() && credentials != null) {
return this.credentials;
}
return conDetails.getString(PASSWORD); return conDetails.getString(PASSWORD);
} }
} catch (JSONException e) { } catch (JSONException e) {
@@ -326,6 +334,7 @@ public class ConnectionBean implements Cloneable {
toReturn.setWorkSpace(st[i++]); toReturn.setWorkSpace(st[i++]);
toReturn.setComplete(new Boolean(st[i++])); toReturn.setComplete(new Boolean(st[i++]));
toReturn.setToken(new Boolean(st[i++])); toReturn.setToken(new Boolean(st[i++]));
toReturn.setStoreCredentials(new Boolean(st[i++]));
JSONObject dynamicJson = new JSONObject(); JSONObject dynamicJson = new JSONObject();
toReturn.getConDetails().put(DYNAMICFIELDS, dynamicJson); toReturn.getConDetails().put(DYNAMICFIELDS, dynamicJson);
while (i < st.length) { while (i < st.length) {
@@ -408,4 +417,30 @@ public class ConnectionBean implements Cloneable {
return ""; return "";
} }
public boolean isStoreCredentials() {
try {
if (conDetails.has(STORECREDENTIALS)) {
return (Boolean) conDetails.get(STORECREDENTIALS);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return false;
}
public void setStoreCredentials(boolean store) {
try {
conDetails.put(STORECREDENTIALS, store);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
public String getCredentials() {
return this.credentials;
}
public void setCredentials(String credentials) {
this.credentials = credentials;
}
} }

View File

@@ -28,6 +28,7 @@ import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess; import org.talend.core.model.process.IProcess;
import org.talend.core.model.process.Problem; import org.talend.core.model.process.Problem;
import org.talend.core.model.repository.ERepositoryObjectType; import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.routines.CodesJarInfo;
import org.talend.designer.codegen.PigTemplate; import org.talend.designer.codegen.PigTemplate;
/** /**
@@ -117,6 +118,10 @@ public interface ILibrariesService extends IService {
Set<ModuleNeeded> getCodesModuleNeededs(ERepositoryObjectType type); Set<ModuleNeeded> getCodesModuleNeededs(ERepositoryObjectType type);
Set<ModuleNeeded> getAllCodesJarModuleNeededs();
Set<ModuleNeeded> getCodesJarModuleNeededs(CodesJarInfo info);
List<ModuleNeeded> getModuleNeeded(String id, boolean isGroup); List<ModuleNeeded> getModuleNeeded(String id, boolean isGroup);
public void deployProjectLibrary(File source) throws IOException; public void deployProjectLibrary(File source) throws IOException;

View File

@@ -14,12 +14,14 @@ package org.talend.core.model.general;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.osgi.framework.Version; import org.osgi.framework.Version;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.GlobalServiceRegister; import org.talend.core.GlobalServiceRegister;
import org.talend.core.ILibraryManagerService; import org.talend.core.ILibraryManagerService;
import org.talend.core.database.conn.version.DatabaseDriversCache; import org.talend.core.database.conn.version.DatabaseDriversCache;
@@ -29,6 +31,9 @@ import org.talend.core.runtime.maven.MavenArtifact;
import org.talend.core.runtime.maven.MavenConstants; import org.talend.core.runtime.maven.MavenConstants;
import org.talend.core.runtime.maven.MavenUrlHelper; import org.talend.core.runtime.maven.MavenUrlHelper;
import org.talend.core.utils.TalendQuoteUtils; import org.talend.core.utils.TalendQuoteUtils;
import org.talend.utils.json.JSONException;
import org.talend.utils.json.JSONObject;
import org.talend.utils.json.JSONTokener;
/** /**
* This bean is use to manage needed moduless (perl) and libraries (java).<br/> * This bean is use to manage needed moduless (perl) and libraries (java).<br/>
@@ -38,6 +43,10 @@ import org.talend.core.utils.TalendQuoteUtils;
*/ */
public class ModuleNeeded { public class ModuleNeeded {
public static final String ATTR_USED_BY_DYNAMIC_DISTRIBUTION = "dynamicDistribution";
public static final String ATTR_DYNAMIC_DISTRIBUTION_VERSION = "distributionVersion";
private String id; private String id;
private String context; private String context;
@@ -94,9 +103,12 @@ public class ModuleNeeded {
*/ */
private boolean useReleaseVersion = false; private boolean useReleaseVersion = false;
private Map<String, String> attributes;
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault() ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
.getService(ILibraryManagerService.class); .getService(ILibraryManagerService.class);
/** /**
* DOC smallet ModuleNeeded class global comment. Detailled comment <br/> * DOC smallet ModuleNeeded class global comment. Detailled comment <br/>
* *
@@ -162,6 +174,10 @@ public class ModuleNeeded {
this.required = required; this.required = required;
this.installURL = installURL; this.installURL = installURL;
this.requiredIf = requiredIf; this.requiredIf = requiredIf;
this.attributes = analyseMessage(informationMsg);
if (!this.attributes.isEmpty()) {
this.informationMsg = "";
}
String name = moduleName; String name = moduleName;
String uri = mavenUrl; String uri = mavenUrl;
if (moduleName != null) { if (moduleName != null) {
@@ -184,6 +200,32 @@ public class ModuleNeeded {
setMavenUri(uri); setMavenUri(uri);
} }
private Map<String, String> analyseMessage(String msg) {
Map<String, String> attrMap = new HashMap<>();
if (StringUtils.isBlank(msg) || !msg.startsWith("{") || !msg.endsWith("}")) {
return attrMap;
}
try {
JSONObject jo = new JSONObject(new JSONTokener(msg));
Iterator<String> keys = jo.keys();
keys.forEachRemaining(key -> {
try {
Object object = jo.get(key);
if (object != null) {
attrMap.put(key, object.toString());
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
});
} catch (Exception e) {
if (Boolean.getBoolean("talend.studio.moduleNeeded.init.debug")) {
ExceptionHandler.process(e);
}
}
return attrMap;
}
@Override @Override
public ModuleNeeded clone() { public ModuleNeeded clone() {
ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri); ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri);
@@ -212,6 +254,7 @@ public class ModuleNeeded {
cloned.requiredIf = requiredIf; cloned.requiredIf = requiredIf;
cloned.status = status; cloned.status = status;
cloned.useReleaseVersion = useReleaseVersion; cloned.useReleaseVersion = useReleaseVersion;
cloned.attributes = attributes;
return cloned; return cloned;
} }
@@ -671,6 +714,10 @@ public class ModuleNeeded {
} }
} }
public boolean usedByDynamicDistribution() {
return Boolean.valueOf(attributes.get(ATTR_USED_BY_DYNAMIC_DISTRIBUTION));
}
public boolean isDynamic() { public boolean isDynamic() {
return this.dynamic; return this.dynamic;
} }
@@ -710,4 +757,11 @@ public class ModuleNeeded {
this.useReleaseVersion = useReleaseVersion; this.useReleaseVersion = useReleaseVersion;
} }
public String getDynamicDistributionVersion() {
return attributes.get(ATTR_DYNAMIC_DISTRIBUTION_VERSION);
}
public void setDynamicDistributionVersion(String distribution) {
attributes.put(ATTR_DYNAMIC_DISTRIBUTION_VERSION, distribution);
}
} }

View File

@@ -0,0 +1,42 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.general;
import java.util.HashSet;
import java.util.Set;
public class RetrieveResult {
private boolean allResolved;
private Set<ModuleNeeded> resovledModules = new HashSet<>();
private Set<ModuleNeeded> unresolvedModules = new HashSet<>();
public boolean isAllResolved() {
return allResolved;
}
public void setAllResolved(boolean allResolved) {
this.allResolved = allResolved;
}
public Set<ModuleNeeded> getResovledModules() {
return resovledModules;
}
public Set<ModuleNeeded> getUnresolvedModules() {
return unresolvedModules;
}
}

View File

@@ -125,6 +125,10 @@ public interface IMetadataColumn {
public void setCustom(boolean custom); public void setCustom(boolean custom);
public boolean isIgnoreCustomSort();
public void setIgnoreCustomSort(boolean ignoreCustomSort);
public void setCustomId(int customId); // only for custom columns to sort them public void setCustomId(int customId); // only for custom columns to sort them
public int getCustomId(); // only for custom columns to sort them public int getCustomId(); // only for custom columns to sort them

View File

@@ -195,6 +195,10 @@ public interface IMetadataConnection extends IMetadata {
public void setContextName(String contextName); public void setContextName(String contextName);
public boolean isSupportNLS();
public void setSupportNLS(boolean newSupportNLS);
/** /**
* Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For * Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For
* business it is extensible for later whenever you want to add a new parameter for a connection. The constants for * business it is extensible for later whenever you want to add a new parameter for a connection. The constants for

View File

@@ -69,6 +69,8 @@ public interface IMetadataTable {
public boolean sameMetadataAs(IMetadataTable other, int options); public boolean sameMetadataAs(IMetadataTable other, int options);
public boolean sameMetadataAs(List<IMetadataColumn> otherMetadataTableColumns, int options);
public void sortCustomColumns(); public void sortCustomColumns();
public boolean isReadOnly(); public boolean isReadOnly();

View File

@@ -106,4 +106,6 @@ public interface ISAPConstant {
public static final String PROP_DB_USERNAME = "db.username";//$NON-NLS-1$ public static final String PROP_DB_USERNAME = "db.username";//$NON-NLS-1$
public static final String PROP_DB_PASSWORD = "db.password";//$NON-NLS-1$ public static final String PROP_DB_PASSWORD = "db.password";//$NON-NLS-1$
public static final String PROP_DB_ADDITIONAL_PROPERTIES = "db.additionalProperties";//$NON-NLS-1$
} }

View File

@@ -53,6 +53,8 @@ public class MetadataColumn implements IMetadataColumn, Cloneable {
private boolean custom = false; private boolean custom = false;
private boolean ignoreCustomSort = false;
private boolean readOnly = false; private boolean readOnly = false;
private int customId = 0; private int customId = 0;
@@ -574,6 +576,24 @@ public class MetadataColumn implements IMetadataColumn, Cloneable {
this.custom = custom; this.custom = custom;
} }
/**
* Getter for ignoreCustomSort.
*
* @return the ignoreCustomSort
*/
public boolean isIgnoreCustomSort() {
return ignoreCustomSort;
}
/**
* Sets the ignoreCustomSort.
*
* @param ignoreCustomSort the ignoreCustomSort to set
*/
public void setIgnoreCustomSort(boolean ignoreCustomSort) {
this.ignoreCustomSort = ignoreCustomSort;
}
/** /**
* Getter for readOnly. * Getter for readOnly.
* *

View File

@@ -252,8 +252,13 @@ public class MetadataTable implements IMetadataTable, Cloneable {
if (!(input instanceof IMetadataTable)) { if (!(input instanceof IMetadataTable)) {
return false; return false;
} }
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true); List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true);
return sameMetadataAs(inputColumnListWithUnselected, options);
}
@Override
public boolean sameMetadataAs(List<IMetadataColumn> inputColumnListWithUnselected, int options) {
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
if (thisColumnListWithUnselected == null) { if (thisColumnListWithUnselected == null) {
if (inputColumnListWithUnselected != null) { if (inputColumnListWithUnselected != null) {
return false; return false;
@@ -360,7 +365,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
for (int i = 0; i < listColumns.size(); i++) { for (int i = 0; i < listColumns.size(); i++) {
IMetadataColumn column = listColumns.get(i); IMetadataColumn column = listColumns.get(i);
if (column.isCustom()) { if (column.isCustom() && !column.isIgnoreCustomSort()) {
customColumns.add(column); customColumns.add(column);
} }
} }

View File

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

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