Compare commits
477 Commits
undx/TDI-4
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
950c128f61 | ||
|
|
4dc7e4e82f | ||
|
|
4c819add92 | ||
|
|
9c0f5e966d | ||
|
|
da5b7979fd | ||
|
|
8d3832fdfb | ||
|
|
cd8ff90b5b | ||
|
|
d98e5ea43c | ||
|
|
13b57c8823 | ||
|
|
0436bc8dd2 | ||
|
|
091de02e75 | ||
|
|
eb84dfe75d | ||
|
|
a7dd89cc3a | ||
|
|
211abcac09 | ||
|
|
089f43ccd4 | ||
|
|
d008463ef1 | ||
|
|
d7ed643621 | ||
|
|
0972593afd | ||
|
|
c50c5c2e46 | ||
|
|
0b7b156f22 | ||
|
|
30aa2d25a6 | ||
|
|
6a813e2a73 | ||
|
|
4b7a59b497 | ||
|
|
d5490d2663 | ||
|
|
fbfc3735ad | ||
|
|
76fbd6fd32 | ||
|
|
43ef7fa5e0 | ||
|
|
be28a0d122 | ||
|
|
e44522bb69 | ||
|
|
67f04b7db3 | ||
|
|
2502688e64 | ||
|
|
6175aca630 | ||
|
|
55f7531d68 | ||
|
|
d6c888e235 | ||
|
|
7db18b198f | ||
|
|
039ed90481 | ||
|
|
eea9c85609 | ||
|
|
ca9d09e04e | ||
|
|
b5dadab5a5 | ||
|
|
2add3ffc0e | ||
|
|
38b02ee746 | ||
|
|
d8daf75329 | ||
|
|
555a722ade | ||
|
|
8a003e1a21 | ||
|
|
ce75b33a11 | ||
|
|
72fe8689bd | ||
|
|
f71f9c03ed | ||
|
|
7063b514ff | ||
|
|
ee60d35aba | ||
|
|
93db6863a8 | ||
|
|
680031d91f | ||
|
|
e779dfec2d | ||
|
|
e16c7e1af3 | ||
|
|
55aa8236ba | ||
|
|
e381b2f237 | ||
|
|
44b7aee6d0 | ||
|
|
499759ad39 | ||
|
|
cf830accc0 | ||
|
|
ae4cc4cdfd | ||
|
|
909a8e4fb7 | ||
|
|
59d71296ce | ||
|
|
b80b862bcd | ||
|
|
ed2b236467 | ||
|
|
152a06856f | ||
|
|
258be81901 | ||
|
|
8c0bdc29bf | ||
|
|
e09d3b98eb | ||
|
|
774e01ef34 | ||
|
|
5dac1b510a | ||
|
|
cdcba355d4 | ||
|
|
80d00edde3 | ||
|
|
b30b349b9b | ||
|
|
fc1c8d067b | ||
|
|
b762239fa2 | ||
|
|
13d7814fd5 | ||
|
|
bf855a7bb1 | ||
|
|
f3b2637867 | ||
|
|
e405558bd4 | ||
|
|
915701e64b | ||
|
|
4038574557 | ||
|
|
69a2741416 | ||
|
|
e43cc1f85b | ||
|
|
250ff496ba | ||
|
|
c99b037c7b | ||
|
|
810b694e5d | ||
|
|
7e66cf70d2 | ||
|
|
0285fdc191 | ||
|
|
59990aa2ca | ||
|
|
2eff81da52 | ||
|
|
13a40cfda7 | ||
|
|
e5ada32a75 | ||
|
|
cdfd2170ba | ||
|
|
5a7f0e8fe9 | ||
|
|
cacdff8623 | ||
|
|
e462ba015b | ||
|
|
8223b8f650 | ||
|
|
489c28c19f | ||
|
|
22f764d543 | ||
|
|
6c48bc0f4e | ||
|
|
5256afcd57 | ||
|
|
38f32f5d5e | ||
|
|
43b4b220d5 | ||
|
|
c476f7bfbd | ||
|
|
448217029f | ||
|
|
a046c641b0 | ||
|
|
982e319f9d | ||
|
|
48ab34ef4a | ||
|
|
b52c6e53e9 | ||
|
|
ae6b3f729b | ||
|
|
185064bf0f | ||
|
|
7dfd4d8e81 | ||
|
|
a561e95c43 | ||
|
|
ea0b76f84c | ||
|
|
b8a08d2228 | ||
|
|
c36ca11190 | ||
|
|
450cf88fbb | ||
|
|
273dbaff1d | ||
|
|
6d502306dc | ||
|
|
4f7bd39423 | ||
|
|
44bfd08c04 | ||
|
|
2237c0b071 | ||
|
|
6c77d40d68 | ||
|
|
0017db5b19 | ||
|
|
09adee337e | ||
|
|
b83227af06 | ||
|
|
16586b7bfa | ||
|
|
c2ce08daeb | ||
|
|
40c71f6911 | ||
|
|
776c0725b6 | ||
|
|
1228c42ed9 | ||
|
|
75df15acaa | ||
|
|
992ae04ae9 | ||
|
|
2b8ff4f36a | ||
|
|
30d8840a31 | ||
|
|
3ea2179438 | ||
|
|
e22daaaedf | ||
|
|
571a496303 | ||
|
|
86171f4473 | ||
|
|
ebe668a985 | ||
|
|
cff7a54f6f | ||
|
|
13309d3297 | ||
|
|
311c5680d3 | ||
|
|
743d863776 | ||
|
|
9a87e0c49e | ||
|
|
78522294dc | ||
|
|
2854fa80b5 | ||
|
|
7389610259 | ||
|
|
ae319f0d85 | ||
|
|
98a80d18b6 | ||
|
|
f878723f81 | ||
|
|
1ac0beea10 | ||
|
|
cc0cab9532 | ||
|
|
0d7971730f | ||
|
|
75cc28c0be | ||
|
|
f8e3b6d5cb | ||
|
|
8a82cff8f3 | ||
|
|
ab9d3d1db2 | ||
|
|
05779d09a3 | ||
|
|
d40317d16a | ||
|
|
0c3625940c | ||
|
|
00c0652cbb | ||
|
|
823b72bcd9 | ||
|
|
f760212388 | ||
|
|
9da9e8199a | ||
|
|
baf574ea55 | ||
|
|
892065d2c4 | ||
|
|
724dc1b72d | ||
|
|
132d794131 | ||
|
|
2298c44339 | ||
|
|
03e462f8ff | ||
|
|
f7fb174301 | ||
|
|
54fc6ecd51 | ||
|
|
779e9a8086 | ||
|
|
f2d189c792 | ||
|
|
84edc461db | ||
|
|
b06ee57323 | ||
|
|
4590b8456d | ||
|
|
b2c74643a7 | ||
|
|
b35fb11251 | ||
|
|
576d3abf29 | ||
|
|
14ca2dfaa7 | ||
|
|
b607ed6fb3 | ||
|
|
acd02c4c18 | ||
|
|
615a4f209e | ||
|
|
172f3c3483 | ||
|
|
a4ce2f457e | ||
|
|
f2af89413f | ||
|
|
0c8c872bd6 | ||
|
|
38ed0b9f1f | ||
|
|
4df14e99d0 | ||
|
|
0c3e5175dd | ||
|
|
4ed8a4a803 | ||
|
|
365700699e | ||
|
|
dab6da165f | ||
|
|
b33018d422 | ||
|
|
81ec1966bd | ||
|
|
d3246a9713 | ||
|
|
b098e18278 | ||
|
|
f635d5a9f6 | ||
|
|
49b4be0929 | ||
|
|
39afb9e94a | ||
|
|
d119efe8d6 | ||
|
|
66cdd796fd | ||
|
|
af3def7767 | ||
|
|
e7db5386c9 | ||
|
|
0b8f214c38 | ||
|
|
3c9684f993 | ||
|
|
de29a9fee4 | ||
|
|
e346460a75 | ||
|
|
294bb6a9c9 | ||
|
|
cb76ce50a7 | ||
|
|
e8e197e81c | ||
|
|
a5d5c0ef55 | ||
|
|
82b425506a | ||
|
|
932e8d61e3 | ||
|
|
6baf2b82be | ||
|
|
1331c1d70b | ||
|
|
e719944af0 | ||
|
|
333f9ad538 | ||
|
|
eede5c3bc2 | ||
|
|
cafb7db6b8 | ||
|
|
b042f20e49 | ||
|
|
c0fde38133 | ||
|
|
5efc4dd8c4 | ||
|
|
f5833bb365 | ||
|
|
548f6a97fd | ||
|
|
864ba43149 | ||
|
|
d0d955546b | ||
|
|
51cb13c619 | ||
|
|
e9d7c4a43c | ||
|
|
67d44985fa | ||
|
|
41f5d459f6 | ||
|
|
b38b96fedc | ||
|
|
df53ee1a1f | ||
|
|
035bc4a39c | ||
|
|
1105d9c65c | ||
|
|
488e7aaedb | ||
|
|
681dd59eb2 | ||
|
|
7a3c23cdb5 | ||
|
|
a6f4581b0a | ||
|
|
40e63f3c01 | ||
|
|
d54cddaedf | ||
|
|
41e2ef2d2d | ||
|
|
bccc406937 | ||
|
|
a9b3d20e06 | ||
|
|
47b5a7e251 | ||
|
|
e9b5fa3ba7 | ||
|
|
39a730cae4 | ||
|
|
d88d513e4e | ||
|
|
75176b6f45 | ||
|
|
11ecc1cbfd | ||
|
|
53efef8de0 | ||
|
|
db2eb01c38 | ||
|
|
f9af16ba90 | ||
|
|
23f2926741 | ||
|
|
48653aa380 | ||
|
|
d80fefc234 | ||
|
|
a0b395cd3a | ||
|
|
98bcc66479 | ||
|
|
a716257dd0 | ||
|
|
b164f8c447 | ||
|
|
dd352b4a8f | ||
|
|
08ac05c23e | ||
|
|
90a37f8418 | ||
|
|
137c543bfd | ||
|
|
42e94c6508 | ||
|
|
ff9c4c021a | ||
|
|
291f56e505 | ||
|
|
c67b2f479e | ||
|
|
45d373f447 | ||
|
|
edff6eeeb8 | ||
|
|
acd1555a2b | ||
|
|
97a77ec401 | ||
|
|
a5f6364467 | ||
|
|
db39d84224 | ||
|
|
d153fe9fa0 | ||
|
|
939e974d1c | ||
|
|
722a0b1341 | ||
|
|
7b391d516f | ||
|
|
b5478c3f2f | ||
|
|
0726cb38fd | ||
|
|
687ab637be | ||
|
|
4cb1deb115 | ||
|
|
c594011902 | ||
|
|
c6d7da2121 | ||
|
|
90951dced8 | ||
|
|
c22eba9ead | ||
|
|
e466c31b88 | ||
|
|
6a601fadd2 | ||
|
|
28a216d0af | ||
|
|
5622490ca4 | ||
|
|
283fa4ac93 | ||
|
|
b55a302e9f | ||
|
|
887d1249dc | ||
|
|
caa73983c8 | ||
|
|
7a502a7dc1 | ||
|
|
c395d11c00 | ||
|
|
1fc99eaa02 | ||
|
|
77a076cea1 | ||
|
|
94914d676b | ||
|
|
1faf28843b | ||
|
|
f62e85356c | ||
|
|
81a6422c0b | ||
|
|
941c36921b | ||
|
|
e01cecfb68 | ||
|
|
9d3fb2213b | ||
|
|
aa4ccadbaf | ||
|
|
1c7f2a311c | ||
|
|
0b7cba2a9d | ||
|
|
f8dd9f0c1a | ||
|
|
9c12a2e19e | ||
|
|
a2132cb833 | ||
|
|
ed4655f2aa | ||
|
|
910e3fb601 | ||
|
|
bda6b0a1a7 | ||
|
|
4ad4d3e5b2 | ||
|
|
8031d9adb3 | ||
|
|
74232f3dc3 | ||
|
|
b2e5ab5630 | ||
|
|
f1b9ed2e86 | ||
|
|
de48a67805 | ||
|
|
55723c1a48 | ||
|
|
7bb5692418 | ||
|
|
4010656564 | ||
|
|
966becc5e5 | ||
|
|
8bd1fd724f | ||
|
|
92d31aa477 | ||
|
|
b4f77effd8 | ||
|
|
3086f9be45 | ||
|
|
8dc5f853fd | ||
|
|
dfae595cbe | ||
|
|
b3271f70e0 | ||
|
|
486650da91 | ||
|
|
2885482d6f | ||
|
|
e35338ca0a | ||
|
|
76452e3799 | ||
|
|
4b0c75070d | ||
|
|
1ac63975c1 | ||
|
|
dffa6d97c9 | ||
|
|
eee0169c90 | ||
|
|
124ec1357d | ||
|
|
3e2f12848c | ||
|
|
22e607210d | ||
|
|
5780ce2693 | ||
|
|
04c0e2f42c | ||
|
|
3b6ffd8f49 | ||
|
|
61d8e73084 | ||
|
|
fffdd9a78e | ||
|
|
9186869001 | ||
|
|
c3f8ae1d53 | ||
|
|
294e8a23f5 | ||
|
|
637a2423a0 | ||
|
|
6ad0a9ac92 | ||
|
|
161e5d97a7 | ||
|
|
e6a9513d45 | ||
|
|
74174c14c6 | ||
|
|
2ec51860a5 | ||
|
|
bc3e338910 | ||
|
|
a823899d39 | ||
|
|
436af2427e | ||
|
|
d7252412ed | ||
|
|
af38e2a0b6 | ||
|
|
c3d3fcf665 | ||
|
|
987c6667ac | ||
|
|
f0401b97d1 | ||
|
|
26992f7cf9 | ||
|
|
169ab1c4cc | ||
|
|
f04049abc0 | ||
|
|
7e6f2dee19 | ||
|
|
2dd7ce6fac | ||
|
|
be373dd141 | ||
|
|
43876863e6 | ||
|
|
4ac2a830a9 | ||
|
|
3d6d3e77e3 | ||
|
|
71b4ccc531 | ||
|
|
48289a3c72 | ||
|
|
9a219873f1 | ||
|
|
d013d08bdc | ||
|
|
761dcc7902 | ||
|
|
0a85c8056c | ||
|
|
3df4cf1348 | ||
|
|
c7965cf552 | ||
|
|
61b55c0d2a | ||
|
|
be41bcbef3 | ||
|
|
2827919dae | ||
|
|
33848db788 | ||
|
|
ac359e295a | ||
|
|
6965eb79fa | ||
|
|
80f02ef1e7 | ||
|
|
7c50efdf21 | ||
|
|
7f40393753 | ||
|
|
356dba9940 | ||
|
|
83f7a577d9 | ||
|
|
e87f557a49 | ||
|
|
a51b3316d3 | ||
|
|
46a22c4ad0 | ||
|
|
f8cc600d06 | ||
|
|
3146ed307f | ||
|
|
f4f91a5323 | ||
|
|
2aee38595f | ||
|
|
dde32c8b49 | ||
|
|
563b69231f | ||
|
|
1ea6227f59 | ||
|
|
148e9e9253 | ||
|
|
1e6a43650f | ||
|
|
67616537b2 | ||
|
|
1df4e819e0 | ||
|
|
b3d6c45f2d | ||
|
|
f1341cd69f | ||
|
|
a64bcecb0c | ||
|
|
5707d4db94 | ||
|
|
5e20a78752 | ||
|
|
85e44cd5c6 | ||
|
|
8582c20f1a | ||
|
|
6216fd76ea | ||
|
|
71d339fc0a | ||
|
|
d286276e6d | ||
|
|
3996d24893 | ||
|
|
f37b5b6073 | ||
|
|
060a9c7f9e | ||
|
|
789b4c02c0 | ||
|
|
4c3e3dfb2c | ||
|
|
7b3a20a3b3 | ||
|
|
e3880f3904 | ||
|
|
d54ed2a62c | ||
|
|
cde1129ce4 | ||
|
|
1081ae3680 | ||
|
|
3e02adb157 | ||
|
|
c212142789 | ||
|
|
ab67a4cc91 | ||
|
|
675da3fc7d | ||
|
|
6f9ad53b0d | ||
|
|
6cfffe1775 | ||
|
|
3c2d416677 | ||
|
|
f7f5627679 | ||
|
|
939c328d1b | ||
|
|
cb31b968bf | ||
|
|
c0636a6822 | ||
|
|
1e31b9ed97 | ||
|
|
d07e5beaf9 | ||
|
|
281c39428c | ||
|
|
3eaef89b5d | ||
|
|
de34e9bcaa | ||
|
|
5d1956966c | ||
|
|
1b1966058f | ||
|
|
ca65a35c8e | ||
|
|
c0a2a27815 | ||
|
|
832b460e4b | ||
|
|
3e8c7bb5d6 | ||
|
|
2f5f944d0b | ||
|
|
cf52e1e004 | ||
|
|
a05b2538a1 | ||
|
|
b456595669 | ||
|
|
bf2699c7c9 | ||
|
|
35047b473d | ||
|
|
50233f93f3 | ||
|
|
bf3bbf6430 | ||
|
|
735bbef8f3 | ||
|
|
28782a40d4 | ||
|
|
da57b8a80a | ||
|
|
9d0049bede | ||
|
|
1bd0f7939c | ||
|
|
b8e4c3bc7a | ||
|
|
931178184c | ||
|
|
3f8fc4ef4f | ||
|
|
ad3490606d | ||
|
|
085406b8da | ||
|
|
e9ef85f8e5 | ||
|
|
7543617b31 | ||
|
|
e21bb53627 | ||
|
|
a8f36c79f5 | ||
|
|
58171338ac | ||
|
|
cebd4646d9 | ||
|
|
9f2997692a | ||
|
|
1387f66674 | ||
|
|
7ee7eddb9d | ||
|
|
e674ec78f7 |
@@ -65,7 +65,7 @@ Module.view.download.external.modules.action.text=Download external modules
|
||||
Module.view.download.external.modules.action.description=Download external modules
|
||||
download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules.
|
||||
download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually.
|
||||
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
|
||||
download.external.dialog.help.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
AcceptModuleLicensesWizard.title=Download external modules
|
||||
AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all
|
||||
AcceptModuleLicensesWizardDialog.cancelConfirmation.title=Confirmation
|
||||
|
||||
@@ -1136,7 +1136,7 @@ DatabaseForm.hc.link.none=None
|
||||
DatabaseForm.hc.link.repository=Repository
|
||||
DatabaseForm.hc.link.title=Hadoop Cluster
|
||||
DatabaseForm.checkFileExist=The file {0} is invalid or doesn't exist
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://help.talend.com/pages/viewpage.action?pageId=14230347
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
DatabaseForm.helpInfo.installDriverLink.label=How to install a driver
|
||||
SelectorTableForm.toolTip=Not available with this database
|
||||
FileStep1.modeButText=Read excel2007 file format(xlsx)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<import plugin="org.eclipse.jdt.launching" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.jdt.ui" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.hamcrest.core" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.eclipse.jdt.launching.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.eclipse.jdt.launching.ui.macosx" os="macosx" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<plugin id="org.talend.libraries.jdbc.access" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.as400" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.derby" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.exasol" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.h2" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.hsql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.ingres" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.mysql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.paraccel" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.postgresql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.sqlite3" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.teradata" download-size="0" install-size="0" version="0.0.0"/>
|
||||
</feature>
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<import plugin="com.thoughtworks.paranamer" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="jackson-core-asl" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="jackson-mapper-asl" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.codec" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.codec" version="1.14.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.compress" version="1.10.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.commons-configuration2" version="2.8.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"/>
|
||||
|
||||
BIN
main/plugins/org.talend.common.ui.runtime/icons/lowercase.jpg
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/lowercase.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
main/plugins/org.talend.common.ui.runtime/icons/uppercase.jpg
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/uppercase.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
main/plugins/org.talend.common.ui.runtime/icons1/routinesjar.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons1/routinesjar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 B |
BIN
main/plugins/org.talend.common.ui.runtime/icons1/share.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons1/share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -132,3 +132,8 @@ GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been register
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=The xml can't parse.
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=The xml can't parse in this format.
|
||||
HibernateUtils.auditDBIsNotUsable=The audit database must be empty or only contains tables related to audit.
|
||||
CasePushButton.CaseButton.Tip=Uppercase/Lowercase Db column
|
||||
QuotePushButton.QuoteButton.Tip=Add/Remove Quote on Db column
|
||||
QuoteManipulateDialog.title=Add/Remove quote on Db column
|
||||
QuoteManipulateDialog.addQuote=Add quote
|
||||
QuoteManipulateDialog.removeQuote=Remove quote
|
||||
|
||||
@@ -77,6 +77,7 @@ public enum ECoreImage implements IImage {
|
||||
ROUTES_ICON("/icons1/routes_icon.png"), //$NON-NLS-1$
|
||||
ROUTINE_ICON("/icons1/routine.png"), //$NON-NLS-1$
|
||||
ROUTINE_EDITOR_ICON("/icons1/routine_editor.png"), //$NON-NLS-1$
|
||||
ROUTINESJAR_ICON("/icons1/routinesjar.png"), //$NON-NLS-1$
|
||||
JOB_SCRIPTS_ICON("/icons1/job_scripts.png"), //$NON-NLS-1$
|
||||
JOB_SCRIPTS_TOOLBAR_ICON("/icons1/job_script_toolbar.png"), //$NON-NLS-1$
|
||||
FTP_ICON("/icons1/ftp.png"), //$NON-NLS-1$
|
||||
@@ -166,6 +167,7 @@ public enum ECoreImage implements IImage {
|
||||
RECYCLE_BIN_OVERLAY("/icons1/recycle_bin_overlay.gif"), //$NON-NLS-1$
|
||||
DELETED_OVERLAY("/icons1/deleted_overlay.gif"), //$NON-NLS-1$
|
||||
IMPORT_JAR("/icons1/importjar.gif"), //$NON-NLS-1$
|
||||
SHARE_LIBS("/icons1/share.png"), //$NON-NLS-1$
|
||||
REFERENCED_ICON("/icons1/referenced.png"), //$NON-NLS-1$
|
||||
|
||||
CDC_ADDED_OVERLAY("/icons1/cdc_added_overlay.png"), //$NON-NLS-1$
|
||||
|
||||
@@ -88,6 +88,8 @@ public enum EImage implements IImage {
|
||||
LEFTX_ICON("/icons/leftx.png"), //$NON-NLS-1$
|
||||
RIGHT_ICON("/icons/right.gif"), //$NON-NLS-1$
|
||||
RIGHTX_ICON("/icons/rightx.png"), //$NON-NLS-1$
|
||||
LOWERCASE_ICON("/icons/lowercase.jpg"), //$NON-NLS-1$
|
||||
UPPERCASE_ICON("/icons/uppercase.jpg"), //$NON-NLS-1$
|
||||
|
||||
KEY_ICON("/icons/key.gif"), //$NON-NLS-1$
|
||||
HIERARCHY_ICON("/icons/hierarchicalLayout.gif"), //$NON-NLS-1$
|
||||
|
||||
@@ -16,6 +16,8 @@ import org.eclipse.core.internal.runtime.InternalPlatform;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC root class global comment. Detailled comment <br/>
|
||||
@@ -52,5 +54,9 @@ public class WindowSystem {
|
||||
public static boolean isOSX() {
|
||||
return Platform.WS_CARBON.equals(ws) || Platform.WS_COCOA.equals(ws);
|
||||
}
|
||||
|
||||
public static boolean isBigSurOrLater () {
|
||||
return isOSX() && ("10.16".compareTo(System.getProperty("os.version","0")) <= 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
org.talend.utils,
|
||||
org.eclipse.core.net,
|
||||
org.eclipse.m2e.core,
|
||||
org.eclipse.m2e.maven.runtime
|
||||
org.eclipse.m2e.maven.runtime,
|
||||
org.eclipse.core.resources
|
||||
Export-Package: org.talend.commons,
|
||||
org.talend.commons.exception,
|
||||
org.talend.commons.i18n,
|
||||
|
||||
@@ -92,14 +92,13 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -57,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static Boolean isJunitWorking;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
@@ -123,6 +125,35 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isJunitWorking() {
|
||||
if (isJunitWorking == null) {
|
||||
try {
|
||||
String[] args = Platform.getCommandLineArgs();
|
||||
String applicationId = null;
|
||||
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
if (args[i].equalsIgnoreCase("-application")) { //$NON-NLS-1$
|
||||
applicationId = args[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (applicationId != null
|
||||
&& (applicationId.equals("org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication") //$NON-NLS-1$
|
||||
|| applicationId.equals("org.eclipse.pde.junit.runtime.uitestapplication"))) { //$NON-NLS-1$
|
||||
isJunitWorking = true;
|
||||
} else {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
}
|
||||
if (isJunitWorking == null) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
return isJunitWorking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
* happens during testing.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.talend.commons.runtime.service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
|
||||
public interface ICollectDataService {
|
||||
|
||||
final String KEY_SOURCE = "source";
|
||||
|
||||
//
|
||||
final String AMC_FILE_TYPE_USED = "FILE_TYPE_USED";
|
||||
|
||||
final String AMC_DATABASE_TYPE_USED = "DATABASE_TYPE_USED";
|
||||
|
||||
final String AMC_PREVIEW_KEY = "amc.datasource";
|
||||
|
||||
final String AMC_PREVIEW_FILEVALUE = "File";
|
||||
|
||||
final String AMC_PREVIEW_DATABASEVALUE = "Database";
|
||||
|
||||
/**
|
||||
* @return json string
|
||||
*/
|
||||
String getCollectedDataJSON();
|
||||
|
||||
Properties getCollectedData();
|
||||
|
||||
public static ICollectDataService getInstance(String from) throws Exception {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ICollectDataService.class).getBundleContext();
|
||||
Collection<ServiceReference<ICollectDataService>> tacokitServices = Collections.emptyList();
|
||||
try {
|
||||
tacokitServices = bc.getServiceReferences(ICollectDataService.class, null);
|
||||
} catch (InvalidSyntaxException e) {
|
||||
CommonExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
if (tacokitServices != null) {
|
||||
for (ServiceReference<ICollectDataService> sr : tacokitServices) {
|
||||
if (from == null || from.equals(sr.getProperty(KEY_SOURCE))) {
|
||||
ICollectDataService tacokitService = bc.getService(sr);
|
||||
if (tacokitService != null) {
|
||||
return tacokitService;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.runtime.service;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
*/
|
||||
@@ -19,6 +21,10 @@ public interface P2InstallComponent {
|
||||
|
||||
boolean install();
|
||||
|
||||
default boolean install(IProgressMonitor monitor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean needRelaunch();
|
||||
|
||||
String getInstalledMessages();
|
||||
|
||||
@@ -56,6 +56,19 @@ public class Hex {
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
public static boolean isNeedConvertToHex(String value) {
|
||||
if (value == null || "".equals(value.trim())) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
int ch = value.charAt(i);
|
||||
if (ch < 32) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int toDigit(char ch, int index) {
|
||||
int digit = Character.digit(ch, 16);
|
||||
|
||||
@@ -232,10 +232,50 @@ public class VersionUtils {
|
||||
* Check if studio version < other studio version record in remote project.
|
||||
*/
|
||||
public static boolean isInvalidProductVersion(String remoteFullProductVersion) {
|
||||
String localProductVersion = getInternalVersion();
|
||||
return isInvalidProductVersion(localProductVersion, remoteFullProductVersion);
|
||||
}
|
||||
|
||||
protected static boolean isInvalidProductVersion(String localProductVersion, String remoteFullProductVersion) {
|
||||
if (remoteFullProductVersion == null) {
|
||||
return false;
|
||||
}
|
||||
return getInternalVersion().compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
|
||||
if (skipCheckingNightlyBuilds(localProductVersion, remoteFullProductVersion)) {
|
||||
return false;
|
||||
}
|
||||
return localProductVersion.compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
|
||||
}
|
||||
|
||||
public static boolean productVersionIsNewer(String remoteFullProductVersion) {
|
||||
String localProductVersion = getInternalVersion();
|
||||
return productVersionIsNewer(localProductVersion, remoteFullProductVersion);
|
||||
}
|
||||
|
||||
protected static boolean productVersionIsNewer(String localProductVersion, String remoteFullProductVersion) {
|
||||
if (remoteFullProductVersion == null) {
|
||||
return false;
|
||||
}
|
||||
if (skipCheckingNightlyBuilds(localProductVersion, remoteFullProductVersion)) {
|
||||
return false;
|
||||
}
|
||||
return localProductVersion.compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) > 0;
|
||||
}
|
||||
|
||||
private static boolean skipCheckingNightlyBuilds(String localProductVersion, String remoteFullProductVersion) {
|
||||
String separator = "-"; //$NON-NLS-1$
|
||||
String localSuffix = StringUtils.substringAfterLast(localProductVersion, separator);
|
||||
|
||||
String remoteProductVersion = getProductVersionWithoutBranding(remoteFullProductVersion);
|
||||
String remoteSuffix = StringUtils.substringAfterLast(remoteProductVersion, separator);
|
||||
|
||||
String nightly = "SNAPSHOT"; //$NON-NLS-1$
|
||||
String milestone = "M"; //$NON-NLS-1$
|
||||
if ((localSuffix.equals(nightly) || localSuffix.startsWith(milestone))
|
||||
&& (remoteSuffix.equals(nightly) || remoteSuffix.startsWith(milestone))) {
|
||||
// skip checking between nightly/milestone build.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getTalendVersion(String productVersion) {
|
||||
@@ -310,4 +350,24 @@ public class VersionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getSimplifiedPatchName(String projectPatchName) {
|
||||
|
||||
if (projectPatchName != null) {
|
||||
String result = null;
|
||||
if (projectPatchName.contains("_") && projectPatchName.split("_").length >= 3) {
|
||||
result = projectPatchName.split("_")[2];
|
||||
if (!result.startsWith("R")) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (projectPatchName.contains("-")) {
|
||||
String[] split = projectPatchName.split("-");
|
||||
if (split != null && split.length > 0) {
|
||||
return result + "-" + split[split.length - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ public interface IExtendedList<T> extends List<T> {
|
||||
public void swapElements(List<Integer> indicesOrigin, List<Integer> indicesTarget);
|
||||
|
||||
public void swapElement(T object1, T object2);
|
||||
|
||||
public void replaceElement(int index, T object2);
|
||||
|
||||
/**
|
||||
* Getter for useEquals.
|
||||
|
||||
@@ -537,6 +537,11 @@ public class ListenableList<T> implements IExtendedList<T> {
|
||||
fireReplacedEvent(index, replacedObject, element, false);
|
||||
return replacedObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceElement(int index, T element) {
|
||||
this.list.set(index, element);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -109,11 +108,11 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
// MOD yyin 2012-05-15 TDQ-5190
|
||||
String sql = "SELECT DISTINCT CREATOR FROM SYSIBM.SYSTABLES"; //$NON-NLS-1$
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
String creator = rs.getString("CREATOR"); //$NON-NLS-1$
|
||||
@@ -331,18 +330,20 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
|
||||
throws SQLException {
|
||||
// for real
|
||||
String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where TBNAME='" + tableNamePattern + "' AND TBCREATOR = '" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ schemaPattern + "' ORDER BY TBCREATOR, TBNAME, COLNO"; //$NON-NLS-1$
|
||||
String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where TBNAME=? AND TBCREATOR = ? ORDER BY TBCREATOR, TBNAME, COLNO"; //$NON-NLS-1$
|
||||
|
||||
// for test
|
||||
// String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'";
|
||||
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, tableNamePattern);
|
||||
stmt.setString(2, schemaPattern);
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
|
||||
// For real db2 for zos, should use these code.
|
||||
|
||||
@@ -25,7 +25,6 @@ public class JtdsDatabaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
|
||||
@Override
|
||||
public ResultSet getSchemas() throws SQLException {
|
||||
java.sql.Statement statement = connection.createStatement();
|
||||
String sql;
|
||||
if (((PackageFakeDatabaseMetadata) connection).getDatabaseMajorVersion() >= 9) {
|
||||
sql = JDBC3 ? "SELECT name AS TABLE_SCHEM, NULL as TABLE_CATALOG FROM " + connection.getCatalog() + ".sys.schemas"
|
||||
@@ -36,6 +35,7 @@ public class JtdsDatabaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
}
|
||||
|
||||
sql += " ORDER BY TABLE_SCHEM";
|
||||
return statement.executeQuery(sql);
|
||||
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
|
||||
return statement.executeQuery();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -148,19 +148,23 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
}
|
||||
|
||||
// For Calculation View
|
||||
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3])) {
|
||||
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3]) && "_SYS_BIC".equalsIgnoreCase(schemaPattern)) { //$NON-NLS-1$
|
||||
// check if the type is contained is in the types needed.
|
||||
String sqlcv = "SELECT OBJECT_NAME,PACKAGE_ID FROM _SYS_REPO.ACTIVE_OBJECT WHERE OBJECT_SUFFIX = 'calculationview'"; //$NON-NLS-1$
|
||||
if (tableNamePattern != null && !tableNamePattern.equals("%")) { //$NON-NLS-1$
|
||||
sqlcv += " AND (OBJECT_NAME LIKE '" + tableNamePattern + "'"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sqlcv += " OR PACKAGE_ID LIKE '" + tableNamePattern + "')"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sqlcv += " AND (OBJECT_NAME LIKE ?"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sqlcv += " OR PACKAGE_ID LIKE ? )"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
ResultSet rscv = null;
|
||||
Statement stmtcv = null;
|
||||
PreparedStatement stmtcv = null;
|
||||
List<String[]> listcv = new ArrayList<String[]>();
|
||||
try {
|
||||
stmtcv = connection.createStatement();
|
||||
rscv = stmtcv.executeQuery(sqlcv);
|
||||
stmtcv = connection.prepareStatement(sqlcv);
|
||||
if (tableNamePattern != null && !tableNamePattern.equals("%")) {
|
||||
stmtcv.setString(1, tableNamePattern);
|
||||
stmtcv.setString(2, tableNamePattern);
|
||||
}
|
||||
rscv = stmtcv.executeQuery();
|
||||
while (rscv.next()) {
|
||||
String objectName = rscv.getString("OBJECT_NAME"); //$NON-NLS-1$
|
||||
if (objectName != null) {
|
||||
@@ -171,7 +175,7 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
packageId = packageId.trim();
|
||||
}
|
||||
String name = packageId + "/" + objectName; //$NON-NLS-1$
|
||||
String[] r = new String[] { "", "_SYS_BIC", name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
String[] r = new String[] { "", schemaPattern, name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
listcv.add(r);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
@@ -303,11 +307,11 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
if (!load) {
|
||||
String sqlcv = "SELECT * from \"" + schemaPattern + "\".\"" + tableNamePattern + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ResultSet rscv = null;
|
||||
Statement stmtcv = null;
|
||||
PreparedStatement stmtcv = null;
|
||||
List<String[]> listcv = new ArrayList<String[]>();
|
||||
try {
|
||||
stmtcv = connection.createStatement();
|
||||
rscv = stmtcv.executeQuery(sqlcv);
|
||||
stmtcv = connection.prepareStatement(sqlcv);
|
||||
rscv = stmtcv.executeQuery();
|
||||
int i = 1;
|
||||
while (rscv.next()) {
|
||||
String tableName = tableNamePattern;
|
||||
@@ -355,4 +359,16 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
tableResultSet.setData(list);
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDatabaseProductName() throws SQLException {
|
||||
return this.connection.getMetaData().getDatabaseProductName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDatabaseProductVersion() throws SQLException {
|
||||
return this.connection.getMetaData().getDatabaseProductVersion();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -62,11 +62,11 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
// see the feature 5827
|
||||
String sql = "SELECT DISTINCT LIBNAME FROM SASHELP.VTABLE"; //$NON-NLS-1$
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
String creator = rs.getString("LIBNAME"); //$NON-NLS-1$
|
||||
@@ -147,17 +147,21 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
public ResultSet getTables(String catalog, String schema, String tableNamePattern, String[] types) throws SQLException {
|
||||
String sql;
|
||||
if (schema != null) {
|
||||
sql = "SELECT * FROM SASHELP.VTABLE where LIBNAME = '" + schema + "'"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sql = "SELECT * FROM SASHELP.VTABLE where LIBNAME = ?"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
} else {
|
||||
sql = "SELECT * FROM SASHELP.VTABLE"; //$NON-NLS-1$
|
||||
}
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
if (schema != null) {
|
||||
stmt.setString(1, schema);
|
||||
}
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
String name = rs.getString("MEMNAME"); //$NON-NLS-1$
|
||||
@@ -229,18 +233,20 @@ public class SASDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
|
||||
throws SQLException {
|
||||
// for real
|
||||
String sql = "SELECT * FROM SASHELP.VCOLUMN where MEMNAME='" + tableNamePattern + "' AND LIBNAME = '" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ schemaPattern + "' ORDER BY LIBNAME, MEMNAME, VARNUM"; //$NON-NLS-1$
|
||||
String sql = "SELECT * FROM SASHELP.VCOLUMN where MEMNAME=? AND LIBNAME = ? ORDER BY LIBNAME, MEMNAME, VARNUM"; //$NON-NLS-1$
|
||||
|
||||
// for test
|
||||
// String sql = "SELECT * FROM SYSIBM.SYSCOLUMNS where NAME='NAME'";
|
||||
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, tableNamePattern);
|
||||
stmt.setString(2, schemaPattern);
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
String tableName = rs.getString("MEMNAME"); //$NON-NLS-1$
|
||||
if (tableName != null) {
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -52,10 +52,12 @@ public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
|
||||
for (String catalogName : catList) {
|
||||
String sql = createSqlByLoginAndCatalog(login, catalogName);
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, login);
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
int temp = rs.getInt(1);
|
||||
@@ -113,8 +115,7 @@ public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
|
||||
*/
|
||||
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
|
||||
String sql = "select count(*) from " + catalogName
|
||||
+ ".dbo.sysusers where suid in (select suid from "+catalogName+".dbo.syslogins where name = '" + loginName
|
||||
+ "')";
|
||||
+ ".dbo.sysusers where suid in (select suid from " + catalogName + ".dbo.syslogins where name = ? )";
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,10 +54,13 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
|
||||
for (String catalogName : catList) {
|
||||
String sql = createSqlByLoginAndCatalog(login, catalogName);
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, login);
|
||||
stmt.setString(2, login);
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
int temp = rs.getInt(1);
|
||||
@@ -92,11 +95,11 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
|
||||
public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException {
|
||||
String sql = "SELECT DISTINCT name FROM " + catalog + ".dbo.sysusers where suid > 0"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
String name = rs.getString("name"); //$NON-NLS-1$
|
||||
@@ -136,9 +139,9 @@ public class SybaseDatabaseMetaData extends PackageFakeDatabaseMetadata {
|
||||
*/
|
||||
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
|
||||
return "select count(*) from " + catalogName //$NON-NLS-1$
|
||||
+ ".dbo.sysusers where suid in (select suid from master.dbo.syslogins where name = '" + loginName //$NON-NLS-1$
|
||||
+ "') or suid in (select altsuid from " + catalogName //$NON-NLS-1$
|
||||
+ ".dbo.sysalternates a, master.dbo.syslogins b where b.name = '" + loginName + "' and a.suid = b.suid)"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ ".dbo.sysusers where suid in (select suid from master.dbo.syslogins where name = ?"
|
||||
+ ") or suid in (select altsuid from " + catalogName //$NON-NLS-1$
|
||||
+ ".dbo.sysalternates a, master.dbo.syslogins b where b.name = ? and a.suid = b.suid)"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
package org.talend.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -97,13 +97,12 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion();
|
||||
String sql = "HELP COLUMN \"" + schema + "\".\"" + table + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
String columnName = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.INDICESV WHERE UPPER(databasename) = UPPER('" + schema //$NON-NLS-1$
|
||||
+ "') AND UPPER(tablename) = UPPER('" + table + "') AND UPPER(UniqueFlag) = UPPER('Y')"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
sql = "SELECT * from DBC.INDICESV WHERE UPPER(databasename) = UPPER(?) AND UPPER(tablename) = UPPER(?) AND UPPER(UniqueFlag) = UPPER('Y')"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rs = getResultSet(catalog, schema, table, sql);
|
||||
while (rs.next()) {
|
||||
columnName = rs.getString("ColumnName").trim(); //$NON-NLS-1$
|
||||
@@ -112,8 +111,11 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
list.add(r);
|
||||
}
|
||||
} else {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, schema);
|
||||
stmt.setString(2, table);
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
|
||||
String pk = rs.getString("Primary?");//$NON-NLS-1$
|
||||
@@ -138,10 +140,10 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
|
||||
public ResultSet getResultSet(String catalog, String schema, String table, String sql) throws SQLException {
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
rs = stmt.executeQuery();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -203,17 +205,15 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
sysTable = "DBC.TABLESV";//$NON-NLS-1$
|
||||
}
|
||||
if (types != null && types.length > 0) {
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$
|
||||
+ "') AND tablekind " + addTypesToSql(types); //$NON-NLS-1$
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER(?) AND tablekind " + addTypesToSql(types); //$NON-NLS-1$
|
||||
} else {
|
||||
// When the types is empty, all the tables and views will be retrieved.
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$
|
||||
+ "') AND (tablekind = 'T' or tablekind = 'V')"; //$NON-NLS-1$
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER(?) AND (tablekind = 'T' or tablekind = 'V')"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// add the filter for table/views
|
||||
if (!StringUtils.isEmpty(tableNamePattern)) {
|
||||
sql = sql + " AND tablename LIKE '" + tableNamePattern + "'";//$NON-NLS-1$//$NON-NLS-2$
|
||||
sql = sql + " AND tablename LIKE ?";//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
if (types != null && types.length > 0) {
|
||||
@@ -223,11 +223,18 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
}
|
||||
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
stmt.setString(1, database);
|
||||
|
||||
// add the filter for table/views
|
||||
if (!StringUtils.isEmpty(tableNamePattern)) {
|
||||
stmt.setString(2, tableNamePattern);
|
||||
}
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
String name = rs.getString("TableName").trim(); //$NON-NLS-1$
|
||||
@@ -326,21 +333,33 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
if (!StringUtils.isEmpty(database)) {
|
||||
sql = "HELP COLUMN \"" + database + "\".\"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$
|
||||
+ "') AND UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(databasename) = UPPER(?) AND UPPER(tablename) = UPPER(?)" //$NON-NLS-1$
|
||||
+ " Order by tablename "; //$NON-NLS-1$ //$NON-NLS-3$
|
||||
}
|
||||
} else {
|
||||
sql = "HELP COLUMN \"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(tablename) = UPPER(?)" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$
|
||||
// //$NON-NLS-3$
|
||||
}
|
||||
}
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
PreparedStatement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
stmt = connection.prepareStatement(sql);
|
||||
if (!StringUtils.isEmpty(database)) {
|
||||
if (dbMajorVersion > 12) {
|
||||
stmt.setString(1, database);
|
||||
stmt.setString(2, tableNamePattern);
|
||||
}
|
||||
} else {
|
||||
if (dbMajorVersion > 12) {
|
||||
stmt.setString(1, tableNamePattern);
|
||||
}
|
||||
}
|
||||
|
||||
rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
String tableName = tableNamePattern;
|
||||
String columnName = null;
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.commons.utils.network;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.Authenticator;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.PasswordAuthentication;
|
||||
@@ -22,7 +23,11 @@ import java.net.SocketException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -150,6 +155,28 @@ public class NetworkUtil {
|
||||
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
String httpProxyHost = System.getProperty("http.proxyHost"); //$NON-NLS-1$
|
||||
String httpProxyPort = System.getProperty("http.proxyPort"); //$NON-NLS-1$
|
||||
String httpsProxyHost = System.getProperty("https.proxyHost"); //$NON-NLS-1$
|
||||
String httpsProxyPort = System.getProperty("https.proxyPort"); //$NON-NLS-1$
|
||||
String requestingHost = getRequestingHost();
|
||||
int requestingPort = getRequestingPort();
|
||||
String proxyHost = null;
|
||||
String proxyPort = null;
|
||||
boolean isHttp = false;
|
||||
if ("http".equalsIgnoreCase(getRequestingScheme())) {
|
||||
isHttp = true;
|
||||
}
|
||||
if (isHttp && StringUtils.isNotBlank(httpProxyHost)) {
|
||||
proxyHost = httpProxyHost;
|
||||
proxyPort = httpProxyPort;
|
||||
} else {
|
||||
proxyHost = httpsProxyHost;
|
||||
proxyPort = httpsProxyPort;
|
||||
}
|
||||
if (!StringUtils.equals(proxyHost, requestingHost) || !StringUtils.equals(proxyPort, "" + requestingPort)) {
|
||||
return null;
|
||||
}
|
||||
String httpProxyUser = System.getProperty("http.proxyUser"); //$NON-NLS-1$
|
||||
String httpProxyPassword = System.getProperty("http.proxyPassword"); //$NON-NLS-1$
|
||||
String httpsProxyUser = System.getProperty("https.proxyUser"); //$NON-NLS-1$
|
||||
@@ -167,7 +194,11 @@ public class NetworkUtil {
|
||||
proxyPassword = httpsProxyPassword.toCharArray();
|
||||
}
|
||||
}
|
||||
return new PasswordAuthentication(proxyUser, proxyPassword);
|
||||
if (StringUtils.isBlank(proxyUser)) {
|
||||
return null;
|
||||
} else {
|
||||
return new PasswordAuthentication(proxyUser, proxyPassword);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
@@ -206,6 +237,58 @@ public class NetworkUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<String> getLocalLoopbackAddresses(boolean wrapIpV6) {
|
||||
Set<String> addresses = new LinkedHashSet<>();
|
||||
try {
|
||||
addresses.add(getIp(InetAddress.getLoopbackAddress(), wrapIpV6));
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
try {
|
||||
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
|
||||
while (networkInterfaces.hasMoreElements()) {
|
||||
NetworkInterface networkInterface = networkInterfaces.nextElement();
|
||||
Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
|
||||
while (inetAddresses.hasMoreElements()) {
|
||||
InetAddress inetAddress = inetAddresses.nextElement();
|
||||
if (inetAddress != null && inetAddress.isLoopbackAddress()) {
|
||||
addresses.add(getIp(inetAddress, wrapIpV6));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
if (addresses.isEmpty()) {
|
||||
addresses.add("127.0.0.1");
|
||||
String ipv6Loopback = "::1";
|
||||
if (wrapIpV6) {
|
||||
ipv6Loopback = "[" + ipv6Loopback + "]";
|
||||
}
|
||||
addresses.add(ipv6Loopback);
|
||||
}
|
||||
|
||||
return new ArrayList<>(addresses);
|
||||
}
|
||||
|
||||
private static String getIp(InetAddress inetAddress, boolean wrapIpV6) {
|
||||
if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) {
|
||||
String addr = inetAddress.getHostAddress();
|
||||
if (!addr.startsWith("[") || !addr.endsWith("]")) {
|
||||
int idx = addr.indexOf("%");
|
||||
if (idx > 0) {
|
||||
addr = addr.substring(0, idx);
|
||||
}
|
||||
addr = "[" + addr + "]";
|
||||
}
|
||||
return addr;
|
||||
} else {
|
||||
return inetAddress.getHostAddress();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isSelfAddress(String addr) {
|
||||
if (addr == null || addr.isEmpty()) {
|
||||
return false; // ?
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.net.URISyntaxException;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -38,6 +39,8 @@ import java.util.Set;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Priority;
|
||||
import org.eclipse.core.internal.net.ProxyManager;
|
||||
import org.eclipse.core.internal.net.ProxyType;
|
||||
import org.eclipse.core.net.proxy.IProxyChangeEvent;
|
||||
import org.eclipse.core.net.proxy.IProxyService;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
@@ -77,6 +80,14 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private static final String PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER = "talend.studio.proxy.disableDefaultSelectorProvider";
|
||||
|
||||
private static final String PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY = "talend.studio.proxy.excludeLoopbackAutomatically";
|
||||
|
||||
private static final String PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY_DEFAULT = "true";
|
||||
|
||||
private static final String PROP_PROXY_HTTP_NON_PROXYHOSTS = "http.nonProxyHosts";
|
||||
|
||||
private static final String PROP_PROXY_HTTPS_NON_PROXYHOSTS = "https.nonProxyHosts";
|
||||
|
||||
/**
|
||||
* Example: update.talend.com,socket:http,https:http;nexus.talend.com,socket,http;,socket:http
|
||||
*/
|
||||
@@ -104,6 +115,8 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private EProxySelector eProxySelector;
|
||||
|
||||
private IProxyService proxyManager;
|
||||
|
||||
final private Map<Object, Collection<IProxySelectorProvider>> selectorProviders;
|
||||
|
||||
private Map<String, Map<String, String>> hostMap;
|
||||
@@ -114,6 +127,10 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private static Object instanceLock = new Object();
|
||||
|
||||
private List<String> localLoopbackAddresses;
|
||||
|
||||
private Object localLoopbackAddressesLock = new Object();
|
||||
|
||||
private boolean printProxyLog = false;
|
||||
|
||||
private boolean allowProxyRedirect = false;
|
||||
@@ -126,6 +143,8 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private boolean updateSystemPropertiesForJre = true;
|
||||
|
||||
private boolean excludeLoopbackAddressAutomatically = false;
|
||||
|
||||
private TalendProxySelector(final ProxySelector eclipseDefaultSelector) {
|
||||
this.eclipseDefaultSelector = eclipseDefaultSelector;
|
||||
this.jreDefaultSelector = new DefaultProxySelector();
|
||||
@@ -139,6 +158,8 @@ public class TalendProxySelector extends ProxySelector {
|
||||
executeConnectionFailed = Boolean.valueOf(System.getProperty(PROP_EXECUTE_CONNECTION_FAILED, Boolean.TRUE.toString()));
|
||||
updateSystemPropertiesForJre = Boolean
|
||||
.valueOf(System.getProperty(PROP_UPDATE_SYSTEM_PROPERTIES_FOR_JRE, Boolean.TRUE.toString()));
|
||||
excludeLoopbackAddressAutomatically = Boolean.valueOf(System.getProperty(
|
||||
PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY, PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY_DEFAULT));
|
||||
|
||||
switch (System.getProperty(PROP_PROXY_SELECTOR, PROP_PROXY_SELECTOR_DEFAULT).toLowerCase()) {
|
||||
case PROP_PROXY_SELECTOR_JRE:
|
||||
@@ -148,11 +169,83 @@ public class TalendProxySelector extends ProxySelector {
|
||||
this.eProxySelector = EProxySelector.eclipse_default;
|
||||
break;
|
||||
}
|
||||
proxyManager = ProxyManager.getProxyManager();
|
||||
checkProxyManager(IProxyChangeEvent.PROXY_DATA_CHANGED);
|
||||
proxyManager.addProxyChangeListener(event -> checkProxyManager(event.getChangeType()));
|
||||
|
||||
initHostMap();
|
||||
initRedirectList();
|
||||
}
|
||||
|
||||
private void checkProxyManager(int changeEvent) {
|
||||
try {
|
||||
if (IProxyChangeEvent.PROXY_DATA_CHANGED == changeEvent
|
||||
|| IProxyChangeEvent.NONPROXIED_HOSTS_CHANGED == changeEvent) {
|
||||
if (this.excludeLoopbackAddressAutomatically && proxyManager.isProxiesEnabled()) {
|
||||
List<String> addresses = getLocalLoopbackAddresses();
|
||||
if (addresses != null && !addresses.isEmpty()) {
|
||||
if (org.eclipse.core.internal.net.ProxySelector
|
||||
.canSetBypassHosts(org.eclipse.core.internal.net.ProxySelector.getDefaultProvider())) {
|
||||
List<String> configuredProxies = Arrays.asList(proxyManager.getNonProxiedHosts());
|
||||
if (!configuredProxies.containsAll(addresses)) {
|
||||
Set<String> nonProxyHosts = new HashSet<>(addresses);
|
||||
nonProxyHosts.addAll(configuredProxies);
|
||||
ExceptionHandler.log(
|
||||
this.getClass().getName() + ":" + "-D" + PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY
|
||||
+ "=true, adding missing loopback addresses into eclipse nonProxyHosts: "
|
||||
+ nonProxyHosts);
|
||||
proxyManager.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
|
||||
}
|
||||
} else {
|
||||
updateNonProxyHosts(addresses, PROP_PROXY_HTTP_NON_PROXYHOSTS);
|
||||
updateNonProxyHosts(addresses, PROP_PROXY_HTTPS_NON_PROXYHOSTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNonProxyHosts(List<String> localLoopbackAddresses, final String nonProxyProperty) {
|
||||
if (localLoopbackAddresses != null && !localLoopbackAddresses.isEmpty()) {
|
||||
Set<String> nonProxyHosts = new HashSet<>(localLoopbackAddresses);
|
||||
String property = System.getProperty(nonProxyProperty);
|
||||
boolean update = true;
|
||||
if (StringUtils.isNotBlank(property)) {
|
||||
List<String> configuredProxies = Arrays.asList(ProxyType.convertPropertyStringToHosts(property));
|
||||
if (configuredProxies.containsAll(localLoopbackAddresses)) {
|
||||
update = false;
|
||||
} else {
|
||||
nonProxyHosts.addAll(configuredProxies);
|
||||
}
|
||||
}
|
||||
if (update) {
|
||||
ExceptionHandler.log(this.getClass().getName() + ":" + "-D" + PROP_PROXY_EXCLUDE_LOOPBACK_ADDRESS_AUTOMATICALLY
|
||||
+ "=true, adding missing loopback addresses into " + nonProxyProperty + ": " + nonProxyHosts);
|
||||
System.setProperty(nonProxyProperty,
|
||||
ProxyType.convertHostsToPropertyString(nonProxyHosts.toArray(new String[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getLocalLoopbackAddresses() {
|
||||
if (this.localLoopbackAddresses == null) {
|
||||
synchronized (localLoopbackAddressesLock) {
|
||||
if (this.localLoopbackAddresses == null) {
|
||||
List<String> addresses = NetworkUtil.getLocalLoopbackAddresses(false);
|
||||
final String localhost = "localhost";
|
||||
if (!addresses.contains(localhost)) {
|
||||
addresses.add(localhost);
|
||||
}
|
||||
this.localLoopbackAddresses = addresses;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.localLoopbackAddresses;
|
||||
}
|
||||
|
||||
private void initHostMap() {
|
||||
try {
|
||||
hostMap = new HashMap<>();
|
||||
@@ -282,7 +375,27 @@ public class TalendProxySelector extends ProxySelector {
|
||||
ExceptionHandler.log("TalendProxySelector.select " + uri);
|
||||
}
|
||||
if (uri == null) {
|
||||
return Collections.EMPTY_LIST;
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
result.add(Proxy.NO_PROXY);
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
if (this.excludeLoopbackAddressAutomatically) {
|
||||
List<String> addresses = getLocalLoopbackAddresses();
|
||||
if (addresses != null) {
|
||||
String host = uri.getHost();
|
||||
if (addresses.contains(host)) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log(uri + " is excluded from proxy");
|
||||
}
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
result.add(Proxy.NO_PROXY);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
URI validatedUri = validateUri(uri);
|
||||
Set<Proxy> results = new LinkedHashSet<>();
|
||||
@@ -332,6 +445,9 @@ public class TalendProxySelector extends ProxySelector {
|
||||
ExceptionHandler.log("Selected proxys for " + uri + ", " + proxys);
|
||||
ExceptionHandler.process(new Exception("Proxy call stacks"), Priority.INFO);
|
||||
}
|
||||
if (results.isEmpty()) {
|
||||
results.add(Proxy.NO_PROXY);
|
||||
}
|
||||
return new LinkedList<Proxy>(results);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +49,17 @@ public class EclipseCommandLine {
|
||||
*/
|
||||
static public final String TALEND_PROJECT_TYPE_COMMAND = "-talendProjectType"; //$NON-NLS-1$
|
||||
|
||||
static public final String TALEND_LICENCE_PATH = "talend.licence.path"; //$NON-NLS-1$
|
||||
|
||||
static public final String ARG_TALEND_LICENCE_PATH = "-" + TALEND_LICENCE_PATH; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* for relaunch of the plugins when relaunching the Studio
|
||||
*/
|
||||
static public final String TALEND_RELOAD_COMMAND = "-talendReload"; //$NON-NLS-1$
|
||||
|
||||
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
|
||||
|
||||
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
|
||||
|
||||
static public final String PROP_TALEND_BUNDLES_DO_CLEAN = "-talend.studio.bundles.doclean"; //$NON-NLS-1$
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.time;
|
||||
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.log4j.Hierarchy;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.PropertyConfigurator;
|
||||
import org.apache.log4j.RollingFileAppender;
|
||||
import org.apache.log4j.spi.LoggerFactory;
|
||||
import org.apache.log4j.spi.RootLogger;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
public class PerformanceLogManager {
|
||||
|
||||
private Hierarchy hierarchy;
|
||||
|
||||
public PerformanceLogManager() {
|
||||
Properties properties = new Properties();
|
||||
properties.put("log4j.rootCategory", ", A1");
|
||||
properties.put("log4j.appender.A1", RollingFileAppender.class.getName());
|
||||
IPath performanceLogPath = Platform.getLogFileLocation().removeLastSegments(1).append("performance.log");
|
||||
properties.put("log4j.appender.A1.File", performanceLogPath.toOSString());
|
||||
properties.put("log4j.appender.A1.MaxBackupIndex", "10");// same as .log's max backup log file count
|
||||
properties.put("log4j.appender.A1.MaxFileSize", "1000000");//1000*1000 byte, same as .log's max file size
|
||||
properties.put("log4j.appender.A1.layout", "org.apache.log4j.PatternLayout");
|
||||
properties.put("log4j.appender.A1.layout.ConversionPattern", "%d %-5p %c %x - %m%n");
|
||||
|
||||
this.hierarchy = new Hierarchy(new RootLogger(Level.INFO));
|
||||
new PropertyConfigurator().doConfigure(properties,hierarchy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this PluginLogManager is disabled for this level.
|
||||
* @param level level value
|
||||
* @return boolean true if it is disabled
|
||||
*/
|
||||
public boolean isDisabled(int level) {
|
||||
return this.hierarchy.isDisabled(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable logging for logging requests with level l or higher.
|
||||
* By default all levels are enabled.
|
||||
* @param level level object
|
||||
*/
|
||||
public void setThreshold(Level level) {
|
||||
this.hierarchy.setThreshold(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* The string version of setThreshold(Level level)
|
||||
* @param level level string
|
||||
*/
|
||||
public void setThreshold(String level) {
|
||||
this.hierarchy.setThreshold(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the repository-wide threshold.
|
||||
* @return Level
|
||||
*/
|
||||
public Level getThreshold() {
|
||||
return this.hierarchy.getThreshold();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new logger instance named as the first parameter
|
||||
* using the default factory. If a logger of that name already exists,
|
||||
* then it will be returned. Otherwise, a new logger will be instantiated
|
||||
* and then linked with its existing ancestors as well as children.
|
||||
* @param name logger name
|
||||
* @return Logger
|
||||
*/
|
||||
public Logger getLogger(String name) {
|
||||
return this.hierarchy.getLogger(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* The same as getLogger(String name) but using a factory instance instead of
|
||||
* a default factory.
|
||||
* @param name logger name
|
||||
* @param factory factory instance
|
||||
* @return Logger
|
||||
*/
|
||||
public Logger getLogger(String name, LoggerFactory factory) {
|
||||
return this.hierarchy.getLogger(name,factory);
|
||||
}
|
||||
|
||||
public Logger getRootLogger() {
|
||||
return this.hierarchy.getRootLogger();
|
||||
}
|
||||
|
||||
public Logger exists(String name) {
|
||||
return this.hierarchy.exists(name);
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
this.hierarchy.shutdown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the loggers in this manager.
|
||||
* @return Enumeration logger enumeration
|
||||
*/
|
||||
public Enumeration getCurrentLoggers() {
|
||||
return this.hierarchy.getCurrentLoggers();
|
||||
}
|
||||
|
||||
public void resetConfiguration() {
|
||||
this.hierarchy.resetConfiguration();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.time;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.Properties;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Condition;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC sbliu class global comment. Detailled comment
|
||||
*/
|
||||
public class PerformanceStatisticUtil {
|
||||
|
||||
private static final int MEGABYTE = 1024 * 1024;// MB = 1024*1024 byte
|
||||
|
||||
private static final int KILOBYTE = 1024;// kb=1024 byte
|
||||
|
||||
private static final int numOfBlocks = 256;
|
||||
|
||||
private static final int blockSizeKb = 512;
|
||||
|
||||
private static final String dataFile = "testio.data";
|
||||
|
||||
private static String recordingFileName = "performance_record";
|
||||
|
||||
private static File recordingFile = null;
|
||||
|
||||
private static enum BlockSequence {
|
||||
SEQUENTIAL,
|
||||
RANDOM;
|
||||
}
|
||||
|
||||
public static enum StatisticKeys {
|
||||
|
||||
IO_COUNT("I/O.count"), // io count
|
||||
IO_W_MB_SEC("I/O.write"), // write speed MB
|
||||
IO_R_MB_SEC("I/O.read"), // read speed MB
|
||||
IO_W_AVERAGE_MB_SEC("I/O.write.average"), // average speed of write MB
|
||||
IO_R_AVERAGE_MB_SEC("I/O.read.average"), // average speed of read
|
||||
|
||||
STARTUP_AVERAGE("startup.average"),
|
||||
STARTUP_MAX("startup.max"),
|
||||
STARTUP_COUNT("startup.count");
|
||||
|
||||
private String key;
|
||||
|
||||
StatisticKeys(String _key) {
|
||||
key = _key;
|
||||
}
|
||||
|
||||
public String get() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
public static void recordStartupEpapsedTime(double elapsedTimeInSeconds) {
|
||||
File file = getRecordingFile();
|
||||
|
||||
Properties props = PropertiesFileUtil.read(file, true);
|
||||
String propCount = props.getProperty(StatisticKeys.STARTUP_COUNT.get(), "0");
|
||||
String propMax = props.getProperty(StatisticKeys.STARTUP_MAX.get(), "0");
|
||||
String propAverage = props.getProperty(StatisticKeys.STARTUP_AVERAGE.get(), "0");
|
||||
|
||||
int iPropCount = Integer.parseInt(propCount);
|
||||
double iPropMax = Double.parseDouble(propMax);
|
||||
double iPropAverage = Double.parseDouble(propAverage);
|
||||
|
||||
iPropMax = iPropMax > elapsedTimeInSeconds ? iPropMax : elapsedTimeInSeconds;
|
||||
iPropAverage = (iPropAverage * iPropCount + elapsedTimeInSeconds) / (iPropCount + 1);
|
||||
iPropCount++;
|
||||
|
||||
props.setProperty(StatisticKeys.STARTUP_COUNT.get(), "" + iPropCount);
|
||||
props.setProperty(StatisticKeys.STARTUP_MAX.get(), "" + iPropMax);
|
||||
props.setProperty(StatisticKeys.STARTUP_AVERAGE.get(), "" + iPropAverage);
|
||||
|
||||
PropertiesFileUtil.store(file, props);
|
||||
}
|
||||
|
||||
public static File getRecordingFile() {
|
||||
if (recordingFile != null) {
|
||||
return recordingFile;
|
||||
}
|
||||
|
||||
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
|
||||
File file = new File(configurationLocation + "/data_collector/" + recordingFileName);
|
||||
File oldFile = new File(configurationLocation + "/" + recordingFileName);
|
||||
if(oldFile.exists()) {
|
||||
if(!file.exists()) {
|
||||
if(!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
try {
|
||||
Files.move(Paths.get(oldFile.toURI()), Paths.get(file.toURI()), StandardCopyOption.ATOMIC_MOVE);
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Files.deleteIfExists(Paths.get(oldFile.toURI()));
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
public static void setRecordingFile(File _recordingFile) {
|
||||
recordingFile = _recordingFile;
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
File _recordingFile = getRecordingFile();
|
||||
try {
|
||||
Files.deleteIfExists(Paths.get(_recordingFile.toURI()));
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private static Lock lock = new ReentrantLock();
|
||||
private static Condition condition = lock.newCondition();
|
||||
private static boolean measureIOFinished = true;
|
||||
|
||||
public static void waitUntilFinish() throws InterruptedException {
|
||||
lock.lock();
|
||||
|
||||
try {
|
||||
if(!measureIOFinished) {
|
||||
condition.await(20, TimeUnit.SECONDS);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public static void measureIO() {
|
||||
new Thread() {
|
||||
public void run() {
|
||||
measureIOFinished = false;
|
||||
try {
|
||||
_measureIO();
|
||||
} finally {
|
||||
measureIOFinished = true;
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
private static void _measureIO() {
|
||||
File file = getRecordingFile();
|
||||
Properties props = PropertiesFileUtil.read(file, true);
|
||||
|
||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||
File workspace = root.getLocation().makeAbsolute().toFile();
|
||||
File locationDir = new File(workspace, "temp"); // here is workspace/temp dir
|
||||
File testFile = detectTestDataFile(locationDir);
|
||||
|
||||
if (testFile != null) {
|
||||
measureWrite(props, testFile);
|
||||
measureRead(props, testFile);
|
||||
|
||||
PropertiesFileUtil.store(file, props);
|
||||
}
|
||||
}
|
||||
|
||||
private static void measureWrite(Properties props, File testFile) {
|
||||
int blockSize = blockSizeKb * KILOBYTE;
|
||||
|
||||
long startTime = System.nanoTime();
|
||||
long totalBytesWrittenInMark = writeIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
|
||||
totalBytesWrittenInMark = totalBytesWrittenInMark + writeIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
|
||||
long endTime = System.nanoTime();
|
||||
|
||||
long elapsedTimeNs = endTime - startTime;
|
||||
double sec = (double) elapsedTimeNs / (double) 1000000000;
|
||||
double mbWritten = (double) totalBytesWrittenInMark / (double) MEGABYTE;
|
||||
double bwMbSec = mbWritten / sec;
|
||||
|
||||
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
|
||||
String ioWAverageMbSec = props.getProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), "0");
|
||||
String ioWMbSec = props.getProperty(StatisticKeys.IO_W_MB_SEC.get(), "0");
|
||||
|
||||
int digital_ioCount = Integer.parseInt(ioCount);
|
||||
double digital_ioWAverageMbSec = Double.parseDouble(ioWAverageMbSec);
|
||||
double digital_ioWMbSec = Double.parseDouble(ioWMbSec);
|
||||
|
||||
digital_ioWAverageMbSec = (digital_ioWAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
|
||||
digital_ioWMbSec = bwMbSec;
|
||||
|
||||
props.setProperty(StatisticKeys.IO_W_AVERAGE_MB_SEC.get(), format(digital_ioWAverageMbSec));
|
||||
props.setProperty(StatisticKeys.IO_W_MB_SEC.get(), format(digital_ioWMbSec));
|
||||
}
|
||||
|
||||
private static long writeIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
|
||||
byte[] blockArr = new byte[blockSize];
|
||||
for (int b = 0; b < blockArr.length; b++) {
|
||||
if (b % 2 == 0) {
|
||||
blockArr[b] = (byte) 0xFF;
|
||||
}
|
||||
}
|
||||
String mode = "rwd";// "rwd"
|
||||
|
||||
long totalBytesWrittenInMark = 0;
|
||||
try {
|
||||
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, mode)) {
|
||||
for (int b = 0; b < numOfBlocks; b++) {
|
||||
if (blockSequence == BlockSequence.RANDOM) {
|
||||
int rLoc = randInt(0, numOfBlocks - 1);
|
||||
rAccFile.seek(rLoc * blockSize);
|
||||
} else {
|
||||
rAccFile.seek(b * blockSize);
|
||||
}
|
||||
rAccFile.write(blockArr, 0, blockSize);
|
||||
totalBytesWrittenInMark += blockSize;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
|
||||
return totalBytesWrittenInMark;
|
||||
}
|
||||
|
||||
private static File detectTestDataFile(File location) {
|
||||
if (!location.exists()) {
|
||||
location.mkdirs();
|
||||
}
|
||||
|
||||
File testFile = null;
|
||||
try {
|
||||
testFile = new File(location.getAbsolutePath() + File.separator + dataFile);
|
||||
testFile.deleteOnExit();
|
||||
testFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
|
||||
return testFile;
|
||||
}
|
||||
|
||||
public static void measureRead(Properties props, File testFile) {
|
||||
int blockSize = blockSizeKb * KILOBYTE;
|
||||
|
||||
long startTime = System.nanoTime();
|
||||
long totalBytesReadInMark = readIO(numOfBlocks, BlockSequence.RANDOM, blockSize, testFile);
|
||||
totalBytesReadInMark = totalBytesReadInMark + readIO(numOfBlocks, BlockSequence.SEQUENTIAL, blockSize, testFile);
|
||||
long endTime = System.nanoTime();
|
||||
long elapsedTimeNs = endTime - startTime;
|
||||
double sec = (double) elapsedTimeNs / (double) 1000000000;
|
||||
double mbRead = (double) totalBytesReadInMark / (double) MEGABYTE;
|
||||
double bwMbSec = mbRead / sec;
|
||||
|
||||
String ioCount = props.getProperty(StatisticKeys.IO_COUNT.get(), "0");
|
||||
String ioRAverageMbSec = props.getProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), "0");
|
||||
String ioRMbSec = props.getProperty(StatisticKeys.IO_R_MB_SEC.get(), "0");
|
||||
|
||||
int digital_ioCount = Integer.parseInt(ioCount);
|
||||
double digital_ioRAverageMbSec = Double.parseDouble(ioRAverageMbSec);
|
||||
double digital_ioRMbSec = Double.parseDouble(ioRMbSec);
|
||||
digital_ioRAverageMbSec = (digital_ioRAverageMbSec * digital_ioCount + bwMbSec) / (digital_ioCount + 1);
|
||||
digital_ioRMbSec = bwMbSec;
|
||||
digital_ioCount++;
|
||||
|
||||
props.setProperty(StatisticKeys.IO_R_AVERAGE_MB_SEC.get(), format(digital_ioRAverageMbSec));
|
||||
props.setProperty(StatisticKeys.IO_R_MB_SEC.get(), format(digital_ioRMbSec));
|
||||
props.setProperty(StatisticKeys.IO_COUNT.get(), "" + digital_ioCount);
|
||||
}
|
||||
|
||||
public static String format(double dvalue) {
|
||||
return BigDecimal.valueOf(dvalue).setScale(2, RoundingMode.HALF_UP).toString();
|
||||
}
|
||||
|
||||
private static long readIO(int numOfBlocks, BlockSequence blockSequence, int blockSize, File testFile) {
|
||||
long totalBytesReadInMark = 0;
|
||||
|
||||
byte[] blockArr = new byte[blockSize];
|
||||
for (int b = 0; b < blockArr.length; b++) {
|
||||
if (b % 2 == 0) {
|
||||
blockArr[b] = (byte) 0xFF;
|
||||
}
|
||||
}
|
||||
try {
|
||||
try (RandomAccessFile rAccFile = new RandomAccessFile(testFile, "r")) {
|
||||
for (int b = 0; b < numOfBlocks; b++) {
|
||||
if (blockSequence == BlockSequence.RANDOM) {
|
||||
int rLoc = randInt(0, numOfBlocks - 1);
|
||||
rAccFile.seek(rLoc * blockSize);
|
||||
} else {
|
||||
rAccFile.seek(b * blockSize);
|
||||
}
|
||||
rAccFile.readFully(blockArr, 0, blockSize);
|
||||
totalBytesReadInMark += blockSize;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
return totalBytesReadInMark;
|
||||
}
|
||||
|
||||
private static int randInt(int min, int max) {
|
||||
// nextInt is normally exclusive of the top value,
|
||||
// so add 1 to make it inclusive
|
||||
int randomNum = new Random().nextInt((max - min) + 1) + min;
|
||||
|
||||
return randomNum;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.utils.time;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
public class PropertiesCollectorUtil {
|
||||
|
||||
private static final String ROOT_NODE = "additional_packages_records"; // additional packages
|
||||
|
||||
private static final String PREF_ADDITIONAL_PACKAGES = "AdditionalPackages"; // preference node
|
||||
|
||||
private static final String ADDITONAL_PACKAGE_FILE = "additionalPackages";
|
||||
|
||||
|
||||
public static String getAdditionalPackageRecording() {
|
||||
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
|
||||
|
||||
Properties props = PropertiesFileUtil.read(file, true);
|
||||
String records = props.getProperty(ROOT_NODE, "");
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
public static void storeAdditionalPackageRecording(String records) {
|
||||
File file = getRecordFile(ADDITONAL_PACKAGE_FILE);
|
||||
Properties props = PropertiesFileUtil.read(file, false);
|
||||
props.setProperty(ROOT_NODE, records);
|
||||
PropertiesFileUtil.store(file, props);
|
||||
}
|
||||
|
||||
private static File getRecordFile(String fileName) {
|
||||
String configurationLocation = Platform.getConfigurationLocation().getURL().getPath();
|
||||
File file = new File(configurationLocation + "/data_collector/" + fileName);
|
||||
return file;
|
||||
}
|
||||
|
||||
public static String getAdditionalPackagePreferenceNode() {
|
||||
return PREF_ADDITIONAL_PACKAGES;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.utils.time;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC sbliu class global comment. Detailled comment
|
||||
*/
|
||||
public class PropertiesFileUtil {
|
||||
public static synchronized Properties read(File recordFile, boolean createIfNotExist) {
|
||||
Properties props = new Properties();
|
||||
if (recordFile != null && exist(recordFile, createIfNotExist)) {
|
||||
FileInputStream inStream = null;
|
||||
try {
|
||||
inStream = new FileInputStream(recordFile);
|
||||
props.load(inStream);
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
} finally {
|
||||
if (inStream != null) {
|
||||
try {
|
||||
inStream.close();
|
||||
} catch (IOException e) {//
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return props;
|
||||
}
|
||||
|
||||
public static synchronized void store(File recordFile, Properties props) {
|
||||
if (props == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (recordFile != null && exist(recordFile, true)) {
|
||||
FileOutputStream outputStream = null;
|
||||
try {
|
||||
outputStream = new FileOutputStream(recordFile);
|
||||
props.store(outputStream, "");
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
} finally {
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean exist(File recordFile, boolean createIfNotExist) {
|
||||
boolean exists = recordFile.exists();
|
||||
if (!exists && createIfNotExist) {
|
||||
try {
|
||||
if(!recordFile.getParentFile().exists()) {
|
||||
recordFile.getParentFile().mkdirs();
|
||||
}
|
||||
exists = recordFile.createNewFile();
|
||||
if (!exists) {
|
||||
throw new FileNotFoundException(recordFile.getName());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.log(e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.time;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* DOC sbliu class global comment. Detailled comment
|
||||
*/
|
||||
public class TimeMeasurePerformance extends TimeMeasure{
|
||||
static private Logger logger;
|
||||
|
||||
private static HashMap<String, TimeStack> timers;
|
||||
|
||||
private static long startTime = -1L;
|
||||
|
||||
private static int indent = 0;
|
||||
|
||||
public static void begin(String idTimer, String description) {
|
||||
startTime = System.nanoTime();
|
||||
|
||||
init();
|
||||
if (timers.containsKey(idTimer)) {
|
||||
log(indent(indent) + "Warning (start): timer " + idTimer + " already exists"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} else {
|
||||
indent++;
|
||||
TimeStack times = new TimeStack();
|
||||
timers.put(idTimer, times);
|
||||
|
||||
String message = "Start '" + idTimer + "' ...";
|
||||
if (description != null) {
|
||||
message = "Start '" + idTimer + "', " + description + " ...";
|
||||
}
|
||||
log(indent(indent) + message); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
private static void init() {
|
||||
if (timers == null) {
|
||||
timers = new HashMap<String, TimeStack>();
|
||||
}
|
||||
|
||||
if(logger == null) {
|
||||
configureLogger();
|
||||
}
|
||||
}
|
||||
|
||||
private static void log (String message) {
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
public static long end(String idTimer) {
|
||||
init();
|
||||
if (!timers.containsKey(idTimer)) {
|
||||
log(indent(indent) + "Warning (end): timer " + idTimer + " doesn't exist"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return -1;
|
||||
} else {
|
||||
TimeStack timeStack = timers.get(idTimer);
|
||||
timers.remove(idTimer);
|
||||
long elapsedTimeSinceLastRequest = timeStack.getLastStepElapsedTime();
|
||||
log(indent(indent) + "End '" + idTimer + "', elapsed time since last request: " //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ elapsedTimeSinceLastRequest + " ms "); //$NON-NLS-1$
|
||||
|
||||
long totalElapsedTime = timeStack.getTotalElapsedTime();
|
||||
|
||||
log(indent(indent) + "End '" + idTimer + "', total elapsed time: " + totalElapsedTime + " ms "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
indent--;
|
||||
return totalElapsedTime;
|
||||
}
|
||||
}
|
||||
|
||||
public static long step(String idTimer, String stepName) {
|
||||
init();
|
||||
if (!timers.containsKey(idTimer)) {
|
||||
log(indent(indent) + "Warning (end): timer " + idTimer + " does'nt exist"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return -1;
|
||||
} else {
|
||||
TimeStack timeStack = timers.get(idTimer);
|
||||
timeStack.addStep();
|
||||
/*
|
||||
* trace the timeline of every step,problem is that the code below " Calendar ca = Calendar.getInstance();
|
||||
* Date now = ca.getTime();" will cost almost 13ms~15ms
|
||||
*/
|
||||
long time = timeStack.getLastStepElapsedTime();
|
||||
String timerStepName = idTimer + "', step name '" + stepName; //$NON-NLS-1$
|
||||
|
||||
log(indent(indent)
|
||||
+ "-> '" + timerStepName + "', elapsed time since previous step: " + time + " ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
return time;
|
||||
}
|
||||
}
|
||||
|
||||
private static void configureLogger() {
|
||||
try {
|
||||
PerformanceLogManager logManager = new PerformanceLogManager();
|
||||
logger = logManager.getLogger(TimeMeasurePerformance.class.getName());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Error while initializing log properties.", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void afterStartup() {
|
||||
double elapsedTimeInSeconds = (double)(System.nanoTime() - startTime)/1000000000;
|
||||
PerformanceStatisticUtil.recordStartupEpapsedTime(elapsedTimeInSeconds);
|
||||
PerformanceStatisticUtil.measureIO();
|
||||
}
|
||||
}
|
||||
@@ -12,16 +12,28 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.workbench.extensions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.IllegalPluginConfigurationException;
|
||||
import org.talend.commons.i18n.internal.Messages;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
/**
|
||||
* Utilities class uses to get implementation of extension points defined by plug-ins. <br/>
|
||||
@@ -36,6 +48,10 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
|
||||
private String plugInId;
|
||||
|
||||
public final static String FILE_FEATURES_INDEX = "extra_feature.index";
|
||||
|
||||
public final static String DROP_BUNDLE_INFO = "drop.bundle.info";
|
||||
|
||||
/**
|
||||
* Default Constructor. Must not be used.
|
||||
*/
|
||||
@@ -166,9 +182,17 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
}
|
||||
|
||||
IExtension[] extensions = pt.getExtensions();
|
||||
|
||||
Map<String, String> dropBundles = null;
|
||||
try {
|
||||
dropBundles = getDropBundleInfo();
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
for (IExtension extension : extensions) {
|
||||
|
||||
if (dropBundles != null && dropBundles.containsKey(extension.getNamespaceIdentifier())
|
||||
&& StringUtils.isEmpty(dropBundles.get(extension.getNamespaceIdentifier()))) {
|
||||
continue;
|
||||
}
|
||||
if (plugInId == null || extension.getNamespaceIdentifier().equals(plugInId)) {
|
||||
String configurationElementName = extensionPointLimiter.getConfigurationElementName();
|
||||
if (configurationElementName != null) {
|
||||
@@ -196,6 +220,32 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
* Copied from org.talend.commons.configurator
|
||||
**********************************************************/
|
||||
public Map<String, String> getDropBundleInfo() throws IOException {
|
||||
File indexFile = new File(ConfigurationScope.INSTANCE.getLocation().toFile(), FILE_FEATURES_INDEX);
|
||||
if (!indexFile.exists()) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<String, String> dropInfoMap = new HashMap<>();
|
||||
try {
|
||||
String jsonStr = new String(Files.readAllBytes(indexFile.toPath()));
|
||||
if (!jsonStr.isEmpty()) {
|
||||
JSONObject obj = new JSONObject(jsonStr);
|
||||
JSONObject dropInfo = obj.getJSONObject(DROP_BUNDLE_INFO);
|
||||
Iterator<String> iterator = dropInfo.keys();
|
||||
while (iterator.hasNext()) {
|
||||
String key = iterator.next();
|
||||
dropInfoMap.put(key, dropInfo.getString(key));
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
return dropInfoMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC amaumont Comment method "createAndAddImplementation".
|
||||
*
|
||||
|
||||
@@ -76,6 +76,8 @@ ExtendedTableMoveCommand.MoveLabel=Move up or down, one or more table entries
|
||||
ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard
|
||||
ExtendedTableRemoveCommand.Romve.Label=Remove table entries
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults
|
||||
ExtendedTableCaseCommand.case.Label=Change selected DB columns to uppercase/lowercase
|
||||
ExtendedTableQuoteCommand.Quote.Label=Quote selected DB columns
|
||||
ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file
|
||||
ImportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
|
||||
LabelledFileField.BrowseButton.Text=Browse...
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.composite;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Sash;
|
||||
|
||||
/**
|
||||
* This class is used for constructing 2 composites, putting 1 sashes in the middle composite, which is used for
|
||||
* changing other 2 composites.
|
||||
*
|
||||
*/
|
||||
public class TwoCompositesSashForm extends Composite {
|
||||
|
||||
public static final int SASH_WIDTH = 3;
|
||||
|
||||
private Composite leftComposite;
|
||||
|
||||
private Composite rightComposite;
|
||||
|
||||
private Sash midSash;
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
*
|
||||
* @param parent
|
||||
* @param style
|
||||
*/
|
||||
public TwoCompositesSashForm(Composite parent, int style) {
|
||||
super(parent, style);
|
||||
final GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.numColumns = 3;
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
|
||||
setLayout(gridLayout);
|
||||
final GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
setLayoutData(gridData);
|
||||
|
||||
addComponents();
|
||||
addSashListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes all widgets's position when sash was moved.
|
||||
*
|
||||
* @param shift
|
||||
*/
|
||||
private void setCompositesBounds(int shift) {
|
||||
// Set mid Composite Width.
|
||||
int midSashPreLocation = midSash.getBounds().x;
|
||||
midSash.setLocation(midSashPreLocation + shift, midSash.getBounds().y);
|
||||
if (midSash.getBounds().x > 0) {
|
||||
if (midSashPreLocation < 0) {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift + midSashPreLocation, leftComposite
|
||||
.getBounds().height);
|
||||
} else {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift, leftComposite.getBounds().height);
|
||||
}
|
||||
} else {
|
||||
leftComposite.setSize(0, leftComposite.getBounds().height);
|
||||
}
|
||||
// Set Right Composte Width.
|
||||
rightComposite.setLocation(rightComposite.getBounds().x + shift, rightComposite.getBounds().y);
|
||||
rightComposite.setSize(rightComposite.getBounds().width - shift, rightComposite.getBounds().height);
|
||||
}
|
||||
|
||||
public Composite getLeftComposite() {
|
||||
return this.leftComposite;
|
||||
}
|
||||
|
||||
public Composite getRightComposite() {
|
||||
return this.rightComposite;
|
||||
}
|
||||
|
||||
private void addSashListeners() {
|
||||
midSash.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
/*
|
||||
* (non-Java)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
|
||||
*/
|
||||
public void handleEvent(Event event) {
|
||||
int shift = event.x - midSash.getBounds().x;
|
||||
setCompositesBounds(shift);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void addComponents() {
|
||||
leftComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
|
||||
leftComposite.setLayout(gridLayout);
|
||||
leftComposite.setLayoutData(gridData);
|
||||
|
||||
midSash = new Sash(this, SWT.VERTICAL | SWT.SMOOTH);
|
||||
GridData gridData2 = new GridData(GridData.FILL_VERTICAL);
|
||||
midSash.setLayoutData(gridData2);
|
||||
midSash.setSize(SASH_WIDTH, midSash.getBounds().height);
|
||||
|
||||
rightComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout3 = new GridLayout();
|
||||
gridLayout3.marginBottom = 0;
|
||||
gridLayout3.marginHeight = 0;
|
||||
gridLayout3.marginLeft = 0;
|
||||
gridLayout3.marginRight = 0;
|
||||
gridLayout3.marginTop = 0;
|
||||
gridLayout3.marginWidth = 0;
|
||||
gridLayout3.horizontalSpacing = 0;
|
||||
rightComposite.setLayout(gridLayout3);
|
||||
GridData gridData4 = new GridData(GridData.FILL_BOTH);
|
||||
rightComposite.setLayoutData(gridData4);
|
||||
}
|
||||
|
||||
public void setGridDatas() {
|
||||
Composite composite = (Composite) leftComposite.getChildren()[0];
|
||||
GridLayout gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite.setLayout(gridLayout2);
|
||||
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
Composite composite2 = (Composite) rightComposite.getChildren()[0];
|
||||
gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite2.setLayout(gridLayout2);
|
||||
composite2.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,11 +27,13 @@ import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveDownPushButtonFo
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButtonForExtendedTable;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.PastePushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.QuotePushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.RemovePushButtonForExtendedTable;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.ResetDBTypesPushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.SaveAsGenericSchemaPushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.SelectContextVariablesPushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.button.CasePushButton;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
|
||||
|
||||
@@ -67,7 +69,11 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
|
||||
protected ResetDBTypesPushButton resetDBTypesButton;
|
||||
|
||||
protected SelectContextVariablesPushButton selectContextVariablesButton;
|
||||
|
||||
protected CasePushButton caseButton;
|
||||
|
||||
protected QuotePushButton quoteButton;
|
||||
|
||||
/**
|
||||
* DOC amaumont MatadataToolbarEditor constructor comment.
|
||||
*
|
||||
@@ -103,7 +109,11 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
|
||||
pasteButton = createPastePushButton();
|
||||
|
||||
addallButton = createAddAllPushButton();
|
||||
|
||||
|
||||
caseButton = createCasePushButton();
|
||||
|
||||
quoteButton = createQuotePushButton();
|
||||
|
||||
exportButton = createExportPushButton();
|
||||
|
||||
importButton = createImportPushButton();
|
||||
@@ -169,6 +179,14 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
|
||||
protected SelectContextVariablesPushButton createSelectContextVariablesPushButton() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected CasePushButton createCasePushButton() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected QuotePushButton createQuotePushButton() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for addButton.
|
||||
@@ -327,6 +345,14 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
|
||||
if (getAddallButton() != null) {
|
||||
list.add(getAddallButton());
|
||||
}
|
||||
|
||||
if (getCaseButton() != null) {
|
||||
list.add(getCaseButton());
|
||||
}
|
||||
|
||||
if (getQuoteButton() != null) {
|
||||
list.add(getQuoteButton());
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -348,6 +374,26 @@ public class ExtendedToolbarView extends AbstractExtendedToolbar {
|
||||
public AddAllPushButton getAddallButton() {
|
||||
return this.addallButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for caseButton.
|
||||
*
|
||||
* @return the caseButton
|
||||
*/
|
||||
public CasePushButton getCaseButton() {
|
||||
return this.caseButton;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for quoteButton.
|
||||
*
|
||||
* @return the quoteButton
|
||||
*/
|
||||
public QuotePushButton getQuoteButton() {
|
||||
return this.quoteButton;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.button;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedControlViewer;
|
||||
|
||||
public abstract class CasePushButton extends ExtendedPushButton {
|
||||
|
||||
/**
|
||||
* DOC CasePushButton constructor comment.
|
||||
*
|
||||
* @param parent
|
||||
* @param extendedControlViewer
|
||||
*/
|
||||
public CasePushButton(Composite parent, AbstractExtendedControlViewer extendedControlViewer) {
|
||||
super(parent, extendedControlViewer,
|
||||
Messages.getString("CasePushButton.CaseButton.Tip"), ImageProvider.getImage(EImage.UPPERCASE_ICON)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
protected abstract Command getCommandToExecute();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#getEnabledState()
|
||||
*/
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
return super.getEnabledState() && !getExtendedControlViewer().isReadOnly();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.button;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
public abstract class CasePushButtonForExtendedTable extends CasePushButton implements IExtendedTablePushButton {
|
||||
|
||||
private EnableStateListenerForTableButton enableStateHandler;
|
||||
private boolean isUpperCase = true;
|
||||
|
||||
/**
|
||||
* DOC CasePushButtonForExtendedTable constructor comment.
|
||||
*
|
||||
* @param parent
|
||||
* @param extendedControlViewer
|
||||
*/
|
||||
public CasePushButtonForExtendedTable(Composite parent, AbstractExtendedTableViewer extendedTableViewer) {
|
||||
super(parent, extendedTableViewer);
|
||||
this.enableStateHandler = new EnableStateListenerForTableButton(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void afterCommandExecution(Command executedCommand) {
|
||||
super.afterCommandExecution(executedCommand);
|
||||
if (isUpperCase) {
|
||||
this.getButton().setToolTipText( Messages.getString("CasePushButton.CaseButton.Tip"));
|
||||
this.getButton().setImage(ImageProvider.getImage(EImage.LOWERCASE_ICON));
|
||||
this.isUpperCase = false;
|
||||
} else {
|
||||
this.getButton().setToolTipText( Messages.getString("CasePushButton.CaseButton.Tip"));
|
||||
this.getButton().setImage(ImageProvider.getImage(EImage.UPPERCASE_ICON));
|
||||
this.isUpperCase = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Command getCommandToExecute() {
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
TableViewer tableViewer = extendedTableViewer.getTableViewerCreator().getTableViewer();
|
||||
ISelection selection = tableViewer.getSelection();
|
||||
StructuredSelection structuredSelection = (StructuredSelection) selection;
|
||||
Object[] objects = structuredSelection.toArray();
|
||||
int[] selectionIndices = extendedTableViewer.getTableViewerCreator().getTable().getSelectionIndices();
|
||||
return getCommandToExecute(extendedTableModel, Arrays.asList(objects), selectionIndices, isUpperCase);
|
||||
}
|
||||
|
||||
protected abstract Command getCommandToExecute(ExtendedTableModel extendedTable, List beansToUppercase, int[] selectionIndices, boolean isUpperCase);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.ui.extended.button.IExtendedTablePushButton#getExtendedTableViewer()
|
||||
*/
|
||||
public AbstractExtendedTableViewer getExtendedTableViewer() {
|
||||
return (AbstractExtendedTableViewer) getExtendedControlViewer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
return super.getEnabledState() && this.enableStateHandler.getEnabledState();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.button;
|
||||
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedControlViewer;
|
||||
|
||||
public abstract class QuotePushButton extends ExtendedPushButton {
|
||||
|
||||
private String dbmsId = null;
|
||||
|
||||
/**
|
||||
* DOC QuotePushButton constructor comment.
|
||||
*
|
||||
* @param parent
|
||||
* @param extendedControlViewer
|
||||
*/
|
||||
public QuotePushButton(Composite parent, AbstractExtendedControlViewer extendedControlViewer) {
|
||||
super(parent, extendedControlViewer,
|
||||
Messages.getString("QuotePushButton.QuoteButton.Tip"), ImageProvider.getImage(EImage.EDIT_ICON)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#getEnabledState()
|
||||
*/
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
return super.getEnabledState() && !getExtendedControlViewer().isReadOnly();
|
||||
}
|
||||
|
||||
|
||||
public String getDbmsId() {
|
||||
return dbmsId;
|
||||
}
|
||||
|
||||
|
||||
public void setDbmsId(String dbmsId) {
|
||||
this.dbmsId = dbmsId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.button;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
import org.eclipse.swt.events.ModifyListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
public abstract class QuotePushButtonForExtendedTable extends QuotePushButton implements IExtendedTablePushButton {
|
||||
|
||||
private String quote = null;
|
||||
private boolean isAddingQuote = true;
|
||||
private EnableStateListenerForTableButton enableStateHandler;
|
||||
|
||||
/**
|
||||
* DOC SchemaTargetAddPushButton constructor comment.
|
||||
*
|
||||
* @param parent
|
||||
* @param extendedControlViewer
|
||||
*/
|
||||
public QuotePushButtonForExtendedTable(Composite parent, AbstractExtendedTableViewer extendedTableViewer) {
|
||||
super(parent, extendedTableViewer);
|
||||
this.enableStateHandler = new EnableStateListenerForTableButton(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#beforeCommandExecution()
|
||||
*/
|
||||
@Override
|
||||
protected void beforeCommandExecution() {
|
||||
QuoteManipulateDialog dlg = new QuoteManipulateDialog(getButton().getShell());
|
||||
if (dlg.open() == Window.OK) {
|
||||
this.quote = dlg.getQuote();
|
||||
this.isAddingQuote = dlg.isAddingQuote();
|
||||
}
|
||||
}
|
||||
|
||||
protected Command getCommandToExecute() {
|
||||
if (quote == null) return null;
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
TableViewer tableViewer = extendedTableViewer.getTableViewerCreator().getTableViewer();
|
||||
ISelection selection = tableViewer.getSelection();
|
||||
StructuredSelection structuredSelection = (StructuredSelection) selection;
|
||||
Object[] objects = structuredSelection.toArray();
|
||||
int[] selectionIndices = extendedTableViewer.getTableViewerCreator().getTable().getSelectionIndices();
|
||||
return getCommandToExecute(extendedTableModel, Arrays.asList(objects), selectionIndices, quote, isAddingQuote );
|
||||
}
|
||||
|
||||
protected abstract Command getCommandToExecute(ExtendedTableModel extendedTable, List beansToUppercase, int[] selectionIndices, String quote, boolean isAddingQuote);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.ui.extended.button.IExtendedTablePushButton#getExtendedTableViewer()
|
||||
*/
|
||||
public AbstractExtendedTableViewer getExtendedTableViewer() {
|
||||
return (AbstractExtendedTableViewer) getExtendedControlViewer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
return super.getEnabledState() && this.enableStateHandler.getEnabledState();
|
||||
}
|
||||
|
||||
class QuoteManipulateDialog extends Dialog {
|
||||
|
||||
private Button addBtn;
|
||||
private Button removeBtn;
|
||||
private Text quoteTxt;
|
||||
private Button okBtn;
|
||||
boolean isAddingQuote = true;
|
||||
String quote = "";
|
||||
|
||||
public QuoteManipulateDialog(Shell parentShel) {
|
||||
super(parentShel);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
protected void configureShell(Shell shell) {
|
||||
super.configureShell(shell);
|
||||
shell.setText(Messages.getString("QuoteManipulateDialog.title"));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
// create OK and Cancel buttons by default
|
||||
okBtn = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
|
||||
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
|
||||
okBtn.setEnabled(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc) Method declared on Dialog.
|
||||
*/
|
||||
protected Control createDialogArea(Composite parent) {
|
||||
Composite composite = new Composite(parent, SWT.NONE);
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.numColumns = 4;
|
||||
composite.setLayout(layout);
|
||||
GridData layoutData = new GridData(GridData.FILL_BOTH);
|
||||
layoutData.widthHint = 400;
|
||||
composite.setLayoutData(layoutData);
|
||||
addBtn = new Button(composite, SWT.RADIO);
|
||||
addBtn.setSelection(true);
|
||||
Label label = new Label(composite, SWT.WRAP);
|
||||
label.setText(Messages.getString("QuoteManipulateDialog.addQuote")); //$NON-NLS-1$
|
||||
|
||||
removeBtn = new Button(composite, SWT.RADIO);
|
||||
Label label1 = new Label(composite, SWT.WRAP);
|
||||
label1.setText(Messages.getString("QuoteManipulateDialog.removeQuote")); //$NON-NLS-1$
|
||||
|
||||
quoteTxt = new Text(composite, SWT.SINGLE | SWT.BORDER);
|
||||
layoutData = new GridData(GridData.FILL_HORIZONTAL);
|
||||
layoutData.horizontalSpan = 4;
|
||||
quoteTxt.setLayoutData(layoutData);
|
||||
quoteTxt.setText("");
|
||||
quoteTxt.setFocus();
|
||||
|
||||
addBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
isAddingQuote = true;
|
||||
quoteTxt.setFocus();
|
||||
quote = quoteTxt.getText();
|
||||
}
|
||||
});
|
||||
|
||||
removeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
isAddingQuote = false;
|
||||
quoteTxt.setFocus();
|
||||
quote = quoteTxt.getText();
|
||||
}
|
||||
});
|
||||
|
||||
quoteTxt.addModifyListener(new ModifyListener() {
|
||||
|
||||
public void modifyText(ModifyEvent e) {
|
||||
quote = quoteTxt.getText();
|
||||
if ( quote != null && quote.length() > 0) {
|
||||
okBtn.setEnabled(true);
|
||||
} else {
|
||||
okBtn.setEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return composite;
|
||||
}
|
||||
|
||||
public boolean isAddingQuote() {
|
||||
return this.isAddingQuote;
|
||||
}
|
||||
|
||||
public String getQuote() {
|
||||
return this.quote;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
public abstract class ExtendedTableCaseCommand extends Command implements IExtendedTableCommand {
|
||||
|
||||
private ExtendedTableModel extendedTable;
|
||||
|
||||
private List beansToCovertCase;
|
||||
|
||||
private int[] selectionIndices;
|
||||
|
||||
private boolean isUpperCase;
|
||||
|
||||
|
||||
public static final String LABEL = Messages.getString("ExtendedTableCaseCommand.case.Label"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC ExtendedTableCaseCommand constructor comment.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")//$NON-NLS-1$
|
||||
public ExtendedTableCaseCommand(ExtendedTableModel extendedTable, List beansToCovertCase, int[] selectionIndices, boolean isUpperCase) {
|
||||
super(LABEL);
|
||||
this.extendedTable = extendedTable;
|
||||
this.beansToCovertCase = new ArrayList(beansToCovertCase);
|
||||
this.selectionIndices = selectionIndices;
|
||||
this.isUpperCase = isUpperCase;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.gef.commands.Command#execute()
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
|
||||
|
||||
}
|
||||
|
||||
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#canUndo()
|
||||
*/
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#redo()
|
||||
*/
|
||||
@Override
|
||||
public void redo() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#undo()
|
||||
*/
|
||||
@Override
|
||||
public void undo() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.commons.ui.swt.advanced.dataeditor.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
public abstract class ExtendedTableQuoteCommand extends Command implements IExtendedTableCommand {
|
||||
|
||||
private ExtendedTableModel extendedTable;
|
||||
|
||||
private List beansToQuote;
|
||||
|
||||
private int[] selectionIndices;
|
||||
|
||||
private String quote;
|
||||
|
||||
boolean isAddingQuote;
|
||||
|
||||
|
||||
public static final String LABEL = Messages.getString("ExtendedTableQuoteCommand.Quote.Label"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC ExtendedTableQuoteCommand constructor comment.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")//$NON-NLS-1$
|
||||
public ExtendedTableQuoteCommand(ExtendedTableModel extendedTable, List beansToQuote, int[] selectionIndices, String quote, boolean isAddingQuote) {
|
||||
super(LABEL);
|
||||
this.extendedTable = extendedTable;
|
||||
this.beansToQuote = new ArrayList(beansToQuote);
|
||||
this.selectionIndices = selectionIndices;
|
||||
this.quote = quote;
|
||||
this.isAddingQuote = isAddingQuote;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.gef.commands.Command#execute()
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
|
||||
|
||||
}
|
||||
|
||||
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#canUndo()
|
||||
*/
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#redo()
|
||||
*/
|
||||
@Override
|
||||
public void redo() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.command.CommonCommand#undo()
|
||||
*/
|
||||
@Override
|
||||
public void undo() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -240,7 +240,11 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
|
||||
gc.dispose();
|
||||
|
||||
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
|
||||
if (WindowSystem.isBigSurOrLater()) {
|
||||
drawableComposite.refreshBgDrawableCompsite(newImage);
|
||||
} else {
|
||||
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
|
||||
}
|
||||
|
||||
clearImage(oldImage);
|
||||
oldImage = newImage;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.commons.ui.swt.drawing.background;
|
||||
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
@@ -28,6 +29,8 @@ public interface IBgDrawableComposite {
|
||||
|
||||
public Composite getBgDrawableComposite();
|
||||
|
||||
public void refreshBgDrawableCompsite(Image image);
|
||||
|
||||
public void setOffset(Point offsetPoint);
|
||||
|
||||
public Point getOffset();
|
||||
|
||||
@@ -178,6 +178,23 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
|
||||
public void setUseEquals(boolean useEquals) {
|
||||
beansList.setUseEquals(useEquals);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Replace bean.
|
||||
*
|
||||
* @param bean
|
||||
* @param index can be null
|
||||
*/
|
||||
public void replace(B bean, Integer index) {
|
||||
|
||||
if (tableViewer != null && !tableViewer.getTable().isDisposed()) {
|
||||
tableViewer.replace(bean, index);
|
||||
tableViewer.refresh(bean, true, true);
|
||||
}
|
||||
this.beansList.replaceElement(index, bean);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DOC amaumont Comment method "remove".
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.ws.WindowSystem;
|
||||
|
||||
/**
|
||||
* Create a Label and a Text.
|
||||
@@ -153,7 +154,14 @@ public class LabelledText {
|
||||
});
|
||||
GridDataFactory.swtDefaults().applyTo(label);
|
||||
|
||||
text = new Text(composite, styleField);
|
||||
// For Big Sur, to avoid the password autofill dialog.
|
||||
if (WindowSystem.isBigSurOrLater() && ((styleField & SWT.PASSWORD) != 0)) {
|
||||
styleField ^= SWT.PASSWORD;
|
||||
text = new Text(composite, styleField);
|
||||
text.setEchoChar('*');
|
||||
} else {
|
||||
text = new Text(composite, styleField);
|
||||
}
|
||||
text.selectAll(); // enable fast erase use
|
||||
int gridDataStyle = SWT.NONE;
|
||||
if (isFill) {
|
||||
|
||||
@@ -12,7 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.linking;
|
||||
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.events.PaintListener;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
|
||||
@@ -28,6 +33,8 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
|
||||
private Composite commonParent;
|
||||
|
||||
private Point offsetPoint = new Point(0, 0);
|
||||
|
||||
private Image backgroundImage;
|
||||
|
||||
/**
|
||||
* DOC amaumont DrawableBackground constructor comment.
|
||||
@@ -36,9 +43,36 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
|
||||
*/
|
||||
public BgDrawableComposite(Composite commonParent) {
|
||||
this.commonParent = commonParent;
|
||||
this.commonParent.addPaintListener(new PaintListener() {
|
||||
|
||||
@Override
|
||||
public void paintControl(PaintEvent arg0) {
|
||||
if (backgroundImage != null) {
|
||||
arg0.gc.drawImage(backgroundImage, 0, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.commonParent.addDisposeListener(new DisposeListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent arg0) {
|
||||
if (backgroundImage != null && !backgroundImage.isDisposed()) {
|
||||
backgroundImage.dispose();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void refreshBgDrawableCompsite(Image image) {
|
||||
if (backgroundImage != null) {
|
||||
backgroundImage.dispose();
|
||||
}
|
||||
backgroundImage = image;
|
||||
this.commonParent.redraw();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.swt.drawing.background.IDrawableComposite#drawBackground(org.eclipse.swt.graphics.GC)
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.commons.ui.swt.linking;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -77,6 +78,8 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
|
||||
private List<LinkableTable> linkableTableList;
|
||||
|
||||
private HashMap<Table, Point> tableToCommonPointMap = new HashMap<Table, Point>();
|
||||
|
||||
/**
|
||||
* DOC amaumont TreeToTableLinker constructor comment.
|
||||
*
|
||||
@@ -258,8 +261,34 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
|
||||
Point offset = getOffset();
|
||||
|
||||
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
|
||||
pointEndStraight.y + offset.y);
|
||||
if (WindowSystem.isBigSurOrLater()) {
|
||||
if (yStraight < tree.getBounds().y + treeItemHeight) {
|
||||
yStraight = tree.getBounds().y + treeItemHeight;
|
||||
}
|
||||
if (yStraight > tree.getBounds().height + tree.getBounds().y + treeItemHeight) {
|
||||
yStraight = tree.getBounds().height + tree.getBounds().y + treeItemHeight;
|
||||
}
|
||||
pointEndStraight = new Point(treeToCommonPoint.x + tree.getClientArea().width, yStraight);
|
||||
if (tableToCommonPointMap.get(table) == null) {
|
||||
tableToCommonPointMap.put(table, display.map(table, getBgDrawableComposite(), new Point(0, 0)));
|
||||
}
|
||||
// scroll issue for table
|
||||
if (tableToCommonPoint.y != tableToCommonPointMap.get(table).y) {
|
||||
pointEndCentralCurve.y = tableToCommonPoint.y + tableItemBounds.y
|
||||
+ table.getItemHeight() / 2;
|
||||
}
|
||||
if (pointEndCentralCurve.y < tableToCommonPointMap.get(table).y) {
|
||||
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y;
|
||||
}
|
||||
if (pointEndCentralCurve.y > tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
|
||||
- table.getHeaderHeight()) {
|
||||
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
|
||||
- table.getHeaderHeight();
|
||||
}
|
||||
} else {
|
||||
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
|
||||
pointEndStraight.y + offset.y);
|
||||
}
|
||||
|
||||
pointEndStraight.x += offset.x;
|
||||
pointEndStraight.y += offset.y;
|
||||
|
||||
@@ -212,4 +212,8 @@ public class CommonTextCellEditorWithProposal {
|
||||
return this.contentProposalAdapter;
|
||||
}
|
||||
|
||||
public int getPreviousActivatedIndex() {
|
||||
return previousActivatedIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,4 +97,7 @@ public class ExtendedTextCellEditorWithProposal extends ExtendedTextCellEditor i
|
||||
super.fireCancelEditor();
|
||||
}
|
||||
|
||||
public CommonTextCellEditorWithProposal getCommonTextEditor() {
|
||||
return commonTextEditor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,4 +109,8 @@ public interface FileConstants {
|
||||
|
||||
String SPRING_FOLDER_NAME = "META-INF/spring"; //$NON-NLS-1$
|
||||
|
||||
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
|
||||
|
||||
String MAVEN_FOLDER_NAME = "MAVEN-INF";
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.relationship.AbstractJobItemRelationshipHandler;
|
||||
import org.talend.core.model.relationship.Relation;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType;
|
||||
|
||||
@@ -47,14 +48,24 @@ public class JobRoutinesItemRelationshipHandler extends AbstractJobItemRelations
|
||||
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
|
||||
for (Object o : processType.getParameters().getRoutinesParameter()) {
|
||||
RoutinesParameterType itemInfor = (RoutinesParameterType) o;
|
||||
if (currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
|
||||
if (itemInfor.getName() != null && currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
|
||||
// exclude system routines relation
|
||||
continue;
|
||||
}
|
||||
|
||||
Relation addedRelation = new Relation();
|
||||
addedRelation.setId(itemInfor.getName());
|
||||
addedRelation.setType(RelationshipItemBuilder.ROUTINE_RELATION);
|
||||
if (ERepositoryObjectType.ROUTINESJAR != null
|
||||
&& ERepositoryObjectType.ROUTINESJAR.getType().equals(itemInfor.getType())) {
|
||||
addedRelation.setId(itemInfor.getId());
|
||||
addedRelation.setType(RelationshipItemBuilder.ROUTINES_JAR_RELATION);
|
||||
} else if (ERepositoryObjectType.BEANSJAR != null
|
||||
&& ERepositoryObjectType.BEANSJAR.getType().equals(itemInfor.getType())) {
|
||||
addedRelation.setId(itemInfor.getId());
|
||||
addedRelation.setType(RelationshipItemBuilder.BEANS_JAR_RELATION);
|
||||
} else {
|
||||
addedRelation.setId(itemInfor.getName());
|
||||
addedRelation.setType(RelationshipItemBuilder.ROUTINE_RELATION);
|
||||
}
|
||||
addedRelation.setVersion(RelationshipItemBuilder.LATEST_VERSION);
|
||||
relationSet.add(addedRelation);
|
||||
|
||||
|
||||
@@ -67,4 +67,9 @@ public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnab
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRequiredAlways() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -623,8 +626,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
stream.close();
|
||||
|
||||
byte[] currentContent = item.getContent().getInnerContent();
|
||||
|
||||
if (!Arrays.equals(innerContent, currentContent)) {
|
||||
if (!isSameStringContent(innerContent, currentContent)) {
|
||||
item.getContent().setInnerContent(innerContent);
|
||||
Project project = getRepositoryContext().getProject();
|
||||
save(project, item);
|
||||
@@ -641,6 +643,44 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
throw new PersistenceException(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isSameStringContent(byte[] data1, byte[] data2) throws IOException {
|
||||
boolean isSame = true;
|
||||
BufferedReader br1 = null, br2 = null;
|
||||
try {
|
||||
br1 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data1), StandardCharsets.UTF_8.toString()));
|
||||
br2 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(data2), StandardCharsets.UTF_8.toString()));
|
||||
String line1 = null, line2 = null;
|
||||
while (isSame) {
|
||||
line1 = br1.readLine();
|
||||
line2 = br2.readLine();
|
||||
if ((line1 == null && line2 == null)) {
|
||||
break;
|
||||
}
|
||||
if (!StringUtils.equals(line1, line2)) {
|
||||
isSame = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (br1 != null) {
|
||||
try {
|
||||
br1.close();
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (br2 != null) {
|
||||
try {
|
||||
br2.close();
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isSame;
|
||||
}
|
||||
|
||||
private void createSQLPattern(URL url, String sqlPatternLabel, String categoryName) throws PersistenceException {
|
||||
if (url == null) {
|
||||
@@ -693,8 +733,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
stream.close();
|
||||
|
||||
byte[] currentContent = item.getContent().getInnerContent();
|
||||
|
||||
if (!Arrays.equals(innerContent, currentContent)) {
|
||||
if (!isSameStringContent(innerContent, currentContent)) {
|
||||
item.getContent().setInnerContent(innerContent);
|
||||
Project project = getRepositoryContext().getProject();
|
||||
save(project, item);
|
||||
@@ -837,8 +876,8 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
Object fullFolder = getFullFolder(project, type, relativeFolder);
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
|
||||
if (serializableAllVersion.isEmpty()) {
|
||||
// look in all folders
|
||||
serializableAllVersion = getSerializable(project, id, false, false);
|
||||
// look in all folders for this item type
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
|
||||
}
|
||||
int size = serializableAllVersion.size();
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.core.repository.model;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
@@ -186,7 +187,7 @@ public interface IRepositoryFactory {
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public List<IRepositoryViewObject> getAll(Project project, ERepositoryObjectType type, boolean withDeleted,
|
||||
boolean allVersions) throws PersistenceException;
|
||||
boolean allVersions, IFolder... folders) throws PersistenceException;
|
||||
|
||||
/**
|
||||
* Deletes logically the given object. <code>isDeleted</code> on this object will now returned <code>true</code>.
|
||||
@@ -270,6 +271,8 @@ public interface IRepositoryFactory {
|
||||
|
||||
public void create(Project project, Item item, IPath path, boolean... isImportItem) throws PersistenceException;
|
||||
|
||||
public void save(Project project, Item item, boolean isMigrationTask) throws PersistenceException;
|
||||
|
||||
public void save(Project project, Item item) throws PersistenceException;
|
||||
|
||||
public void save(Project project, Property property) throws PersistenceException;
|
||||
@@ -460,4 +463,8 @@ public interface IRepositoryFactory {
|
||||
public boolean isRepositoryBusy();
|
||||
|
||||
public RepositoryWorkUnit getWorkUnitInProgress();
|
||||
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
|
||||
|
||||
public void batchDeleteOldVersionsPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote, IProgressMonitor monitor) throws PersistenceException;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
@@ -675,6 +676,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
}
|
||||
|
||||
List<IRepositoryViewObject> codeObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
Map<String, List<RepositoryNode>> labelCodeJarMap = new HashMap<String, List<RepositoryNode>>();
|
||||
|
||||
for (IRepositoryViewObject currentObject : elements) {
|
||||
RepositoryNode parent = getFolder(currentObject.getRepositoryObjectType(), currentObject.getPath(), rootNodes);
|
||||
RepositoryNode parentNode = parent;
|
||||
@@ -682,20 +686,69 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
parentNode = rootNode;
|
||||
}
|
||||
if (currentObject.isDeleted()) {
|
||||
boolean isCodeJarType = false;
|
||||
ERepositoryObjectType repositoryObjectType = currentObject.getRepositoryObjectType();
|
||||
if (ERepositoryObjectType.getAllTypesOfCodes().contains(repositoryObjectType)) {
|
||||
codeObjectList.add(currentObject);
|
||||
continue;
|
||||
} else if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(repositoryObjectType)) {
|
||||
isCodeJarType = true;
|
||||
}
|
||||
|
||||
RepositoryNode repNode = new RepositoryNode(new RepositoryViewObject(currentObject.getProperty()), parentNode,
|
||||
ENodeType.REPOSITORY_ELEMENT);
|
||||
repNode.setProperties(EProperties.CONTENT_TYPE, currentObject.getRepositoryObjectType());
|
||||
repNode.setProperties(EProperties.LABEL, currentObject.getLabel());
|
||||
parentNode.getChildren().add(repNode);
|
||||
repNode.setParent(parentNode);
|
||||
|
||||
if (isCodeJarType) {
|
||||
String label = currentObject.getProperty().getLabel();
|
||||
if (labelCodeJarMap.get(label) == null) {
|
||||
labelCodeJarMap.put(label, new ArrayList<RepositoryNode>());
|
||||
}
|
||||
labelCodeJarMap.get(label).add(repNode);
|
||||
}
|
||||
} else {
|
||||
addDeletedSubItems(currentObject.getProperty().getItem(), parentNode);
|
||||
}
|
||||
}
|
||||
addDeletedCode(rootNode, codeObjectList, labelCodeJarMap);
|
||||
objects.removeAll(elements);
|
||||
addDeletedTestCases(rootNode, objects);
|
||||
}
|
||||
|
||||
private void addDeletedCode(RepositoryNode rootNode, List<IRepositoryViewObject> codeObjectList, Map<String, List<RepositoryNode>> labelCodeJarMap) {
|
||||
List<IRepositoryNode> rootNodes = rootNode.getChildren();
|
||||
for (IRepositoryViewObject codeObject : codeObjectList) {
|
||||
ERepositoryObjectType objectType = codeObject.getRepositoryObjectType();
|
||||
RepositoryNode parent = getFolder(codeObject.getRepositoryObjectType(), codeObject.getPath(), rootNodes);
|
||||
RepositoryNode parentNode = parent;
|
||||
if (parentNode == null) {
|
||||
parentNode = rootNode;
|
||||
}
|
||||
|
||||
Item parentItem = (Item) codeObject.getProperty().getItem().getParent();
|
||||
String folderItemLabel = parentItem.getProperty().getLabel();
|
||||
if (labelCodeJarMap.get(folderItemLabel) != null) {
|
||||
Optional node = labelCodeJarMap.get(folderItemLabel).stream()
|
||||
.filter(n -> ERepositoryObjectType.CodeTypeEnum.isCodeRepositoryObjectTypeMatch(n.getObjectType(),
|
||||
objectType))
|
||||
.findFirst();
|
||||
if (node.isPresent()) {
|
||||
parentNode = (RepositoryNode) node.get();
|
||||
}
|
||||
}
|
||||
|
||||
RepositoryNode repNode = new RepositoryNode(new RepositoryViewObject(codeObject.getProperty()), parentNode,
|
||||
ENodeType.REPOSITORY_ELEMENT);
|
||||
repNode.setProperties(EProperties.CONTENT_TYPE, objectType);
|
||||
repNode.setProperties(EProperties.LABEL, codeObject.getLabel());
|
||||
parentNode.getChildren().add(repNode);
|
||||
repNode.setParent(parentNode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "addDeletedElements".
|
||||
*
|
||||
@@ -1064,6 +1117,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
if (newProject != null && newProject.getEmfProject() != null) {
|
||||
List<FolderItem> folderItems = ProjectManager.getInstance().getFolders(newProject.getEmfProject());
|
||||
if (folderItems != null) {
|
||||
folderItems = new ArrayList<>(folderItems);
|
||||
}
|
||||
for (FolderItem folder : folderItems) {
|
||||
String folderName = folder.getProperty().getLabel();
|
||||
if (("process".equals(folderName) || "joblets".equals(folderName)) && folder.getChildren() != null
|
||||
|
||||
@@ -15,7 +15,7 @@ package org.talend.core.repository.model;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
@@ -24,6 +24,7 @@ import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
@@ -71,7 +72,7 @@ import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||
import org.talend.commons.utils.data.container.RootContainer;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
import org.talend.commons.utils.time.TimeMeasure;
|
||||
import org.talend.commons.utils.time.TimeMeasurePerformance;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.AbstractDQModelService;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
@@ -84,9 +85,9 @@ import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
import org.talend.core.exception.TalendInternalPersistenceException;
|
||||
import org.talend.core.hadoop.BigDataBasicUtil;
|
||||
import org.talend.core.model.general.ILibrariesService;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.migration.IMigrationToolService;
|
||||
@@ -104,8 +105,10 @@ import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.ProjectReference;
|
||||
import org.talend.core.model.properties.PropertiesPackage;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SpagoBiServer;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.TDQItem;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.model.properties.impl.FolderItemImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
@@ -119,23 +122,30 @@ import org.talend.core.model.repository.LockInfo;
|
||||
import org.talend.core.model.repository.RepositoryContentManager;
|
||||
import org.talend.core.model.repository.RepositoryObject;
|
||||
import org.talend.core.model.repository.RepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.repository.CoreRepositoryPlugin;
|
||||
import org.talend.core.repository.constants.Constant;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.core.repository.utils.LoginTaskRegistryReader;
|
||||
import org.talend.core.repository.utils.ProjectDataJsonProvider;
|
||||
import org.talend.core.repository.utils.RepositoryPathProvider;
|
||||
import org.talend.core.repository.utils.XmiResourceManager;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.repository.item.ItemProductKeys;
|
||||
import org.talend.core.runtime.services.IGenericWizardService;
|
||||
import org.talend.core.runtime.services.IMavenUIService;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.service.IUpdateService;
|
||||
import org.talend.core.service.IDetectCVEService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.login.ILoginTask;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.ReferenceProjectProblemManager;
|
||||
import org.talend.repository.ReferenceProjectProvider;
|
||||
@@ -177,6 +187,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
private boolean isCancelled;
|
||||
|
||||
private static final LoginTaskRegistryReader LOGIN_TASK_REGISTRY_READER = new LoginTaskRegistryReader();
|
||||
|
||||
@Override
|
||||
public synchronized void addPropertyChangeListener(PropertyChangeListener l) {
|
||||
if (l == null) {
|
||||
@@ -226,6 +238,13 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return null;
|
||||
}
|
||||
|
||||
private ILibrariesService getLibrariesService() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -392,7 +411,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
|
||||
boolean isThrow = true;
|
||||
if (tdqRepService != null && CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) {
|
||||
if (tdqRepService != null && (CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()
|
||||
|| item instanceof TDQItem)) {
|
||||
// change MessageBox to DeleteModelElementConfirmDialog
|
||||
InputDialog inputDialog = tdqRepService.getInputDialog(item);
|
||||
if (MessageDialog.OK == inputDialog.open()) {
|
||||
@@ -1213,6 +1233,28 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return this.repositoryFactoryFromProvider.getLastVersion(project, ProcessUtils.getPureItemId(id), folderPath, type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IRepositoryViewObject getLastVersion(String id, ERepositoryObjectType type)
|
||||
throws PersistenceException {
|
||||
return getLastVersion(id , "", type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRepositoryViewObject getLastVersion(String id, List<ERepositoryObjectType> types) throws PersistenceException {
|
||||
if (types != null) {
|
||||
IRepositoryViewObject object = null;
|
||||
for (ERepositoryObjectType type : types) {
|
||||
object = getLastVersion(id, type);
|
||||
if (object != null) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRepositoryViewObject getLastVersion(String id, String folderPath, ERepositoryObjectType type)
|
||||
throws PersistenceException {
|
||||
String objId = id;
|
||||
@@ -1224,7 +1266,25 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return this.repositoryFactoryFromProvider.getLastVersion(project, objId, folderPath, type);
|
||||
}
|
||||
}
|
||||
return this.repositoryFactoryFromProvider.getLastVersion(projectManager.getCurrentProject(), objId , folderPath, type);
|
||||
return getLastRefVersion(projectManager.getCurrentProject(), objId , folderPath, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRepositoryViewObject getLastRefVersion(Project project, String id, String folderPath, ERepositoryObjectType type) throws PersistenceException {
|
||||
String projectLabel = ProcessUtils.getProjectLabelFromItemId(id);
|
||||
IRepositoryViewObject lastVersion = getLastVersion(project, ProcessUtils.getPureItemId(id), folderPath, type);
|
||||
if (lastVersion == null) {
|
||||
for (Project p : projectManager.getReferencedProjects(project)) {
|
||||
if (projectLabel != null && !projectLabel.equals(p.getTechnicalLabel())) {
|
||||
continue;
|
||||
}
|
||||
lastVersion = getLastRefVersion(p, id);
|
||||
if (lastVersion != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return lastVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1293,6 +1353,35 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return this.repositoryFactoryFromProvider.getAll(projectManager.getCurrentProject(), type, withDeleted, allVersions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IRepositoryViewObject> getAll(Project project, ERepositoryObjectType type, boolean withDeleted,
|
||||
boolean allVersions, IFolder... folders) throws PersistenceException {
|
||||
return this.repositoryFactoryFromProvider.getAll(project, type, withDeleted, allVersions, folders);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IRepositoryViewObject> getAllCodesJars(ERepositoryObjectType type) throws PersistenceException {
|
||||
return getAllCodesJars(projectManager.getCurrentProject(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IRepositoryViewObject> getAllCodesJars(Project project, ERepositoryObjectType type) throws PersistenceException {
|
||||
return getAll(project, type).stream().filter(obj -> !(obj.getProperty().getItem() instanceof RoutineItem))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IRepositoryViewObject> getAllInnerCodes(CodesJarInfo info) throws PersistenceException {
|
||||
Project project = ProjectManager.getInstance().getProjectFromProjectTechLabel(info.getProjectTechName());
|
||||
// empty folder won't be commit in git, create if not exist
|
||||
IFolder folder = ResourceUtils.getProject(project).getFolder(ERepositoryObjectType.getFolderName(info.getType()))
|
||||
.getFolder(info.getLabel());
|
||||
if (!folder.exists()) {
|
||||
ResourceUtils.createFolder(folder);
|
||||
}
|
||||
return repositoryFactoryFromProvider.getAll(project, info.getType(), false, false, folder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getFolders(ERepositoryObjectType type) throws PersistenceException {
|
||||
return getFolders(projectManager.getCurrentProject(), type);
|
||||
@@ -1546,14 +1635,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
@Override
|
||||
public void save(Project project, Item item, boolean... isMigrationTask) throws PersistenceException {
|
||||
this.repositoryFactoryFromProvider.save(project, item);
|
||||
if (isMigrationTask == null || isMigrationTask.length == 0 || !isMigrationTask[0]) {
|
||||
this.repositoryFactoryFromProvider.save(project, item);
|
||||
boolean avoidGenerateProm = false;
|
||||
if (isMigrationTask != null && isMigrationTask.length == 2) {
|
||||
avoidGenerateProm = isMigrationTask[1];
|
||||
}
|
||||
fireRepositoryPropertyChange(ERepositoryActionName.SAVE.getName(), avoidGenerateProm, item);
|
||||
|
||||
} else {
|
||||
this.repositoryFactoryFromProvider.save(project, item, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1744,9 +1834,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private void emptyTempFolder(Project project) throws PersistenceException {
|
||||
String str = (System.getProperty("eclipse.home.location") + "temp").substring(5);
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
|
||||
try {
|
||||
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
}catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
long start = System.currentTimeMillis();
|
||||
IProject fsProject = ResourceUtils.getProject(project);
|
||||
IFolder folder = ResourceUtils.getFolder(fsProject, RepositoryConstants.TEMP_DIRECTORY, false);
|
||||
@@ -2035,11 +2128,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
*/
|
||||
public void logOnProject(Project project, IProgressMonitor monitor) throws LoginException, PersistenceException {
|
||||
try {
|
||||
TimeMeasure.display = CommonsPlugin.isDebugMode();
|
||||
TimeMeasure.displaySteps = CommonsPlugin.isDebugMode();
|
||||
TimeMeasure.measureActive = CommonsPlugin.isDebugMode();
|
||||
|
||||
TimeMeasure.begin("logOnProject"); //$NON-NLS-1$
|
||||
TimeMeasurePerformance.begin("logOnProject", "logon project name '" + project.getLabel()+"'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
try {
|
||||
/**
|
||||
* init/check proxy selector, in case default proxy selector is not registed yet
|
||||
@@ -2083,12 +2172,35 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
this.repositoryFactoryFromProvider.beforeLogon(project);
|
||||
ProjectManager.getInstance().getBeforeLogonRecords().clear();
|
||||
ProjectManager.getInstance().getUpdatedRemoteHandlerRecords().clear();
|
||||
ILibrariesService librariesService = getLibrariesService();
|
||||
if (librariesService != null) {
|
||||
librariesService.setForceReloadCustomUri();
|
||||
}
|
||||
|
||||
ProjectDataJsonProvider.checkAndRectifyRelationShipSetting(project.getEmfProject());
|
||||
|
||||
try {
|
||||
// load additional jdbc
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
|
||||
IGenericWizardService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IGenericWizardService.class);
|
||||
if (service != null) {
|
||||
service.loadAdditionalJDBC();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// in case, to avoid block logon
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
updateService.syncComponentM2Jars(currentMonitor);
|
||||
}
|
||||
|
||||
// init sdk component
|
||||
try {
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2106,7 +2218,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
}
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "beforeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "beforeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// Check project compatibility
|
||||
checkProjectCompatibility(project);
|
||||
@@ -2124,16 +2236,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.synchronizeLibraries"), 1); //$NON-NLS-1$
|
||||
coreService.syncLibraries(currentMonitor);
|
||||
TimeMeasure.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
|
||||
TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
CodesJarResourceCache.initCodesJarCache();
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
executeMigrations(project, true, currentMonitor);
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "executeMigrations(beforeLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "executeMigrations(beforeLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
|
||||
@@ -2141,7 +2255,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
this.repositoryFactoryFromProvider.logOnProject(project);
|
||||
ProjectManager.getInstance().getLogonRecords().clear();
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "logOnProject"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "logOnProject"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
emptyTempFolder(project);
|
||||
|
||||
@@ -2157,14 +2271,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
fireRepositoryPropertyChange(ERepositoryActionName.PROJECT_PREFERENCES_RELOAD.getName(), null, null);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
updateService.syncComponentM2Jars(currentMonitor);
|
||||
}
|
||||
|
||||
IRunProcessService runProcessService = getRunProcessService();
|
||||
if (runProcessService != null) {
|
||||
runProcessService.initMavenJavaProject(monitor, project);
|
||||
|
||||
// before afterLogon migration execute, check and update daikon dependency
|
||||
runProcessService.checkAndUpdateDaikonDependencies();
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2172,7 +2284,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
executeMigrations(project, false, currentMonitor);
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
TimeMeasure.step("logOnProject", "executeMigrations(afterLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "executeMigrations(afterLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (monitor != null && monitor.isCanceled()) {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
}
|
||||
@@ -2188,12 +2300,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
// clean workspace
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.cleanWorkspace"), 1); //$NON-NLS-1$
|
||||
|
||||
TimeMeasure.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
if (workspace instanceof Workspace) {
|
||||
((Workspace) workspace).getFileSystemManager().getHistoryStore().clean(currentMonitor);
|
||||
}
|
||||
TimeMeasure.step("logOnProject", "clean workspace history"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "clean workspace history"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.synch.repo.items"), 1); //$NON-NLS-1$
|
||||
@@ -2219,29 +2331,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (monitor != null && monitor.isCanceled()) {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
}
|
||||
TimeMeasure.step("logOnProject", "sync repository (routines/rules/beans)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "sync repository (routines/rules/beans)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// log4j prefs
|
||||
if (coreUiService != null && coreService != null) {
|
||||
coreService.syncLog4jSettings(null);
|
||||
TimeMeasure.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
try {
|
||||
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
|
||||
if (url != null) {
|
||||
// set the project mappings url
|
||||
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
|
||||
}
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
if (runProcessService != null && !isCommandLineLocalRefProject) {
|
||||
runProcessService.initializeRootPoms(monitor);
|
||||
|
||||
TimeMeasure.step("logOnProject", "install / setup root poms"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
TimeMeasurePerformance.step("logOnProject", "install / setup root poms"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
|
||||
@@ -2258,10 +2359,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
fullLogonFinished = true;
|
||||
this.repositoryFactoryFromProvider.afterLogon(monitor);
|
||||
} finally {
|
||||
TimeMeasure.end("logOnProject"); //$NON-NLS-1$
|
||||
TimeMeasure.display = false;
|
||||
TimeMeasure.displaySteps = false;
|
||||
TimeMeasure.measureActive = false;
|
||||
TimeMeasurePerformance.end("logOnProject"); //$NON-NLS-1$
|
||||
}
|
||||
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$
|
||||
@@ -2349,6 +2447,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (runProcessService != null) {
|
||||
runProcessService.clearProjectRelatedSettings();
|
||||
}
|
||||
|
||||
// clear detect CVE cache
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDetectCVEService.class)) {
|
||||
IDetectCVEService detectCVESvc = GlobalServiceRegister.getDefault().getService(IDetectCVEService.class);
|
||||
if (detectCVESvc != null) {
|
||||
detectCVESvc.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
fullLogonFinished = false;
|
||||
@@ -2662,4 +2769,90 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
public RepositoryWorkUnit getWorkUnitInProgress() {
|
||||
return repositoryFactoryFromProvider.getWorkUnitInProgress();
|
||||
}
|
||||
|
||||
public void executeRequiredLoginTasks(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||
ILoginTask[] allLoginTasks = LOGIN_TASK_REGISTRY_READER.getAllTaskListInstance();
|
||||
for (ILoginTask task : allLoginTasks) {
|
||||
if (task.isRequiredAlways()) {
|
||||
task.run(monitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException {
|
||||
if (project == null || objToDelete == null || objToDelete.getProperty() == null) {
|
||||
return;
|
||||
}
|
||||
// RepositoryViewObject is dynamic, so force to use in all case the RepositoryObject with fixed object.
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, object, version);
|
||||
|
||||
// i18n
|
||||
//log.info("Physical deletion [" + objToDelete + "] by " + getRepositoryContext().getUser() + ".");
|
||||
String str[] = new String[] { object.toString()+ "_" + version, getRepositoryContext().getUser().toString() };
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$ }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException {
|
||||
if (project == null || objToDeleteList == null || objToDeleteList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> idList = new ArrayList<>();
|
||||
List<IRepositoryViewObject> repositoryObjectList = new ArrayList<>();
|
||||
String label = "",lastLabel = "";
|
||||
for (IRepositoryViewObject objToDelete : objToDeleteList) {
|
||||
label = objToDelete.getProperty().getLabel();
|
||||
String versionedLabel = objToDelete.getProperty().getLabel() + "_" + objToDelete.getProperty().getVersion();
|
||||
monitor.setTaskName("Removing " + objToDelete.getRepositoryObjectType() + ":"+ versionedLabel);
|
||||
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
boolean isExtendPoint = false;
|
||||
|
||||
idList.add(object.getProperty().getId());
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
repositoryObjectList.add(object);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, objToDelete,objToDelete.getProperty().getVersion());
|
||||
if (label != null && !label.equals(lastLabel)) monitor.worked(1); //for different versions in progress bar
|
||||
lastLabel = label;
|
||||
}
|
||||
|
||||
// save project will handle git/svn update
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.repository.recyclebin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -24,6 +25,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
@@ -275,6 +277,38 @@ public class RecycleBinManager {
|
||||
resource = createRecycleBinResource(project);
|
||||
}
|
||||
resource.getContents().clear();
|
||||
EList<String> deletedFolders = recycleBin.getDeletedFolders();
|
||||
if (deletedFolders != null) {
|
||||
List<String> folders = new LinkedList<>(deletedFolders);
|
||||
Collections.sort(folders);
|
||||
deletedFolders.clear();
|
||||
deletedFolders.addAll(folders);
|
||||
}
|
||||
EList<TalendItem> deletedItems = recycleBin.getDeletedItems();
|
||||
if (deletedItems != null) {
|
||||
List<TalendItem> items = new LinkedList<>(deletedItems);
|
||||
items.sort((l, r) -> {
|
||||
if (l == null && r == null) {
|
||||
return 0;
|
||||
} else if (l == null) {
|
||||
return -1;
|
||||
} else if (r == null) {
|
||||
return 1;
|
||||
}
|
||||
int result = StringUtils.compare(l.getType(), r.getType());
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
result = StringUtils.compare(l.getPath(), r.getPath());
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
return StringUtils.compare(l.getId(), r.getId());
|
||||
});
|
||||
deletedItems.clear();
|
||||
deletedItems.addAll(items);
|
||||
}
|
||||
|
||||
// set date to null to avoid timezone conflict
|
||||
recycleBin.setLastUpdate(null);
|
||||
resource.getContents().add(recycleBin);
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
@@ -54,11 +53,16 @@ import org.talend.core.model.properties.SQLPatternItem;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.model.routines.RoutinesUtil;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.ui.dialog.PastSelectorDialog;
|
||||
import org.talend.core.repository.utils.RoutineUtils;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
import org.talend.core.runtime.services.IGenericDBService;
|
||||
import org.talend.core.ui.ICDCProviderService;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.designer.codegen.ICodeGeneratorService;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
@@ -125,6 +129,44 @@ public class CopyObjectAction {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// disable copy for codejar
|
||||
ERepositoryObjectType sourceObjectType = objectToCopy.getRepositoryObjectType();
|
||||
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(sourceObjectType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// disable paste between global code and custom code
|
||||
if (ERepositoryObjectType.getAllTypesOfCodes().contains(sourceObjectType) && targetNode != null) {
|
||||
IRepositoryViewObject targetObject = targetNode.getObject();
|
||||
boolean isInnerCodeSourceNode = RoutinesUtil.isInnerCodes(objectToCopy.getProperty());
|
||||
if (targetObject != null) {
|
||||
if (sourceObjectType.equals(targetObject.getRepositoryObjectType())) {
|
||||
return isInnerCodeSourceNode && RoutinesUtil.isInnerCodes(targetObject.getProperty());
|
||||
}
|
||||
|
||||
if (isInnerCodeSourceNode
|
||||
&& !ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetObject.getRepositoryObjectType())) {
|
||||
return false;
|
||||
}
|
||||
if (!isInnerCodeSourceNode
|
||||
&& ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetObject.getRepositoryObjectType())) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// system folder node
|
||||
if (isInnerCodeSourceNode) {
|
||||
return false;
|
||||
} else {
|
||||
ERepositoryObjectType targetType = ((ERepositoryObjectType) targetNode
|
||||
.getProperties(EProperties.CONTENT_TYPE));
|
||||
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetType)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Cannot copy system routines:
|
||||
if (objectToCopy.getRepositoryObjectType() == ERepositoryObjectType.ROUTINES) {
|
||||
Property property = objectToCopy.getProperty();
|
||||
@@ -193,7 +235,8 @@ public class CopyObjectAction {
|
||||
}
|
||||
|
||||
// for bug 0005454: Copy paste with keyboard in the repository view doesn't work.
|
||||
if (targetNode.getType() == ENodeType.REPOSITORY_ELEMENT) {
|
||||
if (targetNode.getType() == ENodeType.REPOSITORY_ELEMENT
|
||||
&& !ERepositoryObjectType.getAllTypesOfCodesJar().contains(targetNode.getObjectType())) {
|
||||
targetNode = targetNode.getParent();
|
||||
}
|
||||
|
||||
@@ -471,9 +514,23 @@ public class CopyObjectAction {
|
||||
ICodeGeneratorService.class);
|
||||
if (codeGenService != null) {
|
||||
codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
|
||||
boolean isInnerCode = RoutinesUtil.isInnerCodes(item.getProperty());
|
||||
if (isInnerCode) {
|
||||
RoutineUtils.changeInnerCodePackage(item, true);
|
||||
}
|
||||
try {
|
||||
codeGenService.createRoutineSynchronizer().syncRoutine(item, true);
|
||||
} catch (SystemException e) {
|
||||
|
||||
if (isInnerCode) {
|
||||
CodesJarInfo info = CodesJarResourceCache.getCodesJarByInnerCode(item);
|
||||
if (info != null) {
|
||||
IDesignerMavenService designerMavenService = IDesignerMavenService.get();
|
||||
if (designerMavenService != null) {
|
||||
designerMavenService.updateCodeJarMavenProject(info, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,8 @@ public class CreateFolderAction extends AContextualAction {
|
||||
|| property.equals(ERepositoryObjectType.JOB_DOC) || property.equals(ERepositoryObjectType.JOBLET_DOC)
|
||||
|| ERepositoryObjectType.SQLPATTERNS.equals(property)
|
||||
|| ERepositoryObjectType.REFERENCED_PROJECTS.equals(property)
|
||||
|| ERepositoryObjectType.SVN_ROOT.equals(property)) {
|
||||
|| ERepositoryObjectType.SVN_ROOT.equals(property) || ERepositoryObjectType.ROUTINESJAR.equals(property)
|
||||
|| property.equals(ERepositoryObjectType.BEANSJAR)) {
|
||||
canWork = false;
|
||||
} else if (property != null
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.map.MultiKeyMap;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -54,6 +55,7 @@ import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.utils.data.container.RootContainer;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IESBService;
|
||||
import org.talend.core.ITDQRepositoryService;
|
||||
@@ -714,6 +716,7 @@ public class DeleteAction extends AContextualAction {
|
||||
removeConnFromSQLExplorer(repositoryNode);
|
||||
List<IRepositoryViewObject> batchDeleteObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
deleteTestCases(factory, deleteActionCache, repositoryNode, null, batchDeleteObjectList);
|
||||
deleteCodeSubItem(factory, deleteActionCache, repositoryNode, null, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1456,10 +1459,11 @@ public class DeleteAction extends AContextualAction {
|
||||
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
|
||||
.getService(ITestContainerProviderService.class);
|
||||
if(testService != null){
|
||||
|
||||
testService.deleteDataFiles(objToDelete);
|
||||
}
|
||||
testService.deleteDataFiles(objToDelete);
|
||||
}
|
||||
// delete codejar forever need to delete subitem also
|
||||
deleteCodeSubItem(factory, deleteActionCache, currentJobNode, confirm, false);
|
||||
|
||||
if (!ProjectManager.getInstance().getCurrentProject().isLocal()) {
|
||||
// if remote,batch delete later
|
||||
@@ -1482,14 +1486,47 @@ public class DeleteAction extends AContextualAction {
|
||||
factory.deleteObjectLogical(objToDelete);
|
||||
updateRelatedViews();
|
||||
removeConnFromSQLExplorer(currentJobNode);
|
||||
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
deleteTestCases(factory, deleteActionCache, currentJobNode, confirm, null);
|
||||
deleteCodeSubItem(factory, deleteActionCache, currentJobNode, confirm, true);
|
||||
}
|
||||
}
|
||||
|
||||
return needReturn;
|
||||
}
|
||||
|
||||
private void deleteCodeSubItem(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
|
||||
final IRepositoryNode currentJobNode, Boolean confirm, boolean logicalDelete)
|
||||
throws PersistenceException, BusinessException {
|
||||
if (!ERepositoryObjectType.getAllTypesOfCodesJar().contains(currentJobNode.getObjectType())) {
|
||||
return;
|
||||
}
|
||||
if (!currentJobNode.getChildren().isEmpty()) {
|
||||
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
for (IRepositoryNode child : currentJobNode.getChildren()) {
|
||||
deleteElements(factory, deleteActionCache, (RepositoryNode) child, confirm, deleteObjectList);
|
||||
}
|
||||
if (deleteObjectList != null && deleteObjectList.size() > 0) {
|
||||
factory.batchDeleteObjectPhysical4Remote(ProjectManager.getInstance().getCurrentProject(), deleteObjectList);
|
||||
}
|
||||
}
|
||||
|
||||
// delete forever to delete codeJar folder
|
||||
if (!logicalDelete) {
|
||||
IFolder folder = ResourceUtils
|
||||
.getFolder(ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()),
|
||||
ERepositoryObjectType.getFolderName(currentJobNode.getObjectType()), true)
|
||||
.getFolder(currentJobNode.getObject().getProperty().getLabel());
|
||||
if (folder != null) {
|
||||
try {
|
||||
folder.delete(false, null);
|
||||
} catch (CoreException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void deleteTestCases(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
|
||||
final IRepositoryNode currentJobNode, Boolean confirm, List<IRepositoryViewObject> batchDeleteObjectList)
|
||||
throws PersistenceException, BusinessException {
|
||||
|
||||
@@ -74,6 +74,7 @@ import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryContentHandler;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.RepositoryContentManager;
|
||||
import org.talend.core.model.routines.RoutinesUtil;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.ui.dialog.DuplicateDialog;
|
||||
@@ -145,8 +146,14 @@ public class DuplicateAction extends AContextualAction {
|
||||
canWork = false;
|
||||
} else if (((StructuredSelection) selection).toArray().length == 1) {
|
||||
Object obj = ((StructuredSelection) selection).toList().get(0);
|
||||
RepositoryNode sourceNode = (RepositoryNode) obj;
|
||||
// disable duplicate for codejar / innercode now
|
||||
if (ERepositoryObjectType.getAllTypesOfCodesJar().contains(sourceNode.getObjectType())
|
||||
|| sourceNode.getObject() != null && sourceNode.getObject().getProperty() != null
|
||||
&& RoutinesUtil.isInnerCodes(sourceNode.getObject().getProperty())) {
|
||||
canWork = false;
|
||||
}
|
||||
if (canWork) {
|
||||
RepositoryNode sourceNode = (RepositoryNode) obj;
|
||||
if (!CopyObjectAction.getInstance().validateAction(sourceNode, null)) {
|
||||
canWork = false;
|
||||
} else if (node.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.JOB_DOC
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -45,6 +46,7 @@ import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ITDQRepositoryService;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
@@ -343,6 +345,7 @@ public class EmptyRecycleBinAction extends AContextualAction {
|
||||
testService.deleteDataFiles(objToDelete);
|
||||
}
|
||||
}
|
||||
deleteCodeSubItem(factory, currentNode);
|
||||
if (!ProjectManager.getInstance().getCurrentProject().isLocal()) {
|
||||
// if remote, batch delete later
|
||||
batchDeleteObjectList.add(objToDelete);
|
||||
@@ -355,6 +358,36 @@ public class EmptyRecycleBinAction extends AContextualAction {
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteCodeSubItem(IProxyRepositoryFactory factory, final IRepositoryNode currentNode)
|
||||
throws PersistenceException, BusinessException {
|
||||
if (!ERepositoryObjectType.getAllTypesOfCodesJar().contains(currentNode.getObjectType())) {
|
||||
return;
|
||||
}
|
||||
if (!currentNode.getChildren().isEmpty()) {
|
||||
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
for (IRepositoryNode child : currentNode.getChildren()) {
|
||||
deleteElements(factory, (RepositoryNode) child, deleteObjectList);
|
||||
}
|
||||
if (deleteObjectList != null && deleteObjectList.size() > 0) {
|
||||
factory.batchDeleteObjectPhysical4Remote(ProjectManager.getInstance().getCurrentProject(), deleteObjectList);
|
||||
}
|
||||
}
|
||||
|
||||
// delete forever to delete codeJar folder
|
||||
IFolder folder = ResourceUtils
|
||||
.getFolder(ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()),
|
||||
ERepositoryObjectType.getFolderName(currentNode.getObjectType()), true)
|
||||
.getFolder(currentNode.getObject().getProperty().getLabel());
|
||||
if (folder != null) {
|
||||
try {
|
||||
folder.delete(false, null);
|
||||
} catch (CoreException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected boolean isRelation(IEditorInput editorInput, String repoNodeProjectLabel, String repoNodeId) {
|
||||
IRepoViewLinker[] allRepoViewLinkers = RepoViewLinkerRegistryReader.getInstance().getAllRepoViewLinkers();
|
||||
for (IRepoViewLinker linker : allRepoViewLinkers) {
|
||||
|
||||
@@ -193,7 +193,8 @@ public class RestoreAction extends AContextualAction {
|
||||
node = node.getParent();
|
||||
if ((node.getObject().getProperty().getItem() instanceof FolderItem)) {
|
||||
node.getObject().getProperty().getItem().getState().setDeleted(false);
|
||||
} else if (isTestcase) {
|
||||
} else if (isTestcase
|
||||
|| ERepositoryObjectType.getAllTypesOfCodesJar().contains(node.getObjectType())) {
|
||||
restoreNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +389,14 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
case STABLE_SYSTEM_FOLDER:
|
||||
case SYSTEM_FOLDER:
|
||||
ERepositoryObjectType contentType = node.getContentType();
|
||||
if (contentType != null) {
|
||||
// special setting for system codeJar node
|
||||
if (contentType.equals(ERepositoryObjectType.ROUTINESJAR)) {
|
||||
nodeIcon = RepositoryImageProvider.getIcon(ERepositoryObjectType.ROUTINES);
|
||||
} else if (contentType.equals(ERepositoryObjectType.BEANSJAR)) {
|
||||
nodeIcon = RepositoryImageProvider.getIcon(ERepositoryObjectType.BEANS);
|
||||
}
|
||||
}
|
||||
if (nodeIcon == null || EImage.DEFAULT_IMAGE.equals(nodeIcon)) {
|
||||
Image image = getImageFromFramework(contentType);
|
||||
if (image != null) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.talend.core.model.properties.ByteArray;
|
||||
import org.talend.core.model.properties.FileItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.RoutinesJarItem;
|
||||
import org.talend.core.model.repository.AbstractRepositoryContentHandler;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
|
||||
@@ -66,6 +67,13 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
protected Resource save(RoutinesJarItem item) {
|
||||
final Resource itemResource = getXmiResourceManager().getItemResource(item);
|
||||
itemResource.getContents().clear();
|
||||
itemResource.getContents().add(item.getRoutinesJarType());
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
protected Resource saveScreenShots(ProcessItem item) throws PersistenceException {
|
||||
Resource itemResource = getXmiResourceManager().getScreenshotResource(item, true, true);
|
||||
EMap screenshots = item.getProcess().getScreenshots();
|
||||
@@ -76,7 +84,7 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
private XmiResourceManager getXmiResourceManager() {
|
||||
protected XmiResourceManager getXmiResourceManager() {
|
||||
if (null == xmiResourceManager) {
|
||||
xmiResourceManager = new XmiResourceManager();
|
||||
}
|
||||
|
||||
@@ -81,6 +81,12 @@ public class ProjectDataJsonProvider {
|
||||
return strBuilder.toString();
|
||||
}
|
||||
|
||||
public static String getMigrationTaskIndexPath() {
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
strBuilder.append(FileConstants.SETTINGS_FOLDER_NAME).append("/").append(FileConstants.MIGRATION_TASK_FILE_NAME); //$NON-NLS-1$
|
||||
return strBuilder.toString();
|
||||
}
|
||||
|
||||
public static void saveProjectData(Project project) throws PersistenceException {
|
||||
saveProjectData(project, CONTENT_ALL);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.oro.text.regex.MalformedPatternException;
|
||||
import org.apache.oro.text.regex.Pattern;
|
||||
import org.apache.oro.text.regex.PatternCompiler;
|
||||
@@ -26,37 +30,65 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment
|
||||
*/
|
||||
public final class RoutineUtils {
|
||||
|
||||
private static final String DEFAULT_PACKAGE_REGEX = "package(\\s)+" + JavaUtils.JAVA_ROUTINES_DIRECTORY //$NON-NLS-1$
|
||||
+ "\\.((\\w)+)(\\s)*;"; //$NON-NLS-1$
|
||||
|
||||
private static final String DEFAULT_PACKAGE_STRING = "package " + JavaUtils.JAVA_ROUTINES_DIRECTORY + ";"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private static final String INNER_ROUTINES_PACKAGE_REGEX = "package\\s+([^;]+);";
|
||||
|
||||
public static void changeRoutinesPackage(Item item) {
|
||||
List<ERepositoryObjectType> allowedTypes = new ArrayList<ERepositoryObjectType>();
|
||||
allowedTypes.add(ERepositoryObjectType.ROUTINES);
|
||||
doChangeRoutinesPackage(item, DEFAULT_PACKAGE_REGEX, DEFAULT_PACKAGE_STRING, allowedTypes, false, true);
|
||||
}
|
||||
|
||||
public static void changeInnerCodePackage(Item item, boolean avoidSave) {
|
||||
changeInnerCodePackage(item, avoidSave, true);
|
||||
}
|
||||
|
||||
public static void changeInnerCodePackage(Item item, boolean avoidSave, boolean commitMode) {
|
||||
IDesignerMavenService service = IDesignerMavenService.get();
|
||||
if (service != null && item instanceof RoutineItem) {
|
||||
RoutineItem routineItem = (RoutineItem) item;
|
||||
String codesJarPackageByInnerCode = service.getCodesJarPackageByInnerCode(routineItem);
|
||||
if (StringUtils.isNotBlank(codesJarPackageByInnerCode)) {
|
||||
String newPackageString = "package " + StringUtils.replace(codesJarPackageByInnerCode, "/", ".") + ";";
|
||||
if (!routineItem.isBuiltIn()) {
|
||||
String routineContent = new String(routineItem.getContent().getInnerContent());
|
||||
if (routineContent != null && routineContent.contains(newPackageString)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
doChangeRoutinesPackage(item, INNER_ROUTINES_PACKAGE_REGEX, newPackageString,
|
||||
ERepositoryObjectType.getAllTypesOfCodes(), avoidSave, commitMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void doChangeRoutinesPackage(Item item, String packageRegex, String newPackage,
|
||||
List<ERepositoryObjectType> allowedTypes, boolean avoidSave, boolean commitMode) {
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (ERepositoryObjectType.ROUTINES.equals(itemType) && item instanceof RoutineItem) {
|
||||
if (allowedTypes != null && allowedTypes.contains(itemType) && item instanceof RoutineItem) {
|
||||
RoutineItem rItem = (RoutineItem) item;
|
||||
if (!rItem.isBuiltIn()) {
|
||||
//
|
||||
String routineContent = new String(rItem.getContent().getInnerContent());
|
||||
//
|
||||
// String curProjectName =
|
||||
// currentProject.getTechnicalLabel().toLowerCase();
|
||||
String oldPackage = "package(\\s)+" + JavaUtils.JAVA_ROUTINES_DIRECTORY + "\\.((\\w)+)(\\s)*;"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// String newPackage = "package " +
|
||||
// JavaUtils.JAVA_ROUTINES_DIRECTORY + "." + curProjectName +
|
||||
// ";";
|
||||
|
||||
String newPackage = "package " + JavaUtils.JAVA_ROUTINES_DIRECTORY + ";"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
try {
|
||||
PatternCompiler compiler = new Perl5Compiler();
|
||||
Perl5Matcher matcher = new Perl5Matcher();
|
||||
matcher.setMultiline(true);
|
||||
Pattern pattern = compiler.compile(oldPackage);
|
||||
Pattern pattern = compiler.compile(packageRegex);
|
||||
|
||||
if (matcher.contains(routineContent, pattern)) {
|
||||
// String group = matcher.getMatch().group(2);
|
||||
@@ -67,7 +99,14 @@ public final class RoutineUtils {
|
||||
rItem.getContent().setInnerContent(routineContent.getBytes());
|
||||
ProxyRepositoryFactory repFactory = ProxyRepositoryFactory.getInstance();
|
||||
|
||||
repFactory.save(rItem);
|
||||
if (!avoidSave) {
|
||||
if (commitMode) {
|
||||
repFactory.save(rItem);
|
||||
} else {
|
||||
// avoid deadlock in git pull event listener
|
||||
new XmiResourceManager().saveResource(rItem.eResource());
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
} catch (MalformedPatternException e) {
|
||||
|
||||
@@ -205,6 +205,27 @@ public class StandaloneConnectionContextUtils {
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
|
||||
getOriginalValue(contextProperties, additionalJDBCSettings));
|
||||
|
||||
String dataprocProjectId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
|
||||
getOriginalValue(contextProperties, dataprocProjectId));
|
||||
|
||||
String dataprocClusterId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
|
||||
getOriginalValue(contextProperties, dataprocClusterId));
|
||||
|
||||
String dataprocRegion = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
|
||||
getOriginalValue(contextProperties, dataprocRegion));
|
||||
|
||||
String dataprocJarsBucket = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
|
||||
getOriginalValue(contextProperties, dataprocJarsBucket));
|
||||
|
||||
String dataprocPathToCredentials = cloneConn.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
|
||||
getOriginalValue(contextProperties, dataprocPathToCredentials));
|
||||
|
||||
String hiveEnableHa = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA,
|
||||
getOriginalValue(contextProperties, hiveEnableHa));
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Priority;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -37,6 +38,7 @@ import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
@@ -68,7 +70,9 @@ import org.talend.core.model.properties.TDQItem;
|
||||
import org.talend.core.model.properties.ValidationRulesConnectionItem;
|
||||
import org.talend.core.model.properties.helper.ByteArrayResource;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.routines.RoutinesUtil;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.ResourceFilenameHelper.FileName;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
@@ -206,7 +210,7 @@ public class XmiResourceManager {
|
||||
* @return
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private IPath getFolderPath(IProject project, ERepositoryObjectType repositoryObjectType, IPath relativePath)
|
||||
private IPath getFolderPath(IProject project, ERepositoryObjectType repositoryObjectType, IPath relativePath, Item item)
|
||||
throws PersistenceException {
|
||||
ERepositoryObjectType type = repositoryObjectType;
|
||||
if (ERepositoryObjectType.TDQ_SYSTEM_INDICATORS.equals(repositoryObjectType)
|
||||
@@ -215,6 +219,10 @@ public class XmiResourceManager {
|
||||
} else if (ERepositoryObjectType.TDQ_PATTERN_REGEX.equals(repositoryObjectType)
|
||||
|| ERepositoryObjectType.TDQ_PATTERN_SQL.equals(repositoryObjectType)) {
|
||||
type = ERepositoryObjectType.TDQ_PATTERN_ELEMENT;
|
||||
} else if (type == ERepositoryObjectType.ROUTINES && RoutinesUtil.isInnerCodes(item.getProperty())) {
|
||||
type = ERepositoryObjectType.ROUTINESJAR;
|
||||
} else if (type == ERepositoryObjectType.BEANS && RoutinesUtil.isInnerCodes(item.getProperty())) {
|
||||
type = ERepositoryObjectType.BEANSJAR;
|
||||
}
|
||||
IFolder folder = project.getFolder(ERepositoryObjectType.getFolderName(type)).getFolder(relativePath);
|
||||
return folder.getFullPath();
|
||||
@@ -647,6 +655,23 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public void saveResource(Resource resource) throws PersistenceException {
|
||||
try {
|
||||
if (resource != null) {
|
||||
Object objectByType = EcoreUtil.getObjectByType(resource.getContents(), PropertiesPackage.eINSTANCE.getProject());
|
||||
if (objectByType != null) {
|
||||
Project project = (Project) objectByType;
|
||||
EList migrationTasks = project.getMigrationTask();
|
||||
if (migrationTasks != null && 1 < migrationTasks.size()) {
|
||||
org.talend.commons.exception.ExceptionHandler.process(new Exception("Bad saving logic for Project"),
|
||||
Priority.WARN);
|
||||
ProxyRepositoryFactory.getInstance().saveProject(new org.talend.core.model.general.Project(project));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
org.talend.commons.exception.ExceptionHandler.process(e);
|
||||
}
|
||||
EmfHelper.saveResource(resource);
|
||||
}
|
||||
|
||||
@@ -684,7 +709,7 @@ public class XmiResourceManager {
|
||||
// MOD mzhao 2010-11-22, suppport TDQ item file extensions.(.ana, .rep, etc)
|
||||
private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item)
|
||||
throws PersistenceException {
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path);
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
|
||||
FileName fileName = ResourceFilenameHelper.create(item.getProperty());
|
||||
IPath resourcePath = null;
|
||||
if (item.getFileExtension() == null) {
|
||||
@@ -700,7 +725,7 @@ public class XmiResourceManager {
|
||||
@Deprecated
|
||||
private URI getItemResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item,
|
||||
String fileExtension) throws PersistenceException {
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path);
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
|
||||
FileName fileName = ResourceFilenameHelper.create(item.getProperty());
|
||||
IPath resourcePath = ResourceFilenameHelper
|
||||
.getExpectedFilePath(fileName, folderPath, fileExtension, item.isNeedVersion());
|
||||
@@ -710,7 +735,7 @@ public class XmiResourceManager {
|
||||
// added by dlin 2011-7-14 to create the uri of file of .screenshot
|
||||
private URI getScreenshotResourceURI(IProject project, ERepositoryObjectType repositoryObjectType, IPath path, Item item,
|
||||
String... fileExtension) throws PersistenceException {
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path);
|
||||
IPath folderPath = getFolderPath(project, repositoryObjectType, path, item);
|
||||
FileName fileName = ResourceFilenameHelper.create(item.getProperty());
|
||||
IPath resourcePath = ResourceFilenameHelper.getExpectedFilePath(fileName, folderPath, FileConstants.SCREENSHOT_EXTENSION,
|
||||
item.isNeedVersion());
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/resty-0.3.2.jar" />
|
||||
<classpathentry exported="true" kind="lib" path="lib/delight-rhino-sandbox-0.0.15.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/rhino-1.7.13.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/resty-0.3.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/json_simple-1.1.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
|
||||
@@ -95,6 +95,7 @@ Export-Package: org.talend.commons.utils.generation,
|
||||
org.talend.repository.documentation.generation,
|
||||
org.talend.repository.model,
|
||||
org.talend.repository.model.nodes,
|
||||
org.talend.repository.token,
|
||||
org.talend.repository.ui.actions,
|
||||
org.talend.repository.ui.dialog,
|
||||
org.talend.repository.ui.login.connections,
|
||||
@@ -122,10 +123,13 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson
|
||||
org.talend.libraries.jackson,
|
||||
org.talend.libraries.apache.common
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
lib/resty-0.3.2.jar,
|
||||
lib/json_simple-1.1.jar
|
||||
lib/json_simple-1.1.jar,
|
||||
lib/delight-rhino-sandbox-0.0.15.jar,
|
||||
lib/rhino-1.7.13.jar
|
||||
Eclipse-RegisterBuddy: org.talend.testutils
|
||||
|
||||
@@ -12,7 +12,9 @@ bin.includes = META-INF/,\
|
||||
lib/,\
|
||||
talend_metadata_columns_schema.xsd,\
|
||||
talend_targetschema_columns_schema.xsd,\
|
||||
dist/
|
||||
dist/,\
|
||||
lib/delight-rhino-sandbox-0.0.15.jar,\
|
||||
lib/rhino-1.7.13.jar
|
||||
src.includes = META-INF/,\
|
||||
mappingMetadataTypes.xml,\
|
||||
mappings/,\
|
||||
|
||||
@@ -1,280 +1,304 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="VARBINARY" default="true" />
|
||||
<dbType type="BINARY" />
|
||||
<dbType type="BIT" />
|
||||
<dbType type="BLOB" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
<dbType type="CHAR" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="DATABRICKS_DELTA_LAKE" id="databricks_delta_lake_id" label="Mapping Delta Lake" default="true">
|
||||
<dbTypes>
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="DOUBLE" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="INT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TINYINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="STRING" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="DECIMAL" ignoreLen="false" ignorePre="false"/>
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="STRUCT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MAP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="ARRAY" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOLEAN" default="true"/>
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true"/>
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="INT"/>
|
||||
<dbType type="SMALLINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_byte[]"/>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="STRING" default="true"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="TIMESTAMP" default="true"/>
|
||||
<dbType type="DATE"/>
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true"/>
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="STRUCT" default="true" />
|
||||
<dbType type="MAP" />
|
||||
<dbType type="ARRAY" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="STRING" default="true"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes><!-- Adviced mappings -->
|
||||
<dbType type="STRING">
|
||||
<talendType type="id_String" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN">
|
||||
<talendType type="id_Boolean" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
<talendType type="id_Float"/>
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true"/>
|
||||
<talendType type="id_Byte"/>
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="STRUCT">
|
||||
<talendType type="id_Object" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="MAP">
|
||||
<talendType type="id_Object" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="ARRAY">
|
||||
<talendType type="id_Object" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true"/>
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
</mapping>
|
||||
@@ -12,17 +12,26 @@
|
||||
<dbType type="BPCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTEA" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
|
||||
<dbType type="CHARACTER" defaultLength="50" ignorePre="true"/>
|
||||
<dbType type="CID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CIDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CIRCLE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT2" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT2VECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIT VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignorePre="true" />
|
||||
<dbType type="LINE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LSEG" ignoreLen="true" ignorePre="true" />
|
||||
@@ -30,6 +39,7 @@
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NAME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="OID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="OIDVECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="PATH" ignoreLen="true" ignorePre="true" />
|
||||
@@ -110,16 +120,19 @@
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOL" default="true" />
|
||||
<dbType type="BOOL" default="true" />
|
||||
<dbType type="BOOLEAN" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="BIT" default="true" />
|
||||
<dbType type="VARBIT" />
|
||||
<dbType type="VARBIT" />
|
||||
<dbType type="BIT VARYING" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="CHARACTER" />
|
||||
<dbType type="BPCHAR" />
|
||||
<dbType type="VARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
@@ -136,33 +149,47 @@
|
||||
<dbType type="RELTIME" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="NUMERIC" default="true" />
|
||||
<dbType type="NUMERIC" default="true" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="REAL" />
|
||||
<dbType type="FLOAT8"/>
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="REAL" />
|
||||
<dbType type="FLOAT8" default="true" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT8" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="REAL" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT2" />
|
||||
<dbType type="SMALLINT" />
|
||||
<dbType type="INT4" default="true" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="INTEGER" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="INT2" />
|
||||
<dbType type="INT4" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" default="true" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="_POINT" />
|
||||
@@ -209,18 +236,26 @@
|
||||
<dbType type="_ABSTIME" />
|
||||
<dbType type="_ACLITEM" />
|
||||
<dbType type="_INT8" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIT VARYING" />
|
||||
<dbType type="_VARBIT" />
|
||||
<dbType type="_BIT" />
|
||||
<dbType type="_BOOL" />
|
||||
<dbType type="BOOLEAN" />
|
||||
<dbType type="BOX" />
|
||||
<dbType type="_BOX" />
|
||||
<dbType type="_BYTEA" />
|
||||
<dbType type="_VARCHAR" />
|
||||
<dbType type="CHARACTER VARYING" />
|
||||
<dbType type="CHARACTER" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="REAL" />
|
||||
<dbType type="_BPCHAR" />
|
||||
<dbType type="_CID" />
|
||||
<dbType type="_CIDR" />
|
||||
<dbType type="_CIRCLE" />
|
||||
<dbType type="_DATE" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
<dbType type="_FLOAT8" />
|
||||
<dbType type="_INET" />
|
||||
<dbType type="INT2VECTOR" />
|
||||
@@ -236,6 +271,7 @@
|
||||
<dbType type="NAME" />
|
||||
<dbType type="_NAME" />
|
||||
<dbType type="_NUMERIC" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="_OID" />
|
||||
<dbType type="OIDVECTOR" />
|
||||
<dbType type="_OIDVECTOR" />
|
||||
@@ -247,26 +283,44 @@
|
||||
<dbType type="INT4" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="BPCHAR" />
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="CHARACTER VARYING" />
|
||||
<dbType type="TEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="INT2" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT4" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
</dbType>
|
||||
<dbType type="INTEGER" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHARACTER VARYING" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN" >
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SERIAL" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT8" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGSERIAL" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
@@ -274,14 +328,26 @@
|
||||
<dbType type="FLOAT4" >
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
</dbType>
|
||||
<dbType type="REAL" >
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT8" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE PRECISION" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NUMERIC">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOL" >
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
@@ -291,9 +357,15 @@
|
||||
</dbType>
|
||||
<dbType type="VARBIT" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
</dbType>
|
||||
<dbType type="BIT VARYING" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHARACTER" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BPCHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
@@ -190,9 +190,9 @@
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
@@ -282,8 +282,8 @@
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="SINGLESTORE" id="singlestore_id" label="Mapping SingleStore"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BOOL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOGRAPHY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOGRAPHYPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
<dbType type="JSON" ignoreLen="true" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOL" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="VARBINARY" default="true" />
|
||||
<dbType type="BINARY" />
|
||||
<dbType type="BIT" />
|
||||
<dbType type="BLOB" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOGRAPHY" />
|
||||
<dbType type="GEOGRAPHYPOINT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
<dbType type="CHAR" />
|
||||
<dbType type="JSON" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BOOL">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOGRAPHY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOGRAPHYPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="JSON">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -0,0 +1,238 @@
|
||||
{
|
||||
"mapping_AS400.xml": {
|
||||
"28fe6b6c94e4e486d431873ba556c1c18ae09140": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"3d4845af057220e02773029683a0fd99dee489e5": "a9861e98b581dfdafa7839238710bd930989960a",
|
||||
"458d597928478f43c94098dfe47d9bb8d07e89e2": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"76a4aa354d986ed5682797337817a8ddbb80ae89": "d568bf814d7b27fc7c63cbd07ea6b4a3b0ad3ff8"
|
||||
},
|
||||
"mapping_Access.xml": {
|
||||
"55d314ed9708263bfcec193abb57a1e25806626e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"718db25f8e86d6b61284a4ffdc1fd19faffb98a9": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_AmazonAurora.xml": {
|
||||
"a93c809bdf8e5df8095580e3f23b29658e044302": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"ba16c203a8a993e13ebab0da5cccb7a5e1c01e56": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_BigQuery.xml": {
|
||||
"db723e5b4a38bbc8316593be33ab9d74f57776e6": "e1770847f656589810753c19d420228326462f34",
|
||||
"e12df204d9f5081971d03c64b43de2456557e02e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e9c02d3e9bc3a3649fd33803353e61db6fcd2ea8": "01749151dcc171ebb6457ba872ee352d58a1dfd4"
|
||||
},
|
||||
"mapping_Cassandra.xml": {
|
||||
"20ed188f8824c14852304920cf82ca7119eb1be0": "ab7b23e6c94946ca2358cc0cfd82c4d77a4c5839",
|
||||
"692353c474569bafd44854b7f7343929beddee83": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e42bdadd0009e7595773edcc1652f181a8fdf151": "76ed27054255165c23d8c0c8db081a41a50430c9",
|
||||
"ff005c2bfc47789e5715e949f98bd6d72c934b54": "ebe76b0edd0eda3488527b95f2a6d925d091a408"
|
||||
},
|
||||
"mapping_Cassandra22_datastax.xml": {
|
||||
"2ddd561eac2a04a7b08949c0764c5e76f80c89f5": "b0378fb45ae238b884417db468872341e156f138",
|
||||
"33b483680a44a8229b09698df3803f5834987f18": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra40.xml": {
|
||||
"e92b373950021eb425db9e3eba8391f98ce7e4a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra_datastax.xml": {
|
||||
"3cb6b5cf167fb5ba82b3ebdc602f22ecdacdafb5": "56fad9370b27d03a9636d8368350274480fc2bce",
|
||||
"ca09b169eee6e6dcfa81f976bd98ef4aae81cdf2": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1620c54d6793c6d1885e3e2fcdf242c0e3a4059": "df28e2b92f57ba0486215f334edb649a58788712"
|
||||
},
|
||||
"mapping_Databricks_Delta_Lake.xml": {
|
||||
"d48793d7173ea7d07090f5e683045c3f60cc12c8": "21f5ac777158fc55288af7337737aa675e20bdf3",
|
||||
"dcbe4533fe16fee70f24702edddec78b81e26463": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Exasol.xml": {
|
||||
"21ff2b1a69b7242fa48a1218b0d5f8a6b0ba607e": "a0d36282ff5d6825b206ab6f794d13e048ac2192",
|
||||
"3768b1e7a941e66f8a70ad7e1a65aa7d2b598daa": "7ef9ede0f988f10489c1f5ffe16ea24d2d14ecdd",
|
||||
"6babf3080a3baa05bcd8a2815d2f31a0b15e1550": "02a98e53d3b6457272768ce0ae5c82992b403465",
|
||||
"7de8a81bc2eb7c4da639af148c2c67b5c6de4bc0": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"a728306274b817e8afa0101d3b7621398addc2f3": "b5b116b3758f58e7500058e1805bf93bf5a2f0c1",
|
||||
"dc2eba14e50ce7c413fb7696355e67d26fe5fb9b": "57bacf1f97951fcf6f650f1afdec35b5ea22638c",
|
||||
"f670268dfd5a8f80fbdbe6fe4ad668cb6c8f25d6": "ead0fb11f124cf05ad0f7fde21cdedbb3cf2160b"
|
||||
},
|
||||
"mapping_Firebird.xml": {
|
||||
"51a041d0b43678433f6303aebac5f92bfdb7b8a6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"d504ece6ca9e10e23f5e0f05660e5f49e7d999ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Greenplum.xml": {
|
||||
"16418522006e4505c7fb7d44c4d06928de20eaf8": "ec04f46618ef0586081fd3b17ad7b85239958194",
|
||||
"4f3e1b53baca729eef796979e97592c8724a2d91": "caf54e3d2b6c6d685cdcf2a243c28c408a9cd652",
|
||||
"525a7ca1a48599a840b1feca641ef6a413d7384b": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"c4ed635e67d7d82c24008677f313e17df98f5d08": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_H2.xml": {
|
||||
"4e3ed630d3133326a0cf4728865b3efa4cbecc63": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"84b0b863c0532f93bffc0ab54d98a449f331e319": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"cb093084dc1dc3f999707a1b9d1474f87bbf6d17": "341b1220b6bc6bf59eef81e97c694d06134bd8a2"
|
||||
},
|
||||
"mapping_HSQLDB.xml": {
|
||||
"0a37e2aec423d0c401aff092e4fda9e01c5dd4ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"73af8e3e8646ea58f4cfe60fe4905e90340b3e12": "890a391388725c112ffbbd2dd8b8d267305df4a7",
|
||||
"98819a80cd8994a02579ea1d9b0992a0b68a5403": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Hive.xml": {
|
||||
"0265c6f16ab2c9eea7da660e4e1c8a3ec7bc0ab3": "37ef13c438cda4cd1c3e091d99a00036b328e57f",
|
||||
"1f5811f41b2836cd7baeb23daef91d2ea313f2c6": "3646a1bcd980a3209501a5c846338823f55d74b2",
|
||||
"21a44cd9d32a5478a4de61a86b398a9ef80401ac": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"5444fa9a484704d774259430623e0db1495a867f": "ef872732cde37c6c7684dc773641be0b78f5c57c",
|
||||
"e7f128915578dd29538a7debeb5f47528b5a6e59": "86ba7c19d9300a02dbcb0801852e728acd261132"
|
||||
},
|
||||
"mapping_IBMDB2.xml": {
|
||||
"dc42cf143f3a0f10ad8c280f16ef44ae1f907123": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"f8aea23cc5b48ebb3cdd229be3f66b28890ff4f8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Impala.xml": {
|
||||
"55ed99aa28c989bd5777f41b7c87ed4eb9f245a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Informix.xml": {
|
||||
"40da9213cf85b1712f38474dea4f2ec3447dfe3c": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"938e41f3719c29248d4f58c303464bbfb50e343a": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Ingres.xml": {
|
||||
"811e8bf4e7bc2e6b9c3fcb5f074601a873f15e1d": "15afc1b074c8a6e4aee39c1d5a3347555dbe36a0",
|
||||
"95873faa81ee3de2eea02efab5c127e6188df796": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"9c5682f564e861e1db3b5184fd40e718e0912a4a": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Interbase.xml": {
|
||||
"4d37474d07991154aa0148e7a030c4725d45ef0d": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"71e8386c3e21f726550234c52d3ca50dcfa655de": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_JavaDB.xml": {
|
||||
"652fd7f2f11fc27903d333e1699cc419804caa66": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"66dbe13a0043798498f37b6e5495bc3aaa8fb90b": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_MSSQL.xml": {
|
||||
"305eeb294ae8bb07bee7d1e182e431e2e7f6273d": "d7761630e63b399f89eaaeb9e19e775bf1579dde",
|
||||
"b93c0825ffd799d89608239385d7e4b60de96209": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MaxDB.xml": {
|
||||
"586fc7ac94a9abec8a76a587dc6aa0fae0079bf3": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm.xml": {
|
||||
"e1c5e77e19adea1406e5bb511a1c6adb8b610bfe": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm_odata.xml": {
|
||||
"1166b9ce6ce163d11a57046db5ee2dc9d5e496df": "e86fd3fd5c3b4ba9ff613155fba014a80c40cf01",
|
||||
"3f25ced1039b99d1c07b23e3d27cac1562e52a6f": "c1190dfa35e839496745516dbcfeb8a309fa49d0",
|
||||
"750541f00f3c5da6007623f3514add6dc3417a5f": "54331fa4ec501557eb9c32d434c332cf3d121349",
|
||||
"9612a2611bd29461dd46fc70f0e2841892f3f096": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MsOdbc.xml": {
|
||||
"01561cb7b5630a4a6aed576215ccdb3991d2db52": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"a9c94a6255061e8100b15590da35196464b77d46": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Mysql.xml": {
|
||||
"128d7d66eb994a032128949fcbe0c953c158beaa": "956802047d6623ba61e2da68aba2db8f38bca48a",
|
||||
"522654fad6fa3d008ef386fc9360ae51df910729": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5dfc7b71e1f6a9fad6ebf47a1d748893c85bbe5e": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"894b0d1d2c23c98f2e14920013b82524334dd255": "74b3640e2923d4c60c92042ff03d15b4ac4e9341",
|
||||
"8cb3d2b06d8a2b12e8673e6e9519f85ec08b35ec": "f22d442cbde13623a1b96c15ea2df8dd1a7d755e",
|
||||
"a94341e5bd6c4ba0eef57f9d6d3cc6c0006c785b": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"d7e74c8e9f8a47ab258472ec43236d2933c70838": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"edc9d1453c8f9ac8548822ff2f90a4defcd02094": "fd4d974c755ced1969b27126844b3f462bca1a52"
|
||||
},
|
||||
"mapping_Netezza.xml": {
|
||||
"0c769aa277190990fb33a918cc57189b9ba6306f": "c8ca64da55ceb677fd97169f6a924ec80f01b2fc",
|
||||
"0f5e9677f936a5414ce6593229aa47ea5b757276": "3074a57eee1407a413e460ed27e31d48d21d609b",
|
||||
"b3e25e55f8281cb616b3f549e6a2e5a83d4ad62a": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Oracle.xml": {
|
||||
"0407cea7e87144cb601bc9a3f039121feca79b65": "cb6b87dabdc71be0f1db4bdca694bcb61b679c05",
|
||||
"064d2a5940379346638412dd7f4cb7dbcc30e672": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"26a2295f6401de6e17feb61b261f7fbdfc4d609d": "e7604a488f339028a3cf14ae4031b0fb3fd50bcc",
|
||||
"9b0306aacec772d9d82be49ab702254ce1e08bea": "912702dc8ea921a34ea0522235db65f8655bf8e9",
|
||||
"df2537b329d0b09828c281e62208daf379f7b60a": "544faa63bbe63dd070a94c84139c705ac6432314"
|
||||
},
|
||||
"mapping_ParAccel.xml": {
|
||||
"1ba71027d3a60773c7c008143c2146e4db2ef112": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5085a1e922f77895a2f7c85e2347acfe03034493": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Postgres.xml": {
|
||||
"ce8b7f58644b8f7814a5522d172b4192ff89bd4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1c1f04f95222bcadda336d6a4f0ea07c6ebb08e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_PostgresPlus.xml": {
|
||||
"69b7d7f722538a322fb0bf867177d1ce5a0d7ad6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f576a7bb0327eeff1fd63a9a09106ae33f3ec90e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Redshift.xml": {
|
||||
"0cc6e153fe35041a009cb222e0276e35ddbc92f1": "2023289b9965fc14b959463ba5050be6aead361a",
|
||||
"3b941be88a5f13bd8fd905fb1fa5f2a241e89ed9": "915a307b629c7a75bcbedc86267db1e8995b77f3",
|
||||
"85ba89fdadfca4a2d755856a75e904f6015926a9": "de08533f6561319fc2914181a2705ccd75e29c40",
|
||||
"8f3eda24c1f413b17b2b8c48695dbd786fa29b6b": "93112768d7eea6df44d92a3efbd4f1dfa20e06b6",
|
||||
"ab86d7fda94e0b368f739f73994ce2a2147be12d": "0fd3f58b7aa78aaae6fb40d042780bec64da75e6",
|
||||
"ad0eecc7e9f25c3b904cc11b062a8185456478ee": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Redshift_new.xml": {
|
||||
"43085952e178e2c570ab7d2a262278dd2896dd96": "699efe42a33aab3ca0bbaa7a1abee23368e61606"
|
||||
},
|
||||
"mapping_SAPHana.xml": {
|
||||
"1a07a8174468a5a1d55378dd0e21d7c1f9e531bc": "48ea42be6b348a3c993760e7f2c94c58ac08fdae",
|
||||
"331ae8a035e6b1f2cd722be6411df4ae4a95bb33": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_SQLite.xml": {
|
||||
"0a97b6e8acf8bd16aa34a3c01707f1e2a9eeff1f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"b7b7b7c690efacc208316c911571a8513b5ea713": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_SingleStore.xml": {
|
||||
"9da7d92af5e9b0697436f74fffd190e8af061567": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Snowflake.xml": {
|
||||
"d459c6be3786f9358615eaf692a1c7920b4c6e74": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Sybase.xml": {
|
||||
"081038547cac8342cf5cadf8bfd02fe4d2929323": "1ff9877dce90e2ef39b267ea60de534796035a95",
|
||||
"09a0f4dc71ff9a844e1162600409317e92e1ff18": "28534ffb4ae599adec53853776856e82c23c815a",
|
||||
"4ee2c12f372953e77404481a962b3aca14abadb0": "f02b1b6902098b2da90cde6b22a9a49ec328970a",
|
||||
"5752dcfa409e903af77587f151d580c68c9e4ac7": "3db0fa1fbed8ae378d52aa8c36b6fed55d184e5b",
|
||||
"6f4e7913b4b31e8fb4e097690c8b903a58842283": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"7676e2d94473564322ce37cad92b7f8b09751b1b": "1cc6237de63892e097c77637ac8457cf8fefbf6f",
|
||||
"8bbad7895713f3a399ddb195c40353e18d3e83b9": "984ca27e4ee0177793b2111797700390424cb746",
|
||||
"bbc091c50a7bd8a8fe630d99a9c2e3f2f878ac88": "67a9b521c9d698b3411fb49410ac61a15f4bc7db",
|
||||
"d841719dcf79a12d0189301e40c0e9e973a45c4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e103a9671d9bcf360fd2e61ee97f4547d0d52241": "e19031add3dc54bf9d0e731f3a05738af48ebb6d",
|
||||
"e1c42d74cc0dc3681b5bd45a901a3bedeb53ec68": "75df15acaa5c8d1dcd4a8e855e0df969fdea25d5",
|
||||
"e30d1f01e88bdaf926855e00d1aef3a37a7eb6e4": "c91dd79086a42dce5417de77bb7ce61c0bd6cbbf",
|
||||
"ee5d7f5f9510f63c340f87862327b869bf4cb743": "607764748cdbff669d2ccfcbaafdaa0d83598f32"
|
||||
},
|
||||
"mapping_Teradata.xml": {
|
||||
"10ed107c1d66b38d51739ffdd0820db676c42cef": "45dbf10541f6dd32283038bcc5b04b10e305770a",
|
||||
"55e6a511c2cb39aca11de302a3850eb2d1f6e3a5": "fc652f1cc70f6caa05d5c65e57115f86653f7841",
|
||||
"ac9ffae887ab4d20d4eca0eddc83163e99507ec8": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f9b0367424f721cd8029d3540c9a82f39d74a6b4": "c002b50a69b8a0193780e7c0d1788bbd9a5145c3"
|
||||
},
|
||||
"mapping_VectorWise.xml": {
|
||||
"06f86121a9492b3104047691b19718a5d9d49be9": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb",
|
||||
"edf255202bcfad77ff6f3fac11714891934225c4": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Vertica.xml": {
|
||||
"28153eaab1c47b8718ca3c49553ec40b047d2878": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"2ee78d7679d4201ad29adba4cc0a48084f161e25": "eecc481d671d330bfb46406ab2533830c668bf22",
|
||||
"819be4680c04a7f77c51fc65ebd1d964a714aa78": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9218d5e7b682513ddf1b891f5f0467ab9938fec3": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"d9745a57d9f1b6c638ebd57cd5281be020e0614c": "e8f788c5c260f9b82eaaa88d0402423d86a5680d",
|
||||
"dec55a19094d1bcc20f12a8888b27460e83c2e67": "3b582b21fc5ac7ccfb05321c7923591433ced716"
|
||||
},
|
||||
"mapping_XSD.xml": {
|
||||
"1ef837521e274c5b93f5f228955204285b3dd28a": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9c454252343dfe1400d356cbf41bf88e842b4e1e": "c615b3a622e2f6ba8577e812e71977d9f1b1930d"
|
||||
},
|
||||
"mapping_dynamodb.xml": {
|
||||
"891099e88d8074570dc029f9b7d8b04bbc241383": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_ebcdic.xml": {
|
||||
"b47b25edc9e40d312b548270dbb3f978475be4e7": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_sap.xml": {
|
||||
"0339bc60ae47e3796c343eee7e2fb1cb1869cefa": "ee49a27e5c3ba3217ab497b1cd4467c088e59f5e",
|
||||
"1f41a55f6f7f1d6d2118e766daf7e3dbfd77551d": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"64c23be0c363ab703528677c999e4ef707d54497": "27908d5685066221f02cd3890a5319838215eb8b",
|
||||
"83688cf3134e60d9f5a08b316643a41246717e92": "740c431e0b623cc7d41166588961028ad3efab80",
|
||||
"9df72b6a1f1a72d9be1a4a7fd428873ad9b75bff": "94804b5e96a71d63a294eb9bcfbbb5290824009f",
|
||||
"a300fcd290aa65c254c44d683d30a9fa6ae14a2f": "45e5d88e9c49cb87b47413468073c571f60c0117",
|
||||
"b74c01dff88a52afca5f8c84fbe41d71a34eb6b5": "32832fe0edfbd10d50ed85528481e5c9ca2ec8e0",
|
||||
"c814f616005e1637ec107dd8c0f269bd69661d2e": "7d07608dceb06f7364b5bb8babc0f6e921fc443a"
|
||||
},
|
||||
"mapping_sas.xml": {
|
||||
"4aeb0deb41f61dbe69e85e780fb1e985c9f3d758": "fd44bfb0ee3fc8288465507b937c53619f43c0ec"
|
||||
}
|
||||
}
|
||||
@@ -9,19 +9,61 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.javadelight/delight-rhino-sandbox -->
|
||||
<dependency>
|
||||
<groupId>org.javadelight</groupId>
|
||||
<artifactId>delight-rhino-sandbox</artifactId>
|
||||
<version>0.0.15</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.mozilla/rhino -->
|
||||
<dependency>
|
||||
<groupId>org.mozilla</groupId>
|
||||
<artifactId>rhino</artifactId>
|
||||
<version>1.7.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-deploy</id>
|
||||
<phase>deploy</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.javadelight</groupId>
|
||||
<artifactId>delight-rhino-sandbox</artifactId>
|
||||
<version>0.0.15</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.mozilla</groupId>
|
||||
<artifactId>rhino</artifactId>
|
||||
<version>1.7.13</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-deploy</id>
|
||||
<phase>deploy</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -89,6 +89,10 @@ public final class JavaUtils {
|
||||
/** Java Routines Directory. */
|
||||
public static final String JAVA_ROUTINES_DIRECTORY = "routines"; //$NON-NLS-1$
|
||||
|
||||
// TODO check refrerences of JAVA_ROUTINES_DIRECTORY
|
||||
/** Java Routines Jar Directory. */
|
||||
public static final String JAVA_ROUTINESJAR_DIRECTORY = "routinesjar"; //$NON-NLS-1$
|
||||
|
||||
/** Java Pig Directory. */
|
||||
public static final String JAVA_PIG_DIRECTORY = "pig"; //$NON-NLS-1$
|
||||
|
||||
@@ -98,6 +102,9 @@ public final class JavaUtils {
|
||||
/** Java Beans Directory. */
|
||||
public static final String JAVA_BEANS_DIRECTORY = "beans"; //$NON-NLS-1$
|
||||
|
||||
/** Java Beans Jar Directory. */
|
||||
public static final String JAVA_BEANSJAR_DIRECTORY = "beansjar"; //$NON-NLS-1$
|
||||
|
||||
/** Java SQLTemplate Directory. */
|
||||
public static final String JAVA_SQLPATTERNS_DIRECTORY = "sqltemplates"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
@@ -50,11 +51,16 @@ import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
@@ -1173,4 +1179,33 @@ public class FilesUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void executeFolderAction(IProgressMonitor monitor, IResource parentFolder, IWorkspaceRunnable run)
|
||||
throws CoreException {
|
||||
if (Job.getJobManager().currentRule() == null) {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
ISchedulingRule defaultRule = workspace.getRuleFactory().modifyRule(parentFolder);
|
||||
ISchedulingRule noBlockRule = new ISchedulingRule() {
|
||||
|
||||
@Override
|
||||
public boolean isConflicting(ISchedulingRule rule) {
|
||||
return this.contains(rule);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(ISchedulingRule rule) {
|
||||
if (this.equals(rule)) {
|
||||
return true;
|
||||
}
|
||||
if (defaultRule.contains(rule)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
workspace.run(run, noBlockRule, IWorkspace.AVOID_UPDATE, monitor);
|
||||
} else {
|
||||
run.run(monitor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ public interface ICoreService extends IService {
|
||||
|
||||
public String validateValueForDBType(String columnName);
|
||||
|
||||
@Deprecated
|
||||
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
|
||||
|
||||
public IPreferenceStore getPreferenceStore();
|
||||
@@ -124,6 +125,14 @@ public interface ICoreService extends IService {
|
||||
|
||||
public IMetadataTable convert(MetadataTable originalTable);
|
||||
|
||||
@Deprecated
|
||||
public void syncMappingsFileFromSystemToProject();
|
||||
|
||||
public static ICoreService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,4 +94,6 @@ public interface IESBService extends IService {
|
||||
* @return
|
||||
*/
|
||||
public IProcessor createOSGIJavaProcessor(IProcess process, Property property, boolean filenameFromLabel);
|
||||
|
||||
public boolean isSOAPServiceProvider(Item item);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,13 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.RetrieveResult;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
@@ -77,6 +79,8 @@ public interface ILibraryManagerService extends IService {
|
||||
public void saveMavenIndex(Map<String, String> libsToMavenUri, IProgressMonitor... monitorWrap);
|
||||
|
||||
public void createModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
public Map<String,String> buildModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "retrieve".
|
||||
@@ -107,6 +111,8 @@ public interface ILibraryManagerService extends IService {
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
RetrieveResult retrieveModules(ERepositoryObjectType codeType, Set<ModuleNeeded> modulesNeeded, String pathToStore,
|
||||
boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
/**
|
||||
*
|
||||
* Resolve the jar from custom nexus
|
||||
@@ -149,19 +155,14 @@ public interface ILibraryManagerService extends IService {
|
||||
public boolean contains(String jarName);
|
||||
|
||||
public void clearCache();
|
||||
|
||||
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean checkJarInstalledFromPlatform(String uriPath);
|
||||
|
||||
/**
|
||||
* deploy jars from lib/java to local maven if any jar already exist in maven and need update , for jars that not
|
||||
* exist in maven won't be deploy by this funciton , those jars should be deploy when it is needed Comment method
|
||||
* "synToLocalMaven".
|
||||
*/
|
||||
public void synToLocalMaven();
|
||||
|
||||
public String getMavenUriFromIndex(String jarName);
|
||||
|
||||
public void setCustomMavenURI(String orignalURI, String customURI);
|
||||
|
||||
@@ -126,6 +126,8 @@ public class PluginChecker {
|
||||
|
||||
public static final String BDEE_PLUGIN_ID = "org.talend.designer.bigdata"; //$NON-NLS-1$
|
||||
|
||||
public static final String BD_ROUTINE_PLUGIN_ID = "org.talend.designer.routines.bigdata"; //$NON-NLS-1$
|
||||
|
||||
public static final String DOCKER_PLUGIN_ID = "org.talend.designer.docker"; //$NON-NLS-1$
|
||||
|
||||
public static final String HELP_DI_EE_PLUGIN_ID = "org.talend.help.dataprep"; //$NON-NLS-1$
|
||||
@@ -136,6 +138,10 @@ public class PluginChecker {
|
||||
|
||||
public static final String HELP_PLUGIN_ID = "org.talend.help"; //$NON-NLS-1$
|
||||
|
||||
public static final String APACHE_CXF_PLUGIN_ID = "org.talend.libraries.apache.cxf"; //$NON-NLS-1$
|
||||
|
||||
public static final String SWTBOT_PLUGIN_ID = "org.eclipse.swtbot.eclipse.core"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Check if specific plug-in is loaded.
|
||||
*
|
||||
@@ -364,6 +370,14 @@ public class PluginChecker {
|
||||
return isPluginLoaded(ESBSE_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isBigdataRoutineLoaded() {
|
||||
return isPluginLoaded(BD_ROUTINE_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isSWTBotLoaded() {
|
||||
return isPluginLoaded(SWTBOT_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static String getBundlePath(String bundleName) {
|
||||
String bundlePath = ""; //$NON-NLS-1$
|
||||
Bundle refBundle = Platform.getBundle(bundleName);
|
||||
|
||||
@@ -67,8 +67,8 @@ public enum EDatabase4DriverClassName {
|
||||
// if change the order, it might break the audit for PSQL.
|
||||
PSQL(EDatabaseTypeName.PSQL, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
PLUSPSQL(EDatabaseTypeName.PLUSPSQL, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
GREENPLUM(EDatabaseTypeName.GREENPLUM, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
|
||||
GREENPLUM(EDatabaseTypeName.GREENPLUM, "com.pivotal.jdbc.GreenplumDriver"), //$NON-NLS-1$
|
||||
GREENPLUM_PSQL(EDatabaseTypeName.GREENPLUM, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
SAS(EDatabaseTypeName.SAS, "com.sas.rio.MVADriver"), //$NON-NLS-1$
|
||||
SAPHana(EDatabaseTypeName.SAPHana, "com.sap.db.jdbc.Driver"), //$NON-NLS-1$
|
||||
SQLITE(EDatabaseTypeName.SQLITE, "org.sqlite.JDBC"), //$NON-NLS-1$
|
||||
|
||||
@@ -114,7 +114,10 @@ public enum EDatabaseTypeName {
|
||||
"ParAccel", "ParAccel", Boolean.TRUE, "PARACCEL", "PARACCEL", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
NETEZZA(
|
||||
"Netezza", "Netezza", Boolean.FALSE, "NETEZZA", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SAS("SAS", "SAS", Boolean.TRUE, "SAS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
SAS("SAS", "SAS (Deprecated)", Boolean.TRUE, "SAS", EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// General JDBC not support schema defalut
|
||||
GENERAL_JDBC(
|
||||
"General JDBC", "General JDBC", Boolean.FALSE, "JDBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -146,7 +149,9 @@ public enum EDatabaseTypeName {
|
||||
"HBase", "HBase", Boolean.FALSE, "HBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
MAPRDB(
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"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);
|
||||
|
||||
// displayName is used in Java code.
|
||||
private String displayName;
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.database;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
|
||||
|
||||
/**
|
||||
* DOC hzhao class global comment. Detailled comment
|
||||
*/
|
||||
public enum EImpalaDriver {
|
||||
|
||||
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver", "doSupportHive2"),
|
||||
IMPALA("IMPALA", "IMPALA", "com.cloudera.impala.jdbc.Driver", "doSupportImpalaConnector");
|
||||
|
||||
EImpalaDriver(String displayName, String name, String driver, String supportDriverMethodName) {
|
||||
this.displayName = displayName;
|
||||
this.name = name;
|
||||
this.driver = driver;
|
||||
this.supportDriverMethodName = supportDriverMethodName;
|
||||
}
|
||||
|
||||
private String displayName;
|
||||
|
||||
private String name;
|
||||
|
||||
private String driver;
|
||||
|
||||
private String supportDriverMethodName;
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
|
||||
public String getSupportDriverMethodName() {
|
||||
return supportDriverMethodName;
|
||||
}
|
||||
|
||||
public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) {
|
||||
return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName);
|
||||
}
|
||||
|
||||
public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) {
|
||||
List<String> list = new ArrayList<>(0);
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (isSupport(distribution, version, byDisplay, driver.getSupportDriverMethodName())) {
|
||||
list.add(driver.getDisplayName());
|
||||
}
|
||||
}
|
||||
return list.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByDisplay(String display) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getDisplayName().equals(display)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByName(String name) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getName().equals(name)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -163,6 +163,18 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION = "CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID = "CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_REGION = "CONN_PARA_KEY_HIVE_GOOGLE_REGION";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET = "CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The key is for metastore server.
|
||||
*/
|
||||
@@ -202,6 +214,36 @@ public class ConnParameterKeys {
|
||||
|
||||
/******************************************/
|
||||
|
||||
/*********** Azure Synapse keys ***************/
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_HOST = "CONN_PARA_KEY_SYNAPSE_HOST"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN = "CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_SPARK_POOLS = "CONN_PARA_KEY_SYNAPSE_SPARK_POOLS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME = "CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_CONTAINER = "CONN_PARA_KEY_SYNAPSE_FS_CONTAINER"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_MEMORY = "CONN_PARA_KEY_DRIVER_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_CORES = "CONN_PARA_KEY_DRIVER_CORES"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
|
||||
|
||||
/******************************************/
|
||||
|
||||
/**
|
||||
* HBase keys.
|
||||
*/
|
||||
@@ -267,6 +309,8 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String IMPALA_AUTHENTICATION_PRINCIPLA = "IMPALA_AUTHENTICATION_PRINCIPLA";//$NON-NLS-1$
|
||||
|
||||
public static final String IMPALA_DRIVER = "IMPALA_DRIVER";
|
||||
|
||||
/**
|
||||
* Google Dataproc keys.
|
||||
*/
|
||||
@@ -307,6 +351,8 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
@@ -320,5 +366,20 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_SET_HADOOP_CONF = "CONN_PARA_KEY_SET_HADOOP_CONF";
|
||||
|
||||
public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR";
|
||||
|
||||
/**Knox*/
|
||||
public static final String CONN_PARA_KEY_SPARK_MODE="CONN_PARA_KEY_SPARK_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_KNOX="CONN_PARA_KEY_USE_KNOX";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_URL="CONN_PARA_KEY_KNOX_URL";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_USER = "CONN_PARA_KEY_KNOX_USER";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_PASSWORD="CONN_PARA_KEY_KNOX_PASSWORD";
|
||||
|
||||
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";
|
||||
|
||||
}
|
||||
|
||||
@@ -114,6 +114,13 @@ public class DatabaseConnStrUtil {
|
||||
&& EDatabaseVersion4Drivers.SYBASEIQ_16_SA.getVersionValue().equals(dbVersion)) {
|
||||
connStr = EDatabaseConnTemplate.SYBASEASE_16_SA;
|
||||
}
|
||||
if (EDatabaseTypeName.GREENPLUM.getDisplayName().equals(dbType)) {
|
||||
if (EDatabaseVersion4Drivers.GREENPLUM.getVersionValue().equals(dbVersion)) {
|
||||
connStr = EDatabaseConnTemplate.GREENPLUM;
|
||||
}else if(EDatabaseVersion4Drivers.GREENPLUM_PSQL.getVersionValue().equals(dbVersion)) {
|
||||
connStr = EDatabaseConnTemplate.GREENPLUM_PSQL;
|
||||
}
|
||||
}
|
||||
EDatabaseVersion4Drivers version = EDatabaseVersion4Drivers.indexOfByVersion(dbVersion);
|
||||
if (connStr != null) {
|
||||
String s = connStr.getUrlTemplate(version);
|
||||
@@ -221,9 +228,12 @@ public class DatabaseConnStrUtil {
|
||||
.get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA));
|
||||
}
|
||||
String url = null;
|
||||
if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)) {
|
||||
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal);
|
||||
String driver = dbConn.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
|
||||
if (template.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE)
|
||||
|| template.startsWith(DbConnStrForHive.URL_IMPALA_TEMPLATE)) {
|
||||
url = getImpalaURLString(false, server, port, sidOrDatabase, impalaPrincipal, driver);
|
||||
}
|
||||
url = attachAdditionalHiveParameters(url, dbConn, false);
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -290,13 +300,20 @@ public class DatabaseConnStrUtil {
|
||||
if (!url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url + ";"; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "ssl=true;"; //$NON-NLS-1$
|
||||
|
||||
boolean isHiveDriver = url.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE);
|
||||
|
||||
url = url + ( isHiveDriver ? "ssl=true;" : "SSL=1;" ); //$NON-NLS-1$
|
||||
|
||||
String trustStorePath = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PATH);
|
||||
|
||||
if (trustStorePath != null) {
|
||||
url = url + "sslTrustStore=" + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
url = url + ( isHiveDriver ? "sslTrustStore=" : "SSLTrustStore=" ) + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
String trustStorePassword = null;
|
||||
trustStorePassword = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PASSWORD);
|
||||
|
||||
if (trustStorePassword != null) {
|
||||
if (encryptPassword) {
|
||||
trustStorePassword = "encrypted"; //$NON-NLS-1$
|
||||
@@ -308,7 +325,7 @@ public class DatabaseConnStrUtil {
|
||||
if (trustStorePassword == null) {
|
||||
trustStorePassword = ""; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "trustStorePassword=" + trustStorePassword; //$NON-NLS-1$
|
||||
url = url + ( isHiveDriver ? "trustStorePassword=" : "SSLTrustStorePwd=" ) + trustStorePassword; //$NON-NLS-1$
|
||||
}
|
||||
if (url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url.substring(0, url.length() - 1);
|
||||
@@ -368,10 +385,15 @@ public class DatabaseConnStrUtil {
|
||||
return s;
|
||||
}
|
||||
|
||||
private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal) {
|
||||
String s = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null);
|
||||
String standardURlString = getImpalaURlString(s, supportContext, server, port, sid);
|
||||
String principalSuffix = "principal="; //$NON-NLS-1$
|
||||
private static String getImpalaURLString(boolean supportContext, String server, String port, String sid, String Principal,
|
||||
String driver) {
|
||||
String template = EDatabaseConnTemplate.IMPALA.getUrlTemplate(null);
|
||||
if (EDatabaseTypeName.IMPALA.getDbType().equals(driver)) {
|
||||
template = EDatabaseConnTemplate.IMPALA_IMPALA_DRIVER.getUrlTemplate(null);
|
||||
}
|
||||
String standardURlString = getImpalaURlString(template, supportContext, server, port, sid);
|
||||
|
||||
String principalSuffix = "IMPALA".equals(driver) ? "AuthMech=1" : "principal="; //$NON-NLS-1$
|
||||
boolean hasPrinc = false;
|
||||
String[] urlArray = standardURlString.split(SEMICOLON);
|
||||
if (urlArray[urlArray.length - 1].startsWith(principalSuffix)) {
|
||||
@@ -383,7 +405,21 @@ public class DatabaseConnStrUtil {
|
||||
}
|
||||
} else {
|
||||
if (Principal != null) {
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
|
||||
if("IMPALA".equals(driver)) {
|
||||
String krbServiceName = (Principal.split("/")[0]);
|
||||
String krbHostFQDN = (Principal.split("/")[1].split("@")[0]);
|
||||
String krbRealm = (Principal.split("/")[1].split("@")[1]);
|
||||
String urlKerberosParameter = ";KrbServiceName=" + krbServiceName
|
||||
+ ";KrbHostFQDN=" + krbHostFQDN
|
||||
+ ";KrbRealm=" + krbRealm;
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(urlKerberosParameter);
|
||||
|
||||
} else {
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ public class DbConnStrForHive extends DbConnStr {
|
||||
|
||||
public static final String URL_HIVE_2_TEMPLATE = "jdbc:hive2://";//$NON-NLS-1$
|
||||
|
||||
public static final String URL_IMPALA_TEMPLATE = "jdbc:impala://";//$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC Marvin DbConnStrForHive constructor comment.
|
||||
*
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.runtime.services.IGenericDBService;
|
||||
import org.talend.core.runtime.services.IGenericWizardService;
|
||||
|
||||
/**
|
||||
* cli class global comment. Detailled comment
|
||||
@@ -32,7 +33,7 @@ public enum EDatabaseConnTemplate {
|
||||
MYSQL(new DbConnStr(EDatabaseTypeName.MYSQL, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"3306", //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true")), //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true&enabledTLSProtocols=TLSv1.2,TLSv1.1,TLSv1")), //$NON-NLS-1$
|
||||
|
||||
AMAZON_AURORA(new DbConnStr(EDatabaseTypeName.AMAZON_AURORA, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
@@ -53,6 +54,11 @@ public enum EDatabaseConnTemplate {
|
||||
"5432")), //$NON-NLS-1$
|
||||
|
||||
GREENPLUM(new DbConnStr(EDatabaseTypeName.GREENPLUM, //
|
||||
"jdbc:pivotal:greenplum://<host>:<port>;;DatabaseName=<sid>;<property>", //$NON-NLS-1$
|
||||
"5432")), //$NON-NLS-1$
|
||||
|
||||
|
||||
GREENPLUM_PSQL(new DbConnStr(EDatabaseTypeName.GREENPLUM, //
|
||||
"jdbc:postgresql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"5432")), //$NON-NLS-1$
|
||||
|
||||
@@ -208,6 +214,9 @@ public enum EDatabaseConnTemplate {
|
||||
IMPALA(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:hive2://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$
|
||||
"21050", null, null, "localhost", "default")), //$NON-NLS-1$
|
||||
|
||||
IMPALA_IMPALA_DRIVER(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:impala://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$
|
||||
"21050", null, null, "localhost", "default")), //$NON-NLS-1$
|
||||
|
||||
HBASE(new DbConnStr(EDatabaseTypeName.HBASE, "127.0.0.1", //$NON-NLS-1$
|
||||
"2181")), //$NON-NLS-1$
|
||||
|
||||
@@ -326,6 +335,16 @@ public enum EDatabaseConnTemplate {
|
||||
databaseType.add(typeName);
|
||||
}
|
||||
}
|
||||
// add additional jdbc (actually JDBC RepositoryObjectType)
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
|
||||
IGenericWizardService service = GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
|
||||
if (service != null) {
|
||||
List<String> allAdditionalJDBCTypes = service.getAllAdditionalJDBCTypes();
|
||||
if (!allAdditionalJDBCTypes.isEmpty()) {
|
||||
databaseType.addAll(allAdditionalJDBCTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sort) {
|
||||
String[] sortedArray = databaseType.toArray(new String[0]);
|
||||
Arrays.sort(sortedArray, new Comparator<String>() {
|
||||
|
||||
@@ -25,8 +25,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.69.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
|
||||
@@ -58,7 +58,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.3.160.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
@@ -71,20 +71,25 @@ 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", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.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", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"SAS 9.2", "SAS_9.2", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19jar" })),
|
||||
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$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.30-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.49.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-2.5.3.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// add for 9594
|
||||
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_2012(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"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", "mssql-jdbc.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.9.jar", "oauth2-oidc-sdk-9.7.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
|
||||
"accessors-smart-2.4.7.jar", "asm-9.1.jar", "content-type-2.1.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -99,15 +104,15 @@ public enum EDatabaseVersion4Drivers {
|
||||
VERTICA_3(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 3 (Deprecated)", "VERTICA_3", "vertica_3.0_jdk_5.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
// for bug 0017930
|
||||
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM, "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.9.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -164,13 +169,15 @@ public enum EDatabaseVersion4Drivers {
|
||||
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$
|
||||
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.37.1061.jar", "aws-java-sdk-1.11.729.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.10.1.jar", "jackson-annotations-2.10.1.jar", "httpcore-4.4.11.jar", "httpclient-4.5.9.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", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-core-2.13.4.jar", //$NON-NLS-1$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.11.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"httpclient-4.5.9.jar", //$NON-NLS-1$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
|
||||
|
||||
private DbVersion4Drivers dbVersionBean;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user