Compare commits

...

150 Commits

Author SHA1 Message Date
apoltavtsev
de61b58787 fix(TESB-31274) jobs containing tRestClient build issues 2020-12-16 08:16:55 +01:00
chmyga
c72882d4f3 Dchmyga/tdi 44962 backport to master (#3704)
* Revert "fix(TDI-44826): Missing line in Resume log (#3640)" (#3691)

This reverts commit cf52e1e004.

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>

* fix(TDI-44962): fix stream closed exception (#3692)

* Recreate FileWriter with append after writing header

* Add csv writer to shared writer map

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
# Conflicts:
#	main/plugins/org.talend.librariesmanager/resources/java/routines/system/ResumeUtil.java
2020-12-07 22:04:17 +08:00
jiezhang-tlnd
b1581aac33 fix(TUP-28893)Support more types of artifact for share libs (#3831)
* fix(TUP-28893)Support more types of artifact for share libs
https://jira.talendforge.org/browse/TUP-28893

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/ArtifacoryRepositoryHandler.java
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/nexus3/handler/AbsNexus3SearchHandler.java

* fix(TUP-28893)Support more types of artifact for share libs

* fix junits

* fix junits
2020-11-30 16:51:25 +08:00
bhe-talendbj
510795eb64 fix(TUP-29227): Set prompt value if it is null (#3817) 2020-11-19 15:47:06 +08:00
apoltavtsev
51697c3477 fix(TESB-30661) Wrong artifact version of the job called by a route 2020-10-29 12:06:05 +01:00
bhe-talendbj
df51e4643f bugfix(TUP-26138) Regenerate relationship.index (#3088) (#3473) (#3739)
* fix(TUP-26138): Regenerate relationship index

Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/model/ProxyRepositoryFactory.java
2020-10-22 14:54:50 +08:00
kjwang
6672a29377 Fix TUP-28603 'Export item' missing signature (#3643) (#3681) (#3740)
Fix TUP-28603 'Export item' missing signature
https://jira.talendforge.org/browse/TUP-28603
2020-10-22 10:19:11 +08:00
Chao MENG
fc613a6a31 fix(TUP-27076): Unable to connect to codecommit GIT after the first (#3698)
login.
https://jira.talendforge.org/browse/TUP-27076
2020-10-12 09:34:36 +08:00
undx
438d6a43ab fix(build-job): add missing component-runtime pom 2020-10-08 16:24:37 +02:00
undx
2117a06cf2 fix(TUP-25152): backport to patch/7.2.1 2020-10-08 13:38:58 +02:00
Emmanuel GALLOIS
e82174e99b fix(TPS-4351): Make component-runtime class loader find classes in JobServer (#3668) 2020-10-06 13:56:29 +02:00
bhe-talendbj
101e58e159 fix(TUP-27268): Add isRequiredAlways for ILoginTask (#3593) (#3603) (#3604)
Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/model/ProxyRepositoryFactory.java

Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/model/ProxyRepositoryFactory.java
2020-09-07 16:01:30 +08:00
Chao MENG
a5d49f0051 Cmeng/patch/7.2/tup 28316 all git related issues (#3569)
* Revert "Revert "fix(TUP-27989): Git related issues checked with support (#3494)""

This reverts commit cdf41fb420.

* Revert "Revert "fix(TUP-28316): Left git related issues checked with support https://jira.talendforge.org/browse/TUP-28316""

This reverts commit cdfb44ced5.

* fix(TUP-28316): Left git related issues checked with support
https://jira.talendforge.org/browse/TUP-28316
2020-08-26 12:05:21 +08:00
Chao MENG
cdf41fb420 Revert "fix(TUP-27989): Git related issues checked with support (#3494)"
This reverts commit fdb1739b1b.
2020-08-19 21:35:53 +08:00
Chao MENG
cdfb44ced5 Revert "fix(TUP-28316): Left git related issues checked with support https://jira.talendforge.org/browse/TUP-28316"
This reverts commit 241f022cd4.
2020-08-19 21:35:46 +08:00
Chao MENG
241f022cd4 fix(TUP-28316): Left git related issues checked with support
https://jira.talendforge.org/browse/TUP-28316

Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/recyclebin/RecycleBinManager.java
2020-08-19 19:38:48 +08:00
Chao MENG
fdb1739b1b fix(TUP-27989): Git related issues checked with support (#3494)
https://jira.talendforge.org/browse/TUP-27989
2020-08-19 19:38:48 +08:00
Chao MENG
c0b4202259 fix(TUP-27953): tSalesforceInput component displays in-job (#3504) (#3560)
tSalesforceConnection incorrectly
https://jira.talendforge.org/browse/TUP-27953
2020-08-19 10:46:57 +08:00
jiezhang-tlnd
bd3cc178de Jzhang/72/feat/tup 27862 re (#3543)
* feat(TUP-27862)Add possibility to customize pattern for dates when

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table
2020-08-11 12:00:02 +08:00
jiezhang-tlnd
984ca27e4e Jzhang/feat/73/tup 27862 (#3480) (#3522)
* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* feat(TUP-27862)Add possibility to customize pattern for dates when
retrieve table

* add junit

* add junits

* add junits
2020-08-07 10:52:09 +08:00
Zhiwei Xue
0468f1613c fix(TUP-26876):NoClassDefFoundError when I run spark job with JobServer (#3517) 2020-08-03 16:01:58 +08:00
apoltavtsev
169610aa09 TESB-29071 Bean in route gives wrong output on running in studio 2020-07-31 12:10:01 +02:00
bhe-talendbj
99ebc8c31b fix(TUP-26687): backport (#3508) 2020-07-31 10:27:36 +08:00
hzhao-talendbj
947f5b1730 fix(TUP-26810)if one jar used by two different components, it will (#… (#3465)
* fix(TUP-26810)if one jar used by two different components, it will (#3228)

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

* TPS-4193  modify code mistake

* test github not pushed

* tps-4193
2020-07-14 09:28:04 +08:00
vdrokov
ca5257f41f fix(TESB-29435): cConfig "Install" button needs to be pressed twice to import a jar (#3467) 2020-07-13 11:26:55 +03:00
Chao MENG
50bc40a36d Revert "Revert "fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2847)""
This reverts commit 93fd820240.
2020-07-13 10:13:58 +08:00
Chao MENG
163a5fed4b Revert "Revert "fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2843)""
This reverts commit 254ed5f9c2.
2020-07-13 10:13:44 +08:00
Jane Ding
94ec866da2 fix(TUP-27590)Relationship.index might get really big (#3463)
https://jira.talendforge.org/browse/TUP-27590
2020-07-10 09:24:44 +08:00
Jane Ding
9e5ebe9bd6 fix(TUP-27590):Relationship.index might get really big (#3461)
https://jira.talendforge.org/browse/TUP-27590
2020-07-09 17:09:08 +08:00
Chao MENG
254ed5f9c2 Revert "fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2843)"
This reverts commit 1e067fe87d.
2020-07-08 15:54:04 +08:00
Chao MENG
93fd820240 Revert "fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2847)"
This reverts commit 120edfe17c.
2020-07-08 15:53:43 +08:00
Chao MENG
120edfe17c fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2847)
fix(TUP-24942): need to do studio metadata mapping to tsapbapi components for the new closedlist when D&D metadata to job
https://jira.talendforge.org/browse/TUP-24942
2020-07-08 09:37:03 +08:00
Chao MENG
1e067fe87d fix(TUP-24942): need to do studio metadata mapping to tsapbapi (#2843)
fix(TUP-24942): need to do studio metadata mapping to tsapbapi components for the new closedlist when D&D metadata to job
https://jira.talendforge.org/browse/TUP-24942
2020-07-08 09:32:57 +08:00
Jane Ding
17647bf874 fix(TUP-27590):Relationship.index might get really big (#3431)
* fix(TUP-27590):Relationship.index might get really big
https://jira.talendforge.org/browse/TUP-27590

* fix(TUP-27590):Relationship.index might get really big
https://jira.talendforge.org/browse/TUP-27590

* fix(TUP-27590)Relationship.index might get really big
https://jira.talendforge.org/browse/TUP-27590
relatedItems is empty should not add  as a record
2020-07-07 10:23:50 +08:00
bhe-talendbj
e6bb7ef649 fix(TUP-26539): Unassociate data from associateListeners (#3169) (#3177) (#3433)
* 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
2020-07-07 10:21:44 +08:00
sbliu
5523cffed8 TUP-27416 Validate network, timeout value read from nexus timeout preference configuration . 2020-07-07 10:02:22 +08:00
hzhao-talendbj
132c4915da fix miss dependency in assmble.xml with loop dependency (#3422) 2020-07-02 14:28:56 +08:00
bhe-talendbj
cb4139acf3 bugfix(TUP-27078): Fix parse response data get from artifactory which is runing with https (#3343) (#3434) 2020-07-02 14:06:52 +08:00
bhe-talendbj
a68447afe4 fix(TUP-27053): backport (#3361) (#3389) 2020-06-19 15:13:07 +08:00
jiezhang-tlnd
c28b686049 Jzhang/721/temp/tps 4050 (#3393)
* Jzhang/7.2/bugfix/tup 26896 (#3353)

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables
https://jira.talendforge.org/browse/TUP-26896

* format code

* update mapping sybase
2020-06-12 16:37:41 +08:00
Zhiwei Xue
ab7c0c0833 chore: Remove junit of Mojo version. 2020-05-21 14:20:12 +08:00
vdrokov
4a1e06e010 fix(TESB-29148): Add lines deleted by accident. (#3312) 2020-05-20 21:15:21 +02:00
Chao MENG
8ff0e806cf fix(TUP-27077): NoClassDefFoundException when using "independent process to run subjob" and tAzureAdlsGen2Input 2020-05-19 09:55:35 +08:00
Jane Ding
3149ac1e6b fix(TUP-27003):Should disable the Commit button of Uncommitted files (#3273) (#3307)
found dialog when project is in MERGING state
https://jira.talendforge.org/browse/TUP-27003
2020-05-18 18:49:44 +08:00
Chao MENG
8f513789aa feat(TUP-26569): merge known conflicts automatically
https://jira.talendforge.org/browse/TUP-26569
2020-05-18 17:53:43 +08:00
Mike Yan
b245900000 fix(TCOMP-1681): Adding missing poms for OSGi type build 2020-05-15 17:25:03 +08:00
bhe-talendbj
ad2a22dcc4 fix(TUP-26809): backport 2020-05-14 16:04:36 +08:00
bhe-talendbj
e3f1c84dfd fix(TUP-26728): backport
Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/designer/runprocess/IRunProcessService.java
2020-05-14 11:27:21 +08:00
jiezhang-tlnd
3b04a2f690 fix(TUP-26896)Error create a Sybase connection in metadata and cannot
(#3257)

retrieve tables (#3231)

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables
https://jira.talendforge.org/browse/TUP-26896

* fix(TUP-26896)retrieve schema on sybase 16 anywhere metadate get empry
value
https://jira.talendforge.org/browse/TUP-26896

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables
https://jira.talendforge.org/browse/TUP-26896

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables

* fix(TUP-26896)Error create a Sybase connection in metadata and cannot
retrieve tables
https://jira.talendforge.org/browse/TUP-26896

Conflicts:
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/model/DBConnectionFillerImpl.java

Conflicts:
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/model/DBConnectionFillerImpl.java

Conflicts:
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/model/DBConnectionFillerImpl.java
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/utils/MetadataConnectionUtils.java
2020-05-14 10:51:25 +08:00
undx
0c82d7a96b feat(TCOMP-1681): Make ESB Studio job export TaCoKit compliant 2020-05-12 18:29:11 +02:00
sbliu
17110bb1fa TPS-3943 [7.2.1]Talend MDM Connection Errors(TMDM-14505, TMDM-14565)(#3270)
* TMDM-14505 MDM connection in metadata randomly failed with error 'Failed to connect to MDM, please change MDM settings' 

Moved interface IWebServiceHook from mdm bundle and renamed to IMDMWebServiceHook,re-use the implemented webservice hook in mdm for both mdm & di side to establish mdm connection token.
Add unit test to check presence of the required header that containing token.

* TMDM-14565 Check mdm connection cannot work both in mdm and di perspective at same time (#3187)

Switch context class loader for web service created.
2020-05-09 17:55:52 +08:00
hzhao-talendbj
29b1f3a97c fix(TUP-26388)Amazon Redshift Driver class not working with Implicit (#3181)
* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context

* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context
2020-05-07 19:29:04 +08:00
hzhao-talendbj
6af4cbf201 Revert "fix(26752): Merge branch 'bhe/bugfix/TUP-26752_721' into hzhao/TPS-3852-temp"
This reverts commit 41ef59868e.
2020-05-07 19:22:28 +08:00
bhe-talendbj
a3c1d73f36 fix(TUP-26752): backport 2020-05-07 19:10:32 +08:00
bhe-talendbj
41ef59868e fix(26752): Merge branch 'bhe/bugfix/TUP-26752_721' into hzhao/TPS-3852-temp 2020-05-07 18:04:58 +08:00
Jane Ding
ac7c8ff40d fix(TUP-23452)COMPUTE_DEPENDENCIES_FAILED:{path=META-INF/maven/org.ta… (#3250)
* fix(TUP-23452)COMPUTE_DEPENDENCIES_FAILED:{path=META-INF/maven/org.talend.components/components-salesforce-runtime/dependencies.txt
(#2555) (#2561)

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

Conflicts:
	main/plugins/org.talend.updates.runtime/src/main/java/org/talend/updates/runtime/nexus/component/ComponentsDeploymentManager.java

* fix(TUP-23452)COMPUTE_DEPENDENCIES_FAILED:{path=META-INF/maven/org.talend.components/components-salesforce-runtime/dependencies.txt
https://jira.talendforge.org/browse/TUP-23452
2020-05-07 17:53:42 +08:00
hwang-talend
7872cf40d8 bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which (#3075)
bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which the value should be "BPCHAR"
2020-05-07 17:46:32 +08:00
hzhao-talendbj
62997993ee fix missing db value (#3209) (#3211) 2020-05-07 17:27:19 +08:00
hwang-talend
b81bba4311 bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#3198)
* bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from
Repository

* bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from
Repository
2020-05-07 17:18:34 +08:00
hwang
6d787c8bb7 Revert "bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#3198)"
This reverts commit 71d4e06163.
2020-04-29 18:28:11 +08:00
hwang
d3edced303 Revert "bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which (#3075)"
This reverts commit 0dc85faca3.
2020-04-29 18:27:27 +08:00
hwang-talend
71d4e06163 bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#3198)
* bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from
Repository

* bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from
Repository
2020-04-29 18:15:05 +08:00
hwang-talend
0dc85faca3 bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which (#3075)
bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which the value should be "BPCHAR"
2020-04-29 18:02:11 +08:00
vdrokov
672ac95f1c fix(TESB-28815): Fix bundle name (should include -bundle suffix at the end) (#3218) 2020-04-16 12:54:34 +03:00
jiezhang-tlnd
03fd95bb57 Temp patch tps 3844 (#3206)
* fix(TUP-24310):routines is duplicated in the reactor (#2706)

* fix(TUP-24310):routines is duplicated in the reactor (#2741)

* fix(TUP-24310):routines is duplicated in the reactor

* fix(TUP-24310):routines is duplicated in the reactor.

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

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

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

* fix(TUP-26229):Dynamic Schema default Mapping can't be changed (#3184)

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

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

* bugfix(TUP-26475):Job is referring to the joblet present in the (#3146)

bugfix(TUP-26475):Job is referring to the joblet present in the reference job even after we delete it from the main job

Co-authored-by: Zhiwei Xue <zwxue@talend.com>
Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: hcyi <hcyi@talend.com>
Co-authored-by: hwang-talend <hwang@talend.com>
2020-04-13 16:08:56 +08:00
hcyi
38b1a6bbaa TPS-3909:[7.3.1] DI job with Big Data components fail when using the custom hadoop conf file location feature(TUP-26580) (#3171)
* fix(TUP-26155):improve for dataviewer if MongoDB with SSL (#3111) (#3132)

* fix(TUP-26155):fix compilation error (#3140)
2020-03-30 17:15:46 +08:00
hzhao-talendbj
3efe68118a fix mac os display issue 2020-03-24 21:53:15 +08:00
hzhao-talendbj
f3c9e7439e fix column names are same issue (#3155) (#3156) 2020-03-24 16:51:04 +08:00
hzhao-talendbj
242760143f fix(TUP-26081): Share libraries pb (#3063) (#3138)
* fix(TUP-26081): Share libraries pb

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

* fix(TUP-26081): Share libraries pb

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

Co-authored-by: Chao MENG <cmeng@talend.com>
2020-03-23 15:16:58 +08:00
Zhiwei Xue
f98bd78d07 fix(TUP-25929):Studio re synchronizing jars with artifact repository
every time when logged into studio
2020-03-23 15:10:11 +08:00
kjwang
03b61215d0 fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure (#3117)
fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy
failure

https://jira.talendforge.org/browse/TUP-26189
2020-03-23 14:40:43 +08:00
bhe-talendbj
c3910a11a0 bugfix(TUP-25965) Include subjob's test reports (#3055) (#3099)
* bugfix(TUP-25965) Synchronize test reports

* bugfix(TUP-25965) Ignore test failures and zip test reports

* bugfix(TUP-25965) Ignore test failures and zip test reports

* bugfix(TUP-25965) Ignore test failures and zip test reports

* bugfix(TUP-25965) Ignore test failures and zip test reports

* bugfix(TUP-25965) Ignore test failures

* bugfix(TUP-25965) Ignore test failures

* bugfix(TUP-25965) Skip tests when running job

* fix(TUP-25965): Call service to check is build job or not

Conflicts:
	main/plugins/org.talend.repository.items.importexport/plugin.xml
2020-03-23 14:37:04 +08:00
hzhao-talendbj
6b73594486 fix(TUP-25889)Display issue for the line between Linker source and (#3103) (#3137)
* fix(TUP-25889)Display issue for the line between Linker source and
target on Mac and Ubuntu

* fix(TUP-25889)Display issue for the line between Linker source and
target on Mac and Ubuntu
2020-03-23 14:29:14 +08:00
Zhiwei Xue
f247cbf4de fix(TUP-26344):Some job including customer component can't generate code (#3121)
migrated from 6.3.1 to 7.2.1
2020-03-12 12:02:35 +08:00
hwang-talend
68372a9d7a bugfix(TUP-25959):Incorrect message is observed in the tWarn component (#3098)
bugfix(TUP-25959):Incorrect message is observed in the tWarn component
2020-03-09 14:57:33 +08:00
jiezhang-tlnd
19e62edbec Temp patch tps 3681 (#3102)
* fix(TUP-26170):fix subjob dependencies missing in classpath problem of (#3091)

CI.

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in (#2610)

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789
Add a junit.

Co-authored-by: Zhiwei Xue <zwxue@talend.com>
Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
2020-02-24 14:38:36 +08:00
Chao MENG
a8d56d413d Patch/7.2.1 tps 3583 (#2989) 2020-01-09 17:20:12 +01:00
Chao MENG
df0fde5b02 Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#2914)"
This reverts commit 85901957ce.
2020-01-02 11:19:16 +08:00
Chao MENG
5c0ddf4cd4 Revert "Cmeng/patch/7.2.1/tup 25226 fix (#2955)"
This reverts commit 6d283447e5.
2020-01-02 11:18:11 +08:00
Chao MENG
89b3abd6dd Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"
This reverts commit 3a538f3ae4.
2020-01-02 11:17:38 +08:00
hzhao-talendbj
8131d3bfcf bugfix(TUP-25194)External jar sync issue in studio using tLibraryLoad (#2867) (#2947)
* bugfix(TUP-25194)External jar sync issue in studio using tLibraryLoad
2019-12-30 14:40:37 +08:00
kjwang
4da5125b07 Kjwang/fix tup 24953 nexus 3 gets populated by crypto utils.jar (#2883) (#2908)
* Fix TUP-24953 Nexus 3 gets populated by crypto-utils.jar
https://jira.talendforge.org/browse/TUP-24953

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

Conflicts:
	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/nexus/Nexus3RepositoryHandler.java
2019-12-30 14:36:55 +08:00
Chao MENG
f6e7e7ec40 fix(TUP-24954): Error "XML format is incorrect", when customer try to (#2803) (#2807)
fix(TUP-24954): Error "XML format is incorrect", when customer try to define a 'File XML metadata' using a XSD file
https://jira.talendforge.org/browse/TUP-24954
2019-12-30 14:32:24 +08:00
Chao MENG
b2bff6cce3 fix(TUP-23984): JSON metadata wizard for output mode throws class cast (#2624) (#2625)
exception on Linux and Mac
https://jira.talendforge.org/browse/TUP-23984
2019-12-30 14:26:56 +08:00
Chao MENG
3a538f3ae4 feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-27 17:15:08 +08:00
Chao MENG
6d283447e5 Cmeng/patch/7.2.1/tup 25226 fix (#2955)
* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

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

* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-26 19:08:24 +08:00
Mike Yan
e231bff121 fix(TESB-27614): Check NPE for 'files' node in route assembly file (#2941) 2019-12-24 17:56:36 +08:00
Chao MENG
85901957ce feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#2914)
* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

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

* fix(TUP-18610):When drag hdfs to spark job,hadoop cluster some context
parameters cann't drag to job
https://jira.talendforge.org/browse/TUP-18610

* fix(TUP-18610)When drag hdfs to job,hadoop cluster some context
parameters cann't drag to job
https://jira.talendforge.org/browse/TUP-18610

* fix(TUP-18610)When drag hdfs to spark job,hadoop cluster some context
parameters cann't drag to job
https://jira.talendforge.org/browse/TUP-18610

* fix(TUP-18610)When drag hdfs to spark job,hadoop cluster some context

parameters cann't drag to job
https://jira.talendforge.org/browse/TUP-18610

Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
2019-12-24 11:29:35 +08:00
SunChaoqun
9e13dd710c TESB-27139:"Could not find the context Default" is shown in runtime when (#2936) deploy a route into runtime 2019-12-23 15:24:35 +07:00
Chao MENG
f02e9bd6ae fix(TUP-24749): [7.2.1] issue to download component jar via https proxy (#2876)
https://jira.talendforge.org/browse/TUP-24749
2019-12-02 19:39:27 +08:00
Chao MENG
095f33bea7 Cmeng/backport/7.2/tup 24749 proxy issue (#2871)
* fix(TUP-24749): [7.2.1] issue to download component jar via https
proxy (#2840)

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/nexus/TalendMavenResolver.java
2019-12-02 10:51:58 +08:00
Chao MENG
7b65d316ad Cmeng/bugfix/tup 24749 proxy issue (#2808) (#2813)
* fix(TUP-24749): [7.2.1] issue to download component jar via https
proxy

https://jira.talendforge.org/browse/TUP-24749
https://jira.talendforge.org/browse/TUP-24783
https://jira.talendforge.org/browse/TUP-24606
2019-12-02 10:51:57 +08:00
jiezhang-tlnd
0da7d5235d Jding/test patch tps 3474 (#2861) (#2875)
* Jding/tup 24732 studio code tab doesn't show error (#2805) (#2812)

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* Jding/tup 24732 check loop dependency issues (#2844) (#2860)

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job
https://jira.talendforge.org/browse/TUP-24732

* fix(TUP-24732)[7.2.1] Studio Code tab doesn't generate code/show errors
in Job
https://jira.talendforge.org/browse/TUP-24732
2019-12-02 10:45:22 +08:00
hwang
66b20dcea5 Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap #2852"
This reverts commit 0b434cfc4a.
2019-11-22 16:07:19 +08:00
hwang
bc6506c9fb Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap"
This reverts commit b55842aa2d.
2019-11-22 16:07:14 +08:00
hwang
0b434cfc4a bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap #2852 2019-11-22 11:59:42 +08:00
hwang
b55842aa2d bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-21 22:06:25 +08:00
Zhiwei Xue
23e028407e fix(TUP-24365):fix m2 repository problem for zero installation CI (#2764) 2019-11-14 17:38:30 +08:00
hcyi
2b54495b25 fix(TUP-24944):Fail to create teradata connection if connection with (#2837)
additional parameters.
2019-11-14 11:30:57 +08:00
Zhiwei Xue
74f5674c72 fix(TUP-25123):Problem of dependencies with spark joblets (#2823) 2019-11-08 14:13:06 +08:00
Zhiwei Xue
aab1e3f6f8 fix(TUP-24323):_tdm folder is missing after build thmap job (#2693) 2019-11-06 16:00:23 +08:00
nrousseau
390ecb97e5 Update pom.xml 2019-11-06 13:37:14 +08:00
nrousseau
223fb3e2a1 Update pom.xml 2019-11-06 12:27:31 +08:00
nrousseau
9d3a2d2fcd upgrade tacokit 1.1.14 (#2770) 2019-11-04 16:33:49 +08:00
Zhiwei Xue
182e7cd116 fix(TUP-23637):7.x missing local_project for big data spark batch job (#2604) (#2664) 2019-11-01 15:54:45 +08:00
hzhao-talendbj
f4d07e67db fix(TUP-24613)routine section does not allow user to edit required (#2759)
* fix(TUP-24613)routine section does not allow user to edit required
checkbox

* fix(TUP-24613)routine section does not allow user to edit required
checkbox

* fix(TUP-24613)routine section does not allow user to edit required
checkbox

* fix(TUP-24613)routine section does not allow user to edit required
checkbox
2019-11-01 15:43:11 +08:00
SunChaoqun
00ead16a04 TESB-27123:Context does not transmit to Job called by route in the (#2792) second call in runtime 2019-10-28 18:57:08 +08:00
Jane Ding
41876ebe40 fix(TUP-24735)Studio fails to sync jars with Artifactory if password has (#2756) (#2766) (#2790)
* fix(TUP-24735)Studio fails to sync jars with Artifactory if password has
'@' character in it
https://jira.talendforge.org/browse/TUP-24735

* fix(TUP-24735)Studio fails to sync jars with Artifactory if password has
'@' character in it
https://jira.talendforge.org/browse/TUP-24735

* fix(TUP-24735)Studio fails to sync jars with Artifactory if password has
'@' character in it
https://jira.talendforge.org/browse/TUP-24735
2019-10-28 15:13:52 +08:00
kjwang
dda3390d0b kjwang/Fix TUP-24579 MacOS : unable to access remote project after (#2718) (#2728)
applying TPS-3363
https://jira.talendforge.org/browse/TUP-24579
2019-10-25 16:09:50 +08:00
Zhiwei Xue
39392b6ba4 fix(TUP-24623):fix regression. 2019-10-24 12:35:13 +08:00
Zhiwei Xue
2309b47ce8 Revert "fix(TUP-23637):7.x missing local_project for big data spark batch job (#2604) (#2664)"
This reverts commit 09d2997af6.
2019-10-18 18:31:56 +08:00
Zhiwei Xue
09d2997af6 fix(TUP-23637):7.x missing local_project for big data spark batch job (#2604) (#2664) 2019-10-18 18:29:01 +08:00
Zhiwei Xue
530e8793ea fix(TUP-24623):Compilation error on the job with project
references(#2757)
2019-10-18 18:21:11 +08:00
jiezhang-tlnd
8aa27eb00c Update EDatabaseVersion4Drivers.java 2019-10-16 17:46:23 +08:00
Laurent BOURGEOIS
17a5b0c28a Fix(TBD-9289):"Invalid signature file digest for Manifest main attributes" Error with HD Insight Cluster 2019-10-16 11:19:21 +08:00
jiezhang-tlnd
0ef344fd01 fix(TUP-23960)Following TDI-42674, update dependency for Redshift
(#2722)

database metadata
https://jira.talendforge.org/browse/TUP-23960

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/conn/version/EDatabaseVersion4Drivers.java
2019-10-14 14:27:40 +08:00
Mike Yan
5a96ad6757 fix(TESB-27087): Add condition for checking ESB service is loaded (#2746) 2019-10-08 11:42:58 +08:00
hcyi
53361f8d22 fix(TUP-24084):Change the display of the new Couchbase component names. (#2720) 2019-09-23 15:26:37 +08:00
Chao MENG
2773b281be fix(TUP-24226): Studio doesn't load latest jar for TCOMPv0 update site patch.
fix(TUP-24226): Studio doesn't load latest jar for TCOMPv0 update site patch. 
https://jira.talendforge.org/browse/TUP-24226
2019-09-23 15:19:06 +08:00
hzhao-talendbj
9f8fea79e4 fix(TUP-23536)Component cannot share to Nexus3.15 from local。 2019-09-23 15:04:25 +08:00
hcyi
3254acbab0 fix(TUP-23264):Studio can't find dependencies for tacokit components. (#2566) (#2577) 2019-09-23 14:50:52 +08:00
hcyi
c4bbe25249 fix(TUP-23106):Tacokit components cannot be copy-pasted in Job Design (#2588) (#2596)
* fix(TUP-23106):Tacokit components cannot be copy-pasted in Job Design

* fix(TUP-23106):Tacokit components cannot be copy-pasted in Job Design
2019-09-23 14:46:14 +08:00
heng zhao
bf7ffb0288 feat(TUP-24028)Add Azure datacenter part of the studio connection 2019-09-09 14:47:45 +08:00
jiezhang-tlnd
72f9b4032c fix(TUP-24232)JDBC metadata connection for Redshift when exported as (#2675)
context, unable to retrieve schema
https://jira.talendforge.org/browse/TUP-24232
2019-09-02 10:41:37 +08:00
yanbasic
4e3bf8631d fix(TESB-26174): Backport to 7.2 patch for tRunJob with tESBConsumer 2019-08-30 16:06:31 +02:00
yanbasic
fec8fd0c06 Revert "fix(TESB-26174): Backport to 7.2 for tRunJob with tESBConsumer"
This reverts commit 0b0e004491.
2019-08-30 16:04:33 +02:00
yanbasic
0b0e004491 fix(TESB-26174): Backport to 7.2 for tRunJob with tESBConsumer 2019-08-30 16:03:45 +02:00
hcyi
235f8b08d1 fix(TUP-23743):ERROR when Job in MDM project calling Job in Reference DI (#2597)
project:import routines.DataQuality cannot be resolved.
2019-08-26 11:49:24 +08:00
SunChaoqun
bbf5b5e859 TESB-24597:Docker Support for Microservice - CI Part (#2634) 2019-08-07 12:17:44 +08:00
SunChaoqun
70dddca938 TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:17:36 +08:00
SunChaoqun
958e5d7b1b TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:17:28 +08:00
SunChaoqun
ac4d92a777 TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:17:20 +08:00
SunChaoqun
e35804e5ca TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:17:13 +08:00
SunChaoqun
8d64e1e5cf TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:16:52 +08:00
SunChaoqun
6ffe253c1c TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:16:44 +08:00
SunChaoqun
e5b7ab490c TESB-24597:Docker Support for Microservice - CI Part 2019-08-07 12:16:27 +08:00
kjwang-talend
07efecb906 TUP-23950 Error in calling spark job from trunjob job inside standard (#2613)
job
https://jira.talendforge.org/browse/TUP-23950
2019-07-24 13:53:59 +08:00
Zhiwei Xue
cee139ef8d fix(TUP-23755):Regression caused by TUP-21532 for ESB test case (#2579) 2019-07-15 10:57:49 +08:00
jiezhang-tlnd
ea00bfcad0 fix(TUP-23520)Change schema order function doesnot work (#2570) 2019-07-15 10:33:35 +08:00
Mike Yan
5744d83e69 fix(TESB-26219): Fixed build.properties for missing libs (#2549) 2019-06-20 12:32:25 +02:00
kjwang-talend
3737400399 kjwang/Fix TUP-23488 Retrieve jar list to download is slow (Fix license (#2539)
name is empty problem)
https://jira.talendforge.org/browse/TUP-23488
2019-06-19 21:52:02 +08:00
Zhiwei Xue
3cbbb38871 fix(TUP-23554):osgi.bundle=empty when install additional package failed (#2545) 2019-06-19 20:46:03 +08:00
Mike Yan
768e4534b5 fix(TESB-26219): Fixed missing libs in apache cxf plugin (#2541) 2019-06-19 14:56:35 +08:00
hwang-talend
07f992c3ee bugfix(TUP-23230):Guess Schema error - SLF4J: Defaulting to no-operation (#2535)
bugfix(TUP-23230):Guess Schema error - SLF4J: Defaulting to no-operation (NOP) logger implementation
2019-06-18 15:35:30 +08:00
Chao MENG
5b72922429 fix(TUP-23519): spark job can't run success when I select EMR58 as (#2534)
distribution
https://jira.talendforge.org/browse/TUP-23519
2019-06-18 15:22:21 +08:00
Chao MENG
c7ebdef42d fix(TUP-23482)should avoid multi version slf4j-log4j jars in the job (#2532)
classpath
https://jira.talendforge.org/browse/TUP-23482
2019-06-18 12:32:39 +08:00
Jane Ding
5fe03dfbf2 fix(TUP-23482)should avoid multi version slf4j-log4j jars in the job (#2529) (#2531)
classpath
https://jira.talendforge.org/browse/TUP-23482
2019-06-18 11:49:34 +08:00
kjwang-talend
496afd04db Kjwang/fix tup 23488 retrieve jar list to download is slow b721 (#2530)
* kjwang/Fix improve the fetch license performance (#2523)

* kjwang/Fix improve the fetch license performance

* kjwang/Fix improve the fetch license performance
https://jira.talendforge.org/browse/TUP-23488

* kjwang/Fix TUP-23488 Retrieve jar list to download is slow (Fix junit (#2528)

error)
https://jira.talendforge.org/browse/TUP-23488
2019-06-18 11:38:22 +08:00
Mike Yan
6b38b13eb9 fix(TESB-26219): Fixed NPE for cloud artifact viewer with Java11 (#2527) 2019-06-17 17:08:02 +08:00
Jenkins Continuous Build server
07df547a88 Set version to 7.2.1 2019-06-14 11:49:03 +02:00
360 changed files with 5836 additions and 1439 deletions

View File

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

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.jdt.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.utils.feature</artifactId>

View File

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

View File

@@ -21,6 +21,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
@@ -38,6 +39,8 @@ public class ExceptionMessageDialog extends MessageDialog {
private String exceptionString = null;
private int[] diabledButtonIndex = new int[] {};
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
@@ -147,4 +150,21 @@ public class ExceptionMessageDialog extends MessageDialog {
this.exceptionString = exceptionString;
}
public void setDisabledButtons(int[] index) {
this.diabledButtonIndex = index;
}
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
if (diabledButtonIndex == null) {
return;
}
for (int index : diabledButtonIndex) {
Button button = super.getButton(index);
button.setEnabled(false);
}
}
}

View File

@@ -13,7 +13,8 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
org.talend.libraries.apache,
com.ibm.icu,
org.apache.commons.io,
org.talend.utils
org.talend.utils,
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.2.1-SNAPSHOT</version>
<version>7.2.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.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../pom_server.xml</relativePath>
</parent>

View File

@@ -17,6 +17,7 @@ import java.io.InputStream;
import java.net.URL;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.InstanceScope;
@@ -24,6 +25,7 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
import org.talend.commons.exception.ExceptionService;
import org.talend.commons.runtime.debug.TalendDebugHandler;
import org.talend.commons.utils.system.EclipseCommandLine;
@@ -55,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
// TESB-17856: For commandline builds ESB Micorservice bundle
private static boolean isESBMicorservice = false;
private static ServiceTracker proxyTracker;
public static boolean isWorkbenchCreated() {
return isWorkbenchCreated;
}
@@ -176,4 +180,13 @@ public class CommonsPlugin implements BundleActivator {
return FileLocator.toFileURL(entry);
}
public static IProxyService getProxyService() {
if (proxyTracker == null) {
proxyTracker = new ServiceTracker(Platform.getBundle(PLUGIN_ID).getBundleContext(), IProxyService.class.getName(),
null);
proxyTracker.open();
}
return (IProxyService) proxyTracker.getService();
}
}

View File

@@ -58,3 +58,6 @@ AS400ResultSet.unknowCloumn=Invalid argument\: unknown column name
AS400ResultSet.parameterIndex=Invalid argument\: parameter index
AS400ResultSet.outofRange=\ is out of range.
ITaCoKitService.exception.multipleInstance=More than one instance found: {0}
TalendProxySelector.exception.badUriMap=Bad uri map: {0}
TalendProxySelector.exception.proxySelectionError=Error occurs when selecting proxy for {0}

View File

@@ -45,6 +45,8 @@ public class VersionUtils {
public static final String STUDIO_VERSION_PROP = "studio.version"; //$NON-NLS-1$
public static final String TALEND_STUDIO_VERSION_PROP = "talend.studio.version"; //$NON-NLS-1$
public static final String TALEND_VERSION_PROP = "talend.version"; //$NON-NLS-1$
private static final String COMMONS_PLUGIN_ID = "org.talend.commons.runtime"; //$NON-NLS-1$
@@ -97,7 +99,9 @@ public class VersionUtils {
public static String getInternalVersion() {
if (Platform.inDevelopmentMode()) {
return getDisplayVersion();
String version = getDisplayVersion();
updateTalendStudioVersionProp(version);
return version;
}
if (productVersion == null) {
synchronized (VersionUtils.class) {
@@ -132,10 +136,15 @@ public class VersionUtils {
}
}
}
updateTalendStudioVersionProp(productVersion);
}
return productVersion;
}
private static void updateTalendStudioVersionProp(String version) {
System.setProperty(TALEND_STUDIO_VERSION_PROP, version == null ? "" : version);
}
/**
* DOC ycbai Comment method "getVersion".
*

View File

@@ -0,0 +1,121 @@
// ============================================================================
//
// 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

@@ -0,0 +1,18 @@
// ============================================================================
//
// 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

@@ -26,6 +26,9 @@ import java.util.Enumeration;
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;
/**
@@ -44,7 +47,17 @@ 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;
@@ -52,8 +65,9 @@ public class NetworkUtil {
try {
URL url = new URL(HTTP_NETWORK_URL);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(4000);
conn.setReadTimeout(4000);
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
conn.setConnectTimeout(conntimeout);
conn.setReadTimeout(conntimeout);
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
String strMessage = conn.getResponseMessage();
@@ -69,6 +83,47 @@ public class NetworkUtil {
}
return true;
}
public static boolean isNetworkValid(String url, Integer timeout) {
if (url == null) {
return isNetworkValid(timeout);
}
return checkValidWithHttp(url, timeout);
}
private static boolean checkValidWithHttp(String urlString, Integer timeout) {
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.setRequestMethod("HEAD"); //$NON-NLS-1$
conn.getResponseMessage();
} catch (Exception e) {
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
// invalid server
return false;
} finally {
conn.disconnect();
}
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 {
@@ -92,6 +147,28 @@ 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$
@@ -109,7 +186,11 @@ public class NetworkUtil {
proxyPassword = httpsProxyPassword.toCharArray();
}
}
return new PasswordAuthentication(proxyUser, proxyPassword);
if (StringUtils.isBlank(proxyUser)) {
return null;
} else {
return new PasswordAuthentication(proxyUser, proxyPassword);
}
}
});

View File

@@ -13,37 +13,211 @@
package org.talend.commons.utils.network;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.PasswordAuthentication;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
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.net.proxy.IProxyService;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.i18n.internal.Messages;
import org.talend.daikon.sandbox.properties.ClassLoaderIsolatedSystemProperties;
import sun.net.spi.DefaultProxySelector;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendProxySelector extends ProxySelector {
public static final String PROP_PRINT_LOGS = "talend.studio.proxy.printLogs";
private static final String ECLIPSE_PROXY_SELECTOR = ".EclipseProxySelector"; //$NON-NLS-1$
private ProxySelector defaultSelector;
private static final String PROP_ALLOW_PROXY_REDIRECT = "talend.studio.proxy.allowProxyRedirect";
final private List<IProxySelectorProvider> selectorProviders;
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE = "talend.studio.proxy.redirect.whiteList";
private static final String PROP_EXECUTE_CONNECTION_FAILED = "talend.studio.proxy.executeConnectionFailed";
private static final String PROP_UPDATE_SYSTEM_PROPERTIES_FOR_JRE = "talend.studio.proxy.jre.updateSystemProperties";
private static final String PROP_CHECK_PROXY = "talend.studio.proxy.checkProxy";
private static final String PROP_VALIDATE_URI = "talend.studio.proxy.validateUri";
private static final String PROP_PROXY_SELECTOR = "talend.studio.proxy.selector";
private static final String PROP_PROXY_SELECTOR_DEFAULT = "default";
private static final String PROP_PROXY_SELECTOR_JRE = "jre";
private static final String PROP_PROXY_HOST_MAP = "talend.studio.proxy.hostMap";
private static final String PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER = "talend.studio.proxy.disableDefaultSelectorProvider";
/**
* Example: update.talend.com,socket:http,https:http;nexus.talend.com,socket,http;,socket:http
*/
private static final String PROP_PROXY_MAP_HOST_DEFAULT = "";
/**
* Example: svn.company.com;nexus.company.com
*/
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE_DEFAULT = "";
private static final String KEY_DEFAULT = ":default:";
private static Field uriHostField;
private static Method proxyManagerUpdateSystemPropertiesFunc;
private static boolean checkProxy = Boolean.valueOf(System.getProperty(PROP_CHECK_PROXY, Boolean.TRUE.toString()));
/**
* Note: eclipse default selector may be different between TOS and TIS, TOS may use jre one, TIS may use egit one
*/
private ProxySelector eclipseDefaultSelector;
private ProxySelector jreDefaultSelector;
private EProxySelector eProxySelector;
final private Map<Object, Collection<IProxySelectorProvider>> selectorProviders;
private Map<String, Map<String, String>> hostMap;
private Set<String> redirectWhiteList;
private volatile static TalendProxySelector instance;
private static Object instanceLock = new Object();
private TalendProxySelector(final ProxySelector defaultSelector) {
this.defaultSelector = defaultSelector;
selectorProviders = new ArrayList<>();
private boolean printProxyLog = false;
private boolean allowProxyRedirect = false;
private boolean disableDefaultSelectorProvider = false;
private boolean validateUri = true;
private boolean executeConnectionFailed = true;
private boolean updateSystemPropertiesForJre = true;
private TalendProxySelector(final ProxySelector eclipseDefaultSelector) {
this.eclipseDefaultSelector = eclipseDefaultSelector;
this.jreDefaultSelector = new DefaultProxySelector();
selectorProviders = Collections.synchronizedMap(new HashMap<>());
allowProxyRedirect = Boolean.valueOf(System.getProperty(PROP_ALLOW_PROXY_REDIRECT, Boolean.FALSE.toString()));
disableDefaultSelectorProvider = Boolean
.valueOf(System.getProperty(PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER, Boolean.FALSE.toString()));
printProxyLog = Boolean.valueOf(System.getProperty(PROP_PRINT_LOGS, Boolean.FALSE.toString()));
validateUri = Boolean.valueOf(System.getProperty(PROP_VALIDATE_URI, Boolean.TRUE.toString()));
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()));
switch (System.getProperty(PROP_PROXY_SELECTOR, PROP_PROXY_SELECTOR_DEFAULT).toLowerCase()) {
case PROP_PROXY_SELECTOR_JRE:
this.eProxySelector = EProxySelector.jre;
break;
default:
this.eProxySelector = EProxySelector.eclipse_default;
break;
}
initHostMap();
initRedirectList();
}
private void initHostMap() {
try {
hostMap = new HashMap<>();
String property = System.getProperty(PROP_PROXY_HOST_MAP, PROP_PROXY_MAP_HOST_DEFAULT);
if (StringUtils.isEmpty(property)) {
return;
}
String[] splits = property.split(";");
for (String split : splits) {
try {
int index = split.indexOf(',');
String uri = split.substring(0, index);
String key = StringUtils.strip(uri);
if (StringUtils.isBlank(key)) {
key = KEY_DEFAULT;
}
key = key.toLowerCase();
Map<String, String> protocolMap = hostMap.get(key);
if (protocolMap == null) {
protocolMap = new HashMap<>();
hostMap.put(key, protocolMap);
}
int protocolMapIndex = index + 1;
String protocolMapStr = split.substring(protocolMapIndex);
String[] entry = protocolMapStr.split(",");
for (String pMap : entry) {
try {
String[] mapEntry = pMap.split(":");
if (mapEntry.length != 2) {
ExceptionHandler.process(
new Exception(Messages.getString("TalendProxySelector.exception.badUriMap", pMap)));
continue;
}
protocolMap.put(mapEntry[0].toLowerCase(), mapEntry[1].toLowerCase());
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
private void initRedirectList() {
try {
redirectWhiteList = new HashSet<>();
String property = System.getProperty(PROP_ALLOW_PROXY_REDIRECT_EXCLUDE, PROP_ALLOW_PROXY_REDIRECT_EXCLUDE_DEFAULT);
if (StringUtils.isEmpty(property)) {
return;
}
String[] split = property.split(";");
for (String host : split) {
host = StringUtils.strip(host);
if (StringUtils.isBlank(host)) {
host = KEY_DEFAULT;
}
redirectWhiteList.add(host);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
public static TalendProxySelector getInstance() {
@@ -58,6 +232,18 @@ public class TalendProxySelector extends ProxySelector {
synchronized (instanceLock) {
if (instance == null) {
instance = new TalendProxySelector(proxySelector);
try {
uriHostField = URI.class.getDeclaredField("host");
uriHostField.setAccessible(true);
} catch (Exception e) {
ExceptionHandler.process(e);
}
try {
proxyManagerUpdateSystemPropertiesFunc = ProxyManager.class.getDeclaredMethod("updateSystemProperties");
proxyManagerUpdateSystemPropertiesFunc.setAccessible(true);
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
}
}
@@ -70,19 +256,216 @@ public class TalendProxySelector extends ProxySelector {
return null;
}
});
if (instance.getDefaultProxySelector() == null
if (instance.getEclipseDefaultSelector() == null
|| (proxySelector != null && proxySelector.getClass().getName().endsWith(ECLIPSE_PROXY_SELECTOR))) {
instance.setDefaultProxySelector(proxySelector);
instance.setEclipseDefaultSelector(proxySelector);
}
}
return instance;
}
public static void checkProxy() {
if (!checkProxy) {
return;
}
try {
TalendProxySelector.getInstance();
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
@Override
public List<Proxy> select(final URI uri) {
final Set<Proxy> resultFromProviders = new HashSet<>();
List<IProxySelectorProvider> providers = getProxySelectorProviders();
if (printProxyLog) {
ExceptionHandler.log("TalendProxySelector.select " + uri);
}
if (uri == null) {
return Collections.EMPTY_LIST;
}
URI validatedUri = validateUri(uri);
Set<Proxy> results = new LinkedHashSet<>();
try {
final Set<Proxy> resultFromProviders = getProxysFromProviders(validatedUri);
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
results.addAll(resultFromProviders);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
if (printProxyLog) {
ExceptionHandler.log("TalendProxySelector.resultFromProviders " + results);
}
ProxySelector defaultProxySelector = getDefaultProxySelector();
if (printProxyLog) {
ExceptionHandler.log("TalendProxySelector.defaultProxySelector " + defaultProxySelector);
}
if (defaultProxySelector != null) {
/**
* don't validate uri here, so that we can know whether it is an issue uri
*/
URI newUri = getNewUri(validatedUri, false);
List<Proxy> defaultProxys = null;
if (validateUri && StringUtils.isBlank(newUri.getHost())) {
/**
* If host is blank, force to use jre proxy selector to avoid the eclipse proxy selector bug
*/
defaultProxys = getJreProxySelector().select(newUri);
} else {
defaultProxys = defaultProxySelector.select(newUri);
}
if (printProxyLog) {
ExceptionHandler.log("TalendProxySelector.defaultProxys " + defaultProxys);
}
try {
results.addAll(filterProxys(validatedUri, defaultProxys));
} catch (Exception e) {
results.addAll(defaultProxys);
ExceptionHandler.process(e);
}
}
if (printProxyLog) {
String proxys = results.toString();
ExceptionHandler.log("Selected proxys for " + uri + ", " + proxys);
ExceptionHandler.process(new Exception("Proxy call stacks"), Priority.INFO);
}
return new LinkedList<Proxy>(results);
}
private URI validateUri(URI uri) {
if (!validateUri) {
return uri;
}
URI validatedUri = null;
try {
/**
* DON'T use URI.create(), MUST use the conductor which requires authority
*/
validatedUri = new URI(uri.getScheme(), uri.getAuthority(), uri.getPath(), uri.getQuery(), uri.getFragment());
/**
* Validate the host, if the host is empty, it will cause the eclipse selector to return dirrect
*/
if (StringUtils.isBlank(validatedUri.getHost())) {
String authority = validatedUri.getAuthority();
if (StringUtils.isNotBlank(authority)) {
// example: https://u:p@www.company.com:8081/path/a?param=b
String host = null;
int userInfoIndex = authority.indexOf('@');
if (0 <= userInfoIndex) {
authority = authority.substring(userInfoIndex + 1);
}
int portIndex = authority.lastIndexOf(':');
if (0 <= portIndex) {
host = authority.substring(0, portIndex);
}
try {
uriHostField.set(validatedUri, host);
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
if (validatedUri == null) {
validatedUri = uri;
}
}
if (printProxyLog) {
ExceptionHandler.log("After validate: " + uri + " -> " + validatedUri);
}
return validatedUri;
}
private List<Proxy> filterProxys(final URI uri, List<Proxy> defaultProxys) {
List<Proxy> result = new ArrayList<>();
if (defaultProxys != null && !defaultProxys.isEmpty()) {
for (Proxy proxy : defaultProxys) {
SocketAddress addr = null;
Proxy.Type proxyType = null;
if (proxy != null) {
proxyType = proxy.type();
addr = proxy.address();
}
boolean redirect = true;
if (!allowProxyRedirect) {
String host = uri.getHost();
if (host == null) {
host = "";
}
host = StringUtils.strip(host).toLowerCase();
if (this.redirectWhiteList.contains(host) || this.redirectWhiteList.contains(KEY_DEFAULT)) {
redirect = true;
} else if (Proxy.Type.DIRECT == proxyType
|| (addr != null && StringUtils.equals(uri.getHost(), ((InetSocketAddress) addr).getHostString()))) {
redirect = false;
}
}
if (redirect) {
result.add(proxy);
} else {
result.add(Proxy.NO_PROXY);
}
}
}
return result;
}
private URI getNewUri(URI uri, boolean validateUri) {
URI newUri = uri;
if (newUri != null) {
try {
// get host before new URI, because the host may be set manually due to URI issue
String host = newUri.getHost();
newUri = new URI(newUri.getScheme(), newUri.getAuthority(), newUri.getPath(), newUri.getQuery(),
newUri.getFragment());
Map<String, String> protocolMap = null;
if (StringUtils.isNotBlank(host)) {
protocolMap = hostMap.get(host.toLowerCase());
}
if (protocolMap == null) {
protocolMap = hostMap.get(KEY_DEFAULT);
}
if (protocolMap != null) {
String schema = newUri.getScheme();
if (schema != null) {
String lowercasedProtocol = schema.toLowerCase();
String preferedProtocol = protocolMap.get(lowercasedProtocol);
if (StringUtils.isNotBlank(preferedProtocol)) {
/**
* Note: MUST use the constructor which requires authority, because some uri may be illegal,
* then host info will be stored in authority field instead of host filed
*/
newUri = new URI(preferedProtocol, newUri.getAuthority(), newUri.getPath(), newUri.getQuery(),
newUri.getFragment());
}
}
}
} catch (URISyntaxException e) {
if (printProxyLog) {
ExceptionHandler.process(
new Exception(Messages.getString("TalendProxySelector.exception.proxySelectionError", uri), e),
Priority.WARN);
}
}
}
if (validateUri) {
newUri = validateUri(newUri);
}
return newUri;
}
private Set<Proxy> getProxysFromProviders(final URI uri) {
final Set<Proxy> resultFromProviders = new LinkedHashSet<>();
Collection<IProxySelectorProvider> providers = getCustomProviders(uri);
if (providers != null) {
providers.stream().forEach(p -> {
if (instance == p) {
@@ -100,49 +483,126 @@ public class TalendProxySelector extends ProxySelector {
}
});
}
List<Proxy> result = new ArrayList<>();
return resultFromProviders;
}
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
result.addAll(resultFromProviders);
}
ProxySelector defaultProxySelector = getDefaultProxySelector();
if (defaultProxySelector != null) {
List<Proxy> defaultProxys = defaultProxySelector.select(uri);
if (defaultProxys != null && !defaultProxys.isEmpty()) {
result.addAll(defaultProxys);
private Collection<IProxySelectorProvider> getCustomProviders(final URI uri) {
Collection<IProxySelectorProvider> providers = Collections.EMPTY_LIST;
Collection<Object> possibleKeys = getPossibleKeys(uri);
for (Object key : possibleKeys) {
providers = this.selectorProviders.get(key);
if (providers != null) {
break;
}
}
return result;
return providers;
}
public PasswordAuthentication getHttpPasswordAuthentication() {
String[] schemas = new String[] { "http", "https" };
for (String schema : schemas) {
String proxyUser = System.getProperty(schema + ".proxyUser");
String proxyPassword = System.getProperty(schema + ".proxyPassword");
if (StringUtils.isNotBlank(proxyUser)) {
char[] pwdChars = new char[0];
if (proxyPassword != null && !proxyPassword.isEmpty()) {
pwdChars = proxyPassword.toCharArray();
}
return new PasswordAuthentication(proxyUser, pwdChars);
}
}
return null;
}
public boolean addProxySelectorProvider(IProxySelectorProvider provider) {
List<IProxySelectorProvider> proxySelectorProviders = getProxySelectorProviders();
if (!proxySelectorProviders.contains(provider)) {
return proxySelectorProviders.add(provider);
try {
Object key = provider.getKey();
Collection<IProxySelectorProvider> collection = this.selectorProviders.get(key);
if (collection == null) {
synchronized (this.selectorProviders) {
collection = this.selectorProviders.get(key);
if (collection == null) {
collection = Collections.synchronizedList(new LinkedList<>());
this.selectorProviders.put(key, collection);
}
}
}
collection.add(provider);
return true;
} catch (Exception e) {
ExceptionHandler.process(e);
}
return false;
}
public boolean removeProxySelectorProvider(IProxySelectorProvider provider) {
return getProxySelectorProviders().remove(provider);
}
private List<IProxySelectorProvider> getProxySelectorProviders() {
return selectorProviders;
try {
Object key = provider.getKey();
Collection<IProxySelectorProvider> collection = this.selectorProviders.get(key);
if (collection != null) {
synchronized (this.selectorProviders) {
collection = this.selectorProviders.get(key);
if (collection != null) {
collection.remove(provider);
if (collection.isEmpty()) {
this.selectorProviders.remove(key);
}
}
}
}
return true;
} catch (Exception e) {
ExceptionHandler.process(e);
}
return false;
}
public ProxySelector getDefaultProxySelector() {
return defaultSelector;
switch (eProxySelector) {
case jre:
return getJreProxySelector();
default:
return eclipseDefaultSelector;
}
}
public void setDefaultProxySelector(final ProxySelector selector) {
defaultSelector = selector;
private ProxySelector getJreProxySelector() {
try {
/**
* for tcompv0, daikon may create an isolated system properties for it, so proxies may be ignored in the new
* system properties; here we try to call the method to add proxies into the isolated system properties
*/
if (updateSystemPropertiesForJre && ClassLoaderIsolatedSystemProperties.getInstance()
.isIsolated(Thread.currentThread().getContextClassLoader())) {
if (printProxyLog) {
ExceptionHandler.log("Before update jre proxy system properties for the isolated classloader, http.proxyHost="
+ System.getProperty("http.proxyHost"));
}
IProxyService proxyService = CommonsPlugin.getProxyService();
proxyManagerUpdateSystemPropertiesFunc.invoke(proxyService);
if (printProxyLog) {
ExceptionHandler.log("After updated jre proxy system properties for the isolated classloader, http.proxyHost="
+ System.getProperty("http.proxyHost"));
}
}
} catch (Throwable e) {
ExceptionHandler.process(e);
}
return this.jreDefaultSelector;
}
public ProxySelector getEclipseDefaultSelector() {
return eclipseDefaultSelector;
}
public void setEclipseDefaultSelector(ProxySelector eclipseDefaultSelector) {
this.eclipseDefaultSelector = eclipseDefaultSelector;
}
@Override
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
List<IProxySelectorProvider> providers = getProxySelectorProviders();
Collection<IProxySelectorProvider> providers = getCustomProviders(uri);
if (providers != null) {
providers.stream().forEach(p -> {
if (p.canHandle(uri)) {
@@ -151,23 +611,35 @@ public class TalendProxySelector extends ProxySelector {
});
}
ProxySelector defaultProxySelector = getDefaultProxySelector();
if (defaultProxySelector != null) {
defaultProxySelector.connectFailed(uri, sa, ioe);
if (executeConnectionFailed) {
/**
* Just try to make the behavior of jre proxy selector same like eclipse proxy selector
*/
ProxySelector defaultProxySelector = getDefaultProxySelector();
if (defaultProxySelector != null) {
defaultProxySelector.connectFailed(uri, sa, ioe);
}
}
}
public static abstract class AbstractProxySelectorProvider implements IProxySelectorProvider {
@Override
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
// nothing to do
public IProxySelectorProvider createDefaultProxySelectorProvider() {
if (disableDefaultSelectorProvider) {
return null;
}
return new DefaultProxySelectorProvider(Thread.currentThread());
}
public IProxySelectorProvider createDefaultProxySelectorProvider(String host) {
if (disableDefaultSelectorProvider) {
return null;
}
return new DefaultProxySelectorProvider(host);
}
public static interface IProxySelectorProvider {
Object getKey();
boolean canHandle(final URI uri);
List<Proxy> select(final URI uri);
@@ -176,4 +648,120 @@ public class TalendProxySelector extends ProxySelector {
}
public static abstract class AbstractProxySelectorProvider implements IProxySelectorProvider {
private boolean isDebugMode = CommonsPlugin.isDebugMode();
@Override
public Object getKey() {
return this;
}
@Override
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
if (isDebugMode) {
ExceptionHandler.process(ioe);
}
}
}
public static Collection<Object> getPossibleKeys(URI uri) {
Collection<Object> possibleKeys = new ArrayList<>();
possibleKeys.add(Thread.currentThread());
if (uri != null) {
String uriHost = uri.getHost();
if (StringUtils.isNotBlank(uriHost)) {
possibleKeys.add(uriHost);
}
}
return possibleKeys;
}
private enum EProxySelector {
eclipse_default,
jre
}
private class DefaultProxySelectorProvider extends TalendProxySelector.AbstractProxySelectorProvider {
private Thread currentThread = null;
private String host = null;
public DefaultProxySelectorProvider(Thread thread) {
this.currentThread = thread;
}
public DefaultProxySelectorProvider(String host) {
this.host = host;
if (StringUtils.isNotBlank(this.host)) {
this.host = this.host.toLowerCase();
}
}
@Override
public Object getKey() {
if (this.currentThread != null) {
return currentThread;
}
if (this.host != null) {
return this.host;
}
return super.getKey();
}
@Override
public boolean canHandle(URI uri) {
if (disableDefaultSelectorProvider) {
return false;
}
if (currentThread != null && Thread.currentThread() == currentThread) {
return true;
}
if (host != null) {
if (uri == null) {
return false;
}
String uriHost = uri.getHost();
if (StringUtils.isNotBlank(uriHost)) {
return this.host.equals(uriHost.toLowerCase());
}
return false;
}
return false;
}
@Override
public List<Proxy> select(URI uri) {
List<Proxy> result = new ArrayList<>();
try {
ProxySelector defaultProxySelector = getDefaultProxySelector();
if (defaultProxySelector != null) {
List<Proxy> defaultProxys = defaultProxySelector.select(uri);
if (defaultProxys != null && !defaultProxys.isEmpty()) {
for (Proxy proxy : defaultProxys) {
SocketAddress addr = null;
Proxy.Type proxyType = null;
if (proxy != null) {
proxyType = proxy.type();
addr = proxy.address();
}
if (Proxy.Type.DIRECT == proxyType || (addr != null
&& StringUtils.equals(uri.getHost(), ((InetSocketAddress) addr).getHostString()))) {
result.add(Proxy.NO_PROXY);
} else {
result.add(proxy);
}
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return result;
}
}
}

View File

@@ -58,6 +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 boolean existArtifacts(File base) {
@@ -296,6 +298,9 @@ 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) {

View File

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

View File

@@ -339,7 +339,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
}
if ((WindowSystem.isGTK() || EnvironmentUtils.isMacOsSytem()) && child instanceof Tree) {
returnedPoint.y += ((Tree) child).getHeaderHeight();
returnedPoint.y += ((Table) child).getItemHeight();
returnedPoint.y += ((Tree) child).getItemHeight();
}
child = child.getParent();
ScrollBar vScrollBar = child.getVerticalBar();

View File

@@ -104,7 +104,6 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
this.source = sourceTable;
dataToTableItemCache = new DataToTableItemCache(sourceTable);
}
protected IStyleLink getDefaultStyleLink() {
@@ -232,7 +231,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())) {
if (Platform.OS_MACOSX.equals(Platform.getOS()) || Platform.OS_LINUX.equals(Platform.getOS())) {
pointStartStraight.x = sourceToCommonPoint.x + tableItem.getParent().getBounds().width;
pointEndStraight.x = pointStartStraight.x;
} else {
@@ -311,10 +310,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;
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height - treeItemHeight / 2;
}
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y + tableItem.getBounds(0).height;
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
}
drawableLink.setPoint1(pointEndStraight);
drawableLink.setPoint2(pointEndCentralCurve);

View File

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

View File

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

View File

@@ -14,6 +14,7 @@ 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;
@@ -43,8 +44,13 @@ 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

@@ -23,4 +23,9 @@ public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnab
coreService.createStatsLogAndImplicitParamter(ProjectManager.getInstance().getCurrentProject());
}
@Override
public boolean isRequiredAlways() {
return true;
}
}

View File

@@ -1064,6 +1064,9 @@ 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,6 +15,7 @@ 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;
@@ -70,6 +71,7 @@ import org.talend.commons.runtime.service.ITaCoKitService;
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.TimeMeasure;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.AbstractDQModelService;
@@ -107,6 +109,7 @@ 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;
@@ -122,6 +125,8 @@ 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.ProjectDataJsonProvider;
import org.talend.core.repository.utils.LoginTaskRegistryReader;
import org.talend.core.repository.utils.RepositoryPathProvider;
import org.talend.core.repository.utils.XmiResourceManager;
import org.talend.core.runtime.CoreRuntimePlugin;
@@ -132,6 +137,7 @@ import org.talend.core.service.ICoreUIService;
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;
@@ -173,6 +179,8 @@ 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) {
@@ -2020,6 +2028,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
TimeMeasure.begin("logOnProject"); //$NON-NLS-1$
try {
/**
* init/check proxy selector, in case default proxy selector is not registed yet
*/
TalendProxySelector.checkProxy();
System.getProperties().put("ReadOnlyUser", Boolean.FALSE.toString()); //$NON-NLS-1$
// remove the auto-build to enhance the build speed and application's use
@@ -2039,6 +2052,7 @@ 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();
@@ -2057,6 +2071,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ProjectManager.getInstance().getBeforeLogonRecords().clear();
ProjectManager.getInstance().getUpdatedRemoteHandlerRecords().clear();
ProjectDataJsonProvider.checkAndRectifyRelationShipSetting(project.getEmfProject());
// init dynamic distirbution after `beforeLogon`, before loading libraries.
initDynamicDistribution(monitor);
@@ -2226,6 +2242,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
} catch (Exception e) {
ExceptionHandler.process(e);
}
// regenerate relationship index
if (project.getEmfProject().getItemsRelations().isEmpty()) {
RelationshipItemBuilder.getInstance().buildAndSaveIndex();
}
fullLogonFinished = true;
this.repositoryFactoryFromProvider.afterLogon(monitor);
} finally {
@@ -2405,9 +2426,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
@Override
@SuppressWarnings("unchecked")
public void executeRepositoryWorkUnit(RepositoryWorkUnit workUnit) {
checkProxySettings();
this.repositoryFactoryFromProvider.executeRepositoryWorkUnit(workUnit);
}
private void checkProxySettings() {
TalendProxySelector.checkProxy();
}
@Override
public void unloadResources(Property property) throws PersistenceException {
repositoryFactoryFromProvider.unloadResources(property);
@@ -2628,4 +2654,13 @@ 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,6 +14,7 @@ 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;
@@ -24,6 +25,7 @@ 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;
@@ -106,7 +108,8 @@ public class RecycleBinManager {
List<IRepositoryViewObject> deletedObjects = new ArrayList<IRepositoryViewObject>();
final EList<TalendItem> deletedItems = projectRecyclebins.get(project.getTechnicalLabel()).getDeletedItems();
List<TalendItem> notDeletedItems = new ArrayList<TalendItem>();
for (TalendItem deletedItem : deletedItems) {
List<TalendItem> dup_deletedItems = new ArrayList<>(deletedItems);
for (TalendItem deletedItem : dup_deletedItems) {
try {
final ERepositoryObjectType type = ERepositoryObjectType.getType(deletedItem.getType());
// ignore the generated doc in recycle bin
@@ -274,7 +277,40 @@ public class RecycleBinManager {
resource = createRecycleBinResource(project);
}
resource.getContents().clear();
recycleBin.setLastUpdate(new Date());
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);
resource.getContents().add(recycleBin);
EmfHelper.saveResource(resource);
lastSavedRecycleBinMap.put(recycleBin, EcoreUtil.copy(recycleBin));

View File

@@ -35,6 +35,7 @@ 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;
@@ -46,6 +47,7 @@ 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;
@@ -191,9 +193,10 @@ public class ProjectDataJsonProvider {
ProjectDataJsonProvider.loadProjectSettings(project, input);
}
IPath relationShipPath = settingFolderPath.append(FileConstants.RELATIONSHIP_FILE_NAME);
input = inputStreamProvider.getStream(relationShipPath);
if (input != null) {
ProjectDataJsonProvider.loadRelationShips(project, input);
try (InputStream is = inputStreamProvider.getStream(relationShipPath)) {
if (is != null) {
ProjectDataJsonProvider.loadRelationShips(project, is);
}
}
IPath migrationTaskPath = settingFolderPath.append(FileConstants.MIGRATION_TASK_FILE_NAME);
input = inputStreamProvider.getStream(migrationTaskPath);
@@ -235,10 +238,11 @@ 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 {
loadRelationShips(project, new FileInputStream(file));
} catch (FileNotFoundException e) {
throw new PersistenceException(e);
try (FileInputStream fis = new FileInputStream(file)) {
loadRelationShips(project, fis);
} catch (Exception e) {
// ignore
ExceptionHandler.process(e);
}
}
}
@@ -257,11 +261,72 @@ 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

@@ -131,4 +131,22 @@ public class ProjectHelper {
}
return null;
}
/**
* define the different value for the project types the string value in the licence files Matcht the java enum name
* this is a copy of org.talend.commons.model.KeyConstants.ProjectType to avoid adding the all library
*
*/
public static enum ProjectType {
DI,
DQ,
MDM;
}
public static int getProjectTypeOrdinal(org.talend.core.model.properties.Project project) {
if (project != null && project.getType() != null) {
return ProjectType.valueOf(project.getType()).ordinal();
}
return 0;
}
}

View File

@@ -26,6 +26,7 @@ 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;
@@ -37,6 +38,7 @@ 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;
@@ -69,6 +71,7 @@ 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;
@@ -647,6 +650,23 @@ 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

@@ -120,7 +120,8 @@ 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.jackson,
org.eclipse.m2e.core
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,

View File

@@ -9,13 +9,14 @@
<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" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" defaultPattern="dd-MM-yyyy" />
<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" />
@@ -175,6 +176,11 @@
<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

@@ -29,6 +29,8 @@
<dbType type="xs:time" ignoreLen="true" ignorePre="true"/>
<dbType type="xs:decimal" ignoreLen="true" ignorePre="true"/>
<dbType type="xs:QName" ignoreLen="true" ignorePre="true"/>
<dbType type="xs:list" ignoreLen="true" ignorePre="true"/>
<dbType type="xs:union" ignoreLen="true" ignorePre="true"/>
</dbTypes>
<language name="java">
@@ -141,6 +143,12 @@
<dbType type="xs:time">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="xs:list">
<talendType type="id_List" default="true" />
</dbType>
<dbType type="xs:union">
<talendType type="id_Object" default="true" />
</dbType>
</dbToTalendTypes>
</language>
</dbms>

View File

@@ -100,6 +100,11 @@
<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

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

View File

@@ -12,11 +12,14 @@
// ============================================================================
package org.talend.core;
import java.util.List;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.utils.IXSDPopulationUtil;
@@ -47,6 +50,8 @@ public interface IESBService extends IService {
public StringBuffer getAllTheJObNames(IRepositoryNode jobList);
public List<String> getSerivceRelatedJobIds(Item serviceItem);
public void deleteOldRelation(String jobID);
// public void setSelectedItem(Item, )
@@ -59,6 +64,8 @@ public interface IESBService extends IService {
public void copyDataServiceRelateJob(Item newItem);
public boolean isRESTService(ProcessItem processItem);
public IXSDPopulationUtil getXSDPopulationUtil();
public boolean isWSDLEditor(IWorkbenchPart part);

View File

@@ -206,8 +206,12 @@ public interface ILibraryManagerService extends IService {
*/
public boolean isJarNeedToBeDeployed(File jarFile);
public boolean isSameFile(File f1, File f2);
public void checkModuleStatus(ModuleNeeded module);
public String getJarNameFromMavenuri(String mavenURI);
public void guessMavenRUIFromIndex(File jarFile, Map<String, String> sourceAndMavenUri);
}

View File

@@ -53,6 +53,8 @@ public enum EDatabaseTypeName {
"IBM DB2 ZOS", "IBM DB2 ZOS", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
SYBASEASE(
"SybaseASE", "Sybase (ASE and IQ)", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SYBASEASE_SA(
"SybaseASE", "SQL Anywhere", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// this Sybase IQ not used.
SYBASEIQ(

View File

@@ -302,4 +302,11 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER="CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER";
/**
* Override hadoop configuration
*/
public static final String CONN_PARA_KEY_SET_HADOOP_CONF = "CONN_PARA_KEY_SET_HADOOP_CONF";
public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR";
}

View File

@@ -47,6 +47,8 @@ public class DatabaseConnStrUtil {
// for match url has :<port> exist
private static final String PATTERN_PORT = "(:\\d{1,5})";
private static final String DATABASE_STRING = "DATABASE=";
private static String getStringReplace(final String init, final String before, final String after,
final boolean supportContext) {
return getStringReplace(init, before, after, supportContext, false);
@@ -127,6 +129,13 @@ public class DatabaseConnStrUtil {
} else {
s = getStringReplace(s, EDatabaseConnVar.PORT.getVariable(), port, supportContext);
}
if (EDatabaseConnTemplate.TERADATA.equals(connStr)) {
if (StringUtils.isNotBlank(sid)) {
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable(), DATABASE_STRING + sid, supportContext);
} else {
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable() + ",", sid, supportContext); //$NON-NLS-1$
}
}
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable(), sid, supportContext);
s = getStringReplace(s, EDatabaseConnVar.SERVICE_NAME.getVariable(), sid, supportContext);
s = getStringReplace(s, EDatabaseConnVar.DATASOURCE.getVariable(), datasource, supportContext);
@@ -565,7 +574,7 @@ public class DatabaseConnStrUtil {
List<ERepositoryObjectType> extraTypes = new ArrayList<>();
IGenericDBService dbService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
dbService = GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
}
if (dbService != null) {
extraTypes.addAll(dbService.getExtraTypes());

View File

@@ -166,9 +166,9 @@ public enum EDatabaseVersion4Drivers {
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
"redshift-jdbc42-no-awssdk-1.2.20.1043.jar")), //$NON-NLS-1$
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "redshift-jdbc42-no-awssdk-1.2.20.1043.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackson-databind-2.9.5.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "redshift-jdbc42-no-awssdk-1.2.20.1043.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"jackson-databind-2.9.9.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar", "commons-codec-1.6.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$

View File

@@ -12,9 +12,13 @@
// ============================================================================
package org.talend.core.hadoop;
import java.io.File;
import java.net.MalformedURLException;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import org.apache.commons.lang.StringUtils;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.classloader.ClassLoaderFactory;
import org.talend.core.classloader.DynamicClassLoader;
@@ -67,9 +71,18 @@ public class HadoopClassLoaderFactory2 {
return getClassLoader(relatedClusterId, EHadoopCategory.HBASE, distribution, version, useKrb);
}
public static ClassLoader getHadoopCustomClassLoader(String uid, Object customJars) {
return HadoopClassLoaderFactory2.builder().withTypePrefix(EHadoopCategory.CUSTOM.getName()).withUid(uid)
.build(customJars, true);
public static ClassLoader getHadoopCustomClassLoader(String uid, String relatedClusterId, EHadoopCategory category,
Object customJars, boolean useKrb) {
ClassLoader classLoader = HadoopClassLoaderFactory2.builder().withTypePrefix(EHadoopCategory.CUSTOM.getName())
.withUid(uid).build(customJars, true);
if (StringUtils.isNotBlank(relatedClusterId) && classLoader instanceof DynamicClassLoader) {
try {
classLoader = addExtraJars(relatedClusterId, category, (DynamicClassLoader) classLoader, useKrb);
} catch (MalformedURLException e) {
ExceptionHandler.process(e);
}
}
return classLoader;
}
public static ClassLoader getHCatalogClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
@@ -198,16 +211,35 @@ public class HadoopClassLoaderFactory2 {
String[] addedJars = null;
String[] excludedJars = null;
String[] securityJars = getSecurityJars(category);
String customConfsJarName = hadoopClusterService.getCustomConfsJarName(relatedClusterId);
if (customConfsJarName != null) {
addedJars = new String[] { customConfsJarName };
Optional<HadoopConfJarBean> customConfsJar = hadoopClusterService.getCustomConfsJar(relatedClusterId);
HadoopConfJarBean confJarBean = customConfsJar.orElse(null);
String customConfsJarName = customConfsJar.map(b -> b.getCustomConfJarName()).orElse(null);
Consumer<DynamicClassLoader> afterLoaded = null;
if (confJarBean != null) {
if (confJarBean.isOverrideCustomConf()) {
String overrideCustomConfPath = confJarBean.getOriginalOverrideCustomConfPath();
if (StringUtils.isBlank(overrideCustomConfPath) || !new File(overrideCustomConfPath).exists()) {
ExceptionHandler.process(
new Exception("Set Hadoop configuration JAR path is invalid: " + overrideCustomConfPath));
} else {
afterLoaded = (t) -> t.addLibrary(overrideCustomConfPath);
}
} else {
if (StringUtils.isNotBlank(customConfsJarName)) {
addedJars = new String[] { customConfsJarName };
}
}
excludedJars = securityJars;
} else if (useKrb) {
addedJars = securityJars;
excludedJars = new String[] { customConfsJarName };
}
if (addedJars != null || excludedJars != null) {
if (addedJars != null || excludedJars != null || afterLoaded != null) {
cll = DynamicClassLoader.createNewOneBaseLoader(loader, addedJars, excludedJars);
if (afterLoaded != null) {
afterLoaded.accept(cll);
}
}
}

View File

@@ -0,0 +1,92 @@
// ============================================================================
//
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.hadoop;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class HadoopConfJarBean {
private boolean overrideCustomConf;
private boolean isContextMode;
/**
* value saved in connection, it may be a context
*/
private String overrideCustomConfPath;
/**
* original value of the path, if connection is in context mode, then this value if the default value of the context
*/
private String originalOverrideCustomConfPath;
private String customConfJarName;
public HadoopConfJarBean(boolean isContextMode, boolean overrideCustomConf, String overrideCustomConfPath,
String originalOverrideCustomConfPath, String customConfJarName) {
this.isContextMode = isContextMode;
this.overrideCustomConf = overrideCustomConf;
this.overrideCustomConfPath = overrideCustomConfPath;
this.originalOverrideCustomConfPath = originalOverrideCustomConfPath;
this.customConfJarName = customConfJarName;
}
public boolean isContextMode() {
return isContextMode;
}
public void setContextMode(boolean isContextMode) {
this.isContextMode = isContextMode;
}
public boolean isOverrideCustomConf() {
return overrideCustomConf;
}
public void setOverrideCustomConf(boolean overrideCustomConf) {
this.overrideCustomConf = overrideCustomConf;
}
public String getOriginalOverrideCustomConfPath() {
return originalOverrideCustomConfPath;
}
public void setOriginalOverrideCustomConfPath(String originalOverrideCustomConfPath) {
this.originalOverrideCustomConfPath = originalOverrideCustomConfPath;
}
public String getOverrideCustomConfPath() {
return overrideCustomConfPath;
}
public void setOverrideCustomConfPath(String overrideCustomConfPath) {
this.overrideCustomConfPath = overrideCustomConfPath;
}
public String getCustomConfJarName() {
return customConfJarName;
}
public void setCustomConfJarName(String customConfJarName) {
this.customConfJarName = customConfJarName;
}
@Override
public String toString() {
return "HadoopConfJarBean [overrideCustomConf=" + overrideCustomConf + ", isContextMode=" + isContextMode
+ ", overrideCustomConfPath=" + overrideCustomConfPath + ", originalOverrideCustomConfPath="
+ originalOverrideCustomConfPath + ", customConfJarName=" + customConfJarName + "]";
}
}

View File

@@ -14,6 +14,7 @@ package org.talend.core.hadoop;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.eclipse.core.runtime.IPath;
import org.talend.commons.exception.BusinessException;
@@ -232,11 +233,12 @@ public interface IHadoopClusterService extends IService {
*/
public Item getHadoopClusterItemById(String id);
public String getCustomConfsJarName(String id);
public Optional<HadoopConfJarBean> getCustomConfsJar(String id);
public String getCustomConfsJarName(String id, boolean createJarIfNotExist, boolean addExtraIds);
public Optional<HadoopConfJarBean> getCustomConfsJar(String id, boolean createJarIfNotExist, boolean addExtraIds);
public String getCustomConfsJarName(ConnectionItem connectionItem, boolean createJarIfNotExist, boolean addExtraIds);
public Optional<HadoopConfJarBean> getCustomConfsJar(ConnectionItem connectionItem, boolean createJarIfNotExist,
boolean addExtraIds);
public void useCustomConfsJarIfNeeded(List<ModuleNeeded> modulesNeeded, String clusterId);

View File

@@ -60,6 +60,15 @@ public interface IComponent {
public String getOriginalName();
/**
* Only for component display (palette,search)
*
* @return
*/
default public String getDisplayName() {
return getName();
}
public String getLongName();
public String getOriginalFamilyName();

View File

@@ -23,6 +23,8 @@ public interface IMultipleComponentConnection {
public String getConnectionType();
public String getConnectorName();
public void setConnectionType(String connectionType);
public String getNameTarget();

View File

@@ -14,6 +14,8 @@ package org.talend.core.model.components;
import java.util.List;
import org.talend.core.model.process.INode;
/**
* DOC nrousseau class global comment. Detailled comment <br/>
*
@@ -33,4 +35,7 @@ public interface IMultipleComponentItem {
public String getComponent();
public void setComponent(String component);
public void updateNode(INode newNode, INode oldNode);
}

View File

@@ -50,4 +50,6 @@ public interface IMultipleComponentManager {
public boolean isLookupMode();
public String getParamSeperator();
}

View File

@@ -383,7 +383,8 @@ public class JobContextManager implements IContextManager {
contextParam = new JobContextParameter();
contextParam.setContext(context);
contextParam.setName(contextParamType.getName());
contextParam.setPrompt(contextParamType.getPrompt());
contextParam.setPrompt(
contextParamType.getPrompt() == null ? (contextParamType.getName() + "?") : contextParamType.getPrompt());
originalParamerters.add(contextParam.getName());
boolean exists = true;
try {

View File

@@ -0,0 +1,26 @@
package org.talend.core.model.metadata;
public class DbDefaultDatePattern {
private String defaultPattern;
private String dbTypeName;
public DbDefaultDatePattern() {
}
public String getDefaultPattern() {
return defaultPattern;
}
public void setDefaultPattern(String defaultPattern) {
this.defaultPattern = defaultPattern;
}
public String getDbTypeName() {
return dbTypeName;
}
public void setDbTypeName(String dbTypeName) {
this.dbTypeName = dbTypeName;
}
}

View File

@@ -41,6 +41,8 @@ public class Dbms {
private Set<MappingType> talendToDbTypes;
private List<DbDefaultLengthAndPrecision> defaultLengthPrecision;
private List<DbDefaultDatePattern> defaultPattern;
private List<DbIgnoreLengthAndPrecision> ignoreLengthPrecision;
@@ -62,6 +64,14 @@ public class Dbms {
List<DbDefaultLengthAndPrecision> defaultLengthPrecision) {
this.defaultLengthPrecision = defaultLengthPrecision;
}
public List<DbDefaultDatePattern> getDefaultPattern() {
return defaultPattern;
}
public void setDefaultPattern(
List<DbDefaultDatePattern> defaultLengthPrecision) {
this.defaultPattern = defaultLengthPrecision;
}
/**
* DOC amaumont Dbms constructor comment.

View File

@@ -68,6 +68,8 @@ public interface IMetadataTable {
public boolean sameMetadataAs(IMetadataTable meta);
public boolean sameMetadataAs(IMetadataTable other, int options);
public boolean sameMetadataAs(IMetadataTable other, int options, boolean order);
public void sortCustomColumns();

View File

@@ -45,6 +45,14 @@ public interface ISAPConstant {
public static final String CHANGING = "CHANGING";//$NON-NLS-1$
public static final String PARAMETER_TYPE = "PARAMETER_TYPE";//$NON-NLS-1$
public static final String PARAMETER_TYPE_IMPORT = "IMPORT";//$NON-NLS-1$
public static final String PARAMETER_TYPE_CHANGING = "CHANGING";//$NON-NLS-1$
public static final String PARAMETER_TYPE_TABLES = "TABLES";//$NON-NLS-1$
/*
*
*/

View File

@@ -125,10 +125,12 @@ public class MappingFileLoader {
// search and load preBeforelen nodes
ArrayList<String> dbTypes = new ArrayList<String>();
ArrayList<DbDefaultLengthAndPrecision> dbDefault = new ArrayList<DbDefaultLengthAndPrecision>();
ArrayList<DbDefaultDatePattern> dbDefaultPattern = new ArrayList<DbDefaultDatePattern>();
ArrayList<DbIgnoreLengthAndPrecision> dbIgnore = new ArrayList<DbIgnoreLengthAndPrecision>();
ArrayList<DbPreBeforeLength> dbPbeforeLList = new ArrayList<DbPreBeforeLength>();
dbms.setDbmsTypes(dbTypes);
dbms.setDefaultLengthPrecision(dbDefault);
dbms.setDefaultPattern(dbDefaultPattern);
dbms.setIgnoreLengthPrecision(dbIgnore);
dbms.setPrebeforelength(dbPbeforeLList);
List<Node> typeNodes = getChildElementNodes(dbTypesNode);
@@ -149,19 +151,25 @@ public class MappingFileLoader {
dbTypes.add(typeValue);
hAllDbTypes.add(typeValue);
DbDefaultLengthAndPrecision dbDefaultLP = new DbDefaultLengthAndPrecision();
DbDefaultDatePattern dbDefaultPt = new DbDefaultDatePattern();
DbIgnoreLengthAndPrecision dbIgnoreLP = new DbIgnoreLengthAndPrecision();
DbPreBeforeLength dbPBeforeL = new DbPreBeforeLength();
// default length and precision
Node defaultLengthItem = typeNodeAtttributes.getNamedItem("defaultLength"); //$NON-NLS-1$
Node defaultPrecision = typeNodeAtttributes.getNamedItem("defaultPrecision"); //$NON-NLS-1$
Node defaultPattern = typeNodeAtttributes.getNamedItem("defaultPattern"); //$NON-NLS-1$
if (defaultLengthItem != null)
dbDefaultLP.setDefaultLength(Integer.parseInt(defaultLengthItem.getNodeValue()));
if (defaultPrecision != null)
dbDefaultLP.setDefaultPrecision(Integer.parseInt(defaultPrecision.getNodeValue()));
if (defaultPattern != null)
dbDefaultPt.setDefaultPattern(defaultPattern.getNodeValue());
dbDefaultLP.setDbTypeName(typeValue);
dbDefaultPt.setDbTypeName(typeValue);
dbDefault.add(dbDefaultLP);
dbDefaultPattern.add(dbDefaultPt);
// ignore Length and Precision
Node ignoreLength = typeNodeAtttributes.getNamedItem("ignoreLen"); //$NON-NLS-1$

View File

@@ -191,6 +191,24 @@ public class MappingTypeRetriever {
}// end for
return false;
}
public String getDefaultPattern(String dbmsId, String dbType) {
Dbms dbms = MetadataTalendType.getDbms(dbmsId);
List<DbDefaultDatePattern> defaultPattern = dbms.getDefaultPattern();
String pattern = new String(""); //$NON-NLS-1$
for (int i = 0; i < defaultPattern.size(); i++) {
DbDefaultDatePattern dbPattern = (DbDefaultDatePattern) defaultPattern.get(i);
if (dbPattern.getDbTypeName().equalsIgnoreCase(dbType)) {
pattern = dbPattern.getDefaultPattern();
if (pattern == null) {
return "";
} else {
return pattern;
}
}// end if
}// end for
return pattern;
}
private boolean isExtensionPrecisionIgnored(String dbmsId, String dbType) {
Map<String, Map<String, List<DBTypeUtil>>> javaTypeMappingFromExtension = JavaTypesManager

View File

@@ -153,7 +153,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();
temp.addAll(this.listColumns);
temp.addAll(this.unusedColumns);
if (originalColumns != null) {
if (originalColumns != null && isRepository) {
Collections.sort(temp, new Comparator<IMetadataColumn>() {
@Override
@@ -243,6 +243,11 @@ public class MetadataTable implements IMetadataTable, Cloneable {
*/
@Override
public boolean sameMetadataAs(IMetadataTable input, int options) {
return sameMetadataAs(input, options, false);
}
@Override
public boolean sameMetadataAs(IMetadataTable input, int options, boolean order) {
if (this == input) {
return true;
}
@@ -263,7 +268,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
// test if standard columns (no custom, or same input / output)
for (int i = 0; i < inputColumnListWithUnselected.size(); i++) {
IMetadataColumn otherColumn = inputColumnListWithUnselected.get(i);
if (isRepository) {
if (isRepository && !order) {
boolean exist = false;
for (int j = 0; j < thisColumnListWithUnselected.size(); j++) {
IMetadataColumn myColumn = thisColumnListWithUnselected.get(j);

View File

@@ -76,6 +76,8 @@ public final class MetadataTalendType {
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
private static ECodeLanguage codeLanguage;
private static final String[] PERL_TYPES = new String[] { PerlTypesManager.BOOLEAN, PerlTypesManager.DATE,
@@ -476,7 +478,7 @@ public final class MetadataTalendType {
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
ICoreService service = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
service = (ICoreService) GlobalServiceRegister.getDefault().getService(ICoreService.class);
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
service.syncMappingsFileFromSystemToProject();
}
}

View File

@@ -626,6 +626,7 @@ public final class MetadataToolHelper {
target.getListColumns().addAll(columnsTAdd);
target.sortCustomColumns();
target.setLabel(source.getLabel());
target.setDbms(source.getDbms());
setTargetOriginalColumns(source, target);
// List<String> originalColumnsList = null;
// if (source.getOriginalColumns() != null) {

View File

@@ -0,0 +1,25 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.process;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsJobletReplaceNodeHandler extends AbsReplaceNodeHandler implements IJobletReplaceNodeHandler {
public AbsJobletReplaceNodeHandler(String prefix) {
super();
this.setPrefix(prefix);
}
}

View File

@@ -0,0 +1,31 @@
// ============================================================================
//
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.process;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsReplaceNodeHandler implements IReplaceNodeHandler {
private String prefix;
@Override
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}

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