Compare commits

...

102 Commits

Author SHA1 Message Date
bhe-talendbj
af12554a48 fix(APPINT-33200): add commons-io-2.8.0 to maven-jar-plugin 2021-06-10 12:03:28 +08:00
chmyga
a6810bf733 chore(TDI-46267): bump connectors to 1.23.0-SNAPSHOT (#4364)
Co-authored-by: Dmytro Chmyga <dmytro.chmyga@globallogic.com>
2021-06-09 14:13:34 +03:00
Xilai Dai
84f6219d5f APPINT-32986 update the pom_project_template.xml (#4361) 2021-06-09 18:23:07 +08:00
Chao MENG
42f187c8e2 fix(TUP-31796): Pictures in welcom page are missing (#4360)
https://jira.talendforge.org/browse/TUP-31796
2021-06-09 16:31:30 +08:00
sbliu
1560e256dc feat(TUP-30489) add progress bar to indicate install patch. (#4347) 2021-06-08 14:46:03 +08:00
sbliu
59207f8232 fix(TUP-31252) Improve the data collector for AMC. (#4350) 2021-06-08 14:25:49 +08:00
Xilai Dai
82966f5ba8 chore(APPINT-32986) upgrade commons-io to 2.8.0 (#4345) 2021-06-07 18:01:47 +08:00
bhe-talendbj
03cdc22509 fix(TUP-31729): add missing com.fasterxml.jackson:jackon-bom:2.10.0:pom and com.fasterxml.jackson:oss-parent:38:pom (#4348) 2021-06-07 17:26:03 +08:00
Emmanuel GALLOIS
43fc091be8 feat(TDI-46215): bump component-runtime to 1.33.1 (#4338) 2021-06-07 09:44:44 +02:00
bhe-talendbj
4c41c51472 fix(TUP-31580): execlude other dependencies (#4352) 2021-06-07 15:11:58 +08:00
bhe-talendbj
c226736a04 fix(TUP-31580): replace javascriptengine (#4334) (#4344)
* fix(TUP-31580): replace javascriptengine

* fix(TUP-31580): fix test case

* fix(TUP-31580): fix test case
2021-06-04 09:58:22 +08:00
sbliu
79da2594c0 feat(TUP-30834) remove extra tag. (#4343) 2021-06-03 12:20:59 +08:00
sbliu
13f057c49e feat(TUP-30834) fix unit test failure introduced by api change. (#4341) 2021-06-03 10:55:59 +08:00
sbliu
32e8d6357d feat(TUP-30834) add 2 axis2 module to classpath and export package. (#4317)
add 2 axis2 module to classpath and export package.
replace axis1 with axis2 for S56MDMConnetionHelper
remove salesforce code&dependency from tup, adpt the 'create salesforce connection' toolbar action to generic salesforce connection creation action.
2021-06-03 10:34:04 +08:00
zshen-talend
b267b0dc76 fix(TDQ-19437): tDqReportRun failed when dbconneciton is context mode (#4316) 2021-06-02 07:27:40 +00:00
bhe-talendbj
b51103d01b chore(TUP-31095): Use prepareStatement instead of plain sql execution (#4248) (#4331)
* fix(TUP-31095): initial impl

* fix(TUP-31095): initial impl

* chore(TUP-31095): use prepared statement

* chore(TUP-31095): fix param index

* fix(TUP-31095): fix parameter index
2021-06-01 15:13:32 +08:00
jiezhang-tlnd
ccdbc33869 fix(TUP-31527)CVE lucene-queries (#4295)
* fix(TUP-31527)CVE lucene-queries

* CVE: lucene-queries:4.10.4

* CVE: lucene-queries:4.10.4

* remove plugin org.talend.libraries.apache.lucene4

* remove plugin org.talend.libraries.apache.lucene4

* remove org.talend.libraries.apache.lucene4
2021-05-31 17:14:09 +08:00
hcyi
8560039492 fix(TUP-31553):Hadoop Metadata Wizard when using custom distro dialog (#4307)
box doesnt pop up to import dependencies.
2021-05-28 14:37:21 +08:00
Jane Ding
5fbdc38ebf fix(TUP-31316):Error connecting to Azure SQL database with Azure Active (#4271) (#4319)
* fix(TUP-31316):Error connecting to Azure SQL database with Azure Active
directory method
https://jira.talendforge.org/browse/TUP-31316

* fix(TUP-31316):Error connecting to Azure SQL database with Azure Active
directory method
https://jira.talendforge.org/browse/TUP-31316
2021-05-26 17:46:49 +08:00
zyuan-talend
93be98ff85 feat(TUP-30343):have the "Export Dependencies" option checked by default (#4312) (#4314) 2021-05-26 14:32:56 +08:00
bhe-talendbj
b5f39fba54 fix(TUP-31380): port (#4306) 2021-05-26 10:56:49 +08:00
bhe-talendbj
e18b7dfbf5 fix(TUP-31473): add missing parent poms (#4298) 2021-05-26 10:55:57 +08:00
Jane Ding
280be6425f fix(TUP-30849):Improve build Job performance (#4310)
https://jira.talendforge.org/browse/TUP-30849
2021-05-25 18:43:43 +08:00
Jane Ding
ef22ca920f feat(TUP-31117):Improve performances related to recursive jobs (#4292)
* feat(TUP-31117):Improve performances related to recursive jobs
https://jira.talendforge.org/browse/TUP-31117

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

* feat(TUP-31117):Improve performances related to recursive jobs
https://jira.talendforge.org/browse/TUP-31117
2021-05-25 17:43:00 +08:00
jiezhang-tlnd
7b1d49ae69 fix(TUP-31164)Guess schema button on the informix tDBinput component (#4308)
returns zero length datatype
https://jira.talendforge.org/browse/TUP-31164
2021-05-25 15:21:41 +08:00
jiezhang-tlnd
03de72105c chore(TUP-30461)CVE plexus-utils (#4272)
* chore(TUP-30461)CVE plexus-utils

* remove plexus-utils-3.0.17

* remove from classpatch
2021-05-24 15:53:00 +08:00
hcyi
c1398000c1 feat(TUP-30619):Missing Additional parameters in SAP Connection. (#4285)
* feat(TUP-30619):Missing Additional parameters in SAP Connection.

* feat(TUP-30619):update key for Additional parameters in SAP Connection.
2021-05-24 09:52:01 +08:00
kjwang
454d6ecd84 Kjwang/fix tup 31227 studio populate unstaged changes (#4277) (#4302)
TUP-31227 Studio populate UnstagedChanges for Global Routines and SQL
Templates when opening a new Feature Branch
https://jira.talendforge.org/browse/TUP-31227
2021-05-21 14:27:41 +08:00
Chao MENG
7b5f7b3935 feat(TUP-30475): studio lite (#4299)
https://jira.talendforge.org/browse/TUP-30475

Add missing org.talend.migrationTool.nl
2021-05-19 15:33:33 +02:00
Chao MENG
0a1ebc33ac feat(TUP-30475): studio lite (#4286)
https://jira.talendforge.org/browse/TUP-30475
2021-05-18 14:43:36 +08:00
vdrokov
5271d9bdb8 APPINT-32987: Fix dublicate variable (#4279) 2021-05-13 12:08:56 +03:00
sbliu
7b484be397 fix(TUP-31060): store real routine id in case recreated routine with same name. 2021-05-13 10:57:32 +08:00
Jane Ding
895635738f chore(APPINT-32936):CVE:Upgrade commons-codec-1.11 to 1.15 (#4260)
https://jira.talendforge.org/browse/APPINT-32936
2021-05-12 13:59:45 +08:00
hzhao-talendbj
e53ee0fe2e chore(TUP-30255): Upgrade httpclient-4.5.5,4.5.7 to 4.5.13 (#4237) 2021-05-10 18:13:47 +08:00
Denis Sergent
562018e483 Revert "APPINT-32905: Issue with Rest service flow (#4264)" (#4275)
This reverts commit 5f1c19871c.
2021-05-10 11:47:43 +02:00
Jane Ding
03f01de063 fix(TUP-31237):Invalid username or password when creating a Snowflake (#4232) (#4273)
* fix(TUP-31237):Invalid username or password when creating a Snowflake
Metadata Connection with a Snowflake password that has a slash character
https://jira.talendforge.org/browse/TUP-31237

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

* chore(TUP-31030):Update CXF to 3.3.10
https://jira.talendforge.org/browse/TUP-31030
2021-05-10 09:46:42 +08:00
mbasiuk-talend
a38c309608 chore(TDI-46032): bump connectors version to 1.22.0-SNAPSHOT (#4270) 2021-05-08 17:09:13 +08:00
hzhao-talendbj
0eddc3b1b9 fix(TUP-31248):impala metadata connection issues for Cloudera (#4246) (#4252)
* fix(TUP-31248):impala metadata connection issues for Cloudera

* TUP-31248 revert mistake remove

* TUP-31248 remove some useless code

* TUP-31248 add connection info to log when connection failed
2021-05-07 15:46:08 +08:00
kjwang
afe5d2e74b Feat:TUP-30377 Move the "Allow specific characters (UTF8,...)" (#4238) (#4266)
Feat:TUP-30377 Move the "Allow specific characters (UTF8,...) preference
setting to project setting.
https://jira.talendforge.org/browse/TUP-30377
2021-05-06 17:22:35 +08:00
jiezhang-tlnd
c3277931c1 fix(TUP-30451)CVE: (#4256)
maven-shared-utils-3.0.0.jar,maven-shared-utils-3.0.1.jar,maven-shared-utils-3.1.0.jar
2021-05-06 11:01:46 +08:00
vdrokov
5f1c19871c APPINT-32905: Issue with Rest service flow (#4264) 2021-05-05 17:28:43 +03:00
kjwang
0c25678af9 Revert the commit of TUP-31096 to test tuj (#4255)
Co-authored-by: kjwang <kjwang@LT-B1Z2R73.talend.com>
2021-04-30 10:21:37 +08:00
jiezhang-tlnd
52339da247 fix(TUP-29866)CVE on maven-shared-utils-3.2.1.jar (#4230)
* fix(TUP-29866)CVE on maven-shared-utils-3.2.1.jar

* remove maven-shared-utils:jar:3.0.0

* exclude maven-shared-utils 3.2.1

* fix run job

* update m2

* exclude maven-shared-utils:jar:3.1.0
2021-04-29 14:27:50 +08:00
Jane Ding
d25966f7ca fix(TUP-31234):Build job fail with option "Execute tests" if any test (#4244) (#4251)
case fail
https://jira.talendforge.org/browse/TUP-31234
2021-04-28 18:04:59 +08:00
kjwang
3268b36046 Fix TUP-31096 Could not find or load main class error on the jobs (#4245) (#4250)
Fix TUP-31096 Could not find or load main class error on the jobs created on the Feature Branch which has #
https://jira.talendforge.org/browse/TUP-31096
2021-04-28 16:32:52 +08:00
hzhao-talendbj
f11cc1d442 fix(TUP-30524): Commandline login svn project tag fail (#4228) (#4249) 2021-04-28 12:10:19 +08:00
hzhao-talendbj
1352dd1657 chore(TUP-31155): change the way to check if it's CI mode (#4240) 2021-04-28 11:55:46 +08:00
jiezhang-tlnd
bf8573f1ff fix(TUP-30945)CVE: xstream-1.4.15.jar (#4243) 2021-04-25 14:13:26 +08:00
sbliu
491f07624b feat(TUP-30846) Unify studio version information & patch info in studio logs. 2021-04-25 10:57:11 +08:00
Xilai Dai
4666d74567 chore(APPINT-32624) upgrade xstream in maven-bundle-plugin-5-1-1 (#4236) 2021-04-23 14:49:27 +08:00
ypiel
13193d142c chore: bump to tck:1.32.0 2021-04-22 12:13:43 +02:00
bhe-talendbj
3fbfd1c490 Revert "chore(TUP-30992): revert unncessary changes (#4224)" (#4235)
This reverts commit 6ebf18bb43.
2021-04-22 11:07:20 +08:00
Jane Ding
c9a27e2f06 feat(TUP-30730):Remove SAS from metadata wizard. (#4229)
https://jira.talendforge.org/browse/TUP-30730
2021-04-21 19:39:16 +08:00
bhe-talendbj
6ebf18bb43 chore(TUP-30992): revert unncessary changes (#4224) 2021-04-20 16:27:12 +08:00
bhe-talendbj
1f8e1d768b chore(TUP-30992): remove junit-4.12 (#4218)
* chore(TUP-30992): remove junit-4.12

* chore(TUP-30992): fix junit
2021-04-19 14:18:04 +08:00
Zhiwei Xue
d3b47d3db1 fix(TUP-30187):rename maven property (#4217) 2021-04-16 15:36:38 +08:00
jiezhang-tlnd
cef1fdd721 fix(TUP-30992)force to use the 4.13.2 (#4195) 2021-04-15 16:14:50 +08:00
hzhao-talendbj
222764d85c fix(TUP-30921):Job fails with "Could not find the context Default" after (#4209)
migration 7.2.1 to 7.3.1 R2021-01
2021-04-15 15:13:36 +08:00
bhe-talendbj
fb257c0e5a bugfix(TUP-30203): Performance issue when logon project / switch branch (#4205)
* fix(TUP-30360): add an option to disable sharing libraries (#4089)

* bugfix(TUP-26346) backport (#3515)

* fix(TUP-24953): Kjwang/fix tup 24953 nexus 3 gets populated by crypto utils.jar (#2883) (#2908)

* Fix TUP-24953 Nexus 3 gets populated by crypto-utils.jar
https://jira.talendforge.org/browse/TUP-24953

* TUP-24953 Nexus 3 gets populated by crypto-utils.jar
https://jira.talendforge.org/browse/TUP-24953

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/Nexus3RepositoryHandler.java

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/ILibraryManagerService.java
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/routines/RoutineLibraryMananger.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/maven/ShareLibrareisHelper.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/ArtifacoryRepositoryHandler.java

* fix(TUP-25929):Studio re synchronizing jars with artifact repository
every time when logged into studio

* fix(TUP-23519): spark job can't run success when I select EMR58 as (#2534)

distribution
https://jira.talendforge.org/browse/TUP-23519

Conflicts:
	main/plugins/org.talend.designer.maven/src/main/java/org/talend/designer/maven/utils/PomUtil.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* fix(TUP-26346): Files from custom component folders are uploaded to nexus (#3145)

multiple times (#3125)

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* fix(TUP-26346): Add debug logs

* fix(TUP-26687): backport

* fix(TUP-26346): Add log message

* fix(TUP-26346): remove unused log message

* fix(TUP-26110):Jar missing when install user component. (#3073)

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* Fix TUP-26346 Files from custom component folders are uploaded to nexus (#3145)

multiple times (#3125)

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

* Fix TUP-26346 Files from custom component folders are uploaded to
nexus
multiple times
https://jira.talendforge.org/browse/TUP-26346

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* fix(TUP-26810)if one jar used by two different components, it will (#… (#3465)

* fix(TUP-26810)if one jar used by two different components, it will (#3228)

fix(TUP-26810)if one jar used by two different components, it will upload to nexus with two versions

* TPS-4193  modify code mistake

* test github not pushed

* tps-4193

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/maven/ShareLibrareisHelper.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* TUP-26308 Nexus 2 gets populated by different crypto-utils jar versions (#3122)

(#3116)

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

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/Nexus2RepositoryHandler.java

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/maven/ShareLibrareisHelper.java

* fix(/TUP-26346): revert TUP-23519

* fix(TUP-26346): Fix switch nexus search hanlder

* fix(TUP-26346): deploy lib as release

* fix(TUP-26346): set release version for user cmodule

* fix(TUP-26346): set release version for module

Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: Zhiwei Xue <zwxue@talend.com>
Co-authored-by: Chao MENG <cmeng@talend.com>
Co-authored-by: wchen-talend <wchen@talend.com>
Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/ILibraryManagerService.java
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/general/ModuleNeeded.java
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/routines/RoutineLibraryMananger.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/maven/ShareLibrareisHelper.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/ArtifacoryRepositoryHandler.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/Nexus3RepositoryHandler.java

* fix(TUP-30360): add an option to disable sharing libraries (#4040) (#4058)

* fix(TUP-30360): add an option to disable sharing libraries (#4040)

* fix(TUP-30360): add an option to disable sharing libraries

* fix(TUP-30360): add new preference to disable sharing libs at startup

* fix(TUP-30360): update log message

* fix(TUP-30360): install libfile

Conflicts:
	main/plugins/org.talend.commons.runtime/src/org/talend/commons/utils/network/NetworkUtil.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* fix(TUP-30360): fix sharing user components

* fix(TUP-30360): fix sharing jars

* fix(TUP-30360): fix sharing components

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/routines/RoutineLibraryMananger.java
	main/plugins/org.talend.librariesmanager.ui/src/main/java/org/talend/librariesmanager/ui/startup/ShareLibsSynchronizer.java
	main/plugins/org.talend.librariesmanager.ui/src/main/java/org/talend/librariesmanager/ui/startup/ShareMavenArtifactsOnStartup.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/maven/ShareLibrareisHelper.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/ArtifacoryRepositoryHandler.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/Nexus3RepositoryHandler.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/utils/ShareLibrariesUtil.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/prefs/LibrariesManagerUtils.java

* bugfix(TUP-30203): Search required groups only (#4174)

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

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

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

* fix(TUP-30203): exclude class file

* fix(TUP-30203): exclude class file

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

* fix(TUP-30203): add i18n

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java

* fix(TUP-30203): remove unncessary changes
2021-04-15 14:51:51 +08:00
hcyi
1d54b23c20 feat(TUP-30291):Add Suggestable support for Table options (List<Row> (#4199) 2021-04-15 12:04:45 +08:00
Zhiwei Xue
70df8da35f fix(TUP-30586):Routine/Bean custom jars dependency management issues left todo (#4206)
* fix(TUP-30782):Fail to run job if use a custom routine jar without inner
jar.

* fix(TUP-30791): fix test case run failure
2021-04-14 16:54:15 +08:00
hcyi
e60f193fe3 fix(TUP-27518):The download modules dialog take long time to list all jars avialable (#3780)
* fix(TUP-27518):The download modules dialog take long time to list all
jars avialable

* fix(TUP-27518):The download modules dialog take long time to list all
jars avialable
2021-04-14 11:12:37 +08:00
hzhao-talendbj
839e2f935c fix(TUP-30429): the job export from v6.5.1 can't be imported to v7.3.1 (#4180) (#4200) 2021-04-14 10:59:14 +08:00
mbasiuk-talend
930d119a0e chore(TDI-45894): prepare the next connectors iteration (#4191) 2021-04-13 13:33:52 +03:00
Jane Ding
c4a36bd77d Jding/tup 30849 improve build job performance (#4197) (#4198)
* fix(TUP-30849):Improve build Job performance
https://jira.talendforge.org/browse/TUP-30849



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

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

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

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

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

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

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

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

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

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

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

Conflicts:
	main/plugins/org.talend.core/src/main/java/org/talend/designer/runprocess/ProcessorUtilities.java
	test/plugins/org.talend.core.test/src/org/talend/designer/runprocess/ProcessorUtilitiesTest.java
2021-04-13 18:00:57 +08:00
jiezhang-tlnd
fd44bfb0ee feat(TUP-30381)Support greenplum driver for Greenplum Database in studio (#4196)
(#4138)

* feat(TUP-30381)Support greenplum driver for Greenplum Database in
studio
metadata
https://jira.talendforge.org/browse/TUP-30381

* add dbversion for greeenplu

* add dbversion

* update mapping_greenplum file

* update greenplum_mapping

* update greenplum mapping

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/EDatabase4DriverClassName.java
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/conn/template/EDatabaseConnTemplate.java
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/conn/version/EDatabaseVersion4Drivers.java
2021-04-13 16:46:07 +08:00
hzhao-talendbj
065b59df2c chore(TUP-30942): upgrade to httpclient-4.5.13.jar (#4192) 2021-04-13 11:30:40 +08:00
sbliu
c938a2edea feat(TUP-30953) record install additional packages. 2021-04-13 11:09:22 +08:00
Zhiwei Xue
04be4c0113 fix(TUP-30786):Avoid to click finish button more than once when do (#4185)
create custom routine jar/bean jar.
2021-04-08 18:43:32 +08:00
sbliu
cfd6efdb67 fix(TUP-30768): Can't reset performance_record if first patch use manual installation then the second use Software update 2021-04-08 17:28:01 +08:00
Xilai Dai
31e3ed4a36 chore(APPINT-32718) override httpclient in karaf-maven-plugin (#4183) 2021-04-08 16:24:55 +08:00
hzhao-talendbj
d58f6c2c6c chore(TUP-30942): upgrade httpclient to 4.5.13 (#4187) 2021-04-08 15:56:01 +08:00
pyzhou
4f81538e7b fix(TDI-45881):Update jackson mapper (#4186) 2021-04-08 15:27:07 +08:00
nrousseau
7a770d7cbf feat(TUP-30475): Test of lite studio (#4064)
* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

* Revert "feat(TUP-30475): Test of lite studio"

This reverts commit 5cd76c561e.

* Revert "feat(TUP-30475): Test of lite studio"

This reverts commit 90c877dd9d.

* Revert "feat(TUP-30475): Test of lite studio"

This reverts commit 883ad0cf5d.

* feat(TUP-30475): Test of lite studio

* feat(TUP-30475): Test of lite studio

Co-authored-by: Chao MENG <cmeng@talend.com>
2021-04-08 14:25:09 +08:00
hzhao-talendbj
2b84fe712c feat(TUP-30347): Remove the usage of ATL / EMF migration system (#4125)
* feat(TUP-30347) remove alt

* tup-30347 remove from pom

* TUP-30347 remove from feature

* TUP-30347 remove from feature

* TUP-30347
remove migration task

* feat(TUP-30347): remove atl from feature
2021-04-08 11:58:24 +08:00
bhe-talendbj
737a8d3a16 feat(TUP-30047): port TUP-30047 (#4169) 2021-04-07 16:45:22 +08:00
Zhiwei Xue
90a94da3c4 fix(TUP-30187):CI: Add options to disable compile error of (#4176)
routines/beans/codejars pom
2021-04-07 09:46:58 +08:00
vdrokov
2db5862dfd TESB-32416: Importing route from a zip file, imports all the other jobs (Clone TESB-32400) (#4149) 2021-04-06 14:59:56 +02:00
Zhiwei Xue
420b3c91f4 fix(TUP-30780):Only check used custom jars when run/build Job (#4175) 2021-04-06 15:53:07 +08:00
msjian
1185673fb0 fix(TDQ-19030): fix complier error (#4171) 2021-04-06 14:14:36 +08:00
Zhiwei Xue
0b1297e2ae fix(TUP-30977):test run map using custom routines and beans doesn't work (#4160)
after switch branch
2021-04-06 12:06:22 +08:00
bhe-talendbj
18a0a1bd6c fix(TUP-26813): remove unused dependency (#4052)
* fix(TUP-26813): remove unused dependency

* fix(TUP-26813): remove org.bouncycastle.bcprov plugin

* fix(TUP-26813): remove org.bouncycastle.bcprov plugin, add test

* fix(TUP-26813): remove org.bouncycastle.bcprov plugin

* fix(TUP-26813): add bouncycastle 1.68 plugin

* fix(TUP-26813): add test case

* fix(TUP-26813): remove unsed plugin
2021-04-02 18:18:33 +08:00
sbliu
2915789a37 fix(TUP-30685) Mvn package job use joblet in subref project fail to run the bat file correct. 2021-04-01 17:26:28 +08:00
Zhiwei Xue
a4d3daba9d fix(TUP-30813):Add Junits for dependency management feature (#4148) 2021-03-25 09:58:49 +08:00
Jane Ding
3e667e1718 fix(TUP-30216):Commandline install patch and login project throw NPE (#4114) (#4146)
https://jira.talendforge.org/browse/TUP-30216

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-25 09:30:18 +08:00
Emmanuel GALLOIS
b75083c0ce feat(TDI-45809): bump component-runtime to 1.31.0 (#4145) 2021-03-24 16:15:01 +01:00
jiezhang-tlnd
18fd262f03 feat(TUP-30381)Support greenplum driver for Greenplum Database in studio (#4136)
metadata
https://jira.talendforge.org/browse/TUP-30381
2021-03-24 18:14:56 +08:00
Zhiwei Xue
0a0da0f7d9 fix(TUP-30779):Custom jar resource unload issue after git pull&merge. (#4141) 2021-03-24 16:12:43 +08:00
jiezhang-tlnd
5a1ce3f8b9 fix(TUP-30277)Fail to download jar in remote project when tac set a (#4137)
wrong nexus url
https://jira.talendforge.org/browse/TUP-30277
2021-03-23 16:31:31 +08:00
Jane Ding
4bf4aaf3bc fix(TUP-30615):Schema Update Detection popping up everytime upon opening (#4135)
the job
https://jira.talendforge.org/browse/TUP-30615

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-23 11:30:53 +08:00
jiezhang-tlnd
bd7e9d1cf8 fix(TUP-29768)Studio won't release resource after cancel import (#4132)
https://jira.talendforge.org/browse/TUP-29768
2021-03-22 11:24:50 +08:00
sbliu
12a5b5d0b2 feat(TUP-30114) update copyright. 2021-03-18 09:44:28 +08:00
jiezhang-tlnd
8640a1eb59 fix(TUP-30277)Fail to download jar in remote project when tac set a (#4121)
* fix(TUP-30277)Fail to download jar in remote project when tac set a
wrong nexus url.
https://jira.talendforge.org/browse/TUP-30277

* fix nexus2 and artifactory

* check if custom nexus is available or not before deploy the jar

* catch MalformedURLException

* get nexus server
2021-03-17 10:46:40 +08:00
Zhiwei Xue
78a417eb56 feat(TUP-29014): bugfix 2021-03-16 (#4129) 2021-03-16 17:12:25 +08:00
Laurent BOURGEOIS
4903c81fde fix(TBD-11964): Different time zone for Standard jobs and BD Batch (#4082) (#4123) 2021-03-15 18:56:41 +01:00
hzhao-talendbj
6c3d649bf2 TUP-28242 Save impala component to repository get error (#4117) 2021-03-15 19:33:26 +08:00
Zhiwei Xue
304633c54d feat(TUP-29014): bugfix 2021-03-11 (#4116) (#4120)
* feat(TUP-29014):init custom jar cache before migration tasks

* feat(TUP-29014): bugfix 2021-03-11
2021-03-15 16:27:32 +08:00
Chao MENG
3d5f2d1785 item(TUP-30180): Studio slowness on merge operation (#4063)
* fix(TUP-30103): [7.1.1] Studio somtimes hangs for 20 seconds
https://jira.talendforge.org/browse/TUP-30103
2021-03-11 13:58:32 +08:00
Zhiwei Xue
0a8e341ca2 feat(TUP-29014):fix junit failure (#4113) 2021-03-10 11:43:03 +08:00
sbliu
8fc97f156c feat(TUP-30338) Data Collector improvement step 1
* log action activation, log perspective switch.
* reset performance record after install patch, read/write info from/to new performance file location.
* set default DATA_COLLECTOR_UPLOAD_PERIOD to 5.
* don't send data when closing studio.
* When there is no action or dialog popped , check data collector enable, network enable, data send period, if need sent, try to send data.
2021-03-10 10:33:34 +08:00
hzhao-talendbj
f31141669c TUP-30558 (#4111) 2021-03-10 10:21:09 +08:00
383 changed files with 4203 additions and 293278 deletions

View File

@@ -42,6 +42,6 @@ Feel free to share your Talend components on [Talend Exchange](http://www.talend
## License
Copyright (c) 2006-2019 Talend
Copyright (c) 2006-2021 Talend
Licensed under the Apache V2 License

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="class"/>
</classpath>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.model.migration.nl</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,6 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Nl
Bundle-SymbolicName: org.talend.model.migration.nl
Bundle-Version: 7.4.1.qualifier
Fragment-Host: org.talend.model.migration

View File

@@ -1 +0,0 @@
jarprocessor.exclude.children=true

View File

@@ -1,13 +0,0 @@
source.. = src/
output.. = class/
bin.includes = META-INF/,\
.\
,plugin_ru.properties\
,plugin_en.properties\
,plugin_hr.properties\
,plugin_fr.properties\
,plugin_el.properties\
,plugin_ja.properties\
,plugin_it.properties\
,plugin_de.properties\
,plugin_swtbot.properties

View File

@@ -1 +0,0 @@
providerName=www.beispiel.de

View File

@@ -1,2 +0,0 @@
pluginName=Migration Model
providerName=www.example.org

View File

@@ -1,2 +0,0 @@
pluginName=Mod\u00E8le de migration
providerName=www.example.org

View File

@@ -1 +0,0 @@
providerName=www.example.org

View File

@@ -1,2 +0,0 @@
pluginName=\u79FB\u884C\u30E2\u30C7\u30EB
providerName=www.example.org

View File

@@ -1 +0,0 @@
providerName=www.example.org

View File

@@ -1,2 +0,0 @@
pluginName = Migration Model
providerName = www.example.org

View File

@@ -1,2 +0,0 @@
pluginName=\u8FC1\u79FB\u6A21\u578B
providerName=www.example.org

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.nl</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=error while loading the Transformation file : {0}
TosMetadataMigrationFrom400to410_tos_error_log=error while loading the Transformation file : {0}

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=error mientras se cargaba el fichero de Transformaci\u00F3n: {0}
TosMetadataMigrationFrom400to410_tos_error_log=error mientras se cargaba el fichero de Transformaci\u00F3n: {0}

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=erreur lors du chargement du fichier de transformation : {0}
TosMetadataMigrationFrom400to410_tos_error_log=Erreur lors du chargement du fichier de transformation : {0}

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=\u5909\u63DB\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\uFF1A{0}
TosMetadataMigrationFrom400to410_tos_error_log=\u5909\u63DB\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\uFF1A{0}

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=error while loading the Transformation file : {0}
TosMetadataMigrationFrom400to410_tos_error_log=error while loading the Transformation file : {0}

View File

@@ -1,2 +0,0 @@
TopMetadataMigrationFrom400to410usingGenericVM_top_error_log=\u52A0\u8F7D\u8F6C\u6362\u6587\u4EF6\u65F6\u51FA\u9519\uFF1A{0}
TosMetadataMigrationFrom400to410_tos_error_log=\u52A0\u8F7D\u8F6C\u6362\u6587\u4EF6\u65F6\u51FA\u9519\uFF1A{0}

View File

@@ -4,5 +4,5 @@ Version: {1}
Build id: {0}
(c) Copyright 2006-2020 Talend Inc. All rights reserved.
(c) Copyright 2006-2021 Talend Inc. All rights reserved.
Visit {3}

View File

@@ -4,5 +4,5 @@ Version: {1}
Build id: {0}
(c) Copyright 2006-2020 Talend Inc. All rights reserved.
(c) Copyright 2006-2021 Talend Inc. All rights reserved.
Visit {3}

View File

@@ -8,7 +8,6 @@
<discovery label="Talend web site" url="http://www.talend.com"/>
</url>
<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.8" match="greaterOrEqual"/>
<import plugin="jackson-core-asl" version="0.0.0" match="greaterOrEqual"/>

View File

@@ -38,7 +38,6 @@
<import plugin="org.apache.httpcomponents.httpcore" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.compare" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.compare.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.m2m.atl.emftvm.trace" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.ops4j.pax.url.mvn" version="0.0.0" match="greaterOrEqual"/>
</requires>
<plugin id="org.talend.core" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
@@ -63,11 +62,10 @@
<plugin id="org.talend.metadata.managment.ui" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.metadata.managment.ui.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.migrationTool" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.migrationTool.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.model" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.model.edit" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.model.edit.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.model.migration" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.model.migration.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.model.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.osgi.lib.loader" download-size="0" install-size="0" version="0.0.0" unpack="false" fragment="true"/>
<plugin id="org.talend.resources" download-size="0" install-size="0" version="0.0.0"/>

View File

@@ -57,11 +57,4 @@
version="0.0.0"
unpack="true"/>
<plugin
id="org.talend.libraries.apache.lucene4"
download-size="0"
install-size="0"
version="0.0.0"
unpack="true"/>
</feature>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.model.migration.feature</name>
<name>org.talend.help.di.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,36 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.talend.jdt.feature"
label="Feature"
version="7.4.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<requires>
<import plugin="org.eclipse.jdt" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.annotation" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.pluggable.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.compiler.apt" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.compiler.tool" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core" version="3.16.0.xx-201903290056-e1812-RELEASE" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core.manipulation" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.debug" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.debug.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.launching" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.groovy.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.codehaus.groovy" version="2.4.16" match="equivalent"/>
</requires>
<plugin
id="org.eclipse.jdt.launching.macosx"
os="macosx"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.launching.ui.macosx"
os="macosx"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<feature id="org.talend.jdt.feature" label="Feature" version="7.4.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<requires>
<!-- bonita requires org.codehaus.groovy version 2.4.16.xx-201903290056-e1812-RELEASE -->
<import plugin="org.codehaus.groovy" version="2.4.16.xx-201903290056-e1812-RELEASE" match="perfect"/>
<import plugin="org.eclipse.ant.launching" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ant.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.annotation" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.pluggable.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.apt.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.compiler.apt" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.compiler.tool" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core" version="3.16.0.xx-201903290056-e1812-RELEASE" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core.manipulation" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.debug" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.debug.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.doc.user" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.groovy.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit.runtime" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit4.runtime" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.launching" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
</requires>
<plugin id="org.eclipse.jdt.launching.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.jdt.launching.ui.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
</feature>

View File

@@ -1 +0,0 @@
bin.includes = feature.xml

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.talend.model.migration.feature"
label="model Migration feature"
version="7.4.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<requires>
<import feature="org.eclipse.m2m.atl" version="0.0.0" match="greaterOrEqual"/>
<import feature="org.talend.utils.feature" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.bouncycastle.bcprov" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.objectweb.asm" version="0.0.0" match="greaterOrEqual"/>
</requires>
</feature>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.4.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>

View File

@@ -18,7 +18,7 @@
<import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/>
</requires>

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-202121 Talend Inc. - www.talend.com
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

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

View File

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

View File

@@ -15,6 +15,7 @@ package org.talend.commons.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Optional;
@@ -352,6 +353,12 @@ public class VersionUtils {
}
}
public static File getStudioConfigFile() throws Exception {
URL configLocation = new URL("platform:/config/config.ini"); //$NON-NLS-1$
URL fileUrl = FileLocator.toFileURL(configLocation);
return URIUtil.toFile(new URI(fileUrl.getProtocol(), fileUrl.getPath(), fileUrl.getQuery()));
}
public static String getSimplifiedPatchName(String projectPatchName) {
if (projectPatchName != null) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,55 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.time;
import java.io.File;
import java.util.Properties;
import org.eclipse.core.runtime.Platform;
public class PropertiesCollectorUtil {
private static final String ROOT_NODE = "additional_packages_records"; // additional packages
private static final String PREF_ADDITIONAL_PACKAGES = "AdditionalPackages"; // preference node
private static final String ADDITONAL_PACKAGE_FILE = "additionalPackages";
public static String getAdditionalPackageRecording() {
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
Properties props = PropertiesFileUtil.read(file, true);
String records = props.getProperty(ROOT_NODE, "");
return records;
}
public static void storeAdditionalPackageRecording(String records) {
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
Properties props = PropertiesFileUtil.read(file, false);
props.setProperty(ROOT_NODE, records);
PropertiesFileUtil.store(file, props);
}
private static File getRecordFile(String fileName) {
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
File file = new File(configurationLocation + "/data_collector/" + fileName);
return file;
}
public static String getAdditionalPackagePreferenceNode() {
return PREF_ADDITIONAL_PACKAGES;
}
}

View File

@@ -0,0 +1,93 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.time;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
import org.talend.commons.exception.CommonExceptionHandler;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class PropertiesFileUtil {
public static synchronized Properties read(File recordFile, boolean createIfNotExist) {
Properties props = new Properties();
if (recordFile != null && exist(recordFile, createIfNotExist)) {
FileInputStream inStream = null;
try {
inStream = new FileInputStream(recordFile);
props.load(inStream);
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (inStream != null) {
try {
inStream.close();
} catch (IOException e) {//
}
}
}
}
return props;
}
public static synchronized void store(File recordFile, Properties props) {
if (props == null) {
return;
}
if (recordFile != null && exist(recordFile, true)) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(recordFile);
props.store(outputStream, "");
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//
}
}
}
}
}
public static boolean exist(File recordFile, boolean createIfNotExist) {
boolean exists = recordFile.exists();
if (!exists && createIfNotExist) {
try {
if(!recordFile.getParentFile().exists()) {
recordFile.getParentFile().mkdirs();
}
exists = recordFile.createNewFile();
if (!exists) {
throw new FileNotFoundException(recordFile.getName());
}
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
return false;
}
}
return exists;
}
}

View File

@@ -280,7 +280,7 @@
</appInfo>
<documentation>
Talend Community Edition&lt;br&gt;
Copyright (C) 2006-2019 Talend - www.talend.com
Copyright (C) 2006-2021 Talend - www.talend.com
</documentation>
</annotation>

View File

@@ -12,11 +12,14 @@
// ============================================================================
package org.talend.core.repository.model;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -623,8 +626,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
stream.close();
byte[] currentContent = item.getContent().getInnerContent();
if (!Arrays.equals(innerContent, currentContent)) {
if (!isSameStringContent(innerContent, currentContent)) {
item.getContent().setInnerContent(innerContent);
Project project = getRepositoryContext().getProject();
save(project, item);
@@ -641,6 +643,44 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
throw new PersistenceException(ioe);
}
}
protected boolean isSameStringContent(byte[] data1, byte[] data2) throws IOException {
boolean isSame = true;
BufferedReader br1 = null, br2 = null;
try {
br1 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data1), StandardCharsets.UTF_8.toString()));
br2 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data2), StandardCharsets.UTF_8.toString()));
String line1 = null, line2 = null;
while (isSame) {
line1 = br1.readLine();
line2 = br2.readLine();
if ((line1 == null && line2 == null)) {
break;
}
if (!StringUtils.equals(line1, line2)) {
isSame = false;
break;
}
}
} finally {
if (br1 != null) {
try {
br1.close();
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
if (br2 != null) {
try {
br2.close();
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
return isSame;
}
private void createSQLPattern(URL url, String sqlPatternLabel, String categoryName) throws PersistenceException {
if (url == null) {
@@ -693,8 +733,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
stream.close();
byte[] currentContent = item.getContent().getInnerContent();
if (!Arrays.equals(innerContent, currentContent)) {
if (!isSameStringContent(innerContent, currentContent)) {
item.getContent().setInnerContent(innerContent);
Project project = getRepositoryContext().getProject();
save(project, item);

View File

@@ -123,6 +123,7 @@ import org.talend.core.model.repository.LockInfo;
import org.talend.core.model.repository.RepositoryContentManager;
import org.talend.core.model.repository.RepositoryObject;
import org.talend.core.model.repository.RepositoryViewObject;
import org.talend.core.model.routines.CodesJarInfo;
import org.talend.core.repository.CoreRepositoryPlugin;
import org.talend.core.repository.constants.Constant;
import org.talend.core.repository.constants.FileConstants;
@@ -1368,21 +1369,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
}
@Override
public List<IRepositoryViewObject> getAllInnerCodes(ERepositoryObjectType codesJarType, Property jarProperty)
throws PersistenceException {
return getAllInnerCodes(projectManager.getCurrentProject(), codesJarType, jarProperty);
}
@Override
public List<IRepositoryViewObject> getAllInnerCodes(Project project, ERepositoryObjectType codesJarType, Property jarProperty)
throws PersistenceException {
public List<IRepositoryViewObject> getAllInnerCodes(CodesJarInfo info) throws PersistenceException {
Project project = ProjectManager.getInstance().getProjectFromProjectTechLabel(info.getProjectTechName());
// empty folder won't be commit in git, create if not exist
IFolder folder = ResourceUtils.getProject(project).getFolder(ERepositoryObjectType.getFolderName(codesJarType))
.getFolder(jarProperty.getLabel());
IFolder folder = ResourceUtils.getProject(project).getFolder(ERepositoryObjectType.getFolderName(info.getType()))
.getFolder(info.getLabel());
if (!folder.exists()) {
ResourceUtils.createFolder(folder);
}
return repositoryFactoryFromProvider.getAll(project, codesJarType, false, false, folder);
return repositoryFactoryFromProvider.getAll(project, info.getType(), false, false, folder);
}
@Override
@@ -2245,6 +2240,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ExceptionHandler.process(e);
}
CodesJarResourceCache.initCodesJarCache();
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
ProjectManager.getInstance().getMigrationRecords().clear();
@@ -2311,8 +2308,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.synch.repo.items"), 1); //$NON-NLS-1$
CodesJarResourceCache.initCodesJarCache();
if (!isCommandLineLocalRefProject) {
try {
coreService.syncAllRoutines();

View File

@@ -523,10 +523,10 @@ public class CopyObjectAction {
if (isInnerCode) {
CodesJarInfo info = CodesJarResourceCache.getCodesJarByInnerCode(item);
if (info.getProperty() != null) {
if (info != null) {
IDesignerMavenService designerMavenService = IDesignerMavenService.get();
if (designerMavenService != null) {
designerMavenService.updateCodeJarMavenProject(info.getProperty(), false);
designerMavenService.updateCodeJarMavenProject(info, false);
}
}
}

View File

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

View File

@@ -26,7 +26,6 @@ import org.apache.oro.text.regex.Util;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.repository.ERepositoryObjectType;
@@ -48,27 +47,34 @@ public final class RoutineUtils {
public static void changeRoutinesPackage(Item item) {
List<ERepositoryObjectType> allowedTypes = new ArrayList<ERepositoryObjectType>();
allowedTypes.add(ERepositoryObjectType.ROUTINES);
doChangeRoutinesPackage(item, DEFAULT_PACKAGE_REGEX, DEFAULT_PACKAGE_STRING, allowedTypes, false);
doChangeRoutinesPackage(item, DEFAULT_PACKAGE_REGEX, DEFAULT_PACKAGE_STRING, allowedTypes, false, true);
}
public static void changeInnerCodePackage(Item item, boolean avoidSave) {
if (item instanceof RoutineItem
&& GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMavenService.class)) {
IDesignerMavenService service = GlobalServiceRegister.getDefault().getService(IDesignerMavenService.class);
if (service != null) {
RoutineItem routineItem = (RoutineItem) item;
String codesJarPackageByInnerCode = service.getCodesJarPackageByInnerCode(routineItem);
if (StringUtils.isNotBlank(codesJarPackageByInnerCode)) {
String newPackageString = "package " + StringUtils.replace(codesJarPackageByInnerCode, "/", ".") + ";";
doChangeRoutinesPackage(item, INNER_ROUTINES_PACKAGE_REGEX, newPackageString,
ERepositoryObjectType.getAllTypesOfCodes(), avoidSave);
changeInnerCodePackage(item, avoidSave, true);
}
public static void changeInnerCodePackage(Item item, boolean avoidSave, boolean commitMode) {
IDesignerMavenService service = IDesignerMavenService.get();
if (service != null && item instanceof RoutineItem) {
RoutineItem routineItem = (RoutineItem) item;
String codesJarPackageByInnerCode = service.getCodesJarPackageByInnerCode(routineItem);
if (StringUtils.isNotBlank(codesJarPackageByInnerCode)) {
String newPackageString = "package " + StringUtils.replace(codesJarPackageByInnerCode, "/", ".") + ";";
if (!routineItem.isBuiltIn()) {
String routineContent = new String(routineItem.getContent().getInnerContent());
if (routineContent != null && routineContent.contains(newPackageString)) {
return;
}
}
doChangeRoutinesPackage(item, INNER_ROUTINES_PACKAGE_REGEX, newPackageString,
ERepositoryObjectType.getAllTypesOfCodes(), avoidSave, commitMode);
}
}
}
public static void doChangeRoutinesPackage(Item item, String packageRegex, String newPackage,
List<ERepositoryObjectType> allowedTypes, boolean avoidSave) {
List<ERepositoryObjectType> allowedTypes, boolean avoidSave, boolean commitMode) {
if (item == null) {
return;
}
@@ -94,7 +100,12 @@ public final class RoutineUtils {
ProxyRepositoryFactory repFactory = ProxyRepositoryFactory.getInstance();
if (!avoidSave) {
repFactory.save(rItem);
if (commitMode) {
repFactory.save(rItem);
} else {
// avoid deadlock in git pull event listener
new XmiResourceManager().saveResource(rItem.eResource());
}
}
// }
}

View File

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

View File

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

View File

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

View File

@@ -12,17 +12,26 @@
<dbType type="BPCHAR" ignoreLen="true" ignorePre="true" />
<dbType type="BYTEA" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
<dbType type="CHARACTER" defaultLength="50" ignorePre="true"/>
<dbType type="CID" ignoreLen="true" ignorePre="true" />
<dbType type="CIDR" ignoreLen="true" ignorePre="true" />
<dbType type="CIRCLE" ignoreLen="true" ignorePre="true" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
<dbType type="REAL" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT8" ignoreLen="true" ignorePre="true" />
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
<dbType type="INET" ignoreLen="true" ignorePre="true" />
<dbType type="INT2" ignoreLen="true" ignorePre="true" />
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
<dbType type="INT2VECTOR" ignoreLen="true" ignorePre="true" />
<dbType type="INT4" ignoreLen="true" ignorePre="true" />
<dbType type="INT8" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
<dbType type="BIT VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="INTERVAL" ignorePre="true" />
<dbType type="LINE" ignoreLen="true" ignorePre="true" />
<dbType type="LSEG" ignoreLen="true" ignorePre="true" />
@@ -30,6 +39,7 @@
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
<dbType type="NAME" ignoreLen="true" ignorePre="true" />
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10"/>
<dbType type="OID" ignoreLen="true" ignorePre="true" />
<dbType type="OIDVECTOR" ignoreLen="true" ignorePre="true" />
<dbType type="PATH" ignoreLen="true" ignorePre="true" />
@@ -110,16 +120,19 @@
<talendToDbTypes><!-- Adviced mappings -->
<talendType type="id_List"/>
<talendType type="id_Boolean">
<dbType type="BOOL" default="true" />
<dbType type="BOOL" default="true" />
<dbType type="BOOLEAN" />
</talendType>
<talendType type="id_Byte">
</talendType>
<talendType type="id_byte[]">
<dbType type="BIT" default="true" />
<dbType type="VARBIT" />
<dbType type="VARBIT" />
<dbType type="BIT VARYING" />
</talendType>
<talendType type="id_Character">
<dbType type="CHAR" default="true" />
<dbType type="CHARACTER" />
<dbType type="BPCHAR" />
<dbType type="VARCHAR" />
<dbType type="TEXT" />
@@ -136,33 +149,47 @@
<dbType type="RELTIME" />
</talendType>
<talendType type="id_BigDecimal">
<dbType type="NUMERIC" default="true" />
<dbType type="NUMERIC" default="true" />
<dbType type="DECIMAL" />
<dbType type="FLOAT4" />
<dbType type="REAL" />
<dbType type="FLOAT8"/>
<dbType type="DOUBLE PRECISION"/>
</talendType>
<talendType type="id_Double">
<dbType type="FLOAT4" />
<dbType type="REAL" />
<dbType type="FLOAT8" default="true" />
<dbType type="NUMERIC" />
<dbType type="NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="DOUBLE PRECISION"/>
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT4" default="true" />
<dbType type="FLOAT8" />
<dbType type="NUMERIC" />
<dbType type="REAL" />
<dbType type="NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="DOUBLE PRECISION"/>
</talendType>
<talendType type="id_Integer">
<dbType type="INT2" />
<dbType type="SMALLINT" />
<dbType type="INT4" default="true" />
<dbType type="SERIAL" />
<dbType type="INT8" />
<dbType type="BIGSERIAL" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" />
<dbType type="INTEGER" />
</talendType>
<talendType type="id_Long">
<dbType type="INT2" />
<dbType type="INT4" />
<dbType type="SERIAL" />
<dbType type="INT8" default="true" />
<dbType type="BIGSERIAL" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" />
<dbType type="SMALLINT" />
</talendType>
<talendType type="id_Object">
<dbType type="_POINT" />
@@ -209,18 +236,26 @@
<dbType type="_ABSTIME" />
<dbType type="_ACLITEM" />
<dbType type="_INT8" />
<dbType type="BIGINT" />
<dbType type="BIT VARYING" />
<dbType type="_VARBIT" />
<dbType type="_BIT" />
<dbType type="_BOOL" />
<dbType type="BOOLEAN" />
<dbType type="BOX" />
<dbType type="_BOX" />
<dbType type="_BYTEA" />
<dbType type="_VARCHAR" />
<dbType type="CHARACTER VARYING" />
<dbType type="CHARACTER" />
<dbType type="INTEGER" />
<dbType type="REAL" />
<dbType type="_BPCHAR" />
<dbType type="_CID" />
<dbType type="_CIDR" />
<dbType type="_CIRCLE" />
<dbType type="_DATE" />
<dbType type="DOUBLE PRECISION"/>
<dbType type="_FLOAT8" />
<dbType type="_INET" />
<dbType type="INT2VECTOR" />
@@ -236,6 +271,7 @@
<dbType type="NAME" />
<dbType type="_NAME" />
<dbType type="_NUMERIC" />
<dbType type="DECIMAL" />
<dbType type="_OID" />
<dbType type="OIDVECTOR" />
<dbType type="_OIDVECTOR" />
@@ -247,26 +283,44 @@
<dbType type="INT4" />
<dbType type="SERIAL" />
<dbType type="INT8" />
<dbType type="BIGSERIAL" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" />
<dbType type="SMALLINT" />
</talendType>
<talendType type="id_String">
<dbType type="BPCHAR" />
<dbType type="VARCHAR" default="true" />
<dbType type="CHARACTER VARYING" />
<dbType type="TEXT" />
</talendType>
</talendToDbTypes>
<dbToTalendTypes>
<dbType type="INT2" >
<talendType type="id_Short" default="true" />
</dbType>
<dbType type="SMALLINT" >
<talendType type="id_Short" default="true" />
</dbType>
<dbType type="INT4" >
<talendType type="id_Integer" default="true" />
</dbType>
</dbType>
<dbType type="INTEGER" >
<talendType type="id_Integer" default="true" />
</dbType>
<dbType type="CHARACTER VARYING" >
<talendType type="id_String" default="true" />
</dbType>
<dbType type="BOOLEAN" >
<talendType type="id_Boolean" default="true" />
</dbType>
<dbType type="SERIAL" >
<talendType type="id_Integer" default="true" />
</dbType>
<dbType type="INT8" >
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BIGINT" >
<talendType type="id_Long" default="true" />
</dbType>
<dbType type="BIGSERIAL" >
<talendType type="id_Long" default="true" />
@@ -274,14 +328,26 @@
<dbType type="FLOAT4" >
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
</dbType>
<dbType type="REAL" >
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="FLOAT8" >
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="DOUBLE PRECISION" >
<talendType type="id_Double" default="true" />
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="NUMERIC">
<talendType type="id_Double"/>
<talendType type="id_BigDecimal" default="true" />
</dbType>
<dbType type="DECIMAL">
<talendType type="id_Double"/>
<talendType type="id_BigDecimal" default="true" />
</dbType>
<dbType type="BOOL" >
<talendType type="id_Boolean" default="true" />
@@ -291,9 +357,15 @@
</dbType>
<dbType type="VARBIT" >
<talendType type="id_byte[]" default="true" />
</dbType>
</dbType>
<dbType type="BIT VARYING" >
<talendType type="id_byte[]" default="true" />
</dbType>
<dbType type="CHAR" >
<talendType type="id_String" default="true" />
</dbType>
<dbType type="CHARACTER" >
<talendType type="id_String" default="true" />
</dbType>
<dbType type="BPCHAR" >
<talendType type="id_String" default="true" />

View File

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

View File

@@ -110,7 +110,7 @@
</appInfo>
<documentation>
Talend Community Edition&lt;br&gt;
Copyright (C) 2006-2019 Talend - www.talend.com
Copyright (C) 2006-2021 Talend - www.talend.com
</documentation>
</annotation>

View File

@@ -1,34 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core;
import org.talend.core.model.properties.Item;
import org.talend.migration.IMigrationTask.ExecutionResult;
/**
* DOC bZhou class global comment. Detailled comment
*/
public interface IMigrateDIMetadataItemService extends IService {
/**
* DOC bZhou Comment method "migrateDIItems".
*
* This method to invode the migration task in DI to do migration when import items from DQ perspective.
*
* It should be removed after merge the migrate mechanism.
*
* @param item
* @return
*/
ExecutionResult migrateDIItems(Item item);
}

View File

@@ -12,13 +12,19 @@
// ============================================================================
package org.talend.core;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
/**
* This class can check whether some specific plugins are loaded or not. <br/>
@@ -62,6 +68,8 @@ public class PluginChecker {
private static final String PREVIEW_PLUGIN_ID = "org.talend.designer.component.preview"; //$NON-NLS-1$
private static final String REMOTE_PROVIDER_PLUGIN_ID = "org.talend.repository.remoteprovider"; //$NON-NLS-1$
private static final String SVN_PROVIDER_PLUGIN_ID = "org.talend.repository.svnprovider"; //$NON-NLS-1$
private static final String GIT_PROVIDER_PLUGIN_ID = "org.talend.repository.gitprovider"; //$NON-NLS-1$
@@ -140,6 +148,10 @@ public class PluginChecker {
public static final String APACHE_CXF_PLUGIN_ID = "org.talend.libraries.apache.cxf"; //$NON-NLS-1$
public static final String SWTBOT_PLUGIN_ID = "org.eclipse.swtbot.eclipse.core"; //$NON-NLS-1$
private static Boolean isStudioLite;
/**
* Check if specific plug-in is loaded.
*
@@ -158,6 +170,23 @@ public class PluginChecker {
return isJobLetPluginLoaded();
}
public static boolean isStudioLite() {
if (isStudioLite == null) {
try {
File studioConfigFile = VersionUtils.getStudioConfigFile();
Properties props = new Properties();
try (BufferedReader reader = Files.newBufferedReader(studioConfigFile.toPath())) {
props.load(reader);
}
isStudioLite = Boolean.valueOf(props.getProperty("talend.studio.lite"));
} catch (Exception e) {
isStudioLite = false;
ExceptionHandler.process(e);
}
}
return isStudioLite;
}
public static boolean isRefProjectLoaded() {
return isPluginLoaded(REF_PROJECT_PLUGIN_ID);
}
@@ -259,6 +288,10 @@ public class PluginChecker {
return isPluginLoaded(PREVIEW_PLUGIN_ID);
}
public static boolean isRemoteProviderPluginLoaded() {
return isPluginLoaded(REMOTE_PROVIDER_PLUGIN_ID);
}
public static boolean isSVNProviderPluginLoaded() {
return isPluginLoaded(SVN_PROVIDER_PLUGIN_ID);
}
@@ -372,6 +405,10 @@ public class PluginChecker {
return isPluginLoaded(BD_ROUTINE_PLUGIN_ID);
}
public static boolean isSWTBotLoaded() {
return isPluginLoaded(SWTBOT_PLUGIN_ID);
}
public static String getBundlePath(String bundleName) {
String bundlePath = ""; //$NON-NLS-1$
Bundle refBundle = Platform.getBundle(bundleName);

View File

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

View File

@@ -336,10 +336,19 @@ public enum EDatabaseTypeName {
.getProjectPreferenceManager()
.getBoolean(IProjectSettingPreferenceConstants.METADATA_DBCONNECTION_ODBC_ENABLE);
isSupport = isSupportODBC;
} else if (EDatabaseTypeName.SAS == this) {
isSupport = false;
}
return isSupport;
}
public static boolean isDeprecateDbType(String dbType) {
if (EDatabaseTypeName.SAS.getXmlName().equals(dbType)) {
return true;
}
return false;
}
/**
* Getter for dbType.

View File

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

View File

@@ -114,6 +114,13 @@ public class DatabaseConnStrUtil {
&& EDatabaseVersion4Drivers.SYBASEIQ_16_SA.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.SYBASEASE_16_SA;
}
if (EDatabaseTypeName.GREENPLUM.getDisplayName().equals(dbType)) {
if (EDatabaseVersion4Drivers.GREENPLUM.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.GREENPLUM;
}else if(EDatabaseVersion4Drivers.GREENPLUM_PSQL.getVersionValue().equals(dbVersion)) {
connStr = EDatabaseConnTemplate.GREENPLUM_PSQL;
}
}
EDatabaseVersion4Drivers version = EDatabaseVersion4Drivers.indexOfByVersion(dbVersion);
if (connStr != null) {
String s = connStr.getUrlTemplate(version);
@@ -221,8 +228,10 @@ public class DatabaseConnStrUtil {
.get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA));
}
String url = null;
if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)) {
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal);
String driver = dbConn.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)
|| template.startsWith(DbConnStrForHive.URL_IMPALA_TEMPLATE)) {
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal, driver);
}
url = attachAdditionalHiveParameters(url, dbConn, false);
return url;
@@ -369,9 +378,13 @@ public class DatabaseConnStrUtil {
return s;
}
private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal) {
String s = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null);
String standardURlString = getImpalaURlString(s, supportContext, server, port, sid);
private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal,
String driver) {
String template = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null);
if (EDatabaseTypeName.IMPALA.getDbType().equals(driver)) {
template = EDatabaseConnTemplate.IMPALA_IMPALA_DRIVER.getUrlTemplate(null);
}
String standardURlString = getImpalaURlString(template, supportContext, server, port, sid);
String principalSuffix = "principal="; //$NON-NLS-1$
boolean hasPrinc = false;
String[] urlArray = standardURlString.split(SEMICOLON);

View File

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

View File

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

View File

@@ -84,7 +84,11 @@ public enum EDatabaseVersion4Drivers {
MSSQL_2012(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
"Microsoft", "MSSQL_PROP", "mssql-jdbc.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.5.jar", //$NON-NLS-1$
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-6.5.jar",
"json-smart-2.4.2.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "log4j-1.2.17.jar",
"accessors-smart-1.1.jar", "asm-5.0.3.jar" })),
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -99,8 +103,8 @@ public enum EDatabaseVersion4Drivers {
VERTICA_3(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 3 (Deprecated)", "VERTICA_3", "vertica_3.0_jdk_5.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// for bug 0017930
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM, "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

View File

@@ -53,7 +53,7 @@ public class BigDataBasicUtil {
private static IDynamicDistributionManager getDynamicDistributionManager(IProgressMonitor monitor) throws Exception {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopDistributionService.class)) {
IHadoopDistributionService hdService = (IHadoopDistributionService) GlobalServiceRegister.getDefault()
IHadoopDistributionService hdService = GlobalServiceRegister.getDefault()
.getService(IHadoopDistributionService.class);
if (hdService != null) {
return hdService.getDynamicDistributionManager();

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,8 +27,8 @@ import org.talend.core.model.process.IElement;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.process.Problem;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.routines.CodesJarInfo;
import org.talend.designer.codegen.PigTemplate;
/**
@@ -120,7 +120,7 @@ public interface ILibrariesService extends IService {
Set<ModuleNeeded> getAllCodesJarModuleNeededs();
Set<ModuleNeeded> getCodesJarModuleNeededs(Property property);
Set<ModuleNeeded> getCodesJarModuleNeededs(CodesJarInfo info);
List<ModuleNeeded> getModuleNeeded(String id, boolean isGroup);

View File

@@ -191,6 +191,23 @@ public class ModuleToInstall {
}
}
@Override
public ModuleToInstall clone() {
ModuleToInstall module = new ModuleToInstall();
module.setName(this.name);
module.setRequired(this.required);
module.setContext(this.context);
module.setDescription(this.description);
module.setDistribution(this.distribution);
module.setFromCustomNexus(this.fromCustomNexus);
module.setLicenseType(this.licenseType);
module.setLicenseUrl(this.licenseUrl);
module.setMavenUri(this.mavenUri);
module.setUrl_description(this.url_description);
module.setUrl_download(this.url_download);
return module;
}
public static String removeAuthenrizationInfo(String mavenUri) throws Exception {
MavenArtifact ma = MavenUrlHelper.parseMvnUrl(mavenUri);
ma.setUsername(""); //$NON-NLS-1$

View File

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

View File

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

View File

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

View File

@@ -365,7 +365,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
for (int i = 0; i < listColumns.size(); i++) {
IMetadataColumn column = listColumns.get(i);
if (column.isCustom()) {
if (column.isCustom() && !column.isIgnoreCustomSort()) {
customColumns.add(column);
}
}

View File

@@ -32,6 +32,8 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -492,18 +494,55 @@ public final class MetadataTalendType {
}
}
private static String getSha1OfFile(File file) {
String sha1 = null;
FileInputStream fileInputStream = null;
try {
fileInputStream = new FileInputStream(file);
sha1 = DigestUtils.shaHex(fileInputStream);
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
e.printStackTrace(); // Just print the exception for debug.
}
}
}
return sha1;
}
public static void copyFile(File in, IFile out) throws CoreException, IOException {
FileInputStream fis = new FileInputStream(in);
if (out.exists()) {
out.setContents(fis, true, false, null);
} else {
out.create(fis, true, null);
}
fis.close();
}
public static void syncNewMappingFileToProject() throws SystemException {
try {
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
File projectMappingFiles = projectMappingFolder.getFullPath().toFile();
if (sysMappingFiles.list().length == new File(projectMappingFolder.getLocationURI()).list().length) {
File projectMappingFiles = new File(projectMappingFolder.getLocationURI());
if (!sysMappingFiles.exists() || !projectMappingFiles.exists()) {
return;
}
for (File sysMapping : sysMappingFiles.listFiles()) {
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
if (projectMapping.exists() && StringUtils.equals(sysMapping.getName(), "mapping_Greenplum.xml")) {
String sha1OfFile = DigestUtils.shaHex(projectMapping.getContents());
String shalOfOldSystem = "8431f19215dacb3caa126778ae695954552cce2a";
if (StringUtils.equals(sha1OfFile, shalOfOldSystem)) {
copyFile(sysMapping, projectMapping);
}
}
if (!projectMapping.exists()) {
FileInputStream fis = null;
try {

View File

@@ -25,8 +25,10 @@ import org.apache.avro.SchemaBuilder.FieldAssembler;
import org.apache.avro.SchemaBuilder.FieldBuilder;
import org.apache.avro.SchemaBuilder.PropBuilder;
import org.apache.avro.SchemaBuilder.RecordBuilder;
import org.apache.avro.SchemaParseException;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.GlobalServiceRegister;
@@ -49,6 +51,10 @@ import orgomg.cwm.objectmodel.core.TaggedValue;
*/
public final class MetadataToolAvroHelper {
private static Logger LOGGER = Logger.getLogger(MetadataToolAvroHelper.class);
private static final String COLUMN = "Column";
private static final String TALEND_DB_COLUMN_NAME = "talend.field.dbColumnName";
/**
* @return An Avro schema with enriched properties from the incoming metadata table.
@@ -66,7 +72,7 @@ public final class MetadataToolAvroHelper {
dynamicPosition = i;
dynColumn = column;
} else {
fa = convertToAvro(fa, column);
fa = convertToAvro(fa, column, i);
}
i++;
}
@@ -137,7 +143,7 @@ public final class MetadataToolAvroHelper {
* Build a field into a schema using enriched properties from the incoming column.
*/
private static FieldAssembler<Schema> convertToAvro(FieldAssembler<Schema> fa,
org.talend.core.model.metadata.builder.connection.MetadataColumn in) {
org.talend.core.model.metadata.builder.connection.MetadataColumn in, int i) {
ICoreService coreService = (ICoreService) GlobalServiceRegister.getDefault().getService(ICoreService.class);
String label = in.getLabel();
if (label != null && coreService != null) {
@@ -237,7 +243,27 @@ public final class MetadataToolAvroHelper {
}
type = in.isNullable() ? AvroUtils.wrapAsNullable(type) : type;
return defaultValue == null ? fb.type(type).noDefault() : fb.type(type).withDefault(defaultValue);
FieldAssembler<Schema> returnResult = null;
try {
if (defaultValue == null) {
returnResult = fb.type(type).noDefault();
} else {
returnResult = fb.type(type).withDefault(defaultValue);
}
} catch (SchemaParseException e) {
// if validation not pass from avro ,then generate a new name like Column0 to pass the validation, but
// actually the display name of schema and the column name is using TALEND_DB_COLUMN_NAME
String genColumn = COLUMN + i;
FieldBuilder<Schema> fbNew = fa.name(genColumn);
copyColumnProperties(fbNew, in);
if (defaultValue == null) {
returnResult = fbNew.type(type).noDefault();
} else {
returnResult = fbNew.type(type).withDefault(defaultValue);
}
LOGGER.info(e.getMessage() + ", use " + genColumn + " instead");
}
return returnResult;
}
private static Schema getLogicalTypeSchema(org.talend.core.model.metadata.builder.connection.MetadataColumn column) {

View File

@@ -281,9 +281,7 @@ public final class MetadataToolHelper {
}
public static boolean isAllowSpecificCharacters() {
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
return coreUIPluginNode
.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
return CoreRuntimePlugin.getInstance().getProjectPreferenceManager().isAllowSpecificCharacters();
}
/**
@@ -647,6 +645,7 @@ public final class MetadataToolHelper {
target.getListColumns().remove(targetColumn);
newTargetColumn.setCustom(targetColumn.isCustom());
newTargetColumn.setCustomId(targetColumn.getCustomId());
newTargetColumn.setIgnoreCustomSort(targetColumn.isIgnoreCustomSort());
columnsTAdd.add(newTargetColumn);
}
}
@@ -806,6 +805,7 @@ public final class MetadataToolHelper {
target.getListColumns().remove(targetColumn);
newTargetColumn.setCustom(targetColumn.isCustom());
newTargetColumn.setCustomId(targetColumn.getCustomId());
newTargetColumn.setIgnoreCustomSort(targetColumn.isIgnoreCustomSort());
columnsTAdd.add(newTargetColumn);
}
}

View File

@@ -607,6 +607,12 @@ public class ComponentToRepositoryProperty {
}
// SAX
// can not find corresponding component. also not exist in EDatabaseType.java.
// impala
else if (EDatabaseTypeName.IMPALA.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.IMPALA.getDisplayName());
connection.setProductId(EDatabaseTypeName.IMPALA.getProduct());
}
}
/**
@@ -708,6 +714,18 @@ public class ComponentToRepositoryProperty {
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS, value);
}
}
if ("DISTRIBUTION".equals(param.getRepositoryValue())) {
String value = getParameterValue(connection, node, param);
if (value != null) {
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION, value);
}
}
if ("IMPALA_VERSION".equals(param.getRepositoryValue())) {
String value = getParameterValue(connection, node, param);
if (value != null) {
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_IMPALA_VERSION, value);
}
}
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {
setDatabaseValueForOracleSid(connection, node, param);

View File

@@ -32,9 +32,7 @@ import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.conn.ConnParameterKeys;
import org.talend.core.database.conn.template.EDatabaseConnTemplate;
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
import org.talend.core.hadoop.IHadoopClusterService;
import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
import org.talend.core.hadoop.version.custom.ECustomVersionGroup;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.language.LanguageManager;
import org.talend.core.model.metadata.EMetadataEncoding;
@@ -443,6 +441,13 @@ public class RepositoryToComponentProperty {
} else {
return TalendQuoteUtils.addQuotes(connection.getValue(dbPassword, false));
}
} else if ("SAPHANA_PROPERTIES_STRING".equals(value)) { //$NON-NLS-1$
String dbParameters = TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, connection);
if (isContextMode(connection, dbParameters)) {
return dbParameters;
} else {
return TalendQuoteUtils.addQuotes(dbParameters);
}
}
return null;
}
@@ -1067,7 +1072,10 @@ public class RepositoryToComponentProperty {
return dbVersionString;
} else if (EDatabaseTypeName.SYBASEASE.getDisplayName().equals(databaseType)) {
return dbVersionString;
} else {
} else if (EDatabaseTypeName.GREENPLUM.getDisplayName().equals(databaseType)) {
return dbVersionString;
}else {
String driverValue = EDatabaseVersion4Drivers.getDriversStr(databaseType, dbVersionString);
if (EDatabaseConnTemplate.ORACLE_OCI.getDBDisplayName().equals(databaseType)
|| EDatabaseConnTemplate.ORACLE_CUSTOM.getDBDisplayName().equals(databaseType)
@@ -1529,22 +1537,6 @@ public class RepositoryToComponentProperty {
}
if (value.equals("HADOOP_CUSTOM_JARS")) {
if (targetComponent != null && targetComponent.startsWith("tPig")) {
// for pig component
String clusterID = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CLUSTER_ID);
if (clusterID != null) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
IHadoopClusterService hadoopClusterService = GlobalServiceRegister.getDefault()
.getService(IHadoopClusterService.class);
Map<String, String> hadoopCustomLibraries = hadoopClusterService.getHadoopCustomLibraries(clusterID);
if (EDatabaseTypeName.HBASE.getDisplayName().equals(connection.getDatabaseType())) {
return hadoopCustomLibraries.get(ECustomVersionGroup.PIG_HBASE.getName()) == null ? ""
: hadoopCustomLibraries.get(ECustomVersionGroup.PIG_HBASE.getName());
}
}
}
}
return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
}

View File

@@ -146,7 +146,7 @@ public abstract class AbstractItemMigrationTask extends AbstractMigrationTask im
* this returns all type handled by this migration task even the extended type that could benefit from this
* migrations
* */
List<ERepositoryObjectType> getAllTypes() {
protected List<ERepositoryObjectType> getAllTypes() {
List<ERepositoryObjectType> declaredTypes = getTypes();
ArrayList<ERepositoryObjectType> allTypes = new ArrayList<ERepositoryObjectType>(declaredTypes.size());
allTypes.addAll(declaredTypes);

View File

@@ -124,6 +124,7 @@ public enum EParameterFieldType {
TACOKIT_BUTTON,
TACOKIT_SUGGESTABLE_TABLE,
TACOKIT_VALUE_SELECTION,
TACOKIT_TABLE,
TACOKIT_TEXT_AREA_SELECTION;
public String getName() {

View File

@@ -12,6 +12,7 @@
// ============================================================================
package org.talend.core.model.process;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -133,4 +134,8 @@ public interface IProcess extends IElement {
public String getComponentsType();
public INode getNodeByUniqueName(String uniqueName);
default List<? extends INode> getProcessNodes() {
return new ArrayList<INode>();
}
}

View File

@@ -67,6 +67,8 @@ public class JobInfo {
private boolean needUnloadProcessor;
private int includeESBFlag = 0;
public JobInfo(String jobId, String contextName, String version) {
this.jobId = jobId;
this.contextName = contextName;
@@ -572,4 +574,13 @@ public class JobInfo {
public boolean isNeedUnloadProcessor() {
return this.needUnloadProcessor;
}
public int getIncludeESBFlag() {
return includeESBFlag;
}
public void setIncludeESBFlag(int includeESBFlag) {
this.includeESBFlag = includeESBFlag;
}
}

View File

@@ -52,4 +52,6 @@ public interface IRepositoryPrefConstants {
public static final String ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS = "allow_specific_characters_for_schema_columns";
public static final String REF_PROJECT_BRANCH_SETTING = "ref_project_branch_setting";
public static final String ITEM_EXPORT_DEPENDENCIES = "item_export_dependencies";
}

View File

@@ -119,7 +119,7 @@ public final class RepositoryManager {
}
public static void syncUserComponents() {
if (PluginChecker.isSVNProviderPluginLoaded()) {
if (PluginChecker.isRemoteProviderPluginLoaded()) {
IComponentsService codeGenService = (IComponentsService) GlobalServiceRegister.getDefault().getService(
IComponentsService.class);
if (codeGenService != null) {

View File

@@ -12,9 +12,23 @@
// ============================================================================
package org.talend.core.model.routines;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.Assert;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.RoutinesJarItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.runtime.repository.item.ItemProductKeys;
import org.talend.cwm.helper.ResourceHelper;
import org.talend.designer.core.model.utils.emf.component.IMPORTType;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.IProxyRepositoryService;
/**
* Could get most of codesjar's attribute in EMF model but some are lost when model is unloaded. Store those attributes
@@ -23,7 +37,7 @@ import org.talend.repository.ProjectManager;
public class CodesJarInfo {
private Property property;
private static final String EMPTY_DATE;
private String projectTechName;
@@ -35,24 +49,47 @@ public class CodesJarInfo {
private ERepositoryObjectType type;
private CodesJarInfo() {
private List<IMPORTType> imports;
private String modifiedDate;
static {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(0);
EMPTY_DATE = ResourceHelper.dateFormat().format(c.getTime());
}
private CodesJarInfo() {
imports = new ArrayList<>();
}
public static CodesJarInfo create(Property property) {
Assert.isTrue(property.getItem() instanceof RoutinesJarItem);
CodesJarInfo info = new CodesJarInfo();
info.property = property;
info.projectTechName = ProjectManager.getInstance().getProject(property).getTechnicalLabel();
info.id = property.getId();
info.label = property.getLabel();
info.version = property.getVersion();
info.type = ERepositoryObjectType.getItemType(property.getItem());
if (((RoutinesJarItem) property.getItem()).getRoutinesJarType() != null) {
info.imports.addAll(((RoutinesJarItem) property.getItem()).getRoutinesJarType().getImports());
}
String modifiedDate = (String) property.getAdditionalProperties().get(ItemProductKeys.DATE.getModifiedKey());
info.modifiedDate = StringUtils.isNotBlank(modifiedDate) ? modifiedDate : EMPTY_DATE;
return info;
}
public Property getProperty() {
return property;
}
try {
IRepositoryViewObject obj = IProxyRepositoryService.get().getProxyRepositoryFactory().getLastVersion(id);
if (obj != null) {
return obj.getProperty();
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
return null;
}
public String getProjectTechName() {
return projectTechName;
@@ -74,6 +111,14 @@ public class CodesJarInfo {
return type;
}
public List<IMPORTType> getImports() {
return imports;
}
public String getModifiedDate() {
return modifiedDate;
}
public boolean isInCurrentMainProject() {
return projectTechName.equals(ProjectManager.getInstance().getCurrentProject().getTechnicalLabel());
}
@@ -82,36 +127,42 @@ public class CodesJarInfo {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((projectTechName == null) ? 0 : projectTechName.hashCode());
result = prime * result + ((property == null) ? 0 : property.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((label == null) ? 0 : label.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
result = prime * result + ((version == null) ? 0 : version.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
if (this == obj)
return true;
}
if (obj == null) {
if (obj == null)
return false;
}
if (getClass() != obj.getClass()) {
if (getClass() != obj.getClass())
return false;
}
CodesJarInfo other = (CodesJarInfo) obj;
if (projectTechName == null && other.projectTechName != null) {
return false;
} else if (!projectTechName.equals(other.projectTechName)) {
return false;
}
if (property == null && other.property != null) {
return false;
} else if (property != null && other.property != null) {
if (!property.getId().equals(other.property.getId()) || !property.getLabel().equals(other.property.getLabel())
|| !property.getVersion().equals(other.property.getVersion())) {
if (id == null) {
if (other.id != null)
return false;
}
}
} else if (!id.equals(other.id))
return false;
if (label == null) {
if (other.label != null)
return false;
} else if (!label.equals(other.label))
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
if (version == null) {
if (other.version != null)
return false;
} else if (!version.equals(other.version))
return false;
return true;
}

View File

@@ -21,14 +21,13 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import org.apache.commons.lang.StringUtils;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.PatternCompiler;
@@ -36,8 +35,7 @@ import org.apache.oro.text.regex.Perl5Compiler;
import org.apache.oro.text.regex.Perl5Matcher;
import org.apache.oro.text.regex.Perl5Substitution;
import org.apache.oro.text.regex.Util;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.utils.PasswordEncryptUtil;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.language.ECodeLanguage;
@@ -50,14 +48,16 @@ import org.talend.core.model.metadata.types.JavaTypesManager;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IContextManager;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.repository.IRepositoryPrefConstants;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.services.IGenericDBService;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.repository.model.RepositoryConstants;
import delight.rhinosandox.RhinoSandbox;
import delight.rhinosandox.RhinoSandboxes;
/**
* Utilities to work with IContextParamet objects. <br/>
*
@@ -84,6 +84,12 @@ public final class ContextParameterUtils {
private static final String NON_CONTEXT_PATTERN = "[^a-zA-Z0-9_]"; //$NON-NLS-1$
private static final RhinoSandbox SANDBOX = RhinoSandboxes.create();
private static final Map<String, Object> CTX_VARS_LAST = new HashMap<String, Object>();
private static ReadWriteLock CTX_VARS_LOCK = new ReentrantReadWriteLock();
/**
* Constructs a new ContextParameterUtils.
*/
@@ -206,10 +212,37 @@ public final class ContextParameterUtils {
}
}
private static ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript");
public static ScriptEngine getScriptEngine() {
return engine;
private static String preProcessScript(String script) {
String newCode = script;
CTX_VARS_LOCK.readLock().lock();
try {
Set<Entry<String, Object>> entries = CTX_VARS_LAST.entrySet();
for (Entry<String, Object> entry : entries) {
String val = entry.getValue().toString();
if (entry.getValue() instanceof String) {
val = "\"" + val.replace("\"", "\\\"") + "\"";
}
newCode = newCode.replace(JAVA_NEW_CONTEXT_PREFIX + entry.getKey(), val);
}
} finally {
CTX_VARS_LOCK.readLock().unlock();
}
return newCode;
}
public static boolean isValidLiteralValue(String value) {
String newCode = preProcessScript(value);
try {
SANDBOX.eval(null, newCode);
return true;
} catch (Exception e) {
// ignore
}
return false;
}
public static String convertContext2Literal4AnyVar(final String code, final IContext context) {
@@ -223,23 +256,22 @@ public final class ContextParameterUtils {
Object result = code;
if (engine == null) {
engine = new ScriptEngineManager().getEngineByName("JavaScript");
Map<String, Object> varMap = getVarMapForScriptEngine(context);
CTX_VARS_LOCK.writeLock().lock();
try {
CTX_VARS_LAST.clear();
CTX_VARS_LAST.putAll(varMap);
} finally {
CTX_VARS_LOCK.writeLock().unlock();
}
if (engine == null) {
throw new RuntimeException("can't find the script engine");
}
String newCode = preProcessScript(code);
Bindings binding = engine.getBindings(ScriptContext.ENGINE_SCOPE);
if (binding != null) {
binding.clear();
Map<String, Object> varMap = getVarMapForScriptEngine(context);
binding.put("context", varMap);
}
try {
String replacement = " ";
result = engine.eval(code.replace("\r\n", replacement).replace("\n", replacement).replace("\r", replacement));
result = SANDBOX.eval(null,
newCode.replace("\r\n", replacement).replace("\n", replacement).replace("\r", replacement));
} catch (Exception e) {
// ignore the exception
}
@@ -617,8 +649,12 @@ public final class ContextParameterUtils {
}
private static boolean isAllowSpecificCharacters() {
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
return coreUIPluginNode.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
if (Platform.isRunning()) {
return CoreRuntimePlugin.getInstance().getProjectPreferenceManager().isAllowSpecificCharacters();
} else {
// Can not get the value if current code is not working in studio
return false;
}
}
public static boolean isEmptyParameter(String source) {

View File

@@ -27,9 +27,6 @@ import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.script.ScriptEngine;
import javax.script.ScriptException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.components.ComponentCategory;
import org.talend.core.model.components.IComponent;
@@ -418,6 +415,52 @@ public class NodeUtil {
return conns;
}
/**
* DOC
* <p>
* The method searches for the incoming node connections of type
* on a processing path and returns the first ones only
* </p>
*
* @param node
* @param type - node type to look for
* @return
*/
public static List<? extends IConnection> getFirstIncomingLineConnectionsOfType(INode node, String type) {
if (type == null)
return new ArrayList<IConnection>();
Set<String> uniqueNamesDone = new HashSet<String>();
List<? extends IConnection> allIncomingConnections = getFirstIncomingLineConnectionsOfType(node, uniqueNamesDone, type);
return allIncomingConnections;
}
private static List<? extends IConnection> getFirstIncomingLineConnectionsOfType(INode node, Set<String> uniqueNamesDone, String type) {
List<IConnection> conns = new ArrayList<IConnection>();
List<? extends IConnection> incomingConnections = node.getIncomingConnections();
if (incomingConnections != null) {
for (int i = 0; i < incomingConnections.size(); i++) {
IConnection connection = incomingConnections.get(i);
INode nextNode = connection.getSource();
if (!uniqueNamesDone.contains(nextNode.getUniqueName())) {
uniqueNamesDone.add(nextNode.getUniqueName());
if (type.equals((String)nextNode.getElementParameter("COMPONENT_NAME").getValue())) {
conns.add(connection);
} else {
conns.addAll(getFirstIncomingLineConnectionsOfType(nextNode, uniqueNamesDone, type)); // follow this way
}
}
}
}
return conns;
}
public static INode getFirstMergeNode(INode node) {
INode mergeNode = null;
for (IConnection connection : node.getOutgoingConnections()) {
@@ -1040,14 +1083,7 @@ public class NodeUtil {
}
private static boolean isValidLiteralValue(String value) {
ScriptEngine se = ContextParameterUtils.getScriptEngine();
if(se==null) return true;
try {
se.eval(value);
return true;
} catch (ScriptException e) {
return false;
}
return ContextParameterUtils.isValidLiteralValue(value);
}
private static String checkStringQuotationMarks(String str) {

View File

@@ -16,8 +16,10 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -97,6 +99,8 @@ public class NexusServerUtils {
}
final boolean status[] = { false };
try {
URI uri = new URI(nexusURL);
uri.toURL();
NullProgressMonitor monitor = new NullProgressMonitor();
new HttpClientTransport(nexusURL, username, password) {
@@ -142,6 +146,8 @@ public class NexusServerUtils {
}
final List<HttpResponse> httpResponse = new ArrayList<>();
try {
URI uri = new URI(nexusURL);
uri.toURL();
NullProgressMonitor monitor = new NullProgressMonitor();
new HttpClientTransport(nexusURL, username, password) {
@@ -160,6 +166,7 @@ public class NexusServerUtils {
} catch (Exception e) {
ExceptionHandler.process(e);
return null;
}
return httpResponse.get(0);
}

View File

@@ -114,7 +114,7 @@ public interface ITalendCorePrefConstants {
public static final String DATA_COLLECTOR_PREVIEW = "data_collector_preview"; //$NON-NLS-1$
public static final String DATA_COLLECTOR = "data_collector"; //$NON-NLS-1$
public static final String EXCHANGE_CHECK_TIS_VERSION = "exchange_check_tis_version"; //$NON-NLS-1$
public static final String EXCHANGE_DOWNLOADED_CHECK_UPDATES = "exchange_downloaded_check_updates"; //$NON-NLS-1$

View File

@@ -126,6 +126,9 @@ public abstract class AbstractPropertyValueEvaluator implements PropertyValueEva
}
if (GenericTypeUtils.isStringType(property)) {
if (property.isFlag(Property.Flags.ENCRYPT)) {
return TalendQuoteUtils.removeQuotes(stringValue);
}
return TalendQuoteUtils.removeQuotes(StringEscapeUtils.unescapeJava(stringValue));
}
return rawValue;

View File

@@ -36,6 +36,8 @@ public interface MavenConstants {
static final String DEFAULT_GROUP_ID = "org.talend";
static final String APACHE_GROUP_ID = "org.apache";
static final String DEFAULT_VERSION = "6.0.0";
static final String SNAPSHOT = "-SNAPSHOT";
@@ -46,6 +48,8 @@ public interface MavenConstants {
static final String EXCLUDE_DELETED_ITEMS = "EXCLUDE_DELETED_ITEMS";
static final String SKIP_LOOP_DEPENDENCY_CHECK = "SKIP_LOOP_DEPENDENCY_CHECK";
static final String SKIP_FOLDERS = "SKIP_FOLDERS";
/*

View File

@@ -80,4 +80,13 @@ public interface TalendProcessOptionConstants {
*/
public static final int MODULES_WITH_CODESJAR = 1 << 6;
/**
* flag for check if is ESB job
*/
public static final int ISESB_CHECKED = 1;
public static final int ISESB_CHILDREN_INCLUDE = 1 << 1;
public static final int ISESB_CURRENT_INCLUDE = 1 << 2;
}

View File

@@ -15,6 +15,7 @@ package org.talend.core.runtime.projectsetting;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.Assert;
@@ -27,6 +28,7 @@ import org.talend.commons.exception.PersistenceException;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.general.Project;
import org.talend.core.model.repository.IRepositoryPrefConstants;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.repository.ProjectManager;
import org.talend.repository.documentation.ERepositoryActionName;
@@ -195,7 +197,19 @@ public class ProjectPreferenceManager {
// return qulifierPreference.getBoolean(key, false);
return getPreferenceStore().getBoolean(key);
}
public boolean isAllowSpecificCharacters() {
String value = getValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS);
if (StringUtils.isNotEmpty(value)) {
return Boolean.valueOf(value);
}
return false; // Default value
}
public void setAllowSpecificCharacters(boolean isAllow) {
setValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, isAllow);
}
/**
* Save the configurations.
*/

View File

@@ -14,17 +14,16 @@ package org.talend.core.runtime.services;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.routines.CodesJarInfo;
public interface IDesignerMavenService extends IService {
String getCodesJarPackageByInnerCode(RoutineItem innerCodeItem);
String getImportGAVPackageForCodesJar(String projectTechName, Item codesJarItem);
String getImportGAVPackageForCodesJar(CodesJarInfo info);
void updateCodeJarMavenProject(Property codeJarProperty, boolean needReSync) throws Exception;
void updateCodeJarMavenProject(CodesJarInfo info, boolean needReSync) throws Exception;
public static IDesignerMavenService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMavenService.class)) {

View File

@@ -150,6 +150,8 @@ public interface IGenericWizardService extends IService {
*/
public ITreeContextualAction getDefaultAction(RepositoryNode node);
public ITreeContextualAction getGenericAction(String typeName, String location);
public void loadAdditionalJDBC();
public List<String> getAllAdditionalJDBCTypes();

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