Compare commits
138 Commits
release/7.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b41874917 | ||
|
|
357c94c3a2 | ||
|
|
6ff9e7192f | ||
|
|
72ced3ab72 | ||
|
|
e19ccec64a | ||
|
|
603d84c50b | ||
|
|
9b4fe691d7 | ||
|
|
1795ff0600 | ||
|
|
cc57cba599 | ||
|
|
3fb4d63b1d | ||
|
|
cb77eef4dd | ||
|
|
d78ed3973b | ||
|
|
f248929661 | ||
|
|
6259d1fb44 | ||
|
|
8815482148 | ||
|
|
0033f23dff | ||
|
|
4f32054c45 | ||
|
|
fd852a3f42 | ||
|
|
1866b07ba3 | ||
|
|
31e017658f | ||
|
|
eef92394a1 | ||
|
|
c41fe280f3 | ||
|
|
84d5f6c822 | ||
|
|
79b9d07ab2 | ||
|
|
700aa890c6 | ||
|
|
b0eaef3bb5 | ||
|
|
6154224845 | ||
|
|
d0d6c3f97d | ||
|
|
d8ce933b27 | ||
|
|
673b18b62b | ||
|
|
d3b07c29d1 | ||
|
|
967b49f25d | ||
|
|
9429366f66 | ||
|
|
256002c49a | ||
|
|
13ed880081 | ||
|
|
e1bcf2e963 | ||
|
|
19d40f24db | ||
|
|
52bfb2e8d3 | ||
|
|
89cf326ab4 | ||
|
|
21f239cac2 | ||
|
|
1f8d681522 | ||
|
|
6e9fe76db8 | ||
|
|
7cbf85d150 | ||
|
|
3c5b3b353e | ||
|
|
532c15eb45 | ||
|
|
307c833488 | ||
|
|
138bdc5d47 | ||
|
|
011946574c | ||
|
|
a22fa846c4 | ||
|
|
9db6ddf29b | ||
|
|
a8ac292aad | ||
|
|
c4e1d8bda6 | ||
|
|
f8854adc93 | ||
|
|
297dec3f60 | ||
|
|
170cb6d018 | ||
|
|
bebc3050d1 | ||
|
|
33a383a413 | ||
|
|
4e235931d0 | ||
|
|
3269e50dcd | ||
|
|
c55fb30045 | ||
|
|
8c57f7f34d | ||
|
|
4623022e03 | ||
|
|
b352645b67 | ||
|
|
0b6d09fe19 | ||
|
|
95e7b2cec2 | ||
|
|
01749151dc | ||
|
|
6c71d8eef7 | ||
|
|
82048e1057 | ||
|
|
4337618568 | ||
|
|
8d25035ce2 | ||
|
|
cca649e285 | ||
|
|
b70d78cfc4 | ||
|
|
0640bbdec0 | ||
|
|
eee74c58e1 | ||
|
|
33116d41ea | ||
|
|
c81eefda4c | ||
|
|
56a48fa889 | ||
|
|
ab6aa521e7 | ||
|
|
36102a662f | ||
|
|
574312bf7e | ||
|
|
a96a2d3ffa | ||
|
|
e476f16b1d | ||
|
|
107a5cc42d | ||
|
|
773e9b85ec | ||
|
|
8adce7711f | ||
|
|
3f62e44068 | ||
|
|
f5e10343fe | ||
|
|
a2daae515c | ||
|
|
b5240d1762 | ||
|
|
d95d058e75 | ||
|
|
e623b1d136 | ||
|
|
c4dadb8ee9 | ||
|
|
2791c1e35b | ||
|
|
1137336db3 | ||
|
|
29d7c17bbf | ||
|
|
7dde7cf4d0 | ||
|
|
1818864a43 | ||
|
|
4c67a9780a | ||
|
|
9e9f1b3478 | ||
|
|
e6c2ea8bab | ||
|
|
98bbe0416e | ||
|
|
d889b21c6d | ||
|
|
e50a3e7352 | ||
|
|
60031484ea | ||
|
|
1633f648af | ||
|
|
3f96aec487 | ||
|
|
1bf2a79f3c | ||
|
|
f99f08aab6 | ||
|
|
53fb0e7182 | ||
|
|
273fe48fa7 | ||
|
|
4a9beeb93c | ||
|
|
9a6fe39e7d | ||
|
|
8387d30864 | ||
|
|
78beb90c63 | ||
|
|
753eb9a860 | ||
|
|
3c4089f3f0 | ||
|
|
2447eaae6f | ||
|
|
4819dc013b | ||
|
|
64f76aea1a | ||
|
|
44e8b184f2 | ||
|
|
d2bc51edd8 | ||
|
|
5a0c3c50dc | ||
|
|
245a5bb510 | ||
|
|
57a0d745f3 | ||
|
|
ebe51530ae | ||
|
|
9d5b376155 | ||
|
|
77973b2807 | ||
|
|
a1441b1b51 | ||
|
|
7fb2fa2f15 | ||
|
|
8e401b6f1d | ||
|
|
a95c9e3940 | ||
|
|
cabef426f9 | ||
|
|
952f28e9fe | ||
|
|
37bb18b6a6 | ||
|
|
15af08e876 | ||
|
|
912702dc8e | ||
|
|
910f191106 | ||
|
|
25b9736e6a |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.helpers.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.migrationTool.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.registration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.localprovider.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.mdm.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.metadata.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.resources.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -51,16 +51,17 @@
|
||||
fragment="true"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.libraries.apache.lucene6"
|
||||
id="org.talend.libraries.apache.lucene8"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
version="0.0.0"
|
||||
unpack="true"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.libraries.apache.lucene4"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
unpack="true"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.common.feature</artifactId>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
bin.includes = feature.xml
|
||||
43
main/features/org.talend.help.di.feature/feature.xml
Normal file
43
main/features/org.talend.help.di.feature/feature.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="org.talend.help.di.feature"
|
||||
label="Talend DI help feature"
|
||||
version="7.3.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
</description>
|
||||
|
||||
<copyright url="http://www.example.com/copyright">
|
||||
[Enter Copyright Description here.]
|
||||
</copyright>
|
||||
|
||||
<license url="http://www.example.com/license">
|
||||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<url>
|
||||
<update label="CORE Talend update site for milestones" url="http://talendforge.org/core/updatesite/testing/"/>
|
||||
</url>
|
||||
|
||||
<includes
|
||||
id="org.talend.help.tos.components.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.help"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.help.nl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
12
main/features/org.talend.help.di.feature/pom.xml
Normal file
12
main/features/org.talend.help.di.feature/pom.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.di.feature</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="7.3.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#help-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#help-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
@@ -8,9 +7,8 @@
|
||||
<update label="CORE Talend update site for milestones" url="http://talendforge.org/core/updatesite/testing/"/>
|
||||
<discovery label="Talend web site" url="http://www.talend.com"/>
|
||||
</url>
|
||||
<includes id="org.talend.help.di.feature" version="0.0.0"/>
|
||||
<requires>
|
||||
<import feature="org.eclipse.help" version="0.0.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.help" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.help.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.jdt.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.m2e.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.tos</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -114,6 +114,9 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return Boolean.getBoolean("junit_test"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isTUJTest() {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.updates.runtime.ui.feature.model;
|
||||
|
||||
import org.talend.updates.runtime.model.ExtraFeature;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IFeatureItem {
|
||||
|
||||
String getTitle();
|
||||
|
||||
ExtraFeature getFeature();
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.exception;
|
||||
|
||||
public class InformException extends PersistenceException {
|
||||
|
||||
/**
|
||||
* Show message of info level.
|
||||
*/
|
||||
private static final long serialVersionUID = 4181370042549074156L;
|
||||
|
||||
public InformException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.commons.runtime.service;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.osgi.framework.BundleContext;
|
||||
@@ -39,9 +40,7 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isTaCoKitCar(File file, IProgressMonitor monitor) throws Exception;
|
||||
|
||||
boolean isNeedMigration(String projectLabel) throws Exception;
|
||||
|
||||
void checkMigration(final IProgressMonitor monitor) throws Exception;
|
||||
boolean isNeedMigration(String componentName, Map<String, String> properties);
|
||||
|
||||
public static ITaCoKitService getInstance() throws Exception {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
|
||||
@@ -30,16 +30,14 @@ public class PasswordEncryptUtil {
|
||||
|
||||
public static final String ENCRYPT_KEY = "Encrypt"; //$NON-NLS-1$
|
||||
|
||||
private static final String RAWKEY = "Talend-Key"; //$NON-NLS-1$
|
||||
|
||||
private static SecretKey key = null;
|
||||
|
||||
private static final SecureRandom SECURERANDOM = new SecureRandom();
|
||||
|
||||
private static SecretKey getSecretKey() throws Exception {
|
||||
if (key == null) {
|
||||
|
||||
byte rawKeyData[] = RAWKEY.getBytes();
|
||||
byte rawKeyData[] = StudioEncryption.getKeySource(StudioEncryption.EncryptionKeyName.MIGRATION.toString(), false)
|
||||
.getKey();
|
||||
DESKeySpec dks = new DESKeySpec(rawKeyData);
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); //$NON-NLS-1$
|
||||
key = keyFactory.generateSecret(dks);
|
||||
|
||||
@@ -193,8 +193,7 @@ public class VersionUtils {
|
||||
return talendVersion;
|
||||
}
|
||||
|
||||
public static String getTalendPureVersion(String fullProductVersion) {
|
||||
String version = fullProductVersion;
|
||||
public static String getProductVersionWithoutBranding(String fullProductVersion) {
|
||||
String[] splitStr = fullProductVersion.split("-"); //$NON-NLS-1$
|
||||
Pattern pattern = Pattern.compile("((\\d+\\.){2}\\d.*)"); //$NON-NLS-1$
|
||||
StringBuffer versionStr = new StringBuffer();
|
||||
@@ -211,7 +210,21 @@ public class VersionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
return getTalendVersion(versionStr.toString());
|
||||
return versionStr.toString();
|
||||
}
|
||||
|
||||
public static String getTalendPureVersion(String fullProductVersion) {
|
||||
return getTalendVersion(getProductVersionWithoutBranding(fullProductVersion));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if studio version < other studio version record in remote project.
|
||||
*/
|
||||
public static boolean isInvalidProductVersion(String remoteFullProductVersion) {
|
||||
if (remoteFullProductVersion == null) {
|
||||
return false;
|
||||
}
|
||||
return getInternalVersion().compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
|
||||
}
|
||||
|
||||
public static String getTalendVersion(String productVersion) {
|
||||
|
||||
@@ -342,7 +342,7 @@ public class CharsetToolkit {
|
||||
return (buffer[0] == -2 && buffer[1] == -1);
|
||||
}
|
||||
|
||||
public static String getCharset(File file){
|
||||
public static String getCharset(File file) {
|
||||
String charset = "UTF-8";
|
||||
byte[] fileContent = null;
|
||||
FileInputStream fin = null;
|
||||
@@ -350,11 +350,18 @@ public class CharsetToolkit {
|
||||
fin = new FileInputStream(file.getPath());
|
||||
fileContent = new byte[(int) file.length()];
|
||||
fin.read(fileContent);
|
||||
|
||||
byte[] data = fileContent;
|
||||
byte[] data = fileContent;
|
||||
charset = getCharset(data);
|
||||
} catch (IOException e) {
|
||||
charset = "UTF-8";
|
||||
} finally {
|
||||
if (fin != null) {
|
||||
try {
|
||||
fin.close();
|
||||
} catch (IOException e) {
|
||||
// Ignore here
|
||||
}
|
||||
}
|
||||
}
|
||||
return charset;
|
||||
}
|
||||
|
||||
@@ -10,36 +10,32 @@
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.updates.runtime.ui.feature.model.impl;
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import org.talend.updates.runtime.model.ExtraFeature;
|
||||
import org.talend.updates.runtime.ui.feature.model.IFeatureItem;
|
||||
import java.io.IOException;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbstractFeatureItem implements IFeatureItem {
|
||||
public abstract class AbstractProxySelectorProvider implements IProxySelectorProvider {
|
||||
|
||||
private String title;
|
||||
|
||||
private ExtraFeature feature;
|
||||
private boolean isDebugMode = CommonsPlugin.isDebugMode();
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
public Object getKey() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtraFeature getFeature() {
|
||||
return feature;
|
||||
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
|
||||
if (isDebugMode) {
|
||||
ExceptionHandler.process(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
public void setFeature(ExtraFeature feature) {
|
||||
this.feature = feature;
|
||||
}
|
||||
}
|
||||
@@ -10,21 +10,25 @@
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.updates.runtime.ui.feature.form.listener;
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import java.io.IOException;
|
||||
import java.net.Proxy;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ICheckListener {
|
||||
public interface IProxySelectorProvider {
|
||||
|
||||
public void showMessage(String message, int level);
|
||||
Object getKey();
|
||||
|
||||
public String getMessage();
|
||||
boolean canHandle(final URI uri);
|
||||
|
||||
public void updateButtons();
|
||||
List<Proxy> select(final URI uri);
|
||||
|
||||
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws Exception;
|
||||
void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe);
|
||||
|
||||
}
|
||||
@@ -49,12 +49,14 @@ public class NetworkUtil {
|
||||
if ("true".equals(disableInternet)) { //$NON-NLS-1$
|
||||
return false;
|
||||
}
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(HTTP_NETWORK_URL);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
String strMessage = conn.getResponseMessage();
|
||||
if (strMessage.compareTo("Not Found") == 0) { //$NON-NLS-1$
|
||||
@@ -63,9 +65,38 @@ public class NetworkUtil {
|
||||
if (strMessage.equals("OK")) { //$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
conn.disconnect();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(String url) {
|
||||
if (url == null) {
|
||||
return isNetworkValid();
|
||||
}
|
||||
return checkValidWithHttp(url);
|
||||
}
|
||||
|
||||
private static boolean checkValidWithHttp(String urlString) {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -13,37 +13,155 @@
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import java.io.IOException;
|
||||
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.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.i18n.internal.Messages;
|
||||
|
||||
/**
|
||||
* 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 static final String PROP_ALLOW_PROXY_REDIRECT = "talend.studio.proxy.allowProxyRedirect";
|
||||
|
||||
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE = "talend.studio.proxy.redirect.whiteList";
|
||||
|
||||
private static final String PROP_PROXY_HOST_MAP = "talend.studio.proxy.hostMap";
|
||||
|
||||
private static final String PROP_DISABLE_DEFAULT_SELECTOR = "talend.studio.proxy.disableDefaultSelector";
|
||||
|
||||
/**
|
||||
* 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 ProxySelector defaultSelector;
|
||||
|
||||
final private List<IProxySelectorProvider> selectorProviders;
|
||||
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 boolean printProxyLog = false;
|
||||
|
||||
private boolean allowProxyRedirect = false;
|
||||
|
||||
private boolean disableDefaultSelector = false;
|
||||
|
||||
private TalendProxySelector(final ProxySelector defaultSelector) {
|
||||
this.defaultSelector = defaultSelector;
|
||||
selectorProviders = new ArrayList<>();
|
||||
|
||||
selectorProviders = Collections.synchronizedMap(new HashMap<>());
|
||||
allowProxyRedirect = Boolean.valueOf(System.getProperty(PROP_ALLOW_PROXY_REDIRECT, Boolean.FALSE.toString()));
|
||||
disableDefaultSelector = Boolean.valueOf(System.getProperty(PROP_DISABLE_DEFAULT_SELECTOR, Boolean.FALSE.toString()));
|
||||
printProxyLog = Boolean.valueOf(System.getProperty(PROP_PRINT_LOGS, Boolean.FALSE.toString()));
|
||||
|
||||
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() {
|
||||
@@ -81,8 +199,109 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(final URI uri) {
|
||||
final Set<Proxy> resultFromProviders = new HashSet<>();
|
||||
List<IProxySelectorProvider> providers = getProxySelectorProviders();
|
||||
Set<Proxy> results = new LinkedHashSet<>();
|
||||
|
||||
try {
|
||||
final Set<Proxy> resultFromProviders = getProxysFromProviders(uri);
|
||||
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
|
||||
results.addAll(resultFromProviders);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
URI newUri = getNewUri(uri);
|
||||
List<Proxy> defaultProxys = defaultProxySelector.select(newUri);
|
||||
try {
|
||||
results.addAll(filterProxys(uri, 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 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) {
|
||||
URI newUri = uri;
|
||||
if (newUri != null) {
|
||||
String host = newUri.getHost();
|
||||
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)) {
|
||||
try {
|
||||
newUri = new URI(preferedProtocol, newUri.getUserInfo(), newUri.getHost(), newUri.getPort(),
|
||||
newUri.getPath(), newUri.getQuery(), newUri.getFragment());
|
||||
} catch (URISyntaxException e) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.process(new Exception(
|
||||
Messages.getString("TalendProxySelector.exception.proxySelectionError", newUri), e),
|
||||
Priority.WARN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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,36 +319,79 @@ 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() {
|
||||
@@ -142,7 +404,7 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
@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)) {
|
||||
@@ -157,23 +419,111 @@ public class TalendProxySelector extends ProxySelector {
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class AbstractProxySelectorProvider implements IProxySelectorProvider {
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider() {
|
||||
if (disableDefaultSelector) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(Thread.currentThread());
|
||||
}
|
||||
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider(String host) {
|
||||
if (disableDefaultSelector) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(host);
|
||||
}
|
||||
|
||||
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 class DefaultProxySelectorProvider extends 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 void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
|
||||
// nothing to do
|
||||
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 (disableDefaultSelector) {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static interface IProxySelectorProvider {
|
||||
|
||||
boolean canHandle(final URI uri);
|
||||
|
||||
List<Proxy> select(final URI uri);
|
||||
|
||||
void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -67,11 +67,15 @@ public abstract class ProgressDialog {
|
||||
if (parentShell != null) {
|
||||
display2 = parentShell.getDisplay();
|
||||
}
|
||||
if (display2 == null) {
|
||||
display2 = Display.getDefault();
|
||||
}
|
||||
final Display display = display2;
|
||||
final InvocationTargetException[] iteHolder = new InvocationTargetException[1];
|
||||
try {
|
||||
final IRunnableWithProgress op = new IRunnableWithProgress() {
|
||||
|
||||
@Override
|
||||
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||
final InvocationTargetException[] iteHolder1 = new InvocationTargetException[1];
|
||||
try {
|
||||
@@ -96,6 +100,7 @@ public abstract class ProgressDialog {
|
||||
if (useAsync) {
|
||||
display.asyncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
@@ -106,6 +111,7 @@ public abstract class ProgressDialog {
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
@@ -128,6 +134,7 @@ public abstract class ProgressDialog {
|
||||
} else {
|
||||
display.syncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
@@ -138,6 +145,7 @@ public abstract class ProgressDialog {
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -29,8 +29,6 @@ public interface FileConstants {
|
||||
|
||||
String RELATIONSHIP_FILE_NAME = "relationship.index"; //$NON-NLS-1$
|
||||
|
||||
String COMPONENT_FILE_NAME = "component.index"; //$NON-NLS-1$
|
||||
|
||||
String TALEND_RECYCLE_BIN_INDEX = "recycle_bin.index"; //$NON-NLS-1$
|
||||
|
||||
String MIGRATION_TASK_FILE_NAME = "migration_task.index"; //$NON-NLS-1$
|
||||
|
||||
@@ -215,8 +215,18 @@ public interface IRepositoryFactory {
|
||||
public void deleteObjectPhysical(Project project, IRepositoryViewObject objToDelete, String version,
|
||||
boolean fromEmptyRecycleBin, boolean isDeleteOnRemote) throws PersistenceException;
|
||||
|
||||
public void batchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote)
|
||||
throws PersistenceException;
|
||||
/**
|
||||
*
|
||||
* Batch delete the object of the given object list.
|
||||
*
|
||||
* @param project - The object's project.
|
||||
* @param objToDeleteList - The objects list.
|
||||
* @param isDeleteAllVersion - True: delete all version by object id; False: delete object by id and version.
|
||||
* @param isDeleteOnRemote
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public void batchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList,
|
||||
boolean isDeleteAllVersion, boolean isDeleteOnRemote) throws PersistenceException;
|
||||
|
||||
/**
|
||||
* Restore a logically deleted object. <code>isDeleted</code> on this object will now returned <code>false</code>.
|
||||
|
||||
@@ -774,6 +774,20 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.talend.repository.model.IProxyRepositoryFactory#forceBatchDeleteObjectPhysical(org.talend.core.model.general.
|
||||
* Project, java.util.List, boolean, boolean)
|
||||
*/
|
||||
@Override
|
||||
public void forceBatchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList,
|
||||
boolean isDeleteAllVersion, boolean isDeleteOnRemote) throws PersistenceException {
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, objToDeleteList, isDeleteAllVersion,
|
||||
isDeleteOnRemote);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -932,7 +946,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
.getService(IRunProcessService.class);
|
||||
service.batchDeleteAllVersionTalendJobProject(idList);
|
||||
}
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, repositoryObjectList, false);
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, repositoryObjectList, true, false);
|
||||
|
||||
// save project will handle git/svn update
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
@@ -2064,7 +2078,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
try {
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.load.sdk.componnents"), 1); // $NON-NLS-1$
|
||||
ITaCoKitService.getInstance().start();
|
||||
if (ITaCoKitService.getInstance() != null) {
|
||||
ITaCoKitService.getInstance().start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -2214,18 +2230,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
tdqRepositoryService.initProxyRepository();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute TaCoKit migration before fullLogonFinished
|
||||
*/
|
||||
try {
|
||||
ITaCoKitService tacokitService = ITaCoKitService.getInstance();
|
||||
if (tacokitService != null && tacokitService.isNeedMigration(project.getTechnicalLabel())) {
|
||||
tacokitService.checkMigration(monitor);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
fullLogonFinished = true;
|
||||
this.repositoryFactoryFromProvider.afterLogon(monitor);
|
||||
} finally {
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.repository.utils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class ComponentsJsonModel {
|
||||
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("version")
|
||||
private String version;
|
||||
|
||||
@JsonProperty("parentId")
|
||||
private String parentId;
|
||||
|
||||
@JsonProperty("configurationType")
|
||||
private String configurationType;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("displayName")
|
||||
private String displayName;
|
||||
|
||||
@JsonProperty("edges")
|
||||
private Set edges;
|
||||
|
||||
@JsonProperty("properties")
|
||||
private List properties;
|
||||
|
||||
@JsonProperty("actions")
|
||||
private Object actions;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getConfigurationType() {
|
||||
return configurationType;
|
||||
}
|
||||
|
||||
public void setConfigurationType(String configurationType) {
|
||||
this.configurationType = configurationType;
|
||||
}
|
||||
|
||||
public Set getEdges() {
|
||||
return edges;
|
||||
}
|
||||
|
||||
public void setEdges(Set edges) {
|
||||
this.edges = edges;
|
||||
}
|
||||
|
||||
public List getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(List properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public Object getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Object actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,13 +18,10 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -106,54 +103,6 @@ public class ProjectDataJsonProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public static void saveConfigComponent(String projectLabel, List<ComponentsJsonModel> componentJsons)
|
||||
throws PersistenceException {
|
||||
Collections.sort(componentJsons, new Comparator<ComponentsJsonModel>() {
|
||||
|
||||
@Override
|
||||
public int compare(ComponentsJsonModel configTypeNode1, ComponentsJsonModel configTypeNode2) {
|
||||
return configTypeNode1.getId().compareTo(configTypeNode2.getId());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
File file = getSavingConfigurationFile(projectLabel, FileConstants.COMPONENT_FILE_NAME);
|
||||
try {
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.writerWithDefaultPrettyPrinter().writeValue(file, componentJsons);
|
||||
ResourceUtils.getProject(projectLabel).getFolder(FileConstants.SETTINGS_FOLDER_NAME).refreshLocal(1, null);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, String[]> getLastConfigComponent(String projectLabel) throws PersistenceException {
|
||||
Map<String, String[]> componentMap = new HashMap<>();
|
||||
File file = getSavingConfigurationFile(projectLabel, FileConstants.COMPONENT_FILE_NAME);
|
||||
TypeReference<List<ComponentsJsonModel>> typeReference = new TypeReference<List<ComponentsJsonModel>>() {
|
||||
};
|
||||
List<ComponentsJsonModel> componentsJsons = null;
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(file);
|
||||
componentsJsons = new ObjectMapper().readValue(input, typeReference);
|
||||
} catch (IOException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
if (componentsJsons != null && componentsJsons.size() > 0) {
|
||||
for (ComponentsJsonModel component : componentsJsons) {
|
||||
String[] content = new String[] { component.getName(), component.getVersion(), component.getDisplayName() };
|
||||
componentMap.put(component.getId(), content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return componentMap;
|
||||
}
|
||||
|
||||
public static void loadProjectData(Project project, IPath projectFolderPath, int loadContent) throws PersistenceException {
|
||||
if ((loadContent & CONTENT_PROJECTSETTING) > 0) {
|
||||
loadProjectSettings(project, projectFolderPath);
|
||||
@@ -166,8 +115,8 @@ public class ProjectDataJsonProvider {
|
||||
RecycleBinManager.getInstance().clearCache(project);
|
||||
RecycleBin recycleBin = RecycleBinManager.getInstance().getRecycleBin(project);
|
||||
project.getDeletedFolders().clear();
|
||||
for (int i = 0; i < recycleBin.getDeletedFolders().size(); i++) {
|
||||
project.getDeletedFolders().add(recycleBin.getDeletedFolders().get(i));
|
||||
for (String element : recycleBin.getDeletedFolders()) {
|
||||
project.getDeletedFolders().add(element);
|
||||
}
|
||||
}
|
||||
if ((loadContent & CONTENT_MIGRATIONTASK) > 0) {
|
||||
@@ -285,8 +234,8 @@ public class ProjectDataJsonProvider {
|
||||
if (migrationTaskSetting != null) {
|
||||
MigrationTask fakeTask = createFakeMigrationTask();
|
||||
MigrationTask existingFakeTask = null;
|
||||
for (int i = 0; i < project.getMigrationTask().size(); i++) {
|
||||
MigrationTask task = (MigrationTask) project.getMigrationTask().get(i);
|
||||
for (Object element : project.getMigrationTask()) {
|
||||
MigrationTask task = (MigrationTask) element;
|
||||
if (StringUtils.equals(fakeTask.getId(), task.getId())) {
|
||||
existingFakeTask = task;
|
||||
break;
|
||||
@@ -471,8 +420,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<StatusJson> getTechnicalStatusJson(List technicalStatus) {
|
||||
if (technicalStatus != null && technicalStatus.size() > 0) {
|
||||
List<StatusJson> list = new ArrayList<StatusJson>(technicalStatus.size());
|
||||
for (int i = 0; i < technicalStatus.size(); i++) {
|
||||
StatusJson json = new StatusJson((Status) technicalStatus.get(i));
|
||||
for (Object technicalStatu : technicalStatus) {
|
||||
StatusJson json = new StatusJson((Status) technicalStatu);
|
||||
list.add(json);
|
||||
}
|
||||
return list;
|
||||
@@ -492,8 +441,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<StatusJson> getDocumentationJson(List documentationStatus) {
|
||||
if (documentationStatus != null && documentationStatus.size() > 0) {
|
||||
List<StatusJson> list = new ArrayList<StatusJson>(documentationStatus.size());
|
||||
for (int i = 0; i < documentationStatus.size(); i++) {
|
||||
StatusJson json = new StatusJson((Status) documentationStatus.get(i));
|
||||
for (Object documentationStatu : documentationStatus) {
|
||||
StatusJson json = new StatusJson((Status) documentationStatu);
|
||||
list.add(json);
|
||||
}
|
||||
return list;
|
||||
@@ -513,8 +462,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<ItemRelationsJson> getItemRelationsJson(List itemsRelations) {
|
||||
if (itemsRelations.size() > 0) {
|
||||
List<ItemRelationsJson> list = new ArrayList<ItemRelationsJson>(itemsRelations.size());
|
||||
for (int i = 0; i < itemsRelations.size(); i++) {
|
||||
ItemRelations relations = (ItemRelations) itemsRelations.get(i);
|
||||
for (Object itemsRelation : itemsRelations) {
|
||||
ItemRelations relations = (ItemRelations) itemsRelation;
|
||||
ItemRelationsJson json = new ItemRelationsJson(relations);
|
||||
list.add(json);
|
||||
}
|
||||
@@ -639,16 +588,16 @@ class ParametersTypeJson {
|
||||
public ParametersTypeJson(ParametersType parametersType) {
|
||||
if (parametersType.getElementParameter().size() > 0) {
|
||||
elementParameters = new ArrayList<ElementParameterTypeJson>();
|
||||
for (int i = 0; i < parametersType.getElementParameter().size(); i++) {
|
||||
ElementParameterType type = (ElementParameterType) parametersType.getElementParameter().get(i);
|
||||
for (Object element : parametersType.getElementParameter()) {
|
||||
ElementParameterType type = (ElementParameterType) element;
|
||||
ElementParameterTypeJson typeJson = new ElementParameterTypeJson(type);
|
||||
elementParameters.add(typeJson);
|
||||
}
|
||||
}
|
||||
if (parametersType.getRoutinesParameter().size() > 0) {
|
||||
routinesParameters = new ArrayList<RoutinesParameterTypeJson>();
|
||||
for (int i = 0; i < parametersType.getRoutinesParameter().size(); i++) {
|
||||
RoutinesParameterType type = (RoutinesParameterType) parametersType.getRoutinesParameter().get(i);
|
||||
for (Object element : parametersType.getRoutinesParameter()) {
|
||||
RoutinesParameterType type = (RoutinesParameterType) element;
|
||||
RoutinesParameterTypeJson typeJson = new RoutinesParameterTypeJson(type);
|
||||
routinesParameters.add(typeJson);
|
||||
}
|
||||
@@ -722,8 +671,8 @@ class ElementParameterTypeJson {
|
||||
this.isShow = type.isShow();
|
||||
if (type.getElementValue().size() > 0) {
|
||||
elementValues = new ArrayList<ElementValueTypeJson>();
|
||||
for (int i = 0; i < type.getElementValue().size(); i++) {
|
||||
ElementValueType value = (ElementValueType) type.getElementValue().get(i);
|
||||
for (Object element : type.getElementValue()) {
|
||||
ElementValueType value = (ElementValueType) element;
|
||||
ElementValueTypeJson valueJson = new ElementValueTypeJson(value);
|
||||
elementValues.add(valueJson);
|
||||
}
|
||||
@@ -953,8 +902,8 @@ class ItemRelationsJson {
|
||||
}
|
||||
if (relations.getRelatedItems().size() > 0) {
|
||||
relatedItems = new ArrayList<ItemRelationJson>(relations.getRelatedItems().size());
|
||||
for (int i = 0; i < relations.getRelatedItems().size(); i++) {
|
||||
relatedItems.add(new ItemRelationJson((ItemRelation) relations.getRelatedItems().get(i)));
|
||||
for (Object element : relations.getRelatedItems()) {
|
||||
relatedItems.add(new ItemRelationJson((ItemRelation) element));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1101,8 +1050,8 @@ class MigrationTaskSetting {
|
||||
if (project != null) {
|
||||
if (project.getMigrationTask().size() > 0) {
|
||||
migrationTaskList = new ArrayList<MigrationTaskJson>();
|
||||
for (int i = 0; i < project.getMigrationTask().size(); i++) {
|
||||
MigrationTask task = (MigrationTask) project.getMigrationTask().get(i);
|
||||
for (Object element : project.getMigrationTask()) {
|
||||
MigrationTask task = (MigrationTask) element;
|
||||
migrationTaskList.add(new MigrationTaskJson(task));
|
||||
}
|
||||
migrationTaskList.sort(new Comparator<MigrationTaskJson>() {
|
||||
@@ -1119,8 +1068,8 @@ class MigrationTaskSetting {
|
||||
}
|
||||
if (project.getMigrationTasks().size() > 0) {
|
||||
migrationTasksList = new ArrayList<String>();
|
||||
for (int i = 0; i < project.getMigrationTasks().size(); i++) {
|
||||
String task = (String) project.getMigrationTasks().get(i);
|
||||
for (Object element : project.getMigrationTasks()) {
|
||||
String task = (String) element;
|
||||
migrationTasksList.add(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ Export-Package: org.talend.commons.utils.generation,
|
||||
org.talend.core.prefs,
|
||||
org.talend.core.repository,
|
||||
org.talend.core.runtime,
|
||||
org.talend.core.runtime.constants,
|
||||
org.talend.core.runtime.dynamic,
|
||||
org.talend.core.runtime.evaluator,
|
||||
org.talend.core.runtime.hd,
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<dbType type="CHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="LONG"/>
|
||||
<dbtype type="CLOB"/>
|
||||
<dbType type="CLOB"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes><!-- Adviced mappings -->
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M3</version>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -208,8 +208,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);
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PluginChecker {
|
||||
|
||||
private static final String GIT_PROVIDER_PLUGIN_ID = "org.talend.repository.gitprovider"; //$NON-NLS-1$
|
||||
|
||||
private static final String CORE_TIS_PLUGIN_ID = "org.talend.core.tis"; //$NON-NLS-1$
|
||||
public static final String CORE_TIS_PLUGIN_ID = "org.talend.core.tis"; //$NON-NLS-1$
|
||||
|
||||
private static final String HL7_PLUGIN_ID = "org.talend.repository.hl7"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -98,6 +98,12 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN = "CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_WEBHDFS_SSL = "CONN_PARA_KEY_USE_WEBHDFS_SSL";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PATH = "CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PATH"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PASSWORD = "CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Hive keys.
|
||||
*/
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.classloader.DynamicClassLoader;
|
||||
/**
|
||||
* created by hcyi on Dec 3, 2019
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public class HadoopClassLoaderUtil {
|
||||
|
||||
public final static String[] webhdfsExtraJars = { "jersey-core-1.9.jar", "jersey-client-1.9.jar", "jetty-util-6.1.26.jar" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
private final static String[] webhdfsExtraJarNames = { "jersey-core", "jersey-client", "jetty-util" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
public static boolean isWebHDFS(String nameNodeURI) {
|
||||
if (nameNodeURI != null
|
||||
&& (nameNodeURI.toLowerCase().startsWith("swebhdfs://") || nameNodeURI.toLowerCase().startsWith("webhdfs://"))) {//$NON-NLS-1$ //$NON-NLS-2$
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ClassLoader addExtraJars(ClassLoader classLoader, EHadoopCategory category, String nameNodeURI) {
|
||||
if (isWebHDFS(nameNodeURI) && classLoader != null && classLoader instanceof DynamicClassLoader) {
|
||||
DynamicClassLoader loader = (DynamicClassLoader) classLoader;
|
||||
switch (category) {
|
||||
case HDFS:
|
||||
List<String> excludedJars = new ArrayList<String>();
|
||||
Set<String> libraries = loader.getLibraries();
|
||||
for (String lib : libraries) {
|
||||
for (int i = 0; i < webhdfsExtraJarNames.length; i++) {
|
||||
if (lib.contains(webhdfsExtraJarNames[i])) {
|
||||
excludedJars.add(webhdfsExtraJars[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (excludedJars.size() < 3) {
|
||||
List<String> addedJars = new ArrayList<String>();
|
||||
for (String webhdfsExtraJar : webhdfsExtraJars) {
|
||||
if (!excludedJars.contains(webhdfsExtraJar)) {
|
||||
addedJars.add(webhdfsExtraJar);
|
||||
}
|
||||
}
|
||||
try {
|
||||
classLoader = DynamicClassLoader.createNewOneBaseLoader(loader,
|
||||
addedJars.toArray(new String[addedJars.size()]), null);
|
||||
} catch (MalformedURLException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return classLoader;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryTypeProcessor;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.model.IRepositoryNode;
|
||||
|
||||
/**
|
||||
@@ -264,4 +265,7 @@ public interface IHadoopClusterService extends IService {
|
||||
|
||||
public boolean updateConfJarsByContextGroup(ContextItem contextItem, Map<String, String> contextGroupRanamedMap);
|
||||
|
||||
public ContextType getHadoopClusterContextType(String id);
|
||||
|
||||
public Map<String, String> getHadoopSSLParameters(String clusterId);
|
||||
}
|
||||
|
||||
@@ -22,15 +22,18 @@ import java.util.Map.Entry;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.hadoop.HadoopClassLoaderUtil;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.core.prefs.SSLPreferenceConstants;
|
||||
import org.talend.core.service.IMetadataManagmentUiService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* created by ycbai on 2013-10-24 Detailled comment
|
||||
@@ -175,7 +178,7 @@ public class HadoopRepositoryUtil {
|
||||
List<Map<String, Object>> properties = null;
|
||||
IMetadataManagmentUiService mmUIService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
|
||||
mmUIService = (IMetadataManagmentUiService) GlobalServiceRegister.getDefault().getService(
|
||||
mmUIService = GlobalServiceRegister.getDefault().getService(
|
||||
IMetadataManagmentUiService.class);
|
||||
}
|
||||
ContextType contextType = null;
|
||||
@@ -325,10 +328,23 @@ public class HadoopRepositoryUtil {
|
||||
public static IHadoopClusterService getHadoopClusterService() {
|
||||
IHadoopClusterService hadoopClusterService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
|
||||
hadoopClusterService = (IHadoopClusterService) GlobalServiceRegister.getDefault().getService(
|
||||
hadoopClusterService = GlobalServiceRegister.getDefault().getService(
|
||||
IHadoopClusterService.class);
|
||||
}
|
||||
return hadoopClusterService;
|
||||
}
|
||||
|
||||
public static void setSSLSystemProperty(boolean isUseSSL, String nameNodeURI, String trustStorePath,
|
||||
String trustStorePassword) {
|
||||
if (isUseSSL) {
|
||||
System.setProperty(SSLPreferenceConstants.TRUSTSTORE_FILE, trustStorePath);
|
||||
System.setProperty(SSLPreferenceConstants.TRUSTSTORE_PASSWORD,
|
||||
StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM).decrypt(trustStorePassword));
|
||||
} else {
|
||||
if (HadoopClassLoaderUtil.isWebHDFS(nameNodeURI)) {
|
||||
System.clearProperty(SSLPreferenceConstants.TRUSTSTORE_FILE);
|
||||
System.clearProperty(SSLPreferenceConstants.TRUSTSTORE_PASSWORD);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,5 +29,4 @@ public interface INexusService extends IService {
|
||||
|
||||
ArtifactRepositoryBean getPublishNexusServerBean(String repositoryId);
|
||||
|
||||
ArtifactRepositoryBean getArtifactRepositoryFromServer();
|
||||
}
|
||||
|
||||
@@ -167,9 +167,9 @@ public interface IMetadataConnection extends IMetadata {
|
||||
|
||||
public void setOtherParameter(String otherParameter);
|
||||
|
||||
public String getDbName();
|
||||
public String getWarehouse();
|
||||
|
||||
public void setDbName(String dbName);
|
||||
public void setWarehouse(String warehouse);
|
||||
|
||||
public String getUiSchema();
|
||||
|
||||
|
||||
@@ -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$
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -100,7 +100,10 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
|
||||
private String otherParameter;
|
||||
|
||||
private String dbName;
|
||||
/**
|
||||
* TDQ-17294: used for support snowflake warehouse.
|
||||
*/
|
||||
private String warehouse;
|
||||
|
||||
private String uiSchema;
|
||||
|
||||
@@ -671,12 +674,12 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
this.otherParameter = otherParameter;
|
||||
}
|
||||
|
||||
public String getDbName() {
|
||||
return dbName;
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setDbName(String dbName) {
|
||||
this.dbName = dbName;
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getUiSchema() {
|
||||
|
||||
@@ -319,7 +319,7 @@ public class ComponentToRepositoryProperty {
|
||||
}
|
||||
IGenericDBService dbService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
|
||||
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(
|
||||
dbService = GlobalServiceRegister.getDefault().getService(
|
||||
IGenericDBService.class);
|
||||
}
|
||||
if(dbService == null){
|
||||
@@ -467,10 +467,10 @@ public class ComponentToRepositoryProperty {
|
||||
// Redshift
|
||||
else if (EDatabaseTypeName.REDSHIFT.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
|
||||
connection.setProductId(EDatabaseTypeName.REDSHIFT.getProduct());
|
||||
parameter = node.getElementParameter("TYPE"); //$NON-NLS-1$
|
||||
if ("Redshift SSO".equals(parameter.getValue())) {
|
||||
IElementParameter paraJdbcUrl = node.getElementParameter("JDBC_URL");
|
||||
if ("SSO".equals(paraJdbcUrl.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.REDSHIFT_SSO.getDisplayName());
|
||||
} else if ("Redshift".equals(parameter.getValue())) {
|
||||
} else if ("STANDARD".equals(paraJdbcUrl.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.REDSHIFT.getDisplayName());
|
||||
}
|
||||
}
|
||||
@@ -622,7 +622,8 @@ public class ComponentToRepositoryProperty {
|
||||
if ("SCHEMA".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
if (value != null) {
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())
|
||||
&& !connection.isContextMode()) {
|
||||
connection.setUiSchema(TalendQuoteUtils.removeQuotes(value.toUpperCase()));
|
||||
} else {
|
||||
connection.setUiSchema(TalendQuoteUtils.removeQuotes(value));
|
||||
|
||||
@@ -2845,6 +2845,10 @@ public class RepositoryToComponentProperty {
|
||||
if (value.equals("USE_ENCODING")) {
|
||||
return connection.isUseFileNameEncoding();
|
||||
}
|
||||
|
||||
if(value.equals("CONNECTION_TIMEOUT")) {
|
||||
return connection.getTimeout();
|
||||
}
|
||||
|
||||
if (value.equals("ENCODING")) {
|
||||
if (isContextMode(connection, connection.getCustomEncode())) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.metadata.IMetadataColumn;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.MetadataTable;
|
||||
import org.talend.core.model.process.node.MapperExternalNode;
|
||||
|
||||
/**
|
||||
* Concrete class to instanciate as an AbstractNode for the BigData code generators
|
||||
@@ -76,6 +77,9 @@ public class BigDataNode extends AbstractNode implements IBigDataNode {
|
||||
IBigDataNode node = (IBigDataNode) incomingConnections.get(0).getSource();
|
||||
String requiredOutputType = node.getRequiredOutputType();
|
||||
return requiredOutputType != null ? requiredOutputType : node.getIncomingType();
|
||||
} else if (incomingConnections.get(0).getSource() instanceof MapperExternalNode) {
|
||||
MapperExternalNode node = (MapperExternalNode) incomingConnections.get(0).getSource();
|
||||
return node.getShouldGenerateDataset() ? "DATASET" : "KEYVALUE";
|
||||
} else {
|
||||
// We are on an external node => PairRDD
|
||||
// TODO Maybe on the futur we need to handle RDD or DataFrame, but this required a big refactoring
|
||||
@@ -100,6 +104,9 @@ public class BigDataNode extends AbstractNode implements IBigDataNode {
|
||||
IBigDataNode node = (IBigDataNode) outgoingConnections.get(0).getTarget();
|
||||
String requiredInputType = node.getRequiredInputType();
|
||||
return (requiredInputType != null && !node.isIdentity()) ? requiredInputType : node.getOutgoingType();
|
||||
} else if (outConnection.getTarget() instanceof MapperExternalNode) {
|
||||
MapperExternalNode node = (MapperExternalNode) outConnection.getTarget();
|
||||
return node.getShouldGenerateDataset() ? "DATASET" : "KEYVALUE";
|
||||
} else {
|
||||
// We are on an external node => PairRDD
|
||||
// TODO Maybe on the futur we need to handle RDD or DataFrame, but this required a big refactoring
|
||||
|
||||
@@ -20,8 +20,10 @@ package org.talend.core.model.process;
|
||||
*/
|
||||
public enum EParameterFieldType {
|
||||
TEXT,
|
||||
NUMBERLIMITTEXT,
|
||||
TEXT_AREA,
|
||||
PASSWORD,
|
||||
LICENSEKEY, // xqliu TDQ-17742
|
||||
MEMO_SQL,
|
||||
MEMO_PERL,
|
||||
MEMO_JAVA,
|
||||
|
||||
@@ -898,7 +898,8 @@ public final class ProcessUtils {
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(property.getItem());
|
||||
// route job
|
||||
if (itemType != null && (itemType.equals(ERepositoryObjectType.PROCESS_ROUTE)
|
||||
|| itemType.equals(ERepositoryObjectType.PROCESS_ROUTELET))) {
|
||||
|| itemType.equals(ERepositoryObjectType.PROCESS_ROUTELET)
|
||||
|| "CAMEL".equals(process.getComponentsType()))) {
|
||||
needBeans = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,8 @@ import org.talend.core.model.process.AbstractExternalNode;
|
||||
*/
|
||||
public abstract class MapperExternalNode extends AbstractExternalNode {
|
||||
|
||||
public boolean getShouldGenerateDataset() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1313,7 +1313,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
|
||||
|
||||
public boolean addExtraProducts(String[] productsArray) {
|
||||
if (productsArray != null && productsArray.length > 0) {
|
||||
if (this.products == null && this.products.length == 0) {
|
||||
if (this.products == null || this.products.length == 0) {
|
||||
this.products = productsArray;
|
||||
} else {
|
||||
String[] tmp = new String[this.products.length + productsArray.length];
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.core.model.routines;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@@ -31,9 +32,12 @@ import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.utils.resource.FileExtensions;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.ISVNProviderServiceInCoreRuntime;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.general.LibraryInfo;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
|
||||
/**
|
||||
* wchen class global comment. Detailled comment
|
||||
@@ -96,9 +100,12 @@ public class RoutineLibraryMananger {
|
||||
try {
|
||||
URL fileUrl = FileLocator.toFileURL(entry);
|
||||
if(fileUrl != null){
|
||||
if (!"file".equals(fileUrl.getProtocol())) throw new IllegalArgumentException();
|
||||
URI fileUri = new File(fileUrl.getFile()).toURI();
|
||||
libManagerService.deploy(fileUri);
|
||||
if (!"file".equals(fileUrl.getProtocol())) throw new IllegalArgumentException();
|
||||
File file = new File(fileUrl.getFile());
|
||||
if (needDeploy(fileUrl)) {
|
||||
URI fileUri = file.toURI();
|
||||
libManagerService.deploy(fileUri);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Cannot deploy: " + bundleName + path);
|
||||
@@ -114,6 +121,56 @@ public class RoutineLibraryMananger {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean needDeploy(URL fileUrl) throws IOException, Exception {
|
||||
File file = new File(fileUrl.getFile());
|
||||
ILibraryManagerService libManagerService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerService.class)) {
|
||||
libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
}
|
||||
if (libManagerService != null) {
|
||||
Map<String, String> sourceAndMavenUri = new HashMap<>();
|
||||
libManagerService.guessMavenRUIFromIndex(file, sourceAndMavenUri);
|
||||
String mavUri = null;
|
||||
boolean isSnapshot = false;
|
||||
for (String key : sourceAndMavenUri.keySet()) {
|
||||
if (sourceAndMavenUri.get(key).equals(file.getPath())) {
|
||||
mavUri = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mavUri == null) {
|
||||
return true;
|
||||
}
|
||||
final MavenArtifact parseMvnUrl = MavenUrlHelper.parseMvnUrl(mavUri);
|
||||
if (parseMvnUrl != null) {
|
||||
if (parseMvnUrl.getVersion() != null && parseMvnUrl.getVersion().endsWith(MavenConstants.SNAPSHOT)) {
|
||||
isSnapshot = true;
|
||||
}
|
||||
}
|
||||
TalendLibsServerManager manager = TalendLibsServerManager.getInstance();
|
||||
ArtifactRepositoryBean customNexusServer = manager.getCustomNexusServer();
|
||||
File jarFile = null;
|
||||
try {
|
||||
jarFile = libManagerService.resolveJar(customNexusServer, mavUri);
|
||||
} catch (Exception ex) {
|
||||
// Ignore here
|
||||
}
|
||||
boolean exist = (jarFile != null && jarFile.exists());
|
||||
if (exist) {
|
||||
if (isSnapshot) {
|
||||
boolean isSame = libManagerService.isSameFile(jarFile, file);
|
||||
if (!isSame) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map<String, List<LibraryInfo>> getRoutineAndJars() {
|
||||
if (routineAndJars == null) {
|
||||
routineAndJars = new HashMap<String, List<LibraryInfo>>();
|
||||
|
||||
@@ -12,14 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.nexus;
|
||||
|
||||
import java.net.Authenticator;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.net.Proxy;
|
||||
import java.net.Proxy.Type;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -37,9 +35,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.network.IProxySelectorProvider;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
import org.talend.commons.utils.network.TalendProxySelector.IProxySelectorProvider;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
@@ -167,7 +164,7 @@ public abstract class HttpClientTransport {
|
||||
}
|
||||
}
|
||||
|
||||
private IProxySelectorProvider addProxy(final DefaultHttpClient httpClient, URI requestURI) {
|
||||
public static IProxySelectorProvider addProxy(final DefaultHttpClient httpClient, URI requestURI) {
|
||||
IProxySelectorProvider proxySelectorProvider = null;
|
||||
try {
|
||||
if (Boolean.valueOf(System.getProperty(PROP_PROXY_HTTP_CLIENT_USE_DEFAULT_SETTINGS, Boolean.FALSE.toString()))) {
|
||||
@@ -185,10 +182,10 @@ public abstract class HttpClientTransport {
|
||||
}
|
||||
final Proxy finalProxy = usedProxy;
|
||||
InetSocketAddress address = (InetSocketAddress) finalProxy.address();
|
||||
String proxyServer = address.getHostName();
|
||||
String proxyServer = address.getHostString();
|
||||
int proxyPort = address.getPort();
|
||||
PasswordAuthentication proxyAuthentication = Authenticator.requestPasswordAuthentication(proxyServer,
|
||||
address.getAddress(), proxyPort, "Http Proxy", "Http proxy authentication", null);
|
||||
TalendProxySelector proxySelector = TalendProxySelector.getInstance();
|
||||
PasswordAuthentication proxyAuthentication = proxySelector.getHttpPasswordAuthentication();
|
||||
if (proxyAuthentication != null) {
|
||||
String proxyUser = proxyAuthentication.getUserName();
|
||||
if(StringUtils.isNotBlank(proxyUser)){
|
||||
@@ -203,7 +200,7 @@ public abstract class HttpClientTransport {
|
||||
}
|
||||
HttpHost proxyHost = new HttpHost(proxyServer, proxyPort);
|
||||
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxyHost);
|
||||
proxySelectorProvider = createProxySelectorProvider();
|
||||
proxySelectorProvider = proxySelector.createDefaultProxySelectorProvider();
|
||||
}
|
||||
return proxySelectorProvider;
|
||||
} finally {
|
||||
@@ -213,61 +210,12 @@ public abstract class HttpClientTransport {
|
||||
}
|
||||
}
|
||||
|
||||
private void removeProxy(IProxySelectorProvider proxySelectorProvider) {
|
||||
public static void removeProxy(IProxySelectorProvider proxySelectorProvider) {
|
||||
if (proxySelectorProvider != null) {
|
||||
TalendProxySelector.getInstance().removeProxySelectorProvider(proxySelectorProvider);
|
||||
}
|
||||
}
|
||||
|
||||
private IProxySelectorProvider createProxySelectorProvider() {
|
||||
IProxySelectorProvider proxySelectorProvider = new TalendProxySelector.AbstractProxySelectorProvider() {
|
||||
|
||||
private Thread currentThread = Thread.currentThread();
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(URI uri) {
|
||||
// return Collections.EMPTY_LIST;
|
||||
|
||||
List<Proxy> newProxys = new ArrayList<>();
|
||||
if (uri == null) {
|
||||
return newProxys;
|
||||
}
|
||||
String schema = uri.getScheme();
|
||||
if (schema != null && schema.toLowerCase().startsWith("socket")) { //$NON-NLS-1$
|
||||
try {
|
||||
URI newUri = new URI("https", uri.getUserInfo(), uri.getHost(), uri.getPort(), uri.getPath(),
|
||||
uri.getQuery(), uri.getFragment());
|
||||
List<Proxy> proxys = TalendProxySelector.getInstance().getDefaultProxySelector().select(newUri);
|
||||
if (proxys != null && !proxys.isEmpty()) {
|
||||
newProxys.addAll(proxys);
|
||||
} else {
|
||||
newUri = new URI("http", uri.getUserInfo(), uri.getHost(), uri.getPort(), uri.getPath(),
|
||||
uri.getQuery(), uri.getFragment());
|
||||
proxys = TalendProxySelector.getInstance().getDefaultProxySelector().select(newUri);
|
||||
if (proxys != null && !proxys.isEmpty()) {
|
||||
newProxys.addAll(proxys);
|
||||
}
|
||||
}
|
||||
} catch (URISyntaxException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return newProxys;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(URI uri) {
|
||||
if (Thread.currentThread() == currentThread) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
return proxySelectorProvider;
|
||||
}
|
||||
|
||||
public void processResponseCode(HttpResponse response) throws BusinessException {
|
||||
StatusLine statusLine = response.getStatusLine();
|
||||
int responseCode = statusLine.getStatusCode();
|
||||
|
||||
@@ -16,7 +16,9 @@ import java.io.File;
|
||||
import java.util.Dictionary;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.utils.sugars.TypedReturnCode;
|
||||
|
||||
/**
|
||||
* created by wchen on Jul 31, 2017 Detailled comment
|
||||
@@ -30,6 +32,8 @@ public interface IRepositoryArtifactHandler {
|
||||
|
||||
public boolean checkConnection();
|
||||
|
||||
public TypedReturnCode<HttpResponse> getConnectionResultAndCode();
|
||||
|
||||
public boolean checkConnection(boolean checkRelease, boolean checkSnapshot);
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,4 +29,6 @@ public class NexusConstants {
|
||||
public static final String SNAPSHOTS = "@snapshots";//$NON-NLS-1$
|
||||
|
||||
public static final String DISALLOW_RELEASES = "@noreleases";//$NON-NLS-1$
|
||||
|
||||
public static final String DYNAMIC_DISTRIBUTION = "https://talend-update.talend.com/nexus/content/groups/dynamicdistribution/";
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
|
||||
@@ -116,6 +117,49 @@ public class NexusServerUtils {
|
||||
}
|
||||
return status[0];
|
||||
}
|
||||
|
||||
public static HttpResponse getConnectionResponse(String nexusUrl, String repositoryId, final String userName,
|
||||
final String password) {
|
||||
if (StringUtils.isEmpty(nexusUrl) || StringUtils.isEmpty(repositoryId)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String newUrl = nexusUrl;
|
||||
if (newUrl.endsWith(NexusConstants.SLASH)) {
|
||||
newUrl = newUrl.substring(0, newUrl.length() - 1);
|
||||
}
|
||||
String urlToCheck = newUrl + NexusConstants.CONTENT_REPOSITORIES + repositoryId;
|
||||
|
||||
return getConnectionResponse(urlToCheck, userName, password);
|
||||
}
|
||||
|
||||
public static HttpResponse getConnectionResponse(String nexusURL, String username, String password) {
|
||||
if (StringUtils.isEmpty(nexusURL)) {
|
||||
return null;
|
||||
}
|
||||
final List<HttpResponse> httpResponse = new ArrayList<>();
|
||||
try {
|
||||
NullProgressMonitor monitor = new NullProgressMonitor();
|
||||
new HttpClientTransport(nexusURL, username, password) {
|
||||
|
||||
@Override
|
||||
protected HttpResponse execute(IProgressMonitor monitor, DefaultHttpClient httpClient, URI targetURI)
|
||||
throws Exception {
|
||||
httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, getTimeout());
|
||||
httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, getTimeout());
|
||||
HttpHead httpHead = new HttpHead(targetURI);
|
||||
HttpResponse response = httpClient.execute(httpHead);
|
||||
httpResponse.add(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}.doRequest(monitor, new URI(nexusURL));
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return httpResponse.get(0);
|
||||
}
|
||||
|
||||
public static List<MavenArtifact> search(String nexusUrl, String userName, String password, String repositoryId,
|
||||
String groupIdToSearch, String versionToSearch) throws Exception {
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.nexus;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
@@ -21,6 +22,8 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
@@ -31,6 +34,8 @@ import org.talend.repository.model.RepositoryConstants;
|
||||
*/
|
||||
public class TalendLibsServerManager {
|
||||
|
||||
private ProjectPreferenceManager prefManager;
|
||||
|
||||
public static final String KEY_LIB_REPO_URL = "org.talend.libraries.repo.url";
|
||||
|
||||
private static String NEXUS_USER = "nexus.user";
|
||||
@@ -63,6 +68,18 @@ public class TalendLibsServerManager {
|
||||
|
||||
public static final String TALEND_LIB_SERVER = "https://talend-update.talend.com/nexus/";//$NON-NLS-1$
|
||||
|
||||
public static final String NEXUS_PROXY_URL = "nexus.proxy.url";
|
||||
|
||||
public static final String NEXUS_PROXY_TYPE = "nexus.proxy.type";
|
||||
|
||||
public static final String NEXUS_PROXY_USERNAME = "nexus.proxy.username";
|
||||
|
||||
public static final String NEXUS_PROXY_PASSWORD = "nexus.proxy.password";
|
||||
|
||||
public static final String NEXUS_PROXY_REPOSITORY_ID = "nexus.proxy.repository.id";
|
||||
|
||||
public static final String ENABLE_PROXY_SETTING = "nexus.proxy.enable";
|
||||
|
||||
public static final String TALEND_LIB_USER = "";//$NON-NLS-1$
|
||||
|
||||
public static final String TALEND_LIB_PASSWORD = "";//$NON-NLS-1$
|
||||
@@ -165,14 +182,83 @@ public class TalendLibsServerManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Check user library connection with the setting from remote administrator
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean canConnectUserLibrary() {
|
||||
boolean canConnect = false;
|
||||
IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
|
||||
RepositoryContext repositoryContext = factory.getRepositoryContext();
|
||||
try {
|
||||
if (repositoryContext != null && repositoryContext.getFields() != null && !factory.isLocalConnectionProvider()
|
||||
&& !repositoryContext.isOffline()) {
|
||||
String adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
String userName = null;
|
||||
String password = null;
|
||||
User user = repositoryContext.getUser();
|
||||
if (user != null) {
|
||||
userName = user.getLogin();
|
||||
password = repositoryContext.getClearPassword();
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(adminUrl) && StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(password)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService remoteService = (IRemoteService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRemoteService.class);
|
||||
ArtifactRepositoryBean bean = remoteService.getLibNexusServer(userName, password, adminUrl);
|
||||
if (bean != null) {
|
||||
IRepositoryArtifactHandler handler = RepositoryArtifactHandlerManager.getRepositoryHandler(bean);
|
||||
if (handler.checkConnection()) {
|
||||
canConnect = true;
|
||||
} else {
|
||||
ExceptionHandler.process(new Throwable(Messages.getString(
|
||||
"TalendLibsServerManager.connectUserLibraryFailureMessage", bean.getServer()))); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return canConnect;
|
||||
}
|
||||
|
||||
public ArtifactRepositoryBean getTalentArtifactServer() {
|
||||
ArtifactRepositoryBean serverBean = new ArtifactRepositoryBean();
|
||||
serverBean.setServer(System.getProperty(KEY_LIB_REPO_URL, TALEND_LIB_SERVER));
|
||||
serverBean.setUserName(TALEND_LIB_USER);
|
||||
serverBean.setPassword(TALEND_LIB_PASSWORD);
|
||||
serverBean.setRepositoryId(TALEND_LIB_REPOSITORY);
|
||||
// get from ini file first
|
||||
String url = System.getProperty(NEXUS_PROXY_URL);
|
||||
if (StringUtils.isNotEmpty(url)) {
|
||||
serverBean.setServer(System.getProperty(NEXUS_PROXY_URL));
|
||||
serverBean.setUserName(System.getProperty(NEXUS_PROXY_USERNAME));
|
||||
serverBean.setPassword(System.getProperty(NEXUS_PROXY_PASSWORD));
|
||||
serverBean.setRepositoryId(System.getProperty(NEXUS_PROXY_REPOSITORY_ID));
|
||||
serverBean.setType(System.getProperty(NEXUS_PROXY_TYPE));
|
||||
}
|
||||
// if not set in ini file ,get from project setting
|
||||
boolean hasProxySetting = StringUtils.isNotEmpty(serverBean.getServer());
|
||||
if (!hasProxySetting) {
|
||||
prefManager = new ProjectPreferenceManager("org.talend.proxy.nexus", true);
|
||||
boolean enableProxyFlag = prefManager.getBoolean(TalendLibsServerManager.ENABLE_PROXY_SETTING);
|
||||
if (enableProxyFlag) {
|
||||
serverBean.setServer(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_URL));
|
||||
serverBean.setUserName(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_USERNAME));
|
||||
serverBean.setPassword(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD));
|
||||
serverBean.setRepositoryId(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_REPOSITORY_ID));
|
||||
serverBean.setType(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_TYPE));
|
||||
}
|
||||
}
|
||||
hasProxySetting = StringUtils.isNotEmpty(serverBean.getServer());
|
||||
// use default
|
||||
if (!hasProxySetting) {
|
||||
serverBean.setServer(TALEND_LIB_SERVER);
|
||||
serverBean.setUserName(TALEND_LIB_USER);
|
||||
serverBean.setPassword(TALEND_LIB_PASSWORD);
|
||||
serverBean.setRepositoryId(TALEND_LIB_REPOSITORY);
|
||||
}
|
||||
serverBean.setOfficial(true);
|
||||
|
||||
return serverBean;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.service.cm.ManagedService;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.network.IProxySelectorProvider;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
|
||||
/**
|
||||
@@ -102,10 +105,25 @@ public class TalendMavenResolver {
|
||||
}
|
||||
|
||||
public static File resolve(String mvnUri) throws IOException {
|
||||
TalendProxySelector selectorInstance = null;
|
||||
IProxySelectorProvider proxySelector = null;
|
||||
try {
|
||||
try {
|
||||
selectorInstance = TalendProxySelector.getInstance();
|
||||
proxySelector = selectorInstance.createDefaultProxySelectorProvider();
|
||||
if (proxySelector != null) {
|
||||
selectorInstance.addProxySelectorProvider(proxySelector);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return getMavenResolver().resolve(mvnUri);
|
||||
} catch (IOException e) {
|
||||
throw ResolverExceptionHandler.hideCredential(e);
|
||||
} finally {
|
||||
if (proxySelector != null && selectorInstance != null) {
|
||||
selectorInstance.removeProxySelectorProvider(proxySelector);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user