Compare commits
399 Commits
cmeng/stig
...
release/8.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557afc2b02 | ||
|
|
965a4d5a3b | ||
|
|
bde2e73cfa | ||
|
|
421dde4b8e | ||
|
|
037502c43c | ||
|
|
12345b5216 | ||
|
|
850a8cbdf6 | ||
|
|
fe6ed85b34 | ||
|
|
46a2aac8c1 | ||
|
|
424266a771 | ||
|
|
d2751b3e59 | ||
|
|
90aeb07148 | ||
|
|
ef76386e26 | ||
|
|
a76d9081dc | ||
|
|
6d10555da1 | ||
|
|
6aec89ed62 | ||
|
|
4d5c0aba06 | ||
|
|
156a67b79a | ||
|
|
0de0c82b35 | ||
|
|
83d720a6df | ||
|
|
bba3a2a7ff | ||
|
|
33e9a9bf7c | ||
|
|
865d4317ea | ||
|
|
8949a8291a | ||
|
|
620a43e169 | ||
|
|
6143714a75 | ||
|
|
613ec4e1ae | ||
|
|
c2f33ca3c7 | ||
|
|
ee7e8a0a32 | ||
|
|
f28610deb2 | ||
|
|
77b762d835 | ||
|
|
c8ff7f0115 | ||
|
|
257085413d | ||
|
|
743861d278 | ||
|
|
a464909db1 | ||
|
|
33121074d8 | ||
|
|
3e3eca887d | ||
|
|
81991f3acf | ||
|
|
cc7f8e4183 | ||
|
|
718c7055c5 | ||
|
|
74b613a5e4 | ||
|
|
c1e0c419e3 | ||
|
|
4b5b9ad5c5 | ||
|
|
0b9dc184ec | ||
|
|
65fc3816e2 | ||
|
|
0ac2233c7f | ||
|
|
a5fce652e2 | ||
|
|
62c3cd96fc | ||
|
|
617d7a0971 | ||
|
|
8e71165264 | ||
|
|
cee928c438 | ||
|
|
30139714d4 | ||
|
|
d31a64654e | ||
|
|
22f590c376 | ||
|
|
aba7988f3b | ||
|
|
7e0ef66029 | ||
|
|
cc953fa42f | ||
|
|
6efda8ecae | ||
|
|
396f9ef099 | ||
|
|
d6acf0a5be | ||
|
|
50cdd7f3c6 | ||
|
|
508867dce3 | ||
|
|
7cf9823f64 | ||
|
|
80f3b27c0c | ||
|
|
d872ced133 | ||
|
|
2d9fffa6d4 | ||
|
|
bf8135943a | ||
|
|
83ec5c0d42 | ||
|
|
26a119649b | ||
|
|
be594bc22c | ||
|
|
f917599a0c | ||
|
|
90c5220f08 | ||
|
|
b963938b24 | ||
|
|
37af226974 | ||
|
|
3a7614ee6a | ||
|
|
efd27e4ec9 | ||
|
|
e12e687963 | ||
|
|
9c1122e971 | ||
|
|
b684d299f4 | ||
|
|
c6b22629fd | ||
|
|
355d94e5de | ||
|
|
6318fb8131 | ||
|
|
a490fe61ab | ||
|
|
2b6fe49b09 | ||
|
|
351bf44095 | ||
|
|
5bab4f7de2 | ||
|
|
9479f25100 | ||
|
|
fc7cae42bf | ||
|
|
c8dcf3e70e | ||
|
|
3b7f69525c | ||
|
|
996d2ee452 | ||
|
|
a695e44d7f | ||
|
|
f77aadd99f | ||
|
|
e1743f86d3 | ||
|
|
5ef866743b | ||
|
|
656987c139 | ||
|
|
e8902f55cc | ||
|
|
024bd7bf5c | ||
|
|
5e1d06edf6 | ||
|
|
73699ce3c1 | ||
|
|
b218688c82 | ||
|
|
5fb4b545f4 | ||
|
|
4d9fa8adee | ||
|
|
75c8efe0f0 | ||
|
|
cfc2a29f92 | ||
|
|
3c2ccf0f38 | ||
|
|
48905f03a9 | ||
|
|
c88e5002b3 | ||
|
|
af3ca0c30d | ||
|
|
dc687f1a50 | ||
|
|
14a610a72b | ||
|
|
153a831b0b | ||
|
|
2bcc470833 | ||
|
|
88d10b08ec | ||
|
|
5687315bd2 | ||
|
|
7cfce8de2a | ||
|
|
da7f173be2 | ||
|
|
f5a6347377 | ||
|
|
e7ba1d5016 | ||
|
|
ba1ee02e4e | ||
|
|
a5df51204e | ||
|
|
dfe132d87e | ||
|
|
4c0b9c6f91 | ||
|
|
16b6699cc9 | ||
|
|
3f57a592d1 | ||
|
|
74bc5ee66f | ||
|
|
6a0c96627f | ||
|
|
ecf339a6ca | ||
|
|
dc5c3d0ec9 | ||
|
|
503924aa75 | ||
|
|
4ed461840a | ||
|
|
cafa72f52a | ||
|
|
af62f01007 | ||
|
|
5e4b9311a9 | ||
|
|
a6164bf006 | ||
|
|
24622068ec | ||
|
|
ad085163f9 | ||
|
|
4ba9104034 | ||
|
|
216082efac | ||
|
|
d652f86bf2 | ||
|
|
c6620e03e6 | ||
|
|
d44180bf64 | ||
|
|
e754516075 | ||
|
|
e192a5a747 | ||
|
|
9e602c54ad | ||
|
|
0d098da3bc | ||
|
|
8843c51255 | ||
|
|
3207338fe6 | ||
|
|
aed39722eb | ||
|
|
6e0d5400bf | ||
|
|
afa700b229 | ||
|
|
bb48918802 | ||
|
|
54e08f8d10 | ||
|
|
ce221bc5b3 | ||
|
|
45ee6a61eb | ||
|
|
d03c572ed4 | ||
|
|
5cd44b8318 | ||
|
|
e4cff52913 | ||
|
|
21a9fcae19 | ||
|
|
4c2ed00331 | ||
|
|
b16c6c5d0e | ||
|
|
503077af62 | ||
|
|
155beefd6b | ||
|
|
a068fcdf66 | ||
|
|
81ec0e7368 | ||
|
|
f30930d483 | ||
|
|
c4abb4e764 | ||
|
|
c66b0b1101 | ||
|
|
287d7733bc | ||
|
|
5bcbdc1ca9 | ||
|
|
74f6189a58 | ||
|
|
dc66db4b77 | ||
|
|
52224ab37c | ||
|
|
a0423027d2 | ||
|
|
c0359b5b78 | ||
|
|
239b697b01 | ||
|
|
0142e33068 | ||
|
|
0451c982ab | ||
|
|
a221cab814 | ||
|
|
f649cdaa0d | ||
|
|
f6f1ff0c8e | ||
|
|
85e0d731ec | ||
|
|
8d0e77ffd7 | ||
|
|
d2ce5eb839 | ||
|
|
cac1899508 | ||
|
|
c3710b0199 | ||
|
|
48baa99ee7 | ||
|
|
a2a2fdc4c1 | ||
|
|
73375cda48 | ||
|
|
c49e6af190 | ||
|
|
a2c9fb3308 | ||
|
|
812a94119c | ||
|
|
f26a582453 | ||
|
|
7228acdfaf | ||
|
|
09c48442c1 | ||
|
|
af128c8734 | ||
|
|
a7bfec2ca6 | ||
|
|
063fff3ba9 | ||
|
|
8f899d61c5 | ||
|
|
ed91d67ccc | ||
|
|
0eae9a3add | ||
|
|
9d2f2d25ae | ||
|
|
9c6a4cfd9c | ||
|
|
5c9555669a | ||
|
|
4a9f849581 | ||
|
|
767fb94ff3 | ||
|
|
1543d95ed5 | ||
|
|
9401dfdfa2 | ||
|
|
8f794d57eb | ||
|
|
139ee4790a | ||
|
|
e8c59475c0 | ||
|
|
b30ceb1644 | ||
|
|
8339e97e6f | ||
|
|
dbc7b38790 | ||
|
|
a4c10d3e7f | ||
|
|
129274171f | ||
|
|
d2a1b44dc5 | ||
|
|
6976cb5f7c | ||
|
|
6acab4ee3f | ||
|
|
b68673389c | ||
|
|
06aea8f475 | ||
|
|
c41901deea | ||
|
|
0a926f8c03 | ||
|
|
53f53ace47 | ||
|
|
ad29b74b2a | ||
|
|
56ae308496 | ||
|
|
c3b356d954 | ||
|
|
5eaf89d87e | ||
|
|
b2f0466ce3 | ||
|
|
6f07c4da98 | ||
|
|
80a1ccd382 | ||
|
|
27dfb6a195 | ||
|
|
330e31abb6 | ||
|
|
8763339c06 | ||
|
|
e6946750e0 | ||
|
|
e914973534 | ||
|
|
668987a61b | ||
|
|
0accf530d1 | ||
|
|
44341a7f9b | ||
|
|
ff46e1bab5 | ||
|
|
46b4b3a8db | ||
|
|
eb9690239d | ||
|
|
7bbef8f4b2 | ||
|
|
df8f2bee44 | ||
|
|
ec8bf846c8 | ||
|
|
61a97e6f00 | ||
|
|
09cc2ab88d | ||
|
|
8abfa5691b | ||
|
|
5d90e3ddf9 | ||
|
|
51e101a2d6 | ||
|
|
e501f74225 | ||
|
|
bbe564d285 | ||
|
|
ca6dd0414d | ||
|
|
7c81cea780 | ||
|
|
c4196919f7 | ||
|
|
fccaad16b0 | ||
|
|
78295beef0 | ||
|
|
ce8da37a4a | ||
|
|
7e29ffef3b | ||
|
|
9a72cf74ae | ||
|
|
9b02401b3f | ||
|
|
de0005397b | ||
|
|
1b99ea876d | ||
|
|
1cf24c225c | ||
|
|
340f3e3029 | ||
|
|
b625946c87 | ||
|
|
1944bc03fe | ||
|
|
f8ae64d1a6 | ||
|
|
ca2ebecc4e | ||
|
|
3e276b2faa | ||
|
|
5ed90797f0 | ||
|
|
b8d9189565 | ||
|
|
9c80461254 | ||
|
|
b301fec008 | ||
|
|
f369769f4d | ||
|
|
66b27d8a65 | ||
|
|
de1c6ab17e | ||
|
|
fd64f25f47 | ||
|
|
7cece59991 | ||
|
|
3515f254e8 | ||
|
|
4124061a46 | ||
|
|
3c9cc66ffa | ||
|
|
21aed909e7 | ||
|
|
9987c00841 | ||
|
|
5cf8ee359c | ||
|
|
a33889b88d | ||
|
|
c7aefba2a6 | ||
|
|
e906b6925b | ||
|
|
bdc5ccd55b | ||
|
|
0e1b35e7de | ||
|
|
4ba66eddcd | ||
|
|
b5bed2a301 | ||
|
|
fc33cddda6 | ||
|
|
f5e702a00e | ||
|
|
ccab416ff2 | ||
|
|
f1393a7d51 | ||
|
|
ce12083ea6 | ||
|
|
a669d7f92a | ||
|
|
72668901f0 | ||
|
|
7dd57d3b8a | ||
|
|
b83974b619 | ||
|
|
2f2db71457 | ||
|
|
38befbe884 | ||
|
|
74c96bca38 | ||
|
|
0fe5142ec4 | ||
|
|
8810097d4b | ||
|
|
440986e764 | ||
|
|
290bcee6eb | ||
|
|
6b2b710b9f | ||
|
|
21232bf4e4 | ||
|
|
ed81969198 | ||
|
|
f19b61bb60 | ||
|
|
455ed6e133 | ||
|
|
f4925493d8 | ||
|
|
b52a7c0c15 | ||
|
|
77bfe5f89f | ||
|
|
3beb45da54 | ||
|
|
e0b63e2692 | ||
|
|
e18d768d45 | ||
|
|
c926c78297 | ||
|
|
4a473f97bd | ||
|
|
fe3969b4da | ||
|
|
3ef0cbce5f | ||
|
|
6d68cd1e26 | ||
|
|
897730f107 | ||
|
|
b23971ce4b | ||
|
|
091637fba2 | ||
|
|
8fa6b6e972 | ||
|
|
dc2d37a3f2 | ||
|
|
76ba5fa734 | ||
|
|
aab581232e | ||
|
|
7293f33b65 | ||
|
|
89e5ab0ae6 | ||
|
|
efdc58a2a2 | ||
|
|
d0a82b708b | ||
|
|
86e9c0287b | ||
|
|
93b6012426 | ||
|
|
3eaf1769d9 | ||
|
|
045405ff29 | ||
|
|
feba8702bc | ||
|
|
70b21e3faf | ||
|
|
5be1510aed | ||
|
|
a437c4d2b5 | ||
|
|
3871353f4b | ||
|
|
c451cc14b3 | ||
|
|
6201ede2a4 | ||
|
|
570cefddf5 | ||
|
|
ff17aa0b4d | ||
|
|
a6848c5f64 | ||
|
|
77c1caf679 | ||
|
|
9bdee7ea3c | ||
|
|
74f469e17f | ||
|
|
cb9d039027 | ||
|
|
7c8d50725a | ||
|
|
01bf5e8539 | ||
|
|
a565767101 | ||
|
|
8d63a02566 | ||
|
|
7115862cc3 | ||
|
|
1cc3a2935d | ||
|
|
2f423ba276 | ||
|
|
3484f0f782 | ||
|
|
7594d7d541 | ||
|
|
3d8ca2eddb | ||
|
|
c7552be2ed | ||
|
|
a0f44a7991 | ||
|
|
fdadf536c9 | ||
|
|
c0fe39749a | ||
|
|
86c0efb4a3 | ||
|
|
d1568a294d | ||
|
|
683228e53a | ||
|
|
7c774542aa | ||
|
|
f384da5e85 | ||
|
|
08b62b8f69 | ||
|
|
b8689e25c1 | ||
|
|
aca3de12e6 | ||
|
|
d11a664df6 | ||
|
|
1602306e93 | ||
|
|
497a7b63e0 | ||
|
|
635210a114 | ||
|
|
6f8bc10c6f | ||
|
|
606aa40664 | ||
|
|
16791ae92d | ||
|
|
fdb83c5620 | ||
|
|
59f8f6c3ce | ||
|
|
0cfdb4ecdd | ||
|
|
0029c41b81 | ||
|
|
761ac868c5 | ||
|
|
40c7bbd422 | ||
|
|
93024e2d02 | ||
|
|
594b972bd2 | ||
|
|
082b262552 | ||
|
|
147d0826db | ||
|
|
0ac05064df | ||
|
|
d26e65929e | ||
|
|
acf4f73876 | ||
|
|
6ebca7beda | ||
|
|
cf73cae37e | ||
|
|
7d6625d66c | ||
|
|
a4acc6db37 |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.commons.feature" label="Commons Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.commons.feature" label="Commons Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#commons-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#commons-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.core.feature" label="Core Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.core.feature" label="Core Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#core-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#core-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.fragment.jars.common.feature"
|
||||
label="Fragment Jars in Common"
|
||||
version="8.8.8.qualifier">
|
||||
version="8.0.1.qualifier">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
@@ -56,5 +56,12 @@
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="true"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.signon.util"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.common.feature</artifactId>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#help-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#help-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.libraries.jdbc.feature" label="Jdbc_feature Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.libraries.jdbc.feature" label="Jdbc_feature Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.platform.feature"
|
||||
label="Platform featrue"
|
||||
version="8.8.8.qualifier"
|
||||
version="8.0.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#platform-feature">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.platform.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.rcp.feature"
|
||||
label="RCP Feature"
|
||||
version="8.8.8.qualifier"
|
||||
version="8.0.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#rcp-feature">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.update.p2.feature" label="P2-feature" version="8.8.8.qualifier">
|
||||
<feature id="org.talend.update.p2.feature" label="P2-feature" version="8.0.1.qualifier">
|
||||
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.updates.feature" label="Updates-feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.updates.feature" label="Updates-feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<copyright url="http://www.talend.com/about-us">[Enter Copyright Description here.]</copyright>
|
||||
<plugin id="org.talend.updates.runtime" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.utils.feature" label="Utils_feature Feature" version="8.8.8.qualifier">
|
||||
<feature id="org.talend.utils.feature" label="Utils_feature Feature" version="8.0.1.qualifier">
|
||||
<description url="http://www.example.com/description">This feature contains the Talend utilities plugin and its dependencies.</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
@@ -21,11 +21,11 @@
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.binding.log4j12" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.talend.studio.studio-utils" version="0.0.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.crypto.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.studio.studio-utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.platform.logging" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common UI runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.common.ui.runtime;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.apache.commons.collections,
|
||||
org.talend.libraries.dom4j-jaxen,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -72,12 +72,27 @@ public final class MessageBoxExceptionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
CommonExceptionHandler.process(ex);
|
||||
|
||||
if (CommonsPlugin.isHeadless() || CommonsPlugin.isJUnitTest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (shell != null) {
|
||||
showMessage(ex, shell, wrapMessage);
|
||||
}
|
||||
}
|
||||
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
showMessage(ex, shell, true);
|
||||
}
|
||||
/**
|
||||
* Open a message box showing a generic message and exception message.
|
||||
*
|
||||
* @param ex - exception to show
|
||||
*/
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
public static void showMessage(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
if (ex.equals(lastShowedAction)) {
|
||||
return;
|
||||
}
|
||||
@@ -85,10 +100,14 @@ public final class MessageBoxExceptionHandler {
|
||||
|
||||
// TODO smallet use ErrorDialogWidthDetailArea ?
|
||||
String title = Messages.getString("commons.error"); //$NON-NLS-1$
|
||||
String msg = Messages.getString("exception.errorOccured", ex.getMessage()); //$NON-NLS-1$
|
||||
String excepMsg = ex.getMessage();
|
||||
//add for tup-19726/19790, as for exception detailMessage will show more details on log area.
|
||||
if(ex.getCause()!=null) {
|
||||
msg = Messages.getString("exception.errorOccured", ex.getCause().getMessage()); //$NON-NLS-1$
|
||||
excepMsg = ex.getCause().getMessage();
|
||||
}
|
||||
String msg = Messages.getString("exception.errorOccured", excepMsg); //$NON-NLS-1$
|
||||
if (!wrapMessage) {
|
||||
msg = Messages.getString("exception.message", excepMsg); //$NON-NLS-1$
|
||||
}
|
||||
Priority priority = CommonExceptionHandler.getPriority(ex);
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=table is null
|
||||
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
|
||||
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
|
||||
commons.error=Error
|
||||
exception.message={0}\nSee log for more details.
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ModelSelectionDialog.Message=Please choose one option, or cancel.
|
||||
ModelSelectionDialog.Option=option
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=la table est null.
|
||||
TableViewerCreator.TableColumn.AssertMsg=La TableColumn de TableEditorColumn avec idProperty '{0}' n'a pas la bonne Table parente
|
||||
TreeToTablesLinker.Type.Unsupported=Ce type de currentControl n'est pas support\u00E9
|
||||
commons.error=Erreur
|
||||
exception.message={0}\nConsultez le log pour plus de d\u00E9tails.
|
||||
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
|
||||
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
|
||||
ModelSelectionDialog.Option=Option
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u3067\u3059
|
||||
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306B\u306F\u3001\u6B63\u3057\u3044\u89AA\u30C6\u30FC\u30D6\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
TreeToTablesLinker.Type.Unsupported=currentControl\u306E\u3053\u306E\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
commons.error=\u30A8\u30E9\u30FC
|
||||
exception.message={0}\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
|
||||
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
|
||||
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
|
||||
commons.error=\u9519\u8BEF
|
||||
exception.message={0}\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
|
||||
ModelSelectionDialog.Option=\u9009\u9879
|
||||
|
||||
@@ -16,8 +16,14 @@ import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.SWT;
|
||||
@@ -158,8 +164,35 @@ public class ImageUtils {
|
||||
return imageDes;
|
||||
}
|
||||
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = new HashMap<byte[], ImageDataProvider>();
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = Collections.synchronizedMap(new HashMap<byte[], ImageDataProvider>());
|
||||
private static Map<Long, byte[]> cachedImagesTimeKeeping = Collections.synchronizedMap(new HashMap<Long, byte[]>());
|
||||
|
||||
private static Thread clearImageFromDataCachedImages = new Thread() {
|
||||
@SuppressWarnings("static-access")
|
||||
public void run() {
|
||||
long timeout = 5 * 60 * 1000;
|
||||
while(true) {//remove older than 5 mins
|
||||
Set<Entry<Long, byte[]>> collect = cachedImagesTimeKeeping.entrySet().stream()
|
||||
.filter(entry -> (System.currentTimeMillis() - entry.getKey()) > timeout).collect(Collectors.toSet());
|
||||
for(Entry<Long, byte[]> entry: collect) {
|
||||
Long key = entry.getKey();
|
||||
cachedImagesTimeKeeping.remove(key);
|
||||
imageFromDataCachedImages.remove(entry.getValue());
|
||||
}
|
||||
|
||||
try {
|
||||
sleep(timeout);
|
||||
} catch (InterruptedException e) {//
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
static {
|
||||
clearImageFromDataCachedImages.setDaemon(true);
|
||||
clearImageFromDataCachedImages.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* By default, keep in memory the .
|
||||
*
|
||||
@@ -169,12 +202,17 @@ public class ImageUtils {
|
||||
*/
|
||||
public static ImageDescriptor createImageFromData(byte[] data, boolean... keepInMemory) {
|
||||
if (data != null) {
|
||||
ImageDataProvider imageProvider = imageFromDataCachedImages.get(data);
|
||||
ImageDataProvider imageProvider = null;
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageProvider = imageFromDataCachedImages.get(findKey.get());
|
||||
}
|
||||
if (imageProvider == null) {
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(data);
|
||||
ImageData img = new ImageData(bais);
|
||||
imageProvider = new TalendImageProvider(img);
|
||||
imageFromDataCachedImages.put(data, imageProvider);
|
||||
cachedImagesTimeKeeping.put(System.currentTimeMillis(), data);
|
||||
}
|
||||
return ImageDescriptor.createFromImageDataProvider(imageProvider);
|
||||
}
|
||||
@@ -183,8 +221,9 @@ public class ImageUtils {
|
||||
|
||||
public static void disposeImages(byte[] data) {
|
||||
if (data != null) {
|
||||
if (imageFromDataCachedImages.get(data) != null) {
|
||||
imageFromDataCachedImages.remove(data);
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageFromDataCachedImages.remove(findKey.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Enumeration;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
@@ -169,8 +170,52 @@ public class ZipFileUtils {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static void unZipFileEntry(File destFile, java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry) throws IOException {
|
||||
InputStream inputStream;
|
||||
FileOutputStream fileOut;
|
||||
if (entry.isDirectory()) {
|
||||
destFile.mkdirs();
|
||||
} else {
|
||||
File parent = destFile.getParentFile();
|
||||
if (parent != null && !parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
|
||||
inputStream = zipFile.getInputStream(entry);
|
||||
|
||||
fileOut = new FileOutputStream(destFile);
|
||||
byte[] buf = new byte[bufSize];
|
||||
int readedBytes;
|
||||
while ((readedBytes = inputStream.read(buf)) > 0) {
|
||||
fileOut.write(buf, 0, readedBytes);
|
||||
}
|
||||
fileOut.close();
|
||||
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void setBufSize(int bufSize) {
|
||||
ZipFileUtils.bufSize = bufSize;
|
||||
}
|
||||
|
||||
public static boolean isValidJarFile(String moduleFilePath) {
|
||||
if (moduleFilePath == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!new File(moduleFilePath).exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try (JarFile zip = new JarFile(moduleFilePath)) {
|
||||
zip.getManifest();
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.commons.runtime;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
org.apache.commons.commons-beanutils,
|
||||
org.apache.commons.collections,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
<version>1.2.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -52,10 +52,6 @@ public final class CommonExceptionHandler {
|
||||
log.log(Level.WARN, message);
|
||||
}
|
||||
|
||||
public static void error(String message) {
|
||||
log.log(Level.ERROR, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return priority corresponding to the exception implementation.
|
||||
*
|
||||
|
||||
@@ -120,7 +120,7 @@ public class NetworkUtil {
|
||||
if (StringUtils.isNotBlank(customUrl)) {
|
||||
return customUrl;
|
||||
} else {
|
||||
return "https://talend-update.talend.com/nexus/content/repositories/libraries/";
|
||||
return "https://talend-update.talend.com/nexus/content/groups/studio-libraries/";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,9 @@ public class EclipseCommandLine {
|
||||
static public final String PROP_KEY_PROFILE_ID = "eclipse.p2.profile";
|
||||
|
||||
static public final String ARG_BRANCH = "-branch";
|
||||
|
||||
|
||||
static public final String ARG_PROJECT = "-project";
|
||||
|
||||
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
|
||||
|
||||
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
|
||||
|
||||
@@ -1 +1 @@
|
||||
talend.version=8.8.8
|
||||
talend.version=8.0.1
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common UI Plug-in
|
||||
Bundle-SymbolicName: org.talend.commons.ui;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.jface.text,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.dialogs;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.talend.commons.ui.utils.image.ColorUtils;
|
||||
@@ -29,5 +31,7 @@ public interface IConfigModuleDialog {
|
||||
public String getMavenURI();
|
||||
|
||||
public int open();
|
||||
|
||||
public Map<String, String> getModulesMVNUrls();
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Automatic-Module-Name: org.talend.core.repository
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Repository Plug-in
|
||||
Bundle-SymbolicName: org.talend.core.repository;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.ui.ide,
|
||||
org.apache.commons.collections,
|
||||
@@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.talend.libraries.apache,
|
||||
org.eclipse.osgi.services,
|
||||
org.eclipse.ui.navigator,
|
||||
org.eclipse.e4.ui.css.swt.theme,
|
||||
org.talend.libraries.jackson
|
||||
Export-Package: org.talend.core.repository,
|
||||
org.talend.core.repository.constants,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -39,6 +39,7 @@ public final class Constant {
|
||||
*/
|
||||
public static final String ITEM_EVENT_PROPERTY_KEY = "item"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
|
||||
* cloudVersion string.
|
||||
@@ -50,7 +51,7 @@ public final class Constant {
|
||||
* cloudName string.
|
||||
*/
|
||||
public static final String VERSION_EVENT_CLOUD_NAME = "cloudName"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
@@ -68,15 +69,15 @@ public final class Constant {
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_EVENT_SUFFIX = "project"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* suffix used when issuing an event on the OSGI event bus when published to cloud.
|
||||
*/
|
||||
public static final String CLOUD_PUBLISH_EVENT_SUFFIX = "cloud"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_PROPERTY_KEY = "project"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* suffix used when issuing an event on the OSGI event bus when published to cloud.
|
||||
*/
|
||||
public static final String CLOUD_PUBLISH_EVENT_SUFFIX = "cloud"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.talend.repository.model.RepositoryConstants;
|
||||
*/
|
||||
public interface FileConstants {
|
||||
|
||||
String DOT = ".";
|
||||
|
||||
String OLD_TALEND_PROJECT_FILENAME = "talendProject"; //$NON-NLS-1$
|
||||
|
||||
String LOCAL_PROJECT_FILENAME = "talend.project"; //$NON-NLS-1$
|
||||
@@ -112,5 +114,4 @@ public interface FileConstants {
|
||||
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
|
||||
|
||||
String MAVEN_FOLDER_NAME = "MAVEN-INF";
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
|
||||
PropertiesWizardPage.Description=\u8AAC\u660E
|
||||
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
|
||||
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
|
||||
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
PropertiesWizardPage.Name=\u540D\u524D
|
||||
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
|
||||
|
||||
@@ -27,10 +27,6 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Level;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.PluginChecker;
|
||||
@@ -39,22 +35,22 @@ import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SQLPatternItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.pendo.AbstractPendoTrackManager;
|
||||
import org.talend.core.pendo.PendoDataTrackFactory;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.SignatureStatus;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.TOSProdNameEnum;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.ValueEnum;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.TrackEvent;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.pendo.properties.PendoSignLogonProperties;
|
||||
import org.talend.utils.migration.MigrationTokenUtil;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoItemSignatureManager {
|
||||
|
||||
private PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
|
||||
public class PendoItemSignatureManager extends AbstractPendoTrackManager {
|
||||
|
||||
private static PendoItemSignatureManager manager;
|
||||
|
||||
@@ -63,7 +59,7 @@ public class PendoItemSignatureManager {
|
||||
static {
|
||||
manager = new PendoItemSignatureManager();
|
||||
try {
|
||||
isTrackAvailable = PluginChecker.isTIS() && PendoTrackSender.getInstance().isTrackSendAvailable();
|
||||
isTrackAvailable = PluginChecker.isTIS() && PendoDataTrackFactory.getInstance().isTrackSendAvailable();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
@@ -87,11 +83,12 @@ public class PendoItemSignatureManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void collectProperties() {
|
||||
public IPendoDataProperties collectProperties() {
|
||||
ICoreService coreService = ICoreService.get();
|
||||
if (coreService == null || !isTrackAvailable) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
|
||||
try {
|
||||
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
|
||||
|
||||
@@ -188,6 +185,7 @@ public class PendoItemSignatureManager {
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return itemSignProperties;
|
||||
|
||||
}
|
||||
|
||||
@@ -258,23 +256,12 @@ public class PendoItemSignatureManager {
|
||||
if (!isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
Job job = new Job("send pendo track") {
|
||||
super.sendTrackToPendo();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
collectProperties();
|
||||
PendoTrackSender.getInstance().sendTrackData(TrackEvent.ITEM_SIGNATURE, itemSignProperties);
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
job.setUser(false);
|
||||
job.setPriority(Job.INTERACTIVE);
|
||||
job.schedule();
|
||||
@Override
|
||||
public TrackEvent getTrackEvent() {
|
||||
return TrackEvent.ITEM_SIGNATURE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2380,10 +2380,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
String str[] = new String[] { getRepositoryContext().getUser() + "", projectManager.getCurrentProject() + "" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.loggedOn", str)); //$NON-NLS-1$
|
||||
} catch (LoginException e) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
if (!LoginException.RESTART.equals(e.getKey())) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
} catch (PersistenceException e) {
|
||||
@@ -2561,7 +2563,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
public void logOffProject() {
|
||||
// getRepositoryContext().setProject(null);
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
ProjectRepositoryNode root = ProjectRepositoryNode.getInstance();
|
||||
if (root != null) {
|
||||
@@ -2617,6 +2618,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
fullLogonFinished = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,125 +1,127 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
|
||||
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
|
||||
/**
|
||||
* Provides, using extension points, implementation of many factories.
|
||||
*
|
||||
* <ul>
|
||||
* <li>IProcessFactory</li>
|
||||
* </ul>
|
||||
*
|
||||
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
|
||||
*/
|
||||
public class RepositoryFactoryProvider {
|
||||
|
||||
private static List<IRepositoryFactory> list = null;
|
||||
|
||||
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
|
||||
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
|
||||
"RepositoryFactory", 1, -1); //$NON-NLS-1$
|
||||
|
||||
public static List<IRepositoryFactory> getAvailableRepositories() {
|
||||
if (list == null) {
|
||||
list = new ArrayList<IRepositoryFactory>();
|
||||
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
|
||||
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
|
||||
String hiddenRepository[] = new String[]{};
|
||||
if (hiddenRepos != null) {
|
||||
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
boolean isPoweredByTalend = false;
|
||||
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
|
||||
.getService(IBrandingService.class);
|
||||
isPoweredByTalend = brandingService.isPoweredbyTalend();
|
||||
for (IConfigurationElement current : extension) {
|
||||
try {
|
||||
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
|
||||
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
|
||||
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
|
||||
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
|
||||
|
||||
// Getting dynamic login fields:
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
|
||||
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
|
||||
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
|
||||
currentAction.getFields().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
|
||||
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
|
||||
currentAction.getButtons().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
|
||||
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name")); //$NON-NLS-1$
|
||||
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
|
||||
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
|
||||
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
|
||||
key.addChoice(value, label);
|
||||
}
|
||||
currentAction.getChoices().add(key);
|
||||
}
|
||||
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
|
||||
continue;
|
||||
}
|
||||
list.add(currentAction);
|
||||
} catch (CoreException e) {
|
||||
// e.printStackTrace();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static IRepositoryFactory getRepositoriyById(String id) {
|
||||
for (IRepositoryFactory current : getAvailableRepositories()) {
|
||||
if (current.getId().equals(id)) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
|
||||
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
|
||||
/**
|
||||
* Provides, using extension points, implementation of many factories.
|
||||
*
|
||||
* <ul>
|
||||
* <li>IProcessFactory</li>
|
||||
* </ul>
|
||||
*
|
||||
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
|
||||
*/
|
||||
public class RepositoryFactoryProvider {
|
||||
|
||||
private static List<IRepositoryFactory> list = null;
|
||||
|
||||
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
|
||||
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
|
||||
"RepositoryFactory", 1, -1); //$NON-NLS-1$
|
||||
|
||||
public static synchronized List<IRepositoryFactory> getAvailableRepositories() {
|
||||
if (list == null) {
|
||||
list = new ArrayList<IRepositoryFactory>();
|
||||
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
|
||||
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
|
||||
String hiddenRepository[] = new String[]{};
|
||||
if (hiddenRepos != null) {
|
||||
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
boolean isPoweredByTalend = false;
|
||||
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
|
||||
.getService(IBrandingService.class);
|
||||
isPoweredByTalend = brandingService.isPoweredbyTalend();
|
||||
for (IConfigurationElement current : extension) {
|
||||
try {
|
||||
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
|
||||
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
|
||||
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
|
||||
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
|
||||
|
||||
// Getting dynamic login fields:
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
|
||||
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
|
||||
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
|
||||
currentAction.getFields().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
|
||||
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
|
||||
currentAction.getButtons().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
|
||||
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name")); //$NON-NLS-1$
|
||||
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
|
||||
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
|
||||
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
|
||||
key.addChoice(value, label);
|
||||
}
|
||||
currentAction.getChoices().add(key);
|
||||
}
|
||||
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
|
||||
continue;
|
||||
}
|
||||
list.add(currentAction);
|
||||
} catch (CoreException e) {
|
||||
// e.printStackTrace();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static IRepositoryFactory getRepositoriyById(String id) {
|
||||
for (IRepositoryFactory current : getAvailableRepositories()) {
|
||||
if (current.getId().equals(id)) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
ExceptionHandler.log("Can't find repository factory for: " + id);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,6 @@ package org.talend.core.repository.ui.view;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.e4.ui.css.swt.theme.ITheme;
|
||||
import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
|
||||
import org.eclipse.e4.ui.css.swt.theme.IThemeManager;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.viewers.IColorProvider;
|
||||
@@ -27,11 +23,6 @@ import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.runtime.model.repository.ECDCStatus;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
@@ -58,7 +49,6 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.RepositoryContentManager;
|
||||
import org.talend.core.model.repository.RepositoryNodeProviderRegistryReader;
|
||||
import org.talend.core.model.repository.RepositoryViewObject;
|
||||
import org.talend.core.repository.CoreRepositoryPlugin;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -97,8 +87,6 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
|
||||
private static final Color MERGED_REFERENCED_ITEMS_COLOR = new Color(null, 120, 120, 120);
|
||||
|
||||
private static final Color WHITE = new Color(null, 255, 255, 255);
|
||||
|
||||
private IRepositoryView view;
|
||||
|
||||
private static boolean refreshProperty = true;
|
||||
@@ -492,21 +480,6 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
@Override
|
||||
public Color getForeground(Object element) {
|
||||
RepositoryNode node = (RepositoryNode) element;
|
||||
try {
|
||||
Bundle bundle = Platform.getBundle(CoreRepositoryPlugin.PLUGIN_ID);
|
||||
BundleContext context = bundle.getBundleContext();
|
||||
ServiceReference ref = context.getServiceReference(IThemeManager.class.getName());
|
||||
IThemeManager manager = (IThemeManager) context.getService(ref);
|
||||
IThemeEngine engine = manager
|
||||
.getEngineForDisplay(PlatformUI.getWorkbench().getActiveWorkbenchWindow() == null ? Display.getCurrent()
|
||||
: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getDisplay());
|
||||
ITheme curTheme = engine.getActiveTheme();
|
||||
if (curTheme.getId().contains("dark")) {
|
||||
return null;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
switch (node.getType()) {
|
||||
case REFERENCED_PROJECT:
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
|
||||
@@ -48,6 +48,8 @@ import org.talend.commons.runtime.model.emf.provider.EmfResourcesFactoryReader;
|
||||
*/
|
||||
public class TalendResourceSet extends ResourceSetImpl {
|
||||
|
||||
private boolean showLog;
|
||||
|
||||
public TalendResourceSet() {
|
||||
super();
|
||||
|
||||
@@ -58,6 +60,14 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
getLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE);
|
||||
}
|
||||
|
||||
public boolean isShowLog() {
|
||||
return this.showLog;
|
||||
}
|
||||
|
||||
public void setShowLog(boolean showLog) {
|
||||
this.showLog = showLog;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -83,7 +93,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
Resource resource = map.get(uri);
|
||||
if (resource != null) {
|
||||
if (loadOnDemand && !resource.isLoaded()) {
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
@@ -99,7 +115,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
}
|
||||
if (theURIConverter.normalize(resource.getURI()).equals(normalizedURI)) {
|
||||
if (loadOnDemand && !resource.isLoaded()) {
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (map != null) {
|
||||
@@ -125,7 +147,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
+ "'; a registered resource factory is needed");
|
||||
}
|
||||
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (map != null) {
|
||||
map.put(uri, resource);
|
||||
|
||||
@@ -349,7 +349,7 @@ public class XmiResourceManager {
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
public Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
|
||||
private Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
|
||||
Resource itemResource;
|
||||
itemResource = getResourceSet().getResource(itemResourceURI, false);
|
||||
if (itemResource != null) {
|
||||
@@ -390,6 +390,10 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad) {
|
||||
return getItemResource(getResourceSet(), item, forceLoad, false);
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad, boolean showLog) {
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -402,13 +406,23 @@ public class XmiResourceManager {
|
||||
} else {
|
||||
itemResourceURI = getItemResourceURI(getItemURI(item));
|
||||
}
|
||||
Resource itemResource = resourceSet.getResource(itemResourceURI, false);
|
||||
if (forceLoad && itemResource == null) {
|
||||
if (item instanceof FileItem) {
|
||||
itemResource = new ByteArrayResource(itemResourceURI);
|
||||
resourceSet.getResources().add(itemResource);
|
||||
Resource itemResource = null;
|
||||
try {
|
||||
if (resourceSet instanceof TalendResourceSet) {
|
||||
((TalendResourceSet) resourceSet).setShowLog(showLog);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, false);
|
||||
if (forceLoad && itemResource == null) {
|
||||
if (item instanceof FileItem) {
|
||||
itemResource = new ByteArrayResource(itemResourceURI);
|
||||
resourceSet.getResources().add(itemResource);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, true);
|
||||
}
|
||||
return itemResource;
|
||||
}
|
||||
@@ -628,7 +642,7 @@ public class XmiResourceManager {
|
||||
|
||||
boolean isTestContainer = false;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
|
||||
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
|
||||
ITestContainerProviderService testContainerService = GlobalServiceRegister
|
||||
.getDefault().getService(ITestContainerProviderService.class);
|
||||
if (testContainerService != null) {
|
||||
isTestContainer = testContainerService.isTestContainerItem(property.getItem());
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.core.runtime;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Export-Package: org.talend.analysistask,
|
||||
@@ -129,7 +129,8 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common
|
||||
org.talend.libraries.apache.common,
|
||||
org.talend.signon.util
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -16,13 +16,13 @@ bin.includes = META-INF/,\
|
||||
lib/delight-rhino-sandbox-0.0.15.jar,\
|
||||
lib/rhino-1.7.13.jar,\
|
||||
plugin_de.properties,\
|
||||
plugin_en.properties,\
|
||||
plugin_fr.properties,\
|
||||
plugin_it.properties,\
|
||||
plugin_ja.properties,\
|
||||
plugin_ru.properties,\
|
||||
plugin_swtbot.properties,\
|
||||
plugin_zh_CN.properties
|
||||
plugin_zh_CN.properties,\
|
||||
resources/
|
||||
src.includes = META-INF/,\
|
||||
mappingMetadataTypes.xml,\
|
||||
mappings/,\
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
|
||||
# Component
|
||||
tSnowflakeConnection=java.base/java.nio
|
||||
tSnowflakeClose=java.base/java.nio
|
||||
tSnowflakeCommit=java.base/java.nio
|
||||
tSnowflakeInput=java.base/java.nio
|
||||
tSnowflakeOutput=java.base/java.nio
|
||||
tSnowflakeOutputBulk=java.base/java.nio
|
||||
tSnowflakeOutputBulkExec=java.base/java.nio
|
||||
tSnowflakeRow=java.base/java.nio
|
||||
tSnowflakeBulkExec=java.base/java.nio
|
||||
tSnowflakeRollback=java.base/java.nio
|
||||
|
||||
tCouchbaseInput=java.base/java.lang.invoke
|
||||
tCouchbaseOutput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPInput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPOutput=java.base/java.lang.invoke
|
||||
|
||||
tWriteJSONField=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tFTPClose=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPConnection=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPDelete=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileExist=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileList=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileProperties=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPGet=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPPut=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPRename=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPTruncate=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
|
||||
tNeo4jBatchOutput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchOutputRelationship=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchSchema=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jClose=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jConnection=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jImportTool=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jInput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jRow=java.base/java.lang,java.base/sun.nio.ch
|
||||
|
||||
tMongoDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
tCosmosDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tMatchGroup=java.base/java.io
|
||||
tRuleSurvivorship=java.base/java.lang
|
||||
tRecordMatching=java.base/java.io
|
||||
tDqReportRun=java.base/java.lang,java.base/java.nio
|
||||
|
||||
tWebService=java.base/java.lang
|
||||
tWebServiceInput=java.base/java.lang
|
||||
|
||||
# TCK framework
|
||||
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
|
||||
|
||||
# BigData distribution
|
||||
SPARK_3_3_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_2_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_1_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_2_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
@@ -33,6 +33,13 @@ public class AnalysisReportRecorder extends ItemReportRecorder {
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
public AnalysisReportRecorder(IItemAnalysisTask task, SeverityOption severity, String detailMessage) {
|
||||
super();
|
||||
this.task = task;
|
||||
this.severity = severity;
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return task.getName();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.analysistask;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
|
||||
/**
|
||||
* created by hcyi on Oct 26, 2022
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public class DefaultItemsAnalysisTask extends AbstractItemAnalysisTask {
|
||||
|
||||
public DefaultItemsAnalysisTask() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Set<ERepositoryObjectType> getRepositoryObjectTypeScope() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnalysisReportRecorder> execute(Item item) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
@@ -50,7 +51,9 @@ import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
@@ -73,7 +76,7 @@ public class ItemAnalysisReportManager {
|
||||
private AtomicBoolean inGenerating = new AtomicBoolean(false);
|
||||
|
||||
public List<AnalysisReportRecorder> executeAnalysisTask(Project project) {
|
||||
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();
|
||||
List<AnalysisReportRecorder> analysisResultList = new ArrayList<AnalysisReportRecorder>();
|
||||
List<IItemAnalysisTask> analysisTasks = ItemAnalysisTaskRegistryReader.getInstance().getItemAnalysisTasks();
|
||||
@@ -105,6 +108,16 @@ public class ItemAnalysisReportManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
ItemAnalysisTaskRegistryReader.getInstance().getAllItemURIsMap().clear();
|
||||
ItemAnalysisTaskRegistryReader.getInstance().getDuplicatedItemURIsMap().clear();
|
||||
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
|
||||
if (designerCoreService != null) {
|
||||
List<AnalysisReportRecorder> recorder = designerCoreService.analysis(project);
|
||||
if (recorder != null && !recorder.isEmpty()) {
|
||||
analysisResultList.addAll(recorder);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -190,6 +203,42 @@ public class ItemAnalysisReportManager {
|
||||
inGenerating.set(newValue);
|
||||
}
|
||||
|
||||
public String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
|
||||
ERepositoryObjectType rootItemType = itemType;
|
||||
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
|
||||
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
List<String> typeLabels = new ArrayList<String>();
|
||||
findOutCompleteTypePath(rootItemType, typeLabels);
|
||||
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
|
||||
IRepositoryService repositoryService = IRepositoryService.get();
|
||||
if (repositoryService != null) {
|
||||
String standardNodeLabel = repositoryService.getStandardNodeLabel();
|
||||
if (StringUtils.isNotBlank(standardNodeLabel)) {
|
||||
typeLabels.add(standardNodeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (!typeLabels.isEmpty()) {
|
||||
for (int i = 0; i < typeLabels.size(); i++) {
|
||||
if (i != 0) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(typeLabels.get(i));
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
|
||||
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
|
||||
if (parentType != null) {
|
||||
findOutCompleteTypePath(parentType, typeLabels);
|
||||
}
|
||||
typeLabels.add(type.getLabel());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AnalysisReportAccessDialog extends Dialog {
|
||||
|
||||
@@ -32,6 +32,10 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
|
||||
|
||||
private static final ItemAnalysisTaskRegistryReader INSTANCE = new ItemAnalysisTaskRegistryReader();
|
||||
|
||||
private Map<String, String> allItemURIsMap = new HashMap<String, String>();
|
||||
|
||||
private Map<String, List<String>> duplicatedItemURIsMap = new HashMap<String, List<String>>();
|
||||
|
||||
public static ItemAnalysisTaskRegistryReader getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
@@ -81,4 +85,17 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
|
||||
idItemAnalysisTaskMap.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for allItemURIsMap.
|
||||
*
|
||||
* @return the allItemURIsMap
|
||||
*/
|
||||
public Map<String, String> getAllItemURIsMap() {
|
||||
return this.allItemURIsMap;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getDuplicatedItemURIsMap() {
|
||||
return this.duplicatedItemURIsMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.report;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.analysistask.ItemAnalysisReportManager;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
@@ -23,7 +21,6 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.ui.ITestContainerCoreService;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
@@ -34,8 +31,15 @@ public class ItemReportRecorder {
|
||||
|
||||
protected String detailMessage;
|
||||
|
||||
protected String currentItemPath;
|
||||
|
||||
protected String currentItemType;
|
||||
|
||||
public String getItemType() {
|
||||
String type = "";
|
||||
if (item == null) {
|
||||
return currentItemType;
|
||||
}
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (itemType != null) {
|
||||
if (ERepositoryObjectType.getAllTypesOfTestContainer().contains(itemType)) {
|
||||
@@ -43,7 +47,7 @@ public class ItemReportRecorder {
|
||||
if (parentJobItem != null) {
|
||||
ERepositoryObjectType parentJobType = ERepositoryObjectType.getItemType(parentJobItem);
|
||||
if (parentJobType != null) {
|
||||
String parentTypePath = getCompleteObjectTypePath(parentJobType);
|
||||
String parentTypePath = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(parentJobType);
|
||||
if (StringUtils.isNotBlank(parentTypePath)) {
|
||||
type = parentTypePath + "/";
|
||||
}
|
||||
@@ -51,7 +55,7 @@ public class ItemReportRecorder {
|
||||
}
|
||||
type += itemType;
|
||||
} else {
|
||||
type = getCompleteObjectTypePath(itemType);
|
||||
type = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(itemType);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
@@ -59,6 +63,9 @@ public class ItemReportRecorder {
|
||||
|
||||
public String getItemPath() {
|
||||
String path = "";
|
||||
if (this.currentItemPath != null) {
|
||||
return this.currentItemPath;
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
|
||||
@@ -104,42 +111,6 @@ public class ItemReportRecorder {
|
||||
return parentJobItem;
|
||||
}
|
||||
|
||||
private String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
|
||||
ERepositoryObjectType rootItemType = itemType;
|
||||
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
|
||||
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
List<String> typeLabels = new ArrayList<String>();
|
||||
findOutCompleteTypePath(rootItemType, typeLabels);
|
||||
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
|
||||
IRepositoryService repositoryService = IRepositoryService.get();
|
||||
if (repositoryService != null) {
|
||||
String standardNodeLabel = repositoryService.getStandardNodeLabel();
|
||||
if (StringUtils.isNotBlank(standardNodeLabel)) {
|
||||
typeLabels.add(standardNodeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (!typeLabels.isEmpty()) {
|
||||
for (int i = 0; i < typeLabels.size(); i++) {
|
||||
if (i != 0) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(typeLabels.get(i));
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
|
||||
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
|
||||
if (parentType != null) {
|
||||
findOutCompleteTypePath(parentType, typeLabels);
|
||||
}
|
||||
typeLabels.add(type.getLabel());
|
||||
}
|
||||
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
@@ -148,6 +119,22 @@ public class ItemReportRecorder {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public String getCurrentItemPath() {
|
||||
return this.currentItemPath;
|
||||
}
|
||||
|
||||
public void setCurrentPath(String currentItemPath) {
|
||||
this.currentItemPath = currentItemPath;
|
||||
}
|
||||
|
||||
public String getCurrentItemType() {
|
||||
return this.currentItemType;
|
||||
}
|
||||
|
||||
public void setCurrentItemType(String currentItemType) {
|
||||
this.currentItemType = currentItemType;
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
return detailMessage;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ public final class JavaUtils {
|
||||
|
||||
public static final List<String> AVAILABLE_VERSIONS = Arrays.asList(JavaCore.VERSION_1_8 );
|
||||
|
||||
public static final String ALLOW_JAVA_INTERNAL_ACCESS = "allow.java.internal.access"; //$NON-NLS-1$
|
||||
|
||||
public static final String CUSTOM_ACCESS_SETTINGS = "custom.access.settings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROCESSOR_TYPE = "javaProcessor"; //$NON-NLS-1$
|
||||
|
||||
public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
|
||||
|
||||
@@ -53,5 +53,5 @@ public interface ILibraryManagerUIService extends IService {
|
||||
|
||||
public boolean confirmDialog(String originalJarFileName);
|
||||
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue);
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
|
||||
}
|
||||
|
||||
@@ -38,11 +38,10 @@ public interface ITDQCryptoFileService extends IService {
|
||||
* Generate Encrypty file
|
||||
*/
|
||||
public void generateCryptoFile(String passwordM1, String cryptoMethod, String cryptoFilePath);
|
||||
|
||||
|
||||
/**
|
||||
* Generate Encrypty file
|
||||
*/
|
||||
public void generateCryptoFile(String passwordM1, String cryptoMethod, String cryptoFilePath, int algoVersion);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@ package org.talend.core.context;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.service.ICloudSignOnService;
|
||||
|
||||
/**
|
||||
* DOC smallet class global comment. Detailled comment <br/>
|
||||
@@ -139,6 +141,14 @@ public class RepositoryContext {
|
||||
* @return the clearPassword
|
||||
*/
|
||||
public String getClearPassword() {
|
||||
try {
|
||||
if (ICloudSignOnService.get() != null && ICloudSignOnService.get().isSignViaCloud()) {
|
||||
return ICloudSignOnService.get().getLatestToken().getAccessToken();
|
||||
}
|
||||
}catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
|
||||
return clearPassword;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,8 +147,15 @@ public enum EDatabaseTypeName {
|
||||
|
||||
MAPRDB(
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
SNOWFLAKE(
|
||||
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
|
||||
"SNOWFLAKE",
|
||||
"SNOWFLAKE",
|
||||
Boolean.TRUE,
|
||||
"SNOWFLAKE",
|
||||
EDatabaseSchemaOrCatalogMapping.None,
|
||||
EDatabaseSchemaOrCatalogMapping.None,
|
||||
true);
|
||||
|
||||
// displayName is used in Java code.
|
||||
private String displayName;
|
||||
|
||||
@@ -387,6 +387,8 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_TIMEOUT="CONN_PARA_KEY_KNOX_TIMEOUT";
|
||||
|
||||
// CDE
|
||||
public static final String CONN_PARA_KEY_CDE_API_ENDPOINT="CONN_PARA_KEY_CDE_API_ENDPOINT";
|
||||
public static final String CONN_PARA_KEY_CDE_TOKEN="CONN_PARA_KEY_CDE_TOKEN";
|
||||
|
||||
@@ -27,8 +27,8 @@ import org.talend.core.database.conn.DatabaseConnConstants;
|
||||
public enum EDatabaseVersion4Drivers {
|
||||
// access
|
||||
ACCESS_JDBC(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, new String[] {
|
||||
"jackcess-2.1.0.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.1.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.0.jar", "bcprov-jdk15on-1.51.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
"jackcess-2.1.12.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.3.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.4.jar", "bcprov-jdk15on-1.70.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
ACCESS_2003(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2003", "Access_2003")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// oracle
|
||||
@@ -69,9 +69,9 @@ public enum EDatabaseVersion4Drivers {
|
||||
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
SAS_9_1(new DbVersion4Drivers(EDatabaseTypeName.SAS, "SAS 9.1", "SAS_9.1", new String[] { "sas.core.jar", //$NON-NLS-1$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
|
||||
// MYSQL, add for 9594
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -83,10 +83,9 @@ public enum EDatabaseVersion4Drivers {
|
||||
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc-actual.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", //$NON-NLS-1$
|
||||
"msal4j-1.11.0.jar",
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.19.jar", "jackson-core-2.13.2.jar",
|
||||
"jackson-databind-2.13.2.2.jar", "jackson-annotations-2.13.2.jar", "jcip-annotations-1.0-1.jar",
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.34.jar", "slf4j-reload4j-1.7.34.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.13.4.jar",
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
|
||||
|
||||
@@ -154,8 +153,8 @@ public enum EDatabaseVersion4Drivers {
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.11.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"jackson-databind-2.11.4.jar", "jackson-annotations-2.11.4.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.13.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"aws-java-sdk-redshift-internal-1.12.x.jar" })), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@ public class HadoopClassLoaderFactory2 {
|
||||
public static ClassLoader getHDFSClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb);
|
||||
}
|
||||
|
||||
public static ClassLoader getHDFSKnoxClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return HadoopClassLoaderFactory2.getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb,
|
||||
IHadoopArgs.HDFS_ARG_KNOX);
|
||||
}
|
||||
public static ClassLoader getMRClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return getClassLoader(relatedClusterId, EHadoopCategory.MAP_REDUCE, distribution, version, useKrb);
|
||||
}
|
||||
|
||||
@@ -22,4 +22,6 @@ public interface IHadoopArgs {
|
||||
|
||||
public static final String HIVE_ARG_STANDALONE = "STANDALONE"; //$NON-NLS-1$
|
||||
|
||||
public static final String HDFS_ARG_KNOX = "USE_KNOX"; //$NON-NLS-1$
|
||||
|
||||
}
|
||||
|
||||
32
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/context/ContextUtils.java
Normal file → Executable file
32
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/context/ContextUtils.java
Normal file → Executable file
@@ -222,6 +222,32 @@ public class ContextUtils {
|
||||
}
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
// TUP-36519:For possible duplicate internalid scenario(TUP-36667) after several times' renaming in joblet. Loop all and find the nearest
|
||||
// one.
|
||||
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
|
||||
boolean isFromContextItem, String paraName) {
|
||||
if (contextType == null || uuId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ContextParameterType parameterType = null;
|
||||
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
|
||||
String paramId = null;
|
||||
if (isFromContextItem) {
|
||||
paramId = ResourceHelper.getUUID(param);
|
||||
} else {
|
||||
paramId = param.getInternalId();
|
||||
}
|
||||
if (uuId.equals(paramId)) {
|
||||
parameterType = param;
|
||||
if (paraName != null && StringUtils.equals(paraName, param.getName())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
|
||||
boolean isFromContextItem) {
|
||||
@@ -846,7 +872,7 @@ public class ContextUtils {
|
||||
if (item != null) {
|
||||
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
|
||||
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
|
||||
paramLink.getId(), item instanceof ContextItem);
|
||||
paramLink.getId(), item instanceof ContextItem, contextParameterType.getName());
|
||||
if (repoContextParam != null
|
||||
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
|
||||
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
|
||||
@@ -915,7 +941,7 @@ public class ContextUtils {
|
||||
if (item != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
|
||||
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
|
||||
parameterLink.getId(), item instanceof ContextItem);
|
||||
parameterLink.getId(), item instanceof ContextItem, parameterType.getName());
|
||||
if (repoParameterType != null
|
||||
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
|
||||
renamedMap.put(repoParameterType.getName(), parameterType.getName());
|
||||
@@ -975,7 +1001,7 @@ public class ContextUtils {
|
||||
ContextParameterType contextParameterType = null;
|
||||
if (paramLink != null && paramLink.getId() != null && contextType != null) {
|
||||
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
|
||||
contextItem instanceof ContextItem);
|
||||
contextItem instanceof ContextItem, paramName);
|
||||
}
|
||||
if (contextParameterType != null) {// Compare use UUID
|
||||
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {
|
||||
|
||||
@@ -17,10 +17,15 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.PendoDataTrackFactory;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.service.ICloudSignOnService;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.signon.util.TMCRepositoryUtil;
|
||||
import org.talend.signon.util.TokenMode;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
@@ -58,12 +63,14 @@ public class ConnectionBean implements Cloneable {
|
||||
|
||||
private static final String TOKEN = "token"; //$NON-NLS-1$
|
||||
|
||||
private static final String URL = "url"; //$NON-NLS-1$
|
||||
|
||||
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
|
||||
|
||||
private String credentials = ""; //$NON-NLS-1$
|
||||
|
||||
public static final String CLOUD_TOKEN_ID ="cloud_token"; //$NON-NLS-1$
|
||||
|
||||
private static final String LOGIN_VIA_CLOUD = "login_via_cloud"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC smallet ConnectionBean constructor comment.
|
||||
*/
|
||||
@@ -89,6 +96,24 @@ public class ConnectionBean implements Cloneable {
|
||||
newConnection.setPassword(""); //$NON-NLS-1$
|
||||
return newConnection;
|
||||
}
|
||||
|
||||
public static ConnectionBean getDefaultCloudConnectionBean(String dataCenter) {
|
||||
ConnectionBean newConnection = new ConnectionBean();
|
||||
newConnection.setName(Messages.getString("ConnectionBean.Cloud.name", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
|
||||
newConnection.setDescription(Messages.getString("ConnectionBean.CloudConnection.description", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
|
||||
newConnection.setRepositoryId(TMCRepositoryUtil.getRepositoryId(dataCenter));
|
||||
newConnection.setToken(true);
|
||||
newConnection.setStoreCredentials(true);
|
||||
newConnection.setComplete(true);
|
||||
newConnection.setLoginViaCloud(true);
|
||||
newConnection.setWorkSpace(getRecentWorkSpace());
|
||||
return newConnection;
|
||||
}
|
||||
|
||||
protected static String getRecentWorkSpace() {
|
||||
String filePath = new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
|
||||
return filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for ID.
|
||||
@@ -184,13 +209,22 @@ public class ConnectionBean implements Cloneable {
|
||||
*/
|
||||
public String getPassword() {
|
||||
try {
|
||||
|
||||
if (conDetails.has(PASSWORD)) {
|
||||
if (isStoreCredentials() && credentials != null) {
|
||||
return this.credentials;
|
||||
}
|
||||
return conDetails.getString(PASSWORD);
|
||||
} else if (conDetails.has(CLOUD_TOKEN_ID)){
|
||||
String object = conDetails.getString(CLOUD_TOKEN_ID);
|
||||
TokenMode token = TokenMode.parseFromJson(object, null);
|
||||
if (ICloudSignOnService.get() != null) {
|
||||
token = ICloudSignOnService.get().getLatestToken();
|
||||
this.setConnectionToken(token);
|
||||
}
|
||||
return token.getAccessToken();
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return "";
|
||||
@@ -215,18 +249,18 @@ public class ConnectionBean implements Cloneable {
|
||||
* @return the user
|
||||
*/
|
||||
public String getUser() {
|
||||
try {
|
||||
try {
|
||||
if (conDetails.has(USER)) {
|
||||
String user = conDetails.getString(USER);
|
||||
if (isToken()) {
|
||||
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
user = PendoTrackSender.getInstance().getTmcUser(url, getPassword());
|
||||
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
|
||||
if (StringUtils.isNotBlank(user)) {
|
||||
setUser(user);
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -320,6 +354,25 @@ public class ConnectionBean implements Cloneable {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLoginViaCloud() {
|
||||
try {
|
||||
if (conDetails.has(LOGIN_VIA_CLOUD)) {
|
||||
return (Boolean) conDetails.get(LOGIN_VIA_CLOUD);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
// do nothing
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setLoginViaCloud(boolean isLoginViaCloud) {
|
||||
try {
|
||||
conDetails.put(LOGIN_VIA_CLOUD, isLoginViaCloud);
|
||||
} catch (JSONException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionBean clone() throws CloneNotSupportedException {
|
||||
@@ -418,14 +471,21 @@ public class ConnectionBean implements Cloneable {
|
||||
|
||||
public String getUrl() {
|
||||
try {
|
||||
if (conDetails.has(URL)) {
|
||||
return conDetails.getString(URL);
|
||||
if (dynamicFields.containsKey(RepositoryConstants.REPOSITORY_URL)) {
|
||||
return dynamicFields.get(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
if (conDetails.has(RepositoryConstants.REPOSITORY_URL)) {
|
||||
return conDetails.getString(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
dynamicFields.put(RepositoryConstants.REPOSITORY_URL, url);
|
||||
}
|
||||
|
||||
public boolean isStoreCredentials() {
|
||||
try {
|
||||
@@ -453,4 +513,27 @@ public class ConnectionBean implements Cloneable {
|
||||
public void setCredentials(String credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
|
||||
public TokenMode getConnectionToken() {
|
||||
try {
|
||||
if (conDetails.has(CLOUD_TOKEN_ID)) {
|
||||
String object = conDetails.getString(CLOUD_TOKEN_ID);
|
||||
return TokenMode.parseFromJson(object, null);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void setConnectionToken(TokenMode connectionToken) {
|
||||
try {
|
||||
conDetails.put(CLOUD_TOKEN_ID, TokenMode.writeToJson(connectionToken));
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,16 +13,17 @@
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.osgi.framework.Version;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
@@ -107,7 +108,7 @@ public class ModuleNeeded {
|
||||
|
||||
private Map<String, String> attributes;
|
||||
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
|
||||
|
||||
@@ -368,7 +369,7 @@ public class ModuleNeeded {
|
||||
}
|
||||
|
||||
public ELibraryInstallStatus getStatus() {
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
libManagerService.checkModuleStatus(this);
|
||||
String mvnUriStatusKey = getMavenUri();
|
||||
@@ -377,7 +378,7 @@ public class ModuleNeeded {
|
||||
}
|
||||
|
||||
public ELibraryInstallStatus getDeployStatus() {
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
libManagerService.checkModuleStatus(this);
|
||||
String mvnUriStatusKey = getMavenUri();
|
||||
@@ -714,21 +715,6 @@ public class ModuleNeeded {
|
||||
if (!StringUtils.isEmpty(mavenUriFromConfiguration)) {
|
||||
this.mavenUri = mavenUriFromConfiguration;
|
||||
}
|
||||
String generateModuleName = MavenUrlHelper.generateModuleNameByMavenURI(this.mavenUri);
|
||||
if (StringUtils.isNotBlank(generateModuleName)) {
|
||||
|
||||
if (!StringUtils.equals(getModuleName(), generateModuleName)) {
|
||||
|
||||
if (CommonsPlugin.isDebugMode() && StringUtils.isNotBlank(this.context)) {
|
||||
|
||||
CommonExceptionHandler
|
||||
.warn("module name definition should be " + generateModuleName + ", not " + getModuleName()
|
||||
+ " :" + this.context);
|
||||
}
|
||||
|
||||
setModuleName(generateModuleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usedByDynamicDistribution() {
|
||||
|
||||
@@ -13,10 +13,16 @@ public class SparkBatchMetadataTalendTypeFilter extends SparkMetadataTalendTypeF
|
||||
public static List<String> dynamicTypeCompatibleComponents = Arrays.asList(
|
||||
"tDeltaLakeInput",
|
||||
"tDeltaLakeOutput",
|
||||
"tFileInputDelimited",
|
||||
"tFileInputParquet",
|
||||
"tFileOutputParquet",
|
||||
"tJDBCInput",
|
||||
"tJDBCOutput", "tLogRow", "tSqlRow"
|
||||
"tJDBCOutput",
|
||||
"tLogRow",
|
||||
"tAvroInput",
|
||||
"tMongoDBInput",
|
||||
"tMongoDBOutput",
|
||||
"tSqlRow"
|
||||
);
|
||||
|
||||
public SparkBatchMetadataTalendTypeFilter(INode node) {
|
||||
|
||||
4
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/update/RepositoryUpdateManager.java
Normal file → Executable file
4
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/update/RepositoryUpdateManager.java
Normal file → Executable file
@@ -359,7 +359,9 @@ public abstract class RepositoryUpdateManager {
|
||||
List<UpdateResult> checkedResults = null;
|
||||
|
||||
if (parameter == null) { // update all job
|
||||
checkedResults = filterSpecialCheckedResult(results);
|
||||
// TUP-36519: comment out the filter for only opening job
|
||||
// checkedResults = filterSpecialCheckedResult(results);
|
||||
checkedResults = results;
|
||||
} else { // filter
|
||||
checkedResults = filterCheckedResult(results);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class TalendLibsServerManager {
|
||||
|
||||
public static final String TALEND_LIB_PASSWORD = "";//$NON-NLS-1$
|
||||
|
||||
public static final String TALEND_LIB_REPOSITORY = "libraries";//$NON-NLS-1$
|
||||
public static final String TALEND_LIB_REPOSITORY = "studio-libraries";//$NON-NLS-1$
|
||||
|
||||
private static TalendLibsServerManager manager = null;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.pendo.mapper;
|
||||
package org.talend.core.pendo;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
@@ -18,16 +18,24 @@ import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.properties.PendoTMapProperties;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbstractPendoTMapManager {
|
||||
public abstract class AbstractPendoTrackManager {
|
||||
|
||||
protected abstract PendoTMapProperties calculateProperties();
|
||||
public abstract TrackEvent getTrackEvent();
|
||||
|
||||
public abstract IPendoDataProperties collectProperties();
|
||||
|
||||
public boolean isTrackSendAvailable() throws Exception {
|
||||
return PendoDataTrackFactory.getInstance().isTrackSendAvailable();
|
||||
}
|
||||
|
||||
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
|
||||
PendoDataTrackFactory.getInstance().sendTrackData(event, properties);
|
||||
}
|
||||
|
||||
public void sendTrackToPendo() {
|
||||
Job job = new Job("send pendo track") {
|
||||
@@ -35,9 +43,9 @@ public abstract class AbstractPendoTMapManager {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (PendoTrackSender.getInstance().isTrackSendAvailable()) {
|
||||
PendoTMapProperties properties = calculateProperties();
|
||||
PendoTrackSender.getInstance().sendTrackData(TrackEvent.TMAP, properties);
|
||||
if (isTrackSendAvailable()) {
|
||||
IPendoDataProperties properties = collectProperties();
|
||||
sendTrackData(getTrackEvent(), properties);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
@@ -0,0 +1,73 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo;
|
||||
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoDataTrackFactory {
|
||||
|
||||
private static PendoDataTrackFactory instance;
|
||||
|
||||
private static IRemoteService remoteService;
|
||||
|
||||
static {
|
||||
instance = new PendoDataTrackFactory();
|
||||
remoteService = IRemoteService.get();
|
||||
}
|
||||
|
||||
private PendoDataTrackFactory() {
|
||||
}
|
||||
|
||||
public static PendoDataTrackFactory getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public boolean isTrackSendAvailable() throws Exception {
|
||||
if (remoteService != null) {
|
||||
return remoteService.isPendoTrackAvailable();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
|
||||
if (remoteService != null) {
|
||||
remoteService.sendPendoTrackData(event, properties);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendProjectLoginTrack() {
|
||||
if (remoteService != null) {
|
||||
AbstractPendoTrackManager pendoProjectLoginManager = remoteService.getPendoProjectLoginManager();
|
||||
pendoProjectLoginManager.sendTrackToPendo();
|
||||
}
|
||||
}
|
||||
|
||||
public void sendGenericTrack(TrackEvent event, IPendoDataProperties properties) {
|
||||
if (remoteService != null) {
|
||||
AbstractPendoTrackManager genericManager = remoteService.getPendoGenericManager(event, properties);
|
||||
genericManager.sendTrackToPendo();
|
||||
}
|
||||
}
|
||||
|
||||
public String getTmcUser(String url, String token) {
|
||||
if (remoteService != null) {
|
||||
return remoteService.getTmcUser(url, token);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,22 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.pendo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
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.utils.VersionUtils;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.ProjectReference;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.pendo.properties.PendoLoginProperties;
|
||||
import org.talend.core.service.IStudioLiteP2Service;
|
||||
import org.talend.core.ui.IInstalledPatchService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
@@ -60,35 +50,6 @@ public class PendoTrackDataUtil {
|
||||
return content;
|
||||
}
|
||||
|
||||
public static IPendoDataProperties getLoginEventProperties() {
|
||||
String studioPatch = getLatestPatchInstalledVersion();
|
||||
PendoLoginProperties loginEvent = new PendoLoginProperties();
|
||||
IStudioLiteP2Service studioLiteP2Service = IStudioLiteP2Service.get();
|
||||
try {
|
||||
if (studioLiteP2Service != null) {
|
||||
List<String> enabledFeatures = new ArrayList<String>();
|
||||
List<String> enabledFeaturesList = studioLiteP2Service.getCurrentProjectEnabledFeatures();
|
||||
enabledFeaturesList.stream().forEach(feature -> {
|
||||
String result = feature;
|
||||
if (result.startsWith(FEATURE_PREFIX)) {
|
||||
result = result.substring(FEATURE_PREFIX.toCharArray().length);
|
||||
}
|
||||
if (result.endsWith(FEATURE_TAIL)) {
|
||||
result = result.substring(0, result.lastIndexOf(FEATURE_TAIL));
|
||||
}
|
||||
enabledFeatures.add(result);
|
||||
});
|
||||
loginEvent.setEnabledFeatures(enabledFeatures);
|
||||
}
|
||||
setUpRefProjectsStructure(loginEvent);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
loginEvent.setStudioVersion(VersionUtils.getInternalMajorVersion());
|
||||
loginEvent.setStudioPatch(studioPatch);
|
||||
return loginEvent;
|
||||
}
|
||||
|
||||
public static String getLatestPatchInstalledVersion() {
|
||||
String studioPatch = "";
|
||||
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
|
||||
@@ -98,52 +59,6 @@ public class PendoTrackDataUtil {
|
||||
return studioPatch;
|
||||
}
|
||||
|
||||
private static void setUpRefProjectsStructure(PendoLoginProperties loginEvent) {
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
Project currentProject = projectManager.getCurrentProject();
|
||||
Map<String, Project> teclabelProjectMap = new HashMap<String, Project>();
|
||||
List<Project> allReferencedProjects = projectManager.getAllReferencedProjects();
|
||||
allReferencedProjects.forEach(refProject -> {
|
||||
String technicalLabel = refProject.getTechnicalLabel();
|
||||
if (StringUtils.isNotBlank(technicalLabel)) {
|
||||
teclabelProjectMap.put(technicalLabel, refProject);
|
||||
}
|
||||
});
|
||||
|
||||
int[] refCount = new int[] {0};
|
||||
List<String> resultList = new ArrayList<String>();
|
||||
Map<String, String> desensitiveLabelMap = new HashMap<String, String>();
|
||||
findReferencePorjectPath(currentProject, "Main", resultList, refCount, desensitiveLabelMap, teclabelProjectMap);
|
||||
loginEvent.setRefProjectList(resultList);
|
||||
loginEvent.setRefProjectCount(String.valueOf(desensitiveLabelMap.keySet().size()));
|
||||
}
|
||||
|
||||
public static void findReferencePorjectPath(Project currentProject, String path, List<String> resultList, int[] refCount,
|
||||
Map<String, String> desensitiveLabelMap, Map<String, Project> teclabelProjectMap) {
|
||||
List<ProjectReference> projectReferenceList = currentProject.getProjectReferenceList();
|
||||
for (ProjectReference projectReference : projectReferenceList) {
|
||||
String structPath = path;
|
||||
if (projectReference.getReferencedProject() == null) {
|
||||
continue;
|
||||
}
|
||||
String technicalLabel = projectReference.getReferencedProject().getTechnicalLabel();
|
||||
Project refProject = teclabelProjectMap.get(technicalLabel);
|
||||
if (StringUtils.isBlank(technicalLabel) || refProject == null) {
|
||||
continue;
|
||||
}
|
||||
String desensitiveLabel = desensitiveLabelMap.get(technicalLabel);
|
||||
if (StringUtils.isBlank(desensitiveLabel)) {
|
||||
refCount[0] = refCount[0] + 1;
|
||||
desensitiveLabel = "Ref" + refCount[0];
|
||||
desensitiveLabelMap.put(technicalLabel, desensitiveLabel);
|
||||
}
|
||||
structPath = structPath + "/" + desensitiveLabel;
|
||||
resultList.add(structPath);
|
||||
findReferencePorjectPath(refProject, structPath, resultList, refCount, desensitiveLabelMap, teclabelProjectMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String convertEntityJsonString(Object entity) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
@@ -157,30 +72,4 @@ public class PendoTrackDataUtil {
|
||||
return "";
|
||||
}
|
||||
|
||||
public enum TrackEvent {
|
||||
|
||||
PROJECT_LOGIN("Project Login"),
|
||||
IMPORT_API_DEF("Import API Definition"),
|
||||
UPDATE_API_DEF("Update API Definition"),
|
||||
USE_API_DEF("Use API Definition"),
|
||||
OPEN_IN_APIDesigner("Open in API Designer"),
|
||||
OPEN_IN_APITester("Open in API Tester"),
|
||||
OPEN_API_DOCUMENTATION("Open API Documentation"),
|
||||
AUTOMAP("tMap Automap"),
|
||||
TMAP("tMap"),
|
||||
ITEM_IMPORT("Import items"),
|
||||
ITEM_SIGNATURE("Item Signature");
|
||||
|
||||
private String event;
|
||||
|
||||
TrackEvent(String event) {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
public String getEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,325 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 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.pendo;
|
||||
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.StatusLine;
|
||||
import org.apache.http.client.entity.EntityBuilder;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.log4j.Level;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.network.IProxySelectorProvider;
|
||||
import org.talend.commons.utils.network.NetworkUtil;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
import org.talend.core.nexus.HttpClientTransport;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoTrackSender {
|
||||
|
||||
public static final String PROP_PENDO_LOCAL_CHECK = "talend.pendo.localDebug";
|
||||
|
||||
public static final String PROP_PENDO_LOG_DATA = "talend.pendo.logRuntimeData";
|
||||
|
||||
private static final String PREFIX_API = "api";
|
||||
|
||||
private static final String PENDO_INFO = "/monitoring/pendo/info";
|
||||
|
||||
private static final String PENDO_TRACK = "/monitoring/pendo/track";
|
||||
|
||||
private static final String HEAD_AUTHORIZATION = "Authorization";
|
||||
|
||||
private static final String HEAD_CONTENT_TYPE = "Content-Type";
|
||||
|
||||
private static final String HEAD_PENDO_KEY = "x-pendo-integration-key";
|
||||
|
||||
private static PendoTrackSender instance;
|
||||
|
||||
private static String adminUrl;
|
||||
|
||||
private static String apiBaseUrl;
|
||||
|
||||
private static String pendoInfo;
|
||||
|
||||
private PendoTrackSender() {
|
||||
}
|
||||
|
||||
static {
|
||||
instance = new PendoTrackSender();
|
||||
RepositoryContext repositoryContext = getRepositoryContext();
|
||||
if (repositoryContext != null) {
|
||||
adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
}
|
||||
|
||||
public static PendoTrackSender getInstance() {
|
||||
if (StringUtils.isBlank(adminUrl)) {
|
||||
RepositoryContext repositoryContext = getRepositoryContext();
|
||||
if (repositoryContext != null) {
|
||||
adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void sendToPendo(TrackEvent event, IPendoDataProperties properties) {
|
||||
Job job = new Job("send pendo track") {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (isTrackSendAvailable()) {
|
||||
sendTrackData(event, properties);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
job.setUser(false);
|
||||
job.setPriority(Job.INTERACTIVE);
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
|
||||
if (isPendoLocalDebug()) {
|
||||
ExceptionHandler.log(event.getEvent() + ":" + PendoTrackDataUtil.convertEntityJsonString(properties));
|
||||
return;
|
||||
}
|
||||
DefaultHttpClient client = null;
|
||||
CloseableHttpResponse response = null;
|
||||
IProxySelectorProvider proxySelectorProvider = null;
|
||||
try {
|
||||
String pendoInfo = getPendoInfo();
|
||||
if (StringUtils.isBlank(pendoInfo)) {
|
||||
throw new Exception("Pendo information is empty");
|
||||
}
|
||||
String pendoKey = getPendoKeyFromLicense();
|
||||
if (StringUtils.isBlank(pendoKey)) {
|
||||
throw new Exception("Pendo key is empty");
|
||||
}
|
||||
|
||||
client = new DefaultHttpClient();
|
||||
String url = getBaseUrl() + PENDO_TRACK;
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.setHeader(HEAD_CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());
|
||||
httpPost.setHeader(HEAD_PENDO_KEY, pendoKey);
|
||||
|
||||
proxySelectorProvider = HttpClientTransport.addProxy(client, new URI(url));
|
||||
|
||||
EntityBuilder entityBuilder = EntityBuilder.create();
|
||||
String trackData = PendoTrackDataUtil.generateTrackData(pendoInfo, event, properties);
|
||||
entityBuilder.setText(trackData).setContentType(ContentType.APPLICATION_JSON);
|
||||
HttpEntity entity = entityBuilder.build();
|
||||
httpPost.setEntity(entity);
|
||||
response = client.execute(httpPost, HttpClientContext.create());
|
||||
StatusLine statusLine = response.getStatusLine();
|
||||
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
|
||||
if (isLogPendoData()) {
|
||||
ExceptionHandler.log(trackData);
|
||||
}
|
||||
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
|
||||
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
|
||||
}
|
||||
} finally {
|
||||
HttpClientTransport.removeProxy(proxySelectorProvider);
|
||||
client.getConnectionManager().shutdown();
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (client != null) {
|
||||
try {
|
||||
client.close();
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isTrackSendAvailable() throws Exception {
|
||||
if (isPendoLocalDebug() || checkTokenUsed(adminUrl) && NetworkUtil.isNetworkValid()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPendoLocalDebug() {
|
||||
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOCAL_CHECK));
|
||||
}
|
||||
|
||||
public boolean isLogPendoData() {
|
||||
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOG_DATA));
|
||||
}
|
||||
|
||||
private String getPendoInfo() throws Exception {
|
||||
if (StringUtils.isBlank(pendoInfo)) {
|
||||
pendoInfo = getPendoInfo(getBaseUrl(), getToken());
|
||||
}
|
||||
return pendoInfo;
|
||||
}
|
||||
|
||||
private String getPendoInfo(String baseUrl, String token) throws Exception {
|
||||
DefaultHttpClient client = null;
|
||||
CloseableHttpResponse response = null;
|
||||
IProxySelectorProvider proxySelectorProvider = null;
|
||||
try {
|
||||
client = new DefaultHttpClient();
|
||||
|
||||
String url = baseUrl + PENDO_INFO;
|
||||
|
||||
HttpGet httpGet = new HttpGet(url);
|
||||
httpGet.setHeader(HEAD_AUTHORIZATION, "Bearer " + token);
|
||||
proxySelectorProvider = HttpClientTransport.addProxy(client, new URI(url));
|
||||
|
||||
response = client.execute(httpGet, HttpClientContext.create());
|
||||
StatusLine statusLine = response.getStatusLine();
|
||||
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
|
||||
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
|
||||
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
|
||||
}
|
||||
return responseStr;
|
||||
} finally {
|
||||
HttpClientTransport.removeProxy(proxySelectorProvider);
|
||||
client.getConnectionManager().shutdown();
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (client != null) {
|
||||
try {
|
||||
client.close();
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkTokenUsed(String adminUrl) throws Exception {
|
||||
if (StringUtils.isNotBlank(adminUrl) && GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService service = GlobalServiceRegister.getDefault().getService(IRemoteService.class);
|
||||
return service.isTokenUsed(adminUrl);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getBaseUrl() throws Exception {
|
||||
return getBaseUrl(adminUrl, false);
|
||||
}
|
||||
|
||||
public String getBaseUrl(String adminUrl, boolean token) throws Exception {
|
||||
if (StringUtils.isNotBlank(apiBaseUrl) && !token) {
|
||||
return apiBaseUrl;
|
||||
}
|
||||
|
||||
try {
|
||||
URL url = new URL(adminUrl);
|
||||
// tmc.int.cloud.talend.com
|
||||
String authority = url.getAuthority();
|
||||
String regex = "(\\w*\\-*\\w*\\.?){2}\\.(talend.com)";
|
||||
Pattern pattern= Pattern.compile(regex);
|
||||
Matcher match = pattern.matcher(authority);
|
||||
if (match.find()) {
|
||||
// int.cloud.talend.com
|
||||
authority = match.group(0);
|
||||
URL apiURL = new URL(url.getProtocol(), PREFIX_API + "." + authority, "");
|
||||
// https://api.int.cloud.talend.com
|
||||
apiBaseUrl = apiURL.toString();
|
||||
} else {
|
||||
throw new Exception("Can't match pendo url from " + adminUrl);
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
throw new Exception("Invalid url " + adminUrl, e.getCause());
|
||||
}
|
||||
|
||||
return apiBaseUrl;
|
||||
}
|
||||
|
||||
private String getToken() {
|
||||
return getRepositoryContext().getClearPassword();
|
||||
}
|
||||
|
||||
public String getTmcUser(String url, String token) {
|
||||
try {
|
||||
String pendoInfo = getPendoInfo(getBaseUrl(url, true), token);
|
||||
if (StringUtils.isNotBlank(pendoInfo)) {
|
||||
JSONObject infoJson = new JSONObject(pendoInfo);
|
||||
return ((JSONObject) infoJson.get("visitor")).getString("id"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private String getPendoKeyFromLicense() throws Exception {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService service = GlobalServiceRegister.getDefault().getService(IRemoteService.class);
|
||||
return service.getPendoKeyFromLicense();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static RepositoryContext getRepositoryContext() {
|
||||
RepositoryContext repositoryContext = (RepositoryContext) CoreRuntimePlugin.getInstance().getContext()
|
||||
.getProperty(Context.REPOSITORY_CONTEXT_KEY);
|
||||
return repositoryContext;
|
||||
}
|
||||
|
||||
public void setAdminUrl(String adminUrl) {
|
||||
PendoTrackSender.adminUrl = adminUrl;
|
||||
}
|
||||
|
||||
public void setApiBaseUrl(String apiBaseUrl) {
|
||||
PendoTrackSender.apiBaseUrl = apiBaseUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo;
|
||||
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public enum TrackEvent {
|
||||
|
||||
/**
|
||||
* create by TUP-33421 update by TUP-34791, TUP-35523, TUP-36780
|
||||
*/
|
||||
PROJECT_LOGIN("Project Login"),
|
||||
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
IMPORT_API_DEF("Import API Definition"),
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
UPDATE_API_DEF("Update API Definition"),
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
USE_API_DEF("Use API Definition"),
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
OPEN_IN_APIDesigner("Open in API Designer"),
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
OPEN_IN_APITester("Open in API Tester"),
|
||||
/**
|
||||
* create by TUP-33990
|
||||
*/
|
||||
OPEN_API_DOCUMENTATION("Open API Documentation"),
|
||||
|
||||
/**
|
||||
* create by TUP-35644
|
||||
*/
|
||||
AUTOMAP("tMap Automap"),
|
||||
/**
|
||||
* create by TUP-35644 update by TUP-36710
|
||||
*/
|
||||
TMAP("tMap"),
|
||||
|
||||
/**
|
||||
* create by TUP-35712 update by TUP-36893
|
||||
*/
|
||||
ITEM_IMPORT("Import items"),
|
||||
/**
|
||||
* create by TUP-35712
|
||||
*/
|
||||
ITEM_SIGNATURE("Item Signature");
|
||||
|
||||
private String event;
|
||||
|
||||
TrackEvent(String event) {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
public String getEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,8 +12,9 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.pendo.mapper;
|
||||
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.AbstractPendoTrackManager;
|
||||
import org.talend.core.pendo.TrackEvent;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.pendo.properties.PendoAutoMapProperties;
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ import org.talend.core.pendo.properties.PendoAutoMapProperties;
|
||||
*
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoAutoMapManager {
|
||||
public class PendoAutoMapManager extends AbstractPendoTrackManager {
|
||||
|
||||
private int mappingChangeCount = 0;
|
||||
|
||||
@@ -45,9 +46,18 @@ public class PendoAutoMapManager {
|
||||
if (mappingChangeCount < 1) {
|
||||
return;
|
||||
}
|
||||
PendoAutoMapProperties properties = new PendoAutoMapProperties();
|
||||
properties.setAutoMappings(mappingChangeCount);
|
||||
PendoTrackSender.getInstance().sendToPendo(TrackEvent.AUTOMAP, properties);
|
||||
super.sendTrackToPendo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackEvent getTrackEvent() {
|
||||
return TrackEvent.AUTOMAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPendoDataProperties collectProperties() {
|
||||
PendoAutoMapProperties properties = new PendoAutoMapProperties();
|
||||
properties.setAutoMappings(mappingChangeCount);
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.properties;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoLoginProperties implements IPendoDataProperties {
|
||||
|
||||
@JsonProperty("studio_version")
|
||||
private String studioVersion;
|
||||
|
||||
@JsonProperty("studio_patch")
|
||||
private String studioPatch;
|
||||
|
||||
@JsonProperty("enabled_features")
|
||||
private List<String> enabledFeatures;
|
||||
|
||||
@JsonProperty("referenced_project_number")
|
||||
private String refProjectCount;
|
||||
|
||||
@JsonProperty("referenced_projects")
|
||||
private List<String> refProjectList;
|
||||
|
||||
/**
|
||||
* Getter for studio_version.
|
||||
*
|
||||
* @return the studio_version
|
||||
*/
|
||||
public String getStudioVersion() {
|
||||
return studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the studio_version.
|
||||
*
|
||||
* @param studio_version the studio_version to set
|
||||
*/
|
||||
public void setStudioVersion(String studioVersion) {
|
||||
this.studioVersion = studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for studio_patch.
|
||||
*
|
||||
* @return the studio_patch
|
||||
*/
|
||||
public String getStudioPatch() {
|
||||
return studioPatch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the studio_patch.
|
||||
*
|
||||
* @param studio_patch the studio_patch to set
|
||||
*/
|
||||
public void setStudioPatch(String studioPatch) {
|
||||
this.studioPatch = studioPatch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for enabled_features.
|
||||
*
|
||||
* @return the enabled_features
|
||||
*/
|
||||
public List<String> getEnabledFeatures() {
|
||||
return enabledFeatures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the enabled_features.
|
||||
*
|
||||
* @param enabled_features the enabled_features to set
|
||||
*/
|
||||
public void setEnabledFeatures(List<String> enabledFeatures) {
|
||||
this.enabledFeatures = enabledFeatures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for refProjectCount.
|
||||
*
|
||||
* @return the refProjectCount
|
||||
*/
|
||||
public String getRefProjectCount() {
|
||||
return refProjectCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the refProjectCount.
|
||||
*
|
||||
* @param refProjectCount the refProjectCount to set
|
||||
*/
|
||||
public void setRefProjectCount(String refProjectCount) {
|
||||
this.refProjectCount = refProjectCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for refProjectList.
|
||||
*
|
||||
* @return the refProjectList
|
||||
*/
|
||||
public List<String> getRefProjectList() {
|
||||
return refProjectList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the refProjectList.
|
||||
*
|
||||
* @param refProjectList the refProjectList to set
|
||||
*/
|
||||
public void setRefProjectList(List<String> refProjectList) {
|
||||
this.refProjectList = refProjectList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,8 @@ public class PendoSignImportProperties implements IPendoDataProperties {
|
||||
@JsonProperty("valid_migration_token")
|
||||
private String validMigrationToken;
|
||||
|
||||
@JsonProperty("import_product")
|
||||
private List<String> importProduct;
|
||||
|
||||
/**
|
||||
* Getter for sourceVersion.
|
||||
@@ -208,4 +210,23 @@ public class PendoSignImportProperties implements IPendoDataProperties {
|
||||
this.validMigrationToken = validMigrationToken;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for importProduct.
|
||||
* @return the importProduct
|
||||
*/
|
||||
public List<String> getImportProduct() {
|
||||
return importProduct;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the importProduct.
|
||||
* @param importProduct the importProduct to set
|
||||
*/
|
||||
public void setImportProduct(List<String> importProduct) {
|
||||
this.importProduct = importProduct;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -91,13 +91,13 @@ public class PendoTMapProperties implements IPendoDataProperties {
|
||||
* Number of input columns which are mapped to multiple output columns, either mapped directly or mapped through the
|
||||
* Var column
|
||||
*/
|
||||
@JsonProperty("1-to-n mapping")
|
||||
@JsonProperty("mapping_1_to_n")
|
||||
private int oneToNMappings;
|
||||
|
||||
/**
|
||||
* Number of output columns which have multiple source columns, either input columns or var columns
|
||||
*/
|
||||
@JsonProperty("n-to-1 mapping")
|
||||
@JsonProperty("mapping_n_to_1")
|
||||
private int nToOneMappings;
|
||||
|
||||
/**
|
||||
|
||||
@@ -203,4 +203,12 @@ public interface ITalendCorePrefConstants {
|
||||
|
||||
public static final boolean NEXUS_SHARE_LIBS_DEFAULT = false;
|
||||
|
||||
public static final String PERSPECTIVE_PERSIST_SCOPE = "PERSPECTIVE_PERSIST_SCOPE"; //$NON-NLS-1$
|
||||
|
||||
public static final String PERSPECTIVE_PERSIST_SCOPE_PROJECT_AND_BRANCH = "PROJECT_AND_BRANCH"; //$NON-NLS-1$
|
||||
|
||||
public static final String PERSPECTIVE_PERSIST_SCOPE_STUDIO = "STUDIO"; //$NON-NLS-1$
|
||||
|
||||
public static final String PERSPECTIVE_PERSIST_SCOPE_DEFAULT = PERSPECTIVE_PERSIST_SCOPE_PROJECT_AND_BRANCH;
|
||||
|
||||
}
|
||||
|
||||
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=Centre
|
||||
ConnectionBean.Local=Local
|
||||
ConnectionBean.Remote=Remote
|
||||
ConnectionBean.DefaultConnection=Default connection
|
||||
ConnectionBean.Cloud.name=Signed in: Cloud ({0})
|
||||
ConnectionBean.CloudConnection.description=Remote connection to Cloud - Signed in: Cloud ({0})
|
||||
InegerCellEditorListener.NegativeNumberMessage=The value of {0} can't be set by negative number.
|
||||
InegerCellEditorListener.NumeralMessage=The value of {0} should be numeral.
|
||||
OpenXSDFileDialog.cancel=Cancel
|
||||
|
||||
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=Centre
|
||||
ConnectionBean.Local=Local
|
||||
ConnectionBean.Remote=Distant
|
||||
ConnectionBean.DefaultConnection=Connexion par d\u00E9faut
|
||||
ConnectionBean.Cloud.name=Connect\u00E9(e) \u00E0\u00A0: Cloud ({0})
|
||||
ConnectionBean.CloudConnection.description=Connexion distante au Cloud - Connect\u00E9(e) \u00E0\u00A0: Cloud ({0})
|
||||
InegerCellEditorListener.NegativeNumberMessage=La valeur de {0} ne peut \u00EAtre un nombre n\u00E9gatif.
|
||||
InegerCellEditorListener.NumeralMessage=La valeur de {0} doit \u00EAtre num\u00E9rique.
|
||||
OpenXSDFileDialog.cancel=Annuler
|
||||
@@ -575,7 +577,7 @@ repository.servicesPort=Port
|
||||
BinRepositoryNode.label=Corbeille
|
||||
HDFS=HDFS
|
||||
HCAT=HCAT
|
||||
AbstractRepositoryContentHandler.deleteNode.exception=\u00C9chec de la suppression des pertinences de noeud\u00A0: {0}
|
||||
AbstractRepositoryContentHandler.deleteNode.exception=\u00C9chec de la suppression des pertinences de n\u0153ud\u00A0: {0}
|
||||
HadoopCustomVersionDialog.topTitle=D\u00E9finition de la version Hadoop personnalis\u00E9e
|
||||
HadoopCustomVersionDialog.title=D\u00E9finir la distribution Hadoop personnalis\u00E9e
|
||||
HadoopCustomVersionDialog.msg=Configurer les biblioth\u00E8ques n\u00E9cessaires \u00E0 la version personnalis\u00E9e de Hadoop
|
||||
|
||||
@@ -184,7 +184,7 @@ AbstractTalendFunctionParser.checkMethod=\u30EB\u30FC\u30C1\u30F3: "{0}.{1}\\"\u
|
||||
JavaGlobalVariableProposal.Description=\u8AAC\u660E: {0}
|
||||
JavaGlobalVariableProposal.VariableName=\n\n\u5909\u6570\u540D: {1}
|
||||
JavaSimpleDateFormatProposalProvider.displaySingleQuote= ' : \u4E00\u91CD\u5F15\u7528\u7B26\u3092\u8868\u793A
|
||||
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3067\uFF11\u3064\u306E\u30B7\u30F3\u30B0\u30EB\u30AF\u30A9\u30FC\u30C8\u3092\u793A\u3057\u307E\u3059\u3002
|
||||
JavaSimpleDateFormatProposalProvider.quoteDisplayError=\uFF12\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3067\uFF11\u3064\u306E\u4E00\u91CD\u5F15\u7528\u7B26\u3092\u793A\u3057\u307E\u3059\u3002
|
||||
JavaTypesManager.bigDecimal=BIGDECIMAL\u306F\u6570\u5024\u3067\u3059:
|
||||
JavaTypesManager.integer=INTEGER\u306F\u6570\u5024\u3067\u3059:
|
||||
JavaTypesManager.list=LIST\u306F\u6570\u5024\u3067\u3059:
|
||||
@@ -281,7 +281,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
|
||||
PropertiesWizardPage.Description=\u8AAC\u660E
|
||||
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
|
||||
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
|
||||
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
PropertiesWizardPage.Name=\u540D\u524D
|
||||
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
|
||||
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=\u4E2D\u5FC3
|
||||
ConnectionBean.Local=\u30ED\u30FC\u30AB\u30EB
|
||||
ConnectionBean.Remote=\u30EA\u30E2\u30FC\u30C8
|
||||
ConnectionBean.DefaultConnection=\u30C7\u30D5\u30A9\u30EB\u30C8\u63A5\u7D9A
|
||||
ConnectionBean.Cloud.name=\u30B5\u30A4\u30F3\u30A4\u30F3\u6E08\u307F: \u30AF\u30E9\u30A6\u30C9({0})
|
||||
ConnectionBean.CloudConnection.description=\u30AF\u30E9\u30A6\u30C9\u3078\u306E\u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A - \u30B5\u30A4\u30F3\u30A4\u30F3\u6E08\u307F: \u30AF\u30E9\u30A6\u30C9({0})
|
||||
InegerCellEditorListener.NegativeNumberMessage={0}\u306B\u306F\u8CA0\u306E\u5024\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
InegerCellEditorListener.NumeralMessage={0}\u306B\u306F\u6570\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
OpenXSDFileDialog.cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
|
||||
|
||||
@@ -552,6 +552,8 @@ BusinessAppearanceComposite.textAlignment.vertical.centre=\u4E2D\u592E
|
||||
ConnectionBean.Local=\u672C\u5730
|
||||
ConnectionBean.Remote=\u8FDC\u7A0B
|
||||
ConnectionBean.DefaultConnection=\u9ED8\u8BA4\u8FDE\u63A5
|
||||
ConnectionBean.Cloud.name=\u5DF2\u767B\u5F55: \u4E91\u7AEF ({0})
|
||||
ConnectionBean.CloudConnection.description=\u4E91\u7AEF\u8FDC\u7A0B\u8FDE\u63A5 - \u5DF2\u767B\u5F55: \u4E91\u7AEF ({0})
|
||||
InegerCellEditorListener.NegativeNumberMessage={0} \u7684\u503C\u4E0D\u80FD\u8BBE\u5B9A\u4E3A\u8D1F\u6570\u3002
|
||||
InegerCellEditorListener.NumeralMessage={0} \u7684\u503C\u5E94\u8BE5\u4E3A\u6570\u5B57\u3002
|
||||
OpenXSDFileDialog.cancel=\u53D6\u6D88
|
||||
|
||||
@@ -19,9 +19,7 @@ package org.talend.core.runtime.maven;
|
||||
public interface MavenConstants {
|
||||
|
||||
static final String NAME_GROUP_ID = "GROUP_ID";
|
||||
|
||||
static final String CLOUD_VERSION = "CLOUD_VERSION";
|
||||
|
||||
|
||||
static final String NAME_USER_VERSION = "USER_VERSION";
|
||||
|
||||
static final String NAME_PUBLISH_AS_SNAPSHOT = "PUBLISH_AS_SNAPSHOT";
|
||||
|
||||
@@ -78,5 +78,10 @@ public interface IProjectSettingPreferenceConstants {
|
||||
public static final String TEMPLATE_DOCKER_PROFILE_POM = "template_docker_profile_pom_script"; //$NON-NLS-1$
|
||||
|
||||
public static final String USE_STRICT_REFERENCE_JOBLET = "use_strict_reference_joblet"; //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
* Default microservices application properties
|
||||
*/
|
||||
public static final String MS_APPLICATION_PROPERTIES = "ms_application_properties";
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ package org.talend.core.runtime.projectsetting;
|
||||
public interface IProjectSettingTemplateConstants {
|
||||
|
||||
final static String PATH_RESOURCES = "resources";
|
||||
|
||||
final static String PATH_APPLICATION_PROPERTIES = PATH_RESOURCES + '/' + "application.properties";
|
||||
|
||||
final static String PATH_RESOURCES_TEMPLATES = PATH_RESOURCES + '/' + "templates";
|
||||
|
||||
|
||||
@@ -231,6 +231,9 @@ public class ProjectPreferenceManager {
|
||||
if (isCurrentProject) {
|
||||
try {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (qualifier == null) {
|
||||
qualifier = "org.talend.designer.maven";
|
||||
}
|
||||
init(ResourceUtils.getProject(currentProject), qualifier);
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.talend.core.runtime.services;
|
||||
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.properties.Item;
|
||||
|
||||
@@ -9,4 +10,11 @@ public interface IFilterService extends IService {
|
||||
|
||||
public boolean isFilterAccepted(Item item, String filter);
|
||||
|
||||
public static IFilterService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IFilterService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IFilterService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.runtime.util;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.process.JobInfo;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.repository.ProjectManager;
|
||||
|
||||
public class ModuleAccessHelper {
|
||||
|
||||
private static final String FORMAT_ADD_OPPENS = "--add-opens=@=ALL-UNNAMED"; //$NON-NLS-1$
|
||||
|
||||
private static final String CLASS_PREVIEW_PROCESS = "org.talend.designer.component.preview.shadow.PreviewComponentDataProcess"; //$NON-NLS-1$
|
||||
|
||||
private static final String CLASS_GUESS_SCHEMA_PROCESS = "org.talend.designer.core.ui.editor.properties.controllers.AbstractGuessSchemaProcess"; //$NON-NLS-1$
|
||||
|
||||
private static Properties PROPS;
|
||||
|
||||
public static Properties getProperties() {
|
||||
if (PROPS == null) {
|
||||
PROPS = new Properties();
|
||||
try (InputStream input = getConfigFileURL().openStream()) {
|
||||
PROPS.load(input);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
Optional.ofNullable(System.getProperty("internal.custom.modules")).filter(StringUtils::isNotBlank)
|
||||
.ifPresent(modules -> put("GLOBAL", modules));
|
||||
|
||||
List<Project> allProjects = new ArrayList<>();
|
||||
allProjects.add(ProjectManager.getInstance().getCurrentProject());
|
||||
allProjects.addAll(ProjectManager.getInstance().getAllReferencedProjects(true));
|
||||
for (Project ref : allProjects) {
|
||||
ProjectPreferenceManager prefManager = new ProjectPreferenceManager(ref, CoreRuntimePlugin.PLUGIN_ID, false);
|
||||
String settings = prefManager.getValue(JavaUtils.CUSTOM_ACCESS_SETTINGS);
|
||||
if (StringUtils.isNotBlank(settings)) {
|
||||
Properties customProps = new Properties();
|
||||
try {
|
||||
customProps.load(new ByteArrayInputStream(settings.getBytes()));
|
||||
customProps.entrySet().stream().filter(en -> StringUtils.isNotBlank((String) en.getValue()))
|
||||
.forEach(en -> put((String) en.getKey(), (String) en.getValue()));
|
||||
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return PROPS;
|
||||
}
|
||||
|
||||
private static void put(String key, String value) {
|
||||
PROPS.put(key, PROPS.containsKey(key) ? PROPS.getProperty(key) + "," + value : value);
|
||||
}
|
||||
|
||||
public static URL getConfigFileURL() {
|
||||
return Platform.getBundle(CoreRuntimePlugin.PLUGIN_ID).getEntry("resources/module_access.properties"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private static boolean containsKey(String key) {
|
||||
return getProperties().containsKey(key);
|
||||
}
|
||||
|
||||
private static Set<String> getModules(String key) {
|
||||
String modules = getProperties().getProperty(key);
|
||||
if (modules != null) {
|
||||
return Stream.of(modules.split(",")).map(module -> FORMAT_ADD_OPPENS.replace("@", module.trim())) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
private static boolean allowJavaInternalAcess(Property property) {
|
||||
String allow = System.getProperty(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS);
|
||||
if (allow != null) {
|
||||
return Boolean.valueOf(allow);
|
||||
}
|
||||
if (CommonsPlugin.isTUJTest() || CommonsPlugin.isJUnitTest() || CommonsPlugin.isJunitWorking()) {
|
||||
return true;
|
||||
}
|
||||
Project project;
|
||||
if (property != null) {
|
||||
project = ProjectManager.getInstance()
|
||||
.getProjectFromProjectTechLabel(ProjectManager.getInstance().getProject(property).getTechnicalLabel());
|
||||
} else {
|
||||
project = ProjectManager.getInstance().getCurrentProject();
|
||||
}
|
||||
ProjectPreferenceManager preferenceManager = new ProjectPreferenceManager(project, CoreRuntimePlugin.PLUGIN_ID, false);
|
||||
return preferenceManager.getBoolean(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS);
|
||||
}
|
||||
|
||||
public static Set<String> getModuleAccessVMArgsForProcessor(IProcessor processor) {
|
||||
Property property = processor.getProperty();
|
||||
if (property == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
if (isPreviewProcess(processor)) {
|
||||
// add all for preview process
|
||||
return getProperties().entrySet().stream().filter(en -> StringUtils.isNotBlank((String) en.getValue()))
|
||||
.flatMap(en -> getModules((String) en.getKey()).stream()).collect(Collectors.toSet());
|
||||
|
||||
}
|
||||
if (!allowJavaInternalAcess(property)) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
ProcessItem mainJobItem = (ProcessItem) property.getItem();
|
||||
Set<JobInfo> allJobInfos = new HashSet<>();
|
||||
allJobInfos.add(new JobInfo(mainJobItem, mainJobItem.getProcess().getDefaultContext()));
|
||||
allJobInfos.addAll(processor.getBuildChildrenJobsAndJoblets());
|
||||
return ModuleAccessHelper.getModuleAccessVMArgs(property, allJobInfos);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Set<String> getModuleAccessVMArgs(Property property, Set<JobInfo> allJobInfos) {
|
||||
if (property == null || property.getItem() == null || !allowJavaInternalAcess(property)) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
Set<String> vmArgs = new HashSet<>();
|
||||
boolean hasTck = false;
|
||||
for (JobInfo info : allJobInfos) {
|
||||
EList<NodeType> nodes = null;
|
||||
EList<ElementParameterType> parameters = null;
|
||||
if (info.getJobletProperty() != null) {
|
||||
JobletProcessItem item = (JobletProcessItem) info.getJobletProperty().getItem();
|
||||
if (item.getJobletProcess() != null) {
|
||||
nodes = item.getJobletProcess().getNode();
|
||||
if (item.getJobletProcess().getParameters() != null) {
|
||||
parameters = item.getJobletProcess().getParameters().getElementParameter();
|
||||
}
|
||||
}
|
||||
} else if (info.getProcessItem() != null && info.getProcessItem().getProcess() != null) {
|
||||
nodes = info.getProcessItem().getProcess().getNode();
|
||||
if (info.getProcessItem().getProcess().getParameters() != null) {
|
||||
parameters = info.getProcessItem().getProcess().getParameters().getElementParameter();
|
||||
}
|
||||
}
|
||||
if (nodes != null) {
|
||||
nodes.stream().filter(node -> containsKey(node.getComponentName()))
|
||||
.forEach(node -> vmArgs.addAll(getModules(node.getComponentName())));
|
||||
}
|
||||
if (parameters != null) {
|
||||
// FIXME currently it depends on spark version, refine the condition if needed
|
||||
Optional<ElementParameterType> optional = parameters.stream()
|
||||
.filter(p -> "SUPPORTED_SPARK_VERSION".equals(p.getName()) && containsKey(p.getValue())).findFirst();
|
||||
if (optional.isPresent()) {
|
||||
vmArgs.addAll(getModules(optional.get().getValue()));
|
||||
}
|
||||
}
|
||||
if (!hasTck) {
|
||||
hasTck = nodes.stream()
|
||||
.anyMatch(node -> node.getElementParameter().stream()
|
||||
.anyMatch(p -> ((ElementParameterType) p).getField() != null
|
||||
&& EParameterFieldType.TECHNICAL.getName().equals(((ElementParameterType) p).getField())
|
||||
&& ((ElementParameterType) p).getName().equals("TACOKIT_COMPONENT_ID")));
|
||||
}
|
||||
}
|
||||
if (hasTck) {
|
||||
vmArgs.addAll(getModules("TCK_COMMON_ARGS"));
|
||||
}
|
||||
|
||||
if (getProperties().containsKey("GLOBAL")) {
|
||||
vmArgs.addAll(getModules("GLOBAL"));
|
||||
}
|
||||
|
||||
return vmArgs;
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
PROPS = null;
|
||||
}
|
||||
|
||||
private static boolean isPreviewProcess(IProcessor processor) {
|
||||
IProcess process = processor.getProcess();
|
||||
if (process == null) {
|
||||
return false;
|
||||
}
|
||||
Property property = processor.getProperty();
|
||||
if ("ID".equals(property.getId()) && "Mock_job_for_Guess_schema".equals(property.getLabel())) {
|
||||
return true;
|
||||
}
|
||||
Class<?> clazz = process.getClass();
|
||||
// preview process
|
||||
if (CLASS_PREVIEW_PROCESS.equals(clazz.getName()) || CLASS_PREVIEW_PROCESS.equals(clazz.getSuperclass().getName())) {
|
||||
return true;
|
||||
}
|
||||
// guess schema process
|
||||
if (CLASS_GUESS_SCHEMA_PROCESS.equals(clazz.getSuperclass().getName())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 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.service;
|
||||
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.signon.util.TokenMode;
|
||||
import org.talend.signon.util.listener.LoginEventListener;
|
||||
|
||||
public interface ICloudSignOnService extends IService {
|
||||
|
||||
TokenMode getToken(String authCode, String codeVerifier, String dataCenter) throws Exception;
|
||||
|
||||
void startHeartBeat() throws Exception;
|
||||
|
||||
void stopHeartBeat();
|
||||
|
||||
String generateCodeVerifier();
|
||||
|
||||
String getCodeChallenge(String seed) throws Exception;
|
||||
|
||||
boolean hasValidToken() throws Exception;
|
||||
|
||||
String getTokenUser(String url, TokenMode token) throws Exception;
|
||||
|
||||
void signonCloud(LoginEventListener listener) throws Exception;
|
||||
|
||||
TokenMode getLatestToken() throws Exception;
|
||||
|
||||
public boolean refreshToken() throws Exception;
|
||||
|
||||
boolean isSignViaCloud();
|
||||
|
||||
boolean isNeedShowSSOPage();
|
||||
|
||||
public void showReloginDialog();
|
||||
|
||||
public boolean isReloginDialogRunning();
|
||||
|
||||
public void reload();
|
||||
|
||||
public static ICloudSignOnService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICloudSignOnService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICloudSignOnService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,9 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.pendo.AbstractPendoTrackManager;
|
||||
import org.talend.core.pendo.TrackEvent;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
@@ -35,11 +38,17 @@ public interface IRemoteService extends IService {
|
||||
LoginException, JSONException;
|
||||
|
||||
boolean isAuthorized(String value);
|
||||
|
||||
boolean isTokenUsed(String adminUrl) throws Exception;
|
||||
|
||||
String getPendoKeyFromLicense() throws Exception;
|
||||
|
||||
boolean isPendoTrackAvailable() throws Exception;
|
||||
|
||||
void sendPendoTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception;
|
||||
|
||||
AbstractPendoTrackManager getPendoProjectLoginManager();
|
||||
|
||||
AbstractPendoTrackManager getPendoGenericManager(TrackEvent event, IPendoDataProperties peoperties);
|
||||
|
||||
String getTmcUser(String url, String token);
|
||||
|
||||
public boolean isCloudConnection();
|
||||
|
||||
public static IRemoteService get() {
|
||||
|
||||
@@ -81,6 +81,8 @@ public interface ITestContainerProviderService extends IService {
|
||||
|
||||
public List<ProcessItem> getAllTestContainers(ProcessItem item);
|
||||
|
||||
public List<ProcessItem> getAllTestContainers(ProcessItem item, boolean latest, boolean excludeDeleted);
|
||||
|
||||
public void copyDataSetFiles(IProcess process, IPath srcPath);
|
||||
|
||||
public String getTestDataValue(IProcess process, String instance, String testData);
|
||||
|
||||
@@ -26,6 +26,8 @@ import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IEditorReference;
|
||||
import org.eclipse.ui.part.MultiPageEditorPart;
|
||||
import org.talend.analysistask.AnalysisReportRecorder;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
@@ -206,4 +208,6 @@ public interface IDesignerCoreService extends IService {
|
||||
|
||||
public IProcess getJobletProcessByItem(Item item);
|
||||
|
||||
public List<AnalysisReportRecorder> analysis(Project project) throws PersistenceException;
|
||||
|
||||
}
|
||||
|
||||
@@ -160,6 +160,8 @@ public interface IRunProcessService extends IService {
|
||||
|
||||
public void checkLastGenerationHasCompilationError(boolean updateProblemsView) throws ProcessorException;
|
||||
|
||||
public void checkLastGenerationHasCompilationError(boolean updateProblemsView, boolean isJob) throws ProcessorException;
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "getResourceFilePath".
|
||||
*
|
||||
|
||||
@@ -380,24 +380,27 @@ public final class ProjectManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated unable to get project when resource is unloaded, use {@link #getProject(EObject)} instead
|
||||
*/
|
||||
public org.talend.core.model.properties.Project getProject(Project project, EObject object) {
|
||||
if (object != null) {
|
||||
if (object instanceof org.talend.core.model.properties.Project) {
|
||||
return (org.talend.core.model.properties.Project) object;
|
||||
}
|
||||
if (object instanceof Property) {
|
||||
return getProject(project, ((Property) object).getItem());
|
||||
}
|
||||
if (object instanceof Item) {
|
||||
return getProject(project, ((Item) object).getParent());
|
||||
}
|
||||
}
|
||||
|
||||
// default
|
||||
if (project != null) {
|
||||
return project.getEmfProject();
|
||||
}
|
||||
return null;
|
||||
// if (object != null) {
|
||||
// if (object instanceof org.talend.core.model.properties.Project) {
|
||||
// return (org.talend.core.model.properties.Project) object;
|
||||
// }
|
||||
// if (object instanceof Property) {
|
||||
// return getProject(project, ((Property) object).getItem());
|
||||
// }
|
||||
// if (object instanceof Item) {
|
||||
// return getProject(project, ((Item) object).getParent());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // default
|
||||
// if (project != null) {
|
||||
// return project.getEmfProject();
|
||||
// }
|
||||
return getProject(object);
|
||||
}
|
||||
|
||||
public IProject getResourceProject(org.talend.core.model.properties.Project project) {
|
||||
@@ -443,7 +446,7 @@ public final class ProjectManager {
|
||||
|
||||
public boolean isInMainProject(Project mainProject, EObject object) {
|
||||
if (object != null) {
|
||||
org.talend.core.model.properties.Project project = getProject(mainProject, object);
|
||||
org.talend.core.model.properties.Project project = getProject(object);
|
||||
if (project != null && mainProject != null) {
|
||||
return project.getTechnicalLabel().equals(mainProject.getEmfProject().getTechnicalLabel());
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user