Compare commits

..

81 Commits

Author SHA1 Message Date
apoltavtsev
4687a7ffec TESB-25418 Missing commons-parent dependency is added for TOS 2019-05-14 20:31:32 +03:00
chmyga
65b467f574 fix(TUP-21896): replace internal sun classes (#2234)
* Replace internal sun classes with java API classes

* Use default security algorithm instead of X509
2019-05-14 19:40:03 +08:00
slushatel
e0199336ef feat(TDI-41963): change jdbc driver version from 1.2.16.1027 to 1.2.2… (#2303)
* feat(TDI-41963): change jdbc driver version from 1.2.16.1027 to 1.2.20.1043

* feat(TDI-41963): change redshift module name to "redshift-jdbc42-no-awssdk-1.2.20.1043.jar"
2019-05-14 18:45:59 +08:00
kjwang-talend
f807ca1839 TUP-23004 Fail to decrypte password (#2411)
* TUP-23004 Fail to decrypte password
https://jira.talendforge.org/browse/TUP-23004

* TUP-23004 Fail to decrypte password
https://jira.talendforge.org/browse/TUP-23004
2019-05-14 17:01:59 +08:00
Igor Lazebny
8a8d5eeb0a Add crypto-utils version 2019-05-14 11:41:20 +03:00
Igor Lazebny
c968ed321c Add crypto-utils version 2019-05-14 11:40:23 +03:00
hzhao-talendbj
394a29cca2 change from https://www.talend.com to https://talend-update.talend.com (#2410) 2019-05-13 20:01:21 +08:00
hwang-talend
c6696371b2 bugfix(TUP-22426):[6.5.1]Test Case generation on tRunJob gives (#2398)
bugfix(TUP-22426):[6.5.1]Test Case generation on tRunJob gives compilation error "row1 cannot be resolved to a variable"
2019-05-13 10:37:13 +08:00
hwang-talend
3b582b21fc bugfix(TUP-22841):Cannot automap interval data type for Vertica database (#2406)
bugfix(TUP-22841):Cannot automap interval data type for Vertica database
2019-05-13 10:16:19 +08:00
Chao MENG
fa88cc5613 fix(TUP-22906): Job working in 6.3.1 fails to generate in 7.1.1 : Failed (#2394)
fix(TUP-22906): Job working in 6.3.1 fails to generate in 7.1.1 : Failed to generate code. /java.lang.reflect.InvocationTargetException
/java.lang.NullPointerException
https://jira.talendforge.org/browse/TUP-22906
2019-05-10 19:18:03 +08:00
Mike Yan
da2413c87c fix(TESB-24663): Remove "DOCTYPE" declaration for camel components (#2405) 2019-05-10 11:58:14 +02:00
kjwang-talend
a1ea92865b Fix TUP-21510 Update PasswordEncryptUtil (Update crypto-utils version) (#2400)
* Fix TUP-21510 Update PasswordEncryptUtil (Update crypto-utils version)
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil (Fix junit)
https://jira.talendforge.org/browse/TUP-21510
2019-05-10 16:34:57 +08:00
qiongli
acce4c5e8f fix(TDQ-16331)use 'select version()' to get correct version for Mysql (#2396)
* fix(TDQ-16331)use 'select version()' to get correct version for Mysql
2019-05-10 11:28:27 +08:00
zshen-talend
7ce62fc066 fix(TDQ-16872 TUP-22887) create method to keep custom attribute after (#2391) 2019-05-10 11:25:42 +08:00
wang wei
7f26a779bc fix(TDI-42075): try to remove the osgi dependencies which is introduced from log4j 1.2.17, so update tcompv0 version in studio to apply the fix (#2404) 2019-05-09 18:39:54 +08:00
kuanwang
70bfd5623b TUP-22747 ProcessorUtilitiesTest (#2401) 2019-05-09 14:50:24 +08:00
kjwang-talend
97dd532fdd Fix TUP-21510 Update PasswordEncryptUtil (#2380)
* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil
https://jira.talendforge.org/browse/TUP-21510

* Fix TUP-21510 Update PasswordEncryptUtil (Update slf4j version)
https://jira.talendforge.org/browse/TUP-21510
2019-05-09 11:52:58 +08:00
kuanwang
c9de20238c TUP-22747 MetadataFillFactoryTest (#2397) 2019-05-08 18:48:37 +08:00
hwang-talend
857f5459b6 bugfix(TUP-22222):tXMLMap generates wrong XML when imported schema from (#2385)
bugfix(TUP-22222):tXMLMap generates wrong XML when imported schema from wsdl is used
2019-05-08 18:13:15 +08:00
Chao MENG
76aa39dbd8 fix(TUP-22713): Possible thread lock during git update operation (#2392)
fix(TUP-22713): Possible thread lock during git update operation 
https://jira.talendforge.org/browse/TUP-22713
2019-05-08 15:32:59 +08:00
Jane Ding
e68d27d598 fix(TUP-22783)TELTPOSTGRESQL MAP Join Operator not working in Ubuntu (#2393)
16.04
https://jira.talendforge.org/browse/TUP-22783
2019-05-08 10:13:33 +08:00
Jane Ding
4abb63f274 fix(TUP-22827)Error:java.lang.LinkageError: loader constraint violation (#2389)
occurs while View documentation
https://jira.talendforge.org/browse/TUP-22827
2019-05-07 11:58:34 +08:00
kuanwang
4ad69a33d9 Kwang/tup 22747 dbones (#2388)
* TUP-22747 AbstractTest4ExtractManager and it's children

* TUP-22747 dbs tests
2019-04-29 16:40:50 +08:00
Zhiwei Xue
dd1853cf85 fix(TUP-22772):maven.repository=global doesn't work if set global maven (#2383)
repository to another place
2019-04-29 13:55:31 +08:00
Jane Ding
20656380ab fix(TUP-22735) fix wrong project migrations (#2386)
https://jira.talendforge.org/browse/TUP-22735
Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/utils/ProjectDataJsonProvider.java
2019-04-29 11:22:06 +08:00
jiezhang-tlnd
43021956a4 fix(TUP-22484)Random issue: Compile error for simple job sometimes (#2382)
* fix(TUP-22484)Random issue: Compile error for simple job sometimes

* fix(TUP-22484)Random issue: Compile error for simple job sometimes

* fix(TUP-22484)Random issue: Compile error for simple job sometimes
2019-04-29 10:41:17 +08:00
Jane Ding
8bafc9ace7 fix(TUP-22681)Job in CI Builder gets generated and deployed, but doesn't (#2373)
show as a Tag
https://jira.talendforge.org/browse/TUP-22681
2019-04-26 16:12:34 +08:00
Zhiwei Xue
63f5588fec chore(TUP-22845):Improve Mojo version setup and update Junit. (#2379) 2019-04-26 14:32:25 +08:00
kuanwang
737e502767 Kwang/tup 22672 upgrade jars for powermock (#2361)
* TUP-22672 upgrade jars for powermock after running Junit cases with
java11

* TUP-22672 upgrade jars for powermock after running Junit cases with
java11 -- org.talend.metadata.managment.test

* TUP-22672 add classmexer:
2019-04-26 14:18:32 +08:00
Zhiwei Xue
da191288c5 fix(TUP-22806):Error pop up when build out job (#2376) 2019-04-24 16:01:14 +08:00
Mike Yan
f45a5ce571 fix(TESB-25657): Removed patch classifier for feature maven plugin (#2374) 2019-04-24 11:53:19 +08:00
Zhiwei Xue
b427e62f6e fix(TUP-22803):avoid to overwrite jars (#2372) 2019-04-23 19:34:29 +08:00
zshen-talend
667ceea4de fix(TDQ-16734): make sure Regex indicator supported on MariaDB (#2364) 2019-04-23 16:46:09 +08:00
Chao MENG
a6afca4ea5 feat(TUP-21546): Add commit mode on the studio (#2357)
* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

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

* feat(TUP-21546): Add commit mode on the studio

https://jira.talendforge.org/browse/TUP-21546
2019-04-23 16:13:56 +08:00
Mike Yan
02302f1116 Yyan/feat(tesb 25283 maven version plugin) (#2371)
* feat(TESB-25283): Add TESB for a patched features-maven-plugin

* feat(TESB-25283): Add build-helper-maven-plugin to deploy feature.xml

* fix(TESB-25283): Remove patch features-maven-plugin for M5
2019-04-23 16:08:36 +08:00
Mike Yan
136ca086a6 feat(TESB-25283): Add TESB for a patched features-maven-plugin (#2370)
* feat(TESB-25283): Add TESB for a patched features-maven-plugin

* feat(TESB-25283): Add build-helper-maven-plugin to deploy feature.xml
2019-04-23 15:30:54 +08:00
jiezhang-tlnd
38070a87f8 fix(TUP-22711)DB2: Cannot save Connection in Edit Connection Window (#2360)
* fix(TUP-22711)DB2: Cannot save Connection in Edit Connection Window

* fix(TUP-22711)DB2: Cannot save Connection in Edit Connection Window
2019-04-23 13:46:29 +08:00
jiezhang-tlnd
8668bd963b fix(TUP-22508)FireBird: Check Connection failed in Context mode (#2358)
* fix(TUP-22508)FireBird: Check Connection failed in Context mode

* fix(TUP-22508)add junits
2019-04-23 13:41:51 +08:00
Zhiwei Xue
1e232d2d40 feat(TUP-22628):Upgrade docker plugin to version 4.0.0 (#2369) 2019-04-23 12:15:41 +08:00
Zhiwei Xue
a9b2e15695 feat(TUP-22630):CI: Ensure all the jars from studio are uploaded to (#2343)
nexus
2019-04-22 16:38:02 +08:00
kjwang-talend
44b583ab0e kjwang/Fix TUP-22686 jars show download link(Fix can't install BPM) (#2367)
* kjwang/Fix TUP-22686 jars show download link(Fix can't install BPM)
https://jira.talendforge.org/browse/TUP-22686

* kjwang/Fix TUP-22686 jars show download link(Fix can't install BPM)
https://jira.talendforge.org/browse/TUP-22686
2019-04-19 19:34:46 +08:00
wang wei
79b2e0ecb8 fix(TDI-42053): [Java 11] Upgrade commons.lang3 version on javajet components(#2332) 2019-04-19 18:02:06 +08:00
nrousseau
c699fb6e6d fix(TUP-22741) change check of dynamic column (#2366) 2019-04-19 17:06:20 +08:00
Hanna Liashchuk
bec94deb0e fix(TBD-8573): new date formats suggestions (#2368) 2019-04-18 16:44:21 +03:00
kjwang-talend
b224b59c54 Fix TUP-22733 Try to delete class JavaHomeUtil (#2362)
https://jira.talendforge.org/browse/TUP-22733
2019-04-18 19:30:51 +08:00
Chao MENG
e485c1860e fix(TUP-22202): Studio will be closed after clicking "Setup routine (#2363)
dependencies" in Git Project

https://jira.talendforge.org/browse/TUP-22202
2019-04-18 15:01:33 +08:00
kjwang-talend
feb0bd5ef7 kjwang/Fix TUP-22686 jars show download link but can't download when run (#2359)
* kjwang/Fix TUP-22686 jars show download link but can't download when run
storm job
https://jira.talendforge.org/browse/TUP-22686

* kjwang/Fix TUP-22686 jars show download link but can't download when run
storm job
https://jira.talendforge.org/browse/TUP-22686

* kjwang/Fix TUP-22686 jars show download link but can't download when run
storm job
https://jira.talendforge.org/browse/TUP-22686
2019-04-17 17:35:26 +08:00
jiezhang-tlnd
09cfffc544 fix(TUP-22337)Border of Contexts in "Create/Edit a context group" dialog (#2347)
isn't static
2019-04-17 16:16:41 +08:00
jiezhang-tlnd
a6ee4c28fb fix(TUP-22655)Can't use DB2 sqlbuilder (#2345)
* fix(TUP-22655)Can't use DB2 sqlbuilder

* TUP(22655)add junits
2019-04-17 16:15:17 +08:00
Zhiwei Xue
f0aa480e42 fix(TUP-22524):add missing dependency for plugin. (#2354) 2019-04-16 11:45:30 +08:00
Zhiwei Xue
993a5b0460 workitem(TUP-22161):Update version of CI plugins. (#2307) 2019-04-16 10:46:01 +08:00
jiezhang-tlnd
6206252ef6 fix(TUP-22484)Random issue: Compile error for simple job sometimes (#2353) 2019-04-16 10:28:38 +08:00
Zhiwei Xue
fab28a3af2 fix(TUP-22524):fix duplicate artifactid. (#2352) 2019-04-15 19:17:16 +08:00
Zhiwei Xue
c3ff8e3891 fix(TUP-22524):upgrade tycho-compiler-jdt version to 1.4.0 (#2350) 2019-04-15 17:03:17 +08:00
kjwang-talend
bd69786c4f kjwang/Feat TUP-21191 Remove any internet check (#2348)
TUP-21191 Remove any internet check from Additional package dialog
2019-04-12 18:59:52 +08:00
Zhiwei Xue
b6bb7ffe65 fix(TUP-21657):There is NPE error after starting studio (#2319) 2019-04-12 16:34:39 +08:00
kjwang-talend
9aa2c69eb4 Kjwang/feat tup 21189 remove jar license (#2223)
* TUP-21189 Remove jar license fetch from studio startup
https://jira.talendforge.org/browse/TUP-21189

* TUP-21189 Remove jar license fetch from studio startup
https://jira.talendforge.org/browse/TUP-21189

* TUP-21189 Improve fetch license feature that can retrieve by
CI/commandline
https://jira.talendforge.org/browse/TUP-21866

* TUP-21189 Improve fetch license feature that can retrieve by
CI/commandline
https://jira.talendforge.org/browse/TUP-21866

* Fix: TUP-21866 Remove jar license fetch from studio startup
https://jira.talendforge.org/browse/TUP-21866
2019-04-12 11:01:49 +08:00
msjian
e75cba9a34 feat(TDQ-16610): add a check snowflake method (#2346) 2019-04-11 18:09:19 +08:00
apoltavtsev
5d2f8fe2c0 TESB-25418 Missing commons-parent dependency is added for TOS 2019-04-11 10:16:13 +03:00
Mike Yan
040cf2dee6 fix(TESB-24789): Remove spring-boot plugin in TOS for microservice (#2342) 2019-04-10 17:57:44 +08:00
Jane Ding
cde7238840 fix(TUP-22182)Non-default Artifactory context path, not working (#2338)
* fix(TUP-22182)Non-default Artifactory context path, not working
https://jira.talendforge.org/browse/TUP-22182

* fix(TUP-22182)Non-default Artifactory context path, not working
https://jira.talendforge.org/browse/TUP-22182
2019-04-10 11:20:47 +08:00
kjwang-talend
b281dcef45 TUP-21308 Fix SSLUtils TLS configuration (#2292)
* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308

* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308

* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308

* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308

* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308

* TUP-21308 Fix SSLUtils TLS configuration
https://jira.talendforge.org/browse/TUP-21308
2019-04-10 11:18:58 +08:00
Chao MENG
50f87d7d92 item(TUP-22610): update tacokit to version 1.1.9 (#2339)
* item(TUP-22610): update tacokit to version 1.1.8

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

* Update pom.xml

Update to 1.1.9-SNAPSHOT
2019-04-09 18:23:49 +08:00
kuanwang
5668a651b2 TUP-22549 ProjectPreferenceManagerTest.testReload (#2340) 2019-04-09 17:50:16 +08:00
nrousseau
0ec10cc9c3 chore(TUP-22343) add public 2019-04-08 17:54:22 +08:00
hcyi
cf74274d63 fix(TUP-22012):Upgrade Teradata driver 16.20 or latest (#2333) 2019-04-08 10:41:48 +08:00
TKaczynski
eb33120cac fix(TBD-7687): tFileInputDelimited issue with separator (#2314)
* fix(TBD-7687): tFileInputDelimited issue with separator

add a null instead of delete the column

* Update StringUtils.java

* Update StringUtils.java

* Update StringUtils.java

* Update StringUtils.java
2019-04-04 13:53:30 +02:00
jiezhang-tlnd
003a31b361 feat(TUP-21678)Provide external JDBC parameters to all our connectors (#2329)
* feat(TUP-21678)Provide external JDBC parameters to all our connectors

* fix(TUP-21678)Provide external JDBC parameters to all our connectors
2019-04-04 18:22:30 +08:00
Jane Ding
fda3573d7c fix(TUP-21920)Nullpointer on build job (#2309)
https://jira.talendforge.org/browse/TUP-21920
Loop dependency classpath issue caused main class not found
2019-04-03 14:59:13 +08:00
hcyi
eecc481d67 fix(TUP-22400):Classcastexception When Retrieving Db BigInt Column Value (#2321)
With tHiveInput Component.
2019-04-03 10:49:22 +08:00
hcyi
113db9246f fix(TUP-22012):Upgrade Teradata driver 16.20 or latest. (#2324) 2019-04-03 10:36:33 +08:00
Liu Xinquan
bfcdd968ed TDQ-16354 TOP i18n preference page (#2311) 2019-04-02 16:35:02 +08:00
nrousseau
f542ab5779 feat(TDI-41943) add missing dependency 2019-04-02 13:37:22 +08:00
kjwang-talend
2a0d494f49 Kjwang/fix tup 22425 stackoverflow (#2322)
* Fix TUP-22425 [7.1.1] Stackoverflow issue in studio
https://jira.talendforge.org/browse/TUP-22425

* Fix TUP-22425 [7.1.1] Stackoverflow issue in studio
https://jira.talendforge.org/browse/TUP-22425
2019-04-02 10:15:23 +08:00
kjwang-talend
fe0eab22bd Fix TUP-22469 Nexus3.15: studio can't detect patch for 701/711 release (#2320)
* Fix TUP-22469 Nexus3.15: studio can't detect patch for 701/711 release
https://jira.talendforge.org/browse/TUP-22469

* Fix TUP-22469 Nexus3.15: studio can't detect patch for 701/711 release
https://jira.talendforge.org/browse/TUP-22469

* Fix TUP-22469 Nexus3.15: studio can't detect patch for 701/711 release
https://jira.talendforge.org/browse/TUP-22469

* Fix TUP-22469 Nexus3.15: studio can't detect patch for 701/711 release
https://jira.talendforge.org/browse/TUP-22469
2019-04-01 16:59:10 +08:00
jiezhang-tlnd
12b9a4eee9 fix(TUP-17925)Sybase connection can check successfully even if a wrong db filled (#2214)
* fix(TUP-17925)Sybase connection can check successfully even if a wrong
db filled

* fix(TUP-17925)check database right or not

* fix(TUP-17925)check the database right or not

* fix(TUP-17925)check the database exist or not

* fix(TUP-17928)check the database existed or not

* fix(TUP-17925)connection can check successfully even if a wrong db
filled

* fix(TUP-17925)Sybase connection can check successfully even if a wrong
db filled
2019-04-01 09:50:42 +08:00
nrousseau
f0e07897a5 feat(TDI-41943) update tcomp/daikon dependencies 2019-03-29 18:00:45 +08:00
dmytroshekera
bb001061e8 fix(TDI-41876):Importing job from 6.2.1 to 7.1.1 is throwing error. (#2310)
apache AVRO schema have default values.
2019-03-28 10:35:09 +02:00
jiezhang-tlnd
bdd9a601b9 fix(TUP-22333)Cannot Edit Context Value in Job->Contexts View (#2316) 2019-03-27 18:27:44 +08:00
zshen-talend
3646a1bcd9 feat(TDQ-16567): support amazon aurora for DQ side (#2295) 2019-03-27 16:00:48 +08:00
kjwang-talend
9125f27236 Kjwang/fix tup 22281 missing jar 2 (#2315)
* TUP-22281 Missing jar in lib folder for Job Server(Solution 2)
https://jira.talendforge.org/browse/TUP-22281

* TUP-22281 Missing jar in lib folder for Job Server(Solution 2)
https://jira.talendforge.org/browse/TUP-22281

* TUP-22281 Missing jar in lib folder for Job Server(Solution 2)
https://jira.talendforge.org/browse/TUP-22281
2019-03-27 10:44:07 +08:00
328 changed files with 4824 additions and 1637 deletions

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui.nl</artifactId>

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.nl</artifactId>

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.nl</artifactId>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -10,7 +10,7 @@
<requires>
<import feature="org.talend.model.migration.feature" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.bouncycastle.bcprov" version="0.0.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-databind" version="2.9.5" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-databind" version="2.9.8" 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="org.apache.xalan" version="0.0.0" match="greaterOrEqual"/>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.feature</artifactId>

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.update.p2.feature</artifactId>

View File

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

View File

@@ -8,7 +8,7 @@
<import plugin="org.bouncycastle.bcprov" version="0.0.0" match="greaterOrEqual"/>
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.5" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" 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-mapper-asl" version="0.0.0" match="greaterOrEqual"/>
@@ -22,5 +22,6 @@
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
</requires>
<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.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
</feature>

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime</artifactId>

View File

@@ -18,6 +18,7 @@ import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
@@ -27,7 +28,6 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -53,7 +53,7 @@ public class ComboxCellEditorImproved extends CellEditor {
/**
* The custom combo box control.
*/
Combo comboBox;
CCombo comboBox;
/**
* Default ComboBoxCellEditor style
@@ -125,7 +125,7 @@ public class ComboxCellEditorImproved extends CellEditor {
*/
protected Control createControl(Composite parent) {
comboBox = new Combo(parent, getStyle());
comboBox = new CCombo(parent, getStyle());
comboBox.setFont(parent.getFont());
comboBox.addKeyListener(new KeyAdapter() {

View File

@@ -0,0 +1,175 @@
// ============================================================================
//
// Copyright (C) 2006-2018 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.runtime.utils;
/**
* DOC Administrator class global comment. Detailled comment
*/
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipFile;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
public class ZipFileUtils {
private static int bufSize = 2048; // size of bytes
public static String zip(String zipDirectory) {
File zipDir = new File(zipDirectory);
return zip(zipDirectory, zipDir.getPath(), false);
}
public static String zip(String zipDirectory, String zipFileName, boolean includeSelfDir) {
File zipDir = new File(zipDirectory);
File[] willZipFileArr;
if (includeSelfDir || zipDir.isFile()) {
willZipFileArr = new File[] { zipDir };
} else {
willZipFileArr = zipDir.listFiles();
}
return zip(willZipFileArr, zipFileName);
}
public static String zip(File[] files, String zipFileName) {
JarOutputStream jarOutput = null;
try {
jarOutput = new JarOutputStream(new FileOutputStream(zipFileName));
for (File file : files) {
zipFiles(file, jarOutput, "");
}
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
if (jarOutput != null) {
try {
jarOutput.close();
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
return null;
}
private static void zipFiles(File file, JarOutputStream jos, String pathName) throws Exception {
String fileName = pathName + file.getName();
if (file.isDirectory()) {
fileName = fileName + "/";
jos.putNextEntry(new JarEntry(fileName));
String fileNames[] = file.list();
if (fileNames != null) {
for (int i = 0; i < fileNames.length; i++) {
zipFiles(new File(file, fileNames[i]), jos, fileName);
}
jos.closeEntry();
}
} else {
JarEntry jarEntry = new JarEntry(fileName);
BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
jos.putNextEntry(jarEntry);
byte[] buf = new byte[bufSize];
int len;
while ((len = in.read(buf)) >= 0) {
jos.write(buf, 0, len);
}
in.close();
jos.closeEntry();
}
}
public static String unZip(File unZipFile) {
return unZip(unZipFile.getPath(), null);
}
public static String unZip(File unZipFile, String destFileName) {
return unZip(unZipFile.getPath(), destFileName);
}
public static String unZip(String unZipFileName) {
return unZip(unZipFileName, null);
}
public static String unZip(String unZipFileName, String destFileName) {
File unzipFile = new File(unZipFileName);
if (destFileName == null || destFileName.trim().length() == 0) {
destFileName = unzipFile.getParent();
}
File destFile;
ZipFile zipFile = null;
try {
zipFile = new ZipFile(unzipFile, "GBK");
for (Enumeration entries = zipFile.getEntries(); entries.hasMoreElements();) {
ZipEntry entry = (ZipEntry) entries.nextElement();
destFile = new File(destFileName, entry.getName());
unZipFile(destFile, zipFile, entry);
}
} catch (Exception e) {
ExceptionHandler.process(e);
return e.getMessage();
} finally {
try {
assert zipFile != null;
zipFile.close();
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return null;
}
private static void unZipFile(File destFile, ZipFile zipFile, ZipEntry entry) throws IOException {
InputStream inputStream;
FileOutputStream fileOut;
if (entry.isDirectory()) {
destFile.mkdirs();
} else {
File parent = destFile.getParentFile();
if (parent != null && !parent.exists()) {
parent.mkdirs();
}
inputStream = zipFile.getInputStream(entry);
fileOut = new FileOutputStream(destFile);
byte[] buf = new byte[bufSize];
int readedBytes;
while ((readedBytes = inputStream.read(buf)) > 0) {
fileOut.write(buf, 0, readedBytes);
}
fileOut.close();
inputStream.close();
}
}
public void setBufSize(int bufSize) {
ZipFileUtils.bufSize = bufSize;
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime</artifactId>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.talend</groupId>
<artifactId>org.talend.tos</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../pom_server.xml</relativePath>
</parent>

View File

@@ -21,6 +21,7 @@ import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import org.apache.commons.codec.binary.Base64;
import org.talend.utils.security.AESEncryption;
/**
* DOC chuang class global comment. Detailled comment
@@ -85,20 +86,6 @@ public class PasswordEncryptUtil {
return new String(clearByte);
}
private static SecretKey passwordKey = null;
private static String CHARSET = "UTF-8";
private static SecretKey getSecretKeyUTF8() throws Exception {
if (passwordKey == null) {
byte rawKeyData[] = rawKey.getBytes(CHARSET);
DESKeySpec dks = new DESKeySpec(rawKeyData);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); //$NON-NLS-1$
passwordKey = keyFactory.generateSecret(dks);
}
return passwordKey;
}
/**
* Work for codegen only. and must be same as the routine
* "routines.system.PasswordEncryptUtil.encryptPassword(input)".
@@ -108,12 +95,7 @@ public class PasswordEncryptUtil {
if (input == null) {
return input;
}
SecretKey key = getSecretKeyUTF8();
Cipher c = Cipher.getInstance("DES"); //$NON-NLS-1$
c.init(Cipher.ENCRYPT_MODE, key, secureRandom);
byte[] cipherByte = c.doFinal(input.getBytes(CHARSET));
String dec = Hex.encodeHexString(cipherByte);
return dec;
return AESEncryption.encryptPassword(input);
}
/**
@@ -159,5 +141,4 @@ public class PasswordEncryptUtil {
return value.replaceAll(".", "*"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}

View File

@@ -15,10 +15,13 @@ package org.talend.commons.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Properties;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
@@ -26,6 +29,8 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.URIUtil;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.i18n.internal.Messages;
/**
@@ -213,6 +218,40 @@ public class VersionUtils {
return version;
}
public static String getMojoVersion(String mojoKey) {
String version = null;
String talendVersion = getTalendVersion();
Properties properties = new Properties();
File file = new Path(Platform.getConfigurationLocation().getURL().getPath()).append("mojo_version.properties").toFile(); //$NON-NLS-1$
if (file.exists()) {
try (InputStream inStream = new FileInputStream(file)) {
properties.load(inStream);
version = properties.getProperty(mojoKey);
} catch (IOException e) {
ExceptionHandler.process(e);
}
if (version != null && !version.startsWith(talendVersion)) {
ExceptionHandler
.process(new Exception(
"Incompatible Mojo version:" + mojoKey + "[" + version + "], use default version.")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
version = null;
}
}
// default version
if (StringUtils.isBlank(version)) {
version = talendVersion;
if (CommonsPlugin.isJUnitTest()) {
productVersion = null;
}
String productVersion = getInternalVersion();
String revision = StringUtils.substringAfterLast(productVersion, "-"); //$NON-NLS-1$
if (("SNAPSHOT").equals(revision) || Pattern.matches("M\\d{1}", revision)) { //$NON-NLS-1$ //$NON-NLS-2$
version += "-" + revision; //$NON-NLS-1$
}
}
return version;
}
public static void clearCache() {
synchronized (VersionUtils.class) {
productVersion = null;

View File

@@ -42,13 +42,15 @@ public class NetworkUtil {
private static final String TALEND_DISABLE_INTERNET = "talend.disable.internet";//$NON-NLS-1$
private static final String HTTP_NETWORK_URL = "https://talend-update.talend.com";
public static boolean isNetworkValid() {
String disableInternet = System.getProperty(TALEND_DISABLE_INTERNET);
if ("true".equals(disableInternet)) { //$NON-NLS-1$
return false;
}
try {
URL url = new URL("https://www.talend.com"); //$NON-NLS-1$
URL url = new URL(HTTP_NETWORK_URL);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(4000);
conn.setReadTimeout(4000);

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui</artifactId>

View File

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

View File

@@ -154,7 +154,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau ProjectRepositoryNode constructor comment.
*
*
* @param object
* @param parent
* @param type
@@ -277,7 +277,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
private void deleteHiddenNodes(List<IRepositoryNode> nodes) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
IBrandingService service = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
IBrandingService service = GlobalServiceRegister.getDefault().getService(IBrandingService.class);
List<IRepositoryNode> hiddens = service.getBrandingConfiguration().getHiddenRepositoryCategory(this, "DI");
for (IRepositoryNode node : hiddens) {
Iterator<IRepositoryNode> it = nodes.iterator();
@@ -384,7 +384,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
private void initNodesFromComponentSerivice(RepositoryNode curParentNode) {
IGenericWizardService wizardService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
wizardService = GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
}
if (wizardService != null) {
List<RepositoryNode> nodes = wizardService.createNodesFromComponentService(curParentNode);
@@ -453,7 +453,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "initializeChildren".
*
*
* @param parent
*/
public void initializeChildren(Object parent) {
@@ -547,8 +547,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
RuntimeExceptionHandler.process(e);
}
}
private void addExtraChildren(ERepositoryObjectType contentType, org.talend.core.model.general.Project newProject,
private void addExtraChildren(ERepositoryObjectType contentType, org.talend.core.model.general.Project newProject,
RepositoryNode repositoryNode) throws PersistenceException{
if(contentType != ERepositoryObjectType.METADATA_CONNECTIONS){
return;
@@ -556,7 +556,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
List<ERepositoryObjectType> extraTypes = new ArrayList<ERepositoryObjectType>();
IGenericDBService dbService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(
dbService = GlobalServiceRegister.getDefault().getService(
IGenericDBService.class);
}
if(dbService != null){
@@ -645,7 +645,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "addDeletedElements".
*
*
* @param project2
* @param nodes
*/
@@ -654,7 +654,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
List<IRepositoryViewObject> elements = new ArrayList<IRepositoryViewObject>();
ITestContainerProviderService testContainerService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
testContainerService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
testContainerService = GlobalServiceRegister.getDefault()
.getService(ITestContainerProviderService.class);
}
for (IRepositoryViewObject currentObject : objects) {
@@ -687,7 +687,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "addDeletedElements".
*
*
* @param project2
* @param nodes
*/
@@ -695,7 +695,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
List<IRepositoryNode> rootNodes = rootNode.getChildren();
ITestContainerProviderService testContainerService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
testContainerService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
testContainerService = GlobalServiceRegister.getDefault()
.getService(ITestContainerProviderService.class);
}
for (IRepositoryViewObject currentObject : elements) {
@@ -726,7 +726,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC hwang Comment method "getTestCaseParent".
*
*
* @param repositoryObjectType
* @param path
* @return
@@ -750,7 +750,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "getFolder".
*
*
* @param repositoryObjectType
* @param path
* @return
@@ -804,7 +804,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "buildFolders".
*
*
* @param currentType
* @param path
* @param nodes
@@ -912,7 +912,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC nrousseau Comment method "addDeletedSubItems".
*
*
* @param item
* @param currentParentNode
*/
@@ -962,7 +962,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
Set<MetadataTable> tables = null;
IGenericWizardService wizardService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault()
wizardService = GlobalServiceRegister.getDefault()
.getService(IGenericWizardService.class);
}
if (wizardService != null && wizardService.isGenericItem(item)) {
@@ -997,9 +997,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
/**
*
*
* ggu Comment method "isGeneratedJobItem".
*
*
* feature 4393
*/
private boolean isGeneratedJobItem(Item item) {
@@ -1062,7 +1062,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
}
}
private void convert(org.talend.core.model.general.Project newProject, Container fromModel, RepositoryNode parent,
ERepositoryObjectType type) {
convert(newProject, fromModel, parent, type, false);
@@ -1128,7 +1128,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
break;
}
}
IBrandingService breaningService = (IBrandingService) GlobalServiceRegister.getDefault()
IBrandingService breaningService = GlobalServiceRegister.getDefault()
.getService(IBrandingService.class);
if (!existSystemFolder && !breaningService.isPoweredOnlyCamel()) {
@@ -1167,7 +1167,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
folder = new RepositoryNode(oFolder, parent, ENodeType.SIMPLE_FOLDER);
if (factory.getStatus(oFolder) != ERepositoryStatus.DELETED) {
parent.getChildren().add(folder);
}
}
}
}
} else {
@@ -1176,9 +1176,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
folder = new RepositoryNode(oFolder, parent, ENodeType.SIMPLE_FOLDER);
if (factory.getStatus(oFolder) != ERepositoryStatus.DELETED) {
parent.getChildren().add(folder);
}
}
}
}
}
@@ -1211,7 +1211,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
}
}
private RepositoryNode avoidReCreateFolder(RepositoryNode parent, Folder oFolder, boolean extra){
RepositoryNode folder = null;
if(extra){
@@ -1325,7 +1325,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
// node.setParent(recBinNode);
} else {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService designerCoreService = (IDesignerCoreService) GlobalServiceRegister.getDefault()
IDesignerCoreService designerCoreService = GlobalServiceRegister.getDefault()
.getService(IDesignerCoreService.class);
if (designerCoreService != null) {
for (IRepositoryNode repositoryNode : parent.getChildren()) {
@@ -1377,7 +1377,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC tguiu Comment method "createTables".
*
*
* @param node
* @param repositoryObjectType TODO
* @param iMetadataConnection
@@ -1417,7 +1417,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC cantoine Comment method "createTable".
*
*
* @param node
* @param metadataTable
* @param repositoryObjectType TODO
@@ -1635,7 +1635,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
DatabaseConnectionItem connectionItem = (DatabaseConnectionItem) item;
DatabaseConnection connection = (DatabaseConnection) connectionItem.getConnection();
if (PluginChecker.isCDCPluginLoaded()) {
ICDCProviderService service = (ICDCProviderService) GlobalServiceRegister.getDefault()
ICDCProviderService service = GlobalServiceRegister.getDefault()
.getService(ICDCProviderService.class);
if (service != null && service.canCreateCDCConnection(connection)) {
RepositoryNode cdcNode = new StableRepositoryNode(node,
@@ -1886,7 +1886,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC YeXiaowei Comment method "createSAPFunctionNodes".
*
*
* @param metadataConnection
* @param functionNode
*/
@@ -1926,7 +1926,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC zli Comment method "createSAPIDocNodes".
*
*
* @param recBin
* @param rebObj
* @param metadataConnection
@@ -1961,7 +1961,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC YeXiaowei Comment method "createSAPNode".
*
*
* @param rebObj
* @param functionNode
* @param unit
@@ -1987,7 +1987,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC tguiu Comment method "createMetatable".
*
*
* @param node
* @param table
* @param repositoryObjectType TODO
@@ -2016,7 +2016,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/**
* DOC cantoine Comment method "createQueryNode".
*
*
* @param node
* @param repObj
* @param query
@@ -2032,7 +2032,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/*
* (non-Javadoc)
*
*
* @see org.talend.repository.model.IProjectRepositoryNode#getProject()
*/
@Override
@@ -2101,7 +2101,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
/*
* (non-Javadoc)
*
*
* @see org.talend.repository.model.nodes.IProjectRepositoryNode#getRecBinNode()
*/
@Override
@@ -2124,8 +2124,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
String branch = ProjectManager.getInstance().getMainProjectBranch(project);
if ("".equals(branch) || branch == null) { //$NON-NLS-1$
branch = null;
}
if (!branch.contains(SVNConstant.NAME_TRUNK) && !branch.contains(SVNConstant.NAME_BRANCHES)
} else if (!branch.contains(SVNConstant.NAME_TRUNK) && !branch.contains(SVNConstant.NAME_BRANCHES)
&& !branch.contains(SVNConstant.NAME_TAGS)) {
branch = null;
}
@@ -2295,9 +2294,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
public IRepositoryNode removeCache(String key) {
return nodeCache.removeCache(key);
}
public void setOptions(int options) {
this.options = options;
}
}

View File

@@ -68,10 +68,8 @@ import org.talend.commons.exception.SystemException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.commons.runtime.service.ITaCoKitService;
import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.commons.ui.runtime.CommonUIPlugin;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.commons.utils.data.container.RootContainer;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.commons.utils.time.TimeMeasure;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.AbstractDQModelService;
@@ -130,7 +128,6 @@ import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.repository.item.ItemProductKeys;
import org.talend.core.runtime.services.IMavenUIService;
import org.talend.core.runtime.util.ItemDateParser;
import org.talend.core.runtime.util.JavaHomeUtil;
import org.talend.core.service.ICoreUIService;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper;
@@ -213,14 +210,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
private ICoreService getCoreService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
return (ICoreService) GlobalServiceRegister.getDefault().getService(ICoreService.class);
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
}
return null;
}
private IRunProcessService getRunProcessService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
return (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
return GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
}
return null;
}
@@ -317,7 +314,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
* @throws LoginException
*/
private void checkProjectCompatibility(Project project) throws LoginException {
IMigrationToolService migrationToolService = (IMigrationToolService) GlobalServiceRegister.getDefault().getService(
IMigrationToolService migrationToolService = GlobalServiceRegister.getDefault().getService(
IMigrationToolService.class);
// update migration system.
migrationToolService.updateMigrationSystem(project.getEmfProject(), false);
@@ -386,7 +383,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ITDQRepositoryService tdqRepService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(
tdqRepService = GlobalServiceRegister.getDefault().getService(
ITDQRepositoryService.class);
}
@@ -523,7 +520,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
checkFileName(projectInfor.getLabel(), RepositoryConstants.PROJECT_PATTERN);
Project toReturn = this.repositoryFactoryFromProvider.createProject(authUser, authPassword, projectInfor);
if (toReturn.isLocal()) {
IMigrationToolService service = (IMigrationToolService) GlobalServiceRegister.getDefault().getService(
IMigrationToolService service = GlobalServiceRegister.getDefault().getService(
IMigrationToolService.class);
service.initNewProjectTasks(toReturn);
}
@@ -853,7 +850,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (repositoryObjectType == ERepositoryObjectType.PROCESS && isFullLogonFinished()) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
IESBService service = (IESBService) GlobalServiceRegister.getDefault().getService(IESBService.class);
IESBService service = GlobalServiceRegister.getDefault().getService(IESBService.class);
if (service != null) {
service.refreshOperationLabel(object.getProperty().getId());
}
@@ -920,7 +917,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (repositoryObjectType == ERepositoryObjectType.PROCESS && isFullLogonFinished()) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
IESBService service = (IESBService) GlobalServiceRegister.getDefault().getService(IESBService.class);
IESBService service = GlobalServiceRegister.getDefault().getService(IESBService.class);
if (service != null) {
service.refreshOperationLabel(object.getProperty().getId());
}
@@ -931,7 +928,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
service.batchDeleteAllVersionTalendJobProject(idList);
}
@@ -2034,6 +2031,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
workspace.setDescription(description);
} catch (CoreException e) {
// do nothing
ExceptionHandler.process(e);
}
}
isCancelled = false;
@@ -2074,7 +2072,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
checkProjectCompatibility(project);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMavenUIService.class)) {
IMavenUIService mavenUIService = (IMavenUIService) GlobalServiceRegister.getDefault().getService(
IMavenUIService mavenUIService = GlobalServiceRegister.getDefault().getService(
IMavenUIService.class);
if (mavenUIService != null) {
mavenUIService.updateMavenResolver(true);
@@ -2111,7 +2109,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.load.componnents"), 1); //$NON-NLS-1$
ICoreUIService coreUiService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreUIService.class)) {
coreUiService = (ICoreUIService) GlobalServiceRegister.getDefault().getService(ICoreUIService.class);
coreUiService = GlobalServiceRegister.getDefault().getService(ICoreUIService.class);
}
if (coreUiService != null) {
coreUiService.componentsReset();
@@ -2144,20 +2142,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (coreService != null) {
// clean workspace
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.cleanWorkspace"), 1); //$NON-NLS-1$
String specifiedVersion = null;
String currentVersion = JavaUtils.getProjectJavaVersion();
String newVersion = null;
if (CommonUIPlugin.isFullyHeadless()) {
specifiedVersion = JavaHomeUtil.getSpecifiedJavaVersion();
}
if (specifiedVersion == null) {
newVersion = currentVersion != null ? currentVersion : JavaUtils.DEFAULT_VERSION;
} else {
newVersion = specifiedVersion;
}
JavaUtils.updateProjectJavaVersion(newVersion);
TimeMeasure.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -2176,6 +2160,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
coreService.syncAllBeans();
} catch (SystemException e1) {
//
ExceptionHandler.process(e1);
}
}
}
@@ -2205,6 +2190,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
}
if (runProcessService != null && !isCommandLineLocalRefProject) {
@@ -2213,7 +2199,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
TimeMeasure.step("logOnProject", "install / setup root poms"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepositoryService = (ITDQRepositoryService) GlobalServiceRegister.getDefault()
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepositoryService != null) {
tdqRepositoryService.initProxyRepository();

View File

@@ -22,15 +22,15 @@ import java.security.Security;
import java.util.Hashtable;
import javax.net.SocketFactory;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import org.apache.log4j.Logger;
import org.talend.core.repository.i18n.Messages;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
/**
* This class is used for LDAP. <br/>
*
@@ -218,12 +218,12 @@ public class AdvancedSocketFactory extends SSLSocketFactory {
*/
private void init(KeyStore ks, char password[]) {
SSLContext ctx = null;
javax.net.ssl.KeyManager keyManagers[] = null;
KeyManager keyManagers[] = null;
TrustManager trustManagers[] = null;
try {
if (ks != null) {
KeyManagerFactory kmf = null;
kmf = KeyManagerFactory.getInstance("SunX509"); //$NON-NLS-1$
kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); //$NON-NLS-1$
kmf.init(ks, password);
keyManagers = kmf.getKeyManagers();
}
@@ -236,7 +236,4 @@ public class AdvancedSocketFactory extends SSLSocketFactory {
}
}
static {
Security.addProvider(java.security.Security.getProvider("SUN"));
}
}

View File

@@ -27,13 +27,13 @@ import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.apache.log4j.Logger;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.repository.i18n.Messages;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import org.apache.log4j.Logger;
import org.talend.core.repository.i18n.Messages;
/**
* This class is used for verifying CA for LDAP connection.
*
@@ -76,6 +76,26 @@ public class LDAPCATruster implements X509TrustManager {
init();
}
/**
* Comment method "deleteCert".
*
* @param id
* @return
*/
private boolean deleteCert(String id) {
try {
ks.deleteEntry(id);
} catch (KeyStoreException ex) {
return false;
}
return true;
}
/*
* (non-Javadoc)
*
* @see com.sun.net.ssl.X509TrustManager#getAcceptedIssuers()
*/
public X509Certificate[] getAcceptedIssuers() {
if (trustManager == null)
return null;
@@ -157,9 +177,9 @@ public class LDAPCATruster implements X509TrustManager {
*/
private X509TrustManager initTrustManager(KeyStore ks) throws NoSuchAlgorithmException, KeyStoreException {
TrustManagerFactory trustManagerFactory = null;
trustManagerFactory = TrustManagerFactory.getInstance("SunX509"); //$NON-NLS-1$
trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); //$NON-NLS-1$
trustManagerFactory.init(ks);
javax.net.ssl.TrustManager trusts[] = trustManagerFactory.getTrustManagers();
TrustManager trusts[] = trustManagerFactory.getTrustManagers();
return (X509TrustManager) trusts[0];
}
@@ -174,29 +194,28 @@ public class LDAPCATruster implements X509TrustManager {
return false;
}
/*
* (non-Javadoc)
*
* @see com.sun.net.ssl.X509TrustManager#isServerTrusted(java.security.cert.X509Certificate[])
*/
public boolean isServerTrusted(X509Certificate chain[], String authType) {
boolean isTrusted = false;
if (trustManager != null) {
try {
trustManager.checkServerTrusted(chain, authType);
isTrusted = true;
}catch (CertificateException e) {
ExceptionHandler.process(e);
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
if (trustManager == null)
throw new CertificateException("Trust manager is not initialized");
else
trustManager.checkClientTrusted(chain, authType);
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
if (trustManager != null) {
try {
trustManager.checkServerTrusted(chain, authType);
return;
} catch(Exception e) {
}
}
if (isTrusted) {
return true;
}
}
X509Certificate ca = getCACert(chain);
if (ca != null) {
if (isAccepted(ca)) {
log.error(Messages.getString("LDAPCATruster.sslError1")); //$NON-NLS-1$
return false;
if (!isAccepted(ca)) {
System.err.println("SSL Error:Server certificate chain verification failed.");
throw new CertificateException("Server certificate chain verification failed.");
}
String id = String.valueOf(System.currentTimeMillis());
X509TrustManager tmpTrustManager = null;
@@ -204,34 +223,26 @@ public class LDAPCATruster implements X509TrustManager {
ks.setCertificateEntry(id, ca);
tmpTrustManager = initTrustManager(ks);
} catch (Exception e) {
log.error(Messages.getString("LDAPCATruster.failedCreateTmp") + e.getMessage()); //$NON-NLS-1$
return false;
System.err.println("ASF Truster: Failed to create tmp trust store : " + e.getMessage());
throw new CertificateException(e);
}
boolean isTmpTrusted = false;
if (tmpTrustManager != null) {
try {
tmpTrustManager.checkServerTrusted(chain, authType);
isTmpTrusted = true;
}catch (CertificateException e) {
ExceptionHandler.process(e);
}
}
if (isTmpTrusted) {
try{
tmpTrustManager.checkServerTrusted(chain, authType);
if (this.isSaveCA) {
saveStore();
trustManager = tmpTrustManager;
}
return true;
} else {
log.error(Messages.getString("LDAPCATruster.sslError2")); //$NON-NLS-1$
return false;
return;
} catch(CertificateException e) {
System.err.println("SSL Error:Server certificate chain verification failed and \\nthe CA is missing.");
throw e;
}
} else {
log.error(Messages.getString("LDAPCATruster.sslError3") //$NON-NLS-1$
+ Messages.getString("LDAPCATruster.noCertificate")); //$NON-NLS-1$
return false;
System.err
.println("SSL Error:CA certificate is not in the server certificate chain.\nPlease use the keytool command to import the server certificate.");
throw new CertificateException("CA certificate is not in the server certificate chain.\\nPlease use the keytool command to import the server certificate.");
}
}
}
/**
* Comment method "saveStore".
@@ -266,18 +277,4 @@ public class LDAPCATruster implements X509TrustManager {
}
}
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
if (trustManager == null) {
throw new CertificateException(Messages.getString("LDAPCATruster.failedInitialTrust"));
}
trustManager.checkClientTrusted(chain, authType);
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
if (!isServerTrusted(chain, authType)) {
throw new CertificateException(Messages.getString("LDAPCATruster.sslError1"));
}
}
}

View File

@@ -21,8 +21,11 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.IContainer;
@@ -274,20 +277,37 @@ public class ProjectDataJsonProvider {
public static void loadMigrationTaskSetting(Project project, InputStream input) throws PersistenceException {
try {
project.eSetDeliver(false);
MigrationTaskSetting migrationTaskSetting = null;
if (input != null) {
migrationTaskSetting = new ObjectMapper().readValue(input, MigrationTaskSetting.class);
}
if (migrationTaskSetting != null) {
MigrationTask fakeTask = createFakeMigrationTask();
List<MigrationTask> allRealTask = new ArrayList<MigrationTask>();
MigrationTask existingFakeTask = null;
for (int i = 0; i < project.getMigrationTask().size(); i++) {
MigrationTask task = (MigrationTask) project.getMigrationTask().get(i);
if (!StringUtils.equals(fakeTask.getId(), task.getId())) {
allRealTask.add(task);
if (StringUtils.equals(fakeTask.getId(), task.getId())) {
existingFakeTask = task;
break;
}
}
project.getMigrationTask().removeAll(allRealTask);
// remove all the migrations from the project
project.getMigrationTask().clear();
if (existingFakeTask != null) {
// keep only the fake migration task of 7.1.1 with new migration index
// re-use the same instance to make sure we keep the same emf id.
project.getMigrationTask().add(existingFakeTask);
}
Set<String> tasksIds = new HashSet<>();
Iterator<MigrationTaskJson> it = migrationTaskSetting.getMigrationTaskList().iterator();
while (it.hasNext()) { // remove duplicates to fix issues found in TUP-22735
MigrationTaskJson task = it.next();
if (tasksIds.contains(task.getId())) {
it.remove();
}
tasksIds.add(task.getId());
}
project.getMigrationTasks().clear();
if (migrationTaskSetting.getMigrationTaskList() != null) {
for (MigrationTaskJson json : migrationTaskSetting.getMigrationTaskList()) {
@@ -305,6 +325,7 @@ public class ProjectDataJsonProvider {
} catch (Exception e) {
throw new PersistenceException(e);
} finally {
project.eSetDeliver(true);
closeInputStream(input);
}
}

View File

@@ -0,0 +1,280 @@
<?xml version="1.0"?>
<mapping>
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
default="true">
<dbTypes>
<dbType type="BIGINT" ignorePre="true"/>
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="BINARY" ignorePre="true"/>
<dbType type="BIT" ignorePre="true" />
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT" defaultPrecision="2"/>
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
<dbType type="INT" ignorePre="true" />
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
<dbType type="MEDIUMINT" ignorePre="true" />
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
<dbType type="SMALLINT" ignorePre="true" />
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="SET" ignoreLen="true" ignorePre="true" />
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
<dbType type="TINYINT" ignorePre="true" />
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
<dbType type="VARBINARY" ignorePre="true" />
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
<dbType type="YEAR" ignorePre="true"/>
</dbTypes>
<language name="java">
<talendToDbTypes><!-- Adviced mappings -->
<talendType type="id_List"/>
<talendType type="id_Boolean">
<dbType type="BIT" default="true" />
</talendType>
<talendType type="id_Byte">
<dbType type="TINYINT" default="true" />
<dbType type="BIGINT" />
<dbType type="INT" />
<dbType type="MEDIUMINT" />
<dbType type="SMALLINT" />
</talendType>
<talendType type="id_byte[]">
</talendType>
<talendType type="id_Character">
<dbType type="CHAR" default="true" />
<dbType type="VARCHAR"/>
</talendType>
<talendType type="id_Date">
<dbType type="DATE" />
<dbType type="DATETIME" default="true" />
<dbType type="TIME" />
<dbType type="YEAR" />
<dbType type="TIMESTAMP" />
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DECIMAL" default="true" />
<dbType type="FLOAT"/>
<dbType type="DOUBLE" />
</talendType>
<talendType type="id_Double">
<dbType type="DOUBLE" default="true" />
<dbType type="FLOAT"/>
<dbType type="DECIMAL" />
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT" default="true" />
<dbType type="DOUBLE"/>
<dbType type="DECIMAL" />
</talendType>
<talendType type="id_Integer">
<dbType type="INT" default="true" />
<dbType type="BIGINT" />
</talendType>
<talendType type="id_Long">
<dbType type="BIGINT" default="true" />
</talendType>
<talendType type="id_Object">
<dbType type="BLOB" default="true"/>
<dbType type="ENUM" />
<dbType type="GEOMETRY" />
<dbType type="GEOMETRYCOLLECTION" />
<dbType type="MEDIUMINT" />
<dbType type="LONGBLOB" />
<dbType type="MEDIUMBLOB" />
<dbType type="MULTIPOINT" />
<dbType type="MULTIPOLYGON" />
<dbType type="POINT" />
<dbType type="POLYGON" />
<dbType type="SET" />
<dbType type="TINYBLOB" />
</talendType>
<talendType type="id_Short">
<dbType type="SMALLINT" default="true" />
<dbType type="INT" />
<dbType type="BIGINT"/>
<dbType type="MEDIUMINT" />
</talendType>
<talendType type="id_String">
<dbType type="VARCHAR" default="true" />
<dbType type="LINESTRING" />
<dbType type="LONGTEXT"/>
<dbType type="MEDIUMTEXT" />
<dbType type="MULTILINESTRING" />
<dbType type="TEXT" />
<dbType type="TINYTEXT" />
</talendType>
</talendToDbTypes>
<dbToTalendTypes>
<dbType type="BIGINT">
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BINARY">
<talendType type="id_Boolean" default="true" />
</dbType>
<dbType type="BIT">
<talendType type="id_Boolean" default="true" />
</dbType>
<dbType type="BLOB">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="CHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="DATE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="DATETIME">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="DECIMAL">
<talendType type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal" default="true"/>
</dbType>
<dbType type="DOUBLE">
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="ENUM">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="FLOAT">
<talendType type="id_Float" default="true" />
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="GEOMETRY">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="GEOMETRYCOLLECTION">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="INT">
<talendType type="id_Integer" default="true" />
<talendType type="id_Long"/>
</dbType>
<dbType type="LINESTRING">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="LONGTEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="LONGBLOB">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="MEDIUMBLOB">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="MEDIUMINT">
<talendType type="id_Integer" default="true" />
<talendType type="id_Long"/>
</dbType>
<dbType type="MEDIUMTEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="MULTILINESTRING">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="MULTIPOINT">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="MULTIPOLYGON">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="POINT">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="POLYGON">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="SMALLINT">
<talendType type="id_Short" default="true" />
<talendType type="id_Long"/>
<talendType type="id_Integer"/>
</dbType>
<dbType type="SET">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="TEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="TIME">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TINYBLOB">
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="TINYINT">
<talendType type="id_Byte" default="true" />
<talendType type="id_Integer"/>
<talendType type="id_Long"/>
<talendType type="id_Short"/>
</dbType>
<dbType type="TINYTEXT">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="VARBINARY">
</dbType>
<dbType type="VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="YEAR">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="BIGINT UNSIGNED" >
</dbType>
<dbType type="DOUBLE UNSIGNED" >
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="FLOAT UNSIGNED" >
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="INT UNSIGNED" >
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="MEDIUMINT UNSIGNED" >
<talendType type="id_Integer" default="true" />
<talendType type="id_Long" />
</dbType>
<dbType type="SMALLINT UNSIGNED" >
<talendType type="id_Integer" default="true" />
<talendType type="id_Long" />
</dbType>
<dbType type="TINYINT UNSIGNED" >
<talendType type="id_Short" default="true" />
<talendType type="id_Integer" />
<talendType type="id_Long" />
</dbType>
</dbToTalendTypes>
</language>
</dbms>
</mapping>

View File

@@ -88,10 +88,8 @@
<talendType type="id_BigDecimal" default="true"/>
</dbType>
<dbType type="BIGINT">
<talendType type="id_BigDecimal" default="true"/>
<talendType type="id_Byte"/>
<talendType type="id_Long" default="true"/>
<talendType type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
<dbType type="INT">
<talendType type="id_Integer" default="true"/>

View File

@@ -13,6 +13,8 @@
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true"/>
<dbType type="DATE" ignoreLen="true" ignorePre="true"/>
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
<dbType type="INTERVAL DAY TO SECOND" ignoreLen="true" ignorePre="true"/>
<dbType type="INTERVAL YEAR TO MONTH" ignoreLen="true" ignorePre="true"/>
<dbType type="BINARY" ignorePre="true"/>
<dbType type="VARBINARY" ignorePre="true" />
<dbType type="NUMERIC" defaultLength="10" defaultPrecision="5"/>
@@ -46,6 +48,8 @@
<talendType type="id_Date">
<dbType type="DATE" default="true" />
<dbType type="TIMESTAMP"/>
<dbType type="INTERVAL DAY TO SECOND"/>
<dbType type="INTERVAL YEAR TO MONTH"/>
</talendType>
<talendType type="id_Double">
<dbType type="DOUBLE PRECISION" default="true" />
@@ -121,6 +125,12 @@
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="INTERVAL DAY TO SECOND">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="INTERVAL YEAR TO MONTH">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="BINARY">
<talendType type="id_byte[]" default="true" />
</dbType>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime</artifactId>

View File

@@ -22,98 +22,105 @@ import org.talend.core.runtime.projectsetting.IProjectSettingPreferenceConstants
*/
public enum EDatabaseTypeName {
MYSQL(
"MySQL", "MySQL", Boolean.FALSE, "MYSQL", "MYSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"MySQL", "MySQL", Boolean.FALSE, "MYSQL", "MYSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
AMAZON_AURORA(
"Amazon Aurora", "Amazon Aurora", Boolean.FALSE, "AMAZON_AURORA", "AMAZON_AURORA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"Amazon Aurora", "Amazon Aurora", Boolean.FALSE, "AMAZON_AURORA", "AMAZON_AURORA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
PSQL(
"PostgreSQL", "PostgreSQL", Boolean.TRUE, "POSTGRESQL", "POSTGRE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"PostgreSQL", "PostgreSQL", Boolean.TRUE, "POSTGRESQL", "POSTGRE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
PLUSPSQL(
"PostgresPlus", "PostgresPlus", Boolean.TRUE, "POSTGRESPLUS", "POSTGREPLUS", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"PostgresPlus", "PostgresPlus", Boolean.TRUE, "POSTGRESPLUS", "POSTGREPLUS", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ORACLEFORSID(
"ORACLE_SID", "Oracle with SID", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"ORACLE_SID", "Oracle with SID", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ORACLESN(
"ORACLE_SERVICE_NAME", "Oracle with service name", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"ORACLE_SERVICE_NAME", "Oracle with service name", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ORACLE_OCI(
"ORACLE_OCI", "Oracle OCI", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"ORACLE_OCI", "Oracle OCI", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ORACLE_CUSTOM(
"ORACLE_CUSTOM", "Oracle Custom", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"ORACLE_CUSTOM", "Oracle Custom", Boolean.TRUE, "ORACLE", "DBORACLE", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
/**
* @deprecated odbc is not supported in java8
*/
GODBC(
"Generic ODBC", "Generic ODBC (Unsupported)", Boolean.FALSE, "ODBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Generic ODBC", "Generic ODBC (Unsupported)", Boolean.FALSE, "ODBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/**
* @deprecated odbc is not supported in java8
*/
MSODBC(
"Microsoft SQL (Odbc driver)", "Microsoft SQL Server (Odbc driver, Unsupported)", Boolean.FALSE, "ODBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Microsoft SQL (Odbc driver)", "Microsoft SQL Server (Odbc driver, Unsupported)", Boolean.FALSE, "ODBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IBMDB2(
"IBM DB2", "IBM DB2", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"IBM DB2", "IBM DB2", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IBMDB2ZOS(
"IBM DB2 ZOS", "IBM DB2 ZOS", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"IBM DB2 ZOS", "IBM DB2 ZOS", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
SYBASEASE(
"SybaseASE", "Sybase (ASE and IQ)", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"SybaseASE", "Sybase (ASE and IQ)", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// this Sybase IQ not used.
SYBASEIQ(
"Sybase IQ", "Sybase IQ", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Sybase IQ", "Sybase IQ", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MSSQL(
"MSSQL", "Microsoft SQL Server", Boolean.TRUE, "SQL_SERVER", "MSSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"MSSQL", "Microsoft SQL Server", Boolean.TRUE, "SQL_SERVER", "MSSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
MSSQL05_08(
"MSSQL", "Microsoft SQL Server 2005/2008", Boolean.TRUE, "SQL_SERVER", "MSSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"MSSQL", "Microsoft SQL Server 2005/2008", Boolean.TRUE, "SQL_SERVER", "MSSQL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
// this don't use in Branch 2.0
HSQLDB("HSQLDB", "HSQLDB", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HSQLDB(
"HSQLDB", "HSQLDB", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HSQLDB_SERVER(
"HSQLDB Server", "HSQLDB Server", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"HSQLDB Server", "HSQLDB Server", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HSQLDB_WEBSERVER(
"HSQLDB WebServer", "HSQLDB WebServer", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"HSQLDB WebServer", "HSQLDB WebServer", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HSQLDB_IN_PROGRESS(
"HSQLDB In-Process", "HSQLDB In-Process", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"HSQLDB In-Process", "HSQLDB In-Process", Boolean.FALSE, "HSQLDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JAVADB("JavaDB", "JavaDB", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JAVADB(
"JavaDB", "JavaDB", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
INGRES(
"Ingres", "Ingres", Boolean.FALSE, "INGRES", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), // "INGRES"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Ingres", "Ingres", Boolean.FALSE, "INGRES", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), // "INGRES"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
INTERBASE(
"Interbase", "Interbase", Boolean.FALSE, "INTERBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "INTERBASE"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SQLITE("SQLite", "SQLite", Boolean.FALSE, "SQLITE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "SQLITE"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Interbase", "Interbase", Boolean.FALSE, "INTERBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "INTERBASE"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SQLITE(
"SQLite", "SQLite", Boolean.FALSE, "SQLITE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "SQLITE"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
FIREBIRD(
"FireBird", "FireBird", Boolean.FALSE, "FIREBIRD", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "FIREBIRD"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"FireBird", "FireBird", Boolean.FALSE, "FIREBIRD", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "FIREBIRD"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
INFORMIX(
"Informix", "Informix", Boolean.TRUE, "INFORMIX", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "INFORMIX"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Informix", "Informix", Boolean.TRUE, "INFORMIX", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), // "INFORMIX"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
VECTORWISE(
"VectorWise", "VectorWise", Boolean.FALSE, "VECTORWISE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"VectorWise", "VectorWise", Boolean.FALSE, "VECTORWISE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ACCESS(
"Access", "Access", Boolean.FALSE, "ACCESS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Default_Name), // "ACCESS"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Access", "Access", Boolean.FALSE, "ACCESS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Default_Name), // "ACCESS"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
TERADATA(
"Teradata", "Teradata", Boolean.TRUE, "TERADATA", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), // "TERADATA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AS400("AS400", "AS400", Boolean.FALSE, "AS400", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Login), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Teradata", "Teradata", Boolean.TRUE, "TERADATA", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), // "TERADATA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AS400(
"AS400", "AS400", Boolean.FALSE, "AS400", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Login), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JAVADB_EMBEDED(
"JavaDB Embeded", "JavaDB Embeded", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"JavaDB Embeded", "JavaDB Embeded", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JAVADB_JCCJDBC(
"JavaDB JCCJDBC", "JavaDB JCCJDBC", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"JavaDB JCCJDBC", "JavaDB JCCJDBC", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JAVADB_DERBYCLIENT(
"JavaDB DerbyClient", "JavaDB DerbyClient", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"JavaDB DerbyClient", "JavaDB DerbyClient", Boolean.FALSE, "JAVADB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
VERTICA(
"Vertica", "Vertica", Boolean.TRUE, "VERTICA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MAXDB("MAXDB", "MaxDB", Boolean.FALSE, "MAXDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MAXDB(
"MAXDB", "MaxDB", Boolean.FALSE, "MAXDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
GREENPLUM(
"Greenplum", "Greenplum", Boolean.TRUE, "GREENPLUM", "GREENPLUM", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"Greenplum", "Greenplum", Boolean.TRUE, "GREENPLUM", "GREENPLUM", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
PARACCEL(
"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", 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$
// General JDBC not support schema defalut
GENERAL_JDBC(
"General JDBC", "General JDBC", Boolean.FALSE, "JDBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
EXASOL("Exasol", "Exasol", Boolean.TRUE, "Exasol", 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$
EXASOL(
"Exasol", "Exasol", Boolean.TRUE, "Exasol", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HIVE("Hive", "Hive", Boolean.FALSE, "HIVE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HIVE(
"Hive", "Hive", Boolean.FALSE, "HIVE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SAPHana(
"SAPHana", "SAPHana", Boolean.TRUE, "SAPHANA", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -121,24 +128,23 @@ public enum EDatabaseTypeName {
H2("H2", "H2", Boolean.FALSE, "H2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
REDSHIFT(
"Redshift", "Redshift", Boolean.TRUE, "REDSHIFT", "REDSHIFT", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
REDSHIFT_SSO(
"Redshift SSO", //$NON-NLS-1$
"Redshift SSO", //$NON-NLS-1$
Boolean.TRUE,
"REDSHIFT", //$NON-NLS-1$
"REDSHIFT SSO", //$NON-NLS-1$
EDatabaseSchemaOrCatalogMapping.Sid,
EDatabaseSchemaOrCatalogMapping.Schema),
"Redshift", "Redshift", Boolean.TRUE, "REDSHIFT", "REDSHIFT", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
REDSHIFT_SSO("Redshift SSO", //$NON-NLS-1$
"Redshift SSO", //$NON-NLS-1$
Boolean.TRUE,
"REDSHIFT", //$NON-NLS-1$
"REDSHIFT SSO", //$NON-NLS-1$
EDatabaseSchemaOrCatalogMapping.Sid,
EDatabaseSchemaOrCatalogMapping.Schema),
IMPALA(
"IMPALA", "Impala", Boolean.TRUE, "IMPALA", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"IMPALA", "Impala", Boolean.TRUE, "IMPALA", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
HBASE(
"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", 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$
// displayName is used in Java code.
private String displayName;
@@ -322,11 +328,24 @@ public enum EDatabaseTypeName {
boolean isSupport = true;
if (EDatabaseTypeName.GODBC == this || EDatabaseTypeName.MSODBC == this) {
boolean isSupportODBC = CoreRuntimePlugin.getInstance().getProjectPreferenceManager()
.getBoolean(IProjectSettingPreferenceConstants.METADATA_DBCONNECTION_ODBC_ENABLE);
boolean isSupportODBC =
CoreRuntimePlugin
.getInstance()
.getProjectPreferenceManager()
.getBoolean(IProjectSettingPreferenceConstants.METADATA_DBCONNECTION_ODBC_ENABLE);
isSupport = isSupportODBC;
}
return isSupport;
}
/**
* Getter for dbType.
*
* @return the dbType
*/
public String getDbType() {
return this.dbType;
}
}

View File

@@ -96,11 +96,11 @@ public enum EDatabaseConnTemplate {
"jdbc:sqlanywhere:Host=<host>:<port>;DatabaseName=<sid>;<property>", //$NON-NLS-1$
"2638")), //$NON-NLS-1$
IBMDB2(new DbConnStr(EDatabaseTypeName.IBMDB2, //
"jdbc:db2://<host>:<port>/<sid>", //$NON-NLS-1$
"jdbc:db2://<host>:<port>/<sid>:<property>", //$NON-NLS-1$
"50000")), //$NON-NLS-1$
IBMDB2_ZOS(new DbConnStr(EDatabaseTypeName.IBMDB2ZOS, //
"jdbc:db2://<host>:<port>/<sid>", //$NON-NLS-1$
"jdbc:db2://<host>:<port>/<sid>:<property>", //$NON-NLS-1$
"557")), //$NON-NLS-1$
SQLITE(new DbConnStr(EDatabaseTypeName.SQLITE, //
@@ -145,11 +145,11 @@ public enum EDatabaseConnTemplate {
"1527")), //$NON-NLS-1$
HSQLDB_SERVER(new DbConnStr(EDatabaseTypeName.HSQLDB_SERVER, //
"jdbc:hsqldb:hsql://<host>:<port>/<sid>", //$NON-NLS-1$
"jdbc:hsqldb:hsql://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
"9001")), //$NON-NLS-1$
HSQLDB_WEBSERVER(new DbConnStr(EDatabaseTypeName.HSQLDB_WEBSERVER, //
"jdbc:hsqldb:http://<host>:<port>/<sid>", //$NON-NLS-1$
"jdbc:hsqldb:http://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
"9001")), //$NON-NLS-1$
HSQLDB_IN_PROGRESS(new DbConnStr(EDatabaseTypeName.HSQLDB_IN_PROGRESS, //
@@ -182,7 +182,7 @@ public enum EDatabaseConnTemplate {
"5439",//$NON-NLS-1$
"")), //$NON-NLS-1$
NETEZZA(new DbConnStr(EDatabaseTypeName.NETEZZA, //
"jdbc:netezza://<host>:<port>/<sid>", //$NON-NLS-1$
"jdbc:netezza://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
"5480")), //$NON-NLS-1$
VERTICA(new DbConnStr(EDatabaseTypeName.VERTICA, //
@@ -306,7 +306,7 @@ public enum EDatabaseConnTemplate {
List<ERepositoryObjectType> extraTypes = new ArrayList<ERepositoryObjectType>();
IGenericDBService dbService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(
dbService = GlobalServiceRegister.getDefault().getService(
IGenericDBService.class);
}
if(dbService != null){
@@ -420,6 +420,11 @@ public enum EDatabaseConnTemplate {
case JAVADB_JCCJDBC:
case JAVADB_DERBYCLIENT:
case MAXDB:
case IBMDB2:
case IBMDB2_ZOS:
case HSQLDB_SERVER:
case HSQLDB_WEBSERVER:
case NETEZZA:
return true;
default:
}

View File

@@ -64,7 +64,7 @@ public enum EDatabaseVersion4Drivers {
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-15.10.00.14.jar", "tdgssconfig-15.10.00.14.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "terajdbc4-16.20.00.02.jar", "tdgssconfig-16.20.00.02.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
@@ -163,9 +163,9 @@ public enum EDatabaseVersion4Drivers {
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
"redshiftJDBC42-no-awssdk-1.2.16.1027.jar")), //$NON-NLS-1$
"redshift-jdbc42-no-awssdk-1.2.20.1043.jar")), //$NON-NLS-1$
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "redshiftJDBC42-no-awssdk-1.2.16.1027.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new String[] { "redshift-jdbc42-no-awssdk-1.2.20.1043.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackson-databind-2.9.5.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar" })), //$NON-NLS-1$ //$NON-NLS-2$

View File

@@ -55,6 +55,8 @@ public interface IComponentsFactory {
*/
public Set<IComponent> getComponents();
public boolean isInitialising();
/**
* Get a readonly components collection to avoid ConcurrentModificationException caused by multiple thread
* access;<br/>

View File

@@ -153,7 +153,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();
temp.addAll(this.listColumns);
temp.addAll(this.unusedColumns);
if (isRepository && originalColumns != null) {
if (originalColumns != null) {
Collections.sort(temp, new Comparator<IMetadataColumn>() {
@Override

View File

@@ -213,6 +213,7 @@ public final class MetadataToolAvroHelper {
//ignore it now as we can't process the complex expression for the default value, and the default value is not useful for runtime like the old javajet tjdbcxxx
//TODO support the expression calculate, not sure it's necessary and sometimes, more complex like globalMap.get(xxx) which only have meaning after running the job.
ExceptionHandler.process(e, Level.WARN);
defaultValue = null;
}
// Types with Document/Unknown elements, store as binary

View File

@@ -162,7 +162,8 @@ public final class MetadataToolHelper {
if (itemId == null || itemId.equals("")) { //$NON-NLS-1$
return null;
}
final IProxyRepositoryFactory proxyRepositoryFactory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
final IProxyRepositoryFactory proxyRepositoryFactory =
CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
try {
final IRepositoryViewObject lastVersion = proxyRepositoryFactory.getLastVersion(itemId);
if (lastVersion != null) {
@@ -280,7 +281,8 @@ public final class MetadataToolHelper {
private static boolean isAllowSpecificCharacters() {
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
return coreUIPluginNode.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
return coreUIPluginNode
.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
}
/**
@@ -317,8 +319,8 @@ public final class MetadataToolHelper {
}
}
}
if (isKeyword
|| org.apache.commons.lang.StringUtils.countMatches(returnedColumnName, underLine) > (originalColumnName.length() / 2)) {
if (isKeyword || org.apache.commons.lang.StringUtils
.countMatches(returnedColumnName, underLine) > (originalColumnName.length() / 2)) {
returnedColumnName = "Column" + index; //$NON-NLS-1$
}
@@ -440,9 +442,9 @@ public final class MetadataToolHelper {
*
*
*/
private static String mapSpecialChar(String columnName) {
private static String mapSpecialChar(String columnName) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRoutinesService.class)) {
IRoutinesService service = (IRoutinesService) GlobalServiceRegister.getDefault().getService(IRoutinesService.class);
IRoutinesService service = GlobalServiceRegister.getDefault().getService(IRoutinesService.class);
if (service != null) {
Vector map = service.getAccents();
map.setElementAt("AE", 4);//$NON-NLS-1$
@@ -491,13 +493,15 @@ public final class MetadataToolHelper {
*/
public static void validateSchema(String value) {
if (value == null) {
MessageDialog.openError(Display.getCurrent().getActiveShell(),
Messages.getString("MetadataTool.nullValue"), Messages.getString("MetadataTool.nameNull")); //$NON-NLS-1$ //$NON-NLS-2$
MessageDialog
.openError(Display.getCurrent().getActiveShell(), Messages.getString("MetadataTool.nullValue"), //$NON-NLS-1$
Messages.getString("MetadataTool.nameNull")); //$NON-NLS-1$
return;
}
if (!isValidSchemaName(value)) {
MessageDialog.openError(Display.getCurrent().getActiveShell(),
Messages.getString("MetadataTool.invalid"), Messages.getString("MetadataTool.schemaInvalid")); //$NON-NLS-1$ //$NON-NLS-2$
MessageDialog
.openError(Display.getCurrent().getActiveShell(), Messages.getString("MetadataTool.invalid"), //$NON-NLS-1$
Messages.getString("MetadataTool.schemaInvalid")); //$NON-NLS-1$
return;
}
}
@@ -533,8 +537,9 @@ public final class MetadataToolHelper {
public static void checkSchema(Shell shell, KeyEvent event) {
if ((!Character.isIdentifierIgnorable(event.character)) && (event.character == ' ')) {
event.doit = false;
MessageDialog.openError(shell,
Messages.getString("MetadataTool.invalidChar"), Messages.getString("MetadataTool.errorMessage")); //$NON-NLS-1$ //$NON-NLS-2$
MessageDialog
.openError(shell, Messages.getString("MetadataTool.invalidChar"), //$NON-NLS-1$
Messages.getString("MetadataTool.errorMessage")); //$NON-NLS-1$
}
}
@@ -579,6 +584,11 @@ public final class MetadataToolHelper {
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
boolean avoidUsedColumnsFromInput) {
copyTable(source, target, targetDbms, avoidUsedColumnsFromInput, false);
}
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
boolean avoidUsedColumnsFromInput, boolean withCustoms) {
if (source == null || target == null) {
return;
}
@@ -598,10 +608,11 @@ public final class MetadataToolHelper {
List<IMetadataColumn> columnsTAdd = new ArrayList<IMetadataColumn>();
for (IMetadataColumn column : source.getListColumns(!avoidUsedColumnsFromInput)) {
IMetadataColumn targetColumn = target.getColumn(column.getLabel());
IMetadataColumn newTargetColumn = column.clone();
IMetadataColumn newTargetColumn = column.clone(withCustoms);
if (targetColumn == null) {
columnsTAdd.add(newTargetColumn);
newTargetColumn.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
newTargetColumn
.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
} else {
if (!targetColumn.isReadOnly()) {
target.getListColumns().remove(targetColumn);
@@ -615,6 +626,12 @@ public final class MetadataToolHelper {
target.sortCustomColumns();
target.setLabel(source.getLabel());
target.setOriginalColumns(source.getOriginalColumns());
// List<String> originalColumnsList = null;
// if (source.getOriginalColumns() != null) {
// originalColumnsList = new ArrayList<String>();
// originalColumnsList.addAll(source.getOriginalColumns());
// }
// target.setOriginalColumns(originalColumnsList);
Map<String, String> targetProperties = target.getAdditionalProperties();
Map<String, String> sourceProperties = source.getAdditionalProperties();
for (Entry<String, String> entry : sourceProperties.entrySet()) {
@@ -622,7 +639,8 @@ public final class MetadataToolHelper {
}
}
public static void copyTable(List<IMetadataColumn> sourceColumns, IMetadataTable target, List<IMetadataColumn> targetColumns) {
public static void copyTable(List<IMetadataColumn> sourceColumns, IMetadataTable target,
List<IMetadataColumn> targetColumns) {
if (sourceColumns == null || target == null || targetColumns == null) {
return;
}
@@ -644,7 +662,8 @@ public final class MetadataToolHelper {
IMetadataColumn newTargetColumn = column.clone();
if (targetColumn == null) {
columnsTAdd.add(newTargetColumn);
newTargetColumn.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
newTargetColumn
.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
} else {
if (!targetColumn.isReadOnly()) {
target.getListColumns().remove(targetColumn);
@@ -699,7 +718,8 @@ public final class MetadataToolHelper {
IMetadataColumn newTargetColumn = column.clone();
if (targetColumn == null) {
columnsTAdd.add(newTargetColumn);
newTargetColumn.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
newTargetColumn
.setReadOnly(target.isReadOnly() || readOnlycolumns.contains(newTargetColumn.getLabel()));
} else {
if (!targetColumn.isReadOnly()) {
target.getListColumns().remove(targetColumn);
@@ -745,9 +765,9 @@ public final class MetadataToolHelper {
}
Set<MetadataTable> tables = null;
IGenericWizardService wizardService = null;
if (!CommonsPlugin.isHeadless() && GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault()
.getService(IGenericWizardService.class);
if (!CommonsPlugin.isHeadless()
&& GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
}
if (wizardService != null && wizardService.isGenericConnection(connection)) {
List<MetadataTable> metadataTables = wizardService.getMetadataTables(connection);
@@ -773,7 +793,8 @@ public final class MetadataToolHelper {
* @param tableName
* @return
*/
public static MetadataTable getMetadataTableFromSAPFunction(String connectionId, String functionId, String tableName) {
public static MetadataTable getMetadataTableFromSAPFunction(String connectionId, String functionId,
String tableName) {
org.talend.core.model.metadata.builder.connection.Connection connection;
if (connectionId != null) {
connection = getConnectionFromRepository(connectionId);
@@ -845,7 +866,8 @@ public final class MetadataToolHelper {
return null;
}
public static org.talend.core.model.metadata.builder.connection.Connection getConnectionFromRepository(String metaRepositoryid) {
public static org.talend.core.model.metadata.builder.connection.Connection
getConnectionFromRepository(String metaRepositoryid) {
ConnectionItem connItem = getConnectionItemFromRepository(metaRepositoryid);
if (connItem != null) {
return connItem.getConnection();
@@ -911,9 +933,9 @@ public final class MetadataToolHelper {
// ////////////////////////////////////////////////////////////////////////////////////
// private static final String VALIDATE_PATTERN_NAME = "^[a-zA-Z_][a-zA-Z_0-9]*$"; //$NON-NLS-1$
// private static final String VALIDATE_PATTERN_NAME = "^[a-zA-Z_][a-zA-Z_0-9]*$"; //$NON-NLS-1$
// private static final String VALIDATE_PATTERN_SCHEMA_NAME = "^[a-zA-Z_0-9][a-zA-Z_0-9]*$"; //$NON-NLS-1$
// private static final String VALIDATE_PATTERN_SCHEMA_NAME = "^[a-zA-Z_0-9][a-zA-Z_0-9]*$"; //$NON-NLS-1$
public static List<ColumnNameChanged> getColumnNameChanged(IMetadataTable oldTable, IMetadataTable newTable) {
List<ColumnNameChanged> columnNameChanged = new ArrayList<ColumnNameChanged>();
@@ -944,8 +966,9 @@ public final class MetadataToolHelper {
IMetadataColumn clonedColumn = getColumn(newTable, originalColumn, oldIndex);
if (clonedColumn != null) {
if (!originalColumn.getLabel().equals(clonedColumn.getLabel())) {
columnNameChanged.add(new ColumnNameChangedExt(changedNode, originalColumn.getLabel(), clonedColumn
.getLabel()));
columnNameChanged
.add(new ColumnNameChangedExt(changedNode, originalColumn.getLabel(),
clonedColumn.getLabel()));
}
}
}
@@ -1094,8 +1117,8 @@ public final class MetadataToolHelper {
initilializeNewSchema(metadataTable, mappingParameter, param);
if (!param.getDefaultValues().isEmpty()) {
Schema schema = (Schema) param.getDefaultValues().get(0).getDefaultValue();
org.talend.core.model.metadata.builder.connection.MetadataTable defaultEmfTable = MetadataToolAvroHelper
.convertFromAvro(schema);
org.talend.core.model.metadata.builder.connection.MetadataTable defaultEmfTable =
MetadataToolAvroHelper.convertFromAvro(schema);
IMetadataTable defaultTable = MetadataToolHelper.convert(defaultEmfTable);
for (IMetadataColumn currentColumn : metadataTable.getListColumns()) {
IMetadataColumn defaultColumn = defaultTable.getColumn(currentColumn.getLabel());
@@ -1125,8 +1148,8 @@ public final class MetadataToolHelper {
Object schemaObj = properties.getValuedProperty(param.getName()).getValue();
if (schemaObj instanceof Schema) {
Schema schema = (Schema) schemaObj;
org.talend.core.model.metadata.builder.connection.MetadataTable emfTable = MetadataToolAvroHelper
.convertFromAvro(schema);
org.talend.core.model.metadata.builder.connection.MetadataTable emfTable =
MetadataToolAvroHelper.convertFromAvro(schema);
IMetadataTable newTable = MetadataToolHelper.convert(emfTable);
initilializeSchema(metadataTable, newTable, mappingParameter, node);
}
@@ -1286,8 +1309,8 @@ public final class MetadataToolHelper {
if (connection != null) {
IRepositoryViewObject lastVersion = null;
if (connection.getContextId() != null) {
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(
IRepositoryService.class);
IRepositoryService service =
GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
lastVersion = service.getProxyRepositoryFactory().getLastVersion(connection.getContextId());
}
if (lastVersion != null) {
@@ -1381,7 +1404,7 @@ public final class MetadataToolHelper {
}
public static IMetadataTable convert(MetadataTable old) {
ICoreService coreService = (ICoreService) GlobalServiceRegister.getDefault().getService(ICoreService.class);
ICoreService coreService = GlobalServiceRegister.getDefault().getService(ICoreService.class);
IMetadataTable result = new org.talend.core.model.metadata.MetadataTable();
result.setComment(old.getComment());
result.setId(old.getId());
@@ -1401,7 +1424,8 @@ public final class MetadataToolHelper {
}
for (Object o : old.getColumns()) {
org.talend.core.model.metadata.builder.connection.MetadataColumn column = (org.talend.core.model.metadata.builder.connection.MetadataColumn) o;
org.talend.core.model.metadata.builder.connection.MetadataColumn column =
(org.talend.core.model.metadata.builder.connection.MetadataColumn) o;
IMetadataColumn newColumn = new org.talend.core.model.metadata.MetadataColumn();
columns.add(newColumn);
newColumn.setComment(column.getComment());
@@ -1415,7 +1439,7 @@ public final class MetadataToolHelper {
}
newColumn.setLabel(label2);
newColumn.setPattern(column.getPattern());
if (column.getLength() < 0) {
newColumn.setLength(null);
} else {
@@ -1438,12 +1462,12 @@ public final class MetadataToolHelper {
newColumn.setCustom(Boolean.valueOf(tv.getValue()));
} else if (DiSchemaConstants.TALEND6_IS_READ_ONLY.equals(additionalTag)) {
newColumn.setReadOnly(Boolean.valueOf(tv.getValue()));
}else {
} else {
newColumn.getAdditionalField().put(additionalTag, tv.getValue());
}
}
}
newColumn.setNullable(column.isNullable());
if (column.getPrecision() < 0) {
newColumn.setPrecision(null);

View File

@@ -308,8 +308,19 @@ public abstract class AbstractNode implements INode {
return mapMerge.keySet().iterator().next().getSubProcessStartNode(withConditions);
}
}
if ((getCurrentActiveLinksNbInput(EConnectionType.MAIN) == 0)
&& !checkIfCurrentActiveLinksIsLookup()) {
if (getCurrentActiveLinksNbInput(EConnectionType.MAIN) == 0) {
IConnection aheadConnection = null;
for (IConnection inConnection : getIncomingConnections()) {
// refer to DataProcess.checkFlowRefLink() added RUN_AFTER for incoming connection
if (inConnection.isActivate()
&& inConnection.getLineStyle().getId() == EConnectionType.RUN_AFTER.getId()) {
aheadConnection = inConnection;
break;
}
}
if (aheadConnection != null) {
return aheadConnection.getSource().getDesignSubjobStartNode();
}
return this; // main branch here, so we got the correct sub
// process start.
}
@@ -348,27 +359,6 @@ public abstract class AbstractNode implements INode {
return nb;
}
private boolean checkIfCurrentActiveLinksIsLookup() {
boolean flag = false;
int input = 0;
for (IConnection inConnection : getIncomingConnections()) {
// refer to DataProcess.checkFlowRefLink() added RUN_AFTER for incoming connection
if (inConnection.isActivate() && inConnection.getLineStyle().getId() == EConnectionType.RUN_AFTER.getId()) {
input++;
}
}
// check if run_after is for lookup
if (input > 0) {
for (IConnection outConnection : getOutgoingConnections()) {
if (outConnection.isActivate() && outConnection.getLineStyle().getId() == EConnectionType.FLOW_REF.getId()) {
flag = true;
break;
}
}
}
return flag;
}
/*
* (non-Javadoc)
*

View File

@@ -115,6 +115,8 @@ public enum EParameterFieldType {
PATTERN_PROPERTY, // yyin, added TDQ-13437
UNIFIED_COMPONENTS,
LANGUAGE_CLOSED_LIST,
TACOKIT_INPUT_SCHEMA,
TACOKIT_GUESS_SCHEMA,

View File

@@ -1238,6 +1238,9 @@ public class RelationshipItemBuilder {
}
public void removeItemRelations(Relation relation, boolean save) {
if (!loaded) {
loadRelations();
}
Map<Relation, Set<Relation>> itemRelations = getCurrentProjectItemsRelations();
relation = findPossibleKeyObject(itemRelations.keySet(), relation);
if (itemRelations != null && itemRelations.containsKey(relation)) {

View File

@@ -79,6 +79,11 @@ public class ArtifactRepositoryBean implements Cloneable {
if (index > 0) {
nexusUrl = url.substring(0, index + ARTIFACT_MIDDLE_PATH.length());
repoId = StringUtilities.removeEndingString(url.substring(index + ARTIFACT_MIDDLE_PATH.length()), "/");
} else {
// can be non-default contextpath or root
String tempurl = StringUtilities.removeEndingString(url, "/");
repoId = tempurl.substring(tempurl.lastIndexOf("/") + 1);
nexusUrl = url.substring(0, url.indexOf(repoId));
}
}
return new String[] { nexusUrl, repoId };

View File

@@ -62,6 +62,8 @@ public interface TalendProcessArgumentConstant {
static final String ARG_LAUNCHER_NAME = "LAUNCHER_NAME";
static final String ARG_AVOID_BRANCH_NAME = "AVOID_BRANCH_NAME";
static final String CMD_ARG_STATS_PORT_PARAM = "stat_port";
static final String CMD_ARG_TRACE_PORT_PARAM = "trace_port";

View File

@@ -35,7 +35,7 @@ import org.talend.repository.model.IRepositoryService;
/**
* DOC ggu class global comment. Detailled comment
*/
public final class ProjectPreferenceManager {
public class ProjectPreferenceManager {
/**
* copied from EclipsePreferences.
@@ -61,11 +61,11 @@ public final class ProjectPreferenceManager {
static {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
runProcessService =
(IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
repositoryService =
(IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
}
}
@@ -109,7 +109,7 @@ public final class ProjectPreferenceManager {
}
}
private void init(IProject project, String fileName) {
protected void init(IProject project, String fileName) {
Assert.isNotNull(fileName);
Assert.isNotNull(project);
this.qualifier = fileName;
@@ -148,6 +148,7 @@ public final class ProjectPreferenceManager {
/**
* @deprecated because don't support the default value setting, so use store directly.
*/
@Deprecated
private IEclipsePreferences getQulifierPreference() {
return getProjectScope().getNode(getQualifier());
}

View File

@@ -44,7 +44,7 @@ public/* final */class BuildExportManager {
return instance;
}
IBuildExportDependenciesProvider[] getDependenciesProviders() {
public IBuildExportDependenciesProvider[] getDependenciesProviders() {
return reader.getDependenciesProviders();
}

View File

@@ -1,185 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2018 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.runtime.util;
import java.io.File;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.IVMInstall2;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
import org.talend.commons.utils.generation.JavaUtils;
/**
* created by nrousseau on Jun 13, 2015 Detailled comment
*
*/
public class JavaHomeUtil {
/**
* Initialize Java Home to the preferences if needed only.<br>
* This will take take first JDK8 if existing.<br>
* If not, take JDK7.<br>
* If no any JDK found, it will let eclipse set the default one.
*
* @throws CoreException
*/
public static void initializeJavaHome() throws CoreException {
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode("org.eclipse.jdt.launching"); //$NON-NLS-1$
String defaultVM = pref.get("org.eclipse.jdt.launching.PREF_DEFAULT_ENVIRONMENTS_XML", ""); //$NON-NLS-1$//$NON-NLS-2$
boolean needSetupJVM = false;
if (!"".equals(defaultVM)) { //$NON-NLS-1$
if (!isJDKSetup()) {
// current JVM is not a JDK, means need to change the current setup
needSetupJVM = true;
} else if (isSetJdkHomeVariable() && !getJDKHomeVariable().equals(getCurrentJavaHomeString())) {
needSetupJVM = true;
}
} else {
needSetupJVM = true;
}
if (needSetupJVM) {
IVMInstall currentVM = JavaRuntime.getDefaultVMInstall();
if (isSetJdkHomeVariable()) {
if (currentVM != null) {
File installLocation = new File(getJDKHomeVariable());
currentVM.setInstallLocation(installLocation);
currentVM.setName(installLocation.getName());
}
} else {
boolean jkd8 = installJDKForEnvironment("JavaSE-1.8");//$NON-NLS-1$
if (!jkd8) {
boolean jdk7 = installJDKForEnvironment("JavaSE-1.7"); //$NON-NLS-1$
if (!jdk7) {
if (isSetJavaHomeVariable()) {
if (currentVM != null) {
File installLocation = new File(getJavaHomeVariable());
currentVM.setInstallLocation(installLocation);
currentVM.setName(installLocation.getName());
}
}
}
}
}
}
}
/**
* Only for TUJ to setup JDK version
* Should invoke after initializeJavaHome()
*/
public static String getSpecifiedJavaVersion() {
if (isSetJdkHomeVariable()) {
IVMInstall currentVM = JavaRuntime.getDefaultVMInstall();
if (currentVM instanceof IVMInstall2) {
return JavaUtils.getCompilerCompliance((IVMInstall2) currentVM, null);
}
}
return null;
}
public static boolean isSetJdkHomeVariable() {
String jdkHomeValue = getJDKHomeVariable();
return jdkHomeValue != null && !"".equals(jdkHomeValue); //$NON-NLS-1$
}
public static String getJDKHomeVariable() {
String jdkHome = System.getProperty("jdk.home"); //$NON-NLS-1$
if (jdkHome == null || "".equals(jdkHome)) { //$NON-NLS-1$
jdkHome = getJDKHomeFromEclipseVm();
}
if (jdkHome == null || "".equals(jdkHome)) { //$NON-NLS-1$
jdkHome = System.getenv("JDK_HOME"); //$NON-NLS-1$
}
return jdkHome;
}
private static String getJDKHomeFromEclipseVm() {
String eclipseVm = System.getProperty("eclipse.vm"); //$NON-NLS-1$
if (eclipseVm != null && !"".equals(eclipseVm)) {
File javaexe = new File(eclipseVm);
if (javaexe.exists()) {
String jdk = getJDKPath(javaexe);
if (jdk != null && new File(jdk, "lib/tools.jar").exists()) {//$NON-NLS-1$
return jdk;
}
}
}
return null;
}
private static String getJDKPath(File file) {
if (file == null) {
return null;
}
if ("bin".equals(file.getName())) {//$NON-NLS-1$
return file.getParent();
} else {
return getJDKPath(file.getParentFile());
}
}
public static boolean isSetJavaHomeVariable() {
String javaHomeValue = getJavaHomeVariable();
return javaHomeValue != null && !"".equals(javaHomeValue); //$NON-NLS-1$
}
public static String getJavaHomeVariable() {
return System.getenv("JAVA_HOME"); //$NON-NLS-1$
}
public static boolean isJDKSetup() {
if (getCurrentJavaHomeFile() == null) {
return false;
}
return new File(getCurrentJavaHomeFile(), "lib/tools.jar").exists(); //$NON-NLS-1$
}
public static File getCurrentJavaHomeFile() {
IVMInstall currentVM = JavaRuntime.getDefaultVMInstall();
if (currentVM == null) {
return null;
}
return currentVM.getInstallLocation();
}
public static String getCurrentJavaHomeString() {
IVMInstall currentVM = JavaRuntime.getDefaultVMInstall();
if (currentVM == null) {
return null;
}
return currentVM.getInstallLocation().getAbsolutePath();
}
private static boolean installJDKForEnvironment(String environmentName) throws CoreException {
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment(environmentName);
for (IVMInstall install : environment.getCompatibleVMs()) {
if (new File(install.getInstallLocation(), "lib/tools.jar").exists()) {
// JDK found, install it !;
JavaRuntime.setDefaultVMInstall(install, new NullProgressMonitor());
return true;
}
}
return false;
}
}

View File

@@ -36,6 +36,7 @@ import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryEditorInput;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.repository.model.RepositoryNode;
@@ -131,5 +132,7 @@ public interface ITestContainerProviderService extends IService {
Set<ModuleNeeded> getAllJobTestcaseModules(ProcessItem item) throws PersistenceException;
public void deleteDataFiles(Object deleteObj);
public List<NodeType> getOriginalNodes(ProcessType process);
}

View File

@@ -29,7 +29,9 @@ Require-Bundle: org.apache.commons.lang,
org.eclipse.e4.ui.services,
org.eclipse.ui.workbench,
org.talend.themes.core,
ca.odell.glazedlists
ca.odell.glazedlists,
org.talend.core,
org.apache.commons.io
Import-Package: org.eclipse.jdt.internal.ui.workingsets
Export-Package: org.talend.core.ui,
org.talend.core.ui.actions,

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui</artifactId>

View File

@@ -613,3 +613,10 @@ WorkspaceDlg.browse.folder.title=Select a workspace folder
WorkspaceDlg.use.this.as.default.cb.message=&Use this workspace as the default and do not ask again
PerspectiveMenuManager.dummy=Dummy
PerspectiveMenuManager.perspectiveLabel=&Perspective
I18nPreferencePage.needRestart=Local Language(need restart)
I18nPreferencePage.translationInformation=Test translation with Babili (works only for current language,other language selection needs restart)
I18nPreferencePage.importBabili=Import Translation from Babili
I18nPreferencePage.restart=Restart
I18nPreferencePage.restartButton=Need to restart to take effect.
I18nPreferencePage.restoreDefault=Restore default
I18nPreferencePage.wait_process=Process will hold on several minutes, please wait...

View File

@@ -142,6 +142,8 @@ public class ContextTreeTable {
private final static int fixedTypeWidth = 90;
private final static int fixedHidePromptWidth = 1;
public ContextTreeTable(IContextModelManager manager) {
this.manager = manager;
}
@@ -320,7 +322,7 @@ public class ContextTreeTable {
GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
// add selection listener for the context NatTable
addNatTableListener(bodyDataProvider, selectionProvider, bodyDataLayer);
addNatTableListener(bodyDataProvider, selectionProvider);
GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
@@ -371,7 +373,7 @@ public class ContextTreeTable {
}
private void addNatTableListener(final GlazedListsDataProvider<ContextTreeNode> bodyDataProvider,
ISelectionProvider selectionProvider, DataLayer bodyDataLayer) {
ISelectionProvider selectionProvider) {
this.natTable.addMouseListener(new MouseListener() {
@Override
@@ -454,7 +456,8 @@ public class ContextTreeTable {
} else {
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2;
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2
- fixedHidePromptWidth;
int currentColumnsCount = dataColumnsCount - hideColumnsPos.size() - checkColumnsPos.size() - 1;
int averageWidth = leftWidth / currentColumnsCount;
@@ -469,7 +472,7 @@ public class ContextTreeTable {
for (int hidePos : hideColumnsPos) {
if (hidePos == i) {
findHide = true;
dataLayer.setColumnWidthByPosition(i, 0);
dataLayer.setColumnWidthByPosition(i, fixedHidePromptWidth);
}
}
for (int checkPos : checkColumnsPos) {

View File

@@ -52,10 +52,6 @@ public class ContextAutoResizeTextPainter extends TextPainter {
changeBackgroundColor = isChange;
}
@Override
protected boolean performRowResize(int contentHeight, Rectangle rectangle) {
return (contentHeight != rectangle.height) && (this.calculateByTextHeight);
}
@Override
protected void setNewMinLength(ILayerCell cell, int contentWidth) {

View File

@@ -725,6 +725,8 @@ public class MetadataDialog extends Dialog {
}
IDesignerCoreService designerCoreService = CoreUIPlugin.getDefault().getDesignerCoreService();
updateTableOriginalColumns(outputTable);
updateTableOriginalColumns(inputTable);
designerCoreService.setTraceFilterParameters(outputNode, outputTable, preOutputColumnSet, changedNameColumnsForOutput);
designerCoreService.setTraceFilterParameters(inputNode, inputTable, preInputColumnSet, changedNameColumnsForInput);
if (outputTable != null && inputTable != null) {
@@ -745,6 +747,16 @@ public class MetadataDialog extends Dialog {
}
}
}
private void updateTableOriginalColumns(IMetadataTable table) {
if (table != null && table.getListColumns() != null) {
List<String> columnNames = new ArrayList<String>();
for (IMetadataColumn column : table.getListColumns()) {
columnNames.add(column.getLabel());
}
table.setOriginalColumns(columnNames);
}
}
/**
* DOC wzhang Comment method "getPreColumnsSet".

View File

@@ -0,0 +1,652 @@
package org.talend.core.ui.preference;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.adaptor.EclipseStarter;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.utils.ZipFileUtils;
import org.talend.commons.ui.swt.advanced.dataeditor.LabelFieldEditor;
import org.talend.commons.ui.utils.workbench.preferences.OneLineComboFieldEditor;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.CorePlugin;
import org.talend.core.model.genhtml.FileCopyUtils;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.ui.i18n.Messages;
public abstract class I18nPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
private OneLineComboFieldEditor languageSelectionEditor;
private String fs = System.getProperties().getProperty("file.separator"); //$NON-NLS-1$
private List<FieldEditor> fields = new ArrayList<FieldEditor>();
private static Logger log = Logger.getLogger(I18nPreferencePage.class);
private static final Pattern VERSION_PATTERN = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(\\.(RC|M)\\d+)?_r\\d+"); //$NON-NLS-1$
private static final Pattern DEFAULT_PATTERN = Pattern.compile("(\\d+)\\.(\\d+)\\.*(\\d*)"); //$NON-NLS-1$
private boolean updateCompleted;
private boolean isBabiliButtonClicked = false;
/**
* Construct a new I18nPreferencePage.
*/
public I18nPreferencePage() {
super(GRID);
// Set the preference store for the preference page.
IPreferenceStore store = CorePlugin.getDefault().getPreferenceStore();
setPreferenceStore(store);
}
@Override
public void init(IWorkbench workbench) {
// nothing to do
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@Override
protected void createFieldEditors() {
// Adds a combo for language selection.
String spanish = "Espa\u00F1ol"; //$NON-NLS-1$
byte[] utf8Bytes;
try {
utf8Bytes = spanish.getBytes("UTF8"); //$NON-NLS-1$
spanish = new String(utf8Bytes, "UTF8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e1) {
// could be translated, but it's only in case of error when change UTF8 characters.
spanish = "Spanish"; //$NON-NLS-1$
}
String russian = "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"; //$NON-NLS-1$
try {
utf8Bytes = russian.getBytes("UTF8"); //$NON-NLS-1$
russian = new String(utf8Bytes, "UTF8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e1) {
// could be translated, but it's only in case of error when change UTF8 characters.
russian = "Russian"; //$NON-NLS-1$
}
String greek = "\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"; //$NON-NLS-1$
try {
utf8Bytes = greek.getBytes("UTF8"); //$NON-NLS-1$
greek = new String(utf8Bytes, "UTF8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e1) {
// could be translated, but it's only in case of error when change UTF8 characters.
greek = "Greek"; //$NON-NLS-1$
}
String arabic = "\u0627\u0644\u0639\u0631\u0628\u064a\u0647"; //$NON-NLS-1$
try {
utf8Bytes = arabic.getBytes("UTF8"); //$NON-NLS-1$
arabic = new String(utf8Bytes, "UTF8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e1) {
// could be translated, but it's only in case of error when change UTF8 characters.
arabic = "Arabic"; //$NON-NLS-1$
}
String serbian = "\u0421\u0440\u043f\u0441\u043a\u0438"; //$NON-NLS-1$
try {
utf8Bytes = serbian.getBytes("UTF8"); //$NON-NLS-1$
serbian = new String(utf8Bytes, "UTF8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e1) {
// could be translated, but it's only in case of error when change UTF8 characters.
serbian = "Serbian"; //$NON-NLS-1$
}
String[][] entryNamesAndValues =
{ { Locale.ENGLISH.getDisplayLanguage(Locale.ENGLISH), Locale.ENGLISH.getLanguage() },
{ Locale.FRENCH.getDisplayLanguage(Locale.FRENCH), Locale.FRENCH.getLanguage() },
{ Locale.CHINESE.getDisplayLanguage(Locale.CHINESE), "zh_CN" },
{ Locale.GERMAN.getDisplayLanguage(Locale.GERMAN), Locale.GERMAN.getLanguage() },
{ Locale.JAPANESE.getDisplayLanguage(Locale.JAPANESE), Locale.JAPANESE.getLanguage() },
{ Locale.ITALIAN.getDisplayLanguage(Locale.ITALIAN), Locale.ITALIAN.getLanguage() },
{ "Brasil", "pt_BR" }, //$NON-NLS-1$ //$NON-NLS-2$
{ spanish, "es" }, { russian, "ru" }, //$NON-NLS-1$ //$NON-NLS-2$
{ Locale.KOREA.getDisplayLanguage(Locale.KOREA), "kr" }, { "Turkish", "tr" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
{ greek, "el" }, { "Hrvatski", "hr" }, { arabic, "ar" }, { serbian, "sr" }, { "Polski", "pl" },
{ "Romanian", "ro" }, { "Netherlands", "nl" } }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
// // /$NON-NLS-7$
languageSelectionEditor = new OneLineComboFieldEditor(ITalendCorePrefConstants.LANGUAGE_SELECTOR,
Messages.getString("I18nPreferencePage.needRestart"), entryNamesAndValues, getFieldEditorParent()); //$NON-NLS-1$
addField(languageSelectionEditor);
Composite composite = getFieldEditorParent();
LabelFieldEditor importAll =
new LabelFieldEditor(Messages.getString("I18nPreferencePage.translationInformation"), //$NON-NLS-1$
composite);
addField(importAll);
Button allUpdate = new Button(composite, SWT.FLAT);
allUpdate.setText(Messages.getString("I18nPreferencePage.importBabili")); //$NON-NLS-1$
allUpdate.setLayoutData(new GridData());
allUpdate.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
// import all update from Babili
// select the .zip file
FileDialog fd =
new FileDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OPEN);
fd.setText("Open"); //$NON-NLS-1$
fd.setFilterPath("C:" + fs); //$NON-NLS-1$
String[] filterExtensions = { "*.zip" }; //$NON-NLS-1$
fd.setFilterExtensions(filterExtensions);
String selected = fd.open();
if (selected != null) {
isBabiliButtonClicked = true;
runProgressMonitorDialog(selected);
if (MessageDialog
.openConfirm(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
Messages.getString("I18nPreferencePage.restart"), //$NON-NLS-1$
Messages.getString("I18nPreferencePage.restartButton"))) {
PlatformUI.getWorkbench().restart();
}
}
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
});
// added by nma
Button restoredefault = new Button(composite, SWT.FLAT);
restoredefault.setText("Restore Defaults"); //$NON-NLS-1$
restoredefault.setLayoutData(new GridData());
restoredefault.addSelectionListener(new SelectionListener() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
@Override
public void widgetSelected(SelectionEvent e) {
isBabiliButtonClicked = true;
runProgressMonitorDialog(Messages.getString("I18nPreferencePage.restoreDefault")); //$NON-NLS-1$
if (MessageDialog
.openConfirm(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
Messages.getString("I18nPreferencePage.restart"),
Messages.getString("I18nPreferencePage.restartButton"))) {
PlatformUI.getWorkbench().restart();
}
}
});
}
private void applyBabiliResource(String zipFileName) {
String jarFolderPath = System.getProperty("user.dir") + fs + "jarTemp"; //$NON-NLS-1$ //$NON-NLS-2$
String zipFolderPath = System.getProperty("user.dir") + fs + "zipTemp"; //$NON-NLS-1$ //$NON-NLS-2$
File jarFolderPathFile = new File(jarFolderPath);
File zipFolderPathFile = new File(zipFolderPath);
if (!jarFolderPathFile.exists()) {
jarFolderPathFile.mkdir();
}
if (!zipFolderPathFile.exists()) {
zipFolderPathFile.mkdir();
}
String pluginPath = System.getProperty("user.dir") + fs + "plugins"; //$NON-NLS-1$ //$NON-NLS-2$
HashMap jarFileMap = new HashMap();
File file = new File(pluginPath);
if (file.isDirectory()) {
String[] fileNameList = file.list();
final int length = fileNameList.length;
File[] fileList = file.listFiles();
final int length2 = fileList.length;
for (File f : fileList) {
if (f.getName().startsWith("net.sourceforge.sqlexplorer.nl")) { //$NON-NLS-1$
jarFileMap.put("net.sourceforge.sqlexplorer.nl", f); //$NON-NLS-1$
}
if (f.getName().startsWith("org.talend.designer.components.localprovider")) { //$NON-NLS-1$
jarFileMap.put("org.talend.designer.components.localprovider", f); //$NON-NLS-1$
}
if (f.getName().startsWith("org.talend.designer.components.tdqprovider")) { //$NON-NLS-1$
jarFileMap.put("org.talend.designer.components.tdqprovider", f); //$NON-NLS-1$
}
if (f.getName().startsWith("org.talend.designer.components.tisprovider")) { //$NON-NLS-1$
jarFileMap.put("org.talend.designer.components.tisprovider", f); //$NON-NLS-1$
}
if (f.getName().startsWith("org.talend.designer.components.tispeprovider")) { //$NON-NLS-1$
jarFileMap.put("org.talend.designer.components.tispeprovider", f); //$NON-NLS-1$
}
if (f.getName().endsWith(".jar") && f.getName().indexOf("nl") != -1 //$NON-NLS-1$ //$NON-NLS-2$
&& f.getName().indexOf("talend") != -1) { //$NON-NLS-1$
String[] fileNameArr = f.getName().split("_"); //$NON-NLS-1$
jarFileMap.put(fileNameArr[0], f);
}
}
}
if (zipFileName.equals("Restore default")) { //$NON-NLS-1$
Iterator iter = jarFileMap.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey();
File currentFileToBak = (File) entry.getValue();
if (key.toString().endsWith(".nl") //$NON-NLS-1$
|| key.toString().startsWith("org.talend.designer.components.localprovider") //$NON-NLS-1$
|| key.toString().startsWith("org.talend.designer.components.tdqprovider") //$NON-NLS-1$
|| key.toString().startsWith("org.talend.designer.components.tisprovider") //$NON-NLS-1$
|| key.toString().startsWith("org.talend.designer.components.tispeprovider") //$NON-NLS-1$
|| key.toString().startsWith("net.sourceforge.sqlexplorer.nl")) { //$NON-NLS-1$
if (currentFileToBak.toString().endsWith(".jar")) { //$NON-NLS-1$
ZipFileUtils.unZip(currentFileToBak, jarFolderPath + fs + currentFileToBak.getName());
} else {
FileCopyUtils
.copyFolder(currentFileToBak.getAbsolutePath(),
jarFolderPath + fs + currentFileToBak.getName());
}
File jarFiles = new File(jarFolderPath + fs + currentFileToBak.getName());
File[] jarSubFiles = jarFiles.listFiles();
for (File subJarf : jarSubFiles) {
if (subJarf.isFile()) {
if (subJarf.getName().endsWith(".original")) { //$NON-NLS-1$
String subjarfPath = subJarf
.getAbsolutePath()
.substring(0, subJarf.getAbsolutePath().indexOf(".original")); //$NON-NLS-1$
File subjarfPathFile = new File(subjarfPath);
if (subjarfPathFile.exists()) {
subjarfPathFile.delete();
}
subJarf.renameTo(subjarfPathFile);
}
} else {
if (subJarf.getName().equals("components")) { //$NON-NLS-1$
File[] componentFiles = subJarf.listFiles();
for (File componentFile : componentFiles) {
if (componentFile.isDirectory()) {
File[] comFiles = componentFile.listFiles();
if (comFiles != null) {
for (File com : comFiles) {
if (com.isFile() && com.getName().endsWith(".original")) { //$NON-NLS-1$
String comPath = com
.getAbsolutePath()
.substring(0, com.getAbsolutePath().indexOf(".original")); //$NON-NLS-1$
File comPathFile = new File(comPath);
if (comPathFile.exists()) {
comPathFile.delete();
}
com.renameTo(comPathFile);
}
}
}
}
}
}
}
}
String writeJarFileName = jarFolderPath + fs + currentFileToBak.getName();
if (currentFileToBak.exists()) {
if (currentFileToBak.isDirectory()) {
try {
org.apache.commons.io.FileUtils.deleteDirectory(currentFileToBak);
} catch (IOException e) {
e.printStackTrace();
}
} else {
currentFileToBak.delete();
}
}
if (currentFileToBak.toString().endsWith(".jar")) { //$NON-NLS-1$
ZipFileUtils.zip(writeJarFileName, currentFileToBak.getAbsolutePath(), false);
} else {
FileCopyUtils.copyFolder(writeJarFileName, currentFileToBak.getAbsolutePath());
}
}
}
} else {
ZipFileUtils.unZip(zipFileName, zipFolderPath);
File zipFile = new File(zipFolderPath);
File[] zipFiles = zipFile.listFiles()[0].listFiles();
for (File f : zipFiles) {
if (f.getName().endsWith(".nl") //$NON-NLS-1$
|| f.getName().startsWith("org.talend.designer.components.localprovider") //$NON-NLS-1$
|| f.getName().startsWith("org.talend.designer.components.tdqprovider") //$NON-NLS-1$
|| f.getName().startsWith("org.talend.designer.components.tisprovider") //$NON-NLS-1$
|| f.getName().startsWith("org.talend.designer.components.tispeprovider") //$NON-NLS-1$
|| f.getName().startsWith("net.sourceforge.sqlexplorer.nl")) { //$NON-NLS-1$
File writeJarFile = (File) jarFileMap.get(f.getName());
if (writeJarFile == null) {
continue;
}
String jarFilePath = writeJarFile.getAbsolutePath();
// for bug 13620
if (writeJarFile.toString().endsWith(".jar")) {//$NON-NLS-1$
ZipFileUtils.unZip(writeJarFile, jarFolderPath + fs + writeJarFile.getName());
} else {
FileCopyUtils.copyFolder(jarFilePath, jarFolderPath + fs + writeJarFile.getName());
}
File[] zipSubFiles = f.listFiles();
File jarFiles = new File(jarFolderPath + fs + writeJarFile.getName());
File[] jarSubFiles = jarFiles.listFiles();
boolean flag = false;
boolean componentFlag = false;
for (File subJarf : jarSubFiles) {
if (subJarf.isFile()) {
if (subJarf.getName().endsWith(".original")) { //$NON-NLS-1$
flag = true;
break;
}
} // specific bug if .properties for components, since structure of babili resource is different
// with local plugin
else {
if (subJarf.getName().equals("components")) { //$NON-NLS-1$
File[] componentFiles = subJarf.listFiles();
if (componentFiles != null) {
for (File componentFile : componentFiles) {
if (componentFile.isDirectory()) {
File[] comFiles = componentFile.listFiles();
if (comFiles != null) {
for (File com : comFiles) {
if (com.getName().endsWith(".original")) { //$NON-NLS-1$
componentFlag = true;
break;
}
}
}
}
}
}
}
}
}
for (File subf : zipSubFiles) {
boolean subfNotExistBool = true;
for (File subJarf : jarSubFiles) {
if (subJarf.isDirectory() && subJarf.getName().equals("components")) { //$NON-NLS-1$
if (subf.getName().startsWith("t") && subf.getName().endsWith(".properties")) { //$NON-NLS-1$ //$NON-NLS-2$
File[] componentFiles = subJarf.listFiles();
for (File componentFile : componentFiles) {
if (componentFile
.getName()
.equals(subf.getName().substring(0, subf.getName().indexOf("_")))) { //$NON-NLS-1$
File[] comFiles = componentFile.listFiles();
if (comFiles != null) {
for (File com : comFiles) {
if (subf.getName().equals(com.getName())) {
transferFile(subf, com, componentFlag);
subfNotExistBool = false;
break;
}
}
}
}
}
}
} else {
if (subf.getName().equals(subJarf.getName())) {
transferFile(subf, subJarf, flag);
subfNotExistBool = false;
break;
}
}
}
}
String writeJarFileName = jarFolderPath + fs + writeJarFile.getName();
writeJarFile.delete();
if (writeJarFileName.endsWith(".jar")) {//$NON-NLS-1$
ZipFileUtils.zip(writeJarFileName, jarFilePath, false);
} else {
FileCopyUtils.copyFolder(writeJarFileName, jarFilePath);
}
}
}
}
updateCompleted = true;
try {
if (zipFolderPathFile.exists()) {
org.apache.commons.io.FileUtils.deleteDirectory(zipFolderPathFile);
}
if (jarFolderPathFile.exists()) {
org.apache.commons.io.FileUtils.deleteDirectory(jarFolderPathFile);
}
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
private void transferFile(File sourceFile, File targetFile, boolean changed) {
String targetPath = targetFile.getAbsolutePath();
File newTargetFile = new File(targetPath + ".original"); //$NON-NLS-1$
if (!newTargetFile.exists() && changed == false) {
targetFile.renameTo(newTargetFile);
}
transferStream(sourceFile, targetFile);
}
private void transferStream(File sourceFile, File targetFile) {
if (!sourceFile.exists()) {
return;
}
try {
FileChannel sourceChannel = new FileInputStream(sourceFile.getAbsoluteFile()).getChannel();
FileChannel targetChannel = new FileOutputStream(targetFile.getAbsoluteFile()).getChannel();
targetChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
sourceChannel.close();
targetChannel.close();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
*
* DOC wzhang Comment method "runProgressMonitorDialog".
*
* @param validated
*/
public void runProgressMonitorDialog(final String zipFileName) {
updateCompleted = false;
ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(getFieldEditorParent().getShell());
IRunnableWithProgress runnable = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) {
try {
monitor.beginTask(Messages.getString("I18nPreferencePage.wait_process"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
applyBabiliResource(zipFileName);
} catch (Exception e1) {
ExceptionHandler.process(e1);
} finally {
monitor.done();
}
}
};
try {
progressDialog.run(true, true, runnable);
} catch (InvocationTargetException e1) {
ExceptionHandler.process(e1);
} catch (InterruptedException e1) {
ExceptionHandler.process(e1);
}
if (updateCompleted) {
} else {
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
*/
@Override
public boolean performOk() {
boolean ok = super.performOk();
saveLanguageType();
CorePlugin.getDefault().savePluginPreferences();
if (isBabiliButtonClicked) {
refreshAll();
}
return ok;
}
abstract protected void refreshAll();
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.PreferencePage#performApply()
*/
@Override
protected void performApply() {
saveLanguageType();
CorePlugin.getDefault().savePluginPreferences();
}
/**
*
* DOC wzhang Comment method "saveLanguageType".
*/
private void saveLanguageType() {
FileInputStream fin = null;
FileOutputStream fout = null;
try {
URL url = Platform.getConfigurationLocation().getURL();
log(url.getFile());
Properties p = new Properties();
// load the file configuration/config.ini
File iniFile = new File(url.getFile(), "config.ini"); //$NON-NLS-1$
fin = new FileInputStream(iniFile);
p.load(fin);
String languageType = CorePlugin
.getDefault()
.getPluginPreferences()
.getString(ITalendCorePrefConstants.LANGUAGE_SELECTOR);
if (languageType.equals(p.getProperty(EclipseStarter.PROP_NL))) {
return;
}
p.setProperty(EclipseStarter.PROP_NL, languageType);
fout = new FileOutputStream(iniFile);
p.store(fout, "#Configuration File"); //$NON-NLS-1$
fout.flush();
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
if (fin != null) {
try {
fin.close();
} catch (Exception e) {
// do nothing
}
}
if (fout != null) {
try {
fout.close();
} catch (Exception e) {
// do nothing
}
}
}
}
/**
*
* DOC wzhang Comment method "getCurrentTosVersion".
*
* @param normalize
* @return
*/
public static String getCurrentTosVersion(boolean normalize) {
String version = VersionUtils.getVersion();
if (normalize) {
version = normalizeVersion(version);
}
return version;
}
/**
*
* DOC wzhang Comment method "normalizeVersion".
*
* @param version
* @return
*/
public static String normalizeVersion(String version) {
Matcher matcher = VERSION_PATTERN.matcher(version);
if (matcher.matches()) {
String str = version.substring(0, version.indexOf("_r")); //$NON-NLS-1$
return str.replaceAll("\\.RC", "RC").replaceAll("\\.M", "M"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} else {
// try again, ignore M, RC
matcher = DEFAULT_PATTERN.matcher(version);
matcher.find();
return matcher.group();
}
}
private void log(String s) {
log.log(Level.INFO, s);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#addField(org.eclipse.jface.preference.FieldEditor)
*/
@Override
protected void addField(FieldEditor editor) {
super.addField(editor);
fields.add(editor);
}
}

View File

@@ -72,10 +72,20 @@ public class JavaSimpleDateFormatProposalProvider implements IContentProposalPro
"\"dd/MM/yyyy\" : common format", "dd/MM/yyyy", "Date\n Examples : \n 01/01/2007\n 31/12/2007"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal(
"\"MM/dd/yyyy\" : common format", "MM/dd/yyyy", "Date\n Examples : \n 01/01/2007\n 12/31/2007"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal("\"yyyy-MM-dd'T'HH:mm:ss\" : common format", "yyyy-MM-dd'T'HH:mm:ss", //$NON-NLS-1$ //$NON-NLS-2$
new DateFormatContentProposal(
"\"yyyy-MM-dd\" : common format", "yyyy-MM-dd", "Date\n Examples : \n 2007-01-01\n 2007-12-31"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal("\"yyyy-MM-dd HH:mm:ss\" : common format", "yyyy-MM-dd HH:mm:ss",
"Date\n Examples : \n 2014-08-19 07:41:35\n 2014-12-31 07:41:35"),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal("\"yyyy-MM-dd'T'HH:mm:ss\" : common format", "yyyy-MM-dd'T'HH:mm:ss",
"Date\n Examples : \n 2007-01-01T00:00:00\n 2007-12-31T23:59:59"), // hywang //$NON-NLS-1$
new DateFormatContentProposal("\"yyyy-MM-dd'T'HH:mm:ss'000Z'\" : common format", "yyyy-MM-dd'T'HH:mm:ss'000Z'", //$NON-NLS-1$ //$NON-NLS-2$
"Date\n Examples : \n 2007-01-01T00:00:00000Z\n 2007-12-31T23:59:59000Z"), // hywang //$NON-NLS-1$
new DateFormatContentProposal("\"yyyy-MM-dd'T'HH:mm:ss.SSSSSS\" : common format", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
"Date\n Examples : \n 2019-04-18T09:47:49.568095"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal("\"yyyy-MM-dd HH:mm:ss zzz\" : common format", "yyyy-MM-dd HH:mm:ss zzz", //$NON-NLS-1$ //$NON-NLS-2$
"Date\n Examples : \n 2008-01-01 00:00:00 UTC\n 2008-12-31 04:08:00 PDT"),
new DateFormatContentProposal("\"yyyy-MM-dd HH:mm:ss.SSSXXX\" : common format", "yyyy-MM-dd HH:mm:ss.SSSXXX", //$NON-NLS-1$ //$NON-NLS-2$
"Date\n Examples : \n 2014-08-19 07:41:35.220 -05:00"),
new DateFormatContentProposal(
"\"HH:mm:ss\" : common format", "HH:mm:ss", "Date\n Examples : \n 00:00:00 \n 23:59:59"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new DateFormatContentProposal("\"yy\" : Year (00-99)", "yy", "Year \nExamples : \n 98\n 07"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

View File

@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.debug.core,
org.talend.core.repository,
org.talend.libraries.apache,
org.talend.core.runtime,
org.talend.utils
org.talend.utils,
org.talend.libraries.dom4j-jaxen
Bundle-Vendor: .Talend SA.
Export-Package: org.talend.core,
org.talend.core.branding,
@@ -53,6 +54,4 @@ Export-Package: org.talend.core,
org.talend.core.services.resource,
org.talend.core.views,
org.talend.designer.runprocess
Import-Package: org.apache.commons.collections4.map,
org.dom4j,
org.dom4j.io
Import-Package: org.apache.commons.collections4.map

View File

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

View File

@@ -15,10 +15,11 @@ package org.talend.core.services;
import java.util.Collection;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.general.Project;
@@ -47,4 +48,11 @@ public interface IGITProviderService extends IService {
void createOrUpdateGitIgnoreFile(IProject eclipseProject) throws CoreException;
public static IGITProviderService get() {
GlobalServiceRegister register = GlobalServiceRegister.getDefault();
if (!register.isServiceRegistered(IGITProviderService.class)) {
return null;
}
return register.getService(IGITProviderService.class);
}
}

View File

@@ -96,6 +96,7 @@ import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.core.runtime.repository.build.BuildExportManager;
import org.talend.core.service.IResourcesDependenciesService;
import org.talend.core.services.ICoreTisService;
import org.talend.core.services.ISVNProviderService;
import org.talend.core.ui.IJobletProviderService;
import org.talend.core.ui.ITestContainerProviderService;
@@ -167,6 +168,8 @@ public class ProcessorUtilities {
private static boolean isDebug = false;
private static JobInfo mainJobInfo;
public static void addOpenEditor(IEditorPart editor) {
openedEditors.add(editor);
}
@@ -435,6 +438,7 @@ public class ProcessorUtilities {
isMainJob = true;
codeModified = false;
mainJobInfo = jobInfo;
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
@@ -760,32 +764,26 @@ public class ProcessorUtilities {
}
}
out: for (INode node : (List<? extends INode>) currentProcess.getGeneratingNodes()) {
ICoreTisService service = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {
service = (ICoreTisService) GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
}
for (INode node : (List<? extends INode>) currentProcess.getGeneratingNodes()) {
if (node.getComponent() != null && node.getComponent().getComponentType() == EComponentType.GENERIC) {
// generic component, true always
return true;
}
// to check if node is db component , maybe need modification
boolean isDbNode = false;
for (IElementParameter param : (List<? extends IElementParameter>) node.getElementParameters()) {
if (EParameterFieldType.TEXT == param.getFieldType() && param.getValue() != null) {
if (("TYPE".equals(param.getName()) && !"".equals(param.getValue()))
|| ("FAMILY".equals(param.getName())
&& param.getValue().toString().startsWith("Database"))) {
isDbNode = true;
break;
}
}
}
if (isDbNode) {
for (IMetadataTable metadataTable : node.getMetadataList()) {
for (IMetadataColumn column : metadataTable.getListColumns()) {
if ("id_Dynamic".equals(column.getTalendType())) {
hasDynamicMetadata = true;
break out;
}
}
}
if (service != null && service.isSupportDynamicType(node)) {
IElementParameter mappingParam = node.getElementParameterFromField(EParameterFieldType.MAPPING_TYPE);
if (mappingParam != null) {
for (IMetadataTable metadataTable : node.getMetadataList()) {
for (IMetadataColumn column : metadataTable.getListColumns()) {
if ("id_Dynamic".equals(column.getTalendType())) {
return true;
}
}
}
}
}
}
return hasDynamicMetadata;
@@ -960,6 +958,7 @@ public class ProcessorUtilities {
if (jobInfo.getFatherJobInfo() == null) {
isMainJob = true;
codeModified = false;
mainJobInfo = jobInfo;
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
@@ -1627,10 +1626,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
JobInfo jobInfo = new JobInfo(processName, contextName, version);
IProcessor process = generateCode(jobInfo, contextName, statistics, trace, true, GENERATE_ALL_CHILDS, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return process;
}
@@ -1653,9 +1654,11 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor process = generateCode(jobInfo, contextName, statistics, trace, true, GENERATE_ALL_CHILDS, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return process;
}
@@ -1673,9 +1676,11 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor result = generateCode(jobInfo, contextName, statistics, trace, true, GENERATE_ALL_CHILDS, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return result;
}
@@ -1693,10 +1698,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor result =
generateCode(jobInfo, contextName, statistics, trace, needContext, GENERATE_ALL_CHILDS, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return result;
}
@@ -1723,9 +1730,11 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor result = generateCode(jobInfo, contextName, statistics, trace, needContext, option, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return result;
}
@@ -1746,9 +1755,11 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
result = generateCode(jobInfo, contextName, statistics, trace, true, GENERATE_ALL_CHILDS, monitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
}
return result;
}
@@ -1758,9 +1769,11 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor returnValue = generateCode(process, contextName, statistics, trace, false);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return returnValue;
}
@@ -1792,10 +1805,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, contextProperties,
GENERATE_ALL_CHILDS, new NullProgressMonitor());
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return genCode;
}
@@ -1804,10 +1819,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor returnValue =
generateCode(process, context, statistics, trace, properties, new NullProgressMonitor());
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return returnValue;
}
@@ -1839,10 +1856,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties,
GENERATE_ALL_CHILDS, progressMonitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return genCode;
}
@@ -1888,10 +1907,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor genCode = generateCode(processor, jobInfo, context.getName(), statistics, trace, properties,
GENERATE_ALL_CHILDS, progressMonitor);
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
TimeMeasure.end(timeMeasureGenerateCodesId);
// if active before, not disable and active still.
@@ -1918,10 +1939,12 @@ public class ProcessorUtilities {
jobList.clear();
esbJobs.clear();
hasLoopDependency = false;
mainJobInfo = null;
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties, option,
new NullProgressMonitor());
jobList.clear();
hasLoopDependency = false;
mainJobInfo = null;
return genCode;
}
@@ -2179,6 +2202,47 @@ public class ProcessorUtilities {
}
// trunjob component
EList<NodeType> nodes = ptype.getNode();
getSubjobInfo(nodes, ptype, parentJobInfo, jobInfos,firstChildOnly);
if (parentJobInfo.isTestContainer()
&& GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService =
(ITestContainerProviderService) GlobalServiceRegister.getDefault().getService(
ITestContainerProviderService.class);
if (testContainerService != null) {
getSubjobInfo(testContainerService.getOriginalNodes(ptype), ptype, parentJobInfo, jobInfos,firstChildOnly);
}
}
if (!parentJobInfo.isTestContainer() && !parentJobInfo.isJoblet()
&& GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService =
(ITestContainerProviderService) GlobalServiceRegister.getDefault().getService(
ITestContainerProviderService.class);
if (testContainerService != null) {
List<ProcessItem> testsItems =
testContainerService.getTestContainersByVersion(parentJobInfo.getProcessItem());
for (ProcessItem testItem : testsItems) {
ProcessType testProcess = testContainerService.getTestContainerProcess(testItem);
if (testItem.getProcess() == null) {
testItem.setProcess(testProcess);
}
if (testProcess == null) {
log.warn(Messages.getString("ProcessorUtilities.nullProcess")); //$NON-NLS-1$
continue;
}
JobInfo jobInfo = new JobInfo(testItem, testProcess.getDefaultContext());
jobInfo.setTestContainer(true);
jobInfos.add(jobInfo);
jobInfo.setFatherJobInfo(parentJobInfo);
}
}
}
return jobInfos;
}
private static Set<JobInfo> getSubjobInfo(List<NodeType> nodes, ProcessType ptype, JobInfo parentJobInfo, Set<JobInfo> jobInfos,
boolean firstChildOnly) {
String jobletPaletteType = null;
String frameWork = ptype.getFramework();
if (StringUtils.isBlank(frameWork)) {
@@ -2188,7 +2252,7 @@ public class ProcessorUtilities {
} else if (frameWork.equals(HadoopConstants.FRAMEWORK_SPARK_STREAMING)) {
jobletPaletteType = ComponentCategory.CATEGORY_4_SPARKSTREAMING.getName();
}
for (NodeType node : nodes) {
for (NodeType node : nodes) {
boolean activate = true;
// check if node is active at least.
for (Object o : node.getElementParameter()) {
@@ -2286,31 +2350,7 @@ public class ProcessorUtilities {
}
}
}
if (!parentJobInfo.isTestContainer() && !parentJobInfo.isJoblet()
&& GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService =
(ITestContainerProviderService) GlobalServiceRegister.getDefault().getService(
ITestContainerProviderService.class);
if (testContainerService != null) {
List<ProcessItem> testsItems =
testContainerService.getTestContainersByVersion(parentJobInfo.getProcessItem());
for (ProcessItem testItem : testsItems) {
ProcessType testProcess = testContainerService.getTestContainerProcess(testItem);
if (testItem.getProcess() == null) {
testItem.setProcess(testProcess);
}
if (testProcess == null) {
log.warn(Messages.getString("ProcessorUtilities.nullProcess")); //$NON-NLS-1$
continue;
}
JobInfo jobInfo = new JobInfo(testItem, testProcess.getDefaultContext());
jobInfo.setTestContainer(true);
jobInfos.add(jobInfo);
jobInfo.setFatherJobInfo(parentJobInfo);
}
}
}
return jobInfos;
return jobInfos;
}
private static boolean isRouteletNode(NodeType node) {
@@ -2468,6 +2508,15 @@ public class ProcessorUtilities {
return hasLoopDependency;
}
/**
* Getter for mainJobInfo. <font color="red">Need to check null</font>
*
* @return the mainJobInfo
*/
public static JobInfo getMainJobInfo() {
return mainJobInfo;
}
/**
* The dynamic loading of the hadoop configuration library is supported in DI, MapReduce and Spark (batch and
* streaming).

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.editor</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M4</version>
<version>7.2.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.datatools.xml</artifactId>

View File

@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/commons-codec.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpclient.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpcore.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-connector-basic.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-impl.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-spi.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-classpath.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-file.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-http.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-wagon.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-util.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-utils.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wagon-provider-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-aether-provider-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-builder-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-repository-metadata-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-interpolation-1.19.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.17.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/commons-codec.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpclient.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpcore.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-connector-basic.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-impl.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-spi.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-classpath.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-file.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-http.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-transport-wagon.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-resolver-util.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-utils.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wagon-provider-api.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-aether-provider-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-builder-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-repository-metadata-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-interpolation-1.19.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.17.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -6,7 +6,9 @@ Bundle-Version: 7.2.1.qualifier
Bundle-Activator: org.talend.designer.maven.aether.Activator
Require-Bundle: org.eclipse.core.runtime,
org.talend.libraries.jackson,
org.talend.core.runtime
org.talend.core.runtime,
org.eclipse.m2e.core,
org.eclipse.m2e.maven.runtime
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/maven-aether-provider-3.2.1.jar,

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