Compare commits
203 Commits
hwang/TUP-
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54a9bcccc1 | ||
|
|
514db2fb49 | ||
|
|
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 | ||
|
|
9b9d44f62d | ||
|
|
4f2f4ad5ed | ||
|
|
31e63d367a | ||
|
|
374ef473cd | ||
|
|
39fe107d2b | ||
|
|
655418754a | ||
|
|
bd38f3bb24 | ||
|
|
96a90bc9d4 | ||
|
|
a89a694105 | ||
|
|
c70c995827 | ||
|
|
bc82ca517e | ||
|
|
2c07f47523 | ||
|
|
668fd255c2 | ||
|
|
755fed6f00 | ||
|
|
66c3ce0a83 | ||
|
|
4236b866da | ||
|
|
cbf672ed2c | ||
|
|
01923b38ab | ||
|
|
d530c609b8 | ||
|
|
570338e9ff | ||
|
|
03958a67cb | ||
|
|
bc0926739b | ||
|
|
36f4c0eff3 | ||
|
|
22654e6d4b | ||
|
|
4072bd93e9 | ||
|
|
c4cc17db4d | ||
|
|
c0dc58d18a | ||
|
|
1d266d5488 | ||
|
|
15216b8be3 | ||
|
|
1f385ee333 | ||
|
|
0e4cd386dc | ||
|
|
17d96e1fa5 | ||
|
|
f1ec81bced | ||
|
|
2bcd3b2050 | ||
|
|
132eb3fa3a | ||
|
|
b94b99f1c8 | ||
|
|
64083d1e2e | ||
|
|
7b21c010e2 | ||
|
|
3d08e7a41c | ||
|
|
107c52119a | ||
|
|
992e01de37 | ||
|
|
5bdc4ceef7 | ||
|
|
d2eaeb7b97 | ||
|
|
a53ffdfbf4 | ||
|
|
dc92855b54 | ||
|
|
e8d1ce17d0 | ||
|
|
ba19f14fc9 | ||
|
|
1a73160d6b | ||
|
|
6efbc76223 | ||
|
|
2aae24829a | ||
|
|
ea091c2cda | ||
|
|
ef5869370d | ||
|
|
dfc277d886 | ||
|
|
7a75fdc057 | ||
|
|
f4ecdf00c6 | ||
|
|
3ab6dc8441 | ||
|
|
f6903ae6d6 | ||
|
|
c05f0c4518 | ||
|
|
00837db7bf | ||
|
|
667fbf90ad | ||
|
|
17a34e40ac | ||
|
|
80484dc111 | ||
|
|
3cd8ee2958 | ||
|
|
5d75d89161 | ||
|
|
a518891e99 | ||
|
|
a26002f9a2 | ||
|
|
bea0b2a13b | ||
|
|
020d7af9fe | ||
|
|
12649f7a3d | ||
|
|
e9b5ce029d | ||
|
|
94f5432d89 | ||
|
|
bd26e3e912 | ||
|
|
73a2bdc6ec | ||
|
|
14b6b30d43 | ||
|
|
6e4b940576 | ||
|
|
c8ba22bde9 | ||
|
|
02d9f42f8c | ||
|
|
adaf9f3f96 | ||
|
|
03944cda7e | ||
|
|
7cb53dd732 | ||
|
|
cdbee411a0 | ||
|
|
085bc038a2 | ||
|
|
666e9060fb | ||
|
|
7de7c1c24a | ||
|
|
faa61885aa | ||
|
|
5f31fe7286 | ||
|
|
57c6b45cf0 | ||
|
|
624c33c8ce | ||
|
|
a2847353fa | ||
|
|
e5306d1924 | ||
|
|
6ee8a1c151 | ||
|
|
d826efb9e9 | ||
|
|
5ea77ef738 | ||
|
|
804d715dec | ||
|
|
5dc7a930db | ||
|
|
8f9a411c43 | ||
|
|
92fda0840e | ||
|
|
17abd3cff4 | ||
|
|
6f6943a58f | ||
|
|
8a73c53a82 | ||
|
|
15396b7aa2 | ||
|
|
3e1101aebd | ||
|
|
7dd62f1758 | ||
|
|
5d20f69fb6 | ||
|
|
85a78d76b9 | ||
|
|
d26568a1f0 | ||
|
|
160da94c84 | ||
|
|
9d3b31a842 | ||
|
|
176e4b3f64 | ||
|
|
0e4896e7f9 | ||
|
|
c907379c7b | ||
|
|
125546f661 | ||
|
|
06112e76e2 | ||
|
|
8648d38ee5 | ||
|
|
f0d02b4be9 | ||
|
|
475dc1b0f4 | ||
|
|
66203e0497 | ||
|
|
47391d8c10 | ||
|
|
06a591b004 | ||
|
|
6edb8fbcd0 | ||
|
|
4583b8cb4c | ||
|
|
42ea72df1b | ||
|
|
b6d46c501b | ||
|
|
85f5299f5e | ||
|
|
764d39dd8a | ||
|
|
97a8f63e69 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.common.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.crypto.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</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
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -21,29 +21,23 @@ import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.talend.utils.security.AESEncryption;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* DOC chuang class global comment. Detailled comment
|
||||
*/
|
||||
public class PasswordEncryptUtil {
|
||||
|
||||
public static String ENCRYPT_KEY = "Encrypt"; //$NON-NLS-1$
|
||||
|
||||
private static String rawKey = "Talend-Key"; //$NON-NLS-1$
|
||||
|
||||
public static String PREFIX_PASSWORD = "ENC:["; //$NON-NLS-1$
|
||||
|
||||
public static String POSTFIX_PASSWORD = "]"; //$NON-NLS-1$
|
||||
public static final String ENCRYPT_KEY = "Encrypt"; //$NON-NLS-1$
|
||||
|
||||
private static SecretKey key = null;
|
||||
|
||||
private static SecureRandom secureRandom = new SecureRandom();
|
||||
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);
|
||||
@@ -65,7 +59,7 @@ public class PasswordEncryptUtil {
|
||||
|
||||
SecretKey key = getSecretKey();
|
||||
Cipher c = Cipher.getInstance("DES"); //$NON-NLS-1$
|
||||
c.init(Cipher.ENCRYPT_MODE, key, secureRandom);
|
||||
c.init(Cipher.ENCRYPT_MODE, key, SECURERANDOM);
|
||||
byte[] cipherByte = c.doFinal(input.getBytes());
|
||||
String dec = new String(Base64.encodeBase64(cipherByte));
|
||||
return dec;
|
||||
@@ -85,7 +79,7 @@ public class PasswordEncryptUtil {
|
||||
byte[] dec = Base64.decodeBase64(input.getBytes());
|
||||
SecretKey key = getSecretKey();
|
||||
Cipher c = Cipher.getInstance("DES"); //$NON-NLS-1$
|
||||
c.init(Cipher.DECRYPT_MODE, key, secureRandom);
|
||||
c.init(Cipher.DECRYPT_MODE, key, SECURERANDOM);
|
||||
byte[] clearByte = c.doFinal(dec);
|
||||
return new String(clearByte);
|
||||
}
|
||||
@@ -99,7 +93,7 @@ public class PasswordEncryptUtil {
|
||||
if (input == null) {
|
||||
return input;
|
||||
}
|
||||
return PREFIX_PASSWORD + AESEncryption.encryptPassword(input) + POSTFIX_PASSWORD;
|
||||
return StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.ROUTINE).encrypt(input);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -192,6 +193,27 @@ public class VersionUtils {
|
||||
return talendVersion;
|
||||
}
|
||||
|
||||
public static String getTalendPureVersion(String fullProductVersion) {
|
||||
String version = fullProductVersion;
|
||||
String[] splitStr = fullProductVersion.split("-"); //$NON-NLS-1$
|
||||
Pattern pattern = Pattern.compile("((\\d+\\.){2}\\d.*)"); //$NON-NLS-1$
|
||||
StringBuffer versionStr = new StringBuffer();
|
||||
boolean find = false;
|
||||
for (String str : splitStr) {
|
||||
if (find) {
|
||||
versionStr.append("-").append(str); //$NON-NLS-1$
|
||||
}else {
|
||||
Matcher matcher = pattern.matcher(str);
|
||||
if (matcher.find()) {
|
||||
find = true;
|
||||
versionStr.append(str); // $NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return getTalendVersion(versionStr.toString());
|
||||
}
|
||||
|
||||
public static String getTalendVersion(String productVersion) {
|
||||
try {
|
||||
org.osgi.framework.Version v = new org.osgi.framework.Version(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,9 +49,10 @@ 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.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
|
||||
@@ -63,9 +64,36 @@ 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.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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -136,3 +136,4 @@ ArchiveDirectoryChooser.DataTransfer_browse=B&rowse...
|
||||
ArchiveDirectoryChooser.WizardProjectsImportPage_ArchiveSelectTitle=Select &archive file:
|
||||
ArchiveDirectoryChooser.FileExport_selectDestinationMessage=Select a directory to export to.
|
||||
ArchiveDirectoryChooser.ArchiveExport_description=Export resources to an archive file on the local file system.
|
||||
DisplayUtils.NotSupportedExceptionOnLinux=Linux/Unit doesn't support multiple display.
|
||||
|
||||
@@ -20,6 +20,8 @@ import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.i18n.Messages;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
|
||||
/**
|
||||
* Utility methods to work with Display object
|
||||
@@ -128,6 +130,13 @@ public class DisplayUtils {
|
||||
}
|
||||
|
||||
public static void syncExecInNewUIThread(Runnable runnable, DeviceData deviceData) throws Exception {
|
||||
/**
|
||||
* Linux doesn't allow creating a display instance in a new thread after upgrading eclipse platform 4.10, we can
|
||||
* remove this check if future eclipse version support it again
|
||||
*/
|
||||
if (EnvironmentUtils.isLinuxUnixSystem()) {
|
||||
throw new UnsupportedOperationException(Messages.getString("DisplayUtils.NotSupportedExceptionOnLinux"));//$NON-NLS-1$
|
||||
}
|
||||
final Semaphore semaphore = new Semaphore(1, true);
|
||||
semaphore.acquire();
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.ScrollBar;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
@@ -111,7 +112,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
*/
|
||||
@Override
|
||||
protected void execute(final boolean isFinalExecution, Object data) {
|
||||
drawableComposite.getBgDrawableComposite().getDisplay().syncExec(new Runnable() {
|
||||
Display.getDefault().syncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
if (isFinalExecution) {
|
||||
@@ -339,7 +340,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
}
|
||||
if ((WindowSystem.isGTK() || EnvironmentUtils.isMacOsSytem()) && child instanceof Tree) {
|
||||
returnedPoint.y += ((Tree) child).getHeaderHeight();
|
||||
returnedPoint.y += ((Table) child).getItemHeight();
|
||||
returnedPoint.y += ((Tree) child).getItemHeight();
|
||||
}
|
||||
child = child.getParent();
|
||||
ScrollBar vScrollBar = child.getVerticalBar();
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.TreeItem;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.utils.TableUtils;
|
||||
import org.talend.commons.ui.runtime.ws.WindowSystem;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.AbstractDataTableEditorView;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBackgroundRefresher;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
|
||||
import org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink;
|
||||
@@ -464,4 +465,19 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
}
|
||||
}
|
||||
|
||||
protected <B> void loadItemDataForLazyLoad(AbstractDataTableEditorView<B> tableEditorView) {
|
||||
if (!tableEditorView.getTableViewerCreator().isLazyLoad()) {
|
||||
return;
|
||||
}
|
||||
List<B> beansList = tableEditorView.getExtendedTableModel().getBeansList();
|
||||
Table table = tableEditorView.getTable();
|
||||
for (TableItem tableItem : table.getItems()) {
|
||||
if (tableItem.getData() == null) {
|
||||
int index = table.indexOf(tableItem);
|
||||
B schemaTarget = beansList.get(index);
|
||||
tableItem.setData(schemaTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -212,4 +212,5 @@ RenameFolderAction.warning.cannotFind.message=Cannot rename folder, it may have
|
||||
RenameFolderAction.warning.cannotFind.title=Action not available
|
||||
|
||||
ConvertJobsUtil.warning.title=Warning
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Create stats log and implicit parameters
|
||||
@@ -2,12 +2,25 @@ package org.talend.core.repository.logintask;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.eclipse.core.resources.IResourceRuleFactory;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.ProjectDataJsonProvider;
|
||||
import org.talend.login.AbstractLoginTask;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
|
||||
public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnableWithProgress {
|
||||
|
||||
@@ -20,7 +33,38 @@ public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnab
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||
coreService.createStatsLogAndImplicitParamter(ProjectManager.getInstance().getCurrentProject());
|
||||
try {
|
||||
if (ProjectDataJsonProvider.hasFilledProjectSettingFile(ProjectManager.getInstance().getCurrentProject())) {
|
||||
return;
|
||||
}
|
||||
} catch (PersistenceException e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
return;
|
||||
}
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(
|
||||
new RepositoryWorkUnit<Void>(Messages.getString("SyncLibrariesLoginTask.createStatsLogAndImplicitParamter")) {
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
try {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IResourceRuleFactory ruleFactory = workspace.getRuleFactory();
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
ISchedulingRule refreshRule = ruleFactory.refreshRule(
|
||||
projectManager.getResourceProject(projectManager.getCurrentProject().getEmfProject()));
|
||||
workspace.run(new IWorkspaceRunnable() {
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
coreService
|
||||
.createStatsLogAndImplicitParamter(ProjectManager.getInstance().getCurrentProject());
|
||||
}
|
||||
}, refreshRule, IWorkspace.AVOID_UPDATE, monitor);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -406,6 +406,38 @@ public class ProjectDataJsonProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean hasFilledProjectSettingFile(org.talend.core.model.general.Project project) throws PersistenceException {
|
||||
FileInputStream InputStream = null;
|
||||
boolean hasFilled = false;
|
||||
try {
|
||||
IProject physProject = ResourceUtils.getProject(project);
|
||||
IPath location = physProject.getLocation();
|
||||
File file = ProjectDataJsonProvider.getLoadingConfigurationFile(location, FileConstants.PROJECTSETTING_FILE_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
InputStream = new FileInputStream(file);
|
||||
ProjectSettings projectSetting = new ObjectMapper().readValue(new FileInputStream(file), ProjectSettings.class);
|
||||
if (projectSetting != null) {
|
||||
ImplicitContextSettingJson implicitContextSettingJson = projectSetting.getImplicitContextSettingJson();
|
||||
if (implicitContextSettingJson != null) {
|
||||
ParametersTypeJson parametersTypeJson = implicitContextSettingJson.getParametersTypeJson();
|
||||
if (parametersTypeJson != null) {
|
||||
List<ElementParameterTypeJson> elementParameters = parametersTypeJson.getElementParameters();
|
||||
if (elementParameters.size() > 0) {
|
||||
hasFilled = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
throw new PersistenceException(e1);
|
||||
} finally {
|
||||
closeInputStream(InputStream);
|
||||
}
|
||||
return hasFilled;
|
||||
}
|
||||
|
||||
protected static ImplicitContextSettingJson getImplicitContextSettingJson(ImplicitContextSettings implicitContextSettings) {
|
||||
if (implicitContextSettings != null) {
|
||||
ImplicitContextSettingJson implicitContextSettingJson = new ImplicitContextSettingJson(implicitContextSettings);
|
||||
|
||||
@@ -131,4 +131,22 @@ public class ProjectHelper {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* define the different value for the project types the string value in the licence files Matcht the java enum name
|
||||
* this is a copy of org.talend.commons.model.KeyConstants.ProjectType to avoid adding the all library
|
||||
*
|
||||
*/
|
||||
public static enum ProjectType {
|
||||
DI,
|
||||
DQ,
|
||||
MDM;
|
||||
}
|
||||
|
||||
public static int getProjectTypeOrdinal(org.talend.core.model.properties.Project project) {
|
||||
if (project != null && project.getType() != null) {
|
||||
return ProjectType.valueOf(project.getType()).ordinal();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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-SNAPSHOT</version>
|
||||
<version>7.3.1-M5</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.utils.IXSDPopulationUtil;
|
||||
@@ -47,6 +50,8 @@ public interface IESBService extends IService {
|
||||
|
||||
public StringBuffer getAllTheJObNames(IRepositoryNode jobList);
|
||||
|
||||
public List<String> getSerivceRelatedJobIds(Item serviceItem);
|
||||
|
||||
public void deleteOldRelation(String jobID);
|
||||
|
||||
// public void setSelectedItem(Item, )
|
||||
@@ -59,6 +64,8 @@ public interface IESBService extends IService {
|
||||
|
||||
public void copyDataServiceRelateJob(Item newItem);
|
||||
|
||||
public boolean isRESTService(ProcessItem processItem);
|
||||
|
||||
public IXSDPopulationUtil getXSDPopulationUtil();
|
||||
|
||||
public boolean isWSDLEditor(IWorkbenchPart part);
|
||||
|
||||
@@ -89,6 +89,8 @@ public interface ILibraryManagerService extends IService {
|
||||
* @return
|
||||
*/
|
||||
public boolean retrieve(String jarNeeded, String pathToStore, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(String jarNeeded, String jarURL, String pathToStore, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(String jarNeeded, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -206,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);
|
||||
|
||||
}
|
||||
|
||||
@@ -210,4 +210,9 @@ public interface ITDQRepositoryService extends IService {
|
||||
* @param ruManager: RepositoryUpdateManager
|
||||
*/
|
||||
void updateAllContextInAnalysisAndReport(RepositoryUpdateManager ruManager, Object parameter, boolean isUpdated);
|
||||
|
||||
/**
|
||||
* @param chooseContext the context name which want to swtich
|
||||
*/
|
||||
void popupSwitchContextFailedMessage(String chooseContext);
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ public class ClassLoaderFactory {
|
||||
String jarsStr = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
|
||||
moduleList = jarsStr.split(";"); //$NON-NLS-1$
|
||||
} else {
|
||||
String index = getDistributionIndex(metadataConn); //$NON-NLS-1$
|
||||
String index = getDistributionIndex(metadataConn);
|
||||
moduleList = getDriverModuleList(index);
|
||||
}
|
||||
return moduleList;
|
||||
@@ -365,39 +365,41 @@ public class ClassLoaderFactory {
|
||||
return hdClassLoader;
|
||||
}
|
||||
|
||||
private static synchronized IConfigurationElement[] getConfigurationElements() {
|
||||
if (isCacheChanged()) {
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
}
|
||||
private static IConfigurationElement[] getConfigurationElements() {
|
||||
checkCache();
|
||||
return configurationElements;
|
||||
}
|
||||
|
||||
private static boolean isCacheChanged() {
|
||||
if (classLoadersMap == null) {
|
||||
return true;
|
||||
}
|
||||
if (configurationElements == null) {
|
||||
return true;
|
||||
}
|
||||
private synchronized static void checkCache() {
|
||||
boolean isCacheChanged = false;
|
||||
if (configurationElements != null) {
|
||||
for (IConfigurationElement configElement : configurationElements) {
|
||||
if (!configElement.isValid()) {
|
||||
return true;
|
||||
isCacheChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cacheVersion != null && !cacheVersion.equals(BigDataBasicUtil.getDynamicDistributionCacheVersion())) {
|
||||
return true;
|
||||
if (!StringUtils.equals(cacheVersion, BigDataBasicUtil.getDynamicDistributionCacheVersion())) {
|
||||
isCacheChanged = true;
|
||||
}
|
||||
if (isCacheChanged) {
|
||||
init();
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
cacheVersion = BigDataBasicUtil.getDynamicDistributionCacheVersion();
|
||||
} else {
|
||||
if (classLoadersMap == null) {
|
||||
init();
|
||||
}
|
||||
if (configurationElements == null) {
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Map<String, DynamicClassLoader> getClassLoaderMap() {
|
||||
if (isCacheChanged()) {
|
||||
init();
|
||||
cacheVersion = BigDataBasicUtil.getDynamicDistributionCacheVersion();
|
||||
}
|
||||
checkCache();
|
||||
return classLoadersMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -107,7 +107,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9.X", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -164,11 +164,11 @@ public enum EDatabaseVersion4Drivers {
|
||||
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.20.1043.jar")), //$NON-NLS-1$
|
||||
"redshift-jdbc42-no-awssdk-1.2.32.1056.jar")), //$NON-NLS-1$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.20.1043.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.9.5.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.32.1056.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.9.9.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar", "commons-codec-1.6.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -60,6 +60,15 @@ public interface IComponent {
|
||||
|
||||
public String getOriginalName();
|
||||
|
||||
/**
|
||||
* Only for component display (palette,search)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default public String getDisplayName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
public String getLongName();
|
||||
|
||||
public String getOriginalFamilyName();
|
||||
|
||||
@@ -98,6 +98,15 @@ public class JobContext implements IContext, Cloneable {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean containsSameParameterIgnoreCase(String parameterName) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
if (contextParam.getName() != null && contextParam.getName().equalsIgnoreCase(parameterName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Commented by Marvin Wang on Mar.2, 2012, the user who invokes the method should notice that if the
|
||||
* <code>JobContext</code> has more than one <code>ContextParameter</code>s which names are same, this case will
|
||||
|
||||
@@ -29,5 +29,4 @@ public interface INexusService extends IService {
|
||||
|
||||
ArtifactRepositoryBean getPublishNexusServerBean(String repositoryId);
|
||||
|
||||
ArtifactRepositoryBean getArtifactRepositoryFromServer();
|
||||
}
|
||||
|
||||
@@ -54,8 +54,6 @@ public interface IMetadataTable {
|
||||
public List<IMetadataColumn> getListColumns();
|
||||
|
||||
public List<IMetadataColumn> getListColumns(boolean withUnselected);
|
||||
|
||||
public List<IMetadataColumn> getListColumns(boolean withUnselected, boolean isCopyTable);
|
||||
|
||||
public void setListColumns(List<IMetadataColumn> listColumns);
|
||||
|
||||
|
||||
@@ -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$
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -130,9 +130,9 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
return getListColumns(false);
|
||||
// return this.listColumns;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected, boolean isCopyTable) {
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected) {
|
||||
Iterator<IMetadataColumn> it = this.listColumns.iterator();
|
||||
while (it.hasNext()) {
|
||||
IMetadataColumn column = it.next();
|
||||
@@ -153,7 +153,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();
|
||||
temp.addAll(this.listColumns);
|
||||
temp.addAll(this.unusedColumns);
|
||||
if (originalColumns != null && isRepository && !isCopyTable) {
|
||||
if (originalColumns != null && isRepository) {
|
||||
Collections.sort(temp, new Comparator<IMetadataColumn>() {
|
||||
|
||||
@Override
|
||||
@@ -169,11 +169,6 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
return this.listColumns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected) {
|
||||
return getListColumns(withUnselected, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDynamicSchema() {
|
||||
return getDynamicColumn() != null;
|
||||
@@ -257,8 +252,8 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
if (!(input instanceof IMetadataTable)) {
|
||||
return false;
|
||||
}
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true, true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true, true);
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true);
|
||||
if (thisColumnListWithUnselected == null) {
|
||||
if (inputColumnListWithUnselected != null) {
|
||||
return false;
|
||||
|
||||
@@ -585,17 +585,12 @@ public final class MetadataToolHelper {
|
||||
|
||||
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
|
||||
boolean avoidUsedColumnsFromInput) {
|
||||
copyTable(source, target, targetDbms, avoidUsedColumnsFromInput, false);
|
||||
}
|
||||
|
||||
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
|
||||
boolean avoidUsedColumnsFromInput, boolean withCustoms) {
|
||||
if (source == null || target == null) {
|
||||
return;
|
||||
}
|
||||
List<IMetadataColumn> columnsToRemove = new ArrayList<IMetadataColumn>();
|
||||
List<String> readOnlycolumns = new ArrayList<String>();
|
||||
for (IMetadataColumn column : target.getListColumns(true, true)) {
|
||||
for (IMetadataColumn column : target.getListColumns(true)) {
|
||||
if (!column.isCustom()) {
|
||||
columnsToRemove.add(column);
|
||||
}
|
||||
@@ -607,9 +602,9 @@ public final class MetadataToolHelper {
|
||||
target.getListUnusedColumns().removeAll(columnsToRemove);
|
||||
|
||||
List<IMetadataColumn> columnsTAdd = new ArrayList<IMetadataColumn>();
|
||||
for (IMetadataColumn column : source.getListColumns(!avoidUsedColumnsFromInput, true)) {
|
||||
for (IMetadataColumn column : source.getListColumns(!avoidUsedColumnsFromInput)) {
|
||||
IMetadataColumn targetColumn = target.getColumn(column.getLabel());
|
||||
IMetadataColumn newTargetColumn = column.clone(withCustoms);
|
||||
IMetadataColumn newTargetColumn = column.clone();
|
||||
if (targetColumn == null) {
|
||||
columnsTAdd.add(newTargetColumn);
|
||||
newTargetColumn
|
||||
@@ -674,7 +669,7 @@ public final class MetadataToolHelper {
|
||||
List<IMetadataColumn> targetColumns = target.getListColumns();
|
||||
List<String> temp = new ArrayList<String>(tColumns);
|
||||
if (targetColumns != null) {
|
||||
List<String> columnNames = new ArrayList<String>();
|
||||
final List<String> columnNames = new ArrayList<String>();
|
||||
for(IMetadataColumn column : targetColumns){
|
||||
columnNames.add(column.getLabel());
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ public class ComponentToRepositoryProperty {
|
||||
// impossible to use OCI in oracle
|
||||
IElementParameter elementParameter = node.getElementParameter("CONNECTION_TYPE"); //$NON-NLS-1$
|
||||
if (elementParameter != null) {
|
||||
if ("ORACLE_OCI".equals(elementParameter.getValue())) { //$NON-NLS-1$
|
||||
if ("ORACLE_WALLET".equals(elementParameter.getValue())) { //$NON-NLS-1$
|
||||
Shell shell = Display.getCurrent().getActiveShell();
|
||||
String title = Messages.getString("ComponentToRepositoryProperty.error"); //$NON-NLS-1$
|
||||
String message = Messages.getString("ComponentToRepositoryProperty.ImpossibleUseOCI"); //$NON-NLS-1$
|
||||
String message = Messages.getString("ComponentToRepositoryProperty.ImpossibleUseWALLET"); //$NON-NLS-1$
|
||||
MessageDialog.openError(shell, title, message);
|
||||
return false;
|
||||
}
|
||||
@@ -503,6 +503,10 @@ public class ComponentToRepositoryProperty {
|
||||
parameter = node.getElementParameter("CONNECTION_TYPE"); //$NON-NLS-1$
|
||||
// if ("ORACLE_OCI".equals(parameter.getValue())) {
|
||||
// }
|
||||
if ("ORACLE_OCI".equals(parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.ORACLE_OCI.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.ORACLE_OCI.getProduct());
|
||||
}
|
||||
|
||||
if ("ORACLE_SERVICE_NAME".equals(parameter.getValue()) || "service_name".equals(parameter.getValue())) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
connection.setDatabaseType(EDatabaseTypeName.ORACLESN.getDisplayName());
|
||||
@@ -510,7 +514,8 @@ public class ComponentToRepositoryProperty {
|
||||
} else if ("ORACLE_SID".equals(parameter.getValue()) || "sid".equals(parameter.getValue())) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
connection.setDatabaseType(EDatabaseTypeName.ORACLEFORSID.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.ORACLESN.getProduct());
|
||||
} else if ("ORACLE_CUSTOM".equals(parameter.getValue()) || "rac".equals(parameter.getValue())) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} else if ("ORACLE_CUSTOM".equals(parameter.getValue()) || "rac".equals(parameter.getValue()) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|| "ORACLE_RAC".equals(parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.ORACLE_CUSTOM.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.ORACLESN.getProduct());
|
||||
}
|
||||
@@ -668,6 +673,12 @@ public class ComponentToRepositoryProperty {
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLESN.getDisplayName())) {
|
||||
setDatabaseValueForOracleSeverName(connection, node, param);
|
||||
}
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLE_CUSTOM.getDisplayName())) {
|
||||
setDatabaseValueForOracleCustom(connection, node, param);
|
||||
}
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLE_OCI.getDisplayName())) {
|
||||
setDatabaseValueForOracleOci(connection, node, param);
|
||||
}
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ACCESS.getDisplayName())) {
|
||||
setDatabaseValueForAccess(connection, node, param);
|
||||
}
|
||||
@@ -683,6 +694,9 @@ public class ComponentToRepositoryProperty {
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.PSQL.getDisplayName())) {
|
||||
setDatabaseValueForPSQL(connection, node, param);
|
||||
}
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.PLUSPSQL.getDisplayName())) {
|
||||
setDatabaseValueForPLUSPSQL(connection, node, param);
|
||||
}
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.SYBASEASE.getDisplayName())
|
||||
|| connection.getDatabaseType().equals(EDatabaseTypeName.SYBASEIQ.getDisplayName())) {
|
||||
setDatabaseValueForSysbase(connection, node, param);
|
||||
@@ -699,6 +713,11 @@ public class ComponentToRepositoryProperty {
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
|
||||
setDatabaseValueForJdbc(connection, node, param);
|
||||
}
|
||||
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.MSSQL.getDisplayName())) {
|
||||
setDatabaseValueForMSSql(connection, node, param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -756,6 +775,53 @@ public class ComponentToRepositoryProperty {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setDatabaseValueForOracleCustom(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
String dbVersionName = EDatabaseVersion4Drivers.getDbVersionName(EDatabaseTypeName.ORACLE_CUSTOM, value);
|
||||
if (value != null) {
|
||||
connection.setDbVersionString(dbVersionName);
|
||||
}
|
||||
}
|
||||
if ("SID".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
if (param != null && "ORACLE_OCI".equals(param.getValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, node.getElementParameter("LOCAL_SERVICE_NAME")); //$NON-NLS-1$
|
||||
if (value != null) {
|
||||
connection.setSID(value);
|
||||
}
|
||||
} else {
|
||||
String value = getParameterValue(connection, node, node.getElementParameter("DBNAME")); //$NON-NLS-1$
|
||||
if (value != null) {
|
||||
connection.setSID(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setDatabaseValueForOracleOci(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
String dbVersionName = EDatabaseVersion4Drivers.getDbVersionName(EDatabaseTypeName.ORACLE_OCI, value);
|
||||
if (value != null) {
|
||||
connection.setDbVersionString(dbVersionName);
|
||||
}
|
||||
}
|
||||
if ("SID".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
if (param != null && "ORACLE_OCI".equals(param.getValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, node.getElementParameter("LOCAL_SERVICE_NAME")); //$NON-NLS-1$
|
||||
if (value != null) {
|
||||
connection.setSID(value);
|
||||
}
|
||||
} else {
|
||||
String value = getParameterValue(connection, node, node.getElementParameter("DBNAME")); //$NON-NLS-1$
|
||||
if (value != null) {
|
||||
connection.setSID(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void setDatabaseValueForAs400(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
@@ -797,6 +863,16 @@ public class ComponentToRepositoryProperty {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setDatabaseValueForPLUSPSQL(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
String dbVersionName = EDatabaseVersion4Drivers.getDbVersionName(EDatabaseTypeName.PLUSPSQL, value);
|
||||
if (value != null) {
|
||||
connection.setDbVersionString(dbVersionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void setDatabaseValueForSysbase(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param); // $NON-NLS-1$
|
||||
@@ -806,6 +882,16 @@ public class ComponentToRepositoryProperty {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setDatabaseValueForMSSql(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
if ("DRIVER".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
String dbVersionName = EDatabaseVersion4Drivers.getDbVersionName(EDatabaseTypeName.MSSQL, value);
|
||||
if (value != null) {
|
||||
connection.setDbVersionString(dbVersionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void setDatabaseValueForAccess(DatabaseConnection connection, INode node, IElementParameter param) {
|
||||
if ("DB_VERSION".equals(param.getRepositoryValue())) { //$NON-NLS-1$
|
||||
String value = getParameterValue(connection, node, param);
|
||||
|
||||
@@ -1697,6 +1697,11 @@ public class RepositoryToComponentProperty {
|
||||
return "STANDARD";
|
||||
}
|
||||
}
|
||||
if (value.equals("DBTYPE")) {
|
||||
String repositoryType = connection.getDatabaseType();
|
||||
EDatabaseTypeName typeFromDbType = EDatabaseTypeName.getTypeFromDbType(repositoryType);
|
||||
return typeFromDbType.getXMLType();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public abstract class AbstractNode implements INode {
|
||||
|
||||
private ComponentProperties componentProperties;
|
||||
|
||||
List<? extends IElementParameter> elementParameters;
|
||||
List<? extends IElementParameter> elementParameters = new ArrayList<IElementParameter>();
|
||||
|
||||
private List<? extends IConnection> outgoingConnections = new ArrayList<IConnection>();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -22,6 +22,7 @@ public enum EParameterFieldType {
|
||||
TEXT,
|
||||
TEXT_AREA,
|
||||
PASSWORD,
|
||||
LICENSEKEY, // xqliu TDQ-17742
|
||||
MEMO_SQL,
|
||||
MEMO_PERL,
|
||||
MEMO_JAVA,
|
||||
@@ -123,7 +124,8 @@ public enum EParameterFieldType {
|
||||
TACOKIT_GUESS_SCHEMA,
|
||||
TACOKIT_BUTTON,
|
||||
TACOKIT_SUGGESTABLE_TABLE,
|
||||
TACOKIT_VALUE_SELECTION;
|
||||
TACOKIT_VALUE_SELECTION,
|
||||
TACOKIT_TEXT_AREA_SELECTION;
|
||||
|
||||
public String getName() {
|
||||
return toString();
|
||||
|
||||
@@ -62,4 +62,6 @@ public interface IContext {
|
||||
public IContext clone();
|
||||
|
||||
public boolean sameAs(IContext context);
|
||||
|
||||
public boolean containsSameParameterIgnoreCase(String parameterName);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IESBService;
|
||||
import org.talend.core.ITDQItemService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
@@ -33,7 +34,6 @@ import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.ProjectReference;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.SQLPatternItem;
|
||||
import org.talend.core.model.relationship.Relation;
|
||||
@@ -898,33 +898,14 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needBeans && GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
|
||||
IProxyRepositoryService service = (IProxyRepositoryService) GlobalServiceRegister.getDefault()
|
||||
.getService(IProxyRepositoryService.class);
|
||||
ERepositoryObjectType beansType = ERepositoryObjectType.valueOf("BEANS"); //$NON-NLS-1$
|
||||
try {
|
||||
IProxyRepositoryFactory factory = service.getProxyRepositoryFactory();
|
||||
List<IRepositoryViewObject> all = factory.getAll(project, beansType);
|
||||
List<ProjectReference> references = ProjectManager.getInstance().getCurrentProject()
|
||||
.getProjectReferenceList(true);
|
||||
for (ProjectReference ref : references) {
|
||||
all.addAll(factory.getAll(new Project(ref.getReferencedProject()), beansType));
|
||||
}
|
||||
if (!all.isEmpty()) { // has bean
|
||||
return true;
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return needBeans && GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class);
|
||||
}
|
||||
|
||||
public static boolean isRequiredPigUDFs(IProcess process) {
|
||||
|
||||
@@ -20,4 +20,8 @@ import org.talend.core.model.process.AbstractExternalNode;
|
||||
*/
|
||||
public abstract class MapperExternalNode extends AbstractExternalNode {
|
||||
|
||||
public boolean getShouldGenerateDataset() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -575,6 +575,8 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
|
||||
public final static ERepositoryObjectType METADATA_SAP_BW_INFOOBJECT = ERepositoryObjectType
|
||||
.valueOf("METADATA_SAP_BW_INFOOBJECT"); //$NON-NLS-1$
|
||||
|
||||
public final static ERepositoryObjectType JDBC = ERepositoryObjectType.valueOf("JDBC"); //$NON-NLS-1$
|
||||
|
||||
private static Map<String, ERepositoryObjectType> typeCacheById = new HashMap<String, ERepositoryObjectType>();
|
||||
|
||||
ERepositoryObjectType(String key, String folder, String type, boolean isStaticNode, int ordinal, String[] products,
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
private 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>>();
|
||||
|
||||
@@ -684,16 +684,15 @@ public class NodeUtil {
|
||||
}
|
||||
List<? extends IConnection> listInConns = node.getIncomingConnections();
|
||||
if (listInConns != null && listInConns.size() > 0) {
|
||||
String retResult = getPrivateConnClassName(listInConns.get(0));
|
||||
if (retResult == null) {
|
||||
return conn.getName();
|
||||
} else {
|
||||
return retResult;
|
||||
for (IConnection connection : listInConns) {
|
||||
if (EConnectionType.FLOW_REF != connection.getLineStyle()) {
|
||||
String retResult = getPrivateConnClassName(connection);
|
||||
return retResult != null ? retResult : conn.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,11 +41,11 @@ import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.daikon.security.CryptoHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementValueType;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* cli class global comment. Detailled comment
|
||||
@@ -77,21 +77,24 @@ public final class ParameterValueUtil {
|
||||
}
|
||||
}
|
||||
} else if (param.getValue() instanceof List) { // for TABLE
|
||||
List<Map<String, Object>> tableValues = (List<Map<String, Object>>) param.getValue();
|
||||
for (Map<String, Object> line : tableValues) {
|
||||
for (String key : line.keySet()) {
|
||||
Object cellValue = line.get(key);
|
||||
if (cellValue instanceof String) { // cell is text so
|
||||
// rename data if
|
||||
// needed
|
||||
String value = (String) cellValue;
|
||||
if (value.contains(oldName)) {
|
||||
// line.put(key, value.replaceAll(oldName,
|
||||
// newName));
|
||||
// String newValue = renameValues(value, oldName, newName, flag);
|
||||
String newValue = splitQueryData(oldName, newName, value);
|
||||
if (!value.equals(newValue)) {
|
||||
line.put(key, newValue);
|
||||
List tableValues = (List) param.getValue();
|
||||
for (Object current : tableValues) {
|
||||
if (current != null && current instanceof Map) {
|
||||
Map<String, Object> line = (Map<String, Object>) current;
|
||||
for (String key : line.keySet()) {
|
||||
Object cellValue = line.get(key);
|
||||
if (cellValue instanceof String) { // cell is text so
|
||||
// rename data if
|
||||
// needed
|
||||
String value = (String) cellValue;
|
||||
if (value.contains(oldName)) {
|
||||
// line.put(key, value.replaceAll(oldName,
|
||||
// newName));
|
||||
// String newValue = renameValues(value, oldName, newName, flag);
|
||||
String newValue = splitQueryData(oldName, newName, value);
|
||||
if (!value.equals(newValue)) {
|
||||
line.put(key, newValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -721,13 +724,22 @@ public final class ParameterValueUtil {
|
||||
return true;
|
||||
}
|
||||
} else if (param.getValue() instanceof List) { // for TABLE
|
||||
List<Map<String, Object>> tableValues = (List<Map<String, Object>>) param.getValue();
|
||||
for (Map<String, Object> line : tableValues) {
|
||||
for (String key : line.keySet()) {
|
||||
Object cellValue = line.get(key);
|
||||
if (cellValue instanceof String) { // cell is text so
|
||||
// test data
|
||||
if (ParameterValueUtil.valueContains((String) cellValue, name)) {
|
||||
List tableValues = (List) param.getValue();
|
||||
for (Object current : tableValues) {
|
||||
if (current != null) {
|
||||
if (current instanceof Map) {
|
||||
Map<String, Object> line = (Map<String, Object>) current;
|
||||
for (String key : line.keySet()) {
|
||||
Object cellValue = line.get(key);
|
||||
if (cellValue instanceof String) { // cell is text so
|
||||
// test data
|
||||
if (ParameterValueUtil.valueContains((String) cellValue, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (current instanceof String) {
|
||||
if (ParameterValueUtil.valueContains((String) current, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -830,7 +842,8 @@ public final class ParameterValueUtil {
|
||||
if (contextParam != null) {
|
||||
String docValue = contextParam.getValue();
|
||||
if (docValue != null) {
|
||||
String encryptValue = CryptoHelper.getDefault().encrypt(docValue);
|
||||
String encryptValue = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
|
||||
.encrypt(docValue);
|
||||
if (encryptValue != null) {
|
||||
return encryptValue;
|
||||
}
|
||||
@@ -866,7 +879,8 @@ public final class ParameterValueUtil {
|
||||
if (param != null) {
|
||||
Object docValue = param.getValue();
|
||||
if (docValue != null && docValue instanceof String) {
|
||||
String encryptValue = CryptoHelper.getDefault().encrypt(docValue.toString());
|
||||
String encryptValue = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
|
||||
.encrypt(docValue.toString());
|
||||
if (encryptValue != null) {
|
||||
return encryptValue;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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/";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user