Compare commits

..

29 Commits

Author SHA1 Message Date
oleksandr
9c3d2cfad4 TAC-15694 (#4757)
[7.2.1] TAC jobs cant be killed, and incorrect status reported

Co-authored-by: oleksandr <ovelychko@talend.com>
2021-11-03 20:41:32 +08:00
AlixMetivier
ca9868e83f fix(TBD-10269): force return in case of bad job design (#3287) (#3342) 2020-05-27 15:59:28 +02:00
kjwang
b961dc9002 Fix TUP-26288_Enhance context joblet build in param internal id change (#3331)
problem
https://jira.talendforge.org/browse/TUP-26288
2020-05-26 18:47:10 +08:00
kjwang
ff56cbc16b Fix TUP-26639 Talend Cloud studio Issue -Changes to Context Parameter (#3330)
* Fix TUP-26639 Talend Cloud studio Issue -Changes to Context Parameter
Names is not reflected on the Connection for Snowflake

* Fix TUP-26639 Talend Cloud studio Issue -Changes to Context Parameter
Names is not reflected on the Connection for Snowflake
2020-05-26 18:14:07 +08:00
kjwang
096be8c100 kjwang/Fix TUP-26288 Fix salesforce context var update issue (#3326)
https://jira.talendforge.org/browse/TUP-26288
2020-05-25 15:35:47 +08:00
kjwang
e5ef1fc64d Kjwang/temp 3840 (#3324)
TUP-26696 Enhance context propagation over reference project -
Propagation
https://jira.talendforge.org/browse/TUP-26696
2020-05-22 18:23:54 +08:00
AlixMetivier
f51d183a96 fix(TBD-10370):"Hadoop configuration jar not found" when run spark job (#3221) (#3323)
Co-authored-by: Zhiwei Xue <zwxue@talend.com>
2020-05-22 10:24:19 +02:00
hcyi
7d3efda121 fix(TUP-27000):Talend Salesforce Einstein connector Repository (#3274)
connection issue in Talend 7.3
2020-05-22 12:44:04 +08:00
Chao MENG
c2ca0d161e feat(TUP-26569): merge known conflicts automatically
https://jira.talendforge.org/browse/TUP-26569
2020-05-22 11:11:56 +08:00
Jane Ding
cbd0b4035a fix(TUP-27003):Should disable the Commit button of Uncommitted files (#3273) (#3319)
found dialog when project is in MERGING state
https://jira.talendforge.org/browse/TUP-27003
2020-05-22 10:48:26 +08:00
hwang-talend
5ab96746ea Hwang/tup 26994 (#3282)
* bugfix(TUP-26994):Usage data collector : change the way Studio Unique Id
is calculated
2020-05-21 11:12:25 +08:00
zhangjie
da086ac7d1 feat(TUP-26284)Upgrade AWS SDK for driver in metadata 2020-05-21 11:08:45 +08:00
jiezhang-tlnd
52b5a1dd48 Jzhang/feat/tup 26284 upgrade aws sdk for driver in metadata (#3244)
* feat(TUP-26284)Upgrade AWS SDK for driver in metadata

* feat(TUP-26284)update other jar except aws-java-sdk
2020-05-21 11:08:25 +08:00
Jane Ding
4cec5920fc Jding/patch731/tup 26639 group context and connection issue (#3261)
* fix(TUP-26639):Talend Cloud studio Issues - Group context and (#3233) (#3243)

connections
https://jira.talendforge.org/browse/TUP-26639

* fix(TUP-26639):Talend Cloud studio Issue -Changes to Context Parameter (#3249) (#3256)

* fix(TUP-26639):Talend Cloud studio Issue -Changes to Context Parameter
Names is not reflected on the Connection for Snowflake
https://jira.talendforge.org/browse/TUP-26639

* fix(TUP-26639):Talend Cloud studio Issue -Changes to Context Parameter
Names is not reflected on the Connection for Snowflake
https://jira.talendforge.org/browse/TUP-26639

* fix(TUP-26639):Talend Cloud studio Issue -Changes to Context Parameter
Names is not reflected on the Connection for Snowflake
https://jira.talendforge.org/browse/TUP-26639
2020-05-21 11:05:16 +08:00
hwang-talend
fc00adcb09 Hwang/tup 26870 (#3214)
* bugfix(TUP-26870):Incorrect sorting order
2020-05-19 14:41:16 +08:00
Zhiwei Xue
5d6e0f5bc3 fix(TUP-26961):When save/delete a test case, it might break the poms/CI (#3253) 2020-05-19 14:38:45 +08:00
hwang-talend
56f2c1a39f bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries (#3246)
* bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries
for better understanding

* bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries
for better understanding

* bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries
for better understanding

* bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries
for better understanding

* bugfix(TUP-26956):Update Studio top bar to reflect monthly deliveries
for better understanding
2020-05-19 14:36:23 +08:00
Jane Ding
05c389a58c feat(TUP-16546)Prompt users for new password in Studio Connection when (#3119) (#3251)
* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546
2020-05-19 14:27:24 +08:00
Zhiwei Xue
2074d44db6 fix(TUP-27077): NoClassDefFoundException when using "independent process (#3286)
to run subjob" and tAzureAdlsGen2Input
2020-05-14 20:08:37 +08:00
Liu Xinquan
103829ad63 fix(TDQ-18049) add the "transform" to avoid class conflict when shaded (#3085) (#3263)
Co-authored-by: qiongli <qiongli@talend.com>
2020-05-11 09:55:03 +08:00
Liu Xinquan
25241eaf13 fix(TDQ-18322) throw NPE when retrieve the schema on Sybase (#3234) (#3248) 2020-05-08 21:12:01 +08:00
Zhiwei Xue
544535ecc7 fix(TUP-26809):Job zip should not contain jars from testcase only (#3237) 2020-04-27 17:59:28 +08:00
Zhiwei Xue
6fd415e029 Patch/7.3.1 TPS-3839 monthly patch backport (#3222)
* fix(TUP-26596)Proxy of libraries not working when studio have no (#3165) (#3172)

* fix(TUP-26596)Proxy of libraries not working when studio have no
internet access

* fix(TUP-26596)Proxy of libraries not working when studio have no
internet access

* fix(TUP-26596)Proxy of libraries not working when studio have no
internet access

* fix(TUP-26596)Proxy of libraries not working when studio have no
internet access

* fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure (#3101) (#3114)

* fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure

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

* fix(TUP-26793)JDBC Redshift in context mode still asked for jars
https://jira.talendforge.org/browse/TUP-26793

* fix(TUP-26212): Share more than one car component to nexus3.19.1 will fail to generate the right index file (#3100) (#3120)

* fix(TUP-26212): Share more than one car component to nexus3.19.1 will
fail to generate the right index file

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

* fix(TUP-26212): Share more than one car component to nexus3.19.1 will
fail to generate the right index file

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

Co-authored-by: bhe-talendbj <52311292+bhe-talendbj@users.noreply.github.com>

* fix(TUP-26539): Unassociate data from associateListeners (#3169)

* fix(TUP-26539): Fix wrong tree node implmentation

* fix(TUP-26539): add test case

* fix(TUP-26539): Remove reference to itself

* fix(TUP-26539): Return root node

* fix(TUP-26539): Update test case

* fix(TUP-26539): update test case

* fix(TUP-26539): Unassociate unnecessary listeners

* fix(TUP-26539): Revert changes of RepositoryNode

* fix(TUP-26539): Add override annotation

* fix(TUP-26876):NoClassDefFoundError when I run spark job with JobServer

Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>
Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: zhangjie <jie.zhang@talend.com>
Co-authored-by: Chao MENG <cmeng@talend.com>
Co-authored-by: bhe-talendbj <52311292+bhe-talendbj@users.noreply.github.com>
2020-04-17 14:44:26 +08:00
Liu Xinquan
93f0c89ae0 fix(TDQ-18135) support context variable in tDataEncrypt (#3180) (#3207) 2020-04-15 15:55:10 +08:00
Zhiwei Xue
89dd33e3b7 fix(TUP-26728):fix regression on preview function. 2020-04-09 11:25:39 +08:00
Zhiwei Xue
4f411af729 fix(TUP-26728):Missing spark dependencies when using test cases 2020-04-08 23:34:13 +08:00
Zhiwei Xue
f8b1e6ae34 fix(TUP-26728):The parent DI job misses to load some required libraries
from the Spark job
2020-04-07 17:46:45 +08:00
Jane Ding
4931b8835e fix(TUP-26576):Warning pops up cannot connect to the user libraries (#3154) (#3164)
artifact repository set in administrator
https://jira.talendforge.org/browse/TUP-26576
2020-03-26 11:04:55 +08:00
Zhiwei Xue
b067d61afd fix(TUP-26165):fix jar with classifier missing issue (#3152)
* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP (#3105)

* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP
file folder lib
https://jira.talendforge.org/browse/TUP-26165

* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP
file folder lib
https://jira.talendforge.org/browse/TUP-26165

* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP
file folder lib
https://jira.talendforge.org/browse/TUP-26165

* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP
file folder lib
https://jira.talendforge.org/browse/TUP-26165

* fix(TUP-26165)jar referenced in bat or sh classpath missing in build ZIP
file folder lib
https://jira.talendforge.org/browse/TUP-26165

* fix(TUP-26165):fix jar with classifier missing issue

Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
2020-03-20 21:01:31 +08:00
553 changed files with 3647 additions and 14354 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.3.1-PATCH</version>
<version>7.3.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.di.feature</artifactId>

View File

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

View File

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

View File

@@ -13,6 +13,7 @@
<plugin id="org.talend.libraries.jdbc.ingres" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.mysql" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.paraccel" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.postgresql" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.sqlite3" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.jdbc.teradata" download-size="0" install-size="0" version="0.0.0"/>
</feature>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

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

View File

@@ -166,7 +166,6 @@ public enum ECoreImage implements IImage {
RECYCLE_BIN_OVERLAY("/icons1/recycle_bin_overlay.gif"), //$NON-NLS-1$
DELETED_OVERLAY("/icons1/deleted_overlay.gif"), //$NON-NLS-1$
IMPORT_JAR("/icons1/importjar.gif"), //$NON-NLS-1$
SHARE_LIBS("/icons1/share.png"), //$NON-NLS-1$
REFERENCED_ICON("/icons1/referenced.png"), //$NON-NLS-1$
CDC_ADDED_OVERLAY("/icons1/cdc_added_overlay.png"), //$NON-NLS-1$

View File

@@ -16,8 +16,6 @@ import org.eclipse.core.internal.runtime.InternalPlatform;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.BundleContext;
/**
*
* DOC root class global comment. Detailled comment <br/>
@@ -54,9 +52,5 @@ public class WindowSystem {
public static boolean isOSX() {
return Platform.WS_CARBON.equals(ws) || Platform.WS_COCOA.equals(ws);
}
public static boolean isBigSurOrLater () {
return isOSX() && ("10.16".compareTo(System.getProperty("os.version","0")) <= 0);
}
}

View File

@@ -14,10 +14,7 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
com.ibm.icu,
org.apache.commons.io,
org.talend.utils,
org.eclipse.core.net,
org.eclipse.m2e.core,
org.eclipse.m2e.maven.runtime,
org.eclipse.core.resources
org.eclipse.core.net
Export-Package: org.talend.commons,
org.talend.commons.exception,
org.talend.commons.i18n,

View File

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

View File

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

View File

@@ -111,8 +111,7 @@ public class CommonsPlugin implements BundleActivator {
}
public static boolean isDebugMode() {
return Boolean.getBoolean("talendDebug") //$NON-NLS-1$
|| ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
return ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
}
public static boolean isJUnitTest() {

View File

@@ -1,60 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils;
import java.io.File;
import java.nio.file.Path;
import org.eclipse.m2e.core.MavenPlugin;
public enum MojoType {
CI_BUILDER("org.talend.ci", "builder-maven-plugin", "ci.builder.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
CLOUD_PUBLISHER("org.talend.ci", "cloudpublisher-maven-plugin", "cloud.publisher.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SIGNER("org.talend.ci", "signer-maven-plugin", "signer.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
OSGI_HELPER("org.talend.ci", "osgihelper-maven-plugin", "osgihelper.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
private String groupId;
private String artifactId;
private String versionKey;
private MojoType(String groupId, String artifactId, String versionKey) {
this.groupId = groupId;
this.artifactId = artifactId;
this.versionKey = versionKey;
}
public String getGroupId() {
return groupId;
}
public String getArtifactId() {
return artifactId;
}
public String getVersionKey() {
return versionKey;
}
public String getMojoArtifactIdFolder() {
Path basePath = new File(MavenPlugin.getMaven().getLocalRepositoryPath()).toPath();
return basePath.resolve(getGroupId().replaceAll("\\.", "/")).resolve(getArtifactId()).toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getMojoGAV() {
return getGroupId() + ":" + getArtifactId() + ":" + getVersionKey(); //$NON-NLS-1$ //$NON-NLS-2$
}
}

View File

@@ -15,17 +15,15 @@ package org.talend.commons.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Optional;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
@@ -232,50 +230,10 @@ public class VersionUtils {
* Check if studio version < other studio version record in remote project.
*/
public static boolean isInvalidProductVersion(String remoteFullProductVersion) {
String localProductVersion = getInternalVersion();
return isInvalidProductVersion(localProductVersion, remoteFullProductVersion);
}
protected static boolean isInvalidProductVersion(String localProductVersion, String remoteFullProductVersion) {
if (remoteFullProductVersion == null) {
return false;
}
if (skipCheckingNightlyBuilds(localProductVersion, remoteFullProductVersion)) {
return false;
}
return localProductVersion.compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
}
public static boolean productVersionIsNewer(String remoteFullProductVersion) {
String localProductVersion = getInternalVersion();
return productVersionIsNewer(localProductVersion, remoteFullProductVersion);
}
protected static boolean productVersionIsNewer(String localProductVersion, String remoteFullProductVersion) {
if (remoteFullProductVersion == null) {
return false;
}
if (skipCheckingNightlyBuilds(localProductVersion, remoteFullProductVersion)) {
return false;
}
return localProductVersion.compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) > 0;
}
private static boolean skipCheckingNightlyBuilds(String localProductVersion, String remoteFullProductVersion) {
String separator = "-"; //$NON-NLS-1$
String localSuffix = StringUtils.substringAfterLast(localProductVersion, separator);
String remoteProductVersion = getProductVersionWithoutBranding(remoteFullProductVersion);
String remoteSuffix = StringUtils.substringAfterLast(remoteProductVersion, separator);
String nightly = "SNAPSHOT"; //$NON-NLS-1$
String milestone = "M"; //$NON-NLS-1$
if ((localSuffix.equals(nightly) || localSuffix.startsWith(milestone))
&& (remoteSuffix.equals(nightly) || remoteSuffix.startsWith(milestone))) {
// skip checking between nightly/milestone build.
return true;
}
return false;
return getInternalVersion().compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
}
public static String getTalendVersion(String productVersion) {
@@ -304,28 +262,24 @@ public class VersionUtils {
return version;
}
public static String getMojoVersion(MojoType mojoType) {
String mojoKey = mojoType.getVersionKey();
String version = System.getProperty(mojoKey);
if (StringUtils.isNotBlank(version)) {
return version;
}
public static String getMojoVersion(String mojoKey) {
String version = null;
String talendVersion = getTalendVersion();
String majorVersion = StringUtils.substringBeforeLast(talendVersion, "."); //$NON-NLS-1$
String artifactIdFolder = mojoType.getMojoArtifactIdFolder();
Optional<File> optional = Stream.of(new File(artifactIdFolder).listFiles())
.filter(f -> f.isDirectory() && f.getName().startsWith(majorVersion))
.sorted((f1, f2) -> new DefaultArtifactVersion(f2.getName()).compareTo(new DefaultArtifactVersion(f1.getName())))
.findFirst();
if (optional.isPresent()) {
File latestArtifact = optional.get();
String fileName = mojoType.getArtifactId() + "-" + latestArtifact.getName(); //$NON-NLS-1$
if (Stream.of(latestArtifact.listFiles())
.filter(f -> f.getName().equals(fileName + ".jar") || f.getName().equals(fileName + ".pom")) //$NON-NLS-1$ //$NON-NLS-2$
.count() != 2) {
ExceptionHandler.process(new Exception("Can't find plugin artifact " + mojoType.getMojoGAV())); //$NON-NLS-1$
Properties properties = new Properties();
File file = new Path(Platform.getConfigurationLocation().getURL().getPath()).append("mojo_version.properties").toFile(); //$NON-NLS-1$
if (file.exists()) {
try (InputStream inStream = new FileInputStream(file)) {
properties.load(inStream);
version = properties.getProperty(mojoKey);
} catch (IOException e) {
ExceptionHandler.process(e);
}
if (version != null && !version.startsWith(talendVersion)) {
ExceptionHandler
.process(new Exception(
"Incompatible Mojo version:" + mojoKey + "[" + version + "], use default version.")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
version = null;
}
version = latestArtifact.getName();
}
// default version
if (StringUtils.isBlank(version)) {
@@ -339,7 +293,6 @@ public class VersionUtils {
version += "-" + revision; //$NON-NLS-1$
}
}
System.setProperty(mojoKey, version);
return version;
}
@@ -349,25 +302,4 @@ public class VersionUtils {
talendVersion = null;
}
}
public static String getSimplifiedPatchName(String projectPatchName) {
if (projectPatchName != null) {
String result = null;
if (projectPatchName.contains("_") && projectPatchName.split("_").length >= 3) {
result = projectPatchName.split("_")[2];
if (!result.startsWith("R")) {
return null;
}
}
if (projectPatchName.contains("-")) {
String[] split = projectPatchName.split("-");
if (split != null && split.length > 0) {
return result + "-" + split[split.length - 1];
}
}
}
return null;
}
}

View File

@@ -148,7 +148,7 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
}
// For Calculation View
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3]) && "_SYS_BIC".equalsIgnoreCase(schemaPattern)) { //$NON-NLS-1$
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3])) {
// 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$
@@ -171,7 +171,7 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
packageId = packageId.trim();
}
String name = packageId + "/" + objectName; //$NON-NLS-1$
String[] r = new String[] { "", schemaPattern, name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$
String[] r = new String[] { "", "_SYS_BIC", name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
listcv.add(r);
}
} catch (SQLException e) {
@@ -355,16 +355,4 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
tableResultSet.setData(list);
return tableResultSet;
}
@Override
public String getDatabaseProductName() throws SQLException {
return this.connection.getMetaData().getDatabaseProductName();
}
@Override
public String getDatabaseProductVersion() throws SQLException {
return this.connection.getMetaData().getDatabaseProductVersion();
}
}

View File

@@ -1,121 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.database;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
/**
* created by qiongli on 2013-11-13 Detailled comment
*
*/
public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
private static Logger log = Logger.getLogger(Sybase16SADatabaseMetaData.class);
/**
* DOC qiongli SybaseIQDatabaseMetaData constructor comment.
*
* @param connection
* @throws SQLException
*/
public Sybase16SADatabaseMetaData(Connection connection) throws SQLException {
super(connection);
}
public ResultSet getCatalogs(String login, String database) throws SQLException {
List<String[]> list = new ArrayList<String[]>();
List<String> catList = new ArrayList<String>();
if (!StringUtils.isEmpty(database)) {
catList.add(database);
}
for (String catalogName : catList) {
String sql = createSqlByLoginAndCatalog(login, catalogName);
ResultSet rs = null;
Statement stmt = null;
try {
stmt = connection.createStatement();
rs = stmt.executeQuery(sql);
while (rs.next()) {
int temp = rs.getInt(1);
if (temp > 0) {
String[] r = new String[] { catalogName };
list.add(r);
}
}
} catch (SQLException e) {
log.error(e);
} finally {
try {
if (rs != null) {
rs.close();
}
if (stmt != null) {
stmt.close();
}
} catch (Exception e) {
log.error(e);
}
}
}
SybaseResultSet tableResultSet = new SybaseResultSet();
tableResultSet.setMetadata(new String[] { "TABLE_CAT" }); //$NON-NLS-1$
tableResultSet.setData(list);
return tableResultSet;
}
@Override
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
throws SQLException {
return super.getColumns(null, schemaPattern, tableNamePattern, columnNamePattern);
}
@Override
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
return super.getPrimaryKeys(null, schema, table);
}
@Override
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
throws SQLException {
return super.getTables(null, schemaPattern, tableNamePattern, types);
}
/**
*
* get a sql query by login name and catalog name.
*
* @param loginName
* @param catalogName
* @return
*/
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
+ "')";
return sql;
}
}

View File

@@ -1,18 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.network;
public interface ITalendNexusPrefConstants {
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
}

View File

@@ -15,7 +15,6 @@ package org.talend.commons.utils.network;
import java.lang.reflect.Field;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.PasswordAuthentication;
@@ -23,17 +22,10 @@ import java.net.SocketException;
import java.net.URI;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.runtime.utils.io.FileCopyUtils;
/**
@@ -52,17 +44,7 @@ public class NetworkUtil {
private static final String HTTP_NETWORK_URL = "https://talend-update.talend.com";
private static final int DEFAULT_TIMEOUT = 4000;
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
public static boolean isNetworkValid() {
return isNetworkValid(DEFAULT_TIMEOUT);
}
public static boolean isNetworkValid(Integer timeout) {
String disableInternet = System.getProperty(TALEND_DISABLE_INTERNET);
if ("true".equals(disableInternet)) { //$NON-NLS-1$
return false;
@@ -73,9 +55,8 @@ public class NetworkUtil {
conn = (HttpURLConnection) url.openConnection();
conn.setDefaultUseCaches(false);
conn.setUseCaches(false);
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
conn.setConnectTimeout(conntimeout);
conn.setReadTimeout(conntimeout);
conn.setConnectTimeout(4000);
conn.setReadTimeout(4000);
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
String strMessage = conn.getResponseMessage();
if (strMessage.compareTo("Not Found") == 0) { //$NON-NLS-1$
@@ -92,23 +73,22 @@ public class NetworkUtil {
return true;
}
public static boolean isNetworkValid(String url, Integer timeout) {
public static boolean isNetworkValid(String url) {
if (url == null) {
return isNetworkValid(timeout);
return isNetworkValid();
}
return checkValidWithHttp(url, timeout);
return checkValidWithHttp(url);
}
private static boolean checkValidWithHttp(String urlString, Integer timeout) {
private static boolean checkValidWithHttp(String urlString) {
HttpURLConnection conn = null;
try {
URL url = new URL(urlString);
conn = (HttpURLConnection) url.openConnection();
conn.setDefaultUseCaches(false);
conn.setUseCaches(false);
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
conn.setConnectTimeout(conntimeout);
conn.setReadTimeout(conntimeout);
conn.setConnectTimeout(4000);
conn.setReadTimeout(4000);
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
conn.getResponseMessage();
} catch (Exception e) {
@@ -121,18 +101,6 @@ public class NetworkUtil {
return true;
}
public static int getNexusTimeout() {
int timeout = DEFAULT_NEXUS_TIMEOUT;
try {
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
} catch (Throwable e) {
ExceptionHandler.process(e);
}
return timeout;
}
public static Authenticator getDefaultAuthenticator() {
try {
Field theAuthenticatorField = Authenticator.class.getDeclaredField("theAuthenticator");
@@ -155,28 +123,6 @@ public class NetworkUtil {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
String httpProxyHost = System.getProperty("http.proxyHost"); //$NON-NLS-1$
String httpProxyPort = System.getProperty("http.proxyPort"); //$NON-NLS-1$
String httpsProxyHost = System.getProperty("https.proxyHost"); //$NON-NLS-1$
String httpsProxyPort = System.getProperty("https.proxyPort"); //$NON-NLS-1$
String requestingHost = getRequestingHost();
int requestingPort = getRequestingPort();
String proxyHost = null;
String proxyPort = null;
boolean isHttp = false;
if ("http".equalsIgnoreCase(getRequestingScheme())) {
isHttp = true;
}
if (isHttp && StringUtils.isNotBlank(httpProxyHost)) {
proxyHost = httpProxyHost;
proxyPort = httpProxyPort;
} else {
proxyHost = httpsProxyHost;
proxyPort = httpsProxyPort;
}
if (!StringUtils.equals(proxyHost, requestingHost) || !StringUtils.equals(proxyPort, "" + requestingPort)) {
return null;
}
String httpProxyUser = System.getProperty("http.proxyUser"); //$NON-NLS-1$
String httpProxyPassword = System.getProperty("http.proxyPassword"); //$NON-NLS-1$
String httpsProxyUser = System.getProperty("https.proxyUser"); //$NON-NLS-1$
@@ -194,11 +140,7 @@ public class NetworkUtil {
proxyPassword = httpsProxyPassword.toCharArray();
}
}
if (StringUtils.isBlank(proxyUser)) {
return null;
} else {
return new PasswordAuthentication(proxyUser, proxyPassword);
}
return new PasswordAuthentication(proxyUser, proxyPassword);
}
});
@@ -237,54 +179,6 @@ public class NetworkUtil {
}
}
public static List<String> getLocalLoopbackAddresses(boolean wrapIpV6) {
Set<String> addresses = new LinkedHashSet<>();
try {
addresses.add(getIp(InetAddress.getLoopbackAddress(), wrapIpV6));
} catch (Exception e) {
ExceptionHandler.process(e);
}
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface networkInterface = networkInterfaces.nextElement();
Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
while (inetAddresses.hasMoreElements()) {
InetAddress inetAddress = inetAddresses.nextElement();
if (inetAddress != null && inetAddress.isLoopbackAddress()) {
addresses.add(getIp(inetAddress, wrapIpV6));
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
if (addresses.isEmpty()) {
addresses.add("127.0.0.1");
String ipv6Loopback = "::1";
if (wrapIpV6) {
ipv6Loopback = "[" + ipv6Loopback + "]";
}
addresses.add(ipv6Loopback);
}
return new ArrayList<>(addresses);
}
private static String getIp(InetAddress inetAddress, boolean wrapIpV6) {
if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) {
String addr = inetAddress.getHostAddress();
if (!addr.startsWith("[") || !addr.endsWith("]")) {
addr = "[" + addr + "]";
}
return addr;
} else {
return inetAddress.getHostAddress();
}
}
public static boolean isSelfAddress(String addr) {
if (addr == null || addr.isEmpty()) {
return false; // ?

View File

@@ -25,7 +25,6 @@ import java.net.URISyntaxException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -39,8 +38,6 @@ import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Priority;
import org.eclipse.core.internal.net.ProxyManager;
import org.eclipse.core.internal.net.ProxyType;
import org.eclipse.core.net.proxy.IProxyChangeEvent;
import org.eclipse.core.net.proxy.IProxyService;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
@@ -80,14 +77,6 @@ public class TalendProxySelector extends ProxySelector {
private static final String PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER = "talend.studio.proxy.disableDefaultSelectorProvider";
private static final String PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY = "talend.studio.proxy.excludeLoopbackAutomatically";
private static final String PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY_DEFAULT = "true";
private static final String PROP_PROXY_HTTP_NON_PROXYHOSTS = "http.nonProxyHosts";
private static final String PROP_PROXY_HTTPS_NON_PROXYHOSTS = "https.nonProxyHosts";
/**
* Example: update.talend.com,socket:http,https:http;nexus.talend.com,socket,http;,socket:http
*/
@@ -115,8 +104,6 @@ public class TalendProxySelector extends ProxySelector {
private EProxySelector eProxySelector;
private IProxyService proxyManager;
final private Map<Object, Collection<IProxySelectorProvider>> selectorProviders;
private Map<String, Map<String, String>> hostMap;
@@ -127,10 +114,6 @@ public class TalendProxySelector extends ProxySelector {
private static Object instanceLock = new Object();
private List<String> localLoopbackAddresses;
private Object localLoopbackAddressesLock = new Object();
private boolean printProxyLog = false;
private boolean allowProxyRedirect = false;
@@ -143,8 +126,6 @@ public class TalendProxySelector extends ProxySelector {
private boolean updateSystemPropertiesForJre = true;
private boolean excludeLoopbackAddressAutomatically = false;
private TalendProxySelector(final ProxySelector eclipseDefaultSelector) {
this.eclipseDefaultSelector = eclipseDefaultSelector;
this.jreDefaultSelector = new DefaultProxySelector();
@@ -158,8 +139,6 @@ public class TalendProxySelector extends ProxySelector {
executeConnectionFailed = Boolean.valueOf(System.getProperty(PROP_EXECUTE_CONNECTION_FAILED, Boolean.TRUE.toString()));
updateSystemPropertiesForJre = Boolean
.valueOf(System.getProperty(PROP_UPDATE_SYSTEM_PROPERTIES_FOR_JRE, Boolean.TRUE.toString()));
excludeLoopbackAddressAutomatically = Boolean.valueOf(System.getProperty(
PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY, PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY_DEFAULT));
switch (System.getProperty(PROP_PROXY_SELECTOR, PROP_PROXY_SELECTOR_DEFAULT).toLowerCase()) {
case PROP_PROXY_SELECTOR_JRE:
@@ -169,83 +148,11 @@ public class TalendProxySelector extends ProxySelector {
this.eProxySelector = EProxySelector.eclipse_default;
break;
}
proxyManager = ProxyManager.getProxyManager();
checkProxyManager(IProxyChangeEvent.PROXY_DATA_CHANGED);
proxyManager.addProxyChangeListener(event -> checkProxyManager(event.getChangeType()));
initHostMap();
initRedirectList();
}
private void checkProxyManager(int changeEvent) {
try {
if (IProxyChangeEvent.PROXY_DATA_CHANGED == changeEvent
|| IProxyChangeEvent.NONPROXIED_HOSTS_CHANGED == changeEvent) {
if (this.excludeLoopbackAddressAutomatically && proxyManager.isProxiesEnabled()) {
List<String> addresses = getLocalLoopbackAddresses();
if (addresses != null && !addresses.isEmpty()) {
if (org.eclipse.core.internal.net.ProxySelector
.canSetBypassHosts(org.eclipse.core.internal.net.ProxySelector.getDefaultProvider())) {
List<String> configuredProxies = Arrays.asList(proxyManager.getNonProxiedHosts());
if (!configuredProxies.containsAll(addresses)) {
Set<String> nonProxyHosts = new HashSet<>(addresses);
nonProxyHosts.addAll(configuredProxies);
ExceptionHandler.log(
this.getClass().getName() + ":" + "-D" + PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY
+ "=true, adding missing loopback addresses into eclipse nonProxyHosts: "
+ nonProxyHosts);
proxyManager.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
}
} else {
updateNonProxyHosts(addresses, PROP_PROXY_HTTP_NON_PROXYHOSTS);
updateNonProxyHosts(addresses, PROP_PROXY_HTTPS_NON_PROXYHOSTS);
}
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
private void updateNonProxyHosts(List<String> localLoopbackAddresses, final String nonProxyProperty) {
if (localLoopbackAddresses != null && !localLoopbackAddresses.isEmpty()) {
Set<String> nonProxyHosts = new HashSet<>(localLoopbackAddresses);
String property = System.getProperty(nonProxyProperty);
boolean update = true;
if (StringUtils.isNotBlank(property)) {
List<String> configuredProxies = Arrays.asList(ProxyType.convertPropertyStringToHosts(property));
if (configuredProxies.containsAll(localLoopbackAddresses)) {
update = false;
} else {
nonProxyHosts.addAll(configuredProxies);
}
}
if (update) {
ExceptionHandler.log(this.getClass().getName() + ":" + "-D" + PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY
+ "=true, adding missing loopback addresses into " + nonProxyProperty + ": " + nonProxyHosts);
System.setProperty(nonProxyProperty,
ProxyType.convertHostsToPropertyString(nonProxyHosts.toArray(new String[0])));
}
}
}
private List<String> getLocalLoopbackAddresses() {
if (this.localLoopbackAddresses == null) {
synchronized (localLoopbackAddressesLock) {
if (this.localLoopbackAddresses == null) {
List<String> addresses = NetworkUtil.getLocalLoopbackAddresses(false);
final String localhost = "localhost";
if (!addresses.contains(localhost)) {
addresses.add(localhost);
}
this.localLoopbackAddresses = addresses;
}
}
}
return this.localLoopbackAddresses;
}
private void initHostMap() {
try {
hostMap = new HashMap<>();
@@ -375,27 +282,7 @@ public class TalendProxySelector extends ProxySelector {
ExceptionHandler.log("TalendProxySelector.select " + uri);
}
if (uri == null) {
List<Proxy> result = new ArrayList<>();
result.add(Proxy.NO_PROXY);
return result;
}
try {
if (this.excludeLoopbackAddressAutomatically) {
List<String> addresses = getLocalLoopbackAddresses();
if (addresses != null) {
String host = uri.getHost();
if (addresses.contains(host)) {
if (printProxyLog) {
ExceptionHandler.log(uri + " is excluded from proxy");
}
List<Proxy> result = new ArrayList<>();
result.add(Proxy.NO_PROXY);
return result;
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
return Collections.EMPTY_LIST;
}
URI validatedUri = validateUri(uri);
Set<Proxy> results = new LinkedHashSet<>();
@@ -445,9 +332,6 @@ public class TalendProxySelector extends ProxySelector {
ExceptionHandler.log("Selected proxys for " + uri + ", " + proxys);
ExceptionHandler.process(new Exception("Proxy call stacks"), Priority.INFO);
}
if (results.isEmpty()) {
results.add(Proxy.NO_PROXY);
}
return new LinkedList<Proxy>(results);
}

View File

@@ -19,18 +19,15 @@ import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.commons.io.FilenameUtils;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.runtime.service.ITaCoKitService;
@@ -61,14 +58,8 @@ public class UpdatesHelper {
public static final String COMPONENT_SUFFIX = "_java.xml";
public static final String COMPONENT_TEMPLATES = "templates";
public static final String NEW_COMPONENT_PREFIX = "installer$$";
public static final String PRE_TALEND_PATCH = "talend.patch";
public static final String RECORD_SEPERATOR = ",";
public static boolean existArtifacts(File base) {
return new File(base, FILE_ARTIFACTS).exists() || new File(base, FILE_JAR_ARTIFACTS).exists()
|| new File(base, FILE_XZ_ARTIFACTS).exists();
@@ -92,9 +83,6 @@ public class UpdatesHelper {
* will check that existed the plugins folder only.
*/
public static boolean isPlainUpdate(File file) {
if (skipPatchFile(file)) {
return false;
}
if (file != null && file.exists()) {
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
ZipFileStatus status = new ZipFileStatus(file);
@@ -122,9 +110,6 @@ public class UpdatesHelper {
* need check that contain "artifacts.xml", "content.xml" and "plugins" folder in same place.
*/
public static boolean isUpdateSite(File file) {
if (skipPatchFile(file)) {
return false;
}
if (file != null && file.exists()) {
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
@@ -186,8 +171,7 @@ public class UpdatesHelper {
}
private static void findUpdateBaseFile(Set<File> foundUpdateFiles, File baseFile) {
if (isPlainUpdate(baseFile)
|| isUpdateSite(baseFile) && !isComponentUpdateSite(baseFile)) {
if (isPlainUpdate(baseFile) || isUpdateSite(baseFile) && !isComponentUpdateSite(baseFile)) {
foundUpdateFiles.add(baseFile);
} else if (baseFile.isDirectory()) {
final File[] listFiles = baseFile.listFiles();
@@ -200,10 +184,6 @@ public class UpdatesHelper {
}
public static boolean isComponentUpdateSite(File file) {
if (skipPatchFile(file)) {
return false;
}
if (file != null && file.exists()) {
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
ZipFileStatus status = new ZipFileStatus(file) {
@@ -316,9 +296,6 @@ public class UpdatesHelper {
public static boolean isOldComponent(File f) {
if (f != null && f.exists() && f.isDirectory()) {
if (f.getName().equals(COMPONENT_TEMPLATES)) {
return true;
}
File[] listFiles = f.listFiles();
if (listFiles != null) {
for (File subFile : listFiles) {
@@ -330,53 +307,4 @@ public class UpdatesHelper {
}
return false;
}
public static File getProductFile() {
try {
return new File(Platform.getInstallLocation().getDataArea(FILE_ECLIPSE_PRODUCT).getPath());
} catch (IOException e) {
//
}
return null;
}
public static Properties loadProductProperties(File productFile) {
Properties prop = new Properties();
if (productFile != null && productFile.exists()) {
try (FileInputStream fis = new FileInputStream(productFile)) {
prop.load(fis);
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return prop;
}
public static Set<String> getPatchesInstalled() {
Set<String> installed = new HashSet<String>();
File productFile = getProductFile();
Properties props = loadProductProperties(productFile);
props.forEach((k, v) -> {
String key = String.valueOf(k);
if (key.startsWith(PRE_TALEND_PATCH)) {
String val = String.valueOf(v);
String[] vals = val.split(RECORD_SEPERATOR);
if (vals.length > 1) {
installed.add(vals[1]);
} else {
installed.add(val);
}
}
});
return installed;
}
public static boolean skipPatchFile(File patchFile) {
Set<String> installedPathNames = getPatchesInstalled();
if (patchFile != null && patchFile.isFile()) {
String patchName = FilenameUtils.getBaseName(patchFile.getName());
return installedPathNames.contains(patchName);
}
return false;
}
}

View File

@@ -49,17 +49,11 @@ public class EclipseCommandLine {
*/
static public final String TALEND_PROJECT_TYPE_COMMAND = "-talendProjectType"; //$NON-NLS-1$
static public final String TALEND_LICENCE_PATH = "talend.licence.path"; //$NON-NLS-1$
static public final String ARG_TALEND_LICENCE_PATH = "-" + TALEND_LICENCE_PATH; //$NON-NLS-1$
/**
* for relaunch of the plugins when relaunching the Studio
*/
static public final String TALEND_RELOAD_COMMAND = "-talendReload"; //$NON-NLS-1$
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
static public final String PROP_TALEND_BUNDLES_DO_CLEAN = "-talend.studio.bundles.doclean"; //$NON-NLS-1$

View File

@@ -215,8 +215,12 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
checkKey(key);
blockOperationIfRequired();
incrementRunningOperations();
LockerValue<KP> lockerValue = prepareInternalLock(key);
decrementRunningOperations();
LockerValue<KP> lockerValue;
try {
lockerValue = prepareInternalLock(key);
} finally {
this.decrementRunningOperations();
}
lockerValue.getLock().lockInterruptibly();
traceStackForDebugging(lockerValue);
}
@@ -239,8 +243,12 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
checkKey(key);
blockOperationIfRequired();
incrementRunningOperations();
LockerValue<KP> lockerValue = prepareInternalLock(key);
decrementRunningOperations();
LockerValue<KP> lockerValue;
try {
lockerValue = this.prepareInternalLock(key);
} finally {
this.decrementRunningOperations();
}
boolean locked = lockerValue.getLock().tryLock();
if (locked) {
traceStackForDebugging(lockerValue);
@@ -283,8 +291,12 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
checkKey(key);
blockOperationIfRequired();
incrementRunningOperations();
LockerValue<KP> lockerValue = prepareInternalLock(key);
decrementRunningOperations();
LockerValue<KP> lockerValue;
try {
lockerValue = this.prepareInternalLock(key);
} finally {
this.decrementRunningOperations();
}
interruptIfStopping();
boolean locked = lockerValue.getLock().tryLock(timeout, unit);
if (locked) {
@@ -322,13 +334,17 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
checkKey(key);
blockOperationIfRequired();
incrementRunningOperations();
LockerValue<KP> lockerValue = getLockerValue(key);
boolean returnValue = false;
if (lockerValue != null) {
lockerValue.getLock().unlock();
returnValue = true;
LockerValue<KP> lockerValue = this.getLockerValue(key);
boolean returnValue;
try {
returnValue = false;
if (lockerValue != null) {
lockerValue.getLock().unlock();
returnValue = true;
}
} finally {
this.decrementRunningOperations();
}
decrementRunningOperations();
cleanAccordingOperations();
return returnValue;
}

View File

@@ -1,127 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.time;
import java.util.Enumeration;
import java.util.Properties;
import org.apache.log4j.Hierarchy;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.RollingFileAppender;
import org.apache.log4j.spi.LoggerFactory;
import org.apache.log4j.spi.RootLogger;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
public class PerformanceLogManager {
private Hierarchy hierarchy;
public PerformanceLogManager() {
Properties properties = new Properties();
properties.put("log4j.rootCategory", ", A1");
properties.put("log4j.appender.A1", RollingFileAppender.class.getName());
IPath performanceLogPath = Platform.getLogFileLocation().removeLastSegments(1).append("performance.log");
properties.put("log4j.appender.A1.File", performanceLogPath.toOSString());
properties.put("log4j.appender.A1.MaxBackupIndex", "10");// same as .log's max backup log file count
properties.put("log4j.appender.A1.MaxFileSize", "1000000");//1000*1000 byte, same as .log's max file size
properties.put("log4j.appender.A1.layout", "org.apache.log4j.PatternLayout");
properties.put("log4j.appender.A1.layout.ConversionPattern", "%d %-5p %c %x - %m%n");
this.hierarchy = new Hierarchy(new RootLogger(Level.INFO));
new PropertyConfigurator().doConfigure(properties,hierarchy);
}
/**
* Checks if this PluginLogManager is disabled for this level.
* @param level level value
* @return boolean true if it is disabled
*/
public boolean isDisabled(int level) {
return this.hierarchy.isDisabled(level);
}
/**
* Enable logging for logging requests with level l or higher.
* By default all levels are enabled.
* @param level level object
*/
public void setThreshold(Level level) {
this.hierarchy.setThreshold(level);
}
/**
* The string version of setThreshold(Level level)
* @param level level string
*/
public void setThreshold(String level) {
this.hierarchy.setThreshold(level);
}
/**
* Get the repository-wide threshold.
* @return Level
*/
public Level getThreshold() {
return this.hierarchy.getThreshold();
}
/**
* Returns a new logger instance named as the first parameter
* using the default factory. If a logger of that name already exists,
* then it will be returned. Otherwise, a new logger will be instantiated
* and then linked with its existing ancestors as well as children.
* @param name logger name
* @return Logger
*/
public Logger getLogger(String name) {
return this.hierarchy.getLogger(name);
}
/**
* The same as getLogger(String name) but using a factory instance instead of
* a default factory.
* @param name logger name
* @param factory factory instance
* @return Logger
*/
public Logger getLogger(String name, LoggerFactory factory) {
return this.hierarchy.getLogger(name,factory);
}
public Logger getRootLogger() {
return this.hierarchy.getRootLogger();
}
public Logger exists(String name) {
return this.hierarchy.exists(name);
}
public void shutdown() {
this.hierarchy.shutdown();
}
/**
* Returns all the loggers in this manager.
* @return Enumeration logger enumeration
*/
public Enumeration getCurrentLoggers() {
return this.hierarchy.getCurrentLoggers();
}
public void resetConfiguration() {
this.hierarchy.resetConfiguration();
}
}

View File

@@ -1,371 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.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.util.Properties;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.CommonExceptionHandler;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class PerformanceStatisticUtil {
private static final int MEGABYTE = 1024 * 1024;// MB = 1024*1024 byte
private static final int KILOBYTE = 1024;// kb=1024 byte
private static final int numOfBlocks = 256;
private static final int blockSizeKb = 512;
private static final String dataFile = "testio.data";
private static String recordingFileName = "performance_record";
private static File recordingFile = null;
private static enum BlockSequence {
SEQUENTIAL,
RANDOM;
}
public static enum StatisticKeys {
IO_COUNT("I/O.count"), // io count
IO_W_MB_SEC("I/O.write"), // write speed MB
IO_R_MB_SEC("I/O.read"), // read speed MB
IO_W_AVERAGE_MB_SEC("I/O.write.average"), // average speed of write MB
IO_R_AVERAGE_MB_SEC("I/O.read.average"), // average speed of read
STARTUP_AVERAGE("startup.average"),
STARTUP_MAX("startup.max"),
STARTUP_COUNT("startup.count");
private String key;
StatisticKeys(String _key) {
key = _key;
}
public String get() {
return key;
}
}
public static void recordStartupEpapsedTime(double elapsedTimeInSeconds) {
File file = getRecordingFile();
Properties props = 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");
int iPropCount = Integer.parseInt(propCount);
double iPropMax = Double.parseDouble(propMax);
double iPropAverage = Double.parseDouble(propAverage);
iPropMax = iPropMax > elapsedTimeInSeconds ? iPropMax : elapsedTimeInSeconds;
iPropAverage = (iPropAverage * iPropCount + elapsedTimeInSeconds) / (iPropCount + 1);
iPropCount++;
props.setProperty(StatisticKeys.STARTUP_COUNT.get(), "" + iPropCount);
props.setProperty(StatisticKeys.STARTUP_MAX.get(), "" + iPropMax);
props.setProperty(StatisticKeys.STARTUP_AVERAGE.get(), "" + iPropAverage);
store(file, props);
}
public static File getRecordingFile() {
if (recordingFile != null) {
return recordingFile;
}
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
File file = new File(configurationLocation + "/" + recordingFileName);
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) {//
}
}
}
}
return props;
}
public static synchronized void store(File recordFile, Properties props) {
if (props == null) {
return;
}
if (recordFile != null && exist(recordFile, true)) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(recordFile);
props.store(outputStream, "");
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//
}
}
}
}
}
private static boolean exist(File recordFile, boolean createIfNotExist) {
boolean exists = recordFile.exists();
if (!exists && createIfNotExist) {
try {
exists = recordFile.createNewFile();
if (!exists) {
throw new FileNotFoundException(recordFile.getName());
}
} catch (Exception e) {
CommonExceptionHandler.log(e.getMessage());
return false;
}
}
return exists;
}
private static Lock lock = new ReentrantLock();
private static Condition condition = lock.newCondition();
private static boolean measureIOFinished = true;
public static void waitUntilFinish() throws InterruptedException {
lock.lock();
try {
if(!measureIOFinished) {
condition.await(20, TimeUnit.SECONDS);
}
} finally {
lock.unlock();
}
}
public static void measureIO() {
new Thread() {
public void run() {
measureIOFinished = false;
try {
_measureIO();
} finally {
measureIOFinished = true;
}
}
}.start();
}
private static void _measureIO() {
File file = getRecordingFile();
Properties props = read(file, true);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
File workspace = root.getLocation().makeAbsolute().toFile();
File locationDir = new File(workspace, "temp"); // here is workspace/temp dir
File testFile = detectTestDataFile(locationDir);
if (testFile != null) {
measureWrite(props, testFile);
measureRead(props, testFile);
store(file, props);
}
}
private static void measureWrite(Properties props, File testFile) {
int blockSize = blockSizeKb * KILOBYTE;
long startTime = System.nanoTime();
long totalBytesWrittenInMark = writeIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
totalBytesWrittenInMark = totalBytesWrittenInMark + writeIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
long endTime = System.nanoTime();
long elapsedTimeNs = endTime - startTime;
double sec = (double) elapsedTimeNs / (double) 1000000000;
double mbWritten = (double) totalBytesWrittenInMark / (double) MEGABYTE;
double bwMbSec = mbWritten / sec;
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
String ioWAverageMbSec = props.getProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), "0");
String ioWMbSec = props.getProperty(StatisticKeys.IO_W_MB_SEC.get(), "0");
int digital_ioCount = Integer.parseInt(ioCount);
double digital_ioWAverageMbSec = Double.parseDouble(ioWAverageMbSec);
double digital_ioWMbSec = Double.parseDouble(ioWMbSec);
digital_ioWAverageMbSec = (digital_ioWAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
digital_ioWMbSec = bwMbSec;
props.setProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), format(digital_ioWAverageMbSec));
props.setProperty(StatisticKeys.IO_W_MB_SEC.get(), format(digital_ioWMbSec));
}
private static long writeIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
byte[] blockArr = new byte[blockSize];
for (int b = 0; b < blockArr.length; b++) {
if (b % 2 == 0) {
blockArr[b] = (byte) 0xFF;
}
}
String mode = "rwd";// "rwd"
long totalBytesWrittenInMark = 0;
try {
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, mode)) {
for (int b = 0; b < numOfBlocks; b++) {
if (blockSequence == BlockSequence.RANDOM) {
int rLoc = randInt(0, numOfBlocks - 1);
rAccFile.seek(rLoc * blockSize);
} else {
rAccFile.seek(b * blockSize);
}
rAccFile.write(blockArr, 0, blockSize);
totalBytesWrittenInMark += blockSize;
}
}
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return totalBytesWrittenInMark;
}
private static File detectTestDataFile(File location) {
if (!location.exists()) {
location.mkdirs();
}
File testFile = null;
try {
testFile = new File(location.getAbsolutePath() + File.separator + dataFile);
testFile.deleteOnExit();
testFile.createNewFile();
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return testFile;
}
public static void measureRead(Properties props, File testFile) {
int blockSize = blockSizeKb * KILOBYTE;
long startTime = System.nanoTime();
long totalBytesReadInMark = readIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
totalBytesReadInMark = totalBytesReadInMark + readIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
long endTime = System.nanoTime();
long elapsedTimeNs = endTime - startTime;
double sec = (double) elapsedTimeNs / (double) 1000000000;
double mbRead = (double) totalBytesReadInMark / (double) MEGABYTE;
double bwMbSec = mbRead / sec;
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
String ioRAverageMbSec = props.getProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), "0");
String ioRMbSec = props.getProperty(StatisticKeys.IO_R_MB_SEC.get(), "0");
int digital_ioCount = Integer.parseInt(ioCount);
double digital_ioRAverageMbSec = Double.parseDouble(ioRAverageMbSec);
double digital_ioRMbSec = Double.parseDouble(ioRMbSec);
digital_ioRAverageMbSec = (digital_ioRAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
digital_ioRMbSec = bwMbSec;
digital_ioCount++;
props.setProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), format(digital_ioRAverageMbSec));
props.setProperty(StatisticKeys.IO_R_MB_SEC.get(), format(digital_ioRMbSec));
props.setProperty(StatisticKeys.IO_COUNT.get(), "" + digital_ioCount);
}
public static String format(double dvalue) {
return BigDecimal.valueOf(dvalue).setScale(2, RoundingMode.HALF_UP).toString();
}
private static long readIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
long totalBytesReadInMark = 0;
byte[] blockArr = new byte[blockSize];
for (int b = 0; b < blockArr.length; b++) {
if (b % 2 == 0) {
blockArr[b] = (byte) 0xFF;
}
}
try {
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, "r")) {
for (int b = 0; b < numOfBlocks; b++) {
if (blockSequence == BlockSequence.RANDOM) {
int rLoc = randInt(0, numOfBlocks - 1);
rAccFile.seek(rLoc * blockSize);
} else {
rAccFile.seek(b * blockSize);
}
rAccFile.readFully(blockArr, 0, blockSize);
totalBytesReadInMark += blockSize;
}
}
} catch (IOException e) {
CommonExceptionHandler.log(e.getMessage());
}
return totalBytesReadInMark;
}
private static int randInt(int min, int max) {
// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
int randomNum = new Random().nextInt((max - min) + 1) + min;
return randomNum;
}
}

View File

@@ -1,121 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.time;
import java.util.HashMap;
import org.apache.log4j.Logger;
/**
* DOC sbliu class global comment. Detailled comment
*/
public class TimeMeasurePerformance extends TimeMeasure{
static private Logger logger;
private static HashMap<String, TimeStack> timers;
private static long startTime = -1L;
private static int indent = 0;
public static void begin(String idTimer, String description) {
startTime = System.nanoTime();
init();
if (timers.containsKey(idTimer)) {
log(indent(indent) + "Warning (start): timer " + idTimer + " already exists"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
indent++;
TimeStack times = new TimeStack();
timers.put(idTimer, times);
String message = "Start '" + idTimer + "' ...";
if (description != null) {
message = "Start '" + idTimer + "', " + description + " ...";
}
log(indent(indent) + message); //$NON-NLS-1$ //$NON-NLS-2$
}
}
private static void init() {
if (timers == null) {
timers = new HashMap<String, TimeStack>();
}
if(logger == null) {
configureLogger();
}
}
private static void log (String message) {
logger.info(message);
}
public static long end(String idTimer) {
init();
if (!timers.containsKey(idTimer)) {
log(indent(indent) + "Warning (end): timer " + idTimer + " doesn't exist"); //$NON-NLS-1$ //$NON-NLS-2$
return -1;
} else {
TimeStack timeStack = timers.get(idTimer);
timers.remove(idTimer);
long elapsedTimeSinceLastRequest = timeStack.getLastStepElapsedTime();
log(indent(indent) + "End '" + idTimer + "', elapsed time since last request: " //$NON-NLS-1$ //$NON-NLS-2$
+ elapsedTimeSinceLastRequest + " ms "); //$NON-NLS-1$
long totalElapsedTime = timeStack.getTotalElapsedTime();
log(indent(indent) + "End '" + idTimer + "', total elapsed time: " + totalElapsedTime + " ms "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
indent--;
return totalElapsedTime;
}
}
public static long step(String idTimer, String stepName) {
init();
if (!timers.containsKey(idTimer)) {
log(indent(indent) + "Warning (end): timer " + idTimer + " does'nt exist"); //$NON-NLS-1$ //$NON-NLS-2$
return -1;
} else {
TimeStack timeStack = timers.get(idTimer);
timeStack.addStep();
/*
* trace the timeline of every step,problem is that the code below " Calendar ca = Calendar.getInstance();
* Date now = ca.getTime();" will cost almost 13ms~15ms
*/
long time = timeStack.getLastStepElapsedTime();
String timerStepName = idTimer + "', step name '" + stepName; //$NON-NLS-1$
log(indent(indent)
+ "-> '" + timerStepName + "', elapsed time since previous step: " + time + " ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return time;
}
}
private static void configureLogger() {
try {
PerformanceLogManager logManager = new PerformanceLogManager();
logger = logManager.getLogger(TimeMeasurePerformance.class.getName());
} catch (Exception e) {
throw new RuntimeException("Error while initializing log properties.", e);
}
}
public static void afterStartup() {
double elapsedTimeInSeconds = (double)(System.nanoTime() - startTime)/1000000000;
PerformanceStatisticUtil.recordStartupEpapsedTime(elapsedTimeInSeconds);
PerformanceStatisticUtil.measureIO();
}
}

View File

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

View File

@@ -240,11 +240,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
gc.dispose();
if (WindowSystem.isBigSurOrLater()) {
drawableComposite.refreshBgDrawableCompsite(newImage);
} else {
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
}
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
clearImage(oldImage);
oldImage = newImage;

View File

@@ -13,7 +13,6 @@
package org.talend.commons.ui.swt.drawing.background;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
@@ -29,8 +28,6 @@ public interface IBgDrawableComposite {
public Composite getBgDrawableComposite();
public void refreshBgDrawableCompsite(Image image);
public void setOffset(Point offsetPoint);
public Point getOffset();

View File

@@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ws.WindowSystem;
/**
* Create a Label and a Text.
@@ -154,14 +153,7 @@ public class LabelledText {
});
GridDataFactory.swtDefaults().applyTo(label);
// For Big Sur, to avoid the password autofill dialog.
if (WindowSystem.isBigSurOrLater() && ((styleField & SWT.PASSWORD) != 0)) {
styleField ^= SWT.PASSWORD;
text = new Text(composite, styleField);
text.setEchoChar('*');
} else {
text = new Text(composite, styleField);
}
text = new Text(composite, styleField);
text.selectAll(); // enable fast erase use
int gridDataStyle = SWT.NONE;
if (isFill) {

View File

@@ -12,12 +12,7 @@
// ============================================================================
package org.talend.commons.ui.swt.linking;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
@@ -33,8 +28,6 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
private Composite commonParent;
private Point offsetPoint = new Point(0, 0);
private Image backgroundImage;
/**
* DOC amaumont DrawableBackground constructor comment.
@@ -43,36 +36,9 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
*/
public BgDrawableComposite(Composite commonParent) {
this.commonParent = commonParent;
this.commonParent.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent arg0) {
if (backgroundImage != null) {
arg0.gc.drawImage(backgroundImage, 0, 0);
}
}
});
this.commonParent.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent arg0) {
if (backgroundImage != null && !backgroundImage.isDisposed()) {
backgroundImage.dispose();
}
}
});
}
@Override
public void refreshBgDrawableCompsite(Image image) {
if (backgroundImage != null) {
backgroundImage.dispose();
}
backgroundImage = image;
this.commonParent.redraw();
}
/*
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.swt.drawing.background.IDrawableComposite#drawBackground(org.eclipse.swt.graphics.GC)

View File

@@ -104,6 +104,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
this.source = sourceTable;
dataToTableItemCache = new DataToTableItemCache(sourceTable);
}
protected IStyleLink getDefaultStyleLink() {
@@ -231,7 +232,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
int yStraight = sourceToCommonPoint.y + treeItemHeight / 2 + tableItemBounds.y;
pointEndStraight.x = sourceToCommonPoint.x + xStartBezierLink;
if (Platform.OS_MACOSX.equals(Platform.getOS()) || Platform.OS_LINUX.equals(Platform.getOS())) {
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
pointStartStraight.x = sourceToCommonPoint.x + tableItem.getParent().getBounds().width;
pointEndStraight.x = pointStartStraight.x;
} else {
@@ -310,10 +311,10 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
// Added by Marvin Wang on Nov. 28, 2012 for bug TDI-23378. This is not the best way to fix this issue,
// but till now I have not found the root cause.
if (Platform.OS_LINUX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height - treeItemHeight / 2;
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
}
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
pointEndCentralCurve.y = pointEndCentralCurve.y + tableItem.getBounds(0).height;
}
drawableLink.setPoint1(pointEndStraight);
drawableLink.setPoint2(pointEndCentralCurve);

View File

@@ -15,7 +15,6 @@ package org.talend.commons.ui.swt.linking;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -78,8 +77,6 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
private List<LinkableTable> linkableTableList;
private HashMap<Table, Point> tableToCommonPointMap = new HashMap<Table, Point>();
/**
* DOC amaumont TreeToTableLinker constructor comment.
*
@@ -261,34 +258,8 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
Point offset = getOffset();
if (WindowSystem.isBigSurOrLater()) {
if (yStraight < tree.getBounds().y + treeItemHeight) {
yStraight = tree.getBounds().y + treeItemHeight;
}
if (yStraight > tree.getBounds().height + tree.getBounds().y + treeItemHeight) {
yStraight = tree.getBounds().height + tree.getBounds().y + treeItemHeight;
}
pointEndStraight = new Point(treeToCommonPoint.x + tree.getClientArea().width, yStraight);
if (tableToCommonPointMap.get(table) == null) {
tableToCommonPointMap.put(table, display.map(table, getBgDrawableComposite(), new Point(0, 0)));
}
// scroll issue for table
if (tableToCommonPoint.y != tableToCommonPointMap.get(table).y) {
pointEndCentralCurve.y = tableToCommonPoint.y + tableItemBounds.y
+ table.getItemHeight() / 2;
}
if (pointEndCentralCurve.y < tableToCommonPointMap.get(table).y) {
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y;
}
if (pointEndCentralCurve.y > tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
- table.getHeaderHeight()) {
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
- table.getHeaderHeight();
}
} else {
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
pointEndStraight.y + offset.y);
}
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
pointEndStraight.y + offset.y);
pointEndStraight.x += offset.x;
pointEndStraight.y += offset.y;

View File

@@ -212,8 +212,4 @@ public class CommonTextCellEditorWithProposal {
return this.contentProposalAdapter;
}
public int getPreviousActivatedIndex() {
return previousActivatedIndex;
}
}

View File

@@ -97,7 +97,4 @@ public class ExtendedTextCellEditorWithProposal extends ExtendedTextCellEditor i
super.fireCancelEditor();
}
public CommonTextCellEditorWithProposal getCommonTextEditor() {
return commonTextEditor;
}
}

View File

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

View File

@@ -109,8 +109,4 @@ public interface FileConstants {
String SPRING_FOLDER_NAME = "META-INF/spring"; //$NON-NLS-1$
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
String MAVEN_FOLDER_NAME = "MAVEN-INF";
}

View File

@@ -117,7 +117,6 @@ public class JobAndNodesParametersRelationshipHandler implements IItemRelationsh
}
}
}
relationsMap.values().removeIf(value -> value.isEmpty());
return relationsMap;
}

View File

@@ -14,7 +14,6 @@ package org.talend.core.repository.handlers;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.talend.core.model.properties.Item;
@@ -44,13 +43,8 @@ public class JobRoutinesItemRelationshipHandler extends AbstractJobItemRelations
Set<Relation> relationSet = new HashSet<Relation>();
if (processType.getParameters() != null && processType.getParameters().getRoutinesParameter() != null) {
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
for (Object o : processType.getParameters().getRoutinesParameter()) {
RoutinesParameterType itemInfor = (RoutinesParameterType) o;
if (currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
// exclude system routines relation
continue;
}
Relation addedRelation = new Relation();
addedRelation.setId(itemInfor.getName());

View File

@@ -67,9 +67,4 @@ public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnab
});
}
@Override
public boolean isRequiredAlways() {
return true;
}
}

View File

@@ -837,8 +837,8 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
Object fullFolder = getFullFolder(project, type, relativeFolder);
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
if (serializableAllVersion.isEmpty()) {
// look in all folders for this item type
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
// look in all folders
serializableAllVersion = getSerializable(project, id, false, false);
}
int size = serializableAllVersion.size();

View File

@@ -270,8 +270,6 @@ public interface IRepositoryFactory {
public void create(Project project, Item item, IPath path, boolean... isImportItem) throws PersistenceException;
public void save(Project project, Item item, boolean isMigrationTask) throws PersistenceException;
public void save(Project project, Item item) throws PersistenceException;
public void save(Project project, Property property) throws PersistenceException;

View File

@@ -1064,9 +1064,6 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
if (newProject != null && newProject.getEmfProject() != null) {
List<FolderItem> folderItems = ProjectManager.getInstance().getFolders(newProject.getEmfProject());
if (folderItems != null) {
folderItems = new ArrayList<>(folderItems);
}
for (FolderItem folder : folderItems) {
String folderName = folder.getProperty().getLabel();
if (("process".equals(folderName) || "joblets".equals(folderName)) && folder.getChildren() != null

View File

@@ -15,7 +15,6 @@ package org.talend.core.repository.model;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
@@ -72,7 +71,7 @@ import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.commons.utils.data.container.RootContainer;
import org.talend.commons.utils.network.TalendProxySelector;
import org.talend.commons.utils.time.TimeMeasurePerformance;
import org.talend.commons.utils.time.TimeMeasure;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.AbstractDQModelService;
import org.talend.core.GlobalServiceRegister;
@@ -85,7 +84,6 @@ import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.exception.TalendInternalPersistenceException;
import org.talend.core.hadoop.BigDataBasicUtil;
import org.talend.core.model.general.ILibrariesService;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.MetadataTalendType;
@@ -110,7 +108,6 @@ import org.talend.core.model.properties.SpagoBiServer;
import org.talend.core.model.properties.Status;
import org.talend.core.model.properties.User;
import org.talend.core.model.properties.impl.FolderItemImpl;
import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.Folder;
import org.talend.core.model.repository.IRepositoryContentHandler;
@@ -126,22 +123,16 @@ import org.talend.core.repository.constants.Constant;
import org.talend.core.repository.constants.FileConstants;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.recyclebin.RecycleBinManager;
import org.talend.core.repository.utils.LoginTaskRegistryReader;
import org.talend.core.repository.utils.ProjectDataJsonProvider;
import org.talend.core.repository.utils.RepositoryPathProvider;
import org.talend.core.repository.utils.XmiResourceManager;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.repository.item.ItemProductKeys;
import org.talend.core.runtime.services.IGenericWizardService;
import org.talend.core.runtime.services.IMavenUIService;
import org.talend.core.runtime.util.ItemDateParser;
import org.talend.core.runtime.util.SharedStudioUtils;
import org.talend.core.service.ICoreUIService;
import org.talend.core.service.IUpdateService;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.login.ILoginTask;
import org.talend.repository.ProjectManager;
import org.talend.repository.ReferenceProjectProblemManager;
import org.talend.repository.ReferenceProjectProvider;
@@ -183,8 +174,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
private boolean isCancelled;
private static final LoginTaskRegistryReader LOGIN_TASK_REGISTRY_READER = new LoginTaskRegistryReader();
@Override
public synchronized void addPropertyChangeListener(PropertyChangeListener l) {
if (l == null) {
@@ -234,13 +223,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
return null;
}
private ILibrariesService getLibrariesService() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
return GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
}
return null;
}
/*
* (non-Javadoc)
*
@@ -1228,28 +1210,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
return this.repositoryFactoryFromProvider.getLastVersion(project, ProcessUtils.getPureItemId(id), folderPath, type);
}
@Override
public IRepositoryViewObject getLastVersion(String id, ERepositoryObjectType type)
throws PersistenceException {
return getLastVersion(id , "", type);
}
@Override
public IRepositoryViewObject getLastVersion(String id, List<ERepositoryObjectType> types) throws PersistenceException {
if (types != null) {
IRepositoryViewObject object = null;
for (ERepositoryObjectType type : types) {
object = getLastVersion(id, type);
if (object != null) {
return object;
}
}
}
return null;
}
@Override
public IRepositoryViewObject getLastVersion(String id, String folderPath, ERepositoryObjectType type)
throws PersistenceException {
String objId = id;
@@ -1261,25 +1221,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
return this.repositoryFactoryFromProvider.getLastVersion(project, objId, folderPath, type);
}
}
return getLastRefVersion(projectManager.getCurrentProject(), objId , folderPath, type);
}
@Override
public IRepositoryViewObject getLastRefVersion(Project project, String id, String folderPath, ERepositoryObjectType type) throws PersistenceException {
String projectLabel = ProcessUtils.getProjectLabelFromItemId(id);
IRepositoryViewObject lastVersion = getLastVersion(project, ProcessUtils.getPureItemId(id), folderPath, type);
if (lastVersion == null) {
for (Project p : projectManager.getReferencedProjects(project)) {
if (projectLabel != null && !projectLabel.equals(p.getTechnicalLabel())) {
continue;
}
lastVersion = getLastRefVersion(p, id);
if (lastVersion != null) {
break;
}
}
}
return lastVersion;
return this.repositoryFactoryFromProvider.getLastVersion(projectManager.getCurrentProject(), objId , folderPath, type);
}
@Override
@@ -1601,15 +1543,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
@Override
public void save(Project project, Item item, boolean... isMigrationTask) throws PersistenceException {
this.repositoryFactoryFromProvider.save(project, item);
if (isMigrationTask == null || isMigrationTask.length == 0 || !isMigrationTask[0]) {
this.repositoryFactoryFromProvider.save(project, item);
boolean avoidGenerateProm = false;
if (isMigrationTask != null && isMigrationTask.length == 2) {
avoidGenerateProm = isMigrationTask[1];
}
fireRepositoryPropertyChange(ERepositoryActionName.SAVE.getName(), avoidGenerateProm, item);
} else {
this.repositoryFactoryFromProvider.save(project, item, true);
}
}
@@ -1800,12 +1741,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
* @throws PersistenceException
*/
private void emptyTempFolder(Project project) throws PersistenceException {
try {
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
FilesUtils.deleteFolder(new File(str), false);
}catch (Exception ex) {
ExceptionHandler.process(ex);
}
String str = (System.getProperty("eclipse.home.location") + "temp").substring(5);
FilesUtils.deleteFolder(new File(str), false);
long start = System.currentTimeMillis();
IProject fsProject = ResourceUtils.getProject(project);
IFolder folder = ResourceUtils.getFolder(fsProject, RepositoryConstants.TEMP_DIRECTORY, false);
@@ -2094,7 +2032,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
*/
public void logOnProject(Project project, IProgressMonitor monitor) throws LoginException, PersistenceException {
try {
TimeMeasurePerformance.begin("logOnProject", "logon project name '" + project.getLabel()+"'"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.display = CommonsPlugin.isDebugMode();
TimeMeasure.displaySteps = CommonsPlugin.isDebugMode();
TimeMeasure.measureActive = CommonsPlugin.isDebugMode();
TimeMeasure.begin("logOnProject"); //$NON-NLS-1$
try {
/**
* init/check proxy selector, in case default proxy selector is not registed yet
@@ -2120,7 +2062,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
SubMonitor subMonitor = SubMonitor.convert(monitor, MAX_TASKS);
SubMonitor currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
project.setReferenceProjectProvider(null);
getRepositoryContext().setProject(null);
initEmfProjectContent();
@@ -2138,35 +2079,10 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
this.repositoryFactoryFromProvider.beforeLogon(project);
ProjectManager.getInstance().getBeforeLogonRecords().clear();
ProjectManager.getInstance().getUpdatedRemoteHandlerRecords().clear();
ILibrariesService librariesService = getLibrariesService();
if (librariesService != null) {
librariesService.setForceReloadCustomUri();
}
ProjectDataJsonProvider.checkAndRectifyRelationShipSetting(project.getEmfProject());
try {
// load additional jdbc
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
IGenericWizardService service = GlobalServiceRegister.getDefault()
.getService(IGenericWizardService.class);
if (service != null) {
service.loadAdditionalJDBC();
}
}
} catch (Exception e) {
// in case, to avoid block logon
ExceptionHandler.process(e);
}
// init dynamic distirbution after `beforeLogon`, before loading libraries.
initDynamicDistribution(monitor);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
updateService.syncComponentM2Jars(currentMonitor);
}
// init sdk component
try {
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
@@ -2184,7 +2100,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
throw new OperationCanceledException(""); //$NON-NLS-1$
}
// monitorWrap.worked(1);
TimeMeasurePerformance.step("logOnProject", "beforeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "beforeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
// Check project compatibility
checkProjectCompatibility(project);
@@ -2202,15 +2118,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.synchronizeLibraries"), 1); //$NON-NLS-1$
coreService.syncLibraries(currentMonitor);
TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
}
try {
// for new added mapping file, sync to project mapping folder
MetadataTalendType.syncNewMappingFileToProject();
} catch (SystemException e) {
// ignore
ExceptionHandler.process(e);
TimeMeasure.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
}
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
@@ -2219,7 +2127,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
executeMigrations(project, true, currentMonitor);
ProjectManager.getInstance().getMigrationRecords().clear();
// monitorWrap.worked(1);
TimeMeasurePerformance.step("logOnProject", "executeMigrations(beforeLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "executeMigrations(beforeLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
@@ -2227,7 +2135,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
this.repositoryFactoryFromProvider.logOnProject(project);
ProjectManager.getInstance().getLogonRecords().clear();
// monitorWrap.worked(1);
TimeMeasurePerformance.step("logOnProject", "logOnProject"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "logOnProject"); //$NON-NLS-1$ //$NON-NLS-2$
emptyTempFolder(project);
@@ -2253,7 +2161,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ProjectManager.getInstance().getMigrationRecords().clear();
executeMigrations(project, false, currentMonitor);
ProjectManager.getInstance().getMigrationRecords().clear();
TimeMeasurePerformance.step("logOnProject", "executeMigrations(afterLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "executeMigrations(afterLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException(""); //$NON-NLS-1$
}
@@ -2269,12 +2177,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
// clean workspace
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.cleanWorkspace"), 1); //$NON-NLS-1$
TimeMeasurePerformance.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
if (workspace instanceof Workspace) {
((Workspace) workspace).getFileSystemManager().getHistoryStore().clean(currentMonitor);
}
TimeMeasurePerformance.step("logOnProject", "clean workspace history"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "clean workspace history"); //$NON-NLS-1$ //$NON-NLS-2$
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.synch.repo.items"), 1); //$NON-NLS-1$
@@ -2300,12 +2208,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException(""); //$NON-NLS-1$
}
TimeMeasurePerformance.step("logOnProject", "sync repository (routines/rules/beans)"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "sync repository (routines/rules/beans)"); //$NON-NLS-1$ //$NON-NLS-2$
// log4j prefs
if (coreUiService != null && coreService != null) {
coreService.syncLog4jSettings(null);
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
@@ -2322,7 +2230,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (runProcessService != null && !isCommandLineLocalRefProject) {
runProcessService.initializeRootPoms(monitor);
TimeMeasurePerformance.step("logOnProject", "install / setup root poms"); //$NON-NLS-1$ //$NON-NLS-2$
TimeMeasure.step("logOnProject", "install / setup root poms"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
@@ -2331,15 +2239,13 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
tdqRepositoryService.initProxyRepository();
}
}
// regenerate relationship index
if (project.getEmfProject().getItemsRelations().isEmpty()) {
RelationshipItemBuilder.getInstance().buildAndSaveIndex();
}
fullLogonFinished = true;
this.repositoryFactoryFromProvider.afterLogon(monitor);
} finally {
TimeMeasurePerformance.end("logOnProject"); //$NON-NLS-1$
TimeMeasure.end("logOnProject"); //$NON-NLS-1$
TimeMeasure.display = false;
TimeMeasure.displaySteps = false;
TimeMeasure.measureActive = false;
}
String str[] = new String[] { getRepositoryContext().getUser() + "", projectManager.getCurrentProject() + "" }; //$NON-NLS-1$ //$NON-NLS-2$
log.info(Messages.getString("ProxyRepositoryFactory.log.loggedOn", str)); //$NON-NLS-1$
@@ -2740,13 +2646,4 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
public RepositoryWorkUnit getWorkUnitInProgress() {
return repositoryFactoryFromProvider.getWorkUnitInProgress();
}
public void executeRequiredLoginTasks(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ILoginTask[] allLoginTasks = LOGIN_TASK_REGISTRY_READER.getAllTaskListInstance();
for (ILoginTask task : allLoginTasks) {
if (task.isRequiredAlways()) {
task.run(monitor);
}
}
}
}

View File

@@ -14,7 +14,6 @@ package org.talend.core.repository.recyclebin;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
@@ -25,7 +24,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.common.util.EList;
@@ -108,8 +106,7 @@ public class RecycleBinManager {
List<IRepositoryViewObject> deletedObjects = new ArrayList<IRepositoryViewObject>();
final EList<TalendItem> deletedItems = projectRecyclebins.get(project.getTechnicalLabel()).getDeletedItems();
List<TalendItem> notDeletedItems = new ArrayList<TalendItem>();
List<TalendItem> dup_deletedItems = new ArrayList<>(deletedItems);
for (TalendItem deletedItem : dup_deletedItems) {
for (TalendItem deletedItem : deletedItems) {
try {
final ERepositoryObjectType type = ERepositoryObjectType.getType(deletedItem.getType());
// ignore the generated doc in recycle bin
@@ -277,40 +274,7 @@ public class RecycleBinManager {
resource = createRecycleBinResource(project);
}
resource.getContents().clear();
EList<String> deletedFolders = recycleBin.getDeletedFolders();
if (deletedFolders != null) {
List<String> folders = new LinkedList<>(deletedFolders);
Collections.sort(folders);
deletedFolders.clear();
deletedFolders.addAll(folders);
}
EList<TalendItem> deletedItems = recycleBin.getDeletedItems();
if (deletedItems != null) {
List<TalendItem> items = new LinkedList<>(deletedItems);
items.sort((l, r) -> {
if (l == null && r == null) {
return 0;
} else if (l == null) {
return -1;
} else if (r == null) {
return 1;
}
int result = StringUtils.compare(l.getType(), r.getType());
if (result != 0) {
return result;
}
result = StringUtils.compare(l.getPath(), r.getPath());
if (result != 0) {
return result;
}
return StringUtils.compare(l.getId(), r.getId());
});
deletedItems.clear();
deletedItems.addAll(items);
}
// set date to null to avoid timezone conflict
recycleBin.setLastUpdate(null);
recycleBin.setLastUpdate(new Date());
resource.getContents().add(recycleBin);
EmfHelper.saveResource(resource);
lastSavedRecycleBinMap.put(recycleBin, EcoreUtil.copy(recycleBin));

View File

@@ -22,7 +22,6 @@ import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
@@ -33,7 +32,6 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.model.properties.ImplicitContextSettings;
@@ -45,7 +43,6 @@ import org.talend.core.model.properties.Project;
import org.talend.core.model.properties.StatAndLogsSettings;
import org.talend.core.model.properties.Status;
import org.talend.core.model.properties.impl.PropertiesFactoryImpl;
import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.core.repository.constants.FileConstants;
import org.talend.core.repository.recyclebin.RecycleBinManager;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
@@ -143,10 +140,9 @@ public class ProjectDataJsonProvider {
ProjectDataJsonProvider.loadProjectSettings(project, input);
}
IPath relationShipPath = settingFolderPath.append(FileConstants.RELATIONSHIP_FILE_NAME);
try (InputStream is = inputStreamProvider.getStream(relationShipPath)) {
if (is != null) {
ProjectDataJsonProvider.loadRelationShips(project, is);
}
input = inputStreamProvider.getStream(relationShipPath);
if (input != null) {
ProjectDataJsonProvider.loadRelationShips(project, input);
}
IPath migrationTaskPath = settingFolderPath.append(FileConstants.MIGRATION_TASK_FILE_NAME);
input = inputStreamProvider.getStream(migrationTaskPath);
@@ -188,11 +184,10 @@ public class ProjectDataJsonProvider {
private static void loadRelationShips(Project project, IPath projectFolderPath) throws PersistenceException {
File file = getLoadingConfigurationFile(projectFolderPath, FileConstants.RELATIONSHIP_FILE_NAME);
if (file != null && file.exists()) {
try (FileInputStream fis = new FileInputStream(file)) {
loadRelationShips(project, fis);
} catch (Exception e) {
// ignore
ExceptionHandler.process(e);
try {
loadRelationShips(project, new FileInputStream(file));
} catch (FileNotFoundException e) {
throw new PersistenceException(e);
}
}
}
@@ -211,72 +206,11 @@ public class ProjectDataJsonProvider {
project.getItemsRelations().add(json.toEmfObject());
}
}
} catch (Exception e) {
// ignore
ExceptionHandler.process(e);
}
}
public static void checkAndRectifyRelationShipSetting(Project project) throws PersistenceException {
File file = getSavingConfigurationFile(project.getTechnicalLabel(), FileConstants.RELATIONSHIP_FILE_NAME);
if (file == null || !file.exists()) {
return;
}
List<ItemRelationsJson> itemRelationsJsonsList = null;
TypeReference<List<ItemRelationsJson>> typeReference = new TypeReference<List<ItemRelationsJson>>() {
};
FileInputStream input = null;
try {
input = new FileInputStream(file);
itemRelationsJsonsList = new ObjectMapper().readValue(new FileInputStream(file), typeReference);
} catch (Exception e) {
throw new PersistenceException(e);
} finally {
closeInputStream(input);
}
if (itemRelationsJsonsList == null || itemRelationsJsonsList.isEmpty()) {
return;
}
Set<String> idVersionSet = new HashSet<String>();
List<ItemRelationsJson> relationJsonList = new ArrayList<ItemRelationsJson>();
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
boolean needModify = false;
for (ItemRelationsJson relationJson : itemRelationsJsonsList) {
ItemRelationJson baseItem = relationJson.getBaseItem();
String idversion = baseItem.getId() + ";" + baseItem.getVersion();
if (idVersionSet.contains(idversion)) {
// in case duplicate
needModify = true;
continue;
}
// remove system routines relation
int originalSize = relationJson.getRelatedItems().size();
relationJson.getRelatedItems()
.removeIf(relatedItem -> RelationshipItemBuilder.ROUTINE_RELATION.equals(relatedItem.getType())
&& currentSystemRoutinesMap.containsValue(relatedItem.getId()));
if (relationJson.getRelatedItems().size() != originalSize) {
needModify = true;
}
if (!relationJson.getRelatedItems().isEmpty()) {
relationJsonList.add(relationJson);
}
idVersionSet.add(idversion);
}
if (needModify) {
// re-load to project
if (relationJsonList != null && !relationJsonList.isEmpty()) {
project.getItemsRelations().clear();
for (ItemRelationsJson json : relationJsonList) {
project.getItemsRelations().add(json.toEmfObject());
}
}
// re-save relationship setting json file
saveRelationShips(project);
}
}
private static void loadMigrationTaskSetting(Project project, IPath projectFolderPath) throws PersistenceException {

View File

@@ -205,27 +205,6 @@ public class StandaloneConnectionContextUtils {
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
getOriginalValue(contextProperties, additionalJDBCSettings));
String dataprocProjectId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
getOriginalValue(contextProperties, dataprocProjectId));
String dataprocClusterId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
getOriginalValue(contextProperties, dataprocClusterId));
String dataprocRegion = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
getOriginalValue(contextProperties, dataprocRegion));
String dataprocJarsBucket = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
getOriginalValue(contextProperties, dataprocJarsBucket));
String dataprocPathToCredentials = cloneConn.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
getOriginalValue(contextProperties, dataprocPathToCredentials));
String hiveEnableHa = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA,
getOriginalValue(contextProperties, hiveEnableHa));

View File

@@ -26,7 +26,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Priority;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -38,7 +37,6 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -71,7 +69,6 @@ import org.talend.core.model.properties.ValidationRulesConnectionItem;
import org.talend.core.model.properties.helper.ByteArrayResource;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.constants.FileConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.utils.ResourceFilenameHelper.FileName;
import org.talend.core.ui.ITestContainerProviderService;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
@@ -650,23 +647,6 @@ public class XmiResourceManager {
}
public void saveResource(Resource resource) throws PersistenceException {
try {
if (resource != null) {
Object objectByType = EcoreUtil.getObjectByType(resource.getContents(), PropertiesPackage.eINSTANCE.getProject());
if (objectByType != null) {
Project project = (Project) objectByType;
EList migrationTasks = project.getMigrationTask();
if (migrationTasks != null && 1 < migrationTasks.size()) {
org.talend.commons.exception.ExceptionHandler.process(new Exception("Bad saving logic for Project"),
Priority.WARN);
ProxyRepositoryFactory.getInstance().saveProject(new org.talend.core.model.general.Project(project));
return;
}
}
}
} catch (Throwable e) {
org.talend.commons.exception.ExceptionHandler.process(e);
}
EmfHelper.saveResource(resource);
}

View File

@@ -122,8 +122,7 @@ Require-Bundle: org.eclipse.jdt.core,
org.talend.components.api,
org.apache.servicemix.bundles.avro,
jackson-core-asl,
org.talend.libraries.jackson,
org.talend.libraries.apache.common
org.talend.libraries.jackson
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,

View File

@@ -1,128 +0,0 @@
<?xml version="1.0"?>
<mapping>
<dbms product="DATABRICKS_DELTA_LAKE" id="databricks_delta_lake_id" label="Mapping Delta Lake" default="true">
<dbTypes>
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
<dbType type="FLOAT" ignoreLen="true" ignorePre="true"/>
<dbType type="DOUBLE" ignoreLen="true" ignorePre="true"/>
<dbType type="BIGINT" ignoreLen="true" ignorePre="true"/>
<dbType type="INT" ignoreLen="true" ignorePre="true"/>
<dbType type="TINYINT" ignoreLen="true" ignorePre="true"/>
<dbType type="STRING" ignoreLen="true" ignorePre="true"/>
<dbType type="DECIMAL" ignoreLen="false" ignorePre="false"/>
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true"/>
<dbType type="STRUCT" ignoreLen="true" ignorePre="true"/>
<dbType type="MAP" ignoreLen="true" ignorePre="true"/>
<dbType type="ARRAY" ignoreLen="true" ignorePre="true"/>
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
<dbType type="DATE" ignoreLen="true" ignorePre="true"/>
</dbTypes>
<language name="java">
<talendToDbTypes><!-- Adviced mappings -->
<talendType type="id_List"/>
<talendType type="id_Boolean">
<dbType type="BOOLEAN" default="true"/>
</talendType>
<talendType type="id_Byte">
<dbType type="TINYINT" default="true"/>
<dbType type="BIGINT"/>
<dbType type="INT"/>
<dbType type="SMALLINT"/>
</talendType>
<talendType type="id_byte[]"/>
<talendType type="id_Character">
<dbType type="STRING" default="true"/>
</talendType>
<talendType type="id_Date">
<dbType type="TIMESTAMP" default="true"/>
<dbType type="DATE"/>
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DECIMAL" default="true"/>
<dbType type="BIGINT"/>
<dbType type="FLOAT"/>
<dbType type="DOUBLE"/>
</talendType>
<talendType type="id_Double">
<dbType type="DOUBLE" default="true" />
<dbType type="FLOAT"/>
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT" default="true" />
<dbType type="DOUBLE"/>
</talendType>
<talendType type="id_Integer">
<dbType type="INT" default="true" />
<dbType type="BIGINT" />
</talendType>
<talendType type="id_Long">
<dbType type="BIGINT" default="true" />
</talendType>
<talendType type="id_Object">
<dbType type="STRUCT" default="true" />
<dbType type="MAP" />
<dbType type="ARRAY" />
</talendType>
<talendType type="id_Short">
<dbType type="SMALLINT" default="true" />
<dbType type="INT" />
</talendType>
<talendType type="id_String">
<dbType type="STRING" default="true"/>
</talendType>
</talendToDbTypes>
<dbToTalendTypes><!-- Adviced mappings -->
<dbType type="STRING">
<talendType type="id_String" default="true"/>
</dbType>
<dbType type="BOOLEAN">
<talendType type="id_Boolean" default="true"/>
</dbType>
<dbType type="DOUBLE">
<talendType type="id_Double" default="true"/>
<talendType type="id_BigDecimal"/>
<talendType type="id_Float"/>
</dbType>
<dbType type="DECIMAL">
<talendType type="id_BigDecimal" default="true"/>
</dbType>
<dbType type="BIGINT">
<talendType type="id_Long" default="true"/>
<talendType type="id_Integer"/>
</dbType>
<dbType type="INT">
<talendType type="id_Integer" default="true"/>
<talendType type="id_Short"/>
</dbType>
<dbType type="SMALLINT">
<talendType type="id_Short" default="true"/>
<talendType type="id_Byte"/>
</dbType>
<dbType type="TINYINT">
<talendType type="id_Byte" default="true"/>
</dbType>
<dbType type="FLOAT">
<talendType type="id_Float" default="true"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="STRUCT">
<talendType type="id_Object" default="true"/>
</dbType>
<dbType type="MAP">
<talendType type="id_Object" default="true"/>
</dbType>
<dbType type="ARRAY">
<talendType type="id_Object" default="true"/>
</dbType>
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true"/>
</dbType>
<dbType type="DATE">
<talendType type="id_Date" default="true"/>
</dbType>
</dbToTalendTypes>
</language>
</dbms>
</mapping>

View File

@@ -40,7 +40,7 @@
<dbType type="SET" ignoreLen="true" ignorePre="true" />
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
<dbType type="TINYINT" ignorePre="true" />
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />

View File

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

View File

@@ -9,14 +9,13 @@
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
<dbType type="CHARACTER" ignoreLen="true" ignorePre="true" />
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" defaultPattern="dd-MM-yyyy" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
<dbType type="UNSIGNED INT" ignoreLen="true" ignorePre="true" />
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
<dbType type="INT" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" defaultLength="10" ignorePre="false" />
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
<dbType type="REAL" />
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
@@ -176,11 +175,6 @@
<talendType type="id_Short"/>
<talendType type="id_Long"/>
</dbType>
<dbType type="INTEGER">
<talendType type="id_Integer" default="true" />
<talendType type="id_Short"/>
<talendType type="id_Long"/>
</dbType>
<dbType type="NUMERIC">
<talendType type="id_Double"/>
<talendType type="id_Float"/>

View File

@@ -100,11 +100,6 @@
<xs:restriction base="xs:short"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="defaultPattern">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="default" type="xs:boolean"/>
</xs:complexType>
</xs:element>

View File

@@ -66,16 +66,4 @@
serviceId="IRepositoryContextUpdateService">
</Service>
</extension>
<extension
point="org.talend.core.runtime.saveItemContextLinkService">
<creator
class="org.talend.core.model.context.link.ProcessItemContextLinkService">
</creator>
</extension>
<extension
point="org.talend.core.runtime.saveItemContextLinkService">
<creator
class="org.talend.core.model.context.link.ConnectionItemContextLinkService">
</creator>
</extension>
</plugin>

View File

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

View File

@@ -42,7 +42,6 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -51,16 +50,11 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.osgi.framework.Bundle;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.ExceptionHandler;
@@ -1179,33 +1173,4 @@ public class FilesUtils {
}
}
public static void executeFolderAction(IProgressMonitor monitor, IResource parentFolder, IWorkspaceRunnable run)
throws CoreException {
if (Job.getJobManager().currentRule() == null) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
ISchedulingRule defaultRule = workspace.getRuleFactory().modifyRule(parentFolder);
ISchedulingRule noBlockRule = new ISchedulingRule() {
@Override
public boolean isConflicting(ISchedulingRule rule) {
return this.contains(rule);
}
@Override
public boolean contains(ISchedulingRule rule) {
if (this.equals(rule)) {
return true;
}
if (defaultRule.contains(rule)) {
return true;
}
return false;
}
};
workspace.run(run, noBlockRule, IWorkspace.AVOID_UPDATE, monitor);
} else {
run.run(monitor);
}
}
}

View File

@@ -94,6 +94,4 @@ public interface IESBService extends IService {
* @return
*/
public IProcessor createOSGIJavaProcessor(IProcess process, Property property, boolean filenameFromLabel);
public boolean isSOAPServiceProvider(Item item);
}

View File

@@ -214,5 +214,5 @@ public interface ITDQRepositoryService extends IService {
/**
* @param chooseContext the context name which want to swtich
*/
boolean popupSwitchContextFailedMessage(String chooseContext);
void popupSwitchContextFailedMessage(String chooseContext);
}

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