Compare commits
320 Commits
release/8.
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87fc7471dd | ||
|
|
abdbe7a669 | ||
|
|
345cf6c44b | ||
|
|
9f9a381bd7 | ||
|
|
f2599689ed | ||
|
|
3b647c2316 | ||
|
|
4ff0184a49 | ||
|
|
0e37b9632e | ||
|
|
f2a4328037 | ||
|
|
771a1bf810 | ||
|
|
3f7d1a83d9 | ||
|
|
c20078c3d1 | ||
|
|
d13ae7e637 | ||
|
|
6b094dd4fd | ||
|
|
1ebdb18d27 | ||
|
|
98930c8c96 | ||
|
|
a7ab220672 | ||
|
|
553b2770c9 | ||
|
|
dd851d3202 | ||
|
|
f47f991977 | ||
|
|
a2e44cb5c2 | ||
|
|
e36f0690f0 | ||
|
|
9c4a9c1589 | ||
|
|
da4ba3f1a0 | ||
|
|
087dac391d | ||
|
|
ab843f7a55 | ||
|
|
5949ce647d | ||
|
|
f9e7be104e | ||
|
|
774e6dea26 | ||
|
|
3eccad0352 | ||
|
|
ada4bcf7e3 | ||
|
|
7c72d190de | ||
|
|
025cec4828 | ||
|
|
91df21afcd | ||
|
|
a3af2de13a | ||
|
|
5c6fd374f1 | ||
|
|
c11aa42cee | ||
|
|
5506094ec3 | ||
|
|
a0a7b7cc52 | ||
|
|
0a7eb0653f | ||
|
|
baabcf9167 | ||
|
|
d24160aaf7 | ||
|
|
ff42b63947 | ||
|
|
bc536f772e | ||
|
|
6e88e334a3 | ||
|
|
5b86f87d99 | ||
|
|
11ff6ac63d | ||
|
|
a4679a906a | ||
|
|
a4a0bc0649 | ||
|
|
0709202ae3 | ||
|
|
899c5a03f6 | ||
|
|
5e1bca282f | ||
|
|
61a8ed2b73 | ||
|
|
ab88eda019 | ||
|
|
c4942af4b0 | ||
|
|
80ccccb407 | ||
|
|
4063e6888b | ||
|
|
54d1a85c1f | ||
|
|
a2c23dd110 | ||
|
|
9e56acd4e5 | ||
|
|
a9f5e42f6d | ||
|
|
e4250d1120 | ||
|
|
7225c51654 | ||
|
|
11bf826613 | ||
|
|
2039df6058 | ||
|
|
59147d2bf3 | ||
|
|
a272ce7fe3 | ||
|
|
d32d4c1c2c | ||
|
|
51ca13e2ee | ||
|
|
3d697f472c | ||
|
|
0dcd60f44b | ||
|
|
8f59c857d8 | ||
|
|
442631c61b | ||
|
|
31303fa608 | ||
|
|
fea26cbefa | ||
|
|
21254ffaca | ||
|
|
caa4b51cc4 | ||
|
|
b2fdccc3e7 | ||
|
|
da208c72f6 | ||
|
|
bd6a271805 | ||
|
|
cd5af34395 | ||
|
|
ba71689fac | ||
|
|
f6a123ad2b | ||
|
|
14d9caec2e | ||
|
|
96f177cb95 | ||
|
|
4a34141e6f | ||
|
|
9bf06c26bb | ||
|
|
51010064c7 | ||
|
|
d0a5c76459 | ||
|
|
4b308e1d34 | ||
|
|
b39332b706 | ||
|
|
556ab359d9 | ||
|
|
55f8537c15 | ||
|
|
98f0a248dc | ||
|
|
360c36b6bb | ||
|
|
c5e48b7e97 | ||
|
|
8b3040a4f6 | ||
|
|
fac09dcc63 | ||
|
|
f97757fa8e | ||
|
|
3a557a7658 | ||
|
|
00a777d477 | ||
|
|
eb661b81c5 | ||
|
|
557afc2b02 | ||
|
|
965a4d5a3b | ||
|
|
bde2e73cfa | ||
|
|
421dde4b8e | ||
|
|
037502c43c | ||
|
|
12345b5216 | ||
|
|
850a8cbdf6 | ||
|
|
fe6ed85b34 | ||
|
|
46a2aac8c1 | ||
|
|
424266a771 | ||
|
|
d2751b3e59 | ||
|
|
90aeb07148 | ||
|
|
ef76386e26 | ||
|
|
a76d9081dc | ||
|
|
6d10555da1 | ||
|
|
6aec89ed62 | ||
|
|
4d5c0aba06 | ||
|
|
156a67b79a | ||
|
|
0de0c82b35 | ||
|
|
83d720a6df | ||
|
|
bba3a2a7ff | ||
|
|
33e9a9bf7c | ||
|
|
865d4317ea | ||
|
|
8949a8291a | ||
|
|
620a43e169 | ||
|
|
6143714a75 | ||
|
|
613ec4e1ae | ||
|
|
c2f33ca3c7 | ||
|
|
ee7e8a0a32 | ||
|
|
f28610deb2 | ||
|
|
77b762d835 | ||
|
|
c8ff7f0115 | ||
|
|
257085413d | ||
|
|
743861d278 | ||
|
|
a464909db1 | ||
|
|
33121074d8 | ||
|
|
3e3eca887d | ||
|
|
81991f3acf | ||
|
|
cc7f8e4183 | ||
|
|
718c7055c5 | ||
|
|
74b613a5e4 | ||
|
|
c1e0c419e3 | ||
|
|
4b5b9ad5c5 | ||
|
|
0b9dc184ec | ||
|
|
65fc3816e2 | ||
|
|
0ac2233c7f | ||
|
|
a5fce652e2 | ||
|
|
62c3cd96fc | ||
|
|
617d7a0971 | ||
|
|
8e71165264 | ||
|
|
cee928c438 | ||
|
|
30139714d4 | ||
|
|
d31a64654e | ||
|
|
22f590c376 | ||
|
|
aba7988f3b | ||
|
|
7e0ef66029 | ||
|
|
cc953fa42f | ||
|
|
6efda8ecae | ||
|
|
396f9ef099 | ||
|
|
d6acf0a5be | ||
|
|
50cdd7f3c6 | ||
|
|
508867dce3 | ||
|
|
7cf9823f64 | ||
|
|
80f3b27c0c | ||
|
|
d872ced133 | ||
|
|
2d9fffa6d4 | ||
|
|
bf8135943a | ||
|
|
83ec5c0d42 | ||
|
|
26a119649b | ||
|
|
be594bc22c | ||
|
|
f917599a0c | ||
|
|
90c5220f08 | ||
|
|
b963938b24 | ||
|
|
37af226974 | ||
|
|
3a7614ee6a | ||
|
|
efd27e4ec9 | ||
|
|
e12e687963 | ||
|
|
9c1122e971 | ||
|
|
b684d299f4 | ||
|
|
c6b22629fd | ||
|
|
355d94e5de | ||
|
|
6318fb8131 | ||
|
|
a490fe61ab | ||
|
|
2b6fe49b09 | ||
|
|
351bf44095 | ||
|
|
5bab4f7de2 | ||
|
|
9479f25100 | ||
|
|
fc7cae42bf | ||
|
|
c8dcf3e70e | ||
|
|
3b7f69525c | ||
|
|
996d2ee452 | ||
|
|
a695e44d7f | ||
|
|
f77aadd99f | ||
|
|
e1743f86d3 | ||
|
|
5ef866743b | ||
|
|
656987c139 | ||
|
|
e8902f55cc | ||
|
|
024bd7bf5c | ||
|
|
5e1d06edf6 | ||
|
|
73699ce3c1 | ||
|
|
b218688c82 | ||
|
|
5fb4b545f4 | ||
|
|
4d9fa8adee | ||
|
|
75c8efe0f0 | ||
|
|
cfc2a29f92 | ||
|
|
3c2ccf0f38 | ||
|
|
48905f03a9 | ||
|
|
c88e5002b3 | ||
|
|
af3ca0c30d | ||
|
|
dc687f1a50 | ||
|
|
14a610a72b | ||
|
|
153a831b0b | ||
|
|
2bcc470833 | ||
|
|
88d10b08ec | ||
|
|
5687315bd2 | ||
|
|
7cfce8de2a | ||
|
|
da7f173be2 | ||
|
|
f5a6347377 | ||
|
|
e7ba1d5016 | ||
|
|
ba1ee02e4e | ||
|
|
a5df51204e | ||
|
|
dfe132d87e | ||
|
|
4c0b9c6f91 | ||
|
|
16b6699cc9 | ||
|
|
3f57a592d1 | ||
|
|
74bc5ee66f | ||
|
|
6a0c96627f | ||
|
|
ecf339a6ca | ||
|
|
dc5c3d0ec9 | ||
|
|
503924aa75 | ||
|
|
4ed461840a | ||
|
|
cafa72f52a | ||
|
|
af62f01007 | ||
|
|
5e4b9311a9 | ||
|
|
a6164bf006 | ||
|
|
24622068ec | ||
|
|
ad085163f9 | ||
|
|
4ba9104034 | ||
|
|
216082efac | ||
|
|
d652f86bf2 | ||
|
|
c6620e03e6 | ||
|
|
d44180bf64 | ||
|
|
e754516075 | ||
|
|
e192a5a747 | ||
|
|
9e602c54ad | ||
|
|
0d098da3bc | ||
|
|
8843c51255 | ||
|
|
3207338fe6 | ||
|
|
aed39722eb | ||
|
|
6e0d5400bf | ||
|
|
afa700b229 | ||
|
|
bb48918802 | ||
|
|
54e08f8d10 | ||
|
|
ce221bc5b3 | ||
|
|
45ee6a61eb | ||
|
|
d03c572ed4 | ||
|
|
5cd44b8318 | ||
|
|
e4cff52913 | ||
|
|
21a9fcae19 | ||
|
|
4c2ed00331 | ||
|
|
b16c6c5d0e | ||
|
|
503077af62 | ||
|
|
155beefd6b | ||
|
|
a068fcdf66 | ||
|
|
81ec0e7368 | ||
|
|
f30930d483 | ||
|
|
c4abb4e764 | ||
|
|
c66b0b1101 | ||
|
|
287d7733bc | ||
|
|
5bcbdc1ca9 | ||
|
|
74f6189a58 | ||
|
|
dc66db4b77 | ||
|
|
52224ab37c | ||
|
|
a0423027d2 | ||
|
|
c0359b5b78 | ||
|
|
239b697b01 | ||
|
|
0142e33068 | ||
|
|
0451c982ab | ||
|
|
a221cab814 | ||
|
|
f649cdaa0d | ||
|
|
f6f1ff0c8e | ||
|
|
85e0d731ec | ||
|
|
8d0e77ffd7 | ||
|
|
d2ce5eb839 | ||
|
|
cac1899508 | ||
|
|
c3710b0199 | ||
|
|
48baa99ee7 | ||
|
|
a2a2fdc4c1 | ||
|
|
73375cda48 | ||
|
|
c49e6af190 | ||
|
|
a2c9fb3308 | ||
|
|
812a94119c | ||
|
|
f26a582453 | ||
|
|
7228acdfaf | ||
|
|
09c48442c1 | ||
|
|
af128c8734 | ||
|
|
a7bfec2ca6 | ||
|
|
063fff3ba9 | ||
|
|
8f899d61c5 | ||
|
|
ed91d67ccc | ||
|
|
0eae9a3add | ||
|
|
9d2f2d25ae | ||
|
|
9c6a4cfd9c | ||
|
|
5c9555669a | ||
|
|
4a9f849581 | ||
|
|
767fb94ff3 | ||
|
|
1543d95ed5 | ||
|
|
9401dfdfa2 | ||
|
|
8f794d57eb | ||
|
|
139ee4790a | ||
|
|
e8c59475c0 | ||
|
|
b30ceb1644 | ||
|
|
8339e97e6f | ||
|
|
dbc7b38790 | ||
|
|
a4c10d3e7f | ||
|
|
129274171f | ||
|
|
d2a1b44dc5 | ||
|
|
6976cb5f7c |
55
PATCH_RELEASE_NOTE.md
Normal file
55
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
version: 8.0.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/183
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-5573
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| Patch Name | Patch\_20231204\_TPS-5573\_v1-8.0.1 |
|
||||
| Release date | 2023-12-04 |
|
||||
| Target version | 20211109\_1610-8.0.1 |
|
||||
| Product affected | Talend Studio |
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a self-contained patch.
|
||||
|
||||
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
|
||||
|
||||
## Fixed issues
|
||||
|
||||
This patch contains the following fix:
|
||||
|
||||
- TDI-50317 [8.0.1] tFileInputPositional don't parse properly when pattern units field is set to Symbols
|
||||
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Must install Talend Studio 8.0.1 with the monthly released patch, Patch\_20230421\_R2023-04_v1-8.0.1.zip.
|
||||
- Or must update the Talend Studio 8.0.1 with the URL, https://update.talend.com/Studio/8/updates/R2023-04/.
|
||||
|
||||
## Installation
|
||||
|
||||
Installation On Studio:
|
||||
|
||||
1. Shut down Talend studio if it is opened.
|
||||
2. Extract the zip.
|
||||
3. Merge the folder "plugins" and its content to "{studio}/plugins" and overwrite the existing files.
|
||||
4. remove the folder "{studio}/configuration/org.eclipse.osgi".
|
||||
5. Start the Talend studio.
|
||||
6. Rebuild your jobs.
|
||||
|
||||
Installation On CI:
|
||||
|
||||
1. put the patch in a location that can be reached in CI environment.
|
||||
2. copy the patch to <product.path>/patches folder between executions of org.talend.ci:builder-maven-plugin:8.0.x:install and org.talend.ci:builder-maven-plugin:8.0.x:generateAllPoms command.
|
||||
3. if it's an automation task for CI/CD, use scripts to do the copy action.
|
||||
4. Run the CI/CD task.
|
||||
@@ -56,5 +56,12 @@
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="true"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.signon.util"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<requires>
|
||||
<import plugin="org.bouncycastle.bcprov" version="1.69.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>
|
||||
|
||||
@@ -9,4 +9,7 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
<properties>
|
||||
<tycho.buildtimestamp.format>${timestamp}</tycho.buildtimestamp.format>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -4,4 +4,6 @@ bin.includes = META-INF/,\
|
||||
plugin.xml,\
|
||||
icons/,\
|
||||
icons1/,\
|
||||
.
|
||||
.,\
|
||||
resources/
|
||||
|
||||
|
||||
BIN
main/plugins/org.talend.common.ui.runtime/icons/help.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/help.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 600 B |
BIN
main/plugins/org.talend.common.ui.runtime/icons/question.gif
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/question.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
@@ -1,5 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
point="org.eclipse.e4.ui.css.swt.theme">
|
||||
<stylesheet
|
||||
uri="resources/theme/light_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.talend.themes.css.talend.default"></themeid>
|
||||
</stylesheet>
|
||||
<stylesheet
|
||||
uri="resources/theme/dark_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
|
||||
</stylesheet>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=#org-eclipse-ui-workbench-DARK_BACKGROUND'
|
||||
'table.foreground=#org-eclipse-ui-workbench-DARK_FOREGROUND'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=COLOR-LIST-BACKGROUND'
|
||||
'table.foreground=COLOR_LIST_FOREGROUND'
|
||||
}
|
||||
@@ -12,14 +12,22 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ColorConstants {
|
||||
|
||||
static final String BUNDLE_ID_COMMON_UI_RUNTIME = "org.talend.common.ui.runtime";
|
||||
|
||||
static final String KEY_TABLE_BACKGROUND = "table.background";
|
||||
|
||||
static final String KEY_TABLE_FOREGROUND = "table.foreground";
|
||||
|
||||
static final Color WHITE_COLOR = new Color(null, 255, 255, 255);
|
||||
|
||||
static final Color GREY_COLOR = new Color(null, 215, 215, 215);
|
||||
@@ -29,6 +37,8 @@ public interface ColorConstants {
|
||||
static final Color YELLOW_COLOR = new Color(null, 255, 173, 37);// 254, 182, 84
|
||||
|
||||
static final Color RED_COLOR = new Color(null, new RGB(204, 87, 89));// 255
|
||||
|
||||
static final Color ERROR_FONT_COLOR = new Color(null, new RGB(255, 0, 0));// 255
|
||||
|
||||
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);
|
||||
|
||||
@@ -45,4 +55,19 @@ public interface ColorConstants {
|
||||
|
||||
static final Color SUCCEED_COLOR = new Color(null, 221, 242, 217);
|
||||
|
||||
static Color getTableBackgroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_BACKGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
|
||||
}
|
||||
|
||||
static Color getTableForegroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_FOREGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
|
||||
}
|
||||
|
||||
static Color getTableReadOnlyForegroundColor() {
|
||||
return ITalendThemeService.getColor("CONTEXT_TABLE_READONLY_FOREGROUND")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.talend.commons.ui.runtime.exception.ExceptionServiceImpl;
|
||||
|
||||
public class CommonUIPlugin implements BundleActivator {
|
||||
|
||||
public static String BUNDLE_ID = "org.talend.common.ui.runtime";
|
||||
|
||||
private static Boolean fullyHeadless = null;
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ITalendThemeService {
|
||||
|
||||
public static String DEFAULT_PREFERENCE_ID = "org.eclipse.ui.workbench";
|
||||
|
||||
public static String THEME_PREFERENCE_ID = "org.eclipse.e4.ui.css.swt.theme";
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String prop) {
|
||||
return getColor(DEFAULT_PREFERENCE_ID, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the prop
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String bundleId, String prop) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return Optional.ofNullable(theme.getColorForTheme(bundleId, prop));
|
||||
}
|
||||
return Optional.ofNullable(null);
|
||||
}
|
||||
|
||||
Color getColorForTheme(String bundleId, String prop);
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String key) {
|
||||
return getProperty(DEFAULT_PREFERENCE_ID, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the key
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String bundleId, String key) {
|
||||
ITalendThemeService theme = get();
|
||||
String value = null;
|
||||
if (theme != null) {
|
||||
value = theme.getPropertyForTheme(bundleId, key);
|
||||
}
|
||||
if (StringUtils.isBlank(value)) {
|
||||
return Optional.ofNullable(null);
|
||||
} else {
|
||||
return Optional.ofNullable(value);
|
||||
}
|
||||
}
|
||||
|
||||
String getPropertyForTheme(String bundleId, String key);
|
||||
|
||||
static void addPropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void addPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void addPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static boolean containsPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return theme.containsPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean containsPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static void removePropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void removePropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void removePropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
IPreferenceStore getThemePreferenceStore();
|
||||
|
||||
static ITalendThemeService get() {
|
||||
try {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITalendThemeService.class).getBundleContext();
|
||||
ServiceReference<ITalendThemeService> serviceReference = bc.getServiceReference(ITalendThemeService.class);
|
||||
if (serviceReference == null) {
|
||||
return null;
|
||||
}
|
||||
return bc.getService(serviceReference);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,12 +72,27 @@ public final class MessageBoxExceptionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
CommonExceptionHandler.process(ex);
|
||||
|
||||
if (CommonsPlugin.isHeadless() || CommonsPlugin.isJUnitTest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (shell != null) {
|
||||
showMessage(ex, shell, wrapMessage);
|
||||
}
|
||||
}
|
||||
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
showMessage(ex, shell, true);
|
||||
}
|
||||
/**
|
||||
* Open a message box showing a generic message and exception message.
|
||||
*
|
||||
* @param ex - exception to show
|
||||
*/
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
public static void showMessage(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
if (ex.equals(lastShowedAction)) {
|
||||
return;
|
||||
}
|
||||
@@ -85,10 +100,14 @@ public final class MessageBoxExceptionHandler {
|
||||
|
||||
// TODO smallet use ErrorDialogWidthDetailArea ?
|
||||
String title = Messages.getString("commons.error"); //$NON-NLS-1$
|
||||
String msg = Messages.getString("exception.errorOccured", ex.getMessage()); //$NON-NLS-1$
|
||||
String excepMsg = ex.getMessage();
|
||||
//add for tup-19726/19790, as for exception detailMessage will show more details on log area.
|
||||
if(ex.getCause()!=null) {
|
||||
msg = Messages.getString("exception.errorOccured", ex.getCause().getMessage()); //$NON-NLS-1$
|
||||
excepMsg = ex.getCause().getMessage();
|
||||
}
|
||||
String msg = Messages.getString("exception.errorOccured", excepMsg); //$NON-NLS-1$
|
||||
if (!wrapMessage) {
|
||||
msg = Messages.getString("exception.message", excepMsg); //$NON-NLS-1$
|
||||
}
|
||||
Priority priority = CommonExceptionHandler.getPriority(ex);
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=table is null
|
||||
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
|
||||
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
|
||||
commons.error=Error
|
||||
exception.message={0}\nSee log for more details.
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ModelSelectionDialog.Message=Please choose one option, or cancel.
|
||||
ModelSelectionDialog.Option=option
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=la table est null.
|
||||
TableViewerCreator.TableColumn.AssertMsg=La TableColumn de TableEditorColumn avec idProperty '{0}' n'a pas la bonne Table parente
|
||||
TreeToTablesLinker.Type.Unsupported=Ce type de currentControl n'est pas support\u00E9
|
||||
commons.error=Erreur
|
||||
exception.message={0}\nConsultez le log pour plus de d\u00E9tails.
|
||||
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
|
||||
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
|
||||
ModelSelectionDialog.Option=Option
|
||||
|
||||
@@ -96,7 +96,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u3067\u3059
|
||||
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306B\u306F\u3001\u6B63\u3057\u3044\u89AA\u30C6\u30FC\u30D6\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
TreeToTablesLinker.Type.Unsupported=currentControl\u306E\u3053\u306E\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
commons.error=\u30A8\u30E9\u30FC
|
||||
exception.message={0}\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
|
||||
@@ -121,7 +122,7 @@ ModelSelectionDialog.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u3
|
||||
ModelSelectionDialog.ViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.newViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A
|
||||
ModelSelectionDialog.ViewQuery=\u30AF\u30A8\u30EA\u30FC\u3046\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
|
||||
SSLConfirmDialog.KeyStore=KeyStore\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
SSLConfirmDialog.TrustStore=TrustStore\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
SSLConfirmDialog.Password=\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
|
||||
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
|
||||
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
|
||||
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
|
||||
commons.error=\u9519\u8BEF
|
||||
exception.message={0}\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
|
||||
ModelSelectionDialog.Option=\u9009\u9879
|
||||
|
||||
@@ -39,6 +39,10 @@ public enum EImage implements IImage {
|
||||
EDIT_ICON("/icons/write_obj.gif"), //$NON-NLS-1$
|
||||
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
|
||||
|
||||
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
|
||||
|
||||
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
|
||||
|
||||
CREATE_CONNECTION_ICON("/icons/connection.gif"), //$NON-NLS-1$
|
||||
|
||||
RESET_DBTYPES_ICON("/icons/reset_dbtypes.jpg"), //$NON-NLS-1$
|
||||
|
||||
@@ -16,8 +16,14 @@ import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.SWT;
|
||||
@@ -158,8 +164,35 @@ public class ImageUtils {
|
||||
return imageDes;
|
||||
}
|
||||
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = new HashMap<byte[], ImageDataProvider>();
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = Collections.synchronizedMap(new HashMap<byte[], ImageDataProvider>());
|
||||
private static Map<Long, byte[]> cachedImagesTimeKeeping = Collections.synchronizedMap(new HashMap<Long, byte[]>());
|
||||
|
||||
private static Thread clearImageFromDataCachedImages = new Thread() {
|
||||
@SuppressWarnings("static-access")
|
||||
public void run() {
|
||||
long timeout = 5 * 60 * 1000;
|
||||
while(true) {//remove older than 5 mins
|
||||
Set<Entry<Long, byte[]>> collect = cachedImagesTimeKeeping.entrySet().stream()
|
||||
.filter(entry -> (System.currentTimeMillis() - entry.getKey()) > timeout).collect(Collectors.toSet());
|
||||
for(Entry<Long, byte[]> entry: collect) {
|
||||
Long key = entry.getKey();
|
||||
cachedImagesTimeKeeping.remove(key);
|
||||
imageFromDataCachedImages.remove(entry.getValue());
|
||||
}
|
||||
|
||||
try {
|
||||
sleep(timeout);
|
||||
} catch (InterruptedException e) {//
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
static {
|
||||
clearImageFromDataCachedImages.setDaemon(true);
|
||||
clearImageFromDataCachedImages.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* By default, keep in memory the .
|
||||
*
|
||||
@@ -169,12 +202,17 @@ public class ImageUtils {
|
||||
*/
|
||||
public static ImageDescriptor createImageFromData(byte[] data, boolean... keepInMemory) {
|
||||
if (data != null) {
|
||||
ImageDataProvider imageProvider = imageFromDataCachedImages.get(data);
|
||||
ImageDataProvider imageProvider = null;
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageProvider = imageFromDataCachedImages.get(findKey.get());
|
||||
}
|
||||
if (imageProvider == null) {
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(data);
|
||||
ImageData img = new ImageData(bais);
|
||||
imageProvider = new TalendImageProvider(img);
|
||||
imageFromDataCachedImages.put(data, imageProvider);
|
||||
cachedImagesTimeKeeping.put(System.currentTimeMillis(), data);
|
||||
}
|
||||
return ImageDescriptor.createFromImageDataProvider(imageProvider);
|
||||
}
|
||||
@@ -183,8 +221,9 @@ public class ImageUtils {
|
||||
|
||||
public static void disposeImages(byte[] data) {
|
||||
if (data != null) {
|
||||
if (imageFromDataCachedImages.get(data) != null) {
|
||||
imageFromDataCachedImages.remove(data);
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageFromDataCachedImages.remove(findKey.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.proposal.IShowInvisibleCellEditorMethods;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.behavior.DefaultHeaderColumnSelectionListener;
|
||||
@@ -291,7 +293,8 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
public TableViewerCreatorNotModifiable(Composite compositeParent) {
|
||||
super();
|
||||
this.compositeParent = compositeParent;
|
||||
this.emptyZoneColor = compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
this.emptyZoneColor = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
|
||||
.orElse(compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
|
||||
}
|
||||
|
||||
@@ -669,8 +672,22 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
table.addListener(SWTFacade.Paint, paintListener);
|
||||
}
|
||||
|
||||
setBackgroundColor(backgroundColor != null ? backgroundColor : table.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
setForegroundColor(foregroundColor != null ? foregroundColor : table.getDisplay().getSystemColor(SWT.COLOR_BLACK));
|
||||
Color prefBackgroundColor = backgroundColor;
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = ColorConstants.getTableBackgroundColor();
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = table.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
Color prefForegroundColor = foregroundColor;
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = ColorConstants.getTableForegroundColor();
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
|
||||
}
|
||||
}
|
||||
setBackgroundColor(prefBackgroundColor);
|
||||
setForegroundColor(prefForegroundColor);
|
||||
|
||||
if (useCustomItemColoring) {
|
||||
setUseCustomItemColoring(true);
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.utils;
|
||||
|
||||
import org.eclipse.jface.resource.ColorRegistry;
|
||||
import org.eclipse.jface.resource.DataFormatException;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Device;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
@@ -102,4 +107,16 @@ public class TalendColorPalette {
|
||||
public static final java.awt.Color TERTIARY_ORANGE_AWT = new java.awt.Color(244, 175, 128);
|
||||
|
||||
public static final java.awt.Color TERTIARY_YELLOW_AWT = new java.awt.Color(255, 217, 143);
|
||||
|
||||
public static Color convertToColor(String rgbStr) throws DataFormatException {
|
||||
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
|
||||
Color color = colorRegistry.get(rgbStr);
|
||||
if (color != null) {
|
||||
return color;
|
||||
}
|
||||
RGB rgb = StringConverter.asRGB(rgbStr);
|
||||
colorRegistry.put(rgbStr, rgb);
|
||||
return colorRegistry.get(rgbStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Enumeration;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
@@ -169,8 +170,52 @@ public class ZipFileUtils {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static void unZipFileEntry(File destFile, java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry) throws IOException {
|
||||
InputStream inputStream;
|
||||
FileOutputStream fileOut;
|
||||
if (entry.isDirectory()) {
|
||||
destFile.mkdirs();
|
||||
} else {
|
||||
File parent = destFile.getParentFile();
|
||||
if (parent != null && !parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
|
||||
inputStream = zipFile.getInputStream(entry);
|
||||
|
||||
fileOut = new FileOutputStream(destFile);
|
||||
byte[] buf = new byte[bufSize];
|
||||
int readedBytes;
|
||||
while ((readedBytes = inputStream.read(buf)) > 0) {
|
||||
fileOut.write(buf, 0, readedBytes);
|
||||
}
|
||||
fileOut.close();
|
||||
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void setBufSize(int bufSize) {
|
||||
ZipFileUtils.bufSize = bufSize;
|
||||
}
|
||||
|
||||
public static boolean isValidJarFile(String moduleFilePath) {
|
||||
if (moduleFilePath == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!new File(moduleFilePath).exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try (JarFile zip = new JarFile(moduleFilePath)) {
|
||||
zip.getManifest();
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
<KEYWORD1>smallint</KEYWORD1>
|
||||
<KEYWORD1>smallmoney</KEYWORD1>
|
||||
<KEYWORD1>text</KEYWORD1>
|
||||
<KEYWORD1>TIME</KEYWORD1>
|
||||
<KEYWORD1>timestamp</KEYWORD1>
|
||||
<KEYWORD1>tinyint</KEYWORD1>
|
||||
<KEYWORD1>uniqueidentifier</KEYWORD1>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
<version>1.2.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -58,10 +58,14 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static Boolean isJunitWorking;
|
||||
|
||||
private static Boolean isDevMode = null;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
private static Boolean isDebugP2 = null;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
return isWorkbenchCreated;
|
||||
}
|
||||
@@ -124,6 +128,17 @@ public class CommonsPlugin implements BundleActivator {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDebugP2() {
|
||||
try {
|
||||
if (isDebugP2 == null) {
|
||||
isDebugP2 = Boolean.getBoolean("talend.studio.lite.p2.debug");
|
||||
}
|
||||
return isDebugP2;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDebugMode() {
|
||||
return Boolean.getBoolean("talendDebug") //$NON-NLS-1$
|
||||
|| ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
@@ -137,6 +152,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.
|
||||
|
||||
@@ -36,6 +36,11 @@ public final class CommonExceptionHandler {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg) {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, msg, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Priority priority) {
|
||||
String message = ex.getMessage();
|
||||
@@ -43,6 +48,13 @@ public final class CommonExceptionHandler {
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg, Priority priority) {
|
||||
String message = ex.getMessage() + ": " + msg;
|
||||
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void log(String message) {
|
||||
log.log(Level.INFO, message);
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 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.runtime.model.emf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.xmi.XMLHelper;
|
||||
import org.eclipse.emf.ecore.xmi.XMLResource;
|
||||
import org.eclipse.emf.ecore.xmi.XMLSave;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMLString;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class CustomXMIResource extends TalendXMIResource {
|
||||
|
||||
public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
|
||||
|
||||
CustomXMISave xmiSave;
|
||||
|
||||
public CustomXMIResource() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CustomXMIResource(URI uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
encoding = ENCODING;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLSave createXMLSave() {
|
||||
xmiSave = new CustomXMISave(createXMLHelper());
|
||||
return xmiSave;
|
||||
}
|
||||
|
||||
public String getResourceContent(Map<?, ?> options) {
|
||||
if (xmiSave == null) {
|
||||
createXMLSave();
|
||||
}
|
||||
return xmiSave.getXMLContent(this, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CustomXMISave extends XMISaveImpl {
|
||||
|
||||
public CustomXMISave(XMLHelper helper) {
|
||||
super(helper);
|
||||
}
|
||||
|
||||
public String getXMLContent(XMLResource resource, Map<?, ?> options) {
|
||||
StringJoiner strJoin = new StringJoiner("");
|
||||
super.init(resource, options);
|
||||
super.traverse(resource.getContents());
|
||||
XMLString xmlString = this.doc;
|
||||
Iterator<String> iterator = xmlString.stringIterator();
|
||||
while (iterator.hasNext()) {
|
||||
String string = (String) iterator.next();
|
||||
if (string != null) {
|
||||
strJoin.add(string);
|
||||
}
|
||||
}
|
||||
return strJoin.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -263,4 +264,12 @@ public class EmfHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getEmfModelContent(EObject model) throws Exception {
|
||||
String content = "";
|
||||
CustomXMIResource xmiResource = new CustomXMIResource();
|
||||
xmiResource.getContents().add(model);
|
||||
content = xmiResource.getResourceContent(Collections.EMPTY_MAP);
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,12 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isTaCoKitType(Object repoType);
|
||||
|
||||
Object getDatastoreFromDataset(Object repositoryViewObject);
|
||||
|
||||
String getParentItemIdFromItem(Object Item);
|
||||
|
||||
boolean isValueSelectionParameter(Object parameter);
|
||||
|
||||
public static ITaCoKitService getInstance() {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
Collection<ServiceReference<ITaCoKitService>> tacokitServices = Collections.emptyList();
|
||||
|
||||
@@ -33,6 +33,7 @@ import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
@@ -55,6 +56,11 @@ public class NetworkUtil {
|
||||
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
|
||||
|
||||
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
* see ITalendCorePrefConstants.PERFORMANCE_TAC_READ_TIMEOUT
|
||||
*/
|
||||
private static final String PERFORMANCE_TAC_READ_TIMEOUT = "PERFORMANCE_TAC_READ_TIMEOUT"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROP_DISABLEDSCHEMES_USE_DEFAULT = "talend.studio.jdk.http.auth.tunneling.disabledSchemes.useDefault";
|
||||
|
||||
@@ -103,6 +109,7 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, getCheckUrl());
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
@@ -115,7 +122,7 @@ public class NetworkUtil {
|
||||
if (StringUtils.isNotBlank(customUrl)) {
|
||||
return customUrl;
|
||||
} else {
|
||||
return "https://talend-update.talend.com/nexus/content/repositories/libraries/";
|
||||
return "https://talend-update.talend.com/nexus/content/groups/studio-libraries/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +146,7 @@ public class NetworkUtil {
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, urlString);
|
||||
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
|
||||
// invalid server
|
||||
return false;
|
||||
@@ -149,10 +157,10 @@ public class NetworkUtil {
|
||||
}
|
||||
|
||||
public static int getNexusTimeout() {
|
||||
int timeout = DEFAULT_NEXUS_TIMEOUT;
|
||||
int timeout = Integer.getInteger("nexus.timeout.min", DEFAULT_NEXUS_TIMEOUT);
|
||||
try {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
|
||||
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
|
||||
timeout = Math.max(timeout, node.getInt(PERFORMANCE_TAC_READ_TIMEOUT, 0) * 1000);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
@@ -88,13 +88,17 @@ public class EclipseCommandLine {
|
||||
static public final String TALEND_CONTINUE_LOGON = "-talendContinueLogon";
|
||||
|
||||
static public final String TALEND_CONTINUE_UPDATE = "-talendContinueUpdate";
|
||||
|
||||
static public final String TALEND_CLEAN_M2 = "-talendCleanM2";
|
||||
|
||||
static public final String TALEND_CLEAN_UNINSTALLED_BUNDLES = "-talendCleanUninstalledBundles";
|
||||
|
||||
static public final String PROP_KEY_PROFILE_ID = "eclipse.p2.profile";
|
||||
|
||||
static public final String ARG_BRANCH = "-branch";
|
||||
|
||||
|
||||
static public final String ARG_PROJECT = "-project";
|
||||
|
||||
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
|
||||
|
||||
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
|
||||
|
||||
@@ -92,7 +92,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
@@ -116,7 +116,7 @@ ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
|
||||
ModelSelectionDialog.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u5909\u66F4\u3057\u307E\u3059\u3002
|
||||
ModelSelectionDialog.ViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.ViewQuery=\u30AF\u30A8\u30EA\u30FC\u3046\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
|
||||
FileStep2.previewFailure=\u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u3002\u4E00\u90E8\u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6CE8: \u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u306F\u4E00\u822C\u7684\u306B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u8A2D\u5B9A\u306E\u8AA4\u308A\u304C\u539F\u56E0\u3067\u3059\u3002
|
||||
StateComposite.FLL_DB_INFOR=DB\u60C5\u5831\u3092\u5165\u529B
|
||||
StateComposite.HELP_MESSAGE=\u30D8\u30EB\u30D7\u30E1\u30C3\u30BB\u30FC\u30B8
|
||||
|
||||
@@ -18,12 +18,12 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.PreferenceConverter;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
*
|
||||
*/
|
||||
public class ColorManager {
|
||||
|
||||
|
||||
public static final RGB DEFAULT_STRING_COLOR = new RGB(0, 0, 0);
|
||||
|
||||
public static final RGB DEFAULT_KEYWORD1_COLOR = new RGB(50, 32, 160);
|
||||
@@ -106,15 +106,19 @@ public class ColorManager {
|
||||
}
|
||||
|
||||
public Color getColor(String colorName) {
|
||||
RGB prefColor = PreferenceConverter.getColor(store, colorName);
|
||||
Color color = null;
|
||||
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).getRGB().equals(prefColor)) {
|
||||
color = (Color) colorMap.get(colorName);
|
||||
Color prefColor = getThemeColor(colorName);
|
||||
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).equals(prefColor)) {
|
||||
return colorMap.get(colorName);
|
||||
} else {
|
||||
color = new Color(Display.getDefault(), prefColor);
|
||||
colorMap.put(colorName, color);
|
||||
colorMap.put(colorName, prefColor);
|
||||
}
|
||||
return color;
|
||||
return prefColor;
|
||||
}
|
||||
|
||||
private static Color getThemeColor(String colorName) {
|
||||
Color c = ITalendThemeService.getColor(colorName)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
|
||||
return c;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
@@ -164,20 +168,20 @@ public class ColorManager {
|
||||
}
|
||||
|
||||
public static void initDefaultColors(IPreferenceStore store) {
|
||||
store.setDefault(NULL_COLOR, StringConverter.asString(DEFAULT_STRING_COLOR));
|
||||
store.setDefault(COMMENT1_COLOR, StringConverter.asString(DEFAULT_COMMENT1_COLOR));
|
||||
store.setDefault(COMMENT2_COLOR, StringConverter.asString(DEFAULT_COMMENT2_COLOR));
|
||||
store.setDefault(LITERAL1_COLOR, StringConverter.asString(DEFAULT_LITERAL1_COLOR));
|
||||
store.setDefault(LITERAL2_COLOR, StringConverter.asString(DEFAULT_LITERAL2_COLOR));
|
||||
store.setDefault(LABEL_COLOR, StringConverter.asString(DEFAULT_LABEL_COLOR));
|
||||
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(DEFAULT_KEYWORD1_COLOR));
|
||||
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(DEFAULT_KEYWORD2_COLOR));
|
||||
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(DEFAULT_KEYWORD3_COLOR));
|
||||
store.setDefault(FUNCTION_COLOR, StringConverter.asString(DEFAULT_FUNCTION_COLOR));
|
||||
store.setDefault(MARKUP_COLOR, StringConverter.asString(DEFAULT_MARKUP_COLOR));
|
||||
store.setDefault(OPERATOR_COLOR, StringConverter.asString(DEFAULT_OPERATOR_COLOR));
|
||||
store.setDefault(DIGIT_COLOR, StringConverter.asString(DEFAULT_DIGIT_COLOR));
|
||||
store.setDefault(INVALID_COLOR, StringConverter.asString(DEFAULT_INVALID_COLOR));
|
||||
store.setDefault(NULL_COLOR, StringConverter.asString(getThemeColor(NULL_COLOR).getRGB()));
|
||||
store.setDefault(COMMENT1_COLOR, StringConverter.asString(getThemeColor(COMMENT1_COLOR).getRGB()));
|
||||
store.setDefault(COMMENT2_COLOR, StringConverter.asString(getThemeColor(COMMENT2_COLOR).getRGB()));
|
||||
store.setDefault(LITERAL1_COLOR, StringConverter.asString(getThemeColor(LITERAL1_COLOR).getRGB()));
|
||||
store.setDefault(LITERAL2_COLOR, StringConverter.asString(getThemeColor(LITERAL2_COLOR).getRGB()));
|
||||
store.setDefault(LABEL_COLOR, StringConverter.asString(getThemeColor(LABEL_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(getThemeColor(KEYWORD1_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(getThemeColor(KEYWORD2_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(getThemeColor(KEYWORD3_COLOR).getRGB()));
|
||||
store.setDefault(FUNCTION_COLOR, StringConverter.asString(getThemeColor(FUNCTION_COLOR).getRGB()));
|
||||
store.setDefault(MARKUP_COLOR, StringConverter.asString(getThemeColor(MARKUP_COLOR).getRGB()));
|
||||
store.setDefault(OPERATOR_COLOR, StringConverter.asString(getThemeColor(OPERATOR_COLOR).getRGB()));
|
||||
store.setDefault(DIGIT_COLOR, StringConverter.asString(getThemeColor(DIGIT_COLOR).getRGB()));
|
||||
store.setDefault(INVALID_COLOR, StringConverter.asString(getThemeColor(INVALID_COLOR).getRGB()));
|
||||
|
||||
String bold = BOLD_SUFFIX;
|
||||
store.setDefault(COMMENT1_COLOR + bold, false);
|
||||
|
||||
@@ -1,368 +1,384 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.colorstyledtext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.ExtendedModifyEvent;
|
||||
import org.eclipse.swt.custom.ExtendedModifyListener;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.ui.ISharedImages;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
import org.talend.commons.utils.threading.ExecutionLimiter;
|
||||
|
||||
/**
|
||||
* This component is an adaptation of a Color Editor for a StyledText.
|
||||
*
|
||||
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
|
||||
*
|
||||
* <b>How to use it, example :</b> <br/>
|
||||
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
|
||||
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
|
||||
* <br/>
|
||||
*
|
||||
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
|
||||
*
|
||||
*/
|
||||
public class ColorStyledText extends StyledText {
|
||||
|
||||
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
|
||||
|
||||
private final ColorManager colorManager;
|
||||
|
||||
private final ColoringScanner scanner;
|
||||
|
||||
private final String languageMode;
|
||||
|
||||
private final MenuItem pasteItem;
|
||||
|
||||
private boolean coloring = true;
|
||||
|
||||
private UndoRedoManager undoRedoManager;
|
||||
|
||||
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
|
||||
super(parent, style);
|
||||
this.languageMode = languageMode;
|
||||
this.colorManager = new ColorManager(store);
|
||||
|
||||
/*
|
||||
* set the Shortcuts of the undo/redo
|
||||
*/
|
||||
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
|
||||
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
|
||||
UndoRedoManager undoManager = new UndoRedoManager(50);
|
||||
undoManager.connect(this);
|
||||
this.setUndoManager(undoManager);
|
||||
|
||||
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
|
||||
Menu popupMenu = new Menu(this);
|
||||
|
||||
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
|
||||
redoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
redo();
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
|
||||
undoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
undo();
|
||||
}
|
||||
});
|
||||
|
||||
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
||||
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
|
||||
copyItem.setImage(image);
|
||||
copyItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
copy();
|
||||
}
|
||||
});
|
||||
|
||||
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
||||
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
|
||||
pasteItem.setData(this);
|
||||
pasteItem.setImage(image);
|
||||
pasteItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
paste();
|
||||
}
|
||||
});
|
||||
pasteItem.setEnabled(getEditable());
|
||||
|
||||
this.setMenu(popupMenu);
|
||||
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
|
||||
selectAllItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
selectAll();
|
||||
}
|
||||
});
|
||||
this.setMenu(popupMenu);
|
||||
|
||||
Listener selectAllListener = new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
selectAll();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addListener(SWT.KeyDown, selectAllListener);
|
||||
|
||||
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
|
||||
scanner = new ColoringScanner(mode, colorManager);
|
||||
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qli Comment method "invokeAction".
|
||||
*
|
||||
* @param action
|
||||
*
|
||||
* */
|
||||
public void invokeAction(int action) {
|
||||
super.invokeAction(action);
|
||||
|
||||
switch (action) {
|
||||
case ActionCode.UNDO:
|
||||
undo(); // ctrl+Z
|
||||
break;
|
||||
case ActionCode.REDO:
|
||||
redo(); // ctrl+Y
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for undoRedoManager.
|
||||
*
|
||||
* @return the undoRedoManager
|
||||
*/
|
||||
public UndoRedoManager getUndoManager() {
|
||||
return this.undoRedoManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the undoRedoManager.
|
||||
*
|
||||
* @param undoRedoManager the undoRedoManager to set
|
||||
*/
|
||||
public void setUndoManager(UndoRedoManager undoRedoManager) {
|
||||
this.undoRedoManager = undoRedoManager;
|
||||
}
|
||||
|
||||
public static class ActionCode {
|
||||
|
||||
public static final int UNDO = Integer.MAX_VALUE;
|
||||
|
||||
public static final int REDO = UNDO - 1;
|
||||
|
||||
}
|
||||
|
||||
private void undo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.undo();
|
||||
}
|
||||
}
|
||||
|
||||
private void redo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.redo();
|
||||
}
|
||||
}
|
||||
|
||||
protected void colorize(final ColoringScanner scanner) {
|
||||
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
|
||||
if (this.coloring) {
|
||||
IToken token;
|
||||
if (this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
do {
|
||||
token = scanner.nextToken();
|
||||
if (!token.isEOF()) {
|
||||
if (token instanceof CToken) {
|
||||
CToken ctoken = (CToken) token;
|
||||
StyleRange styleRange;
|
||||
styleRange = new StyleRange();
|
||||
styleRange.start = scanner.getTokenOffset();
|
||||
styleRange.length = scanner.getTokenLength();
|
||||
if (ctoken.getType() == null) {
|
||||
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColor(ctoken.getColor());
|
||||
} else {
|
||||
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
|
||||
}
|
||||
styles.add(styleRange);
|
||||
}
|
||||
}
|
||||
} while (!token.isEOF());
|
||||
setStyles(styles);
|
||||
} else {
|
||||
StyleRange styleRange = new StyleRange();
|
||||
styles.add(styleRange);
|
||||
styleRange.start = 0;
|
||||
styleRange.length = this.getText().getBytes().length;
|
||||
styleRange.foreground = null;
|
||||
setStyles(styles);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyles(final ArrayList<StyleRange> styles) {
|
||||
if (ColorStyledText.this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
int countChars = getCharCount();
|
||||
|
||||
for (int i = 0; i < styles.size(); i++) {
|
||||
StyleRange styleRange = styles.get(i);
|
||||
// System.out.println("styleRange.start=" + styleRange.start);
|
||||
// System.out.println("styleRange.length=" + styleRange.length);
|
||||
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
|
||||
continue;
|
||||
}
|
||||
setStyleRange(styleRange);
|
||||
}
|
||||
}
|
||||
|
||||
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
|
||||
|
||||
public void modifyText(ExtendedModifyEvent event) {
|
||||
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
} else {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public ColorManager getColorManager() {
|
||||
return this.colorManager;
|
||||
}
|
||||
|
||||
public String getLanguageMode() {
|
||||
return this.languageMode;
|
||||
}
|
||||
|
||||
public ColoringScanner getScanner() {
|
||||
return this.scanner;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
if (pasteItem != null) {
|
||||
pasteItem.setEnabled(editable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for coloring.
|
||||
*
|
||||
* @return the coloring
|
||||
*/
|
||||
public boolean isColoring() {
|
||||
return this.coloring;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the coloring.
|
||||
*
|
||||
* @param coloring the coloring to set
|
||||
*/
|
||||
public void setColoring(boolean coloring) {
|
||||
boolean wasDifferent = this.coloring != coloring;
|
||||
this.coloring = coloring;
|
||||
if (!coloring) {
|
||||
removeExtendedModifyListener(modifyListener);
|
||||
} else if (wasDifferent) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Widget#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
colorManager.dispose();
|
||||
}
|
||||
|
||||
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
|
||||
|
||||
@Override
|
||||
public void execute(final boolean isFinalExecution, Object data) {
|
||||
if (!isDisposed()) {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.colorstyledtext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.ExtendedModifyEvent;
|
||||
import org.eclipse.swt.custom.ExtendedModifyListener;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.ui.ISharedImages;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
import org.talend.commons.utils.threading.ExecutionLimiter;
|
||||
|
||||
/**
|
||||
* This component is an adaptation of a Color Editor for a StyledText.
|
||||
*
|
||||
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
|
||||
*
|
||||
* <b>How to use it, example :</b> <br/>
|
||||
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
|
||||
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
|
||||
* <br/>
|
||||
*
|
||||
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
|
||||
*
|
||||
*/
|
||||
public class ColorStyledText extends StyledText {
|
||||
|
||||
|
||||
public static final String PREFERENCE_COLOR_FOREGROUND= "ColorStyledText.Color.Foreground"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_BACKGROUND= "ColorStyledText.Color.Background"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_SELECTION_FOREGROUND= "ColorStyledText.Color.SelectionForeground"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_SELECTION_BACKGROUND= "ColorStyledText.Color.SelectionBackground"; //$NON-NLS-1$
|
||||
|
||||
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
|
||||
|
||||
private final ColorManager colorManager;
|
||||
|
||||
private final ColoringScanner scanner;
|
||||
|
||||
private final String languageMode;
|
||||
|
||||
private final MenuItem pasteItem;
|
||||
|
||||
private boolean coloring = true;
|
||||
|
||||
private UndoRedoManager undoRedoManager;
|
||||
|
||||
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
|
||||
super(parent, style);
|
||||
this.languageMode = languageMode;
|
||||
this.colorManager = new ColorManager(store);
|
||||
|
||||
/*
|
||||
* set the Shortcuts of the undo/redo
|
||||
*/
|
||||
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
|
||||
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
|
||||
UndoRedoManager undoManager = new UndoRedoManager(50);
|
||||
undoManager.connect(this);
|
||||
this.setUndoManager(undoManager);
|
||||
|
||||
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
|
||||
Menu popupMenu = new Menu(this);
|
||||
|
||||
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
|
||||
redoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
redo();
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
|
||||
undoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
undo();
|
||||
}
|
||||
});
|
||||
|
||||
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
||||
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
|
||||
copyItem.setImage(image);
|
||||
copyItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
copy();
|
||||
}
|
||||
});
|
||||
|
||||
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
||||
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
|
||||
pasteItem.setData(this);
|
||||
pasteItem.setImage(image);
|
||||
pasteItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
paste();
|
||||
}
|
||||
});
|
||||
pasteItem.setEnabled(getEditable());
|
||||
|
||||
this.setMenu(popupMenu);
|
||||
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
|
||||
selectAllItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
selectAll();
|
||||
}
|
||||
});
|
||||
this.setMenu(popupMenu);
|
||||
|
||||
Listener selectAllListener = new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
selectAll();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addListener(SWT.KeyDown, selectAllListener);
|
||||
|
||||
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
|
||||
scanner = new ColoringScanner(mode, colorManager);
|
||||
|
||||
addExtendedModifyListener(modifyListener);
|
||||
initColorSetting();
|
||||
}
|
||||
|
||||
|
||||
protected void initColorSetting() {
|
||||
this.setForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_FOREGROUND).orElse(null));
|
||||
this.setBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_BACKGROUND).orElse(null));
|
||||
this.setSelectionBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_BACKGROUND).orElse(null));
|
||||
this.setSelectionForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_FOREGROUND).orElse(null));
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qli Comment method "invokeAction".
|
||||
*
|
||||
* @param action
|
||||
*
|
||||
* */
|
||||
public void invokeAction(int action) {
|
||||
super.invokeAction(action);
|
||||
|
||||
switch (action) {
|
||||
case ActionCode.UNDO:
|
||||
undo(); // ctrl+Z
|
||||
break;
|
||||
case ActionCode.REDO:
|
||||
redo(); // ctrl+Y
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for undoRedoManager.
|
||||
*
|
||||
* @return the undoRedoManager
|
||||
*/
|
||||
public UndoRedoManager getUndoManager() {
|
||||
return this.undoRedoManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the undoRedoManager.
|
||||
*
|
||||
* @param undoRedoManager the undoRedoManager to set
|
||||
*/
|
||||
public void setUndoManager(UndoRedoManager undoRedoManager) {
|
||||
this.undoRedoManager = undoRedoManager;
|
||||
}
|
||||
|
||||
public static class ActionCode {
|
||||
|
||||
public static final int UNDO = Integer.MAX_VALUE;
|
||||
|
||||
public static final int REDO = UNDO - 1;
|
||||
|
||||
}
|
||||
|
||||
private void undo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.undo();
|
||||
}
|
||||
}
|
||||
|
||||
private void redo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.redo();
|
||||
}
|
||||
}
|
||||
|
||||
protected void colorize(final ColoringScanner scanner) {
|
||||
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
|
||||
if (this.coloring) {
|
||||
IToken token;
|
||||
if (this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
do {
|
||||
token = scanner.nextToken();
|
||||
if (!token.isEOF()) {
|
||||
if (token instanceof CToken) {
|
||||
CToken ctoken = (CToken) token;
|
||||
StyleRange styleRange;
|
||||
styleRange = new StyleRange();
|
||||
styleRange.start = scanner.getTokenOffset();
|
||||
styleRange.length = scanner.getTokenLength();
|
||||
if (ctoken.getType() == null) {
|
||||
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColor(ctoken.getColor());
|
||||
} else {
|
||||
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
|
||||
}
|
||||
styles.add(styleRange);
|
||||
}
|
||||
}
|
||||
} while (!token.isEOF());
|
||||
setStyles(styles);
|
||||
} else {
|
||||
StyleRange styleRange = new StyleRange();
|
||||
styles.add(styleRange);
|
||||
styleRange.start = 0;
|
||||
styleRange.length = this.getText().getBytes().length;
|
||||
styleRange.foreground = null;
|
||||
setStyles(styles);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyles(final ArrayList<StyleRange> styles) {
|
||||
if (ColorStyledText.this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
int countChars = getCharCount();
|
||||
|
||||
for (int i = 0; i < styles.size(); i++) {
|
||||
StyleRange styleRange = styles.get(i);
|
||||
// System.out.println("styleRange.start=" + styleRange.start);
|
||||
// System.out.println("styleRange.length=" + styleRange.length);
|
||||
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
|
||||
continue;
|
||||
}
|
||||
setStyleRange(styleRange);
|
||||
}
|
||||
}
|
||||
|
||||
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
|
||||
|
||||
public void modifyText(ExtendedModifyEvent event) {
|
||||
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
} else {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public ColorManager getColorManager() {
|
||||
return this.colorManager;
|
||||
}
|
||||
|
||||
public String getLanguageMode() {
|
||||
return this.languageMode;
|
||||
}
|
||||
|
||||
public ColoringScanner getScanner() {
|
||||
return this.scanner;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
if (pasteItem != null) {
|
||||
pasteItem.setEnabled(editable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for coloring.
|
||||
*
|
||||
* @return the coloring
|
||||
*/
|
||||
public boolean isColoring() {
|
||||
return this.coloring;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the coloring.
|
||||
*
|
||||
* @param coloring the coloring to set
|
||||
*/
|
||||
public void setColoring(boolean coloring) {
|
||||
boolean wasDifferent = this.coloring != coloring;
|
||||
this.coloring = coloring;
|
||||
if (!coloring) {
|
||||
removeExtendedModifyListener(modifyListener);
|
||||
} else if (wasDifferent) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Widget#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
colorManager.dispose();
|
||||
}
|
||||
|
||||
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
|
||||
|
||||
@Override
|
||||
public void execute(final boolean isFinalExecution, Object data) {
|
||||
if (!isDisposed()) {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.dialogs;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.talend.commons.ui.utils.image.ColorUtils;
|
||||
@@ -29,5 +31,7 @@ public interface IConfigModuleDialog {
|
||||
public String getMavenURI();
|
||||
|
||||
public int open();
|
||||
|
||||
public Map<String, String> getModulesMVNUrls();
|
||||
|
||||
}
|
||||
|
||||
@@ -20,12 +20,14 @@ import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.RowLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable.LAYOUT_MODE;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.selection.ILineSelectionListener;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.selection.LineSelectionEvent;
|
||||
@@ -156,6 +158,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
final Table table = getTableViewerCreator().getTable();
|
||||
final ILineSelectionListener beforeLineSelectionListener = new ILineSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void handle(LineSelectionEvent e) {
|
||||
if (e.selectionByMethod && !selectionHelper.isMouseSelectionning() && !forceExecuteSelectionEvent) {
|
||||
executeSelectionEvent = false;
|
||||
@@ -166,6 +169,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
};
|
||||
final ILineSelectionListener afterLineSelectionListener = new ILineSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void handle(LineSelectionEvent e) {
|
||||
executeSelectionEvent = true;
|
||||
}
|
||||
@@ -175,6 +179,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
DisposeListener disposeListener = new DisposeListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
selectionHelper.removeBeforeSelectionListener(beforeLineSelectionListener);
|
||||
selectionHelper.removeAfterSelectionListener(afterLineSelectionListener);
|
||||
@@ -185,6 +190,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
table.addListener(SWT.KeyUp, new Listener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
@@ -251,7 +257,9 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
newTableViewerCreator.setLazyLoad(TableViewerCreator.getRecommandLazyLoad());
|
||||
newTableViewerCreator.setFirstVisibleColumnIsSelection(false);
|
||||
newTableViewerCreator.setCheckboxInFirstColumn(false);
|
||||
newTableViewerCreator.setBgColorForEmptyArea(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
Color bgColorForEmptyArea = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
|
||||
.orElse(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
newTableViewerCreator.setBgColorForEmptyArea(bgColorForEmptyArea);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,6 +279,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addBeforeOperationListListener(1, new IListenableListListener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent event) {
|
||||
handleBeforeListenableListOperationEvent(event);
|
||||
}
|
||||
@@ -279,6 +288,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addAfterOperationListListener(1, new IListenableListListener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent event) {
|
||||
handleAfterListenableListOperationEvent(event);
|
||||
}
|
||||
@@ -287,6 +297,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addAfterOperationListListener(100, new IListenableListListener<B>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent<B> event) {
|
||||
if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
|
||||
// tableViewerCreator.getTable().forceFocus();
|
||||
@@ -368,6 +379,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
tableViewerCreator.setInputList(getBeansList());
|
||||
new AsynchronousThreading(100, true, tableViewerCreator.getTable().getDisplay(), new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
tableViewerCreator.layout();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.formtools;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusListener;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
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.Listener;
|
||||
|
||||
/**
|
||||
* Create a Label and a Checkbox.
|
||||
*/
|
||||
public class LabelledCheckbox implements LabelledWidget{
|
||||
|
||||
private Button button;
|
||||
|
||||
private Label label;
|
||||
|
||||
/**
|
||||
* Create a Label and a Text.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string) {
|
||||
createLabelledButton(composite, string, 1, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Text.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param isFill
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string, boolean isFill) {
|
||||
createLabelledButton(composite, string, 1, isFill);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Button width specific styleField.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param int horizontalSpan
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string, int horizontalSpan) {
|
||||
createLabelledButton(composite, string, horizontalSpan, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Button width specific styleField.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param int horizontalSpan
|
||||
* @param styleField
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string, int horizontalSpan, int styleField) {
|
||||
createLabelledButton(composite, string, horizontalSpan, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Button width Gridata option FILL.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param styleField
|
||||
* @param int horizontalSpan
|
||||
* @param isFill
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string, int horizontalSpan, boolean isFill) {
|
||||
createLabelledButton(composite, string, horizontalSpan, isFill);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Button width specific styleField and Gridata option FILL.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param int horizontalSpan
|
||||
* @param styleField
|
||||
* @param isFill
|
||||
*/
|
||||
public LabelledCheckbox(Composite composite, String string, int horizontalSpan, int styleField, boolean isFill) {
|
||||
createLabelledButton(composite, string, horizontalSpan, isFill);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Label and a Button width specific styleField and Gridata option FILL.
|
||||
*
|
||||
* @param composite
|
||||
* @param string
|
||||
* @param int horizontalSpan
|
||||
* @param styleField
|
||||
* @param isFill
|
||||
*/
|
||||
private void createLabelledButton(Composite composite, String string, int horizontalSpan, boolean isFill) {
|
||||
label = new Label(composite, SWT.LEFT);
|
||||
if (string != null) {
|
||||
label.setText(string);
|
||||
}
|
||||
|
||||
button = new Button(composite, SWT.CHECK);
|
||||
int gridDataStyle = SWT.NONE;
|
||||
if (isFill) {
|
||||
gridDataStyle = SWT.FILL;
|
||||
}
|
||||
GridData gridData = new GridData(gridDataStyle, SWT.CENTER, true, false);
|
||||
gridData.horizontalSpan = horizontalSpan;
|
||||
button.setLayoutData(gridData);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* setToolTipText to Text Object.
|
||||
*
|
||||
* @param string
|
||||
*/
|
||||
public void setToolTipText(final String string) {
|
||||
button.setToolTipText(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* is Checkbox Selected.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public Boolean isSelected() {
|
||||
return button.getSelection();
|
||||
}
|
||||
|
||||
/**
|
||||
* setText to Label Object.
|
||||
*
|
||||
* @param string
|
||||
*/
|
||||
public void setLabelText(final String string) {
|
||||
if (string != null) {
|
||||
label.setText(string);
|
||||
} else {
|
||||
label.setText(""); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* setEditable to Button and Label Object.
|
||||
*
|
||||
* @param boolean
|
||||
*/
|
||||
public void forceFocus() {
|
||||
setEnabled(true);
|
||||
button.forceFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* setEnabled to Button and Label Object.
|
||||
*
|
||||
* @param boolean
|
||||
*/
|
||||
public void setEnabled(final boolean visible) {
|
||||
button.setEnabled(visible);
|
||||
label.setEnabled(visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* setVisible to Button and Label Object.
|
||||
*
|
||||
* @param boolean
|
||||
*/
|
||||
public void setVisible(final boolean visible) {
|
||||
button.setVisible(visible);
|
||||
label.setVisible(visible);
|
||||
}
|
||||
|
||||
public void setVisible(final boolean visible, final boolean exclude) {
|
||||
Control[] controls = new Control[] { label, button };
|
||||
for (Control control : controls) {
|
||||
control.setVisible(visible);
|
||||
if (control.getLayoutData() instanceof GridData) {
|
||||
((GridData) control.getLayoutData()).exclude = exclude;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* addListener to Button Object.
|
||||
*
|
||||
* @param eventType
|
||||
* @param listener
|
||||
*/
|
||||
public void addListener(int eventType, Listener listener) {
|
||||
button.addListener(eventType, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* addFocusListener to Button Object.
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void addFocusListener(FocusListener listener) {
|
||||
button.addFocusListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(String value) {
|
||||
button.setSelection(Boolean.parseBoolean(value));
|
||||
}
|
||||
|
||||
public void addSelectionListener(SelectionListener listener) {
|
||||
button.addSelectionListener(listener);
|
||||
}
|
||||
|
||||
public boolean getSelection() {
|
||||
return button.getSelection();
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Text;
|
||||
* $Id: LabelledText.java 7038 2007-11-15 14:05:48Z plegall $
|
||||
*
|
||||
*/
|
||||
public class LabelledText {
|
||||
public class LabelledText implements LabelledWidget{
|
||||
|
||||
private Text text;
|
||||
|
||||
@@ -297,6 +297,16 @@ public class LabelledText {
|
||||
label.setVisible(visible);
|
||||
}
|
||||
|
||||
public void setVisible(final boolean visible, final boolean exclude) {
|
||||
Control[] controls = new Control[] { label, text };
|
||||
for (Control control : controls) {
|
||||
control.setVisible(visible);
|
||||
if (control.getLayoutData() instanceof GridData) {
|
||||
((GridData) control.getLayoutData()).exclude = exclude;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isVisiable() {
|
||||
return text.isVisible() && label.isVisible();
|
||||
}
|
||||
@@ -472,4 +482,9 @@ public class LabelledText {
|
||||
text.getParent().layout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(String value) {
|
||||
this.setText(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.talend.commons.ui.swt.formtools;
|
||||
|
||||
public interface LabelledWidget {
|
||||
|
||||
// Set the value of the widget
|
||||
public void set(String value);
|
||||
|
||||
public void setVisible(boolean visible, boolean exclude);
|
||||
}
|
||||
@@ -16,8 +16,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.viewers.ICellEditorListener;
|
||||
import org.eclipse.jface.viewers.TextCellEditor;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.data.ModifiedObjectInfo;
|
||||
import org.talend.commons.ui.runtime.thread.AsynchronousThreading;
|
||||
@@ -39,6 +41,8 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
|
||||
protected TableViewerCreatorColumn column;
|
||||
|
||||
protected TableViewerCreator tableViewerCreator;
|
||||
|
||||
private Color tableBackground = ColorConstants.getTableBackgroundColor();
|
||||
|
||||
/**
|
||||
* DOC amaumont CellEditorListener constructor comment.
|
||||
@@ -89,7 +93,7 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
|
||||
final String errorMessage = validateValue(newValue, beanPosition);
|
||||
if (errorMessage == null) {
|
||||
newValidValueTyped(beanPosition, lastValidValue, newValue, state);
|
||||
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
text.setBackground(tableBackground);
|
||||
lastValidValue = newValue;
|
||||
} else {
|
||||
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_RED));
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
|
||||
/**
|
||||
* Figure managing some simple HTML styles. <br/>
|
||||
@@ -77,6 +78,8 @@ public class SimpleHtmlFigure extends Figure {
|
||||
private static Font boldFont = null;
|
||||
|
||||
private static Font boldItalicFont = null;
|
||||
|
||||
private static final Color DEFAULT_LABEL_COLOR = ITalendThemeService.getColor("NODE_FIGURE_LABEL_FORCEGROUND").orElse(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
|
||||
|
||||
/**
|
||||
* Constructs a new SimpleHtmlFigure.
|
||||
@@ -262,6 +265,8 @@ public class SimpleHtmlFigure extends Figure {
|
||||
label.setFont(fontToUse);
|
||||
if (colorStack.size() > 0) {
|
||||
label.setForegroundColor(colorStack.get(colorStack.size() - 1));
|
||||
} else {
|
||||
label.setForegroundColor(DEFAULT_LABEL_COLOR); // Set label default foreground color
|
||||
}
|
||||
horizContainer.add(label);
|
||||
}
|
||||
|
||||
@@ -285,6 +285,30 @@
|
||||
type="INFORMIX">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="INGRES"
|
||||
withSchema="true"
|
||||
input="tIngresInput"
|
||||
output="tIngresOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="INGRES">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="VECTORWISE"
|
||||
withSchema="true"
|
||||
input="tVectorWiseInput"
|
||||
output="tVectorWiseOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="VECTORWISE">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="JAVADB"
|
||||
withSchema="true"
|
||||
|
||||
@@ -39,6 +39,19 @@ public final class Constant {
|
||||
*/
|
||||
public static final String ITEM_EVENT_PROPERTY_KEY = "item"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
|
||||
* cloudVersion string.
|
||||
*/
|
||||
public static final String VERSION_EVENT_CLOUD_KEY = "cloudVersion"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
|
||||
* cloudName string.
|
||||
*/
|
||||
public static final String VERSION_EVENT_CLOUD_NAME = "cloudName"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
@@ -56,6 +69,11 @@ public final class Constant {
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_EVENT_SUFFIX = "project"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* suffix used when issuing an event on the OSGI event bus when published to cloud.
|
||||
*/
|
||||
public static final String CLOUD_PUBLISH_EVENT_SUFFIX = "cloud"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.talend.repository.model.RepositoryConstants;
|
||||
*/
|
||||
public interface FileConstants {
|
||||
|
||||
String DOT = ".";
|
||||
|
||||
String OLD_TALEND_PROJECT_FILENAME = "talendProject"; //$NON-NLS-1$
|
||||
|
||||
String LOCAL_PROJECT_FILENAME = "talend.project"; //$NON-NLS-1$
|
||||
@@ -112,5 +114,4 @@ public interface FileConstants {
|
||||
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
|
||||
|
||||
String MAVEN_FOLDER_NAME = "MAVEN-INF";
|
||||
|
||||
}
|
||||
|
||||
@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=Action not available
|
||||
ConvertJobsUtil.warning.title=Warning
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Create stats log and implicit parameters
|
||||
WizardPageAPIDefinition_operationIdMissing=API is missing operationIds. operationIds are used to initialize tRESTRequest/cRest output flows. See tRESTRequest/cRest online help.
|
||||
|
||||
@@ -168,7 +168,8 @@ ProjectRepositoryNode.sapFunctions.inputSchema=Lecture
|
||||
ProjectRepositoryNode.sapFunctions.outputSchema=Sortie
|
||||
ProjectRepositoryNode.sapIDocs=SAP IDoc
|
||||
ProjectRepositoryNode.sapTables=Tables SAP
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=ADSO SAP
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (Entr\u00E9e)
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (Sortie)
|
||||
ProjectRepositoryNode.sapBWDataSource=Source des donn\u00E9es SAP
|
||||
ProjectRepositoryNode.sapBWDataStoreObject=Objet Data Store SAP
|
||||
ProjectRepositoryNode.sapBWInfoCube=InfoCube SAP
|
||||
@@ -203,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=Action non disponible
|
||||
ConvertJobsUtil.warning.title=Avertissement
|
||||
ConvertJobsUtil.warning.message=Le framework cible n'est pas totalement support\u00E9 dans cette version.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Cr\u00E9er des logs de stat et des param\u00E8tres implicites.
|
||||
WizardPageAPIDefinition_operationIdMissing=Des operationIds manquent dans l'API. Ces operationIds sont utilis\u00E9s pour initialiser les flux de sortie du tRESTRequest/cRest. Consultez l'aide en ligne des composants tRESTRequest/cRest.
|
||||
|
||||
@@ -56,7 +56,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
|
||||
PropertiesWizardPage.Description=\u8AAC\u660E
|
||||
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
|
||||
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
|
||||
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
PropertiesWizardPage.Name=\u540D\u524D
|
||||
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
|
||||
@@ -156,7 +156,7 @@ ProjectRepositoryNode.invalidItem=\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0
|
||||
ProjectRepositoryNode.columns=\u30AB\u30E9\u30E0
|
||||
ProjectRepositoryNode.validationRules=\u691C\u8A3C\u30EB\u30FC\u30EB
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.genericSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.genericSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.queries=\u30AF\u30A8\u30EA\u30FC
|
||||
ProjectRepositoryNode.synonymSchemas=\u30B7\u30CE\u30CB\u30E0\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.calculationViewSchemas=\u8A08\u7B97\u30D3\u30E5\u30FC\u30B9\u30AD\u30FC\u30DE
|
||||
@@ -168,7 +168,8 @@ ProjectRepositoryNode.sapFunctions.inputSchema=\u5165\u529B
|
||||
ProjectRepositoryNode.sapFunctions.outputSchema=\u51FA\u529B
|
||||
ProjectRepositoryNode.sapIDocs=SAP iDocs
|
||||
ProjectRepositoryNode.sapTables=SAP\u30C6\u30FC\u30D6\u30EB
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=SAP ADSO
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (\u5165\u529B)
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (\u51FA\u529B)
|
||||
ProjectRepositoryNode.sapBWDataSource=SAP DataSource
|
||||
ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
|
||||
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
|
||||
@@ -203,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=\u4F7F\u7528\u3067\u304D\u306A\u3044
|
||||
ConvertJobsUtil.warning.title=\u8B66\u544A
|
||||
ConvertJobsUtil.warning.message=\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u304C\u5B8C\u5168\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u7D71\u8A08\u30ED\u30B0\u3068\u6697\u9ED9\u7684\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u4F5C\u6210
|
||||
WizardPageAPIDefinition_operationIdMissing=API\u3067operationIds\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002operationIds\u306F\u3001tRESTRequest/cRest\u51FA\u529B\u30D5\u30ED\u30FC\u3092\u521D\u671F\u5316\u3059\u308B\u305F\u3081\u306B\u4F7F\u308F\u308C\u307E\u3059\u3002tRESTRequest/cRest\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30D8\u30EB\u30D7\u3092\u3054\u89A7\u304F\u3060\u3055\u3044\u3002
|
||||
|
||||
@@ -168,7 +168,8 @@ ProjectRepositoryNode.sapFunctions.inputSchema=\u8F93\u5165
|
||||
ProjectRepositoryNode.sapFunctions.outputSchema=\u8F93\u51FA
|
||||
ProjectRepositoryNode.sapIDocs=SAP iDocs
|
||||
ProjectRepositoryNode.sapTables=SAP \u8868
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=SAP ADSO
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (\u8F93\u5165)
|
||||
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (\u8F93\u51FA)
|
||||
ProjectRepositoryNode.sapBWDataSource=SAP DataSource
|
||||
ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
|
||||
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
|
||||
@@ -203,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=\u64CD\u4F5C\u4E0D\u53EF\u7528
|
||||
ConvertJobsUtil.warning.title=\u8B66\u544A
|
||||
ConvertJobsUtil.warning.message=\u6B64\u7248\u672C\u4E0D\u5B8C\u5168\u652F\u6301\u76EE\u6807\u6846\u67B6.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u521B\u5EFA\u7EDF\u8BA1\u65E5\u5FD7\u548C\u9690\u5F0F\u53C2\u6570
|
||||
WizardPageAPIDefinition_operationIdMissing=API \u7F3A\u5931 operationId \u53C2\u6570\uFF0C\u8FD9\u4E9B operationId \u53C2\u6570\u7528\u6765\u521D\u59CB\u5316 tRESTRequest \u6216 cRest \u8F93\u51FA\u6D41\u3002\u8BF7\u53C2\u89C1 tRESTRequest \u6216 cRest \u5728\u7EBF\u5E2E\u52A9\u6587\u6863\u3002
|
||||
|
||||
@@ -67,6 +67,7 @@ import org.talend.core.model.repository.Folder;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.LockInfo;
|
||||
import org.talend.core.model.repository.RepositoryViewObject;
|
||||
import org.talend.core.model.routines.RoutinesUtil;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.utils.XmiResourceManager;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -260,6 +261,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isAllowMultipleName = (type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
|
||||
String path = "";
|
||||
if (item.getState() != null) {
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Level;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SQLPatternItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.pendo.AbstractPendoTrackManager;
|
||||
import org.talend.core.pendo.PendoDataTrackFactory;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.SignatureStatus;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.TOSProdNameEnum;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.ValueEnum;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil;
|
||||
import org.talend.core.pendo.TrackEvent;
|
||||
import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
import org.talend.core.pendo.properties.PendoSignLogonProperties;
|
||||
import org.talend.utils.migration.MigrationTokenUtil;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoItemSignatureManager extends AbstractPendoTrackManager {
|
||||
|
||||
private static PendoItemSignatureManager manager;
|
||||
|
||||
private static boolean isTrackAvailable;
|
||||
|
||||
static {
|
||||
manager = new PendoItemSignatureManager();
|
||||
try {
|
||||
isTrackAvailable = PluginChecker.isTIS() && PendoDataTrackFactory.getInstance().isTrackSendAvailable();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
}
|
||||
|
||||
private PendoItemSignatureManager() {
|
||||
}
|
||||
|
||||
public static PendoItemSignatureManager getInstance() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
private Set<String> signByLoginMigrationItems = new HashSet<String>();
|
||||
|
||||
public void countItemSignByMigration(String file) {
|
||||
if (!isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
|
||||
signByLoginMigrationItems.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
public IPendoDataProperties collectProperties() {
|
||||
ICoreService coreService = ICoreService.get();
|
||||
if (coreService == null || !isTrackAvailable) {
|
||||
return null;
|
||||
}
|
||||
PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
|
||||
try {
|
||||
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
|
||||
|
||||
String seperator = "@";
|
||||
Map<String, Integer> tosUnsignItemMap = new HashMap<String, Integer>();
|
||||
Map<String, Integer> invalidItemVersionMap = new HashMap<String, Integer>();
|
||||
Set<String> checkedItem = new HashSet<String>();
|
||||
ProxyRepositoryFactory proxyRepositoryFactory = ProxyRepositoryFactory.getInstance();
|
||||
ERepositoryObjectType[] types = (ERepositoryObjectType[]) ERepositoryObjectType.values();
|
||||
for (ERepositoryObjectType type : types) {
|
||||
List<IRepositoryViewObject> allObjectList = proxyRepositoryFactory.getAll(type);
|
||||
for (IRepositoryViewObject repositoryObject : allObjectList) {
|
||||
Property property = repositoryObject.getProperty();
|
||||
if (property == null || property.eResource() == null) {
|
||||
continue;
|
||||
}
|
||||
String itemKey = repositoryObject.getRepositoryObjectType() + seperator + property.getId() + seperator
|
||||
+ property.getVersion();
|
||||
if (isBuiltInItem(repositoryObject) || checkedItem.contains(itemKey)) {
|
||||
continue;
|
||||
}
|
||||
checkedItem.add(itemKey);
|
||||
Integer verifyResult = null;
|
||||
try {
|
||||
verifyResult = coreService.getSignatureVerifyResult(property, null, false);
|
||||
if (verifyResult != null) {
|
||||
switch (verifyResult) {
|
||||
case SignatureStatus.V_VALID:
|
||||
itemSignProperties.setValidItems(itemSignProperties.getValidItems() + 1);
|
||||
break;
|
||||
case SignatureStatus.V_UNSIGNED:
|
||||
String itemProductName = PendoItemSignatureUtil
|
||||
.getItemProductName(property);
|
||||
if (StringUtils.isNotBlank(itemProductName)) {
|
||||
String tosCategory = TOSProdNameEnum.getTOSCategoryByProdName(itemProductName);
|
||||
if (StringUtils.isBlank(tosCategory)) {
|
||||
itemSignProperties.setUnsignEEItems(itemSignProperties.getUnsignEEItems() + 1);
|
||||
} else {
|
||||
if (tosUnsignItemMap.get(tosCategory) == null) {
|
||||
tosUnsignItemMap.put(tosCategory, 0);
|
||||
}
|
||||
tosUnsignItemMap.put(tosCategory, tosUnsignItemMap.get(tosCategory) + 1);
|
||||
}
|
||||
}
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
break;
|
||||
default:
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
if (verifyResult == null) {
|
||||
// exception during verify
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
itemSignProperties.setInvalidItemSourceVersion(getSortInvalidItems(invalidItemVersionMap));
|
||||
itemSignProperties.setUnsignSEItems(getSortTOSUnsignItems(tosUnsignItemMap));
|
||||
|
||||
itemSignProperties.setStudioVersion(PendoItemSignatureUtil.getStudioVersion());
|
||||
if (coreService.isInValidGP()) {
|
||||
itemSignProperties.setGracePeriod(ValueEnum.YES.getDisplayValue());
|
||||
} else {
|
||||
itemSignProperties.setGracePeriod(ValueEnum.NO.getDisplayValue());
|
||||
}
|
||||
String prodDate = PendoItemSignatureUtil.formatDate(System.getProperty(PendoItemSignatureUtil.PROD_DATE_ID),
|
||||
"yyyy-MM-dd");
|
||||
itemSignProperties.setInstallDate(prodDate);
|
||||
String projectCreateDate = PendoItemSignatureUtil.getCurrentProjectCreateDate();
|
||||
itemSignProperties.setProjectCreateDate(PendoItemSignatureUtil.formatDate(projectCreateDate, "yyyy-MM-dd"));
|
||||
|
||||
String value = System.getProperty(PendoItemSignatureUtil.MIGRATION_TOKEN_KEY);
|
||||
Map<String, Date> tokenTime = MigrationTokenUtil.getMigrationTokenTime(value);
|
||||
if (tokenTime == null || tokenTime.isEmpty()) {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.NOT_APPLICATE.getDisplayValue());
|
||||
} else {
|
||||
String customer = coreService.getLicenseCustomer();
|
||||
Date tokenDate = tokenTime.get(customer);
|
||||
Date currentDate = new Date();
|
||||
if (tokenDate != null && tokenDate.after(currentDate)) {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.YES.getDisplayValue());
|
||||
} else {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.NO.getDisplayValue());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return itemSignProperties;
|
||||
|
||||
}
|
||||
|
||||
private void addInvalidItemVersion(Property property, Map<String, Integer> invalidItemVersionMap) {
|
||||
String itemProductVersion = PendoItemSignatureUtil.getItemProductVersion(property);
|
||||
if (StringUtils.isNotBlank(itemProductVersion)) {
|
||||
if (invalidItemVersionMap.get(itemProductVersion) == null) {
|
||||
invalidItemVersionMap.put(itemProductVersion, 0);
|
||||
}
|
||||
invalidItemVersionMap.put(itemProductVersion, invalidItemVersionMap.get(itemProductVersion) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isBuiltInItem(IRepositoryViewObject repositoryObject) {
|
||||
if (repositoryObject.getProperty().getItem() instanceof SQLPatternItem) {
|
||||
SQLPatternItem sqlPatternItem = (SQLPatternItem) repositoryObject.getProperty().getItem();
|
||||
if (sqlPatternItem.isSystem()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (repositoryObject.getProperty().getItem() instanceof RoutineItem) {
|
||||
RoutineItem routineItem = (RoutineItem) repositoryObject.getProperty().getItem();
|
||||
if (routineItem.isBuiltIn()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String getSortTOSUnsignItems(Map<String, Integer> tosUnsignItemMap) {
|
||||
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(tosUnsignItemMap.entrySet());
|
||||
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>() {
|
||||
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
|
||||
List<TOSProdNameEnum> categoryList = Arrays.asList(TOSProdNameEnum.values());
|
||||
TOSProdNameEnum category1 = TOSProdNameEnum.valueOf(o1.getKey());
|
||||
TOSProdNameEnum category2 = TOSProdNameEnum.valueOf(o2.getKey());
|
||||
return categoryList.indexOf(category1) - categoryList.indexOf(category2);
|
||||
}
|
||||
});
|
||||
Map<String, Integer> tosUnsignMap = new LinkedHashMap<String, Integer>();
|
||||
resultMapList.forEach(entry -> {
|
||||
tosUnsignMap.put(entry.getKey(), entry.getValue());
|
||||
});
|
||||
return PendoTrackDataUtil.convertEntityJsonString(tosUnsignMap);
|
||||
}
|
||||
|
||||
private String getSortInvalidItems(Map<String, Integer> invalidItemVersionMap) {
|
||||
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(
|
||||
invalidItemVersionMap.entrySet());
|
||||
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>(){
|
||||
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
|
||||
return o1.getKey().compareTo(o2.getKey());
|
||||
}
|
||||
|
||||
});
|
||||
Map<String, Integer> invalidMap = new LinkedHashMap<String, Integer>();
|
||||
resultMapList.forEach(entry -> {
|
||||
invalidMap.put(entry.getKey(), entry.getValue());
|
||||
});
|
||||
return PendoTrackDataUtil.convertEntityJsonString(invalidMap);
|
||||
}
|
||||
|
||||
public void sendTrackToPendo() {
|
||||
if (!isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
super.sendTrackToPendo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackEvent getTrackEvent() {
|
||||
return TrackEvent.ITEM_SIGNATURE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,7 +16,6 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
@@ -94,12 +93,12 @@ import org.talend.core.context.CommandLineContext;
|
||||
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.hadoop.IHadoopDistributionService;
|
||||
import org.talend.core.model.components.IComponentsService;
|
||||
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;
|
||||
@@ -154,6 +153,7 @@ import org.talend.core.runtime.services.IMavenUIService;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.runtime.util.JavaHomeUtil;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.service.IComponentJsonformGeneratorService;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.service.IDetectCVEService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
@@ -240,14 +240,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return singleton;
|
||||
}
|
||||
|
||||
private ICoreService getCoreService() {
|
||||
public ICoreService getCoreService() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private IRunProcessService getRunProcessService() {
|
||||
public IRunProcessService getRunProcessService() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @param project
|
||||
* @throws LoginException
|
||||
*/
|
||||
private void checkProjectCompatibility(Project project) throws LoginException {
|
||||
public void checkProjectCompatibility(Project project) throws LoginException {
|
||||
IMigrationToolService migrationToolService = GlobalServiceRegister.getDefault().getService(
|
||||
IMigrationToolService.class);
|
||||
// update migration system.
|
||||
@@ -1849,7 +1849,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @param project
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private void emptyTempFolder(Project project) throws PersistenceException {
|
||||
public void emptyTempFolder(Project project) throws PersistenceException {
|
||||
try {
|
||||
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
@@ -2211,6 +2211,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
// need to set m2
|
||||
LoginTaskRegistryReader loginTaskRegistryReader = new LoginTaskRegistryReader();
|
||||
ILoginTask[] allLoginTasks = loginTaskRegistryReader.getAllCommandlineTaskListInstance();
|
||||
@@ -2278,14 +2281,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
// for new added mapping file, sync to project mapping folder
|
||||
MetadataTalendType.syncNewMappingFileToProject();
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
@@ -2325,6 +2320,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (monitor != null && monitor.isCanceled()) {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
}
|
||||
PendoItemSignatureManager.getInstance().sendTrackToPendo();
|
||||
|
||||
boolean isCommandLineLocalRefProject = false;
|
||||
CommandLineContext commandLineContext = (CommandLineContext) CoreRuntimePlugin.getInstance().getContext()
|
||||
@@ -2363,17 +2359,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
TimeMeasurePerformance.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);
|
||||
}
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITDQRepositoryService.class);
|
||||
@@ -2395,11 +2380,22 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
String str[] = new String[] { getRepositoryContext().getUser() + "", projectManager.getCurrentProject() + "" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.loggedOn", str)); //$NON-NLS-1$
|
||||
|
||||
// no performance impact for studio or commandline
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentJsonformGeneratorService.class)) {
|
||||
IComponentJsonformGeneratorService jsonformSvc = GlobalServiceRegister.getDefault().getService(IComponentJsonformGeneratorService.class);
|
||||
if (jsonformSvc != null && IComponentJsonformGeneratorService.isEnabled()) {
|
||||
jsonformSvc.generate(null);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (LoginException e) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
if (!LoginException.RESTART.equals(e.getKey())) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
} catch (PersistenceException e) {
|
||||
@@ -2425,6 +2421,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void initDynamicDistribution(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (BigDataBasicUtil.isDynamicDistributionLoaded(monitor)) {
|
||||
BigDataBasicUtil.reloadAllDynamicDistributions(monitor);
|
||||
} else {
|
||||
BigDataBasicUtil.loadDynamicDistribution(monitor);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
// to fix the ops4j and m2e.core maven handler conflict issue TUP-31484
|
||||
private void unregisterM2EServiceBeforeLogon() {
|
||||
@@ -2520,7 +2528,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
|
||||
public void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
|
||||
if (ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet().size() > 0) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String technicalLabel : ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet()) {
|
||||
@@ -2565,7 +2573,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
public void logOffProject() {
|
||||
// getRepositoryContext().setProject(null);
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
ProjectRepositoryNode root = ProjectRepositoryNode.getInstance();
|
||||
if (root != null) {
|
||||
@@ -2621,6 +2628,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
fullLogonFinished = false;
|
||||
}
|
||||
|
||||
@@ -3018,4 +3026,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
}
|
||||
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.isCancelled = cancelled;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return this.isCancelled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,125 +1,127 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
|
||||
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
|
||||
/**
|
||||
* Provides, using extension points, implementation of many factories.
|
||||
*
|
||||
* <ul>
|
||||
* <li>IProcessFactory</li>
|
||||
* </ul>
|
||||
*
|
||||
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
|
||||
*/
|
||||
public class RepositoryFactoryProvider {
|
||||
|
||||
private static List<IRepositoryFactory> list = null;
|
||||
|
||||
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
|
||||
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
|
||||
"RepositoryFactory", 1, -1); //$NON-NLS-1$
|
||||
|
||||
public static List<IRepositoryFactory> getAvailableRepositories() {
|
||||
if (list == null) {
|
||||
list = new ArrayList<IRepositoryFactory>();
|
||||
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
|
||||
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
|
||||
String hiddenRepository[] = new String[]{};
|
||||
if (hiddenRepos != null) {
|
||||
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
boolean isPoweredByTalend = false;
|
||||
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
|
||||
.getService(IBrandingService.class);
|
||||
isPoweredByTalend = brandingService.isPoweredbyTalend();
|
||||
for (IConfigurationElement current : extension) {
|
||||
try {
|
||||
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
|
||||
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
|
||||
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
|
||||
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
|
||||
|
||||
// Getting dynamic login fields:
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
|
||||
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
|
||||
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
|
||||
currentAction.getFields().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
|
||||
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
|
||||
currentAction.getButtons().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
|
||||
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name")); //$NON-NLS-1$
|
||||
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
|
||||
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
|
||||
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
|
||||
key.addChoice(value, label);
|
||||
}
|
||||
currentAction.getChoices().add(key);
|
||||
}
|
||||
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
|
||||
continue;
|
||||
}
|
||||
list.add(currentAction);
|
||||
} catch (CoreException e) {
|
||||
// e.printStackTrace();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static IRepositoryFactory getRepositoriyById(String id) {
|
||||
for (IRepositoryFactory current : getAvailableRepositories()) {
|
||||
if (current.getId().equals(id)) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
|
||||
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
|
||||
/**
|
||||
* Provides, using extension points, implementation of many factories.
|
||||
*
|
||||
* <ul>
|
||||
* <li>IProcessFactory</li>
|
||||
* </ul>
|
||||
*
|
||||
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
|
||||
*/
|
||||
public class RepositoryFactoryProvider {
|
||||
|
||||
private static List<IRepositoryFactory> list = null;
|
||||
|
||||
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
|
||||
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
|
||||
"RepositoryFactory", 1, -1); //$NON-NLS-1$
|
||||
|
||||
public static synchronized List<IRepositoryFactory> getAvailableRepositories() {
|
||||
if (list == null) {
|
||||
list = new ArrayList<IRepositoryFactory>();
|
||||
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
|
||||
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
|
||||
String hiddenRepository[] = new String[]{};
|
||||
if (hiddenRepos != null) {
|
||||
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
boolean isPoweredByTalend = false;
|
||||
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
|
||||
.getService(IBrandingService.class);
|
||||
isPoweredByTalend = brandingService.isPoweredbyTalend();
|
||||
for (IConfigurationElement current : extension) {
|
||||
try {
|
||||
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
|
||||
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
|
||||
continue;
|
||||
}
|
||||
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
|
||||
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
|
||||
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
|
||||
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
|
||||
|
||||
// Getting dynamic login fields:
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
|
||||
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
|
||||
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
|
||||
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
|
||||
currentAction.getFields().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
|
||||
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name"), //$NON-NLS-1$
|
||||
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
|
||||
currentAction.getButtons().add(key);
|
||||
}
|
||||
|
||||
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
|
||||
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
|
||||
currentLoginField.getAttribute("name")); //$NON-NLS-1$
|
||||
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
|
||||
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
|
||||
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
|
||||
key.addChoice(value, label);
|
||||
}
|
||||
currentAction.getChoices().add(key);
|
||||
}
|
||||
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
|
||||
continue;
|
||||
}
|
||||
list.add(currentAction);
|
||||
} catch (CoreException e) {
|
||||
// e.printStackTrace();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static IRepositoryFactory getRepositoriyById(String id) {
|
||||
for (IRepositoryFactory current : getAvailableRepositories()) {
|
||||
if (current.getId().equals(id)) {
|
||||
return current;
|
||||
}
|
||||
}
|
||||
ExceptionHandler.log("Can't find repository factory for: " + id);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ public interface IGitInfoService extends IService {
|
||||
public Map<String, String> getGitInfo(Property property) throws Exception;
|
||||
|
||||
public boolean isPushedToRemote(Property property) throws Exception;
|
||||
|
||||
public String getProjectBranch(Project project)throws Exception;
|
||||
|
||||
public static IGitInfoService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGitInfoService.class)) {
|
||||
|
||||
@@ -17,14 +17,20 @@ import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.jface.viewers.IColorProvider;
|
||||
import org.eclipse.jface.viewers.IFontProvider;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.runtime.model.repository.ECDCStatus;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.IImage;
|
||||
@@ -77,13 +83,19 @@ import org.talend.utils.string.DigestUtil;
|
||||
*/
|
||||
public class RepositoryLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
|
||||
|
||||
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
|
||||
private static final String MERGED_PREFERENCED_ITEMS = "org.talend.core.repository.REPO_MERGED_REFERENCED_ITEMS_COLOR";
|
||||
|
||||
private static final Color STABLE_PRIMARY_ENTRY_COLOR = new Color(null, 0, 0, 0);
|
||||
private static final String LOCKED_ENTRY = "org.talend.core.repository.REPO_LOCKED_ENTRY";
|
||||
|
||||
private static final String STABLE_PRIMARY_ENTRY = "org.talend.core.repository.REPO_STABLE_PRIMARY_ENTRY_COLOR";
|
||||
|
||||
private static final String STABLE_SECONDARY_ENTRY = "org.talend.core.repository.REPO_STABLE_SECONDARY_ENTRY_COLOR";
|
||||
|
||||
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
|
||||
|
||||
protected static final Color INACTIVE_ENTRY_COLOR = new Color(null, 200, 200, 200);
|
||||
|
||||
private static final Color LOCKED_ENTRY = new Color(null, 200, 0, 0);
|
||||
private static final Color LOCKED_ENTRY_COLOR = new Color(null, 200, 0, 0);
|
||||
|
||||
private static final Color MERGED_REFERENCED_ITEMS_COLOR = new Color(null, 120, 120, 120);
|
||||
|
||||
@@ -100,6 +112,18 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
return view;
|
||||
}
|
||||
|
||||
private Color getStableSecondaryEntryColor() {
|
||||
return ITalendThemeService.getColor(STABLE_SECONDARY_ENTRY).orElse(STABLE_SECONDARY_ENTRY_COLOR);
|
||||
}
|
||||
|
||||
private Color getLockedEntryColor() {
|
||||
return ITalendThemeService.getColor(LOCKED_ENTRY).orElse(LOCKED_ENTRY_COLOR);
|
||||
}
|
||||
|
||||
private Color getMergedReferencedItemsColor() {
|
||||
return ITalendThemeService.getColor(MERGED_PREFERENCED_ITEMS).orElse(MERGED_REFERENCED_ITEMS_COLOR);
|
||||
}
|
||||
|
||||
public String getText(IRepositoryViewObject object) {
|
||||
StringBuffer string = new StringBuffer();
|
||||
string.append(object.getLabel());
|
||||
@@ -482,23 +506,13 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
RepositoryNode node = (RepositoryNode) element;
|
||||
switch (node.getType()) {
|
||||
case REFERENCED_PROJECT:
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
case STABLE_SYSTEM_FOLDER:
|
||||
if (node.getLabel().equals(ERepositoryObjectType.SNIPPETS.toString())) {
|
||||
return INACTIVE_ENTRY_COLOR;
|
||||
}
|
||||
if (node.getContentType() == ERepositoryObjectType.METADATA) {
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
}
|
||||
case SYSTEM_FOLDER:
|
||||
if (node.getContentType() == ERepositoryObjectType.PROCESS) {
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
}
|
||||
return STABLE_SECONDARY_ENTRY_COLOR;
|
||||
return getStableSecondaryEntryColor();
|
||||
default:
|
||||
ERepositoryStatus repositoryStatus = node.getObject().getRepositoryStatus();
|
||||
if (repositoryStatus == ERepositoryStatus.LOCK_BY_OTHER) {
|
||||
return LOCKED_ENTRY;
|
||||
return getLockedEntryColor();
|
||||
} else {
|
||||
if (PluginChecker.isRefProjectLoaded()) {
|
||||
IReferencedProjectService service = (IReferencedProjectService) GlobalServiceRegister.getDefault()
|
||||
@@ -510,7 +524,7 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
.getCurrentProject().getEmfProject();
|
||||
String projectLabel = object.getProjectLabel();
|
||||
if (!mainProject.getLabel().equals(projectLabel)) {
|
||||
return MERGED_REFERENCED_ITEMS_COLOR;
|
||||
return getMergedReferencedItemsColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -536,4 +550,43 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
refreshProperty = refresh;
|
||||
}
|
||||
|
||||
public static IPropertyChangeListener createPropertyChangeListener(TreeViewer treeViewer) {
|
||||
return new IPropertyChangeListener() {
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
String property = event.getProperty();
|
||||
if (property == null) {
|
||||
return;
|
||||
}
|
||||
boolean changed = false;
|
||||
switch (property) {
|
||||
case RepositoryLabelProvider.STABLE_PRIMARY_ENTRY:
|
||||
// case RepositoryLabelProvider.INACTIVE_ENTRY:
|
||||
// case RepositoryLabelProvider.LOCKED_ENTRY:
|
||||
// case RepositoryLabelProvider.MERGED_PREFERENCED_ITEMS:
|
||||
// case RepositoryLabelProvider.STABLE_SECONDARY_ENTRY:
|
||||
changed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (changed) {
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (treeViewer != null) {
|
||||
Control control = treeViewer.getControl();
|
||||
if (!control.isDisposed()) {
|
||||
treeViewer.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ 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;
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class AbstractResourceRepositoryContentHandler extends AbstractRepositoryContentHandler {
|
||||
|
||||
@@ -83,6 +84,10 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
|
||||
}
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
protected void copyScreenshotFile(Item originalItem, Item newItem) throws IOException {
|
||||
getXmiResourceManager().copyScreenshotFile(originalItem, newItem);
|
||||
}
|
||||
|
||||
protected XmiResourceManager getXmiResourceManager() {
|
||||
if (null == xmiResourceManager) {
|
||||
|
||||
@@ -48,6 +48,8 @@ import org.talend.commons.runtime.model.emf.provider.EmfResourcesFactoryReader;
|
||||
*/
|
||||
public class TalendResourceSet extends ResourceSetImpl {
|
||||
|
||||
private boolean showLog;
|
||||
|
||||
public TalendResourceSet() {
|
||||
super();
|
||||
|
||||
@@ -58,6 +60,14 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
getLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE);
|
||||
}
|
||||
|
||||
public boolean isShowLog() {
|
||||
return this.showLog;
|
||||
}
|
||||
|
||||
public void setShowLog(boolean showLog) {
|
||||
this.showLog = showLog;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -83,7 +93,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
Resource resource = map.get(uri);
|
||||
if (resource != null) {
|
||||
if (loadOnDemand && !resource.isLoaded()) {
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
@@ -99,7 +115,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
}
|
||||
if (theURIConverter.normalize(resource.getURI()).equals(normalizedURI)) {
|
||||
if (loadOnDemand && !resource.isLoaded()) {
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (map != null) {
|
||||
@@ -125,7 +147,13 @@ public class TalendResourceSet extends ResourceSetImpl {
|
||||
+ "'; a registered resource factory is needed");
|
||||
}
|
||||
|
||||
demandLoadHelper(resource);
|
||||
try {
|
||||
demandLoadHelper(resource);
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (map != null) {
|
||||
map.put(uri, resource);
|
||||
|
||||
@@ -390,6 +390,10 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad) {
|
||||
return getItemResource(getResourceSet(), item, forceLoad, false);
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad, boolean showLog) {
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -402,13 +406,23 @@ public class XmiResourceManager {
|
||||
} else {
|
||||
itemResourceURI = getItemResourceURI(getItemURI(item));
|
||||
}
|
||||
Resource itemResource = resourceSet.getResource(itemResourceURI, false);
|
||||
if (forceLoad && itemResource == null) {
|
||||
if (item instanceof FileItem) {
|
||||
itemResource = new ByteArrayResource(itemResourceURI);
|
||||
resourceSet.getResources().add(itemResource);
|
||||
Resource itemResource = null;
|
||||
try {
|
||||
if (resourceSet instanceof TalendResourceSet) {
|
||||
((TalendResourceSet) resourceSet).setShowLog(showLog);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, false);
|
||||
if (forceLoad && itemResource == null) {
|
||||
if (item instanceof FileItem) {
|
||||
itemResource = new ByteArrayResource(itemResourceURI);
|
||||
resourceSet.getResources().add(itemResource);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (showLog) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
itemResource = resourceSet.getResource(itemResourceURI, true);
|
||||
}
|
||||
return itemResource;
|
||||
}
|
||||
@@ -628,7 +642,7 @@ public class XmiResourceManager {
|
||||
|
||||
boolean isTestContainer = false;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
|
||||
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
|
||||
ITestContainerProviderService testContainerService = GlobalServiceRegister
|
||||
.getDefault().getService(ITestContainerProviderService.class);
|
||||
if (testContainerService != null) {
|
||||
isTestContainer = testContainerService.isTestContainerItem(property.getItem());
|
||||
|
||||
@@ -52,6 +52,7 @@ Export-Package: org.talend.analysistask,
|
||||
org.talend.core.model.xml,
|
||||
org.talend.core.nexus,
|
||||
org.talend.core.pendo,
|
||||
org.talend.core.pendo.mapper,
|
||||
org.talend.core.pendo.properties,
|
||||
org.talend.core.prefs,
|
||||
org.talend.core.repository,
|
||||
@@ -128,7 +129,8 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common
|
||||
org.talend.libraries.apache.common,
|
||||
org.talend.signon.util
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
@@ -137,3 +139,5 @@ Bundle-ClassPath: .,
|
||||
lib/delight-rhino-sandbox-0.0.15.jar,
|
||||
lib/rhino-1.7.13.jar
|
||||
Eclipse-RegisterBuddy: org.talend.testutils
|
||||
Import-Package: org.eclipse.equinox.p2.repository,
|
||||
org.eclipse.equinox.security.storage
|
||||
|
||||
@@ -21,7 +21,8 @@ bin.includes = META-INF/,\
|
||||
plugin_ja.properties,\
|
||||
plugin_ru.properties,\
|
||||
plugin_swtbot.properties,\
|
||||
plugin_zh_CN.properties
|
||||
plugin_zh_CN.properties,\
|
||||
resources/
|
||||
src.includes = META-INF/,\
|
||||
mappingMetadataTypes.xml,\
|
||||
mappings/,\
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dbType type="BOOL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOX" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BPCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTEA" 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" />
|
||||
@@ -36,7 +36,7 @@
|
||||
<dbType type="LINE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LSEG" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MACADDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<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"/>
|
||||
@@ -46,7 +46,7 @@
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="REFCURSOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="RELTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="RELTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGCLASS" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGOPER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGOPERATOR" ignoreLen="true" ignorePre="true" />
|
||||
@@ -60,12 +60,14 @@
|
||||
<dbType type="TIME" ignorePre="true" />
|
||||
<dbType type="TINTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMPTZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP WITH TIME ZONE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignorePre="true" />
|
||||
<dbType type="TIMETZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBIT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME WITH TIME ZONE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBIT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" defaultLength="200" ignorePre="true" />
|
||||
<dbType type="XID" ignoreLen="true" ignorePre="true" />
|
||||
|
||||
|
||||
<dbType type="_ABSTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_ACLITEM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BIT" ignoreLen="true" ignorePre="true" />
|
||||
@@ -119,38 +121,40 @@
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOL" default="true" />
|
||||
<dbType type="BOOLEAN" />
|
||||
<dbType type="BOOLEAN" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<talendType type="id_Byte">
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="BIT" default="true" />
|
||||
<dbType type="VARBIT" />
|
||||
<dbType type="BIT VARYING" />
|
||||
<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" />
|
||||
<dbType type="TEXT" />
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" default="true" />
|
||||
<dbType type="DATE" default="true" />
|
||||
<dbType type="ABSTIME" />
|
||||
<dbType type="TIMETZ" />
|
||||
<dbType type="TIME WITH TIME ZONE" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMPTZ" />
|
||||
<dbType type="TIMESTAMP WITH TIME ZONE" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL" />
|
||||
<dbType type="TINTERVAL" />
|
||||
<dbType type="RELTIME" />
|
||||
<dbType type="RELTIME" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="NUMERIC" default="true" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="REAL" />
|
||||
<dbType type="FLOAT8"/>
|
||||
@@ -161,8 +165,8 @@
|
||||
<dbType type="REAL" />
|
||||
<dbType type="FLOAT8" default="true" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
@@ -170,7 +174,7 @@
|
||||
<dbType type="REAL" />
|
||||
<dbType type="NUMERIC" />
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
<dbType type="DOUBLE PRECISION"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT2" />
|
||||
@@ -180,7 +184,7 @@
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="INTEGER" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="INT2" />
|
||||
@@ -188,8 +192,8 @@
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="SMALLINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="_POINT" />
|
||||
@@ -210,26 +214,26 @@
|
||||
<dbType type="_TIMESTAMPTZ" />
|
||||
<dbType type="_TIMESTAMP" />
|
||||
<dbType type="_TINTERVAL" />
|
||||
<dbType type="_XID" />
|
||||
<dbType type="ACLITEM" />
|
||||
<dbType type="BYTEA" />
|
||||
<dbType type="_XID" />
|
||||
<dbType type="ACLITEM" />
|
||||
<dbType type="BYTEA" />
|
||||
<dbType type="CID" />
|
||||
<dbType type="CIDR" />
|
||||
<dbType type="CIRCLE" />
|
||||
<dbType type="INET" />
|
||||
<dbType type="CIRCLE" />
|
||||
<dbType type="INET" />
|
||||
<dbType type="MACADDR" />
|
||||
<dbType type="MONEY" />
|
||||
<dbType type="MONEY" />
|
||||
<dbType type="OID" />
|
||||
<dbType type="PATH" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="REFCURSOR" />
|
||||
<dbType type="REGCLASS" />
|
||||
<dbType type="REGOPER" />
|
||||
<dbType type="REGOPERATOR" />
|
||||
<dbType type="REGPROC" />
|
||||
<dbType type="REGPROCEDURE" />
|
||||
<dbType type="REGTYPE" />
|
||||
<dbType type="SMGR" />
|
||||
<dbType type="REGTYPE" />
|
||||
<dbType type="SMGR" />
|
||||
<dbType type="TID" />
|
||||
<dbType type="XID" />
|
||||
<dbType type="_CHAR" />
|
||||
@@ -239,7 +243,7 @@
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIT VARYING" />
|
||||
<dbType type="_VARBIT" />
|
||||
<dbType type="_BIT" />
|
||||
<dbType type="_BIT" />
|
||||
<dbType type="_BOOL" />
|
||||
<dbType type="BOOLEAN" />
|
||||
<dbType type="BOX" />
|
||||
@@ -276,7 +280,7 @@
|
||||
<dbType type="OIDVECTOR" />
|
||||
<dbType type="_OIDVECTOR" />
|
||||
<dbType type="_PATH" />
|
||||
<dbType type="POINT" default="true" />
|
||||
<dbType type="POINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="INT2" default="true" />
|
||||
@@ -285,22 +289,22 @@
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
<dbType type="SMALLINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="BPCHAR" />
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="CHARACTER VARYING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="INT2" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT4" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
@@ -308,330 +312,336 @@
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHARACTER VARYING" >
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN" >
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SERIAL" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT8" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGSERIAL" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT4" >
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="REAL" >
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT8" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
<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"/>
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NUMERIC">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOL" >
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBIT" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT VARYING" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHARACTER" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BPCHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="ABSTIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMETZ" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME WITH TIME ZONE" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMPTZ" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP WITH TIME ZONE" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINTERVAL" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="RELTIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="ACLITEM" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTEA" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CIDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CIRCLE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INET" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MACADDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="PATH" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REFCURSOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGCLASS" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGOPER" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGOPERATOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGPROC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGPROCEDURE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGTYPE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMGR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="XID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOX" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT2VECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LINE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LSEG" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NAME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OIDVECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<!-- object -->
|
||||
<dbType type="_OIDVECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_PATH" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_NAME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_NUMERIC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_OID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_LSEG" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_MACADDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_MONEY" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_LINE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT2VECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT4" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INTERVAL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BOX" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BYTEA" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_VARCHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BPCHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CIDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CIRCLE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_DATE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_FLOAT8" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INET" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_ABSTIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_ACLITEM" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT8" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_VARBIT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BIT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BOOL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_POINT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_POLYGON" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_FLOAT4" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REFCURSOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGCLASS" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGOPER" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGOPERATOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGPROC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGPROCEDURE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGTYPE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_RELTIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TEXT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMETZ" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMESTAMPTZ" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMESTAMP" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TINTERVAL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_XID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
216
main/plugins/org.talend.core.runtime/mappings/mapping_Ingres.xml
Normal file
216
main/plugins/org.talend.core.runtime/mappings/mapping_Ingres.xml
Normal file
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="INGRES" id="ingres_id" label="Mapping Ingres"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="C" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONG NVARCHAR" ignorePre="true" />
|
||||
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="1200" 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="BYTE" default="true" />
|
||||
<dbType type="BYTE VARYING" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
<dbType type="C"/>
|
||||
<dbType type="TEXT"/>
|
||||
<dbType type="LONG VARCHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR"/>
|
||||
<dbType type="LONG NVARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" default="true" />
|
||||
<dbType type="ANSIDATE" />
|
||||
<dbType type="INGRESDATE" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL"/>
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="DECIMAL"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INTEGER" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
<dbType type="INTEGER"/>
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="MONEY" default="true"/>
|
||||
<dbType type="OBJECT_KEY" />
|
||||
<dbType type="TABLE_KEY" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="TINYINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONG VARCHAR" />
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR" />
|
||||
<dbType type="LONG NVARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="C"/>
|
||||
<dbType type="CHAR"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="ANSIDATE">
|
||||
<talendType type="id_Date" 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="BYTE">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE VARYING">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="C">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT4">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="INGRESDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OBJECT_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TABLE_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="VECTORWISE" id="vectorwise_id" label="Mapping VectorWise"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="C" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONG NVARCHAR" ignorePre="true" />
|
||||
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="1200" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="BYTE" default="true" />
|
||||
<dbType type="BYTE VARYING" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
<dbType type="C"/>
|
||||
<dbType type="TEXT"/>
|
||||
<dbType type="LONG VARCHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR"/>
|
||||
<dbType type="LONG NVARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="ANSIDATE" default="true"/>
|
||||
<dbType type="DATE"/>
|
||||
<dbType type="INGRESDATE" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL"/>
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="DECIMAL"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INTEGER" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
<dbType type="INTEGER"/>
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="MONEY" default="true"/>
|
||||
<dbType type="OBJECT_KEY" />
|
||||
<dbType type="TABLE_KEY" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="TINYINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONG VARCHAR" />
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR" />
|
||||
<dbType type="LONG NVARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="C"/>
|
||||
<dbType type="CHAR"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="ANSIDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE VARYING">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="C">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT4">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="INGRESDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OBJECT_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TABLE_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
|
||||
# Component
|
||||
tSnowflakeConnection=java.base/java.nio
|
||||
tSnowflakeClose=java.base/java.nio
|
||||
tSnowflakeCommit=java.base/java.nio
|
||||
tSnowflakeInput=java.base/java.nio
|
||||
tSnowflakeOutput=java.base/java.nio
|
||||
tSnowflakeOutputBulk=java.base/java.nio
|
||||
tSnowflakeOutputBulkExec=java.base/java.nio
|
||||
tSnowflakeRow=java.base/java.nio
|
||||
tSnowflakeBulkExec=java.base/java.nio
|
||||
tSnowflakeRollback=java.base/java.nio
|
||||
|
||||
tCouchbaseInput=java.base/java.lang.invoke
|
||||
tCouchbaseOutput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPInput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPOutput=java.base/java.lang.invoke
|
||||
|
||||
tWriteJSONField=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tFTPClose=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPConnection=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPDelete=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileExist=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileList=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileProperties=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPGet=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPPut=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPRename=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPTruncate=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
|
||||
tNeo4jBatchOutput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchOutputRelationship=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchSchema=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jClose=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jConnection=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jImportTool=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jInput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jRow=java.base/java.lang,java.base/sun.nio.ch
|
||||
|
||||
tMongoDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
tCosmosDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tMatchGroup=java.base/java.io
|
||||
tRuleSurvivorship=java.base/java.lang
|
||||
tRecordMatching=java.base/java.io
|
||||
tDqReportRun=java.base/java.lang,java.base/java.nio
|
||||
|
||||
tWebService=java.base/java.lang
|
||||
tWebServiceInput=java.base/java.lang
|
||||
|
||||
# TCK framework
|
||||
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
|
||||
|
||||
# BigData distribution
|
||||
SPARK_3_3_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_2_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_1_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_2_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
@@ -33,6 +33,13 @@ public class AnalysisReportRecorder extends ItemReportRecorder {
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
public AnalysisReportRecorder(IItemAnalysisTask task, SeverityOption severity, String detailMessage) {
|
||||
super();
|
||||
this.task = task;
|
||||
this.severity = severity;
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return task.getName();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.analysistask;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
|
||||
/**
|
||||
* created by hcyi on Oct 26, 2022
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public class DefaultItemsAnalysisTask extends AbstractItemAnalysisTask {
|
||||
|
||||
public DefaultItemsAnalysisTask() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Set<ERepositoryObjectType> getRepositoryObjectTypeScope() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnalysisReportRecorder> execute(Item item) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
@@ -50,7 +51,9 @@ import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
@@ -73,7 +76,7 @@ public class ItemAnalysisReportManager {
|
||||
private AtomicBoolean inGenerating = new AtomicBoolean(false);
|
||||
|
||||
public List<AnalysisReportRecorder> executeAnalysisTask(Project project) {
|
||||
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();
|
||||
List<AnalysisReportRecorder> analysisResultList = new ArrayList<AnalysisReportRecorder>();
|
||||
List<IItemAnalysisTask> analysisTasks = ItemAnalysisTaskRegistryReader.getInstance().getItemAnalysisTasks();
|
||||
@@ -105,6 +108,16 @@ public class ItemAnalysisReportManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
ItemAnalysisTaskRegistryReader.getInstance().getAllItemURIsMap().clear();
|
||||
ItemAnalysisTaskRegistryReader.getInstance().getDuplicatedItemURIsMap().clear();
|
||||
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
|
||||
if (designerCoreService != null) {
|
||||
List<AnalysisReportRecorder> recorder = designerCoreService.analysis(project);
|
||||
if (recorder != null && !recorder.isEmpty()) {
|
||||
analysisResultList.addAll(recorder);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -190,6 +203,42 @@ public class ItemAnalysisReportManager {
|
||||
inGenerating.set(newValue);
|
||||
}
|
||||
|
||||
public String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
|
||||
ERepositoryObjectType rootItemType = itemType;
|
||||
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
|
||||
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
List<String> typeLabels = new ArrayList<String>();
|
||||
findOutCompleteTypePath(rootItemType, typeLabels);
|
||||
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
|
||||
IRepositoryService repositoryService = IRepositoryService.get();
|
||||
if (repositoryService != null) {
|
||||
String standardNodeLabel = repositoryService.getStandardNodeLabel();
|
||||
if (StringUtils.isNotBlank(standardNodeLabel)) {
|
||||
typeLabels.add(standardNodeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (!typeLabels.isEmpty()) {
|
||||
for (int i = 0; i < typeLabels.size(); i++) {
|
||||
if (i != 0) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(typeLabels.get(i));
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
|
||||
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
|
||||
if (parentType != null) {
|
||||
findOutCompleteTypePath(parentType, typeLabels);
|
||||
}
|
||||
typeLabels.add(type.getLabel());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AnalysisReportAccessDialog extends Dialog {
|
||||
|
||||
@@ -32,6 +32,10 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
|
||||
|
||||
private static final ItemAnalysisTaskRegistryReader INSTANCE = new ItemAnalysisTaskRegistryReader();
|
||||
|
||||
private Map<String, String> allItemURIsMap = new HashMap<String, String>();
|
||||
|
||||
private Map<String, List<String>> duplicatedItemURIsMap = new HashMap<String, List<String>>();
|
||||
|
||||
public static ItemAnalysisTaskRegistryReader getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
@@ -81,4 +85,17 @@ public class ItemAnalysisTaskRegistryReader extends RegistryReader {
|
||||
idItemAnalysisTaskMap.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for allItemURIsMap.
|
||||
*
|
||||
* @return the allItemURIsMap
|
||||
*/
|
||||
public Map<String, String> getAllItemURIsMap() {
|
||||
return this.allItemURIsMap;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getDuplicatedItemURIsMap() {
|
||||
return this.duplicatedItemURIsMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.report;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.analysistask.ItemAnalysisReportManager;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
@@ -23,7 +21,6 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.ui.ITestContainerCoreService;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
@@ -34,8 +31,15 @@ public class ItemReportRecorder {
|
||||
|
||||
protected String detailMessage;
|
||||
|
||||
protected String currentItemPath;
|
||||
|
||||
protected String currentItemType;
|
||||
|
||||
public String getItemType() {
|
||||
String type = "";
|
||||
if (item == null) {
|
||||
return currentItemType;
|
||||
}
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (itemType != null) {
|
||||
if (ERepositoryObjectType.getAllTypesOfTestContainer().contains(itemType)) {
|
||||
@@ -43,7 +47,7 @@ public class ItemReportRecorder {
|
||||
if (parentJobItem != null) {
|
||||
ERepositoryObjectType parentJobType = ERepositoryObjectType.getItemType(parentJobItem);
|
||||
if (parentJobType != null) {
|
||||
String parentTypePath = getCompleteObjectTypePath(parentJobType);
|
||||
String parentTypePath = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(parentJobType);
|
||||
if (StringUtils.isNotBlank(parentTypePath)) {
|
||||
type = parentTypePath + "/";
|
||||
}
|
||||
@@ -51,7 +55,7 @@ public class ItemReportRecorder {
|
||||
}
|
||||
type += itemType;
|
||||
} else {
|
||||
type = getCompleteObjectTypePath(itemType);
|
||||
type = ItemAnalysisReportManager.getInstance().getCompleteObjectTypePath(itemType);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
@@ -59,6 +63,9 @@ public class ItemReportRecorder {
|
||||
|
||||
public String getItemPath() {
|
||||
String path = "";
|
||||
if (this.currentItemPath != null) {
|
||||
return this.currentItemPath;
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
|
||||
@@ -104,42 +111,6 @@ public class ItemReportRecorder {
|
||||
return parentJobItem;
|
||||
}
|
||||
|
||||
private String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
|
||||
ERepositoryObjectType rootItemType = itemType;
|
||||
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
|
||||
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
List<String> typeLabels = new ArrayList<String>();
|
||||
findOutCompleteTypePath(rootItemType, typeLabels);
|
||||
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
|
||||
IRepositoryService repositoryService = IRepositoryService.get();
|
||||
if (repositoryService != null) {
|
||||
String standardNodeLabel = repositoryService.getStandardNodeLabel();
|
||||
if (StringUtils.isNotBlank(standardNodeLabel)) {
|
||||
typeLabels.add(standardNodeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (!typeLabels.isEmpty()) {
|
||||
for (int i = 0; i < typeLabels.size(); i++) {
|
||||
if (i != 0) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(typeLabels.get(i));
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
|
||||
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
|
||||
if (parentType != null) {
|
||||
findOutCompleteTypePath(parentType, typeLabels);
|
||||
}
|
||||
typeLabels.add(type.getLabel());
|
||||
}
|
||||
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
@@ -148,6 +119,22 @@ public class ItemReportRecorder {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public String getCurrentItemPath() {
|
||||
return this.currentItemPath;
|
||||
}
|
||||
|
||||
public void setCurrentPath(String currentItemPath) {
|
||||
this.currentItemPath = currentItemPath;
|
||||
}
|
||||
|
||||
public String getCurrentItemType() {
|
||||
return this.currentItemType;
|
||||
}
|
||||
|
||||
public void setCurrentItemType(String currentItemType) {
|
||||
this.currentItemType = currentItemType;
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
return detailMessage;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ public final class JavaUtils {
|
||||
|
||||
public static final List<String> AVAILABLE_VERSIONS = Arrays.asList(JavaCore.VERSION_1_8 );
|
||||
|
||||
public static final String ALLOW_JAVA_INTERNAL_ACCESS = "allow.java.internal.access"; //$NON-NLS-1$
|
||||
|
||||
public static final String CUSTOM_ACCESS_SETTINGS = "custom.access.settings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROCESSOR_TYPE = "javaProcessor"; //$NON-NLS-1$
|
||||
|
||||
public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.talend.core.model.metadata.ColumnNameChanged;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
@@ -116,6 +117,7 @@ public interface ICoreService extends IService {
|
||||
|
||||
public String validateValueForDBType(String columnName);
|
||||
|
||||
@Deprecated
|
||||
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
|
||||
|
||||
public IPreferenceStore getPreferenceStore();
|
||||
@@ -124,6 +126,7 @@ public interface ICoreService extends IService {
|
||||
|
||||
public IMetadataTable convert(MetadataTable originalTable);
|
||||
|
||||
@Deprecated
|
||||
public void syncMappingsFileFromSystemToProject();
|
||||
|
||||
/**
|
||||
@@ -132,4 +135,17 @@ public interface ICoreService extends IService {
|
||||
*/
|
||||
void installComponents(IProgressMonitor monitor);
|
||||
|
||||
Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception;
|
||||
|
||||
String getLicenseCustomer();
|
||||
|
||||
boolean isInValidGP();
|
||||
|
||||
public static ICoreService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -109,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
|
||||
@@ -151,6 +155,10 @@ public interface ILibraryManagerService extends IService {
|
||||
public boolean contains(String jarName);
|
||||
|
||||
public void clearCache();
|
||||
|
||||
public void clearCache(boolean cleanIndex);
|
||||
|
||||
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -53,5 +53,5 @@ public interface ILibraryManagerUIService extends IService {
|
||||
|
||||
public boolean confirmDialog(String originalJarFileName);
|
||||
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue);
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import org.talend.core.model.process.AbstractExternalNode;
|
||||
import org.talend.core.model.process.IExternalNode;
|
||||
import org.talend.core.model.process.INode;
|
||||
|
||||
public interface ITDQComponentService extends IService {
|
||||
|
||||
public boolean isTDQExternalComponent(String componentName);
|
||||
|
||||
public AbstractExternalNode createExternalComponent(INode node);
|
||||
public IExternalNode createExternalComponent(INode node);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@ package org.talend.core.context;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.service.ICloudSignOnService;
|
||||
|
||||
/**
|
||||
* DOC smallet class global comment. Detailled comment <br/>
|
||||
@@ -139,6 +141,14 @@ public class RepositoryContext {
|
||||
* @return the clearPassword
|
||||
*/
|
||||
public String getClearPassword() {
|
||||
try {
|
||||
if (ICloudSignOnService.get() != null && ICloudSignOnService.get().isSignViaCloud()) {
|
||||
return ICloudSignOnService.get().getLatestToken().getAccessToken();
|
||||
}
|
||||
}catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
|
||||
return clearPassword;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ public enum EDatabase4DriverClassName {
|
||||
|
||||
INFORMIX(EDatabaseTypeName.INFORMIX, "com.informix.jdbc.IfxDriver"), //$NON-NLS-1$
|
||||
|
||||
INGRES(EDatabaseTypeName.INGRES, "com.ingres.jdbc.IngresDriver"),
|
||||
VECTORWISE(EDatabaseTypeName.VECTORWISE, "com.ingres.jdbc.IngresDriver"),
|
||||
|
||||
JAVADB_DERBYCLIENT(EDatabaseTypeName.JAVADB_DERBYCLIENT, "org.apache.derby.jdbc.ClientDriver"), //$NON-NLS-1$
|
||||
JAVADB_EMBEDED(EDatabaseTypeName.JAVADB_EMBEDED, "org.apache.derby.jdbc.EmbeddedDriver"), //$NON-NLS-1$
|
||||
JAVADB_JCCJDBC(EDatabaseTypeName.JAVADB_JCCJDBC, "com.ibm.db2.jcc.DB2Driver"), //$NON-NLS-1$
|
||||
|
||||
@@ -147,8 +147,15 @@ public enum EDatabaseTypeName {
|
||||
|
||||
MAPRDB(
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
SNOWFLAKE(
|
||||
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
|
||||
"SNOWFLAKE",
|
||||
"SNOWFLAKE",
|
||||
Boolean.TRUE,
|
||||
"SNOWFLAKE",
|
||||
EDatabaseSchemaOrCatalogMapping.None,
|
||||
EDatabaseSchemaOrCatalogMapping.None,
|
||||
true);
|
||||
|
||||
// displayName is used in Java code.
|
||||
private String displayName;
|
||||
@@ -340,8 +347,7 @@ public enum EDatabaseTypeName {
|
||||
isSupport = isSupportODBC;
|
||||
} else if (EDatabaseTypeName.SAS == this) {
|
||||
isSupport = false;
|
||||
} else if (EDatabaseTypeName.INGRES == this || EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.VECTORWISE == this
|
||||
|| EDatabaseTypeName.PARACCEL == this) {
|
||||
} else if (EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.PARACCEL == this) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,23 +17,23 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public enum ERedshiftDriver {
|
||||
|
||||
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.3.jar", "antlr4-runtime-4.8-1.jar" }),
|
||||
DRIVER_V1("Driver v1", new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" });
|
||||
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.10.jar" }),
|
||||
DRIVER_V1("Driver v1", new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar" });
|
||||
|
||||
private String displayName;
|
||||
|
||||
private Set<String> drivers = new HashSet<String>();
|
||||
private String[] drivers = new String[] {};
|
||||
|
||||
private ERedshiftDriver(String displayName, String[] driverStr) {
|
||||
private ERedshiftDriver(String displayName, String[] drivers) {
|
||||
this.displayName = displayName;
|
||||
for (String driver : driverStr) {
|
||||
drivers.add(driver);
|
||||
}
|
||||
this.drivers = drivers;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
@@ -44,19 +44,36 @@ public enum ERedshiftDriver {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public Set<String> getDrivers() {
|
||||
public String[] getDrivers() {
|
||||
return drivers;
|
||||
}
|
||||
|
||||
public void setDrivers(Set<String> drivers) {
|
||||
public void setDrivers(String[] drivers) {
|
||||
this.drivers = drivers;
|
||||
}
|
||||
|
||||
public static Set<String> getDriversByVersion(String version) {
|
||||
public static Set<String> getDriversByVersion(EDatabaseVersion4Drivers v4d, String version) {
|
||||
Set<String> drivers = new HashSet<String>();
|
||||
Set<String> providerDrivers = v4d.getProviderDrivers();
|
||||
ERedshiftDriver redshiftDriver = ERedshiftDriver.valueOf(version);
|
||||
if (redshiftDriver != null) {
|
||||
return redshiftDriver.getDrivers();
|
||||
if (redshiftDriver != null && DRIVER_V1 != redshiftDriver) {
|
||||
// to replace default one
|
||||
String[] v1Drivers = DRIVER_V1.getDrivers();
|
||||
for (String driver : providerDrivers) {
|
||||
boolean replaced = false;
|
||||
for (int i = 0; i < v1Drivers.length; i++) {
|
||||
if (driver.equals(v1Drivers[i])) {
|
||||
drivers.add(redshiftDriver.getDrivers()[i]);
|
||||
replaced = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!replaced) {
|
||||
drivers.add(driver);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
drivers.addAll(providerDrivers);
|
||||
}
|
||||
return drivers;
|
||||
}
|
||||
|
||||
@@ -238,6 +238,10 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_KEY = "CONN_PARA_KEY_SYNAPSE_CLIENT_KEY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE"; //$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$
|
||||
@@ -324,31 +328,95 @@ public class ConnParameterKeys {
|
||||
/**
|
||||
* Google Dataproc keys.
|
||||
*/
|
||||
public static final String CONN_PARA_KEY_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_GOOGLE_PROJECT_ID"; //$NON-NLS-1$
|
||||
public static final String CONN_PARA_KEY_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_GOOGLE_PROJECT_ID";
|
||||
|
||||
public static final String CONN_PARA_KEY_GOOGLE_CLUSTER_ID = "CONN_PARA_KEY_GOOGLE_CLUSTER_ID";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_GOOGLE_REGION = "CONN_PARA_KEY_GOOGLE_REGION"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_GOOGLE_JARS_BUCKET = "CONN_PARA_KEY_GOOGLE_JARS_BUCKET"; //$NON-NLS-1$
|
||||
public static final String CONN_PARA_KEY_GOOGLE_CLUSTER_ID = "CONN_PARA_KEY_GOOGLE_CLUSTER_ID";
|
||||
|
||||
public static final String CONN_PARA_KEY_GOOGLE_REGION = "CONN_PARA_KEY_GOOGLE_REGION";
|
||||
|
||||
public static final String CONN_PARA_KEY_GOOGLE_JARS_BUCKET = "CONN_PARA_KEY_GOOGLE_JARS_BUCKET";
|
||||
|
||||
public static final String CONN_PARA_KEY_PROVIDE_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_PROVIDE_GOOGLE_CREDENTIALS";
|
||||
|
||||
public static final String CONN_PARA_KEY_AUTH_MODE = "CONN_PARA_KEY_AUTH_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DEFINE_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_DEFINE_PATH_TO_GOOGLE_CREDENTIALS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_PATH_TO_GOOGLE_CREDENTIALS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_OAUTH2_TOKEN_TO_GOOGLE_CREDENTIALS = "CONN_PARA_OAUTH2_TOKEN_TO_GOOGLE_CREDENTIALS"; //$NON-NLS-1$
|
||||
|
||||
/**DataBricks*/
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE = "CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE";
|
||||
|
||||
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";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_NODE_TYPE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION="CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER="CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER";
|
||||
|
||||
/**kubernetes*/
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_SUBMIT_MODE="CONN_PARA_KEY_K8S_SUBMIT_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_MASTER="CONN_PARA_KEY_K8S_MASTER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_INSTANCES="CONN_PARA_KEY_K8S_INSTANCES";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK="CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET="CONN_PARA_KEY_K8S_REGISTRYSECRET";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_IMAGE="CONN_PARA_KEY_K8S_IMAGE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_NAMESPACE="CONN_PARA_KEY_K8S_NAMESPACE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_SERVICEACCOUNT="CONN_PARA_KEY_K8S_SERVICEACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_DISTUPLOAD="CONN_PARA_KEY_K8S_DISTUPLOAD";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3BUCKET="CONN_PARA_KEY_K8S_S3BUCKET";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3FOLDER="CONN_PARA_KEY_K8S_S3FOLDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3CREDENTIALS="CONN_PARA_KEY_K8S_S3CREDENTIALS";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3ACCESSKEY="CONN_PARA_KEY_K8S_S3ACCESSKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3SECRETKEY="CONN_PARA_KEY_K8S_S3SECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBACCOUNT="CONN_PARA_KEY_K8S_BLOBACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBCONTAINER="CONN_PARA_KEY_K8S_BLOBCONTAINER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBSECRETKEY="CONN_PARA_KEY_K8S_BLOBSECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREACCOUNT="CONN_PARA_KEY_K8S_AZUREACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURECREDENTIALS="CONN_PARA_KEY_K8S_AZURECREDENTIALS";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURECONTAINER="CONN_PARA_KEY_K8S_AZURECONTAINER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURESECRETKEY="CONN_PARA_KEY_K8S_AZURESECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADKEY="CONN_PARA_KEY_K8S_AZUREAADKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADCLIENTID="CONN_PARA_KEY_K8S_AZUREAADCLIENTID";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID="CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID";
|
||||
|
||||
/**
|
||||
* Override hadoop configuration
|
||||
*/
|
||||
@@ -369,6 +437,22 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_TIMEOUT="CONN_PARA_KEY_KNOX_TIMEOUT";
|
||||
|
||||
// CDE
|
||||
public static final String CONN_PARA_KEY_CDE_API_ENDPOINT="CONN_PARA_KEY_CDE_API_ENDPOINT";
|
||||
public static final String CONN_PARA_KEY_CDE_TOKEN="CONN_PARA_KEY_CDE_TOKEN";
|
||||
public static final String CONN_PARA_KEY_CDE_AUTO_GENERATE_TOKEN="CONN_PARA_KEY_CDE_AUTO_GENERATE_TOKEN";
|
||||
public static final String CONN_PARA_KEY_CDE_TOKEN_ENDPOINT="CONN_PARA_KEY_CDE_TOKEN_ENDPOINT";
|
||||
public static final String CONN_PARA_KEY_CDE_WORKLOAD_USER="CONN_PARA_KEY_CDE_WORKLOAD_USER";
|
||||
public static final String CONN_PARA_KEY_CDE_WORKLOAD_PASSWORD = "CONN_PARA_KEY_CDE_WORKLOAD_PASSWORD";
|
||||
|
||||
// STANDALONE
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_MASTER="CONN_PARA_KEY_UNIV_STANDALONE_MASTER";
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_CONFIGURE_EXEC="CONN_PARA_KEY_UNIV_STANDALONE_CONFIGURE_EXEC";
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_EXEC_MEMORY="CONN_PARA_KEY_UNIV_STANDALONE_EXEC_MEMORY";
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_EXEC_CORE="CONN_PARA_KEY_UNIV_STANDALONE_EXEC_CORE";
|
||||
|
||||
/**
|
||||
* Redshift
|
||||
*/
|
||||
|
||||
@@ -112,6 +112,13 @@ public enum EDatabaseConnTemplate {
|
||||
SQLITE(new DbConnStr(EDatabaseTypeName.SQLITE, //
|
||||
"jdbc:sqlite:/<filename>")), //$NON-NLS-1$
|
||||
|
||||
INGRES(new DbConnStr(EDatabaseTypeName.INGRES, //
|
||||
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
|
||||
"II7")), //$NON-NLS-1$
|
||||
VECTORWISE(new DbConnStr(EDatabaseTypeName.VECTORWISE, //
|
||||
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
|
||||
"II7")),
|
||||
|
||||
FIREBIRD(new DbConnStr(EDatabaseTypeName.FIREBIRD, //
|
||||
"jdbc:firebirdsql:<host>/<port>:<filename>?<property>", //$NON-NLS-1$
|
||||
"3050")), //$NON-NLS-1$
|
||||
@@ -207,7 +214,13 @@ public enum EDatabaseConnTemplate {
|
||||
"2181")), //$NON-NLS-1$
|
||||
|
||||
MAPRDB(new DbConnStr(EDatabaseTypeName.MAPRDB, "127.0.0.1", //$NON-NLS-1$
|
||||
"5181")); //$NON-NLS-1$
|
||||
"5181")), //$NON-NLS-1$
|
||||
|
||||
SNOWFLAKE(
|
||||
new DbConnStr(EDatabaseTypeName.SNOWFLAKE, //
|
||||
"jdbc:snowflake://<host>:<port>/?<property>",
|
||||
"3306" //$NON-NLS-1$
|
||||
)); // $NON-NLS-1$
|
||||
|
||||
private DbConnStr connStr;
|
||||
|
||||
@@ -415,6 +428,8 @@ public enum EDatabaseConnTemplate {
|
||||
case PSQL:
|
||||
case PLUSPSQL:
|
||||
case GREENPLUM:
|
||||
case INGRES:
|
||||
case VECTORWISE:
|
||||
case FIREBIRD:
|
||||
case JAVADB_EMBEDED:
|
||||
case JAVADB_JCCJDBC:
|
||||
@@ -441,6 +456,8 @@ public enum EDatabaseConnTemplate {
|
||||
case SYBASEASE_16_SA:
|
||||
case IBMDB2:
|
||||
case IBMDB2_ZOS:
|
||||
case INGRES:
|
||||
case VECTORWISE:
|
||||
case MSSQL:
|
||||
case INFORMIX:
|
||||
case TERADATA:
|
||||
|
||||
@@ -27,25 +27,20 @@ import org.talend.core.database.conn.DatabaseConnConstants;
|
||||
public enum EDatabaseVersion4Drivers {
|
||||
// access
|
||||
ACCESS_JDBC(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, new String[] {
|
||||
"jackcess-2.1.0.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.1.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.0.jar", "bcprov-jdk15on-1.51.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
"jackcess-2.1.12.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.3.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.4.jar", "bcprov-jdk15on-1.70.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
ACCESS_2003(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2003", "Access_2003")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// oracle
|
||||
ORACLE_18(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 18 and above", "ORACLE_18", "ojdbc8-19.3.0.0.jar")),
|
||||
ORACLE_12(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12", "ORACLE_12", "ojdbc7.jar")),
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12 (Deprecated)", "ORACLE_12",
|
||||
"ojdbc7.jar")),
|
||||
ORACLE_11(new DbVersion4DriversForOracle11(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID,
|
||||
EDatabaseTypeName.ORACLESN, EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM },
|
||||
"Oracle 11", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"Oracle 11 (Deprecated)", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
DbVersion4DriversForOracle11.DRIVER_1_6 })),
|
||||
ORACLE_10(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 10", "ORACLE_10", "ojdbc14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ORACLE_9(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 9", "ORACLE_9", "ojdbc14-9i.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ORACLE_8(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 8", "ORACLE_8", "ojdbc12.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// AS400
|
||||
AS400_V7R1_V7R3(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V7R1 to V7R3", "AS400_V7R1_V7R3", "jt400-9.8.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
AS400_V6R1_V7R2(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V6R1 to V7R2", "AS400_V6R1_V7R2", "jt400_V6R1.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -56,22 +51,22 @@ 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-2.1.210.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.jar")), //$NON-NLS-1$
|
||||
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
|
||||
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
|
||||
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
|
||||
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
|
||||
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
|
||||
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.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
|
||||
// MYSQL, add for 9594
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -83,10 +78,10 @@ public enum EDatabaseVersion4Drivers {
|
||||
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "log4j-1.2.17.jar", "jackson-core-2.12.1.jar",
|
||||
"jackson-databind-2.12.1.jar", "jackson-annotations-2.12.1.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.9.3.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.34.jar", "slf4j-reload4j-1.7.34.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.13.4.jar",
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
|
||||
|
||||
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$
|
||||
@@ -95,24 +90,26 @@ public enum EDatabaseVersion4Drivers {
|
||||
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.14.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-42.2.14.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$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
SYBASEASE(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 12/15", "SYBSEIQ_12_15", "jconn3.jar")), //$NON-NLS-1$
|
||||
SYBASEIQ_16(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16", "SYBSEIQ_16", "jconn4.jar")), //$NON-NLS-1$
|
||||
SYBASEIQ_16_SA(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16 (SQL Anywhere)", "SYBSEIQ_16_SA", "sajdbc4-17.0.0.jar")),
|
||||
SYBASEIQ_16_SA(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16 (SQL Anywhere) and above", "SYBSEIQ_16_SA", "sajdbc4-17.0.0.jar")),
|
||||
SYBASEIQ(new DbVersion4Drivers(EDatabaseTypeName.SYBASEIQ, "jconn3.jar")), //$NON-NLS-1$
|
||||
|
||||
EXASOL(new DbVersion4Drivers(EDatabaseTypeName.EXASOL, "exajdbc-6.0.9302.jar")), //$NON-NLS-1$
|
||||
MAXDB(new DbVersion4Drivers(EDatabaseTypeName.MAXDB, "sapdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
INGRES(new DbVersion4Drivers(EDatabaseTypeName.INGRES, "iijdbc-10.2-4.1.10.jar")),
|
||||
VECTORWISE(new DbVersion4Drivers(EDatabaseTypeName.VECTORWISE, "iijdbc-10.2-4.1.10.jar")),
|
||||
// HIVE(new DbVersion4Drivers(EDatabaseTypeName.HIVE, "STANDALONE", "STANDALONE", new String[] {
|
||||
// "hive-jdbc-0.8.1.jar",
|
||||
// "hive-metastore-0.8.1.jar", "hive-exec-0.8.1.jar", "hive-service-0.8.1.jar", "libfb303_new.jar",
|
||||
@@ -153,9 +150,11 @@ public enum EDatabaseVersion4Drivers {
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.11.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"jackson-databind-2.11.4.jar", "jackson-annotations-2.11.4.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "jackson-core-2.13.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"httpclient-4.5.13.jar", "joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"aws-java-sdk-redshift-internal-1.12.x.jar", "aws-java-sdk-core-1.12.315.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"aws-java-sdk-sts-1.12.315.jar", "aws-java-sdk-redshift-1.12.315.jar", "jmespath-java-1.12.315.jar" })), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
|
||||
|
||||
@@ -311,8 +310,8 @@ public enum EDatabaseVersion4Drivers {
|
||||
|
||||
private static Set<String> getDriversByDriverVersion(EDatabaseVersion4Drivers v4d, String version) {
|
||||
Set<String> drivers = new HashSet<String>();
|
||||
if (REDSHIFT == v4d) {
|
||||
drivers = ERedshiftDriver.getDriversByVersion(version);
|
||||
if (REDSHIFT == v4d || REDSHIFT_SSO == v4d) {
|
||||
drivers = ERedshiftDriver.getDriversByVersion(v4d, version);
|
||||
}
|
||||
return drivers;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ public class HadoopConstants {
|
||||
public static final String SPARK_MODE_YARN_CLUSTER = "YARN_CLUSTER";
|
||||
|
||||
public static final String SPARK_MODE_DATAPROC = "DATAPROC";
|
||||
|
||||
public static final String SPARK_MODE_SYNAPSE = "SYNAPSE";
|
||||
|
||||
public static final String FRAMEWORK = "FRAMEWORK";
|
||||
|
||||
|
||||
@@ -22,4 +22,6 @@ public interface IHadoopArgs {
|
||||
|
||||
public static final String HIVE_ARG_STANDALONE = "STANDALONE"; //$NON-NLS-1$
|
||||
|
||||
public static final String HDFS_ARG_KNOX = "USE_KNOX"; //$NON-NLS-1$
|
||||
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ public enum EHadoopProperties {
|
||||
GOOGLE_REGION,
|
||||
|
||||
GOOGLE_JARS_BUCKET,
|
||||
|
||||
AUTH_MODE,
|
||||
|
||||
PATH_TO_GOOGLE_CREDENTIALS,
|
||||
|
||||
OAUTH_ACCESS_TOKEN,
|
||||
|
||||
HD_WEBHCAT_HOSTNAME,
|
||||
|
||||
@@ -124,6 +130,10 @@ public enum EHadoopProperties {
|
||||
|
||||
SYNAPSE_CLIENT_KEY,
|
||||
|
||||
SYNAPSE_USE_CERTIFICATE,
|
||||
|
||||
SYNAPSE_CLIENT_CERTIFICATE,
|
||||
|
||||
DEPLOY_FOLDER,
|
||||
|
||||
SPARK_DRIVER_MEM,
|
||||
@@ -142,7 +152,67 @@ public enum EHadoopProperties {
|
||||
|
||||
DATABRICKS_TOKEN,
|
||||
|
||||
DATABRICKS_DBFS_DEP_FOLDER;
|
||||
DATABRICKS_DBFS_DEP_FOLDER,
|
||||
|
||||
K8S_SUBMIT_MODE,
|
||||
|
||||
K8S_MASTER,
|
||||
|
||||
K8S_INSTANCES,
|
||||
|
||||
K8S_REGISTRYSECRET,
|
||||
|
||||
K8S_IMAGE,
|
||||
|
||||
K8S_NAMESPACE,
|
||||
|
||||
K8S_SERVICEACCOUNT,
|
||||
|
||||
K8S_DISTUPLOAD,
|
||||
|
||||
K8S_S3BUCKET,
|
||||
|
||||
K8S_S3FOLDER,
|
||||
|
||||
K8S_S3CREDENTIALS,
|
||||
|
||||
K8S_S3ACCESSKEY,
|
||||
|
||||
K8S_S3SECRETKEY,
|
||||
|
||||
K8S_BLOBACCOUNT,
|
||||
|
||||
K8S_BLOBCONTAINER,
|
||||
|
||||
K8S_BLOBSECRETKEY,
|
||||
|
||||
K8S_AZUREACCOUNT,
|
||||
|
||||
K8S_AZURECREDENTIALS,
|
||||
|
||||
K8S_AZURECONTAINER,
|
||||
|
||||
K8S_AZURESECRETKEY,
|
||||
|
||||
K8S_AZUREAADKEY,
|
||||
|
||||
K8S_AZUREAADCLIENTID,
|
||||
|
||||
K8S_AZUREAADDIRECTORYID,
|
||||
|
||||
DATABRICKS_NODE_TYPE,
|
||||
|
||||
DATABRICKS_DRIVER_NODE_TYPE,
|
||||
|
||||
DATABRICKS_RUNTIME_VERSION,
|
||||
|
||||
DATABRICKS_CLUSTER_TYPE,
|
||||
|
||||
UNIV_STANDALONE_MASTER,
|
||||
|
||||
UNIV_STANDALONE_EXEC_MEMORY,
|
||||
|
||||
UNIV_STANDALONE_EXEC_CORE;
|
||||
|
||||
public String getName() {
|
||||
return this.name();
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.hadoop.version;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum EDataprocAuthType {
|
||||
|
||||
OAUTH_API("OAuth2 Access Token"), //$NON-NLS-1$
|
||||
|
||||
SERVICE_ACCOUNT("Service account"); //$NON-NLS-1$
|
||||
|
||||
private String displayName;
|
||||
|
||||
EDataprocAuthType(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static List<String> getAllDataprocAuthTypes() {
|
||||
return getAllDataprocAuthTypes(true);
|
||||
}
|
||||
|
||||
public static List<String> getAllDataprocAuthTypes(boolean display) {
|
||||
List<String> types = new ArrayList<String>();
|
||||
EDataprocAuthType[] values = values();
|
||||
for (EDataprocAuthType authType : values) {
|
||||
if (display) {
|
||||
types.add(authType.getDisplayName());
|
||||
} else {
|
||||
types.add(authType.getName());
|
||||
}
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
||||
public static EDataprocAuthType getDataprocAuthTypeByDisplayName(String name) {
|
||||
return getDataprocAuthTypeByName(name, true);
|
||||
}
|
||||
|
||||
public static EDataprocAuthType getDataprocAuthTypeByName(String type, boolean display) {
|
||||
if (type != null) {
|
||||
for (EDataprocAuthType authType : values()) {
|
||||
if (display) {
|
||||
if (type.equalsIgnoreCase(authType.getDisplayName())) {
|
||||
return authType;
|
||||
}
|
||||
} else {
|
||||
if (type.equalsIgnoreCase(authType.getName())) {
|
||||
return authType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
70
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/context/ContextUtils.java
Normal file → Executable file
70
main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/context/ContextUtils.java
Normal file → Executable file
@@ -222,6 +222,32 @@ public class ContextUtils {
|
||||
}
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
// TUP-36519:For possible duplicate internalid scenario(TUP-36667) after several times' renaming in joblet. Loop all and find the nearest
|
||||
// one.
|
||||
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
|
||||
boolean isFromContextItem, String paraName) {
|
||||
if (contextType == null || uuId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ContextParameterType parameterType = null;
|
||||
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
|
||||
String paramId = null;
|
||||
if (isFromContextItem) {
|
||||
paramId = ResourceHelper.getUUID(param);
|
||||
} else {
|
||||
paramId = param.getInternalId();
|
||||
}
|
||||
if (uuId.equals(paramId)) {
|
||||
parameterType = param;
|
||||
if (paraName != null && StringUtils.equals(paraName, param.getName())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
|
||||
boolean isFromContextItem) {
|
||||
@@ -766,11 +792,11 @@ public class ContextUtils {
|
||||
return ContextUtils.getContextTypeByName(contextItem, contextName, true);
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
|
||||
return ContextUtils.getContextTypeByName((List<ContextType>) jobletProcessItem.getJobletProcess().getContext(),
|
||||
return ContextUtils.getContextTypeByName(jobletProcessItem.getJobletProcess().getContext(),
|
||||
contextName, jobletProcessItem.getJobletProcess().getDefaultContext());
|
||||
} else if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return ContextUtils.getContextTypeByName((List<ContextType>) processItem.getProcess().getContext(), contextName,
|
||||
return ContextUtils.getContextTypeByName(processItem.getProcess().getContext(), contextName,
|
||||
processItem.getProcess().getDefaultContext());
|
||||
}
|
||||
return null;
|
||||
@@ -846,7 +872,7 @@ public class ContextUtils {
|
||||
if (item != null) {
|
||||
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
|
||||
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
|
||||
paramLink.getId(), item instanceof ContextItem);
|
||||
paramLink.getId(), item instanceof ContextItem, contextParameterType.getName());
|
||||
if (repoContextParam != null
|
||||
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
|
||||
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
|
||||
@@ -915,7 +941,7 @@ public class ContextUtils {
|
||||
if (item != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
|
||||
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
|
||||
parameterLink.getId(), item instanceof ContextItem);
|
||||
parameterLink.getId(), item instanceof ContextItem, parameterType.getName());
|
||||
if (repoParameterType != null
|
||||
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
|
||||
renamedMap.put(repoParameterType.getName(), parameterType.getName());
|
||||
@@ -958,6 +984,14 @@ public class ContextUtils {
|
||||
|
||||
}
|
||||
|
||||
public boolean remove(Item item, String param) {
|
||||
Set<String> params = map.get(item);
|
||||
if (params != null && params.contains(param)) {
|
||||
return params.remove(param);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return map.isEmpty();
|
||||
}
|
||||
@@ -975,7 +1009,7 @@ public class ContextUtils {
|
||||
ContextParameterType contextParameterType = null;
|
||||
if (paramLink != null && paramLink.getId() != null && contextType != null) {
|
||||
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
|
||||
contextItem instanceof ContextItem);
|
||||
contextItem instanceof ContextItem, paramName);
|
||||
}
|
||||
if (contextParameterType != null) {// Compare use UUID
|
||||
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {
|
||||
@@ -1134,5 +1168,31 @@ public class ContextUtils {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static IContext convert2IContext(ContextType contextType) {
|
||||
return convert2IContext(contextType, null);
|
||||
}
|
||||
|
||||
public static IContext convert2IContext(ContextType contextType, String repositoryContextId) {
|
||||
if (contextType == null) {
|
||||
return null;
|
||||
}
|
||||
IContext jobContext = new JobContext(contextType.getName());
|
||||
List<ContextParameterType> repoParams = contextType.getContextParameter();
|
||||
for (ContextParameterType repoParam : repoParams) {
|
||||
IContextParameter jobParam = new JobContextParameter();
|
||||
jobParam.setName(repoParam.getName());
|
||||
jobParam.setContext(jobContext);
|
||||
jobParam.setComment(repoParam.getComment());
|
||||
jobParam.setPrompt(repoParam.getPrompt());
|
||||
jobParam.setPromptNeeded(repoParam.isPromptNeeded());
|
||||
jobParam.setSource(repositoryContextId != null ? repositoryContextId : repoParam.getRepositoryContextId());
|
||||
jobParam.setType(repoParam.getType());
|
||||
jobParam.setValue(repoParam.getValue());
|
||||
jobParam.setInternalId(repoParam.getInternalId());
|
||||
jobContext.getContextParameterList().add(jobParam);
|
||||
}
|
||||
return jobContext;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,15 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.PendoDataTrackFactory;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.service.ICloudSignOnService;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.signon.util.TMCRepositoryUtil;
|
||||
import org.talend.signon.util.TokenMode;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
@@ -58,12 +63,14 @@ public class ConnectionBean implements Cloneable {
|
||||
|
||||
private static final String TOKEN = "token"; //$NON-NLS-1$
|
||||
|
||||
private static final String URL = "url"; //$NON-NLS-1$
|
||||
|
||||
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
|
||||
|
||||
private String credentials = ""; //$NON-NLS-1$
|
||||
|
||||
public static final String CLOUD_TOKEN_ID ="cloud_token"; //$NON-NLS-1$
|
||||
|
||||
private static final String LOGIN_VIA_CLOUD = "login_via_cloud"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC smallet ConnectionBean constructor comment.
|
||||
*/
|
||||
@@ -89,6 +96,24 @@ public class ConnectionBean implements Cloneable {
|
||||
newConnection.setPassword(""); //$NON-NLS-1$
|
||||
return newConnection;
|
||||
}
|
||||
|
||||
public static ConnectionBean getDefaultCloudConnectionBean(String dataCenter) {
|
||||
ConnectionBean newConnection = new ConnectionBean();
|
||||
newConnection.setName(Messages.getString("ConnectionBean.Cloud.name", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
|
||||
newConnection.setDescription(Messages.getString("ConnectionBean.CloudConnection.description", TMCRepositoryUtil.getDisplayNameByDatacenter(dataCenter))); //$NON-NLS-1$
|
||||
newConnection.setRepositoryId(TMCRepositoryUtil.getRepositoryId(dataCenter));
|
||||
newConnection.setToken(true);
|
||||
newConnection.setStoreCredentials(true);
|
||||
newConnection.setComplete(true);
|
||||
newConnection.setLoginViaCloud(true);
|
||||
newConnection.setWorkSpace(getRecentWorkSpace());
|
||||
return newConnection;
|
||||
}
|
||||
|
||||
protected static String getRecentWorkSpace() {
|
||||
String filePath = new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
|
||||
return filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for ID.
|
||||
@@ -184,13 +209,22 @@ public class ConnectionBean implements Cloneable {
|
||||
*/
|
||||
public String getPassword() {
|
||||
try {
|
||||
|
||||
if (conDetails.has(PASSWORD)) {
|
||||
if (isStoreCredentials() && credentials != null) {
|
||||
return this.credentials;
|
||||
}
|
||||
return conDetails.getString(PASSWORD);
|
||||
} else if (conDetails.has(CLOUD_TOKEN_ID)){
|
||||
String object = conDetails.getString(CLOUD_TOKEN_ID);
|
||||
TokenMode token = TokenMode.parseFromJson(object, null);
|
||||
if (ICloudSignOnService.get() != null) {
|
||||
token = ICloudSignOnService.get().getLatestToken();
|
||||
this.setConnectionToken(token);
|
||||
}
|
||||
return token.getAccessToken();
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return "";
|
||||
@@ -215,18 +249,18 @@ public class ConnectionBean implements Cloneable {
|
||||
* @return the user
|
||||
*/
|
||||
public String getUser() {
|
||||
try {
|
||||
try {
|
||||
if (conDetails.has(USER)) {
|
||||
String user = conDetails.getString(USER);
|
||||
if (isToken()) {
|
||||
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
user = PendoTrackSender.getInstance().getTmcUser(url, getPassword());
|
||||
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
|
||||
if (StringUtils.isNotBlank(user)) {
|
||||
setUser(user);
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -320,6 +354,25 @@ public class ConnectionBean implements Cloneable {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLoginViaCloud() {
|
||||
try {
|
||||
if (conDetails.has(LOGIN_VIA_CLOUD)) {
|
||||
return (Boolean) conDetails.get(LOGIN_VIA_CLOUD);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
// do nothing
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setLoginViaCloud(boolean isLoginViaCloud) {
|
||||
try {
|
||||
conDetails.put(LOGIN_VIA_CLOUD, isLoginViaCloud);
|
||||
} catch (JSONException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionBean clone() throws CloneNotSupportedException {
|
||||
@@ -418,14 +471,21 @@ public class ConnectionBean implements Cloneable {
|
||||
|
||||
public String getUrl() {
|
||||
try {
|
||||
if (conDetails.has(URL)) {
|
||||
return conDetails.getString(URL);
|
||||
if (dynamicFields.containsKey(RepositoryConstants.REPOSITORY_URL)) {
|
||||
return dynamicFields.get(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
if (conDetails.has(RepositoryConstants.REPOSITORY_URL)) {
|
||||
return conDetails.getString(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
dynamicFields.put(RepositoryConstants.REPOSITORY_URL, url);
|
||||
}
|
||||
|
||||
public boolean isStoreCredentials() {
|
||||
try {
|
||||
@@ -453,4 +513,27 @@ public class ConnectionBean implements Cloneable {
|
||||
public void setCredentials(String credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
|
||||
public TokenMode getConnectionToken() {
|
||||
try {
|
||||
if (conDetails.has(CLOUD_TOKEN_ID)) {
|
||||
String object = conDetails.getString(CLOUD_TOKEN_ID);
|
||||
return TokenMode.parseFromJson(object, null);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void setConnectionToken(TokenMode connectionToken) {
|
||||
try {
|
||||
conDetails.put(CLOUD_TOKEN_ID, TokenMode.writeToJson(connectionToken));
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class RetrieveResult {
|
||||
|
||||
private boolean allResolved;
|
||||
|
||||
private Set<ModuleNeeded> resovledModules = new HashSet<>();
|
||||
|
||||
private Set<ModuleNeeded> unresolvedModules = new HashSet<>();
|
||||
|
||||
public boolean isAllResolved() {
|
||||
return allResolved;
|
||||
}
|
||||
|
||||
public void setAllResolved(boolean allResolved) {
|
||||
this.allResolved = allResolved;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getResovledModules() {
|
||||
return resovledModules;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getUnresolvedModules() {
|
||||
return unresolvedModules;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -194,6 +194,10 @@ public interface IMetadataConnection extends IMetadata {
|
||||
public String getContextName();
|
||||
|
||||
public void setContextName(String contextName);
|
||||
|
||||
public boolean isSupportNLS();
|
||||
|
||||
public void setSupportNLS(boolean newSupportNLS);
|
||||
|
||||
/**
|
||||
* Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -24,18 +25,20 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ProjectScope;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@@ -46,9 +49,9 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
@@ -59,6 +62,8 @@ import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
@@ -75,14 +80,13 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public final class MetadataTalendType {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String INTERNAL_MAPPINGS_FOLDER = "mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
|
||||
public static final String FILE_MAPPING_REVISION = "mapping_revision.json"; //$NON-NLS-1$
|
||||
|
||||
public static final String MAPPING_FILE_PATTERN = "^mapping_.*\\.xml$"; //$NON-NLS-1$
|
||||
|
||||
private static ECodeLanguage codeLanguage;
|
||||
|
||||
@@ -459,13 +463,14 @@ public final class MetadataTalendType {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static URL getSystemForderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getSystemFolderURLOfMappingsFile() throws SystemException {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
URL url = null;
|
||||
Path filePath = new Path(dirPath);
|
||||
Bundle b = Platform.getBundle(CoreRuntimePlugin.PLUGIN_ID);
|
||||
if (b != null) {
|
||||
try {
|
||||
// Enumeration<URL> entries = b.findEntries(dirPath, "mapping_*.xml", false);
|
||||
url = FileLocator.toFileURL(FileLocator.find(b, filePath, null));
|
||||
} catch (IOException e) {
|
||||
throw new SystemException(e);
|
||||
@@ -474,46 +479,169 @@ public final class MetadataTalendType {
|
||||
return url;
|
||||
}
|
||||
|
||||
public static URL getProjectForderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getProjectFolderURLOfMappingsFile() throws SystemException {
|
||||
try {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IPath settingPath = new ProjectScope(project).getLocation();
|
||||
IPath mappingPath = settingPath.append(dirPath);
|
||||
File mappingFolder = mappingPath.toFile();
|
||||
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
|
||||
ICoreService service = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
service.syncMappingsFileFromSystemToProject();
|
||||
}
|
||||
}
|
||||
return mappingFolder.toURL();
|
||||
File mappingFolder = settingPath.append(dirPath).toFile();
|
||||
return mappingFolder.toURI().toURL();
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getSha1OfFile(File file) {
|
||||
String sha1 = null;
|
||||
FileInputStream fileInputStream = null;
|
||||
public static URL getProjectTempMappingFolder() {
|
||||
try {
|
||||
fileInputStream = new FileInputStream(file);
|
||||
sha1 = DigestUtils.shaHex(fileInputStream);
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
File folder = ResourceUtils
|
||||
.getFolder(project, RepositoryConstants.TEMP_DIRECTORY + "/" + INTERNAL_MAPPINGS_FOLDER, false).getLocation()
|
||||
.toFile();
|
||||
syncMappingFiles(folder, false);
|
||||
return folder.toURI().toURL();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace(); // Just print the exception for debug.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void syncMappingFiles(File target, boolean rename) {
|
||||
if (!target.exists()) {
|
||||
target.mkdir();
|
||||
}
|
||||
File[] arr = target.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (arr == null) {
|
||||
arr = new File[0];
|
||||
}
|
||||
try {
|
||||
Map<String, File> targetFileMap = Stream.of(arr).collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
Map<String, File> workingFileMap = getWorkingMappingFiles().stream()
|
||||
.collect(Collectors.toMap(f -> getTargetName(f, rename), Function.identity(), (f1, f2) -> f1));
|
||||
|
||||
targetFileMap.entrySet().stream().filter(entry -> !workingFileMap.containsKey(entry.getKey()))
|
||||
.forEach(entry -> entry.getValue().delete());
|
||||
|
||||
for (Entry<String, File> entry : workingFileMap.entrySet()) {
|
||||
String targetName = entry.getKey();
|
||||
File workingMappingFile = entry.getValue();
|
||||
boolean needUpdate = false;
|
||||
File targetMappingFile = targetFileMap.get(targetName);
|
||||
if (targetMappingFile == null) {
|
||||
targetMappingFile = new File(target, targetName);
|
||||
needUpdate = true;
|
||||
} else if (!getSha1OfFile(workingMappingFile).equals(getSha1OfFile(targetMappingFile))) {
|
||||
needUpdate = true;
|
||||
}
|
||||
if (needUpdate) {
|
||||
if (targetMappingFile.exists()) {
|
||||
targetMappingFile.delete();
|
||||
}
|
||||
FilesUtils.copyFile(workingMappingFile, targetMappingFile);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return sha1;
|
||||
}
|
||||
|
||||
public static String getTargetName(File file, boolean rename) {
|
||||
String targetName = file.getName();
|
||||
if (!rename) {
|
||||
return targetName;
|
||||
}
|
||||
try {
|
||||
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
|
||||
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
|
||||
Document document = analyser.parse(file);
|
||||
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
|
||||
String dbmsIdValue = "";
|
||||
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
|
||||
Node dbmsNode = dbmsNodes.item(iDbms);
|
||||
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
|
||||
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
|
||||
|
||||
}
|
||||
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
|
||||
final String[] fileNameSplit = targetName.split("_");
|
||||
String idA = "_id";
|
||||
String idB = "id_";
|
||||
final int indexA = dbmsIdValue.indexOf(idA);
|
||||
final int indexB = dbmsIdValue.indexOf(idB);
|
||||
String secondeName = "";
|
||||
if (indexA > 0) {
|
||||
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
|
||||
} else if (indexB == 0) {
|
||||
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
|
||||
} else if (indexA == -1 && indexB == -1) {
|
||||
secondeName = dbmsIdValue;
|
||||
}
|
||||
if (secondeName != null && !"".equals(secondeName)) {
|
||||
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
|
||||
}
|
||||
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return targetName;
|
||||
}
|
||||
|
||||
public static JSONObject getRevisionObject() {
|
||||
try {
|
||||
File revisonFile = new File(MetadataTalendType.getSystemFolderURLOfMappingsFile().getFile(),
|
||||
MetadataTalendType.FILE_MAPPING_REVISION);
|
||||
String jsonStr = new String(Files.readAllBytes(revisonFile.toPath()));
|
||||
return new JSONObject(jsonStr);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
|
||||
public static boolean restoreMappingFiles() throws Exception {
|
||||
List<File> toDelete = new ArrayList<>();
|
||||
JSONObject revision = getRevisionObject();
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
if (projectMappingFolder.exists()) {
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles != null) {
|
||||
for (File file : projectMappingFiles) {
|
||||
if (revision.has(file.getName())) {
|
||||
String sha1 = MetadataTalendType.getSha1OfFile(file);
|
||||
if (revision.getJSONObject(file.getName()).has(sha1)) {
|
||||
toDelete.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File xsd = new File(projectMappingFolder, "mapping_validate.xsd"); //$NON-NLS-1$
|
||||
if (xsd.exists()) {
|
||||
xsd.delete();
|
||||
}
|
||||
}
|
||||
toDelete.forEach(File::delete);
|
||||
return !toDelete.isEmpty();
|
||||
}
|
||||
|
||||
public static String getSha1OfFile(File file) {
|
||||
try {
|
||||
String text = new String(Files.readAllBytes(file.toPath()));
|
||||
return getSha1OfText(text);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getSha1OfText(String text) {
|
||||
text = text.replace("\r\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return DigestUtils.sha1Hex(text);
|
||||
}
|
||||
|
||||
public static void copyFile(File in, IFile out) throws CoreException, IOException {
|
||||
FileInputStream fis = new FileInputStream(in);
|
||||
if (out.exists()) {
|
||||
@@ -524,49 +652,6 @@ public final class MetadataTalendType {
|
||||
fis.close();
|
||||
}
|
||||
|
||||
public static void syncNewMappingFileToProject() throws SystemException {
|
||||
try {
|
||||
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
|
||||
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
|
||||
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
|
||||
File projectMappingFiles = new File(projectMappingFolder.getLocationURI());
|
||||
if (!sysMappingFiles.exists() || !projectMappingFiles.exists()) {
|
||||
return;
|
||||
}
|
||||
for (File sysMapping : sysMappingFiles.listFiles()) {
|
||||
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
|
||||
if (projectMapping.exists() && StringUtils.equals(sysMapping.getName(), "mapping_Greenplum.xml")) {
|
||||
|
||||
String sha1OfFile = DigestUtils.shaHex(projectMapping.getContents());
|
||||
String shalOfOldSystem = "8431f19215dacb3caa126778ae695954552cce2a";
|
||||
if (StringUtils.equals(sha1OfFile, shalOfOldSystem)) {
|
||||
copyFile(sysMapping, projectMapping);
|
||||
}
|
||||
}
|
||||
if (!projectMapping.exists()) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(sysMapping);
|
||||
projectMapping.create(fis, true, null);
|
||||
} catch (CoreException coreExc) {
|
||||
throw new SystemException(coreExc);
|
||||
} finally {
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException ioExc) {
|
||||
throw new SystemException(ioExc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Load db types and mapping with the current activated language (Java, Perl, ...).
|
||||
@@ -574,20 +659,38 @@ public final class MetadataTalendType {
|
||||
* @throws SystemException
|
||||
*/
|
||||
public static void loadCommonMappings() throws SystemException {
|
||||
URL url = getProjectForderURLOfMappingsFile();
|
||||
File dir = new File(url.getPath());
|
||||
metadataMappingFiles = new ArrayList<File>();
|
||||
dbmsSet.clear();
|
||||
if (dir.isDirectory()) {
|
||||
File[] files = dir.listFiles();
|
||||
for (File file : files) {
|
||||
if (file.getName().matches("^mapping_.*\\.xml$")) { //$NON-NLS-1$
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
}
|
||||
}
|
||||
for (File file : getWorkingMappingFiles()) {
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<File> getWorkingMappingFiles() throws SystemException {
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
File systemMappingFolder = new File(getSystemFolderURLOfMappingsFile().getFile());
|
||||
File[] systemMappingFiles = systemMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles == null || projectMappingFiles.length == 0) {
|
||||
return Arrays.asList(systemMappingFiles);
|
||||
}
|
||||
List<File> workingMappingFiles = new ArrayList<>();
|
||||
Map<String, File> projectMappingFilesMap = Stream.of(projectMappingFiles)
|
||||
.collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
workingMappingFiles.addAll(projectMappingFilesMap.values());
|
||||
Stream.of(systemMappingFiles).filter(f -> !projectMappingFilesMap.containsKey(f.getName()))
|
||||
.forEach(f -> workingMappingFiles.add(f));
|
||||
return workingMappingFiles;
|
||||
}
|
||||
|
||||
public static String getSha1OfSystemMappingFile(String fileName) {
|
||||
try {
|
||||
return getSha1OfFile(new File(getSystemFolderURLOfMappingsFile().getFile(), fileName));
|
||||
} catch (SystemException e) {
|
||||
ExceptionHandler.process(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMapping(File file) throws SystemException {
|
||||
|
||||
@@ -293,7 +293,8 @@ public final class MetadataToolHelper {
|
||||
boolean isKeyword = KeywordsValidator.isKeyword(originalColumnName);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int[] charBit = new int[columnName.length()];
|
||||
// keep charBit length align with the length of originalColumnName (StringBuilder)
|
||||
int[] charBit = new int[originalColumnName.length()];
|
||||
if (!isKeyword) {
|
||||
boolean isAllowSpecific = isAllowSpecificCharacters();
|
||||
|
||||
|
||||
@@ -13,10 +13,16 @@ public class SparkBatchMetadataTalendTypeFilter extends SparkMetadataTalendTypeF
|
||||
public static List<String> dynamicTypeCompatibleComponents = Arrays.asList(
|
||||
"tDeltaLakeInput",
|
||||
"tDeltaLakeOutput",
|
||||
"tFileInputDelimited",
|
||||
"tFileInputParquet",
|
||||
"tFileOutputParquet",
|
||||
"tJDBCInput",
|
||||
"tJDBCOutput", "tLogRow", "tSqlRow"
|
||||
"tJDBCOutput",
|
||||
"tLogRow",
|
||||
"tAvroInput",
|
||||
"tMongoDBInput",
|
||||
"tMongoDBOutput",
|
||||
"tSqlRow"
|
||||
);
|
||||
|
||||
public SparkBatchMetadataTalendTypeFilter(INode node) {
|
||||
|
||||
@@ -260,6 +260,7 @@ public final class ConvertionHelper {
|
||||
result.setContentModel(connection.isContextMode());
|
||||
result.setContextId(sourceConnection.getContextId());
|
||||
result.setContextName(sourceConnection.getContextName());
|
||||
result.setSupportNLS(sourceConnection.isSupportNLS());
|
||||
// handle oracle database connnection of general_jdbc.
|
||||
result.setSchema(getMeataConnectionSchema(result));
|
||||
convertOtherParameters(result, connection);
|
||||
@@ -273,7 +274,8 @@ public final class ConvertionHelper {
|
||||
|
||||
private static String getDriverVersionString(DatabaseConnection dbConn) {
|
||||
String dbVersionString = dbConn.getDbVersionString();
|
||||
if (EDatabaseTypeName.REDSHIFT.getDisplayName().equals(dbConn.getDatabaseType())) {
|
||||
if (EDatabaseTypeName.REDSHIFT.getDisplayName().equals(dbConn.getDatabaseType())
|
||||
|| EDatabaseTypeName.REDSHIFT_SSO.getDisplayName().equals(dbConn.getDatabaseType())) {
|
||||
EMap<String, String> parameters = dbConn.getParameters();
|
||||
if (parameters != null) {
|
||||
String driverString = parameters.get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_DRIVER);
|
||||
@@ -727,7 +729,8 @@ public final class ConvertionHelper {
|
||||
origValueConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_KEY_STORE_PASSWORD), false));
|
||||
}
|
||||
}
|
||||
} else if (EDatabaseTypeName.REDSHIFT.getDisplayName().equals(origValueConn.getDatabaseType())) {
|
||||
} else if (EDatabaseTypeName.REDSHIFT.getDisplayName().equals(origValueConn.getDatabaseType())
|
||||
|| EDatabaseTypeName.REDSHIFT_SSO.getDisplayName().equals(origValueConn.getDatabaseType())) {
|
||||
Properties info = new Properties();
|
||||
EMap<String, String> parameters = origValueConn.getParameters();
|
||||
if (parameters != null
|
||||
|
||||
@@ -113,6 +113,7 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
|
||||
private String contextName;
|
||||
|
||||
private boolean supportNLS = false;
|
||||
// ~
|
||||
|
||||
private String comment;
|
||||
@@ -729,6 +730,14 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
public void setContextName(String contextName) {
|
||||
this.contextName = contextName;
|
||||
}
|
||||
|
||||
public boolean isSupportNLS() {
|
||||
return supportNLS;
|
||||
}
|
||||
|
||||
public void setSupportNLS(boolean supportNLS) {
|
||||
this.supportNLS = supportNLS;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -433,6 +433,16 @@ public class ComponentToRepositoryProperty {
|
||||
connection.setDatabaseType(EDatabaseTypeName.IBMDB2.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.IBMDB2.getProduct());
|
||||
}
|
||||
// Ingres
|
||||
else if (EDatabaseTypeName.INGRES.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.INGRES.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.INGRES.getProduct());
|
||||
}
|
||||
// VECTORWISE
|
||||
else if (EDatabaseTypeName.VECTORWISE.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.VECTORWISE.getDisplayName());
|
||||
connection.setProductId(EDatabaseTypeName.VECTORWISE.getProduct());
|
||||
}
|
||||
// Sqlite
|
||||
else if (EDatabaseTypeName.SQLITE.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.SQLITE.getDisplayName());
|
||||
@@ -489,6 +499,11 @@ public class ComponentToRepositoryProperty {
|
||||
}
|
||||
}
|
||||
|
||||
else if (EDatabaseTypeName.REDSHIFT_SSO.getDbType().equals((String) parameter.getValue())) {
|
||||
connection.setProductId(EDatabaseTypeName.REDSHIFT_SSO.getProduct());
|
||||
connection.setDatabaseType(EDatabaseTypeName.REDSHIFT_SSO.getDisplayName());
|
||||
}
|
||||
|
||||
// NeTezza
|
||||
else if (EDatabaseTypeName.NETEZZA.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
|
||||
connection.setDatabaseType(EDatabaseTypeName.NETEZZA.getDisplayName());
|
||||
|
||||
@@ -1045,8 +1045,13 @@ public class RepositoryToComponentProperty {
|
||||
return Boolean.valueOf(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_STRINGPARA));
|
||||
}
|
||||
if (value.equals("ENTRY_PROPERTIES")) {
|
||||
return ConvertionHelper
|
||||
.getEntryProperties(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_PARATABLE));
|
||||
List<Map<String, Object>> tableProperties = new ArrayList<Map<String, Object>>();
|
||||
String propertiesInfo = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_PARATABLE);
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(propertiesInfo)) {
|
||||
tableProperties = ConvertionHelper
|
||||
.getEntryProperties(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_PARATABLE));
|
||||
}
|
||||
return tableProperties;
|
||||
}
|
||||
if (value.equals("DRIVER_VERSION")) {
|
||||
String driverVersion = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_DRIVER);
|
||||
@@ -1110,7 +1115,9 @@ public class RepositoryToComponentProperty {
|
||||
|| EDatabaseConnTemplate.SAPHana.getDBDisplayName().equals(databaseType)
|
||||
|| EDatabaseConnTemplate.MSSQL.getDBDisplayName().equals(databaseType)) {
|
||||
if (dbVersionString != null) {
|
||||
driverValue = dbVersionString.toUpperCase();
|
||||
if (EDatabaseVersion4Drivers.getDbVersionName(databaseType, dbVersionString) != null) {
|
||||
driverValue = dbVersionString.toUpperCase();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isContextMode(connection, dbVersionString)) {
|
||||
@@ -1245,6 +1252,11 @@ public class RepositoryToComponentProperty {
|
||||
return value2;
|
||||
|
||||
}
|
||||
|
||||
if(value.equals("SUPPORT_NLS")) {
|
||||
return connection.isSupportNLS();
|
||||
}
|
||||
|
||||
if (value.equals("CDC_TYPE_MODE")) { //$NON-NLS-1$
|
||||
return new Boolean(CDCTypeMode.LOG_MODE.getName().equals(connection.getCdcTypeMode()));
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IMultipleComponentManager;
|
||||
@@ -509,7 +510,7 @@ public abstract class AbstractNode implements INode {
|
||||
}
|
||||
for (String key : childParameters.keySet()) {
|
||||
IElementParameter param = childParameters.get(key);
|
||||
if (param.getName().equals(name)) {
|
||||
if (StringUtils.equals(name, param.getName())) {
|
||||
return param;
|
||||
}
|
||||
}
|
||||
@@ -676,7 +677,8 @@ public abstract class AbstractNode implements INode {
|
||||
return null;
|
||||
}
|
||||
for (IMetadataTable table : metadataList) {
|
||||
if (table.getAttachedConnector().equals(connector)) {
|
||||
String attachedConnector = table.getAttachedConnector();
|
||||
if (attachedConnector != null && attachedConnector.equals(connector)) {
|
||||
return table;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ public enum EParameterFieldType {
|
||||
SCHEMA_XPATH_QUERYS,
|
||||
QUERYSTORE_TYPE,
|
||||
GUESS_SCHEMA,
|
||||
DYNAMIC_GUESS_SCHEMA,
|
||||
PROPERTY_TYPE,
|
||||
EXTERNAL,
|
||||
FILE,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user