Compare commits
117 Commits
patch/7.3.
...
undx/TDI-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d23acac28 | ||
|
|
08c2082e8a | ||
|
|
8740f3b1da | ||
|
|
e08c225198 | ||
|
|
fef6605f83 | ||
|
|
af83d9d393 | ||
|
|
45a92717f9 | ||
|
|
7191b77c5c | ||
|
|
903c239444 | ||
|
|
071777f408 | ||
|
|
a5c9ecb967 | ||
|
|
18c2e53223 | ||
|
|
16fbcf34f3 | ||
|
|
495ebda155 | ||
|
|
8f36da5ee1 | ||
|
|
0828f2951a | ||
|
|
5da999c4bd | ||
|
|
39eee08210 | ||
|
|
1ab6486d9a | ||
|
|
aa7da99e0d | ||
|
|
a73f8621ed | ||
|
|
09cfc769da | ||
|
|
2a1d017208 | ||
|
|
1189973653 | ||
|
|
c80a96768e | ||
|
|
0e3957c3d7 | ||
|
|
e7399f9df5 | ||
|
|
7f67aeaf0e | ||
|
|
d12826089a | ||
|
|
2bb3e43bc6 | ||
|
|
55ff7cc279 | ||
|
|
56811e6ce4 | ||
|
|
e3701ceb7c | ||
|
|
bcebeb1e99 | ||
|
|
6e12e77255 | ||
|
|
a2a09fa98c | ||
|
|
a88b035f03 | ||
|
|
6173437d9b | ||
|
|
69c2ecd88f | ||
|
|
78e7aae03e | ||
|
|
62ba9f8604 | ||
|
|
4f5c792187 | ||
|
|
77ee82d889 | ||
|
|
8f81ff4534 | ||
|
|
0a8f2e769e | ||
|
|
28f8e109a6 | ||
|
|
5d21d9d3ea | ||
|
|
7d223ecff8 | ||
|
|
1ff9877dce | ||
|
|
75d51647fc | ||
|
|
4f55385a9a | ||
|
|
c942bade7a | ||
|
|
551eb69025 | ||
|
|
c0b192f427 | ||
|
|
ccd1d6d1d5 | ||
|
|
0d2e0c8149 | ||
|
|
67a9b521c9 | ||
|
|
4a8869304b | ||
|
|
6118d69c3e | ||
|
|
2fecdf1ceb | ||
|
|
60869a1240 | ||
|
|
332f6ff85b | ||
|
|
45caecd7f2 | ||
|
|
6e9daf05fb | ||
|
|
3cfb30a9a0 | ||
|
|
ea6595bab8 | ||
|
|
2454e6ba1c | ||
|
|
c9600e040e | ||
|
|
6254945a6e | ||
|
|
b54984ad2d | ||
|
|
59bb804cea | ||
|
|
ba9a85f59f | ||
|
|
d7d0dcefb7 | ||
|
|
65a71ba142 | ||
|
|
3f74eaa4d9 | ||
|
|
dffac5bcb4 | ||
|
|
d13cdc6349 | ||
|
|
1609837f67 | ||
|
|
eafc630094 | ||
|
|
ee68fe3be6 | ||
|
|
cfeb6118db | ||
|
|
5c140eb8a2 | ||
|
|
2f527b6195 | ||
|
|
30119635cb | ||
|
|
d50c690f42 | ||
|
|
10764112d7 | ||
|
|
84b1dd3a01 | ||
|
|
d8084ea4f0 | ||
|
|
8f2c264cc3 | ||
|
|
8a24ecd296 | ||
|
|
14c79d9602 | ||
|
|
f682de08d2 | ||
|
|
cec1999354 | ||
|
|
29b4de8ad7 | ||
|
|
cc44671136 | ||
|
|
2d4ce482ae | ||
|
|
257d1aa94b | ||
|
|
c5d28b4480 | ||
|
|
1d0650170f | ||
|
|
28a9bf7542 | ||
|
|
9a649d1c05 | ||
|
|
8889b7f0e9 | ||
|
|
43e6cc4b99 | ||
|
|
2735bef5ed | ||
|
|
dfe11f5469 | ||
|
|
cf96982dcf | ||
|
|
d7b24ab048 | ||
|
|
ce527ba33e | ||
|
|
9b3037d3a8 | ||
|
|
49ae1fe789 | ||
|
|
e27dcbcef6 | ||
|
|
dd61f6d257 | ||
|
|
6c690a9314 | ||
|
|
a24e1fb363 | ||
|
|
0878fc8bac | ||
|
|
4375dcbc66 | ||
|
|
a1ee13acc5 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -14,7 +14,9 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
com.ibm.icu,
|
||||
org.apache.commons.io,
|
||||
org.talend.utils,
|
||||
org.eclipse.core.net
|
||||
org.eclipse.core.net,
|
||||
org.eclipse.m2e.core,
|
||||
org.eclipse.m2e.maven.runtime
|
||||
Export-Package: org.talend.commons,
|
||||
org.talend.commons.exception,
|
||||
org.talend.commons.i18n,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</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</version>
|
||||
<version>7.3.2-SNAPSHOT</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
}
|
||||
|
||||
public static boolean isDebugMode() {
|
||||
return ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
return Boolean.getBoolean("talendDebug") //$NON-NLS-1$
|
||||
|| ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
}
|
||||
|
||||
public static boolean isJUnitTest() {
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import org.eclipse.m2e.core.MavenPlugin;
|
||||
|
||||
public enum MojoType {
|
||||
|
||||
CI_BUILDER("org.talend.ci", "builder-maven-plugin", "ci.builder.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
CLOUD_PUBLISHER("org.talend.ci", "cloudpublisher-maven-plugin", "cloud.publisher.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SIGNER("org.talend.ci", "signer-maven-plugin", "signer.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
OSGI_HELPER("org.talend.ci", "osgihelper-maven-plugin", "osgihelper.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
private String groupId;
|
||||
|
||||
private String artifactId;
|
||||
|
||||
private String versionKey;
|
||||
|
||||
private MojoType(String groupId, String artifactId, String versionKey) {
|
||||
this.groupId = groupId;
|
||||
this.artifactId = artifactId;
|
||||
this.versionKey = versionKey;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public String getArtifactId() {
|
||||
return artifactId;
|
||||
}
|
||||
|
||||
public String getVersionKey() {
|
||||
return versionKey;
|
||||
}
|
||||
|
||||
public String getMojoArtifactIdFolder() {
|
||||
Path basePath = new File(MavenPlugin.getMaven().getLocalRepositoryPath()).toPath();
|
||||
return basePath.resolve(getGroupId().replaceAll("\\.", "/")).resolve(getArtifactId()).toString(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
public String getMojoGAV() {
|
||||
return getGroupId() + ":" + getArtifactId() + ":" + getVersionKey(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,15 +15,17 @@ package org.talend.commons.utils;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
@@ -262,24 +264,28 @@ public class VersionUtils {
|
||||
return version;
|
||||
}
|
||||
|
||||
public static String getMojoVersion(String mojoKey) {
|
||||
String version = null;
|
||||
public static String getMojoVersion(MojoType mojoType) {
|
||||
String mojoKey = mojoType.getVersionKey();
|
||||
String version = System.getProperty(mojoKey);
|
||||
if (StringUtils.isNotBlank(version)) {
|
||||
return version;
|
||||
}
|
||||
String talendVersion = getTalendVersion();
|
||||
Properties properties = new Properties();
|
||||
File file = new Path(Platform.getConfigurationLocation().getURL().getPath()).append("mojo_version.properties").toFile(); //$NON-NLS-1$
|
||||
if (file.exists()) {
|
||||
try (InputStream inStream = new FileInputStream(file)) {
|
||||
properties.load(inStream);
|
||||
version = properties.getProperty(mojoKey);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (version != null && !version.startsWith(talendVersion)) {
|
||||
ExceptionHandler
|
||||
.process(new Exception(
|
||||
"Incompatible Mojo version:" + mojoKey + "[" + version + "], use default version.")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
version = null;
|
||||
String majorVersion = StringUtils.substringBeforeLast(talendVersion, "."); //$NON-NLS-1$
|
||||
String artifactIdFolder = mojoType.getMojoArtifactIdFolder();
|
||||
Optional<File> optional = Stream.of(new File(artifactIdFolder).listFiles())
|
||||
.filter(f -> f.isDirectory() && f.getName().startsWith(majorVersion))
|
||||
.sorted((f1, f2) -> new DefaultArtifactVersion(f2.getName()).compareTo(new DefaultArtifactVersion(f1.getName())))
|
||||
.findFirst();
|
||||
if (optional.isPresent()) {
|
||||
File latestArtifact = optional.get();
|
||||
String fileName = mojoType.getArtifactId() + "-" + latestArtifact.getName(); //$NON-NLS-1$
|
||||
if (Stream.of(latestArtifact.listFiles())
|
||||
.filter(f -> f.getName().equals(fileName + ".jar") || f.getName().equals(fileName + ".pom")) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
.count() != 2) {
|
||||
ExceptionHandler.process(new Exception("Can't find plugin artifact " + mojoType.getMojoGAV())); //$NON-NLS-1$
|
||||
}
|
||||
version = latestArtifact.getName();
|
||||
}
|
||||
// default version
|
||||
if (StringUtils.isBlank(version)) {
|
||||
@@ -293,6 +299,7 @@ public class VersionUtils {
|
||||
version += "-" + revision; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
System.setProperty(mojoKey, version);
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -302,4 +309,5 @@ public class VersionUtils {
|
||||
talendVersion = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* created by qiongli on 2013-11-13 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
|
||||
|
||||
private static Logger log = Logger.getLogger(Sybase16SADatabaseMetaData.class);
|
||||
|
||||
/**
|
||||
* DOC qiongli SybaseIQDatabaseMetaData constructor comment.
|
||||
*
|
||||
* @param connection
|
||||
* @throws SQLException
|
||||
*/
|
||||
public Sybase16SADatabaseMetaData(Connection connection) throws SQLException {
|
||||
super(connection);
|
||||
}
|
||||
|
||||
public ResultSet getCatalogs(String login, String database) throws SQLException {
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
|
||||
List<String> catList = new ArrayList<String>();
|
||||
if (!StringUtils.isEmpty(database)) {
|
||||
catList.add(database);
|
||||
}
|
||||
|
||||
for (String catalogName : catList) {
|
||||
String sql = createSqlByLoginAndCatalog(login, catalogName);
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
|
||||
while (rs.next()) {
|
||||
int temp = rs.getInt(1);
|
||||
if (temp > 0) {
|
||||
String[] r = new String[] { catalogName };
|
||||
list.add(r);
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.error(e);
|
||||
} finally {
|
||||
try {
|
||||
if (rs != null) {
|
||||
rs.close();
|
||||
}
|
||||
if (stmt != null) {
|
||||
stmt.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SybaseResultSet tableResultSet = new SybaseResultSet();
|
||||
tableResultSet.setMetadata(new String[] { "TABLE_CAT" }); //$NON-NLS-1$
|
||||
tableResultSet.setData(list);
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
|
||||
throws SQLException {
|
||||
return super.getColumns(null, schemaPattern, tableNamePattern, columnNamePattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
|
||||
return super.getPrimaryKeys(null, schema, table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
|
||||
throws SQLException {
|
||||
return super.getTables(null, schemaPattern, tableNamePattern, types);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get a sql query by login name and catalog name.
|
||||
*
|
||||
* @param loginName
|
||||
* @param catalogName
|
||||
* @return
|
||||
*/
|
||||
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
|
||||
String sql = "select count(*) from " + catalogName
|
||||
+ ".dbo.sysusers where suid in (select suid from "+catalogName+".dbo.syslogins where name = '" + loginName
|
||||
+ "')";
|
||||
return sql;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
public interface ITalendNexusPrefConstants {
|
||||
|
||||
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
|
||||
}
|
||||
@@ -26,6 +26,9 @@ import java.util.Enumeration;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
/**
|
||||
@@ -44,7 +47,17 @@ public class NetworkUtil {
|
||||
|
||||
private static final String HTTP_NETWORK_URL = "https://talend-update.talend.com";
|
||||
|
||||
private static final int DEFAULT_TIMEOUT = 4000;
|
||||
|
||||
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
|
||||
|
||||
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
|
||||
|
||||
public static boolean isNetworkValid() {
|
||||
return isNetworkValid(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(Integer timeout) {
|
||||
String disableInternet = System.getProperty(TALEND_DISABLE_INTERNET);
|
||||
if ("true".equals(disableInternet)) { //$NON-NLS-1$
|
||||
return false;
|
||||
@@ -55,8 +68,9 @@ public class NetworkUtil {
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
|
||||
conn.setConnectTimeout(conntimeout);
|
||||
conn.setReadTimeout(conntimeout);
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
String strMessage = conn.getResponseMessage();
|
||||
if (strMessage.compareTo("Not Found") == 0) { //$NON-NLS-1$
|
||||
@@ -73,22 +87,23 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(String url) {
|
||||
public static boolean isNetworkValid(String url, Integer timeout) {
|
||||
if (url == null) {
|
||||
return isNetworkValid();
|
||||
return isNetworkValid(timeout);
|
||||
}
|
||||
return checkValidWithHttp(url);
|
||||
return checkValidWithHttp(url, timeout);
|
||||
}
|
||||
|
||||
private static boolean checkValidWithHttp(String urlString) {
|
||||
private static boolean checkValidWithHttp(String urlString, Integer timeout) {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
|
||||
conn.setConnectTimeout(conntimeout);
|
||||
conn.setReadTimeout(conntimeout);
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
@@ -101,6 +116,18 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int getNexusTimeout() {
|
||||
int timeout = DEFAULT_NEXUS_TIMEOUT;
|
||||
try {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
|
||||
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public static Authenticator getDefaultAuthenticator() {
|
||||
try {
|
||||
Field theAuthenticatorField = Authenticator.class.getDeclaredField("theAuthenticator");
|
||||
|
||||
@@ -19,15 +19,18 @@ import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
|
||||
@@ -58,8 +61,14 @@ public class UpdatesHelper {
|
||||
|
||||
public static final String COMPONENT_SUFFIX = "_java.xml";
|
||||
|
||||
public static final String COMPONENT_TEMPLATES = "templates";
|
||||
|
||||
public static final String NEW_COMPONENT_PREFIX = "installer$$";
|
||||
|
||||
public static final String PRE_TALEND_PATCH = "talend.patch";
|
||||
|
||||
public static final String RECORD_SEPERATOR = ",";
|
||||
|
||||
public static boolean existArtifacts(File base) {
|
||||
return new File(base, FILE_ARTIFACTS).exists() || new File(base, FILE_JAR_ARTIFACTS).exists()
|
||||
|| new File(base, FILE_XZ_ARTIFACTS).exists();
|
||||
@@ -83,6 +92,9 @@ public class UpdatesHelper {
|
||||
* will check that existed the plugins folder only.
|
||||
*/
|
||||
public static boolean isPlainUpdate(File file) {
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
ZipFileStatus status = new ZipFileStatus(file);
|
||||
@@ -110,6 +122,9 @@ public class UpdatesHelper {
|
||||
* need check that contain "artifacts.xml", "content.xml" and "plugins" folder in same place.
|
||||
*/
|
||||
public static boolean isUpdateSite(File file) {
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
|
||||
@@ -171,7 +186,8 @@ public class UpdatesHelper {
|
||||
}
|
||||
|
||||
private static void findUpdateBaseFile(Set<File> foundUpdateFiles, File baseFile) {
|
||||
if (isPlainUpdate(baseFile) || isUpdateSite(baseFile) && !isComponentUpdateSite(baseFile)) {
|
||||
if (isPlainUpdate(baseFile)
|
||||
|| isUpdateSite(baseFile) && !isComponentUpdateSite(baseFile)) {
|
||||
foundUpdateFiles.add(baseFile);
|
||||
} else if (baseFile.isDirectory()) {
|
||||
final File[] listFiles = baseFile.listFiles();
|
||||
@@ -184,6 +200,10 @@ public class UpdatesHelper {
|
||||
}
|
||||
|
||||
public static boolean isComponentUpdateSite(File file) {
|
||||
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
ZipFileStatus status = new ZipFileStatus(file) {
|
||||
@@ -296,6 +316,9 @@ public class UpdatesHelper {
|
||||
|
||||
public static boolean isOldComponent(File f) {
|
||||
if (f != null && f.exists() && f.isDirectory()) {
|
||||
if (f.getName().equals(COMPONENT_TEMPLATES)) {
|
||||
return true;
|
||||
}
|
||||
File[] listFiles = f.listFiles();
|
||||
if (listFiles != null) {
|
||||
for (File subFile : listFiles) {
|
||||
@@ -307,4 +330,53 @@ public class UpdatesHelper {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static File getProductFile() {
|
||||
try {
|
||||
return new File(Platform.getInstallLocation().getDataArea(FILE_ECLIPSE_PRODUCT).getPath());
|
||||
} catch (IOException e) {
|
||||
//
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Properties loadProductProperties(File productFile) {
|
||||
Properties prop = new Properties();
|
||||
if (productFile != null && productFile.exists()) {
|
||||
try (FileInputStream fis = new FileInputStream(productFile)) {
|
||||
prop.load(fis);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
public static Set<String> getPatchesInstalled() {
|
||||
Set<String> installed = new HashSet<String>();
|
||||
File productFile = getProductFile();
|
||||
Properties props = loadProductProperties(productFile);
|
||||
props.forEach((k, v) -> {
|
||||
String key = String.valueOf(k);
|
||||
if (key.startsWith(PRE_TALEND_PATCH)) {
|
||||
String val = String.valueOf(v);
|
||||
String[] vals = val.split(RECORD_SEPERATOR);
|
||||
if (vals.length > 1) {
|
||||
installed.add(vals[1]);
|
||||
} else {
|
||||
installed.add(val);
|
||||
}
|
||||
}
|
||||
});
|
||||
return installed;
|
||||
}
|
||||
|
||||
public static boolean skipPatchFile(File patchFile) {
|
||||
Set<String> installedPathNames = getPatchesInstalled();
|
||||
if (patchFile != null && patchFile.isFile()) {
|
||||
String patchName = FilenameUtils.getBaseName(patchFile.getName());
|
||||
return installedPathNames.contains(patchName);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,12 +215,8 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
|
||||
checkKey(key);
|
||||
blockOperationIfRequired();
|
||||
incrementRunningOperations();
|
||||
LockerValue<KP> lockerValue;
|
||||
try {
|
||||
lockerValue = prepareInternalLock(key);
|
||||
} finally {
|
||||
this.decrementRunningOperations();
|
||||
}
|
||||
LockerValue<KP> lockerValue = prepareInternalLock(key);
|
||||
decrementRunningOperations();
|
||||
lockerValue.getLock().lockInterruptibly();
|
||||
traceStackForDebugging(lockerValue);
|
||||
}
|
||||
@@ -243,12 +239,8 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
|
||||
checkKey(key);
|
||||
blockOperationIfRequired();
|
||||
incrementRunningOperations();
|
||||
LockerValue<KP> lockerValue;
|
||||
try {
|
||||
lockerValue = this.prepareInternalLock(key);
|
||||
} finally {
|
||||
this.decrementRunningOperations();
|
||||
}
|
||||
LockerValue<KP> lockerValue = prepareInternalLock(key);
|
||||
decrementRunningOperations();
|
||||
boolean locked = lockerValue.getLock().tryLock();
|
||||
if (locked) {
|
||||
traceStackForDebugging(lockerValue);
|
||||
@@ -291,12 +283,8 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
|
||||
checkKey(key);
|
||||
blockOperationIfRequired();
|
||||
incrementRunningOperations();
|
||||
LockerValue<KP> lockerValue;
|
||||
try {
|
||||
lockerValue = this.prepareInternalLock(key);
|
||||
} finally {
|
||||
this.decrementRunningOperations();
|
||||
}
|
||||
LockerValue<KP> lockerValue = prepareInternalLock(key);
|
||||
decrementRunningOperations();
|
||||
interruptIfStopping();
|
||||
boolean locked = lockerValue.getLock().tryLock(timeout, unit);
|
||||
if (locked) {
|
||||
@@ -334,17 +322,13 @@ public class LockerByKey<KP> implements ILockerByKey<KP> {
|
||||
checkKey(key);
|
||||
blockOperationIfRequired();
|
||||
incrementRunningOperations();
|
||||
LockerValue<KP> lockerValue = this.getLockerValue(key);
|
||||
boolean returnValue;
|
||||
try {
|
||||
returnValue = false;
|
||||
if (lockerValue != null) {
|
||||
lockerValue.getLock().unlock();
|
||||
returnValue = true;
|
||||
}
|
||||
} finally {
|
||||
this.decrementRunningOperations();
|
||||
LockerValue<KP> lockerValue = getLockerValue(key);
|
||||
boolean returnValue = false;
|
||||
if (lockerValue != null) {
|
||||
lockerValue.getLock().unlock();
|
||||
returnValue = true;
|
||||
}
|
||||
decrementRunningOperations();
|
||||
cleanAccordingOperations();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -104,7 +104,6 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
this.source = sourceTable;
|
||||
|
||||
dataToTableItemCache = new DataToTableItemCache(sourceTable);
|
||||
|
||||
}
|
||||
|
||||
protected IStyleLink getDefaultStyleLink() {
|
||||
@@ -232,7 +231,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
|
||||
int yStraight = sourceToCommonPoint.y + treeItemHeight / 2 + tableItemBounds.y;
|
||||
pointEndStraight.x = sourceToCommonPoint.x + xStartBezierLink;
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS()) || Platform.OS_LINUX.equals(Platform.getOS())) {
|
||||
pointStartStraight.x = sourceToCommonPoint.x + tableItem.getParent().getBounds().width;
|
||||
pointEndStraight.x = pointStartStraight.x;
|
||||
} else {
|
||||
@@ -311,10 +310,10 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
// Added by Marvin Wang on Nov. 28, 2012 for bug TDI-23378. This is not the best way to fix this issue,
|
||||
// but till now I have not found the root cause.
|
||||
if (Platform.OS_LINUX.equals(Platform.getOS())) {
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height - treeItemHeight / 2;
|
||||
}
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y + tableItem.getBounds(0).height;
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
|
||||
}
|
||||
drawableLink.setPoint1(pointEndStraight);
|
||||
drawableLink.setPoint2(pointEndCentralCurve);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -117,6 +117,7 @@ public class JobAndNodesParametersRelationshipHandler implements IItemRelationsh
|
||||
}
|
||||
}
|
||||
}
|
||||
relationsMap.values().removeIf(value -> value.isEmpty());
|
||||
return relationsMap;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.repository.handlers;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.model.properties.Item;
|
||||
@@ -43,8 +44,13 @@ public class JobRoutinesItemRelationshipHandler extends AbstractJobItemRelations
|
||||
Set<Relation> relationSet = new HashSet<Relation>();
|
||||
|
||||
if (processType.getParameters() != null && processType.getParameters().getRoutinesParameter() != null) {
|
||||
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
|
||||
for (Object o : processType.getParameters().getRoutinesParameter()) {
|
||||
RoutinesParameterType itemInfor = (RoutinesParameterType) o;
|
||||
if (currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
|
||||
// exclude system routines relation
|
||||
continue;
|
||||
}
|
||||
|
||||
Relation addedRelation = new Relation();
|
||||
addedRelation.setId(itemInfor.getName());
|
||||
|
||||
@@ -108,6 +108,7 @@ import org.talend.core.model.properties.SpagoBiServer;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.model.properties.impl.FolderItemImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.Folder;
|
||||
import org.talend.core.model.repository.IRepositoryContentHandler;
|
||||
@@ -123,6 +124,7 @@ import org.talend.core.repository.constants.Constant;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.core.repository.utils.ProjectDataJsonProvider;
|
||||
import org.talend.core.repository.utils.RepositoryPathProvider;
|
||||
import org.talend.core.repository.utils.XmiResourceManager;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -130,6 +132,7 @@ import org.talend.core.runtime.repository.item.ItemProductKeys;
|
||||
import org.talend.core.runtime.services.IMavenUIService;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.service.IUpdateService;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
@@ -2062,6 +2065,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
SubMonitor subMonitor = SubMonitor.convert(monitor, MAX_TASKS);
|
||||
SubMonitor currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
|
||||
|
||||
project.setReferenceProjectProvider(null);
|
||||
getRepositoryContext().setProject(null);
|
||||
initEmfProjectContent();
|
||||
@@ -2080,6 +2084,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ProjectManager.getInstance().getBeforeLogonRecords().clear();
|
||||
ProjectManager.getInstance().getUpdatedRemoteHandlerRecords().clear();
|
||||
|
||||
ProjectDataJsonProvider.checkAndRectifyRelationShipSetting(project.getEmfProject());
|
||||
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
@@ -2151,6 +2157,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
fireRepositoryPropertyChange(ERepositoryActionName.PROJECT_PREFERENCES_RELOAD.getName(), null, null);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
updateService.syncComponentM2Jars(currentMonitor);
|
||||
}
|
||||
|
||||
IRunProcessService runProcessService = getRunProcessService();
|
||||
if (runProcessService != null) {
|
||||
runProcessService.initMavenJavaProject(monitor, project);
|
||||
@@ -2239,6 +2250,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
tdqRepositoryService.initProxyRepository();
|
||||
}
|
||||
}
|
||||
// regenerate relationship index
|
||||
if (project.getEmfProject().getItemsRelations().isEmpty()) {
|
||||
RelationshipItemBuilder.getInstance().buildAndSaveIndex();
|
||||
}
|
||||
|
||||
fullLogonFinished = true;
|
||||
this.repositoryFactoryFromProvider.afterLogon(monitor);
|
||||
} finally {
|
||||
|
||||
@@ -106,7 +106,8 @@ public class RecycleBinManager {
|
||||
List<IRepositoryViewObject> deletedObjects = new ArrayList<IRepositoryViewObject>();
|
||||
final EList<TalendItem> deletedItems = projectRecyclebins.get(project.getTechnicalLabel()).getDeletedItems();
|
||||
List<TalendItem> notDeletedItems = new ArrayList<TalendItem>();
|
||||
for (TalendItem deletedItem : deletedItems) {
|
||||
List<TalendItem> dup_deletedItems = new ArrayList<>(deletedItems);
|
||||
for (TalendItem deletedItem : dup_deletedItems) {
|
||||
try {
|
||||
final ERepositoryObjectType type = ERepositoryObjectType.getType(deletedItem.getType());
|
||||
// ignore the generated doc in recycle bin
|
||||
@@ -274,7 +275,8 @@ public class RecycleBinManager {
|
||||
resource = createRecycleBinResource(project);
|
||||
}
|
||||
resource.getContents().clear();
|
||||
recycleBin.setLastUpdate(new Date());
|
||||
// set date to null to avoid timezone conflict
|
||||
recycleBin.setLastUpdate(null);
|
||||
resource.getContents().add(recycleBin);
|
||||
EmfHelper.saveResource(resource);
|
||||
lastSavedRecycleBinMap.put(recycleBin, EcoreUtil.copy(recycleBin));
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -32,6 +33,7 @@ import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.model.properties.ImplicitContextSettings;
|
||||
@@ -43,6 +45,7 @@ import org.talend.core.model.properties.Project;
|
||||
import org.talend.core.model.properties.StatAndLogsSettings;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.impl.PropertiesFactoryImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
@@ -140,9 +143,10 @@ public class ProjectDataJsonProvider {
|
||||
ProjectDataJsonProvider.loadProjectSettings(project, input);
|
||||
}
|
||||
IPath relationShipPath = settingFolderPath.append(FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
input = inputStreamProvider.getStream(relationShipPath);
|
||||
if (input != null) {
|
||||
ProjectDataJsonProvider.loadRelationShips(project, input);
|
||||
try (InputStream is = inputStreamProvider.getStream(relationShipPath)) {
|
||||
if (is != null) {
|
||||
ProjectDataJsonProvider.loadRelationShips(project, is);
|
||||
}
|
||||
}
|
||||
IPath migrationTaskPath = settingFolderPath.append(FileConstants.MIGRATION_TASK_FILE_NAME);
|
||||
input = inputStreamProvider.getStream(migrationTaskPath);
|
||||
@@ -184,10 +188,11 @@ public class ProjectDataJsonProvider {
|
||||
private static void loadRelationShips(Project project, IPath projectFolderPath) throws PersistenceException {
|
||||
File file = getLoadingConfigurationFile(projectFolderPath, FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
loadRelationShips(project, new FileInputStream(file));
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new PersistenceException(e);
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
loadRelationShips(project, fis);
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,11 +211,72 @@ public class ProjectDataJsonProvider {
|
||||
project.getItemsRelations().add(json.toEmfObject());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkAndRectifyRelationShipSetting(Project project) throws PersistenceException {
|
||||
File file = getSavingConfigurationFile(project.getTechnicalLabel(), FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
if (file == null || !file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<ItemRelationsJson> itemRelationsJsonsList = null;
|
||||
TypeReference<List<ItemRelationsJson>> typeReference = new TypeReference<List<ItemRelationsJson>>() {
|
||||
};
|
||||
FileInputStream input = null;
|
||||
try {
|
||||
input = new FileInputStream(file);
|
||||
itemRelationsJsonsList = new ObjectMapper().readValue(new FileInputStream(file), typeReference);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
} finally {
|
||||
closeInputStream(input);
|
||||
}
|
||||
|
||||
if (itemRelationsJsonsList == null || itemRelationsJsonsList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<String> idVersionSet = new HashSet<String>();
|
||||
List<ItemRelationsJson> relationJsonList = new ArrayList<ItemRelationsJson>();
|
||||
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
|
||||
boolean needModify = false;
|
||||
for (ItemRelationsJson relationJson : itemRelationsJsonsList) {
|
||||
ItemRelationJson baseItem = relationJson.getBaseItem();
|
||||
String idversion = baseItem.getId() + ";" + baseItem.getVersion();
|
||||
if (idVersionSet.contains(idversion)) {
|
||||
// in case duplicate
|
||||
needModify = true;
|
||||
continue;
|
||||
}
|
||||
// remove system routines relation
|
||||
int originalSize = relationJson.getRelatedItems().size();
|
||||
relationJson.getRelatedItems()
|
||||
.removeIf(relatedItem -> RelationshipItemBuilder.ROUTINE_RELATION.equals(relatedItem.getType())
|
||||
&& currentSystemRoutinesMap.containsValue(relatedItem.getId()));
|
||||
if (relationJson.getRelatedItems().size() != originalSize) {
|
||||
needModify = true;
|
||||
}
|
||||
if (!relationJson.getRelatedItems().isEmpty()) {
|
||||
relationJsonList.add(relationJson);
|
||||
}
|
||||
idVersionSet.add(idversion);
|
||||
}
|
||||
|
||||
if (needModify) {
|
||||
// re-load to project
|
||||
if (relationJsonList != null && !relationJsonList.isEmpty()) {
|
||||
project.getItemsRelations().clear();
|
||||
for (ItemRelationsJson json : relationJsonList) {
|
||||
project.getItemsRelations().add(json.toEmfObject());
|
||||
}
|
||||
}
|
||||
// re-save relationship setting json file
|
||||
saveRelationShips(project);
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMigrationTaskSetting(Project project, IPath projectFolderPath) throws PersistenceException {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
|
||||
@@ -9,13 +9,14 @@
|
||||
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
|
||||
<dbType type="CHARACTER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" defaultPattern="dd-MM-yyyy" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="UNSIGNED INT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" defaultLength="10" ignorePre="false" />
|
||||
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="REAL" />
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
|
||||
@@ -175,6 +176,11 @@
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="NUMERIC">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_Float"/>
|
||||
|
||||
@@ -100,6 +100,11 @@
|
||||
<xs:restriction base="xs:short"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="defaultPattern">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="default" type="xs:boolean"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -66,4 +66,16 @@
|
||||
serviceId="IRepositoryContextUpdateService">
|
||||
</Service>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.runtime.saveItemContextLinkService">
|
||||
<creator
|
||||
class="org.talend.core.model.context.link.ProcessItemContextLinkService">
|
||||
</creator>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.runtime.saveItemContextLinkService">
|
||||
<creator
|
||||
class="org.talend.core.model.context.link.ConnectionItemContextLinkService">
|
||||
</creator>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -214,5 +214,5 @@ public interface ITDQRepositoryService extends IService {
|
||||
/**
|
||||
* @param chooseContext the context name which want to swtich
|
||||
*/
|
||||
void popupSwitchContextFailedMessage(String chooseContext);
|
||||
boolean popupSwitchContextFailedMessage(String chooseContext);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ public enum EDatabaseTypeName {
|
||||
"IBM DB2 ZOS", "IBM DB2 ZOS", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
SYBASEASE(
|
||||
"SybaseASE", "Sybase (ASE and IQ)", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SYBASEASE_SA(
|
||||
"SybaseASE", "SQL Anywhere", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
// this Sybase IQ not used.
|
||||
SYBASEIQ(
|
||||
|
||||
@@ -186,6 +186,10 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_HDI_PASSWORD = "CONN_PARA_KEY_HDI_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE = "CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE_USE_TLS = "CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE_USE_TLS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HOSTNAME = "CONN_PARA_KEY_AZURE_HOSTNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_CONTAINER = "CONN_PARA_KEY_AZURE_CONTAINER"; //$NON-NLS-1$
|
||||
@@ -302,6 +306,8 @@ public class ConnParameterKeys {
|
||||
/**DataBricks*/
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
|
||||
|
||||
@@ -114,6 +114,7 @@ public enum EHadoopProperties {
|
||||
QUBOLE_S3_REGION,
|
||||
|
||||
DATABRICKS_ENDPOINT,
|
||||
DATABRICKS_CLOUD_PROVIDER,
|
||||
DATABRICKS_CLUSTER_ID,
|
||||
DATABRICKS_TOKEN,
|
||||
DATABRICKS_DBFS_DEP_FOLDER;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.hadoop.version;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* created by hcyi on May 27, 2020
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public enum EHdinsightStorage {
|
||||
|
||||
ADLS_GEN2("ADLS Gen2"), //$NON-NLS-1$
|
||||
|
||||
AZURE_STORAGE("Azure storage"); //$NON-NLS-1$
|
||||
|
||||
private String displayName;
|
||||
|
||||
EHdinsightStorage(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static List<String> getAllHdinsightStorageDisplayNames() {
|
||||
return getAllHdinsightStorageNames(true);
|
||||
}
|
||||
|
||||
public static List<String> getAllHdinsightStorageNames(boolean display) {
|
||||
List<String> names = new ArrayList<String>();
|
||||
EHdinsightStorage[] values = values();
|
||||
for (EHdinsightStorage storage : values) {
|
||||
if (display) {
|
||||
names.add(storage.getDisplayName());
|
||||
} else {
|
||||
names.add(storage.getName());
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static EHdinsightStorage getHdinsightStoragenByDisplayName(String name) {
|
||||
return getHdinsightStorageByName(name, true);
|
||||
}
|
||||
|
||||
public static EHdinsightStorage getHdinsightStorageByName(String name, boolean display) {
|
||||
if (name != null) {
|
||||
for (EHdinsightStorage storage : values()) {
|
||||
if (display) {
|
||||
if (name.equalsIgnoreCase(storage.getDisplayName())) {
|
||||
return storage;
|
||||
}
|
||||
} else {
|
||||
if (name.equalsIgnoreCase(storage.getName())) {
|
||||
return storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,12 @@ public final class ComponentUtilities {
|
||||
if (value != null) {
|
||||
String replaceAll = value.replaceAll(oldName2, newName);
|
||||
t.setValue(replaceAll);
|
||||
if (!"UNIQUE_NAME".equals(t.getName())) {
|
||||
if (replaceAll.contains(oldName)) {
|
||||
replaceAll = replaceAll.replaceAll(oldName, newName);
|
||||
t.setValue(replaceAll);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ public interface IMultipleComponentConnection {
|
||||
|
||||
public String getConnectionType();
|
||||
|
||||
public String getConnectorName();
|
||||
|
||||
public void setConnectionType(String connectionType);
|
||||
|
||||
public String getNameTarget();
|
||||
|
||||
@@ -14,6 +14,8 @@ package org.talend.core.model.components;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.model.process.INode;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
*
|
||||
@@ -33,4 +35,7 @@ public interface IMultipleComponentItem {
|
||||
public String getComponent();
|
||||
|
||||
public void setComponent(String component);
|
||||
|
||||
public void updateNode(INode newNode, INode oldNode);
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,6 @@ public interface IMultipleComponentManager {
|
||||
|
||||
public boolean isLookupMode();
|
||||
|
||||
public String getParamSeperator();
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -341,7 +341,8 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
String repositoryContextId = contextParamType.getRepositoryContextId();
|
||||
String source = IContextParameter.BUILT_IN;
|
||||
if (repositoryContextId != null && !"".equals(repositoryContextId)) { //$NON-NLS-1$
|
||||
if (repositoryContextId != null && !"".equals(repositoryContextId) //$NON-NLS-1$
|
||||
&& !IContextParameter.BUILT_IN.equals(repositoryContextId)) {
|
||||
Item item = ContextUtils.getContextItemById(contextItemList, repositoryContextId);
|
||||
if (item == null) {
|
||||
item = ContextUtils.getRepositoryContextItemById(repositoryContextId);
|
||||
@@ -585,15 +586,16 @@ public class JobContextManager implements IContextManager {
|
||||
contextParamType.setRepositoryContextId(contextId);
|
||||
}
|
||||
}
|
||||
} else if (useInternalId) {
|
||||
} else {
|
||||
contextParamType.setRepositoryContextId(contextParam.getSource());
|
||||
}
|
||||
if (useInternalId) {
|
||||
String internalId = contextParam.getInternalId();
|
||||
if (StringUtils.isEmpty(internalId)) {
|
||||
internalId = EcoreUtil.generateUUID();
|
||||
contextParamType.setInternalId(internalId);
|
||||
contextParam.setInternalId(internalId);
|
||||
} else {
|
||||
contextParamType.setInternalId(internalId);
|
||||
}
|
||||
contextParamType.setInternalId(internalId);
|
||||
}
|
||||
}
|
||||
contextTypeParamList.clear(); // remove old
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
|
||||
public abstract class AbstractItemContextLinkService implements IItemContextLinkService {
|
||||
|
||||
@Override
|
||||
public boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFileInput) throws PersistenceException {
|
||||
ItemContextLink remoteContextLink = ContextLinkService.getInstance().doLoadContextLinkFromFile(remoteLinkFileInput);
|
||||
List<ContextType> contextTypeList = ContextUtils.getAllContextType(item);
|
||||
return saveContextLink(contextTypeList, item, backupContextLink, remoteContextLink);
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(List<ContextType> contextTypeList, Item item,
|
||||
ItemContextLink backupContextLink, ItemContextLink remoteContextLink)
|
||||
throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
String itemId = item.getProperty().getId();
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(itemId);
|
||||
Map<String, Item> tempCache = new HashMap<String, Item>();
|
||||
if (contextTypeList != null && contextTypeList.size() > 0) {
|
||||
for (Object object : contextTypeList) {
|
||||
if (object instanceof ContextType) {
|
||||
ContextType jobContextType = (ContextType) object;
|
||||
for (Object o : jobContextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
String repositoryContextId = contextParameterType.getRepositoryContextId();
|
||||
if (!ContextUtils.isBuildInParameter(contextParameterType)) {
|
||||
ContextLink contextLink = itemContextLink
|
||||
.findContextLink(contextParameterType.getRepositoryContextId(), jobContextType.getName());
|
||||
if (contextLink == null) {
|
||||
contextLink = new ContextLink();
|
||||
contextLink.setContextName(jobContextType.getName());
|
||||
contextLink.setRepoId(repositoryContextId);
|
||||
}
|
||||
ContextParamLink contextParamLink = createParamLink(repositoryContextId, jobContextType.getName(),
|
||||
contextParameterType.getName(), contextParameterType.getInternalId(), tempCache,
|
||||
backupContextLink, remoteContextLink);
|
||||
if (contextParamLink != null) {
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
|
||||
if (contextLink.getParameterList().size() > 0
|
||||
&& !itemContextLink.getContextList().contains(contextLink)) {
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
ContextLinkService.getInstance().saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
ContextLinkService.getInstance().deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(List<ContextType> contextTypeList, Item item) throws PersistenceException {
|
||||
ItemContextLink backupContextLink = ContextLinkService.getInstance().loadContextLinkFromJson(item);
|
||||
return saveContextLink(contextTypeList, item, backupContextLink, null);
|
||||
}
|
||||
|
||||
private ContextParamLink createParamLink(String repositoryContextId, String contextName, String paramName, String internalId,
|
||||
Map<String, Item> tempCache, ItemContextLink oldContextLink, ItemContextLink remoteContextLink) {
|
||||
ContextParamLink contextParamLink = null;
|
||||
|
||||
if (StringUtils.isNotBlank(internalId)) {
|
||||
contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(paramName);
|
||||
contextParamLink.setId(internalId);
|
||||
}
|
||||
|
||||
Item contextItem = tempCache.get(repositoryContextId);
|
||||
if (contextItem == null) {
|
||||
contextItem = ContextUtils.getRepositoryContextItemById(repositoryContextId);
|
||||
tempCache.put(repositoryContextId, contextItem);
|
||||
}
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem, contextName);
|
||||
ContextParameterType repoContextParameterType = ContextUtils.getContextParameterTypeByName(contextType, paramName);
|
||||
if (repoContextParameterType != null && repoContextParameterType.eResource() == null) {
|
||||
// processItem save before than contextItem, caused eResource null
|
||||
IRepositoryService repositoryService = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
try {
|
||||
repositoryService.getProxyRepositoryFactory().save(contextItem, false);
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
String uuID = null;
|
||||
boolean isFromContextItem = (contextItem instanceof ContextItem);
|
||||
if (repoContextParameterType != null) {
|
||||
if (isFromContextItem) {
|
||||
uuID = ResourceHelper.getUUID(repoContextParameterType);
|
||||
} else if (repoContextParameterType.getInternalId() != null) {
|
||||
uuID = repoContextParameterType.getInternalId();
|
||||
}
|
||||
}
|
||||
if (repoContextParameterType == null && remoteContextLink != null) {
|
||||
ContextParamLink remoteParamLink = remoteContextLink.findContextParamLinkByName(repositoryContextId, contextName,
|
||||
paramName);
|
||||
if (remoteParamLink != null && remoteParamLink.getId() != null) {
|
||||
repoContextParameterType = findContextParamTypeById(contextType, isFromContextItem, remoteParamLink.getId());
|
||||
uuID = remoteParamLink.getId();
|
||||
}
|
||||
}
|
||||
if (repoContextParameterType == null && oldContextLink != null) {
|
||||
ContextParamLink oldParamLink = oldContextLink.findContextParamLinkByName(repositoryContextId, contextName,
|
||||
paramName);
|
||||
if (oldParamLink != null) {
|
||||
uuID = oldParamLink.getId();
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(uuID)) {
|
||||
contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(paramName);
|
||||
contextParamLink.setId(uuID);
|
||||
}
|
||||
}
|
||||
return contextParamLink;
|
||||
}
|
||||
|
||||
protected ContextParameterType findContextParamTypeById(ContextType contextType, boolean isFromContextItem, String id) {
|
||||
for (Object obj : contextType.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType repoParam = (ContextParameterType) obj;
|
||||
if (isFromContextItem && StringUtils.equals(id, ResourceHelper.getUUID(repoParam))) {
|
||||
return repoParam;
|
||||
}
|
||||
if (!isFromContextItem && StringUtils.equals(id, repoParam.getInternalId())) {
|
||||
return repoParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
|
||||
|
||||
public class ConnectionItemContextLinkService extends AbstractItemContextLinkService {
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item) {
|
||||
if (item instanceof ConnectionItem) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveItemLink(Item item) throws PersistenceException {
|
||||
if (item instanceof ConnectionItem) {
|
||||
ConnectionItem connectionItem = (ConnectionItem) item;
|
||||
return saveContextLink(connectionItem.getConnection(), item, null, null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private synchronized boolean saveContextLink(Connection connection, Item item, ItemContextLink backupContextLink,
|
||||
ItemContextLink remoteContextLink) throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(item.getProperty().getId());
|
||||
if (connection.isContextMode()) {
|
||||
String contextId = connection.getContextId();
|
||||
if (StringUtils.isEmpty(contextId) || IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
return hasLinkFile;
|
||||
}
|
||||
ContextLink contextLink = new ContextLink();
|
||||
contextLink.setContextName(connection.getContextName());
|
||||
contextLink.setRepoId(contextId);
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
|
||||
ContextItem contextItem = ContextUtils.getContextItemById2(contextId);
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem.getContext(),
|
||||
connection.getContextName());
|
||||
if (contextType != null) {
|
||||
for (Object o : contextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
ContextParamLink contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(contextParameterType.getName());
|
||||
contextParamLink.setId(ResourceHelper.getUUID(contextParameterType));
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Because we don't know db connection using which values, we save all for merge operation
|
||||
if (backupContextLink != null) {
|
||||
for (ContextLink cl : backupContextLink.getContextList()) {
|
||||
if (StringUtils.equals(cl.getRepoId(), contextId)
|
||||
&& StringUtils.equals(cl.getContextName(), connection.getContextName())) {
|
||||
for (ContextParamLink cpl : cl.getParameterList()) {
|
||||
if (contextLink.getParamLinkByName(cpl.getName()) == null) {
|
||||
contextLink.getParameterList().add(cpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (remoteContextLink != null) {
|
||||
for (ContextLink cl : remoteContextLink.getContextList()) {
|
||||
if (StringUtils.equals(cl.getRepoId(), contextId)
|
||||
&& StringUtils.equals(cl.getContextName(), connection.getContextName())) {
|
||||
for (ContextParamLink cpl : cl.getParameterList()) {
|
||||
if (contextLink.getParamLinkByName(cpl.getName()) == null) {
|
||||
contextLink.getParameterList().add(cpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
ContextLinkService.getInstance().saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
ContextLinkService.getInstance().deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
}
|
||||
|
||||
public ItemContextLink loadItemLink(Item item) throws PersistenceException {
|
||||
return ContextLinkService.getInstance().doLoadContextLinkFromJson(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFileInput)
|
||||
throws PersistenceException {
|
||||
if (item instanceof ConnectionItem) {
|
||||
ConnectionItem connectionItem = (ConnectionItem) item;
|
||||
ItemContextLink remoteContextLink = ContextLinkService.getInstance().doLoadContextLinkFromFile(remoteLinkFileInput);
|
||||
return saveContextLink(connectionItem.getConnection(), item, backupContextLink, remoteContextLink);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,12 +15,13 @@ package org.talend.core.model.context.link;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -34,24 +35,23 @@ import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
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.Project;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.core.model.relationship.Relation;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class ContextLinkService {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ContextLinkService.class);
|
||||
|
||||
private static final String CREATOR_EXT_ID = "org.talend.core.runtime.saveItemContextLinkService"; //$NON-NLS-1$
|
||||
|
||||
public static final String LINKS_FOLDER_NAME = "links";
|
||||
@@ -78,162 +78,38 @@ public class ContextLinkService {
|
||||
return service.saveItemLink(item);
|
||||
}
|
||||
}
|
||||
return doSaveContextLink(item);
|
||||
return false;
|
||||
}
|
||||
|
||||
public synchronized boolean doSaveContextLink(Item item) throws PersistenceException {
|
||||
if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return saveContextLink(processItem.getProcess().getContext(), item);
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletItem = (JobletProcessItem) item;
|
||||
return saveContextLink(jobletItem.getJobletProcess().getContext(), item);
|
||||
} else if (item instanceof ConnectionItem) {
|
||||
ConnectionItem connectionItem = (ConnectionItem) item;
|
||||
return saveContextLink(connectionItem.getConnection(), item);
|
||||
public synchronized boolean mergeContextLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFile)
|
||||
throws PersistenceException {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return service.mergeItemLink(item, backupContextLink, remoteLinkFile);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private synchronized boolean saveContextLink(Connection connection, Item item) throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(item.getProperty().getId());
|
||||
if (connection.isContextMode()) {
|
||||
String contextId = connection.getContextId();
|
||||
if (StringUtils.isEmpty(contextId) || IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
return hasLinkFile;
|
||||
}
|
||||
ContextLink contextLink = new ContextLink();
|
||||
contextLink.setContextName(connection.getContextName());
|
||||
contextLink.setRepoId(contextId);
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
|
||||
ContextItem contextItem = ContextUtils.getContextItemById2(contextId);
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem.getContext(),
|
||||
connection.getContextName());
|
||||
if (contextType != null) {
|
||||
for (Object o : contextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
ContextParamLink contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(contextParameterType.getName());
|
||||
contextParamLink.setId(ResourceHelper.getUUID(contextParameterType));
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean isSupportContextLink(Item item) {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
return false;
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(List<ContextType> contextTypeList, Item item) throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
String itemId = item.getProperty().getId();
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(itemId);
|
||||
Map<String, Item> tempCache = new HashMap<String, Item>();
|
||||
if (contextTypeList != null && contextTypeList.size() > 0) {
|
||||
ItemContextLink backupContextLink = this.loadContextLinkFromJson(item);
|
||||
for (Object object : contextTypeList) {
|
||||
if (object instanceof ContextType) {
|
||||
ContextType jobContextType = (ContextType) object;
|
||||
for (Object o : jobContextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
String repositoryContextId = contextParameterType.getRepositoryContextId();
|
||||
if (StringUtils.isEmpty(repositoryContextId)
|
||||
|| IContextParameter.BUILT_IN.equals(repositoryContextId)) {
|
||||
ContextLink contextLink = itemContextLink.findContextLink(item.getProperty().getId(),
|
||||
jobContextType.getName());
|
||||
if (contextLink == null) {
|
||||
contextLink = new ContextLink();
|
||||
contextLink.setContextName(jobContextType.getName());
|
||||
contextLink.setRepoId(itemId);
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
}
|
||||
ContextParamLink contextParamLink = createParamLink(itemId, jobContextType.getName(),
|
||||
contextParameterType.getName(), contextParameterType.getInternalId(), tempCache,
|
||||
backupContextLink);
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
} else {
|
||||
ContextLink contextLink = itemContextLink
|
||||
.findContextLink(contextParameterType.getRepositoryContextId(), jobContextType.getName());
|
||||
if (contextLink == null) {
|
||||
contextLink = new ContextLink();
|
||||
contextLink.setContextName(jobContextType.getName());
|
||||
contextLink.setRepoId(repositoryContextId);
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
}
|
||||
ContextParamLink contextParamLink = createParamLink(repositoryContextId, jobContextType.getName(),
|
||||
contextParameterType.getName(), contextParameterType.getInternalId(), tempCache,
|
||||
backupContextLink);
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private ContextParamLink createParamLink(String repositoryContextId, String contextName, String paramName, String internalId,
|
||||
Map<String, Item> tempCache, ItemContextLink oldContextLink) {
|
||||
ContextParamLink contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(paramName);
|
||||
contextParamLink.setId(internalId);
|
||||
Item contextItem = tempCache.get(repositoryContextId);
|
||||
if (contextItem == null) {
|
||||
contextItem = ContextUtils.getRepositoryContextItemById(repositoryContextId);
|
||||
tempCache.put(repositoryContextId, contextItem);
|
||||
}
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem, contextName);
|
||||
ContextParameterType repoContextParameterType = ContextUtils.getContextParameterTypeByName(contextType, paramName);
|
||||
String uuID = null;
|
||||
if(repoContextParameterType != null) {
|
||||
if (contextItem instanceof ContextItem) {
|
||||
uuID = ResourceHelper.getUUID(repoContextParameterType);
|
||||
} else if (repoContextParameterType.getInternalId() != null) {
|
||||
uuID = repoContextParameterType.getInternalId();
|
||||
}
|
||||
}
|
||||
if (repoContextParameterType == null && oldContextLink != null) {
|
||||
ContextParamLink oldParamLink = oldContextLink.findContextParamLinkByName(repositoryContextId, contextName,
|
||||
paramName);
|
||||
if (oldParamLink != null) {
|
||||
uuID = oldParamLink.getId();
|
||||
}
|
||||
}
|
||||
contextParamLink.setId(uuID);
|
||||
}
|
||||
return contextParamLink;
|
||||
}
|
||||
|
||||
private synchronized void saveContextLinkToJson(Item item, ItemContextLink itemContextLink) throws PersistenceException {
|
||||
public synchronized void saveContextLinkToJson(Item item, ItemContextLink itemContextLink) throws PersistenceException {
|
||||
IFolder linksFolder = getLinksFolder(getItemProjectLabel(item));
|
||||
if (!linksFolder.exists()) {
|
||||
ResourceUtils.createFolder(linksFolder);
|
||||
}
|
||||
IFile linkFile = calContextLinkFile(item);
|
||||
saveContextLinkToJson(linkFile, itemContextLink);
|
||||
}
|
||||
|
||||
public synchronized void saveContextLinkToJson(IFile linkFile, ItemContextLink itemContextLink) throws PersistenceException {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
String content = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(itemContextLink);
|
||||
@@ -296,6 +172,25 @@ public class ContextLinkService {
|
||||
return contextLink;
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink doLoadContextLinkFromFile(InputStream inputStream) throws PersistenceException {
|
||||
if (inputStream == null) {
|
||||
return null;
|
||||
}
|
||||
ItemContextLink contextLink = null;
|
||||
try {
|
||||
contextLink = new ObjectMapper().readValue(inputStream, ItemContextLink.class);
|
||||
} catch (IOException e) {
|
||||
throw new PersistenceException(e);
|
||||
} finally {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
LOGGER.info("Close input stream failed.");
|
||||
}
|
||||
}
|
||||
return contextLink;
|
||||
}
|
||||
|
||||
public synchronized void deleteContextLinkJsonFile(Item item) throws PersistenceException {
|
||||
IFile linkFile = calContextLinkFile(item);
|
||||
if (linkFile != null && linkFile.exists()) {
|
||||
@@ -307,6 +202,74 @@ public class ContextLinkService {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void updateRelatedContextParameterId(String sourceId, Map<String, String> repositoryIdChangedMap,
|
||||
Map<String, Map<String, String>> changedContextParameterId) throws PersistenceException {
|
||||
List<Relation> relationList = RelationshipItemBuilder.getInstance()
|
||||
.getItemsHaveRelationWith(sourceId, RelationshipItemBuilder.LATEST_VERSION, false);
|
||||
for (Relation relation : relationList) {
|
||||
String id = relation.getId();
|
||||
IFile linkFile = calContextLinkFile(ProjectManager.getInstance().getCurrentProject().getTechnicalLabel(), id);
|
||||
ItemContextLink itemContextLink = doLoadContextLinkFromFile(linkFile);
|
||||
String newRepoId = null;
|
||||
boolean isModified = false;
|
||||
if (repositoryIdChangedMap != null && repositoryIdChangedMap.containsKey(sourceId)) {
|
||||
newRepoId = repositoryIdChangedMap.get(sourceId);
|
||||
}
|
||||
if (itemContextLink != null) {
|
||||
for (ContextLink contextLink : itemContextLink.getContextList()) {
|
||||
for (String repoId : changedContextParameterId.keySet()) {
|
||||
if (StringUtils.equals(repoId, contextLink.getRepoId())) {
|
||||
Map<String, String> oldToNewId = changedContextParameterId.get(repoId);
|
||||
for (String oldId : oldToNewId.keySet()) {
|
||||
ContextParamLink paramLink = contextLink.getParamLinkById(oldId);
|
||||
if (paramLink != null) {
|
||||
paramLink.setId(oldToNewId.get(oldId));
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sourceId.equals(repoId) && newRepoId != null) {
|
||||
isModified = true;
|
||||
contextLink.setRepoId(newRepoId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isModified) {
|
||||
saveContextLinkToJson(linkFile, itemContextLink);
|
||||
}
|
||||
}
|
||||
isModified = false;
|
||||
if (newRepoId != null) {
|
||||
Item relatedItem = ContextUtils.getRepositoryContextItemById(id);
|
||||
if (relatedItem != null) {
|
||||
List contextTypes = ContextUtils.getAllContextType(relatedItem);
|
||||
if (contextTypes != null) {
|
||||
for (Object object : contextTypes) {
|
||||
if (object instanceof ContextType) {
|
||||
ContextType context = (ContextType) object;
|
||||
for (Object obj : context.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType parameterType = (ContextParameterType) obj;
|
||||
if (!ContextUtils.isBuildInParameter(parameterType)
|
||||
&& sourceId.equals(parameterType.getRepositoryContextId())) {
|
||||
parameterType.setRepositoryContextId(newRepoId);
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isModified) {
|
||||
IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
|
||||
factory.save(relatedItem, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static IFile calContextLinkFile(Item item) throws PersistenceException {
|
||||
if (item == null) {
|
||||
return null;
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.properties.Item;
|
||||
|
||||
@@ -23,4 +25,7 @@ public interface IItemContextLinkService {
|
||||
|
||||
ItemContextLink loadItemLink(Item item) throws PersistenceException;
|
||||
|
||||
boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream otherVersionLinkFile)
|
||||
throws PersistenceException;
|
||||
|
||||
}
|
||||
|
||||
@@ -59,6 +59,18 @@ public class ItemContextLink {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextParamLink findContextParamLinkByIdIgnoreContextName(String repoContextId, String paramId) {
|
||||
for (ContextLink contextLink : contextList) {
|
||||
if (StringUtils.equals(repoContextId, contextLink.getRepoId())) {
|
||||
ContextParamLink paramLink = contextLink.getParamLinkById(paramId);
|
||||
if (paramLink != null) {
|
||||
return paramLink;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextLink findContextLink(String repoContextId, String contextName) {
|
||||
for (ContextLink contextLink : contextList) {
|
||||
if ((repoContextId == null || StringUtils.equals(repoContextId, contextLink.getRepoId()))
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
|
||||
|
||||
public class ProcessItemContextLinkService extends AbstractItemContextLinkService {
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item) {
|
||||
if (item instanceof ProcessItem || item instanceof JobletProcessItem) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveItemLink(Item item) throws PersistenceException {
|
||||
if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return saveContextLink(processItem.getProcess().getContext(), item);
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletItem = (JobletProcessItem) item;
|
||||
return saveContextLink(jobletItem.getJobletProcess().getContext(), item);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemContextLink loadItemLink(Item item) throws PersistenceException {
|
||||
return ContextLinkService.getInstance().doLoadContextLinkFromJson(item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.talend.core.model.metadata;
|
||||
|
||||
public class DbDefaultDatePattern {
|
||||
private String defaultPattern;
|
||||
private String dbTypeName;
|
||||
|
||||
public DbDefaultDatePattern() {
|
||||
|
||||
}
|
||||
|
||||
public String getDefaultPattern() {
|
||||
return defaultPattern;
|
||||
}
|
||||
|
||||
public void setDefaultPattern(String defaultPattern) {
|
||||
this.defaultPattern = defaultPattern;
|
||||
}
|
||||
|
||||
public String getDbTypeName() {
|
||||
return dbTypeName;
|
||||
}
|
||||
|
||||
public void setDbTypeName(String dbTypeName) {
|
||||
this.dbTypeName = dbTypeName;
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,8 @@ public class Dbms {
|
||||
private Set<MappingType> talendToDbTypes;
|
||||
|
||||
private List<DbDefaultLengthAndPrecision> defaultLengthPrecision;
|
||||
|
||||
private List<DbDefaultDatePattern> defaultPattern;
|
||||
|
||||
private List<DbIgnoreLengthAndPrecision> ignoreLengthPrecision;
|
||||
|
||||
@@ -62,6 +64,14 @@ public class Dbms {
|
||||
List<DbDefaultLengthAndPrecision> defaultLengthPrecision) {
|
||||
this.defaultLengthPrecision = defaultLengthPrecision;
|
||||
}
|
||||
public List<DbDefaultDatePattern> getDefaultPattern() {
|
||||
return defaultPattern;
|
||||
}
|
||||
|
||||
public void setDefaultPattern(
|
||||
List<DbDefaultDatePattern> defaultLengthPrecision) {
|
||||
this.defaultPattern = defaultLengthPrecision;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC amaumont Dbms constructor comment.
|
||||
|
||||
@@ -125,10 +125,12 @@ public class MappingFileLoader {
|
||||
// search and load preBeforelen nodes
|
||||
ArrayList<String> dbTypes = new ArrayList<String>();
|
||||
ArrayList<DbDefaultLengthAndPrecision> dbDefault = new ArrayList<DbDefaultLengthAndPrecision>();
|
||||
ArrayList<DbDefaultDatePattern> dbDefaultPattern = new ArrayList<DbDefaultDatePattern>();
|
||||
ArrayList<DbIgnoreLengthAndPrecision> dbIgnore = new ArrayList<DbIgnoreLengthAndPrecision>();
|
||||
ArrayList<DbPreBeforeLength> dbPbeforeLList = new ArrayList<DbPreBeforeLength>();
|
||||
dbms.setDbmsTypes(dbTypes);
|
||||
dbms.setDefaultLengthPrecision(dbDefault);
|
||||
dbms.setDefaultPattern(dbDefaultPattern);
|
||||
dbms.setIgnoreLengthPrecision(dbIgnore);
|
||||
dbms.setPrebeforelength(dbPbeforeLList);
|
||||
List<Node> typeNodes = getChildElementNodes(dbTypesNode);
|
||||
@@ -149,19 +151,25 @@ public class MappingFileLoader {
|
||||
dbTypes.add(typeValue);
|
||||
hAllDbTypes.add(typeValue);
|
||||
DbDefaultLengthAndPrecision dbDefaultLP = new DbDefaultLengthAndPrecision();
|
||||
DbDefaultDatePattern dbDefaultPt = new DbDefaultDatePattern();
|
||||
DbIgnoreLengthAndPrecision dbIgnoreLP = new DbIgnoreLengthAndPrecision();
|
||||
DbPreBeforeLength dbPBeforeL = new DbPreBeforeLength();
|
||||
// default length and precision
|
||||
Node defaultLengthItem = typeNodeAtttributes.getNamedItem("defaultLength"); //$NON-NLS-1$
|
||||
Node defaultPrecision = typeNodeAtttributes.getNamedItem("defaultPrecision"); //$NON-NLS-1$
|
||||
Node defaultPattern = typeNodeAtttributes.getNamedItem("defaultPattern"); //$NON-NLS-1$
|
||||
|
||||
if (defaultLengthItem != null)
|
||||
dbDefaultLP.setDefaultLength(Integer.parseInt(defaultLengthItem.getNodeValue()));
|
||||
if (defaultPrecision != null)
|
||||
dbDefaultLP.setDefaultPrecision(Integer.parseInt(defaultPrecision.getNodeValue()));
|
||||
if (defaultPattern != null)
|
||||
dbDefaultPt.setDefaultPattern(defaultPattern.getNodeValue());
|
||||
|
||||
dbDefaultLP.setDbTypeName(typeValue);
|
||||
dbDefaultPt.setDbTypeName(typeValue);
|
||||
dbDefault.add(dbDefaultLP);
|
||||
dbDefaultPattern.add(dbDefaultPt);
|
||||
|
||||
// ignore Length and Precision
|
||||
Node ignoreLength = typeNodeAtttributes.getNamedItem("ignoreLen"); //$NON-NLS-1$
|
||||
|
||||
@@ -191,6 +191,24 @@ public class MappingTypeRetriever {
|
||||
}// end for
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getDefaultPattern(String dbmsId, String dbType) {
|
||||
Dbms dbms = MetadataTalendType.getDbms(dbmsId);
|
||||
List<DbDefaultDatePattern> defaultPattern = dbms.getDefaultPattern();
|
||||
String pattern = new String(""); //$NON-NLS-1$
|
||||
for (int i = 0; i < defaultPattern.size(); i++) {
|
||||
DbDefaultDatePattern dbPattern = (DbDefaultDatePattern) defaultPattern.get(i);
|
||||
if (dbPattern.getDbTypeName().equalsIgnoreCase(dbType)) {
|
||||
pattern = dbPattern.getDefaultPattern();
|
||||
if (pattern == null) {
|
||||
return "";
|
||||
} else {
|
||||
return pattern;
|
||||
}
|
||||
}// end if
|
||||
}// end for
|
||||
return pattern;
|
||||
}
|
||||
|
||||
private boolean isExtensionPrecisionIgnored(String dbmsId, String dbType) {
|
||||
Map<String, Map<String, List<DBTypeUtil>>> javaTypeMappingFromExtension = JavaTypesManager
|
||||
|
||||
@@ -76,6 +76,8 @@ public final class MetadataTalendType {
|
||||
|
||||
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
|
||||
|
||||
private static ECodeLanguage codeLanguage;
|
||||
|
||||
private static final String[] PERL_TYPES = new String[] { PerlTypesManager.BOOLEAN, PerlTypesManager.DATE,
|
||||
@@ -476,7 +478,7 @@ public final class MetadataTalendType {
|
||||
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
|
||||
ICoreService service = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
service = (ICoreService) GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
service.syncMappingsFileFromSystemToProject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,6 +621,7 @@ public final class MetadataToolHelper {
|
||||
target.getListColumns().addAll(columnsTAdd);
|
||||
target.sortCustomColumns();
|
||||
target.setLabel(source.getLabel());
|
||||
target.setDbms(source.getDbms());
|
||||
setTargetOriginalColumns(source, target);
|
||||
// List<String> originalColumnsList = null;
|
||||
// if (source.getOriginalColumns() != null) {
|
||||
|
||||
@@ -47,6 +47,10 @@ public enum EParameterNameForComponent {
|
||||
|
||||
PARA_NAME_HDINSIGHT_PASSWORD("HDINSIGHT_PASSWORD"), //$NON-NLS-1$
|
||||
|
||||
PARA_NAME_HDINSIGHT_STORAGE("HDINSIGHT_STORAGE"), //$NON-NLS-1$
|
||||
|
||||
PARA_NAME_HDINSIGHT_STORAGE_USE_TLS("HDINSIGHT_STORAGE_USE_TLS"), //$NON-NLS-1$
|
||||
|
||||
PARA_NAME_WASB_HOST("WASB_HOST"), //$NON-NLS-1$
|
||||
|
||||
PARA_NAME_WASB_CONTAINER("WASB_CONTAINER"), //$NON-NLS-1$
|
||||
|
||||
@@ -1752,7 +1752,9 @@ public class RepositoryToComponentProperty {
|
||||
EDatabaseTypeName typeFromDbType = EDatabaseTypeName.getTypeFromDbType(repositoryType);
|
||||
return typeFromDbType.getXMLType();
|
||||
}
|
||||
|
||||
if (StringUtils.equals("MAPPING", value)) {//$NON-NLS-1$
|
||||
return connection.getDbmsId();
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@@ -240,6 +240,11 @@ public class ContextParameterJavaTypeManager {
|
||||
if (javaType == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(javaType.equals(JavaTypesManager.PASSWORD)) {
|
||||
return "Password";
|
||||
}
|
||||
|
||||
Class primitiveClass = javaType.getPrimitiveClass();
|
||||
Class nullableClass = javaType.getNullableClass();
|
||||
if (nullable) {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.process;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsJobletReplaceNodeHandler extends AbsReplaceNodeHandler implements IJobletReplaceNodeHandler {
|
||||
|
||||
public AbsJobletReplaceNodeHandler(String prefix) {
|
||||
super();
|
||||
this.setPrefix(prefix);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.process;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsReplaceNodeHandler implements IReplaceNodeHandler {
|
||||
|
||||
private String prefix;
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -122,6 +122,8 @@ public abstract class AbstractNode implements INode {
|
||||
// for MR, tag this component is the ref(lookup) start node
|
||||
private boolean isRefNode = false;
|
||||
|
||||
private IReplaceNodeHandler replaceNodeHandler;
|
||||
|
||||
public String getComponentName() {
|
||||
return componentName;
|
||||
}
|
||||
@@ -1322,6 +1324,15 @@ public abstract class AbstractNode implements INode {
|
||||
return componentProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IReplaceNodeHandler getReplaceNodeHandler() {
|
||||
return replaceNodeHandler;
|
||||
}
|
||||
|
||||
public void setReplaceNodeHandler(IReplaceNodeHandler replaceNodeHandler) {
|
||||
this.replaceNodeHandler = replaceNodeHandler;
|
||||
}
|
||||
|
||||
public INode getRealGraphicalNode() {
|
||||
return realGraphicalNode;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.core.model.process;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -368,4 +369,38 @@ public class BigDataNode extends AbstractNode implements IBigDataNode {
|
||||
public void processDatasetConditions(){
|
||||
// BigDataNode does not do anything related to Dataset, only anabled from SparkNode
|
||||
}
|
||||
|
||||
public List<? extends IConnection> getIncomingConnections(EConnectionType... connectionTypes) {
|
||||
List<IConnection> conns = null;
|
||||
List<EConnectionType> types = Arrays.asList(connectionTypes);
|
||||
List<? extends IConnection> incomingConnections = this.getIncomingConnections();
|
||||
if (incomingConnections != null) {
|
||||
conns = new ArrayList<IConnection>();
|
||||
|
||||
for (int i = 0; i < incomingConnections.size(); i++) {
|
||||
IConnection connection = incomingConnections.get(i);
|
||||
if (types.contains(connection.getLineStyle())) {
|
||||
conns.add(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
return conns;
|
||||
}
|
||||
|
||||
public List<? extends IConnection> getOutgoingConnections(EConnectionType... connectionTypes) {
|
||||
List<IConnection> conns = null;
|
||||
List<EConnectionType> types = Arrays.asList(connectionTypes);
|
||||
List<? extends IConnection> incomingConnections = this.getOutgoingConnections();
|
||||
if (incomingConnections != null) {
|
||||
conns = new ArrayList<IConnection>();
|
||||
|
||||
for (int i = 0; i < incomingConnections.size(); i++) {
|
||||
IConnection connection = incomingConnections.get(i);
|
||||
if (types.contains(connection.getLineStyle())) {
|
||||
conns.add(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
return conns;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user