Compare commits

..

3 Commits

Author SHA1 Message Date
jiezhang-tlnd
e7ebc5eb42 add parameter datacenter (#5125) 2022-03-14 15:09:57 +08:00
hzhao-talendbj
7f1490aada chore(TUP-34729): change code simply to trigger plugin updated (#5122) 2022-03-11 15:33:37 +08:00
hzhao-talendbj
d09b0137b8 chore(TUP-34729): change order simply to trigger plugin updated (#5120)
* chore(TUP-34729): change order simply to trigger plugin updated

* chore(TUP-34729): change order simply to trigger plugin updated

* chore(TUP-34729): change order simply to trigger plugin updated
2022-03-11 15:31:31 +08:00
222 changed files with 2709 additions and 10965 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

View File

@@ -28,21 +28,11 @@ 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 RED_COLOR = new Color(null, new RGB(204,87,89));// 255
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);
static final Color LOCHMARA_COLOR = new Color(null, 6, 117, 193);
static final Color WATHET_COLOR = new Color(null, 135, 206, 235);
static final Color INFO_COLOR = new Color(null, 205, 227, 242);
// static final Color INFO_COLOR = YELLOW_GREEN_COLOR;
static final Color WARN_COLOR = new Color(null, 252, 230, 217);
static final Color ERR_COLOR = new Color(null, 255, 235, 235);
static final Color SUCCEED_COLOR = new Color(null, 221, 242, 217);
}

View File

@@ -114,7 +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.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log plus de d\u00E9tails.
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
ModelSelectionDialog.Option=Option
ModelSelectionDialog.BuiltIn=Basculer la propri\u00E9t\u00E9 en mode Built-In.

View File

@@ -121,7 +121,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\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\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

View File

@@ -106,7 +106,7 @@ SWTCalendarWithTime.contentNoon=\u4E2D\u5348
SWTCalendarWithTime.contentNow=\u73B0\u5728
SWTCalendarWithTime.contnetSec=\u79D2:
TableViewerCreator.CallMethod.ErrorMsg=\u53EA\u6709\u60A8\u5DF2\u7ECF\u8C03\u7528\u4E86 createTable() \u65B9\u6CD5\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u6B64\u65B9\u6CD5\u3002
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002 \n \u4F7F\u7528 '{0}' \u6216\u6269\u5C55\u5B83\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002\n \u4F7F\u7528 '{0}' \u6216\u80FD\u591F\u5BF9\u5176\u8FDB\u884C\u6269\u5C55\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
TableViewerCreator.columnNoIBeanProperty=\u5217 '{0}' ('{1}') \u8BBE\u7F6E\u4E86 CellEditor\uFF0C\u4F46\u6CA1\u6709 IBeanPropertyAccessors\uFF01
TableViewerCreator.columnNullId=\u5217 '{0}' \u7684 id \u4E3A null\uFF01
TableViewerCreator.IdProperty.AssertMsg=\u4F60\u5FC5\u987B\u6539\u53D8\u5176\u4E2D\u4E00\u4E2A\u5217\u7684 idProperty\uFF0C\u4E00\u4E2A\u8868\u4E2D\u7684\u6BCF\u4E2A\u5217\u7684 idProperty \u5FC5\u987B\u552F\u4E00\u3002
@@ -114,7 +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.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
exception.errorOccured=\u53D1\u751F\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
ModelSelectionDialog.BuiltIn=\u66F4\u6539\u4E3A\u5185\u7F6E\u5C5E\u6027\u3002
@@ -125,7 +125,7 @@ ModelSelectionDialog.Update=\u66F4\u65B0\u5B58\u50A8\u5E93\u8FDE\u63A5\u3002
SSLConfirmDialog.KeyStore=\u8BF7\u8F93\u5165\u5BC6\u94A5\u5E93
SSLConfirmDialog.TrustStore=\u8BF7\u8F93\u5165\u4FE1\u4EFB\u5E93
SSLConfirmDialog.Password=\u8BF7\u8F93\u5165\u5BC6\u7801
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u5FC5\u987B\u66F4\u6539\u67D0\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u901A\u5E38\u662F\u7531\u4E8E\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u5BFC\u81F4\u3002
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u987B\u6539\u53D8\u4E00\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u53EF\u80FD\u662F\u56E0\u4E3A\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u9020\u6210\u7684\u3002
GlobalServiceRegister.ServiceNotRegistered=\u670D\u52A1 {0} \u8FD8\u672A\u6CE8\u518C\u3002
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=xml \u65E0\u6CD5\u89E3\u6790\u3002
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=xml \u65E0\u6CD5\u4EE5\u8FD9\u79CD\u683C\u5F0F\u89E3\u6790\u3002

View File

@@ -39,10 +39,6 @@ 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$

View File

@@ -95,9 +95,10 @@
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.19</version>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<type>bundle</type>
</dependency>
</dependencies>

View File

@@ -58,14 +58,10 @@ 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;
}
@@ -128,17 +124,6 @@ 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);
@@ -152,35 +137,6 @@ 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.

View File

@@ -46,12 +46,6 @@ 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();

View File

@@ -110,7 +110,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.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log plus de d\u00E9tails.
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
ModelSelectionDialog.Option=Option
ModelSelectionDialog.BuiltIn=Basculer la propri\u00E9t\u00E9 en mode Built-In.

View File

@@ -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\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\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

View File

@@ -102,7 +102,7 @@ SWTCalendarWithTime.contentNoon=\u4E2D\u5348
SWTCalendarWithTime.contentNow=\u73B0\u5728
SWTCalendarWithTime.contnetSec=\u79D2:
TableViewerCreator.CallMethod.ErrorMsg=\u53EA\u6709\u60A8\u5DF2\u7ECF\u8C03\u7528\u4E86 createTable() \u65B9\u6CD5\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u6B64\u65B9\u6CD5\u3002
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002 \n \u4F7F\u7528 '{0}' \u6216\u6269\u5C55\u5B83\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002\n \u4F7F\u7528 '{0}' \u6216\u80FD\u591F\u5BF9\u5176\u8FDB\u884C\u6269\u5C55\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
TableViewerCreator.columnNoIBeanProperty=\u5217 '{0}' ('{1}') \u8BBE\u7F6E\u4E86 CellEditor\uFF0C\u4F46\u6CA1\u6709 IBeanPropertyAccessors\uFF01
TableViewerCreator.columnNullId=\u5217 '{0}' \u7684 id \u4E3A null\uFF01
TableViewerCreator.IdProperty.AssertMsg=\u4F60\u5FC5\u987B\u6539\u53D8\u5176\u4E2D\u4E00\u4E2A\u5217\u7684 idProperty\uFF0C\u4E00\u4E2A\u8868\u4E2D\u7684\u6BCF\u4E2A\u5217\u7684 idProperty \u5FC5\u987B\u552F\u4E00\u3002
@@ -110,14 +110,14 @@ 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.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
exception.errorOccured=\u53D1\u751F\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
ModelSelectionDialog.BuiltIn=\u66F4\u6539\u4E3A\u5185\u7F6E\u5C5E\u6027\u3002
ModelSelectionDialog.ViewSchema=\u67E5\u770B schema (\u53EA\u8BFB)\u3002
ModelSelectionDialog.ViewQuery=\u67E5\u770B\u67E5\u8BE2 (\u53EA\u8BFB)\u3002
ModelSelectionDialog.Update=\u66F4\u65B0\u5B58\u50A8\u5E93\u8FDE\u63A5\u3002
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u5FC5\u987B\u66F4\u6539\u67D0\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u901A\u5E38\u662F\u7531\u4E8E\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u5BFC\u81F4\u3002
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u987B\u6539\u53D8\u4E00\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u53EF\u80FD\u662F\u56E0\u4E3A\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u9020\u6210\u7684\u3002
StateComposite.FLL_DB_INFOR=\u586B\u5199\u6570\u636E\u5E93\u4FE1\u606F
StateComposite.HELP_MESSAGE=\u5E2E\u52A9\u6D88\u606F
StateComposite.MESSAGE1=\u53EF\u4EE5\u521B\u5EFA\u52A8\u6001\u4F5C\u4E1A\u5E76\u8BBE\u7F6E\u4F9D\u8D56\u4E8E\u8F93\u5165\u8868\u7684\u6587\u4EF6\u540D\u6216\u8868\u540D\u3002

View File

@@ -1,38 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.graphics.Color;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ITalendWizard extends IWizard {
Color getBackgroundColor();
Color getForegroundColor();
int getHorizonPadding();
int getVerticalPadding();
int getVerticalMargin();
int getHorizonMargin();
boolean hideDefaultMessageArea();
}

View File

@@ -1,26 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.wizard.IWizardContainer2;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ITalendWizardContainer extends IWizardContainer2 {
void showMoreInfoLink(IDialogPage page, String name, String link);
}

View File

@@ -1,968 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.ProgressMonitorPart;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.ColorConstants;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendWizardDialog extends WizardDialog implements ITalendWizardContainer {
private boolean useNewStyle = false;
private Color backgroundColor;
private Color foregroundColor;
private static Font titleBigFont;
private Canvas titleLabelWithAnimation;
private Canvas messagePanel;
private Color msgPanelColor = ColorConstants.INFO_COLOR;
private Composite topPanel;
private Label errIcon;
private StyledText errMsgTxt;
private Hyperlink moreInfoLink;
private String moreInfoUrl;
private volatile Thread titleAnimationSchedulerThread;
private volatile boolean threadShowingMsg = false;
private Image bigTitleImg;
private Image smallTitleImg;
private String title;
private int messageTopY;
private volatile double percentage = 1.0;
private boolean hideMessageArea = false;
public TalendWizardDialog(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
useNewStyle = true;
if (newWizard instanceof ITalendWizard) {
ITalendWizard talendWizard = (ITalendWizard) newWizard;
backgroundColor = talendWizard.getBackgroundColor();
foregroundColor = talendWizard.getForegroundColor();
hideMessageArea = talendWizard.hideDefaultMessageArea();
}
// this.setTitleAreaColor(new RGB(205, 227, 242));
}
private Thread createTitleAnimationSchedulerThread(boolean showMessage) {
return new Thread(new Runnable() {
@Override
public void run() {
titleAnimationSchedulerThread(showMessage);
}
}, "title anmimation, show: " + showMessage);
}
private void titleAnimationSchedulerThread(boolean showMessage) {
int totalTime = 500;
int split = 30;
int sleepTime = totalTime / split;
double percentPerFrame = 1.0 / split;
for (int i = 1; i < split; i++) {
double curX = 1 - percentPerFrame * i;
double donePercent = Math.sqrt(1 - curX * curX);
onTitleAreaRefresh(donePercent, showMessage);
if (Thread.currentThread().isInterrupted()) {
break;
}
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
onTitleAnimationInterupted(showMessage);
return;
}
}
onTitleAreaRefresh(1.0, showMessage);
}
private void onTitleAnimationInterupted(boolean showMessage) {
this.percentage = 1.0;
}
private boolean isHideMessageArea() {
return hideMessageArea;
}
private void onTitleAreaRefresh(double donePercent, boolean showMessage) {
if (isHideMessageArea()) {
return;
}
topPanel.getDisplay().syncExec(() -> {
onTitleAreaRefreshFrame(donePercent, showMessage);
});
}
private void onTitleAreaRefreshFrame(double donePercent, boolean showMessage) {
if (isHideMessageArea()) {
return;
}
this.percentage = donePercent;
sortPanelOrder();
if (!showMessage) {
messagePanel.setVisible(false);
} else {
messagePanel.setVisible(true);
// errIcon.setVisible(true);
}
Point size = topPanel.getSize();
int totalY = size.y - messageTopY;
int y = 0;
if (showMessage) {
y = messageTopY + (int) ((1.0 - donePercent) * totalY);
} else {
y = messageTopY + (int) (donePercent * totalY);
}
FormData fd = (FormData) messagePanel.getLayoutData();
fd.top = new FormAttachment(0, y);
this.titleLabelWithAnimation.redraw();
topPanel.layout();
}
public void setNewErrorStyle(boolean newErrStyle) {
this.useNewStyle = newErrStyle;
}
@Override
protected Control createContents(Composite parent) {
if (useNewStyle()) {
parent.setBackground(backgroundColor);
parent.setForeground(foregroundColor);
}
Control panel = super.createContents(parent);
try {
if (useNewStyle()) {
sortPanelOrder();
workArea.setBackground(backgroundColor);
workArea.setForeground(foregroundColor);
pageContainer.setBackground(backgroundColor);
pageContainer.setForeground(foregroundColor);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return panel;
}
private boolean useNewStyle() {
return this.useNewStyle;
}
@Override
protected Control createDialogArea(Composite parent) {
Composite panel = (Composite) super.createDialogArea(parent);
if (useNewStyle()) {
this.titleBarSeparator.dispose();
this.separator.dispose();
}
return panel;
}
@Override
protected ProgressMonitorPart createProgressMonitorPart(Composite composite, GridLayout pmlayout) {
if (useNewStyle()) {
composite.setBackground(backgroundColor);
composite.setForeground(foregroundColor);
// progMonitor.setBackground(backgroundColor);
// progMonitor.setForeground(foregroundColor);
}
ProgressMonitorPart progMonitor = super.createProgressMonitorPart(composite, pmlayout);
return progMonitor;
}
@Override
protected Control createButtonBar(Composite parent) {
if (!useNewStyle()) {
return super.createButtonBar(parent);
}
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(backgroundColor);
composite.setForeground(foregroundColor);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.horizontalSpacing = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
composite.setFont(parent.getFont());
Control helpControl = null;
// create help control if needed
if (isHelpAvailable()) {
helpControl = createHelpControl(composite);
((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(
IDialogConstants.HORIZONTAL_MARGIN);
}
createButtonsForButtonBar(composite);
Button helpButton = getButton(IDialogConstants.HELP_ID);
Button finishButton = getButton(IDialogConstants.FINISH_ID);
Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
Button backButton = getButton(IDialogConstants.BACK_ID);
Button nextButton = getButton(IDialogConstants.NEXT_ID);
FormLayout formLayout = new FormLayout();
formLayout.marginWidth = getHorizonMargin();
formLayout.marginHeight = getVerticalPadding();
composite.setLayout(formLayout);
final int HORIZON_ALIGN = getHorizonPadding();
cancelButton.setBackground(backgroundColor);
cancelButton.setForeground(foregroundColor);
FormData cancelData = new FormData();
cancelData.left = new FormAttachment(0);
cancelData.top = new FormAttachment(composite, 0, SWT.CENTER);
cancelData.width = getButtonWidth(cancelButton);
cancelButton.setLayoutData(cancelData);
Control tmpCtrl = cancelButton;
if (helpControl != null) {
helpControl.setBackground(backgroundColor);
helpControl.setForeground(foregroundColor);
FormData formData = new FormData();
formData.left = new FormAttachment(tmpCtrl, HORIZON_ALIGN, SWT.RIGHT);
formData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
helpControl.setLayoutData(formData);
tmpCtrl = helpControl;
}
if (helpButton != null) {
helpButton.setBackground(backgroundColor);
helpButton.setForeground(foregroundColor);
FormData formData = new FormData();
formData.left = new FormAttachment(tmpCtrl, HORIZON_ALIGN, SWT.RIGHT);
formData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
formData.width = getButtonWidth(helpButton);
helpButton.setLayoutData(formData);
tmpCtrl = helpButton;
}
finishButton.setBackground(backgroundColor);
finishButton.setForeground(foregroundColor);
FormData finishData = new FormData();
finishData.right = new FormAttachment(100);
finishData.top = new FormAttachment(composite, 0, SWT.CENTER);
finishData.width = getButtonWidth(finishButton);
finishButton.setLayoutData(finishData);
tmpCtrl = finishButton;
if (nextButton != null) {
nextButton.setBackground(backgroundColor);
nextButton.setForeground(foregroundColor);
FormData nextData = new FormData();
Composite nextParentCtrl = nextButton.getParent();
nextParentCtrl.setBackground(backgroundColor);
nextParentCtrl.setForeground(foregroundColor);
nextData.right = new FormAttachment(tmpCtrl, -HORIZON_ALIGN, SWT.LEFT);
nextData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
nextParentCtrl.setLayoutData(nextData);
}
if (backButton != null) {
backButton.setBackground(backgroundColor);
backButton.setForeground(foregroundColor);
}
return composite;
}
private int getButtonWidth(Button btn) {
int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
Point minSize = btn.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
return Math.max(widthHint, minSize.x);
}
@Override
protected Control createTitleArea(Composite parent) {
Control titleCtrl = null;
if (useNewStyle()) {
final int horizonPadding = getHorizonPadding();
final int horizonMargin = getHorizonMargin();
final int verticalPadding = getVerticalPadding();
final int msgMargin = getMargin();
Control oldTitleArea = super.createTitleArea(parent);
topPanel = new Composite(parent, SWT.NONE);
titleCtrl = topPanel;
// topPanel.setBackground(ColorConstants.RED_COLOR);
topPanel.setBackground(backgroundColor);
topPanel.setForeground(foregroundColor);
FormData topPanelFd = new FormData();
topPanelFd.top = new FormAttachment(0);
topPanelFd.left = new FormAttachment(0);
topPanelFd.right = new FormAttachment(100);
// topPanelFd.bottom = new FormAttachment(oldTitleArea, 0, SWT.BOTTOM);
Label tmpLabel = new Label(parent, SWT.NONE);
// tmpLabel.setFont(getTitleBigFont());
tmpLabel.setFont(JFaceResources.getBannerFont());
tmpLabel.setText("Test");
tmpLabel.pack();
Point size = tmpLabel.getSize();
tmpLabel.setFont(null);
tmpLabel.setText("Test");
tmpLabel.pack();
Point errSize = tmpLabel.getSize();
tmpLabel.dispose();
if (isHideMessageArea()) {
topPanelFd.height = 0;
} else {
topPanelFd.height = verticalPadding + size.y + verticalPadding + errSize.y + msgMargin * 2;
}
topPanel.setLayoutData(topPanelFd);
topPanel.setLayout(new FormLayout());
// sortPanelOrder();
titleLabelWithAnimation = new Canvas(topPanel, SWT.DOUBLE_BUFFERED);
titleLabelWithAnimation.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent e) {
drawTitle(e);
}
});
titleLabelWithAnimation.setBackground(backgroundColor);
titleLabelWithAnimation.setForeground(foregroundColor);
titleLabelWithAnimation.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if (bigTitleImg != null && !bigTitleImg.isDisposed()) {
bigTitleImg.dispose();
}
if (smallTitleImg != null && !smallTitleImg.isDisposed()) {
smallTitleImg.dispose();
}
}
});
FormData fd = new FormData();
fd.top = new FormAttachment(0, verticalPadding);
fd.left = new FormAttachment(0, horizonMargin);
fd.right = new FormAttachment(100);
fd.bottom = new FormAttachment(100);
titleLabelWithAnimation.setLayoutData(fd);
messagePanel = new Canvas(topPanel, SWT.DOUBLE_BUFFERED);
messagePanel.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent e) {
drawMessageBackground(e, messagePanel);
// int len = 160;
// int a = 10;
// int a_Len = a + (int) (percentage * (size.x - a));
// int b_Len = a_Len + len;
// if (a_Len < size.x || b_Len < size.x) {
// if (size.x <= a_Len) {
// a_Len = size.x;
// }
// if (size.x <= b_Len) {
// b_Len = size.x;
// }
// e.gc.setBackground(ColorConstants.WHITE_COLOR);
// e.gc.fillPolygon(new int[] { a_Len, 0, size.x, 0, size.x, size.y, b_Len, size.y });
// }
}
});
messagePanel.setBackground(backgroundColor);
messagePanel.setForeground(foregroundColor);
fd = new FormData();
tmpLabel = new Label(topPanel, SWT.NONE);
tmpLabel.setFont(JFaceResources.getBannerFont());
tmpLabel.setText("Test");
tmpLabel.pack();
size = tmpLabel.getSize();
tmpLabel.dispose();
messageTopY = verticalPadding + size.y + verticalPadding;
fd.top = new FormAttachment(0, messageTopY);
// fd.left = new FormAttachment(0, convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING));
// fd.right = new FormAttachment(100, -convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING));
fd.left = new FormAttachment(0, horizonMargin);
fd.right = new FormAttachment(100, -horizonMargin);
fd.bottom = new FormAttachment(100);
messagePanel.setLayoutData(fd);
messagePanel.setLayout(new FormLayout());
errIcon = new Label(messagePanel, SWT.NONE);
errIcon.setBackground(msgPanelColor);
errIcon.setForeground(foregroundColor);
fd = new FormData();
fd.top = new FormAttachment(0, msgMargin);
fd.left = new FormAttachment(0, msgMargin);
errIcon.setLayoutData(fd);
moreInfoLink = new Hyperlink(messagePanel, SWT.NONE);
moreInfoLink.setText("");
moreInfoLink.setBackground(msgPanelColor);
moreInfoLink.setUnderlined(true);
moreInfoLink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
onMoreInfoLinkClicked(e);
}
});
errMsgTxt = new StyledText(messagePanel, SWT.READ_ONLY | SWT.WRAP);
errMsgTxt.setEditable(false);
errMsgTxt.setBackground(msgPanelColor);
errMsgTxt.setForeground(org.eclipse.draw2d.ColorConstants.black);
fd = new FormData();
fd.top = new FormAttachment(errMsgTxt, 0, SWT.CENTER);
fd.right = new FormAttachment(100, -msgMargin);
moreInfoLink.setLayoutData(fd);
fd = new FormData();
fd.top = new FormAttachment(errIcon, 0, SWT.TOP);
fd.left = new FormAttachment(errIcon, horizonPadding, SWT.RIGHT);
fd.right = new FormAttachment(moreInfoLink, -horizonPadding, SWT.LEFT);
fd.bottom = new FormAttachment(100, -msgMargin);
errMsgTxt.setLayoutData(fd);
parent.setBackground(backgroundColor);
// parent.setBackground(ColorConstants.YELLOW_COLOR);
titleImageLabel.setBackground(backgroundColor);
titleLabel.setBackground(backgroundColor);
titleLabel.moveBelow(null);
messageImageLabel.setBackground(backgroundColor);
leftFillerLabel.setBackground(backgroundColor);
bottomFillerLabel.setBackground(backgroundColor);
messageLabel.setBackground(backgroundColor);
} else {
titleCtrl = super.createTitleArea(parent);
}
return titleCtrl;
}
private Composite createToolTipContent(Composite parent) {
Composite result = new Composite(parent, SWT.NONE);
final int msgMargin = getMargin();
final int horizonPadding = getHorizonPadding();
result.setBackground(null);
result.setLayout(new FormLayout());
Canvas msgPanel = new Canvas(result, SWT.DOUBLE_BUFFERED);
FormData fd = new FormData();
fd.top = new FormAttachment(0);
fd.left = new FormAttachment(0);
fd.width = messagePanel.getSize().x;
fd.bottom = new FormAttachment(100);
msgPanel.setLayoutData(fd);
msgPanel.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent e) {
drawMessageBackground(e, msgPanel);
}
});
msgPanel.setBackground(messagePanel.getBackground());
msgPanel.setForeground(messagePanel.getForeground());
msgPanel.setLayout(new FormLayout());
Label errIconLabel = new Label(msgPanel, SWT.NONE);
errIconLabel.setBackground(errIcon.getBackground());
errIconLabel.setForeground(errIcon.getForeground());
errIconLabel.setImage(errIcon.getImage());
fd = new FormData();
fd.top = new FormAttachment(0, msgMargin);
fd.left = new FormAttachment(0, msgMargin);
errIconLabel.setLayoutData(fd);
Hyperlink link = new Hyperlink(msgPanel, SWT.NONE);
link.setText(moreInfoLink.getText());
link.setBackground(moreInfoLink.getBackground());
link.setUnderlined(moreInfoLink.isUnderlined());
StyledText msgTxt = new StyledText(msgPanel, SWT.READ_ONLY | SWT.WRAP);
msgTxt.setBackground(errMsgTxt.getBackground());
msgTxt.setForeground(errMsgTxt.getForeground());
msgTxt.setText(errMsgTxt.getText());
fd = new FormData();
fd.top = new FormAttachment(msgTxt, 0, SWT.CENTER);
fd.right = new FormAttachment(100, -msgMargin);
link.setLayoutData(fd);
fd = new FormData();
fd.top = new FormAttachment(errIconLabel, 0, SWT.TOP);
fd.left = new FormAttachment(errIconLabel, horizonPadding, SWT.RIGHT);
fd.right = new FormAttachment(link, -horizonPadding, SWT.LEFT);
msgTxt.setLayoutData(fd);
return result;
}
private void onMoreInfoLinkClicked(HyperlinkEvent e) {
Program.launch(moreInfoUrl);
}
@Override
protected void resetWorkAreaAttachments(Control top) {
FormData childData = new FormData();
childData.top = new FormAttachment(topPanel, 0, SWT.BOTTOM);
childData.right = new FormAttachment(100, 0);
childData.left = new FormAttachment(0, 0);
childData.bottom = new FormAttachment(100, 0);
workArea.setLayoutData(childData);
}
@Override
protected void layoutForNewMessage(boolean forceLayout) {
if (!useNewStyle()) {
super.layoutForNewMessage(forceLayout);
return;
}
// if (forceLayout) {
// return;
// }
if (hasMessage()) {
messagePanel.setVisible(true);
// Image image = messageImageLabel.getImage();
// if (image == null) {
// image = messageImage;
// }
// if (image != null && messageImageLabel.isVisible()) {
//// this.errIcon.setVisible(true);
// this.errIcon.setImage(image);
// } else {
// this.errIcon.setImage(null);
//// this.errIcon.setVisible(false);
// }
updateMsgPanelColor(pageMessageType);
// topPanel.layout();
messagePanel.layout();
Point messageSize = errMsgTxt.getSize();
int messageLabelUnclippedHeight = errMsgTxt.computeSize(messageSize.x, SWT.DEFAULT, true).y;
boolean messageLabelClipped = messageLabelUnclippedHeight > messageSize.y;
if (errMsgTxt.getData() instanceof ToolTip) {
ToolTip toolTip = (ToolTip) errMsgTxt.getData();
toolTip.hide();
toolTip.deactivate();
errMsgTxt.setData(null);
}
if (messageLabelClipped) {
ToolTip tooltip = new ToolTip(errMsgTxt, ToolTip.NO_RECREATE, false) {
@Override
protected Composite createToolTipContentArea(Event event, Composite parent) {
return createToolTipContent(parent);
}
@Override
public Point getLocation(Point tipSize, Event event) {
return errMsgTxt.getShell().toDisplay(messagePanel.getLocation());
}
};
errMsgTxt.setData(tooltip);
tooltip.setPopupDelay(0);
tooltip.activate();
}
}
}
@Override
protected void setImageLabelVisible(boolean visible) {
super.setImageLabelVisible(visible);
if (useNewStyle()) {
messagePanel.setVisible(visible);
if (visible) {
errIcon.setImage(messageImageLabel.getImage());
} else {
errIcon.setImage(null);
}
}
}
private void sortPanelOrder() {
if (isHideMessageArea()) {
return;
}
if (this.topPanel == null) {
return;
}
this.titleImageLabel.moveAbove(null);
this.topPanel.moveBelow(this.titleImageLabel);
messagePanel.moveAbove(titleLabelWithAnimation);
if (!hasMessage()) {
messagePanel.setVisible(false);
}
}
@Override
protected void setLayoutsForNormalMessage(int verticalSpacing, int horizontalSpacing) {
if (isHideMessageArea()) {
return;
}
super.setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing);
if (useNewStyle()) {
if (this.topPanel != null) {
onTitleAreaRefreshFrame(1.0, false);
}
}
}
private static Font getTitleBigFont() {
if (titleBigFont != null) {
return titleBigFont;
}
Font bannerFont = JFaceResources.getBannerFont();
FontData[] fontData = bannerFont.getFontData();
for (FontData fd : fontData) {
fd.setHeight(fd.getHeight() + 7);
}
titleBigFont = new Font(Display.getDefault(), fontData);
return titleBigFont;
}
@Override
protected void updateMessage(String newMessage) {
if (isHideMessageArea()) {
return;
}
boolean hadMsg = hasMessage();
super.updateMessage(newMessage);
this.errMsgTxt.setText(this.messageLabel.getText());
boolean hasMsg = hasMessage();
messagePanel.setVisible(hasMsg);
if (hadMsg != hasMsg) {
startAnimation();
}
}
@Override
public void setErrorMessage(String newErrorMessage) {
if (isHideMessageArea()) {
return;
}
if (StringUtils.isNotBlank(newErrorMessage)) {
this.pageMessageType = IMessageProvider.ERROR;
updateMsgPanelColor(this.pageMessageType);
}
super.setErrorMessage(newErrorMessage);
}
@Override
protected void showMessage(String newMessage, Image newImage) {
if (isHideMessageArea()) {
return;
}
super.showMessage(newMessage, newImage);
}
@Override
public void setMessage(String newMessage, int newType) {
if (isHideMessageArea()) {
return;
}
if (StringUtils.isNotBlank(newMessage)) {
updateMsgPanelColor(newType);
}
super.setMessage(newMessage, newType);
}
private void updateMsgPanelColor(int type) {
Color foreColor = getMsgPanelForegroundColor(type);
msgPanelColor = getMsgPanelBackgroundColor(type);
errIcon.setBackground(msgPanelColor);
errMsgTxt.setBackground(msgPanelColor);
errMsgTxt.setForeground(foreColor);
moreInfoLink.setBackground(msgPanelColor);
// moreInfoLink.setForeground(getMoreInfoLinkForegroundColor(type));
messagePanel.redraw();
}
private Color getMsgPanelBackgroundColor(int type) {
Color color = ColorConstants.INFO_COLOR;
switch (type) {
case IMessageProvider.NONE:
case IMessageProvider.INFORMATION:
color = ColorConstants.INFO_COLOR;
break;
case IMessageProvider.WARNING:
color = ColorConstants.WARN_COLOR;
break;
case IMessageProvider.ERROR:
color = ColorConstants.ERR_COLOR;
break;
}
return color;
}
private Color getMsgPanelForegroundColor(int type) {
Color color = ColorConstants.WHITE_COLOR;
switch (type) {
case IMessageProvider.WARNING:
color = org.eclipse.draw2d.ColorConstants.black;
break;
case IMessageProvider.NONE:
case IMessageProvider.INFORMATION:
case IMessageProvider.ERROR:
color = ColorConstants.WHITE_COLOR;
break;
}
return color;
}
private Color getMoreInfoLinkForegroundColor(int type) {
Color color = null;
switch (type) {
case IMessageProvider.NONE:
case IMessageProvider.INFORMATION:
case IMessageProvider.ERROR:
color = ColorConstants.WHITE_COLOR;
break;
default:
break;
}
return color;
}
private void startAnimation() {
boolean hasMsg = hasMessage();
if (this.titleAnimationSchedulerThread != null) {
if (hasMsg == threadShowingMsg) {
return;
} else {
this.titleAnimationSchedulerThread.interrupt();
}
}
threadShowingMsg = hasMsg;
titleAnimationSchedulerThread = createTitleAnimationSchedulerThread(threadShowingMsg);
titleAnimationSchedulerThread.start();
}
private boolean hasMessage() {
return StringUtils.isNotBlank(messageLabel.getText());
}
@Override
public void setTitle(String newTitle) {
super.setTitle(newTitle);
if (StringUtils.equals(newTitle, title) && this.bigTitleImg != null) {
return;
}
if (this.titleAnimationSchedulerThread != null) {
this.titleAnimationSchedulerThread.interrupt();
}
this.title = newTitle;
if (this.bigTitleImg != null) {
this.bigTitleImg.dispose();
}
this.bigTitleImg = createTitleImage(getTitleBigFont(), this.title);
if (this.smallTitleImg != null) {
this.smallTitleImg.dispose();
}
this.smallTitleImg = createTitleImage(JFaceResources.getBannerFont(), this.title);
this.titleLabelWithAnimation.redraw();
}
@Override
public void showMoreInfoLink(IDialogPage page, String name, String link) {
if (isHideMessageArea()) {
return;
}
if (getCurrentPage() != page) {
return;
}
if (StringUtils.isBlank(name)) {
moreInfoLink.setText("");
moreInfoLink.setEnabled(false);
} else {
moreInfoLink.setEnabled(true);
moreInfoLink.setText(name);
}
moreInfoUrl = link;
this.moreInfoLink.pack();
this.moreInfoLink.redraw();
this.messagePanel.layout();
}
@Override
public void setTitleImage(Image newTitleImage) {
super.setTitleImage(newTitleImage);
if (this.titleAreaImage != null) {
if (this.messageTopY < this.titleAreaImage.getBounds().height) {
FormData fd = (FormData) messagePanel.getLayoutData();
Rectangle imgBounds = this.titleAreaImage.getBounds();
fd.right = new FormAttachment(100, -getHorizonPadding() - imgBounds.width);
FormData panelFd = (FormData) this.topPanel.getLayoutData();
int imageY = imgBounds.height;
int topPanelY = panelFd.height;
if (topPanelY < imageY) {
panelFd.height = imageY;
// fd.right = new FormAttachment(this.titleImageLabel, -getMargin(), SWT.LEFT);
this.topPanel.getParent().layout();
} else {
}
this.topPanel.layout();
}
}
}
private Image createTitleImage(Font font, String title) {
Label tmpLabel = new Label(titleLabel.getParent(), SWT.NONE);
tmpLabel.setText(title);
tmpLabel.setFont(font);
tmpLabel.pack();
Point size = tmpLabel.getSize();
tmpLabel.dispose();
int width = size.x;
if (StringUtils.isEmpty(title)) {
width = 1;
}
Image tmpImg = new Image(Display.getDefault(), width, size.y);
GC gc = new GC(tmpImg);
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
gc.setFont(font);
gc.setAlpha(0);
gc.drawRectangle(0, 0, width, size.y);
gc.setAlpha(255);
gc.drawText(title, 0, 0, true);
gc.dispose();
ImageData imageData = tmpImg.getImageData();
imageData.transparentPixel = imageData.getPixel(0, 0);
tmpImg.dispose();
return new Image(Display.getDefault(), imageData);
}
private void drawTitle(PaintEvent e) {
double p = percentage;
Rectangle sBounds = smallTitleImg.getBounds();
Rectangle bBounds = bigTitleImg.getBounds();
int width = bBounds.width - sBounds.width;
int height = bBounds.height - sBounds.height;
Rectangle baseBounds = sBounds;
Image finalImg = bigTitleImg;
finalImg = bigTitleImg;
int totalHight = e.height;
int middleY = (totalHight - bBounds.height) / 2;
// int startY = getMargin();
int startY = 0;
int baseY = startY;
int y = (int) (p * (middleY - startY));
if (hasMessage()) {
y = -y;
width = -width;
height = -height;
baseBounds = bBounds;
baseY = middleY;
finalImg = smallTitleImg;
}
Point newSize = new Point((int) (baseBounds.width + p * width), (int) (baseBounds.height + p * height));
GC gc = e.gc;
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
if (p <= 1.0) {
gc.drawImage(bigTitleImg, 0, 0, bBounds.width, bBounds.height, 0, baseY + y, newSize.x, newSize.y);
} else {
Rectangle bounds = finalImg.getBounds();
gc.drawImage(finalImg, 0, 0, bounds.width, bounds.height, 0, baseY + y, bounds.width, bounds.height);
}
}
private void drawMessageBackground(PaintEvent e, Control ctrl) {
e.gc.setBackground(msgPanelColor);
e.gc.setAntialias(SWT.ON);
e.gc.setInterpolation(SWT.HIGH);
Point size = ctrl.getSize();
e.gc.fillRoundRectangle(0, 0, size.x, size.y, 15, 15);
}
private int getHorizonPadding() {
IWizard wizard = this.getWizard();
if (wizard instanceof ITalendWizard) {
return ((ITalendWizard) wizard).getHorizonPadding();
}
return 5;
}
private int getVerticalPadding() {
IWizard wizard = this.getWizard();
if (wizard instanceof ITalendWizard) {
return ((ITalendWizard) wizard).getVerticalPadding();
}
return 5;
}
private int getHorizonMargin() {
IWizard wizard = this.getWizard();
if (wizard instanceof ITalendWizard) {
return ((ITalendWizard) wizard).getHorizonMargin();
}
return 5;
}
private int getMargin() {
return 10;
}
}

View File

@@ -1,244 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import java.lang.reflect.Field;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.ProgressMonitorPart;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.ColorConstants;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendWizardDialog_backup extends WizardDialog {
private boolean useNewErrorStyle = false;
/**
* Warning color: #FCE6D9 <br/>
* info color: #CDE3F2
*/
public TalendWizardDialog_backup(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
useNewErrorStyle = true;
this.setTitleAreaColor(new RGB(205, 227, 242));
}
public void setNewErrorStyle(boolean newErrStyle) {
this.useNewErrorStyle = newErrStyle;
}
@Override
protected Control createContents(Composite parent) {
parent.setBackground(ColorConstants.WHITE_COLOR);
Control panel = super.createContents(parent);
Display display = parent.getDisplay();
Color background = JFaceColors.getBannerBackground(display);
Color foreground = JFaceColors.getBannerForeground(display);
try {
Field workAreaField = TitleAreaDialog.class.getDeclaredField("workArea");
workAreaField.setAccessible(true);
Composite workArea = (Composite) workAreaField.get(this);
workArea.setBackground(ColorConstants.WHITE_COLOR);
Field pageContainerField = WizardDialog.class.getDeclaredField("pageContainer");
pageContainerField.setAccessible(true);
Composite pageContainer = (Composite) pageContainerField.get(this);
pageContainer.setBackground(ColorConstants.WHITE_COLOR);
if (useNewErrorStyle()) {
FormData formData = (FormData) workArea.getLayoutData();
formData.top = new FormAttachment(0);
}
Field bottomFillerLabelField = TitleAreaDialog.class.getDeclaredField("bottomFillerLabel");
bottomFillerLabelField.setAccessible(true);
Composite bottomFillerLabel = (Composite) bottomFillerLabelField.get(this);
bottomFillerLabel.setVisible(false);
} catch (Exception e) {
ExceptionHandler.process(e);
}
return panel;
}
@Override
public void setMessage(String newMessage) {
if (useNewErrorStyle()) {
ExceptionHandler.log(newMessage);
} else {
super.setMessage(newMessage);
}
}
@Override
public void setMessage(String newMessage, int newType) {
if (useNewErrorStyle()) {
ExceptionHandler.log(newMessage);
} else {
super.setMessage(newMessage, newType);
}
}
@Override
public void setErrorMessage(String newErrorMessage) {
if (useNewErrorStyle()) {
ExceptionHandler.log(newErrorMessage);
} else {
super.setErrorMessage(newErrorMessage);
}
}
private boolean useNewErrorStyle() {
return this.useNewErrorStyle;
}
@Override
protected Control createDialogArea(Composite parent) {
Composite panel = (Composite) super.createDialogArea(parent);
Control[] children = panel.getChildren();
for (Control child : children) {
child.setBackground(ColorConstants.WHITE_COLOR);
if (child instanceof Label) {
int style = child.getStyle();
if (0 < (style & SWT.HORIZONTAL) && 0 < (style & SWT.SEPARATOR)) {
child.setVisible(false);
}
}
}
return panel;
}
@Override
protected ProgressMonitorPart createProgressMonitorPart(Composite composite, GridLayout pmlayout) {
ProgressMonitorPart progMonitor = super.createProgressMonitorPart(composite, pmlayout);
progMonitor.setBackground(ColorConstants.WHITE_COLOR);
return progMonitor;
}
@Override
protected Control createButtonBar(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(ColorConstants.WHITE_COLOR);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.horizontalSpacing = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
composite.setFont(parent.getFont());
Control helpControl = null;
// create help control if needed
if (isHelpAvailable()) {
helpControl = createHelpControl(composite);
((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(
IDialogConstants.HORIZONTAL_MARGIN);
}
createButtonsForButtonBar(composite);
Button helpButton = getButton(IDialogConstants.HELP_ID);
Button finishButton = getButton(IDialogConstants.FINISH_ID);
Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
Button backButton = getButton(IDialogConstants.BACK_ID);
Button nextButton = getButton(IDialogConstants.NEXT_ID);
FormLayout formLayout = new FormLayout();
formLayout.marginWidth = 10;
formLayout.marginHeight = 20;
composite.setLayout(formLayout);
final int HORIZON_ALIGN = 5;
FormData cancelData = new FormData();
cancelData.left = new FormAttachment(0);
cancelData.top = new FormAttachment(composite, 0, SWT.CENTER);
cancelData.width = getButtonWidth(cancelButton);
cancelButton.setLayoutData(cancelData);
Control tmpCtrl = cancelButton;
if (helpControl != null) {
FormData formData = new FormData();
formData.left = new FormAttachment(tmpCtrl, HORIZON_ALIGN, SWT.RIGHT);
formData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
helpControl.setLayoutData(formData);
tmpCtrl = helpControl;
}
if (helpButton != null) {
FormData formData = new FormData();
formData.left = new FormAttachment(tmpCtrl, HORIZON_ALIGN, SWT.RIGHT);
formData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
formData.width = getButtonWidth(helpButton);
helpButton.setLayoutData(formData);
tmpCtrl = helpButton;
}
FormData finishData = new FormData();
finishData.right = new FormAttachment(100);
finishData.top = new FormAttachment(composite, 0, SWT.CENTER);
finishData.width = getButtonWidth(finishButton);
finishButton.setLayoutData(finishData);
tmpCtrl = finishButton;
if (nextButton != null) {
FormData nextData = new FormData();
Composite nextParentCtrl = nextButton.getParent();
nextData.right = new FormAttachment(tmpCtrl, -HORIZON_ALIGN, SWT.LEFT);
nextData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
nextParentCtrl.setLayoutData(nextData);
}
if (false) {
if (nextButton != null) {
FormData nextData = new FormData();
nextData.right = new FormAttachment(tmpCtrl, -HORIZON_ALIGN, SWT.LEFT);
nextData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
nextData.width = getButtonWidth(nextButton);
nextButton.setLayoutData(nextData);
}
if (backButton != null) {
FormData backData = new FormData();
backData.right = new FormAttachment(tmpCtrl, -HORIZON_ALIGN, SWT.LEFT);
backData.top = new FormAttachment(tmpCtrl, 0, SWT.CENTER);
backData.width = getButtonWidth(backButton);
backButton.setLayoutData(backData);
}
}
return composite;
}
private int getButtonWidth(Button btn) {
int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
Point minSize = btn.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
return Math.max(widthHint, minSize.x);
}
}

View File

@@ -1,693 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.ACC;
import org.eclipse.swt.accessibility.AccessibleAttributeAdapter;
import org.eclipse.swt.accessibility.AccessibleAttributeEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
/**
* A dialog that has a title area for displaying a title and an image as well as a common area for displaying a
* description, a message, or an error message.
* <p>
* This dialog class may be subclassed.
*/
public class TitleAreaDialog extends TrayDialog {
/**
* Image registry key for error message image.
*/
public static final String DLG_IMG_TITLE_ERROR = DLG_IMG_MESSAGE_ERROR;
/**
* Image registry key for banner image (value <code>"dialog_title_banner_image"</code>).
*/
public static final String DLG_IMG_TITLE_BANNER = "dialog_title_banner_image";//$NON-NLS-1$
/**
* Message type constant used to display an info icon with the message.
*
* @since 2.0
* @deprecated
*/
@Deprecated
public static final String INFO_MESSAGE = "INFO_MESSAGE"; //$NON-NLS-1$
/**
* Message type constant used to display a warning icon with the message.
*
* @since 2.0
* @deprecated
*/
@Deprecated
public static final String WARNING_MESSAGE = "WARNING_MESSAGE"; //$NON-NLS-1$
// Space between an image and a label
private static final int H_GAP_IMAGE = 5;
// Minimum dialog width (in dialog units)
private static final int MIN_DIALOG_WIDTH = 350;
// Minimum dialog height (in dialog units)
private static final int MIN_DIALOG_HEIGHT = 150;
protected Label titleLabel;
protected Label titleImageLabel;
protected Label bottomFillerLabel;
protected Label leftFillerLabel;
private RGB titleAreaRGB;
Color titleAreaColor;
protected String message = ""; //$NON-NLS-1$
protected String errorMessage;
protected Label messageLabel;
protected Composite workArea;
protected Label messageImageLabel;
protected Image messageImage;
private boolean showingError = false;
private boolean titleImageLargest = true;
private int messageLabelHeight;
protected Image titleAreaImage;
/**
* Instantiate a new title area dialog.
*
* @param parentShell the parent SWT shell
*/
public TitleAreaDialog(Shell parentShell) {
super(parentShell);
}
/*
* @see Dialog.createContents(Composite)
*/
@Override
protected Control createContents(Composite parent) {
// create the overall composite
Composite contents = new Composite(parent, SWT.NONE);
contents.setLayoutData(new GridData(GridData.FILL_BOTH));
// initialize the dialog units
initializeDialogUnits(contents);
FormLayout layout = new FormLayout();
contents.setLayout(layout);
// Now create a work area for the rest of the dialog
workArea = new Composite(contents, SWT.NONE);
// workArea.setBackground(ColorConstants.RED_COLOR);
GridLayout childLayout = new GridLayout();
childLayout.marginHeight = 0;
childLayout.marginWidth = 0;
childLayout.verticalSpacing = 0;
workArea.setLayout(childLayout);
Control top = createTitleArea(contents);
resetWorkAreaAttachments(top);
workArea.setFont(JFaceResources.getDialogFont());
// initialize the dialog units
initializeDialogUnits(workArea);
// create the dialog area and button bar
dialogArea = createDialogArea(workArea);
buttonBar = createButtonBar(workArea);
// need to react to new size of title area
getShell().addListener(SWT.Resize, event -> layoutForNewMessage(true));
return contents;
}
/**
* Creates and returns the contents of the upper part of this dialog (above the button bar).
* <p>
* The <code>Dialog</code> implementation of this framework method creates and returns a new <code>Composite</code>
* with no margins and spacing. Subclasses should override.
* </p>
*
* @param parent The parent composite to contain the dialog area
* @return the dialog area control
*/
@Override
protected Control createDialogArea(Composite parent) {
// create the top level composite for the dialog area
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
composite.setFont(parent.getFont());
// Build the separator line
titleBarSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
titleBarSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return composite;
}
protected Label titleBarSeparator;
/**
* Creates the dialog's title area.
*
* @param parent the SWT parent for the title area widgets
* @return Control with the highest x axis value.
*/
protected Control createTitleArea(Composite parent) {
// Determine the background color of the title bar
Display display = parent.getDisplay();
Color background;
Color foreground;
if (titleAreaRGB != null) {
titleAreaColor = new Color(display, titleAreaRGB);
background = titleAreaColor;
foreground = null;
} else {
background = JFaceColors.getBannerBackground(display);
foreground = JFaceColors.getBannerForeground(display);
}
parent.setBackground(background);
int verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
int horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
// Dialog image @ right
titleImageLabel = new Label(parent, SWT.CENTER);
titleImageLabel.setBackground(background);
if (titleAreaImage == null || titleAreaImage.isDisposed())
titleImageLabel.setImage(JFaceResources.getImage(DLG_IMG_TITLE_BANNER));
else
titleImageLabel.setImage(titleAreaImage);
FormData imageData = new FormData();
imageData.top = new FormAttachment(0, 0);
// Note: do not use horizontalSpacing on the right as that would be a
// regression from
// the R2.x style where there was no margin on the right and images are
// flush to the right
// hand side. see reopened comments in 41172
imageData.right = new FormAttachment(100, 0); // horizontalSpacing
titleImageLabel.setLayoutData(imageData);
// Title label @ top, left
titleLabel = new Label(parent, SWT.LEFT);
JFaceColors.setColors(titleLabel, foreground, background);
titleLabel.setFont(JFaceResources.getBannerFont());
titleLabel.setText(" ");//$NON-NLS-1$
FormData titleData = new FormData();
titleData.top = new FormAttachment(0, verticalSpacing);
titleData.right = new FormAttachment(titleImageLabel);
titleData.left = new FormAttachment(0, horizontalSpacing);
titleLabel.setLayoutData(titleData);
// Message image @ bottom, left
messageImageLabel = new Label(parent, SWT.CENTER);
messageImageLabel.setBackground(background);
// Message label @ bottom, center
// messageLabel = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
messageLabel = new Label(parent, SWT.WRAP);
JFaceColors.setColors(messageLabel, foreground, background);
messageLabel.setText(" \n "); // two lines//$NON-NLS-1$
messageLabel.setFont(JFaceResources.getDialogFont());
// Bug 248410 - This snippet will only work with Windows screen readers.
messageLabel.getAccessible().addAccessibleAttributeListener(new AccessibleAttributeAdapter() {
@Override
public void getAttributes(AccessibleAttributeEvent e) {
e.attributes = new String[] { "container-live", //$NON-NLS-1$
"polite", "live", "polite", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
"container-live-role", "status", }; //$NON-NLS-1$ //$NON-NLS-2$
}
});
messageLabelHeight = messageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
// Filler labels
leftFillerLabel = new Label(parent, SWT.CENTER);
leftFillerLabel.setBackground(background);
bottomFillerLabel = new Label(parent, SWT.CENTER);
bottomFillerLabel.setBackground(background);
setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing);
determineTitleImageLargest();
if (titleImageLargest)
return titleImageLabel;
return messageLabel;
}
/**
* Determine if the title image is larger than the title message and message area. This is used for layout
* decisions.
*/
private void determineTitleImageLargest() {
int titleY = titleImageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
int verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
int labelY = titleLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
labelY += verticalSpacing;
labelY += messageLabelHeight;
labelY += verticalSpacing;
titleImageLargest = titleY > labelY;
}
/**
* Set the layout values for the messageLabel, messageImageLabel and fillerLabel for the case where there is a
* normal message.
*
* @param verticalSpacing int The spacing between widgets on the vertical axis.
* @param horizontalSpacing int The spacing between widgets on the horizontal axis.
*/
protected void setLayoutsForNormalMessage(int verticalSpacing, int horizontalSpacing) {
FormData messageImageData = new FormData();
messageImageData.top = new FormAttachment(titleLabel, verticalSpacing);
messageImageData.left = new FormAttachment(0, H_GAP_IMAGE);
messageImageLabel.setLayoutData(messageImageData);
FormData messageLabelData = new FormData();
messageLabelData.top = new FormAttachment(titleLabel, verticalSpacing);
messageLabelData.right = new FormAttachment(titleImageLabel);
messageLabelData.left = new FormAttachment(messageImageLabel, horizontalSpacing);
messageLabelData.height = messageLabelHeight;
if (titleImageLargest)
messageLabelData.bottom = new FormAttachment(titleImageLabel, 0, SWT.BOTTOM);
messageLabel.setLayoutData(messageLabelData);
FormData fillerData = new FormData();
fillerData.left = new FormAttachment(0, horizontalSpacing);
fillerData.top = new FormAttachment(messageImageLabel, 0);
fillerData.bottom = new FormAttachment(messageLabel, 0, SWT.BOTTOM);
bottomFillerLabel.setLayoutData(fillerData);
FormData data = new FormData();
data.top = new FormAttachment(messageImageLabel, 0, SWT.TOP);
data.left = new FormAttachment(0, 0);
data.bottom = new FormAttachment(messageImageLabel, 0, SWT.BOTTOM);
data.right = new FormAttachment(messageImageLabel, 0);
leftFillerLabel.setLayoutData(data);
}
/**
* The <code>TitleAreaDialog</code> implementation of this <code>Window</code> methods returns an initial size which
* is at least some reasonable minimum.
*
* @return the initial size of the dialog
*/
@Override
protected Point getInitialSize() {
Point shellSize = super.getInitialSize();
return new Point(Math.max(convertHorizontalDLUsToPixels(MIN_DIALOG_WIDTH), shellSize.x),
Math.max(convertVerticalDLUsToPixels(MIN_DIALOG_HEIGHT), shellSize.y));
}
/**
* Retained for backward compatibility.
*
* Returns the title area composite. There is no composite in this implementation so the shell is returned.
*
* @return Composite
* @deprecated
*/
@Deprecated
protected Composite getTitleArea() {
return getShell();
}
/**
* Returns the title image label.
*
* @return the title image label
*/
protected Label getTitleImageLabel() {
return titleImageLabel;
}
/**
* Display the given error message. The currently displayed message is saved and will be redisplayed when the error
* message is set to <code>null</code>.
*
* @param newErrorMessage the newErrorMessage to display or <code>null</code>
*/
public void setErrorMessage(String newErrorMessage) {
// Any change?
if (errorMessage == null ? newErrorMessage == null : errorMessage.equals(newErrorMessage))
return;
errorMessage = newErrorMessage;
// Clear or set error message.
if (errorMessage == null) {
if (showingError) {
// we were previously showing an error
showingError = false;
}
// show the message
// avoid calling setMessage in case it is overridden to call
// setErrorMessage,
// which would result in a recursive infinite loop
if (message == null) // this should probably never happen since
// setMessage does this conversion....
message = ""; //$NON-NLS-1$
updateMessage(message);
messageImageLabel.setImage(messageImage);
setImageLabelVisible(messageImage != null);
} else {
// Add in a space for layout purposes but do not
// change the instance variable
String displayedErrorMessage = " " + errorMessage; //$NON-NLS-1$
updateMessage(displayedErrorMessage);
if (!showingError) {
// we were not previously showing an error
showingError = true;
messageImageLabel.setImage(JFaceResources.getImage(DLG_IMG_TITLE_ERROR));
setImageLabelVisible(true);
}
}
layoutForNewMessage(false);
}
/**
* Re-layout the labels for the new message.
*
* @param forceLayout <code>true</code> to force a layout of the shell
*/
protected void layoutForNewMessage(boolean forceLayout) {
int verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
int horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
// If there are no images then layout as normal
if (errorMessage == null && messageImage == null) {
setImageLabelVisible(false);
setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing);
} else {
messageImageLabel.setVisible(true);
bottomFillerLabel.setVisible(true);
leftFillerLabel.setVisible(true);
/**
* Note that we do not use horizontalSpacing here as when the background of the messages changes there will
* be gaps between the icon label and the message that are the background color of the shell. We add a
* leading space elsewhere to compendate for this.
*/
FormData data = new FormData();
data.left = new FormAttachment(0, H_GAP_IMAGE);
data.top = new FormAttachment(titleLabel, verticalSpacing);
messageImageLabel.setLayoutData(data);
data = new FormData();
data.top = new FormAttachment(messageImageLabel, 0);
data.left = new FormAttachment(0, 0);
data.bottom = new FormAttachment(messageLabel, 0, SWT.BOTTOM);
data.right = new FormAttachment(messageImageLabel, 0, SWT.RIGHT);
bottomFillerLabel.setLayoutData(data);
data = new FormData();
data.top = new FormAttachment(messageImageLabel, 0, SWT.TOP);
data.left = new FormAttachment(0, 0);
data.bottom = new FormAttachment(messageImageLabel, 0, SWT.BOTTOM);
data.right = new FormAttachment(messageImageLabel, 0);
leftFillerLabel.setLayoutData(data);
FormData messageLabelData = new FormData();
messageLabelData.top = new FormAttachment(titleLabel, verticalSpacing);
messageLabelData.right = new FormAttachment(titleImageLabel);
messageLabelData.left = new FormAttachment(messageImageLabel, 0);
messageLabelData.height = messageLabelHeight;
if (titleImageLargest)
messageLabelData.bottom = new FormAttachment(titleImageLabel, 0, SWT.BOTTOM);
messageLabel.setLayoutData(messageLabelData);
}
if (forceLayout) {
getShell().layout();
} else {
// Do not layout before the dialog area has been created
// to avoid incomplete calculations.
if (dialogArea != null)
workArea.getParent().layout(true);
}
Point messageSize = messageLabel.getSize();
int messageLabelUnclippedHeight = messageLabel.computeSize(messageSize.x, SWT.DEFAULT, true).y;
boolean messageLabelClipped = messageLabelUnclippedHeight > messageSize.y;
if (messageLabel.getData() instanceof ToolTip) {
ToolTip toolTip = (ToolTip) messageLabel.getData();
toolTip.hide();
toolTip.deactivate();
messageLabel.setData(null);
}
if (messageLabelClipped) {
ToolTip tooltip = new ToolTip(messageLabel, ToolTip.NO_RECREATE, false) {
@Override
protected Composite createToolTipContentArea(Event event, Composite parent) {
Composite result = new Composite(parent, SWT.NONE);
result.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
result.setLayout(new GridLayout());
Text text = new Text(result, SWT.WRAP);
text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
text.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
text.setText(messageLabel.getText());
GridData gridData = new GridData();
gridData.widthHint = messageSize.x;
text.setLayoutData(gridData);
Dialog.applyDialogFont(result);
return result;
}
@Override
public Point getLocation(Point tipSize, Event event) {
return messageLabel.getShell().toDisplay(messageLabel.getLocation());
}
};
messageLabel.setData(tooltip);
tooltip.setPopupDelay(0);
tooltip.activate();
}
}
/**
* Set the message text. If the message line currently displays an error, the message is saved and will be
* redisplayed when the error message is set to <code>null</code>.
* <p>
* Shortcut for <code>setMessage(newMessage, IMessageProvider.NONE)</code>
* </p>
* This method should be called after the dialog has been opened as it updates the message label immediately.
*
* @param newMessage the message, or <code>null</code> to clear the message
*/
public void setMessage(String newMessage) {
setMessage(newMessage, IMessageProvider.NONE);
}
/**
* Sets the message for this dialog with an indication of what type of message it is.
* <p>
* The valid message types are one of <code>NONE</code>, <code>INFORMATION</code>,<code>WARNING</code>, or
* <code>ERROR</code>.
* </p>
* <p>
* Note that for backward compatibility, a message of type <code>ERROR</code> is different than an error message
* (set using <code>setErrorMessage</code>). An error message overrides the current message until the error message
* is cleared. This method replaces the current message and does not affect the error message.
* </p>
*
* @param newMessage the message, or <code>null</code> to clear the message
* @param newType the message type
* @since 2.0
*/
public void setMessage(String newMessage, int newType) {
Image newImage = null;
if (newMessage != null) {
switch (newType) {
case IMessageProvider.NONE:
break;
case IMessageProvider.INFORMATION:
newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_INFO);
break;
case IMessageProvider.WARNING:
newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_WARNING);
break;
case IMessageProvider.ERROR:
newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_ERROR);
break;
}
}
showMessage(newMessage, newImage);
}
/**
* Show the new message and image.
*
* @param newMessage
* @param newImage
*/
protected void showMessage(String newMessage, Image newImage) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249915
if (newMessage == null)
newMessage = ""; //$NON-NLS-1$
// Any change?
if (message.equals(newMessage) && messageImage == newImage) {
return;
}
message = newMessage;
// Message string to be shown - if there is an image then add in
// a space to the message for layout purposes
String shownMessage = (newImage == null) ? message : " " + message; //$NON-NLS-1$
messageImage = newImage;
if (!showingError) {
// we are not showing an error
updateMessage(shownMessage);
messageImageLabel.setImage(messageImage);
setImageLabelVisible(messageImage != null);
layoutForNewMessage(false);
}
}
/**
* Update the contents of the messageLabel.
*
* @param newMessage the message to use
*/
protected void updateMessage(String newMessage) {
String oldMessage = messageLabel.getText();
messageLabel.setText(newMessage);
// Bug 248410 - This snippet will only work with Windows screen readers.
messageLabel.getAccessible().sendEvent(ACC.EVENT_ATTRIBUTE_CHANGED, null);
messageLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] { Integer.valueOf(ACC.TEXT_DELETE),
Integer.valueOf(0), Integer.valueOf(oldMessage.length()), oldMessage });
messageLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] { Integer.valueOf(ACC.TEXT_INSERT),
Integer.valueOf(0), Integer.valueOf(newMessage.length()), newMessage });
}
/**
* Sets the title to be shown in the title area of this dialog.
*
* @param newTitle the title show
*/
public void setTitle(String newTitle) {
if (titleLabel == null)
return;
String title = newTitle;
if (title == null)
title = "";//$NON-NLS-1$
titleLabel.setText(title);
}
/**
* Sets the title bar color for this dialog.
*
* @param color the title bar color
*/
public void setTitleAreaColor(RGB color) {
titleAreaRGB = color;
}
/**
* Sets the title image to be shown in the title area of this dialog.
*
* @param newTitleImage the title image to be shown
*/
public void setTitleImage(Image newTitleImage) {
titleAreaImage = newTitleImage;
if (titleImageLabel != null) {
titleImageLabel.setImage(newTitleImage);
determineTitleImageLargest();
Control top;
if (titleImageLargest)
top = titleImageLabel;
else
top = messageLabel;
resetWorkAreaAttachments(top);
}
}
/**
* Make the label used for displaying error images visible depending on boolean.
*
* @param visible If <code>true</code> make the image visible, if not then make it not visible.
*/
protected void setImageLabelVisible(boolean visible) {
messageImageLabel.setVisible(visible);
bottomFillerLabel.setVisible(visible);
leftFillerLabel.setVisible(visible);
}
/**
* Reset the attachment of the workArea to now attach to top as the top control.
*
* @param top
*/
protected void resetWorkAreaAttachments(Control top) {
FormData childData = new FormData();
childData.top = new FormAttachment(top);
childData.right = new FormAttachment(100, 0);
childData.left = new FormAttachment(0, 0);
childData.bottom = new FormAttachment(100, 0);
workArea.setLayoutData(childData);
}
/**
* Returns the current message text for this dialog. This message is displayed in the message line of the dialog
* when the error message is <code>null</code>. If there is a non-null error message, this message is not shown, but
* is stored so that it can be shown in the message line whenever {@link #setErrorMessage(String)} is called with a
* <code>null</code> parameter.
*
* @return the message text, which is never <code>null</code>.
*
* @see #setMessage(String)
* @see #setErrorMessage(String)
*
* @since 3.6
*/
public String getMessage() {
return message;
}
/**
* Returns the current error message being shown in the dialog, or <code>null</code> if there is no error message
* being shown.
*
* @return the error message, which may be <code>null</code>.
*
* @see #setErrorMessage(String)
* @see #setMessage(String)
*
* @since 3.6
*/
public String getErrorMessage() {
return errorMessage;
}
}

View File

@@ -1,233 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.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();
}
}

View File

@@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Text;
* $Id: LabelledText.java 7038 2007-11-15 14:05:48Z plegall $
*
*/
public class LabelledText implements LabelledWidget{
public class LabelledText {
private Text text;
@@ -297,16 +297,6 @@ public class LabelledText implements LabelledWidget{
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();
}
@@ -482,9 +472,4 @@ public class LabelledText implements LabelledWidget{
text.getParent().layout();
}
@Override
public void set(String value) {
this.setText(value);
}
}

View File

@@ -1,9 +0,0 @@
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);
}

View File

@@ -1,28 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.wizard;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendWizard {
/**
* DOC cmeng TalendWizard constructor comment.
*/
public TalendWizard() {
// TODO Auto-generated constructor stub
}
}

View File

@@ -1,55 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.wizard;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendWizardDialog extends Dialog {
public TalendWizardDialog(Shell parentShell) {
super(parentShell);
}
@Override
protected Control createContents(Composite parent) {
return super.createContents(parent);
}
public static void main(String[] args) throws Exception {
int sleep = 1000 / 60;
double time = 1.0 / 50;
int total = 0;
for (int i = 1; i <= 25; i++) {
double curTime = time * i;
double value = 1.0 - Math.sqrt(1 - curTime * curTime);
int lengh = (int) (250 * value);
total += lengh;
System.out.println(i + "\t:" + lengh + ", total: " + total);
}
for (int i = 25; i <= 50; i++) {
double curTime = 1 - time * i;
double value = 1.0 - Math.sqrt(1 - curTime * curTime);
int lengh = (int) (250 * value);
total += lengh;
System.out.println(i + "\t:" + lengh + ", total: " + total);
}
}
}

View File

@@ -1,28 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.wizard;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendWizardPage {
/**
* DOC cmeng TalendWizardPage constructor comment.
*/
public TalendWizardPage() {
// TODO Auto-generated constructor stub
}
}

View File

@@ -168,8 +168,7 @@ ProjectRepositoryNode.sapFunctions.inputSchema=Input
ProjectRepositoryNode.sapFunctions.outputSchema=Output
ProjectRepositoryNode.sapIDocs=SAP iDocs
ProjectRepositoryNode.sapTables=SAP Tables
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (Input)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (Output)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=SAP ADSO
ProjectRepositoryNode.sapBWDataSource=SAP DataSource
ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube

View File

@@ -168,8 +168,7 @@ ProjectRepositoryNode.sapFunctions.inputSchema=Lecture
ProjectRepositoryNode.sapFunctions.outputSchema=Sortie
ProjectRepositoryNode.sapIDocs=SAP IDoc
ProjectRepositoryNode.sapTables=Tables SAP
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (Entr\u00E9e)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (Sortie)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=ADSO SAP
ProjectRepositoryNode.sapBWDataSource=Source des donn\u00E9es SAP
ProjectRepositoryNode.sapBWDataStoreObject=Objet Data Store SAP
ProjectRepositoryNode.sapBWInfoCube=InfoCube SAP

View File

@@ -168,8 +168,7 @@ ProjectRepositoryNode.sapFunctions.inputSchema=\u5165\u529B
ProjectRepositoryNode.sapFunctions.outputSchema=\u51FA\u529B
ProjectRepositoryNode.sapIDocs=SAP iDocs
ProjectRepositoryNode.sapTables=SAP\u30C6\u30FC\u30D6\u30EB
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (\u5165\u529B)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (\u51FA\u529B)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=SAP ADSO
ProjectRepositoryNode.sapBWDataSource=SAP DataSource
ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube

View File

@@ -91,15 +91,15 @@ PasteAction.thisText.paste=\u7C98\u8D34
DeleteAction.action.foreverTitle=\u6C38\u4E45\u5220\u9664
DeleteAction.action.logicalTitle=\u5220\u9664
DeleteAction.action.logicalToolTipText=\u5C06\u5BF9\u8C61\u653E\u5165\u56DE\u6536\u7AD9
DeleteAction.deleteJobAssignedToOneService= \u88AB\u5206\u914D\u7ED9\u4E00\u4E2A\u670D\u52A1\u7684\u4E00\u4E2A\u64CD\u4F5C\uFF01\n\u662F\u5426\u8981\u5220\u9664\u6B64\u4F5C\u4E1A\uFF1F
DeleteAction.deleteSomeJobsAssignedToServices= \u88AB\u5206\u914D\u7ED9\u4E00\u4E9B\u670D\u52A1\u7684\u4E00\u4E9B\u64CD\u4F5C\n\u662F\u5426\u8981\u5220\u9664\u8FD9\u4E9B\u4F5C\u4E1A\uFF1F
DeleteAction.deleteJobAssignedToOneService= \u88AB\u5206\u914D\u7ED9\u670D\u52A1\u7684\u4E00\u4E2A\u64CD\u4F5C\uFF01\n\u662F\u5426\u8981\u5220\u9664\u6B64\u4F5C\u4E1A\uFF1F
DeleteAction.deleteSomeJobsAssignedToServices= \u88AB\u5206\u914D\u7ED9\u4E00\u4E9B\u670D\u52A1\u7684\u4E00\u4E9B\u64CD\u4F5C\uFF01\n\u662F\u5426\u8981\u5220\u9664\u8FD9\u4E9B\u4F5C\u4E1A\uFF1F
DeleteAction.dialog.message0=\u5C06\u6C38\u4E45\u5220\u9664 (\u4E0D\u53EF\u6062\u590D)\u3002
DeleteAction.dialog.message1=\u6240\u9009\u5143\u7D20\u5C06\u6C38\u4E45\u5220\u9664 (\u65E0\u6CD5\u6062\u590D)\u3002
DeleteAction.dialog.message2=\u4ECD\u7136\u7EE7\u7EED\uFF1F
DeleteAction.dialog.messageAllElements=\u6240\u6709\u5143\u7D20\u90FD\u5C06\u6C38\u4E45\u5220\u9664 (\u65E0\u6CD5\u6062\u590D)\u3002
DeleteAction.dialog.title=\u6C38\u4E45\u5220\u9664
DeleteAction.error.lockedOrOpenedObject.newMessage={0} \u5DF2\u88AB\u9501\u5B9A\uFF0C\u56E0\u6B64\u65E0\u6CD5\u5220\u9664\u3002\n \u5982\u679C\u6B64\u5BF9\u8C61\u6253\u5F00\uFF0C\u60A8\u5FC5\u987B\u5C06\u5176\u5173\u95ED\u4E4B\u540E\u624D\u80FD\u5220\u9664\u3002
DeleteAction.error.testCaseLockedOrOpenedObject.newMessage={0} \u7684\u6D4B\u8BD5\u7528\u4F8B\u5DF2\u88AB\u9501\u5B9A\uFF0C\u56E0\u6B64\u65E0\u6CD5\u5220\u9664\u3002\n \u5982\u679C\u6B64\u5BF9\u8C61\u6253\u5F00\uFF0C\u60A8\u5FC5\u987B\u5C06\u5176\u5173\u95ED\u4E4B\u540E\u624D\u80FD\u5220\u9664\u3002
DeleteAction.error.lockedOrOpenedObject.newMessage={0} \u5DF2\u9501\u5B9A\uFF0C\u56E0\u6B64\u60A8\u4E0D\u80FD\u5220\u9664\u5B83\u3002\n\u5982\u679C\u6B64\u5BF9\u8C61\u6253\u5F00\uFF0C\u60A8\u5FC5\u987B\u5C06\u5176\u5173\u95ED\u4E4B\u540E\u624D\u80FD\u5220\u9664\u3002
DeleteAction.error.testCaseLockedOrOpenedObject.newMessage=\u6D4B\u8BD5\u7528\u4F8B{0}\u88AB\u9501\u5B9A\uFF0C\u56E0\u6B64\u60A8\u65E0\u6CD5\u5220\u9664\u5B83\u3002\n\u5982\u679C\u6B64\u5BF9\u8C61\u88AB\u6253\u5F00\uFF0C\u60A8\u5FC5\u987B\u5728\u5220\u9664\u4E4B\u524D\u5173\u95ED\u5B83\u3002
DeleteAction.error.title=\u7981\u6B62\u5220\u9664
DeleteAction.warning.message1=\u65E0\u6CD5\u5220\u9664\u8BE5\u6587\u4EF6\u5939\uFF0C\u56E0\u4E3A\u5176\u4E2D\u81F3\u5C11\u6709\u4E00\u4E2A\u9879\u76EE\u5F53\u524D\u5904\u4E8E\u6253\u5F00\u72B6\u6001\u3002\u5173\u95ED\u6240\u6709\u6253\u5F00\u7684\u9879\u76EE\u5E76\u91CD\u8BD5\u3002
DeleteAction.warning.title=\u8B66\u544A
@@ -117,7 +117,7 @@ DuplicateAction.SameAsProjectname=\u540D\u79F0\u4E0E\u5DE5\u7A0B\u540D\u79F0\u76
EmptyRecycleBinAction.action.title=\u6E05\u7A7A\u56DE\u6536\u7AD9
EmptyRecycleBinAction.action.toolTipText=\u6E05\u7A7A\u56DE\u6536\u7AD9
EmptyRecycleBinAction.dialog.title=\u6E05\u7A7A\u56DE\u6536\u7AD9
EmptyRecycleBinAction.dialog.allDependencies=\u60A8\u4E0D\u80FD\u6E05\u7A7A\u56DE\u6536\u7AD9\u3002\nData Profiler \u900F\u89C6\u56FE\u4F9D\u8D56\u5176\u4E2D\u4E00\u4E2A\u9879\u76EE\uFF0C\u8BF7\u4E0D\u8981\u5220\u9664\u5B83\u3002
EmptyRecycleBinAction.dialog.allDependencies=\u4F60\u4E0D\u80FD\u6E05\u7A7A\u56DE\u6536\u7AD9\u3002\nData Profiler Perspective \u4EE5\u6765\u5176\u4E2D\u4E00\u4E2A\u9879\u76EE\uFF0C\u8BF7\u4E0D\u8981\u5220\u9664\u5B83\u3002
PasteObjectAction.error.labelAlreadyExists=\u6B64\u8DEF\u5F84\u4E0B\u5DF2\u5B58\u5728\u5E26\u6709\u8BE5\u6807\u7B7E\u7684\u5BF9\u8C61
PasteObjectAction.error.title=\u65E0\u6CD5\u7C98\u8D34
JobletReferenceDialog.DeletedInfor=\u5728\u56DE\u6536\u7AD9
@@ -168,8 +168,7 @@ ProjectRepositoryNode.sapFunctions.inputSchema=\u8F93\u5165
ProjectRepositoryNode.sapFunctions.outputSchema=\u8F93\u51FA
ProjectRepositoryNode.sapIDocs=SAP iDocs
ProjectRepositoryNode.sapTables=SAP \u8868
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input=SAP ADSO (\u8F93\u5165)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output=SAP ADSO (\u8F93\u51FA)
ProjectRepositoryNode.sapBWAdvancedDataStoreObject=SAP ADSO
ProjectRepositoryNode.sapBWDataSource=SAP DataSource
ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube

View File

@@ -74,7 +74,6 @@ import org.talend.core.model.properties.ValidationRulesConnectionItem;
import org.talend.core.model.repository.DynaEnum;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.Folder;
import org.talend.core.model.repository.GITConstant;
import org.talend.core.model.repository.IRepositoryContentHandler;
import org.talend.core.model.repository.IRepositoryObject;
import org.talend.core.model.repository.IRepositoryPrefConstants;
@@ -83,6 +82,7 @@ import org.talend.core.model.repository.RepositoryContentManager;
import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.model.repository.RepositoryNodeProviderRegistryReader;
import org.talend.core.model.repository.RepositoryViewObject;
import org.talend.core.model.repository.GITConstant;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject;
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
@@ -368,8 +368,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
String[] contentRight = contentType.getUserRight();
if (contentRight != null && contentRight.length > 0 && userRights != null && userRights.length > 0) {
for (String element : contentRight) {
if (!ArrayUtils.contains(userRights, element)) {
for (int i = 0; i < contentRight.length; i++) {
if (!ArrayUtils.contains(userRights, contentRight[i])) {
removeNode(this, node);
}
}
@@ -1731,25 +1731,22 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
node.getChildren().add(iDocNode);
createSAPIDocNodes(repObj, metadataConnection, iDocNode);
// 4. BW AdvancedDataStoreObject Input:
createSAPBWAdvancedDataStoreObjectInputNodes(repObj, metadataConnection, node, validationRules);
// 4. BW AdvancedDataStoreObject:
createSAPBWAdvancedDataStoreObjectNodes(repObj, metadataConnection, node, validationRules);
// 5. BW AdvancedDataStoreObject Output:
createSAPBWAdvancedDataStoreObjectOutputNodes(repObj, metadataConnection, node, validationRules);
// 6. BW DataSource:
// 5. BW DataSource:
createSAPBWDataSourceNodes(repObj, metadataConnection, node, validationRules);
// 7. BW DataStoreObject:
// 6. BW DataStoreObject:
createSAPBWDataStoreObjectNodes(repObj, metadataConnection, node, validationRules);
// 8. BW InfoCube:
// 7. BW InfoCube:
createSAPBWInfoCubeNodes(repObj, metadataConnection, node, validationRules);
// 9. BW InfoObject:
// 8. BW InfoObject:
createSAPBWInfoObjectNodes(repObj, metadataConnection, node, validationRules);
// 10. BW Business Content Extractor:
// 8. BW Business Content Extractor:
createSAPContentExtractorNodes(repObj, metadataConnection, node, validationRules);
} else if (metadataConnection instanceof SalesforceSchemaConnection) {
createSalesforceModuleNodes(repObj, metadataConnection, node, validationRules);
@@ -1792,12 +1789,12 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
private void createSAPBWAdvancedDataStoreObjectInputNodes(IRepositoryViewObject repObj, Connection metadataConnection,
private void createSAPBWAdvancedDataStoreObjectNodes(IRepositoryViewObject repObj, Connection metadataConnection,
RepositoryNode node, List<IRepositoryViewObject> validationRules) {
StableRepositoryNode container = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.sapBWAdvancedDataStoreObject.input"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
Messages.getString("ProjectRepositoryNode.sapBWAdvancedDataStoreObject"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
container.setChildrenObjectType(ERepositoryObjectType.METADATA_CON_TABLE);
container.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_INPUT);
container.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT);
IRepositoryNode cacheNode = nodeCache.getCache(container);
if (cacheNode != null && cacheNode instanceof StableRepositoryNode) {
@@ -1809,38 +1806,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
node.getChildren().add(container);
EList<SAPBWTable> advancedDataStoreObjects = ((SAPConnection) metadataConnection).getBWAdvancedDataStoreObjects();
EList<SAPBWTable> tables = new BasicEList<SAPBWTable>();
for (SAPBWTable bwTable : advancedDataStoreObjects) {
if (!SAPBWTableHelper.ADSO_OUTPUT.equals(bwTable.getCategory())) {
tables.add(bwTable);
}
}
createTables(container, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
private void createSAPBWAdvancedDataStoreObjectOutputNodes(IRepositoryViewObject repObj, Connection metadataConnection,
RepositoryNode node, List<IRepositoryViewObject> validationRules) {
StableRepositoryNode container = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.sapBWAdvancedDataStoreObject.output"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
container.setChildrenObjectType(ERepositoryObjectType.METADATA_CON_TABLE);
container.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_OUTPUT);
IRepositoryNode cacheNode = nodeCache.getCache(container);
if (cacheNode != null && cacheNode instanceof StableRepositoryNode) {
container = (StableRepositoryNode) cacheNode;
container.getChildren().clear();
} else {
nodeCache.addCache(container, true);
}
node.getChildren().add(container);
EList<SAPBWTable> advancedDataStoreObjects = ((SAPConnection) metadataConnection).getBWAdvancedDataStoreObjects();
EList<SAPBWTable> tables = new BasicEList<SAPBWTable>();
for (SAPBWTable bwTable : advancedDataStoreObjects) {
if (SAPBWTableHelper.ADSO_OUTPUT.equals(bwTable.getCategory())) {
tables.add(bwTable);
}
}
EList tables = new BasicEList();
tables.addAll(advancedDataStoreObjects);
createTables(container, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
@@ -1970,8 +1937,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
private void createSalesforceModuleNodes(IRepositoryViewObject rebObj, Connection metadataConnection,
RepositoryNode connectionNode, List<IRepositoryViewObject> validationRules) {
EList modules = ((SalesforceSchemaConnection) metadataConnection).getModules();
for (Object module : modules) {
SalesforceModuleUnit unit = (SalesforceModuleUnit) module;
for (int i = 0; i < modules.size(); i++) {
SalesforceModuleUnit unit = (SalesforceModuleUnit) modules.get(i);
RepositoryNode tableNode = createSalesforceNode(rebObj, connectionNode, unit);
createTables(tableNode, rebObj, unit.getTables(), ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
@@ -1994,8 +1961,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
if (functions == null || functions.isEmpty()) {
return;
}
for (Object function : functions) {
SAPFunctionUnit unit = (SAPFunctionUnit) function;
for (int i = 0; i < functions.size(); i++) {
SAPFunctionUnit unit = (SAPFunctionUnit) functions.get(i);
RepositoryNode tableNode = createSAPNode(rebObj, functionNode, unit);
// create input and output container
@@ -2035,8 +2002,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
if (iDocs == null || iDocs.isEmpty()) {
return;
}
for (Object iDoc : iDocs) {
SAPIDocUnit unit = (SAPIDocUnit) iDoc;
for (int i = 0; i < iDocs.size(); i++) {
SAPIDocUnit unit = (SAPIDocUnit) iDocs.get(i);
RepositoryNode tableNode = createSAPNode(rebObj, iDocNode, unit);
if (SubItemHelper.isDeleted(unit)) {
// recBin.getChildren().add(tableNode);

View File

@@ -16,6 +16,7 @@ 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;
@@ -93,12 +94,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,7 +155,6 @@ 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.ICoreUIService;
import org.talend.core.service.IDetectCVEService;
import org.talend.core.utils.CodesJarResourceCache;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper;
@@ -2210,9 +2210,6 @@ 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();
@@ -2280,6 +2277,14 @@ 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();
@@ -2357,6 +2362,17 @@ 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);
@@ -2408,18 +2424,6 @@ 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() {
@@ -2603,14 +2607,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
dynamicDistrManager.reset(null);
}
}
// clear detect CVE cache
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDetectCVEService.class)) {
IDetectCVEService detectCVESvc = GlobalServiceRegister.getDefault().getService(IDetectCVEService.class);
if (detectCVESvc != null) {
detectCVESvc.clearCache();
}
}
CodesJarResourceCache.reset();

View File

@@ -25,7 +25,6 @@ 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 {
@@ -84,10 +83,6 @@ 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) {

View File

@@ -52,7 +52,6 @@ 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,

View File

@@ -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,14 +60,12 @@
<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="TIME WITH TIME ZONE" ignoreLen="true" ignorePre="true" />
<dbType type="VARBIT" 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" />
@@ -121,40 +119,38 @@
<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"/>
@@ -165,8 +161,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" />
@@ -174,7 +170,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" />
@@ -184,7 +180,7 @@
<dbType type="INT8" />
<dbType type="BIGINT" />
<dbType type="BIGSERIAL" />
<dbType type="INTEGER" />
<dbType type="INTEGER" />
</talendType>
<talendType type="id_Long">
<dbType type="INT2" />
@@ -192,8 +188,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" />
@@ -214,26 +210,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" />
@@ -243,7 +239,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" />
@@ -280,7 +276,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" />
@@ -289,22 +285,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>
@@ -312,336 +308,330 @@
<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>
<dbType type="TIME WITH TIME ZONE" >
<talendType type="id_Date" default="true" />
</dbType>
<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>
<dbType type="TIMESTAMP WITH TIME ZONE" >
<talendType type="id_Date" default="true" />
</dbType>
<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>

View File

@@ -1,238 +0,0 @@
{
"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"
}
}

View File

@@ -116,7 +116,6 @@ public interface ICoreService extends IService {
public String validateValueForDBType(String columnName);
@Deprecated
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
public IPreferenceStore getPreferenceStore();
@@ -125,7 +124,6 @@ public interface ICoreService extends IService {
public IMetadataTable convert(MetadataTable originalTable);
@Deprecated
public void syncMappingsFileFromSystemToProject();
/**
@@ -134,11 +132,4 @@ public interface ICoreService extends IService {
*/
void installComponents(IProgressMonitor monitor);
public static ICoreService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
}
return null;
}
}

View File

@@ -21,7 +21,6 @@ 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;
@@ -110,8 +109,6 @@ 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
@@ -154,10 +151,6 @@ public interface ILibraryManagerService extends IService {
public boolean contains(String jarName);
public void clearCache();
public void clearCache(boolean cleanIndex);
public void deployLibsFromCustomComponents();
@Deprecated
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);

View File

@@ -12,12 +12,12 @@
// ============================================================================
package org.talend.core;
import org.talend.core.model.process.IExternalNode;
import org.talend.core.model.process.AbstractExternalNode;
import org.talend.core.model.process.INode;
public interface ITDQComponentService extends IService {
public boolean isTDQExternalComponent(String componentName);
public IExternalNode createExternalComponent(INode node);
public AbstractExternalNode createExternalComponent(INode node);
}

View File

@@ -39,9 +39,4 @@ public interface ITDQCryptoFileService extends IService {
*/
public void generateCryptoFile(String passwordM1, String cryptoMethod, String cryptoFilePath);
/**
* Generate Encrypty file
*/
public void generateCryptoFile(String passwordM1, String cryptoMethod, String cryptoFilePath, int algoVersion);
}

View File

@@ -1,108 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.database;
import java.util.ArrayList;
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" }),
DRIVER_V1("Driver v1", new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar" });
private String displayName;
private String[] drivers = new String[] {};
private ERedshiftDriver(String displayName, String[] drivers) {
this.displayName = displayName;
this.drivers = drivers;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String[] getDrivers() {
return drivers;
}
public void setDrivers(String[] drivers) {
this.drivers = drivers;
}
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 && 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;
}
public static String[] getRedshiftDriverDisplayNames() {
List<String> names = new ArrayList<String>();
for (ERedshiftDriver eRedshiftDriver : ERedshiftDriver.values()) {
names.add(eRedshiftDriver.getDisplayName());
}
return names.toArray(new String[0]);
}
public static String getDisplayNameByEName(String eName) {
String displayName = eName;
ERedshiftDriver eRedshiftDriver = ERedshiftDriver.valueOf(eName);
if (eRedshiftDriver != null) {
displayName = eRedshiftDriver.getDisplayName();
}
return displayName;
}
public static String getEnameByDisplayName(String displayName) {
String eName = DRIVER_V1.name();
for (ERedshiftDriver eRedshiftDriver : ERedshiftDriver.values()) {
if (eRedshiftDriver.getDisplayName().equals(displayName)) {
eName = eRedshiftDriver.name();
}
}
return eName;
}
}

View File

@@ -225,22 +225,10 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME = "CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_CONTAINER = "CONN_PARA_KEY_SYNAPSE_FS_CONTAINER"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_AUTH_MODE = "CONN_PARA_KEY_SYNAPSE_AUTH_MODE";
public static final String CONN_PARA_KEY_SYNAPSE_FS_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_APPLICATION_ID = "CONN_PARA_KEY_SYNAPSE_APPLICATION_ID"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_DIRECTORY_ID = "CONN_PARA_KEY_SYNAPSE_DIRECTORY_ID"; //$NON-NLS-1$
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_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
@@ -328,23 +316,17 @@ public class ConnParameterKeys {
/**
* Google Dataproc keys.
*/
public static final String CONN_PARA_KEY_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_GOOGLE_PROJECT_ID";
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_CLUSTER_ID = "CONN_PARA_KEY_GOOGLE_CLUSTER_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_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";
@@ -379,27 +361,5 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
// 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
*/
public static final String CONN_PARA_KEY_REDSHIFT_DRIVER = "CONN_PARA_KEY_REDSHIFT_DRIVER";
public static final String CONN_PARA_KEY_REDSHIFT_STRINGPARA = "CONN_PARA_KEY_REDSHIFT_STRINGPARA";
public static final String CONN_PARA_KEY_REDSHIFT_PARATABLE = "CONN_PARA_KEY_REDSHIFT_PARATABLE";
}

View File

@@ -13,12 +13,10 @@
package org.talend.core.database.conn.version;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.ERedshiftDriver;
import org.talend.core.database.conn.DatabaseConnConstants;
/**
@@ -63,15 +61,15 @@ public enum EDatabaseVersion4Drivers {
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.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-16.20.00.02.jar", "tdgssconfig-16.20.00.02.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
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", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.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,11 +81,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", "reload4j-1.2.19.jar", "jackson-core-2.13.2.jar",
"jackson-databind-2.13.2.2.jar", "jackson-annotations-2.13.2.jar", "jcip-annotations-1.0-1.jar",
"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" })),
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-9.7.jar",
"json-smart-2.4.7.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "log4j-1.2.17.jar",
"accessors-smart-2.4.7.jar", "asm-9.1.jar","content-type-2.1.jar" })),
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -95,19 +92,19 @@ 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.25.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.14.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.25.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$
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) and above", "SYBSEIQ_16_SA", "sajdbc4-17.0.0.jar")),
SYBASEIQ_16_SA(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16 (SQL Anywhere)", "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$
@@ -151,12 +148,11 @@ public enum EDatabaseVersion4Drivers {
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
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-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "redshift-jdbc42-no-awssdk-1.2.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$
new String[] { "redshift-jdbc42-no-awssdk-1.2.37.1061.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.11.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"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$
"aws-java-sdk-redshift-internal-1.12.x.jar" })), //$NON-NLS-1$
"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$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
@@ -296,9 +292,6 @@ public enum EDatabaseVersion4Drivers {
if (version.equalsIgnoreCase(v4d.getVersionValue())) {
drivers.addAll(v4d.getProviderDrivers());
}
if (drivers.isEmpty()) {
drivers.addAll(getDriversByDriverVersion(v4d, version));
}
}
} else {
// only check the version value
@@ -310,14 +303,6 @@ public enum EDatabaseVersion4Drivers {
return drivers;
}
private static Set<String> getDriversByDriverVersion(EDatabaseVersion4Drivers v4d, String version) {
Set<String> drivers = new HashSet<String>();
if (REDSHIFT == v4d || REDSHIFT_SSO == v4d) {
drivers = ERedshiftDriver.getDriversByVersion(v4d, version);
}
return drivers;
}
public static boolean containTypeAndVersion(final String dbType, final String version) {
if (version == null) {
return false;

View File

@@ -83,12 +83,6 @@ public enum EHadoopProperties {
GOOGLE_REGION,
GOOGLE_JARS_BUCKET,
AUTH_MODE,
PATH_TO_GOOGLE_CREDENTIALS,
OAUTH_ACCESS_TOKEN,
HD_WEBHCAT_HOSTNAME,
@@ -118,22 +112,10 @@ public enum EHadoopProperties {
SYNAPSE_STORAGE_CONTAINER,
ADLSGEN2AUTH,
SYNAPSE_STORAGE_USERNAME,
SYNAPSE_STORAGE_PASSWORD,
SYNAPSE_APPLICATION_ID,
SYNAPSE_DIRECTORY_ID,
SYNAPSE_CLIENT_KEY,
SYNAPSE_USE_CERTIFICATE,
SYNAPSE_CLIENT_CERTIFICATE,
DEPLOY_FOLDER,
SPARK_DRIVER_MEM,
@@ -152,13 +134,7 @@ public enum EHadoopProperties {
DATABRICKS_TOKEN,
DATABRICKS_DBFS_DEP_FOLDER,
UNIV_STANDALONE_MASTER,
UNIV_STANDALONE_EXEC_MEMORY,
UNIV_STANDALONE_EXEC_CORE;
DATABRICKS_DBFS_DEP_FOLDER;
public String getName() {
return this.name();

View File

@@ -1,75 +0,0 @@
// ============================================================================
//
// 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;
}
}

View File

@@ -766,11 +766,11 @@ public class ContextUtils {
return ContextUtils.getContextTypeByName(contextItem, contextName, true);
} else if (item instanceof JobletProcessItem) {
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
return ContextUtils.getContextTypeByName(jobletProcessItem.getJobletProcess().getContext(),
return ContextUtils.getContextTypeByName((List<ContextType>) jobletProcessItem.getJobletProcess().getContext(),
contextName, jobletProcessItem.getJobletProcess().getDefaultContext());
} else if (item instanceof ProcessItem) {
ProcessItem processItem = (ProcessItem) item;
return ContextUtils.getContextTypeByName(processItem.getProcess().getContext(), contextName,
return ContextUtils.getContextTypeByName((List<ContextType>) processItem.getProcess().getContext(), contextName,
processItem.getProcess().getDefaultContext());
}
return null;
@@ -1134,31 +1134,5 @@ 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;
}
}

View File

@@ -1,42 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.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;
}
}

View File

@@ -16,7 +16,6 @@ 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;
@@ -25,20 +24,18 @@ 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;
@@ -49,9 +46,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;
@@ -62,8 +59,6 @@ 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;
@@ -80,13 +75,14 @@ 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 FILE_MAPPING_REVISION = "mapping_revision.json"; //$NON-NLS-1$
public static final String MAPPING_FILE_PATTERN = "^mapping_.*\\.xml$"; //$NON-NLS-1$
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
private static ECodeLanguage codeLanguage;
@@ -463,14 +459,13 @@ public final class MetadataTalendType {
return list;
}
public static URL getSystemFolderURLOfMappingsFile() throws SystemException {
public static URL getSystemForderURLOfMappingsFile() 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);
@@ -479,169 +474,46 @@ public final class MetadataTalendType {
return url;
}
public static URL getProjectFolderURLOfMappingsFile() throws SystemException {
public static URL getProjectForderURLOfMappingsFile() throws SystemException {
try {
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
IPath settingPath = new ProjectScope(project).getLocation();
File mappingFolder = settingPath.append(dirPath).toFile();
return mappingFolder.toURI().toURL();
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();
} catch (Exception e) {
throw new SystemException(e);
}
}
public static URL getProjectTempMappingFolder() {
private static String getSha1OfFile(File file) {
String sha1 = null;
FileInputStream fileInputStream = null;
try {
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();
fileInputStream = new FileInputStream(file);
sha1 = DigestUtils.shaHex(fileInputStream);
} catch (Exception e) {
ExceptionHandler.process(e);
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);
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
e.printStackTrace(); // Just print the exception for debug.
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
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;
return sha1;
}
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()) {
@@ -652,6 +524,49 @@ 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, ...).
@@ -659,38 +574,20 @@ 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();
for (File file : getWorkingMappingFiles()) {
loadMapping(file);
metadataMappingFiles.add(file);
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);
}
}
}
}
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 {

View File

@@ -24,13 +24,13 @@ import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EMap;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.runtime.model.components.IComponentConstants;
import org.talend.commons.utils.resource.FileExtensions;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.IRepositoryContextService;
import org.talend.core.database.EDatabase4DriverClassName;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.ERedshiftDriver;
import org.talend.core.database.conn.ConnParameterKeys;
import org.talend.core.database.conn.template.EDatabaseConnTemplate;
import org.talend.core.model.metadata.Dbms;
@@ -54,7 +54,6 @@ import org.talend.core.model.metadata.builder.connection.SAPBWTable;
import org.talend.core.prefs.SSLPreferenceConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.utils.KeywordsValidator;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.SAPBWTableHelper;
import org.talend.cwm.helper.TaggedValueHelper;
@@ -62,10 +61,6 @@ import org.talend.cwm.relational.RelationalFactory;
import org.talend.model.bridge.ReponsitoryContextBridge;
import org.talend.repository.model.IProxyRepositoryFactory;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import orgomg.cwm.objectmodel.core.TaggedValue;
/**
@@ -228,9 +223,8 @@ public final class ConvertionHelper {
} else {
result.setDbType(connection.getDatabaseType());
}
String dbVersionString = getDriverVersionString(connection);
result.setDriverJarPath(connection.getDriverJarPath());
result.setDbVersionString(dbVersionString);
result.setDbVersionString(connection.getDbVersionString());
result.setDriverClass(connection.getDriverClass());
result.setFileFieldName(connection.getFileFieldName());
result.setId(connection.getId());
@@ -271,23 +265,6 @@ public final class ConvertionHelper {
}
private static String getDriverVersionString(DatabaseConnection dbConn) {
String dbVersionString = dbConn.getDbVersionString();
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);
if (StringUtils.isNotBlank(driverString)) {
dbVersionString = driverString;
} else {
dbVersionString = ERedshiftDriver.DRIVER_V1.name();
}
}
}
return dbVersionString;
}
/**
* Copies other parameters from <code>DatabaseConnection</code> to <code>IMetadataConnection</code>. Added by Marvin
* Wang on Aug.8, 2012.
@@ -728,26 +705,6 @@ public final class ConvertionHelper {
origValueConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_KEY_STORE_PASSWORD), false));
}
}
} 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
&& ERedshiftDriver.DRIVER_V2.name().equals(parameters.get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_DRIVER))
&& !Boolean.valueOf(parameters.get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_STRINGPARA))) {
additionParamStr = "";
String tableValue = parameters.get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_PARATABLE);
if (StringUtils.isNotBlank(tableValue)) {
List<Map<String, Object>> entryProperties = getEntryProperties(tableValue);
for (Map<String, Object> entryMap : entryProperties) {
String key = TalendQuoteUtils.removeQuotes(String.valueOf(entryMap.get("KEY")));
if (StringUtils.isNotBlank(key)) {
String value = TalendQuoteUtils.removeQuotes(String.valueOf(entryMap.get("VALUE")));
updateAdditionParam(sgb, info, key, value);
}
}
}
}
}
return additionParamStr + sgb.toString();
}
@@ -757,27 +714,4 @@ public final class ConvertionHelper {
sgb.append("&").append(key).append("=").append(value);//$NON-NLS-1$ //$NON-NLS-2$
}
}
public static List<Map<String, Object>> getEntryProperties(String paramString) {
List<Map<String, Object>> tableProperties = new ArrayList<Map<String, Object>>();
try {
ObjectMapper objectMapper = new ObjectMapper();
tableProperties = objectMapper.readValue(paramString, new TypeReference<List<Map<String, Object>>>() {
});
} catch (Exception e) {
ExceptionHandler.process(e);
}
return tableProperties;
}
public static String getEntryPropertiesString(List<Map<String, Object>> entryProperties) {
String entryString = "";
try {
ObjectMapper objectMapper = new ObjectMapper();
entryString = objectMapper.writeValueAsString(entryProperties);
} catch (JsonProcessingException e) {
ExceptionHandler.process(e);
}
return entryString;
}
}

View File

@@ -489,11 +489,6 @@ 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());
@@ -669,26 +664,6 @@ public class ComponentToRepositoryProperty {
connection.setAdditionalParams(value);
}
}
if ("USE_STRING_PROPERTIES".equals(param.getRepositoryValue())) {
String value = getParameterValue(connection, node, param);
if (value != null) {
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_STRINGPARA, value);
}
}
if ("DRIVER_VERSION".equals(param.getRepositoryValue())) {
String value = getParameterValue(connection, node, param);
if (value != null) {
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_DRIVER, value);
}
}
if ("ENTRY_PROPERTIES".equals(param.getRepositoryValue())) {
Object value = param.getValue();
if (value instanceof List) {
List<Map<String, Object>> entryProperties = (List<Map<String, Object>>) value;
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_PARATABLE,
ConvertionHelper.getEntryPropertiesString(entryProperties));
}
}
if ("FILE".equals(param.getRepositoryValue())) { //$NON-NLS-1$
String value = getParameterValue(connection, node, param);
if (value != null) {

View File

@@ -29,7 +29,6 @@ import org.talend.commons.ui.utils.PathUtils;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.ERedshiftDriver;
import org.talend.core.database.conn.ConnParameterKeys;
import org.talend.core.database.conn.template.EDatabaseConnTemplate;
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
@@ -44,7 +43,6 @@ import org.talend.core.model.metadata.MappingType;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.MetadataToolHelper;
import org.talend.core.model.metadata.MultiSchemasUtil;
import org.talend.core.model.metadata.builder.ConvertionHelper;
import org.talend.core.model.metadata.builder.connection.AdditionalConnectionProperty;
import org.talend.core.model.metadata.builder.connection.BRMSConnection;
import org.talend.core.model.metadata.builder.connection.Concept;
@@ -1041,26 +1039,6 @@ public class RepositoryToComponentProperty {
if (value.equals("PROPERTIES_STRING")) { //$NON-NLS-1$
return getAppropriateValue(connection, connection.getAdditionalParams());
}
if (value.equals("USE_STRING_PROPERTIES")) {
return Boolean.valueOf(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_REDSHIFT_STRINGPARA));
}
if (value.equals("ENTRY_PROPERTIES")) {
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);
if (org.apache.commons.lang.StringUtils.isBlank(driverVersion)) {
driverVersion = ERedshiftDriver.DRIVER_V1.name();
}
return driverVersion;
}
if (value.equals("DRIVER")) { //$NON-NLS-1$
String dbVersionString = connection.getDbVersionString();
if (dbVersionString != null && EDatabaseConnTemplate.MSSQL.getDBDisplayName().equals(databaseType)) {

View File

@@ -1,86 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.process;
import java.util.Objects;
import org.apache.commons.lang.StringUtils;
/**
* DOC jding class global comment. Detailled comment
*/
public class ElementParameterValueModel {
private String label;
private String value;
/**
* Getter for lebel.
*
* @return the lebel
*/
public String getLabel() {
return label;
}
/**
* Sets the lebel.
*
* @param lebel the lebel to set
*/
public void setLabel(String label) {
this.label = label;
}
/**
* Getter for value.
*
* @return the value
*/
public String getValue() {
return value;
}
/**
* Sets the value.
*
* @param value the value to set
*/
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return StringUtils.isNotBlank(this.label) ? this.label : this.value;
}
@Override
public int hashCode() {
return Objects.hash(label, value);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ElementParameterValueModel other = (ElementParameterValueModel) obj;
return Objects.equals(label, other.label) && Objects.equals(value, other.value);
}
}

View File

@@ -58,11 +58,6 @@ public interface IProcess extends IElement {
public static final String SCREEN_OFFSET_Y = "SCREEN_OFFSET_Y"; //$NON-NLS-1$
public static final String PROP_ERR_ON_COMPONENT_MISSING = "error.on.component.missing";
public static final boolean ERR_ON_COMPONENT_MISSING = Boolean
.valueOf(System.getProperty(PROP_ERR_ON_COMPONENT_MISSING, Boolean.TRUE.toString()));
public String getName();
public String getId();

View File

@@ -571,11 +571,8 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
*/
public final static ERepositoryObjectType PROCESS_SPARKSTREAMING = ERepositoryObjectType.valueOf("PROCESS_SPARKSTREAMING");
public final static ERepositoryObjectType METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_INPUT = ERepositoryObjectType
.valueOf("METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_INPUT"); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_OUTPUT = ERepositoryObjectType
.valueOf("METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT_OUTPUT"); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT = ERepositoryObjectType
.valueOf("METADATA_SAP_BW_ADVANCEDDATASTOREOBJECT"); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_SAP_BW_DATASOURCE = ERepositoryObjectType
.valueOf("METADATA_SAP_BW_DATASOURCE"); //$NON-NLS-1$
@@ -922,7 +919,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
} else if (type.getType().equals("TEST_CONTAINER")) {
return "test case";
} else if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
ICamelDesignerCoreService camelService = GlobalServiceRegister.getDefault()
ICamelDesignerCoreService camelService = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault()
.getService(ICamelDesignerCoreService.class);
String deleteFolderName = camelService.getDeleteFolderName(type);
if (deleteFolderName != null) {
@@ -1468,7 +1465,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
allTypes.add(ERepositoryObjectType.SPARK_STREAMING_JOBLET);
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
IESBService esbService = GlobalServiceRegister.getDefault().getService(IESBService.class);
IESBService esbService = (IESBService) GlobalServiceRegister.getDefault().getService(IESBService.class);
ERepositoryObjectType serviceType = esbService.getServicesType();
if (serviceType != null) {
allTypes.add(serviceType);

View File

@@ -1,52 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.update;
import java.util.Date;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IStudioUpdateConfig {
Boolean isEnabled();
IStudioUpdate getStudioUpdate();
public interface IStudioUpdate {
String getName();
String getStudioVersion();
Date getReleaseDate();
Date getApprovedDate();
String getInfoUrl();
String getBaseUrl();
String getUpdateUrl();
String getApprovedBy();
String getApprovedName();
String getProjectId();
Boolean isCustom();
}
}

View File

@@ -1,169 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.update;
import java.util.Date;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class StudioUpdateConfig implements IStudioUpdateConfig {
private Boolean enabled;
private IStudioUpdate studioUpdate;
@Override
public Boolean isEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
@Override
public IStudioUpdate getStudioUpdate() {
return studioUpdate;
}
public void setStudioUpdate(IStudioUpdate studioUpdate) {
this.studioUpdate = studioUpdate;
}
public static class StudioUpdate implements IStudioUpdate {
private String name;
private String studioVersion;
private String updateUrl;
private Date releaseDate;
private String infoUrl;
private String baseUrl;
private String approvedBy;
private String approvedName;
private Date approvedDate;
private String projectId;
private Boolean custom;
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String getStudioVersion() {
return studioVersion;
}
public void setStudioVersion(String studioVersion) {
this.studioVersion = studioVersion;
}
@Override
public String getUpdateUrl() {
return updateUrl;
}
public void setUpdateUrl(String updateUrl) {
this.updateUrl = updateUrl;
}
@Override
public Date getReleaseDate() {
return releaseDate;
}
public void setReleaseDate(Date releaseDate) {
this.releaseDate = releaseDate;
}
@Override
public String getInfoUrl() {
return infoUrl;
}
public void setInfoUrl(String infoUrl) {
this.infoUrl = infoUrl;
}
@Override
public String getBaseUrl() {
return baseUrl;
}
public void setBaseUrl(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override
public String getApprovedBy() {
return approvedBy;
}
public void setApprovedBy(String approvedBy) {
this.approvedBy = approvedBy;
}
@Override
public String getApprovedName() {
return approvedName;
}
public void setApprovedName(String approvedName) {
this.approvedName = approvedName;
}
@Override
public Date getApprovedDate() {
return approvedDate;
}
public void setApprovedDate(Date approvedDate) {
this.approvedDate = approvedDate;
}
@Override
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
@Override
public Boolean isCustom() {
return custom;
}
public void setCustom(Boolean custom) {
this.custom = custom;
}
}
}

View File

@@ -30,7 +30,6 @@ import org.talend.core.ui.IInstalledPatchService;
import org.talend.repository.ProjectManager;
import org.talend.utils.json.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
@@ -139,19 +138,6 @@ public class PendoTrackDataUtil {
}
public static String convertEntityJsonString(Object entity) {
ObjectMapper mapper = new ObjectMapper();
try {
String content = mapper.writeValueAsString(entity);
if (StringUtils.isNotBlank(content)) {
return content;
}
} catch (JsonProcessingException e) {
ExceptionHandler.process(e);
}
return "";
}
public enum TrackEvent {
PROJECT_LOGIN("Project Login"),
@@ -160,9 +146,7 @@ public class PendoTrackDataUtil {
USE_API_DEF("Use API Definition"),
OPEN_IN_APIDesigner("Open in API Designer"),
OPEN_IN_APITester("Open in API Tester"),
OPEN_API_DOCUMENTATION("Open API Documentation"),
AUTOMAP("tMap Automap"),
TMAP("Studio tMap");
OPEN_API_DOCUMENTATION("Open API Documentation");
private String event;

View File

@@ -55,10 +55,6 @@ import org.talend.utils.json.JSONObject;
*/
public class PendoTrackSender {
private static final String PROP_PENDO_LOCAL_CHECK = "talend.pendo.localDebug";
private static final String PROP_PENDO_LOG_DATA = "talend.pendo.logRuntimeData";
private static final String PREFIX_API = "api";
private static final String PENDO_INFO = "/monitoring/pendo/info";
@@ -79,9 +75,6 @@ public class PendoTrackSender {
private static String pendoInfo;
public PendoTrackSender() {
}
public static PendoTrackSender getInstance() {
if (instance == null) {
instance = new PendoTrackSender();
@@ -101,9 +94,7 @@ public class PendoTrackSender {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (isTrackSendAvailable()) {
sendTrackData(event, properties);
}
sendTrackData(event, properties);
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
@@ -117,10 +108,10 @@ public class PendoTrackSender {
}
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
if (isPendoLocalDebug()) {
ExceptionHandler.log(PendoTrackDataUtil.convertEntityJsonString(properties));
if (!checkTokenUsed(adminUrl) || !NetworkUtil.isNetworkValid()) {
return;
}
DefaultHttpClient client = null;
CloseableHttpResponse response = null;
IProxySelectorProvider proxySelectorProvider = null;
@@ -150,9 +141,6 @@ public class PendoTrackSender {
response = client.execute(httpPost, HttpClientContext.create());
StatusLine statusLine = response.getStatusLine();
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
if (isLogPendoData()) {
ExceptionHandler.log(trackData);
}
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
}
@@ -176,21 +164,6 @@ public class PendoTrackSender {
}
}
public boolean isTrackSendAvailable() throws Exception {
if (isPendoLocalDebug() || checkTokenUsed(adminUrl) && NetworkUtil.isNetworkValid()) {
return true;
}
return false;
}
public boolean isPendoLocalDebug() {
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOCAL_CHECK));
}
public boolean isLogPendoData() {
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOG_DATA));
}
private String getPendoInfo() throws Exception {
if (StringUtils.isBlank(pendoInfo)) {
pendoInfo = getPendoInfo(getBaseUrl(), getToken());

View File

@@ -1,54 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.pendo.mapper;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.properties.PendoTMapProperties;
/**
* DOC jding class global comment. Detailled comment
*/
public abstract class AbstractPendoTMapManager {
protected abstract PendoTMapProperties calculateProperties();
public void sendTrackToPendo() {
Job job = new Job("send pendo track") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
if (PendoTrackSender.getInstance().isTrackSendAvailable()) {
PendoTMapProperties properties = calculateProperties();
PendoTrackSender.getInstance().sendTrackData(TrackEvent.TMAP, properties);
}
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
}
return Status.OK_STATUS;
}
};
job.setUser(false);
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
}

View File

@@ -1,53 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.pendo.mapper;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.properties.PendoAutoMapProperties;
/**
* Assume no multiple thread, one AutoMapper one PendoAutoMapManager
*
* DOC jding class global comment. Detailled comment
*/
public class PendoAutoMapManager {
private int mappingChangeCount = 0;
public void setMappingChangeCount(int mappingChangeCount) {
this.mappingChangeCount = mappingChangeCount;
}
public void incrementMappingChangeCount() {
this.mappingChangeCount++;
}
public void resetMappingChangeCount() {
this.mappingChangeCount = 0;
}
public int getMappingChangeCount() {
return mappingChangeCount;
}
public void sendTrackToPendo() {
if (mappingChangeCount < 1) {
return;
}
PendoAutoMapProperties properties = new PendoAutoMapProperties();
properties.setAutoMappings(mappingChangeCount);
PendoTrackSender.getInstance().sendToPendo(TrackEvent.AUTOMAP, properties);
}
}

View File

@@ -1,45 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.pendo.properties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoAutoMapProperties implements IPendoDataProperties {
@JsonProperty("auto_mapping")
private int autoMappings;
/**
* Getter for autoMappings.
*
* @return the autoMappings
*/
public int getAutoMappings() {
return autoMappings;
}
/**
* Sets the autoMappings.
*
* @param autoMappings the autoMappings to set
*/
public void setAutoMappings(int autoMappings) {
this.autoMappings = autoMappings;
}
}

View File

@@ -1,462 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.pendo.properties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoTMapProperties implements IPendoDataProperties {
/**
* Number of input columns
*/
@JsonProperty("input_columns")
private int inputColumns;
/**
* Number of output columns
*/
@JsonProperty("output_columns")
private int outputColumns;
/**
* Number of var columns
*/
@JsonProperty("var_columns")
private int varColumns;
/**
* Number of input tables which have at least 1 mapping to an output table
*/
@JsonProperty("number_of_sources")
private int sourceNumber;
/**
* Number of output tables have mapping from the main input table 
*/
@JsonProperty("number_of_destinations")
private int destinationNumber;
/**
* Number of output tables
*/
@JsonProperty("number_of_outputs")
private int outputNumber;
/**
* Number of expressions without java transformation(expressions in input_columns/var_columns/output_columns but not
* include filter expressions)
*/
@JsonProperty("simple_expressions")
private int simpleExpressions;
/**
* Number of expressions with java transformation(expressions in input_columns/var_columns/output_columns but not
* include filter expressions)
*/
@JsonProperty("transformed_expressions")
private int transformExpressions;
/**
* Number of mappings(links) between input and var
*/
@JsonProperty("input_var_mapping")
private int inputVarMappings;
/**
* Number of mappings(links) between var and output
*/
@JsonProperty("var_output_mapping")
private int varOutputMappings;
/**
* Number of mappings(links) between input and output
*/
@JsonProperty("input_output_mapping")
private int inputOutputMappings;
/**
* Number of input columns which are mapped to multiple output columns, either mapped directly or mapped through the
* Var column
*/
@JsonProperty("1-to-n mapping")
private int oneToNMappings;
/**
* Number of output columns which have multiple source columns, either input columns or var columns
*/
@JsonProperty("n-to-1 mapping")
private int nToOneMappings;
/**
* Number of mappings(links) between main input table and join tables
*/
@JsonProperty("join_mappings")
private int joinMappingCounts;
/**
* Number of left out join used in join table
*/
@JsonProperty("left_joins")
private int leftJoinCounts;
/**
* Number of inner join used in join table
*/
@JsonProperty("inner_joins")
private int innerJoinCounts;
/**
* Number of filter activated on input/output tables  
*/
@JsonProperty("filters")
private int filterCounts;
/**
* Number of field types for each type in OUTPUT tables
*/
@JsonProperty("field_types")
private String outputFieldTypes;
/**
* Getter for inputColumns.
* @return the inputColumns
*/
public int getInputColumns() {
return inputColumns;
}
/**
* Sets the inputColumns.
* @param inputColumns the inputColumns to set
*/
public void setInputColumns(int inputColumns) {
this.inputColumns = inputColumns;
}
/**
* Getter for outputColumns.
* @return the outputColumns
*/
public int getOutputColumns() {
return outputColumns;
}
/**
* Sets the outputColumns.
* @param outputColumns the outputColumns to set
*/
public void setOutputColumns(int outputColumns) {
this.outputColumns = outputColumns;
}
/**
* Getter for varColumns.
* @return the varColumns
*/
public int getVarColumns() {
return varColumns;
}
/**
* Sets the varColumns.
* @param varColumns the varColumns to set
*/
public void setVarColumns(int varColumns) {
this.varColumns = varColumns;
}
/**
* Getter for sourceNumber.
* @return the sourceNumber
*/
public int getSourceNumber() {
return sourceNumber;
}
/**
* Sets the sourceNumber.
* @param sourceNumber the sourceNumber to set
*/
public void setSourceNumber(int sourceNumber) {
this.sourceNumber = sourceNumber;
}
/**
* Getter for destinationNumber.
* @return the destinationNumber
*/
public int getDestinationNumber() {
return destinationNumber;
}
/**
* Sets the destinationNumber.
* @param destinationNumber the destinationNumber to set
*/
public void setDestinationNumber(int destinationNumber) {
this.destinationNumber = destinationNumber;
}
/**
* Getter for outputNumber.
* @return the outputNumber
*/
public int getOutputNumber() {
return outputNumber;
}
/**
* Sets the outputNumber.
* @param outputNumber the outputNumber to set
*/
public void setOutputNumber(int outputNumber) {
this.outputNumber = outputNumber;
}
/**
* Getter for simpleExpressions.
*
* @return the simpleExpressions
*/
public int getSimpleExpressions() {
return simpleExpressions;
}
/**
* Sets the simpleExpressions.
*
* @param simpleExpressions the simpleExpressions to set
*/
public void setSimpleExpressions(int simpleExpressions) {
this.simpleExpressions = simpleExpressions;
}
/**
* Getter for transformExpressions.
*
* @return the transformExpressions
*/
public int getTransformExpressions() {
return transformExpressions;
}
/**
* Sets the transformExpressions.
*
* @param transformExpressions the transformExpressions to set
*/
public void setTransformExpressions(int transformExpressions) {
this.transformExpressions = transformExpressions;
}
/**
* Getter for inputVarMappings.
* @return the inputVarMappings
*/
public int getInputVarMappings() {
return inputVarMappings;
}
/**
* Sets the inputVarMappings.
* @param inputVarMappings the inputVarMappings to set
*/
public void setInputVarMappings(int inputVarMappings) {
this.inputVarMappings = inputVarMappings;
}
/**
* Getter for varOutputMappings.
* @return the varOutputMappings
*/
public int getVarOutputMappings() {
return varOutputMappings;
}
/**
* Sets the varOutputMappings.
* @param varOutputMappings the varOutputMappings to set
*/
public void setVarOutputMappings(int varOutputMappings) {
this.varOutputMappings = varOutputMappings;
}
/**
* Getter for inputOutputMappings.
* @return the inputOutputMappings
*/
public int getInputOutputMappings() {
return inputOutputMappings;
}
/**
* Sets the inputOutputMappings.
* @param inputOutputMappings the inputOutputMappings to set
*/
public void setInputOutputMappings(int inputOutputMappings) {
this.inputOutputMappings = inputOutputMappings;
}
/**
* Getter for oneToNMappings.
* @return the oneToNMappings
*/
public int getOneToNMappings() {
return oneToNMappings;
}
/**
* Sets the oneToNMappings.
* @param oneToNMappings the oneToNMappings to set
*/
public void setOneToNMappings(int oneToNMappings) {
this.oneToNMappings = oneToNMappings;
}
/**
* Getter for nToOneMappings.
* @return the nToOneMappings
*/
public int getnToOneMappings() {
return nToOneMappings;
}
/**
* Sets the nToOneMappings.
* @param nToOneMappings the nToOneMappings to set
*/
public void setnToOneMappings(int nToOneMappings) {
this.nToOneMappings = nToOneMappings;
}
/**
* Getter for joinMappingCounts.
* @return the joinMappingCounts
*/
public int getJoinMappingCounts() {
return joinMappingCounts;
}
/**
* Sets the joinMappingCounts.
* @param joinMappingCounts the joinMappingCounts to set
*/
public void setJoinMappingCounts(int joinMappingCounts) {
this.joinMappingCounts = joinMappingCounts;
}
/**
* Getter for leftJoinCounts.
* @return the leftJoinCounts
*/
public int getLeftJoinCounts() {
return leftJoinCounts;
}
/**
* Sets the leftJoinCounts.
* @param leftJoinCounts the leftJoinCounts to set
*/
public void setLeftJoinCounts(int leftJoinCounts) {
this.leftJoinCounts = leftJoinCounts;
}
/**
* Getter for innerJoinCounts.
* @return the innerJoinCounts
*/
public int getInnerJoinCounts() {
return innerJoinCounts;
}
/**
* Sets the innerJoinCounts.
* @param innerJoinCounts the innerJoinCounts to set
*/
public void setInnerJoinCounts(int innerJoinCounts) {
this.innerJoinCounts = innerJoinCounts;
}
/**
* Getter for filterCounts.
* @return the filterCounts
*/
public int getFilterCounts() {
return filterCounts;
}
/**
* Sets the filterCounts.
* @param filterCounts the filterCounts to set
*/
public void setFilterCounts(int filterCounts) {
this.filterCounts = filterCounts;
}
/**
* Getter for outputFieldTypes.
* @return the outputFieldTypes
*/
public String getOutputFieldTypes() {
return outputFieldTypes;
}
/**
* Sets the outputFieldTypes.
* @param outputFieldTypes the outputFieldTypes to set
*/
public void setOutputFieldTypes(String outputFieldTypes) {
this.outputFieldTypes = outputFieldTypes;
}
}

View File

@@ -1,31 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.prefs;
/**
* created by hcyi on May 17, 2022
* Detailled comment
*
*/
public class SecurityPreferenceConstants {
public static final String SIGNER_PATH = "signer.path"; //$NON-NLS-1$
public static final String SIGNER_KEYSTORE_PASSWORD = "signer.keystore.password"; //$NON-NLS-1$
public static final String SIGNER_KEY_PASSWORD = "signer.key.password"; //$NON-NLS-1$
public static final String SIGNER_KEY_ALIAS = "signer.key.alias"; //$NON-NLS-1$
}

View File

@@ -338,7 +338,7 @@ SchemaOperationChoiceDialog.StatusMessage=Le sch\u00E9ma est invalide, ou il exi
SchemaOperationChoiceDialog.Title=Sch\u00E9ma
SchemaOperationChoiceDialog.ViewSchemaMessage=Voir le sch\u00E9ma (lecture seule)
SchemaXPathQuerysDialog.Mappings=Correspondances
SelectRepositoryContextDialog.DeselectAll=Tout d\u00E9s\u00E9lectionner
SelectRepositoryContextDialog.DeselectAll=D\u00E9s\u00E9lectionner tout
SelectRepositoryContextDialog.CollapseAll=Tout r\u00E9duire
SelectRepositoryContextDialog.DuplicationMessage=Vous avez s\u00E9lectionn\u00E9 la variable "{0}" dans le contexte "{1}".
SelectRepositoryContextDialog.DuplicationTitle=Avertissement de duplication !

View File

@@ -305,13 +305,13 @@ RepositoryUpdateManager.Check=\u30C1\u30A7\u30C3\u30AF\u4E2D...
RepositoryUpdateManager.Messages=\u5909\u66F4\u3092\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n \u3053\u306E\u64CD\u4F5C\u306B\u306F\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.MessagesForTDQ=\u5909\u66F4\u3092\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B?\n\u307E\u305F\u3001\u4E00\u90E8\u306E\u5206\u6790\u4F9D\u5B58\u9805\u76EE\u3067\u60C5\u5831\u304C\u5931\u308F\u308C\u307E\u3059\u3002\n\u3053\u306E\u64CD\u4F5C\u306B\u306F\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.NoModificationTitle=\u5909\u66F4\u4E0D\u8981
RepositoryUpdateManager.NoModificationMessages=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NoModificationMessages=\u66F4\u65B0\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundMessages=\u95A2\u4FC2\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundTitle=\u898B\u3064\u304B\u308A\u307E\u305B\u3093
RepositoryUpdateManager.RenameContextMessagesNoBuiltIn=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextMessagesNoBuiltIn=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextTitle=\u540D\u524D\u5909\u66F4\u306E\u8CEA\u554F
RepositoryUpdateManager.ItemsToUpdate=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RepositoryUpdateManager.job.title=\u30A2\u30A4\u30C6\u30E0\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4E2D...
RepositoryUpdateManager.ItemsToUpdate=\u66F4\u65B0\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RepositoryUpdateManager.job.title=\u30A2\u30A4\u30C6\u30E0\u3092\u66F4\u65B0\u4E2D...
RoutinesFunctionProposal.CreatedBy=\u4F5C\u6210\u8005:
RoutinesFunctionProposal.Description=\u8AAC\u660E:
RoutinesFunctionProposal.Example=\u4F8B:
@@ -483,11 +483,11 @@ EUpdateItemType.Name=\u540D\u524D
EUpdateItemType.JobVersion=\u30B8\u30E7\u30D6\u30D0\u30FC\u30B8\u30E7\u30F3
EUpdateItemType.ValidationRule=\u691C\u8A3C\u30EB\u30FC\u30EB
EUpdateResult.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30E2\u30FC\u30C9\u306B\u5909\u66F4
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.JobUpdate=\u30B8\u30E7\u30D6\u30CE\u30FC\u30C9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.PathUpdate=\u30DE\u30C3\u30D7\u30D1\u30B9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.StructurePathUpdate=\u30B9\u30C8\u30E9\u30AF\u30C1\u30E3\u30FC\u30D1\u30B9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u66F4\u65B0
EUpdateResult.JobUpdate=\u30B8\u30E7\u30D6\u30CE\u30FC\u30C9\u306E\u66F4\u65B0
EUpdateResult.PathUpdate=\u30DE\u30C3\u30D7\u30D1\u30B9\u306E\u66F4\u65B0
EUpdateResult.StructurePathUpdate=\u30B9\u30C8\u30E9\u30AF\u30C1\u30E3\u30FC\u30D1\u30B9\u306E\u66F4\u65B0
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u66F4\u65B0
EUpdateResult.Reload=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30EA\u30ED\u30FC\u30C9
EUpdateResult.Rename=\u540D\u524D\u3092\u5909\u66F4
EUpdateResult.Add=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u8FFD\u52A0

View File

@@ -1,6 +1,6 @@
AbstractBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2005-2010, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / JobDesigner (CodeGenerator \u7248\u672C {1})\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002\n//\n// ============================================================================
AbstractBrandingService.routines_license_header_content2014=\u7248\u6743\u6240\u6709 (c) 2006-2014, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// CodeGenerator \u7248\u672C {1}\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002
AbstractBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2005-2010, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0}\u81EA\u52A8\u751F\u6210\n// / JobDesigner (CodeGenerator \u7248\u672C {1})\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3\u6709\u5173 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002.\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html).\n//\n// ============================================================================
AbstractBrandingService.routines_license_header_content2014=\u7248\u6743\u6240\u6709 (c) 2006-2015, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0}\u81EA\u52A8\u751F\u6210 \n// CodeGenerator \u7248\u672C {1}\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3\u6709\u5173 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002
AbstractComponentsProvider.folderNotExist=\u6587\u4EF6\u5939 {0} \u4E0D\u5B58\u5728\u3002
AbstractItemMigrationTask.taskFailed=\u8FC1\u79FB\u4EFB\u52A1 {0} \u5728\u8FC1\u79FB\u9879\u76EE {1} \u65F6\u5931\u8D25
AdvancedSocketFactory.failedInitial=\u9519\u8BEF\uFF1A\u65E0\u6CD5\u521D\u59CB\u5316\uFF1A
@@ -253,7 +253,7 @@ MetadataTool.schemaInvalid=Schema \u540D\u79F0\u65E0\u6548\u3002
MetadataTool.schemaNull=Schema \u540D\u79F0\u4E3A null\u3002
NodeReturnProposal.Availability=\n\u53EF\u7528\u6027\uFF1A {4}
NodeReturnProposal.Description=\u63CF\u8FF0\uFF1A{0}
NodeReturnProposal.GlobalVariable=\n\n\u5168\u5C40\u53D8\u91CF\uFF0C\u7EC4\u4EF6\u5C5E\u6027 {1} [{2}].
NodeReturnProposal.GlobalVariable=\n\n\u5168\u5C40\u53D8\u91CF\uFF0C\u7EC4\u4EF6 {1} [{2}] \u7684\u5C5E\u6027\u3002
NodeReturnProposal.Type=\n\u7C7B\u578B\uFF1A {3}
NodeReturnProposal.VariableName=\n\n\u53D8\u91CF\u540D\uFF1A {5}
PaletteContentDialog.connection=\u683C\u5F0F\u8FDE\u63A5\u9ED8\u8BA4\u503C:
@@ -302,13 +302,13 @@ RepositoryObject.NotImplemented=\u672A\u5B9E\u73B0
RepositoryToComponentProperty.xmlFileSelection=\u9009\u62E9\u8981\u9A8C\u8BC1\u7684 XML \u6587\u4EF6
RepositoryUpdateManager.Title=\u4FEE\u6539
RepositoryUpdateManager.Check=\u68C0\u67E5\u4E2D...
RepositoryUpdateManager.Messages=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F \n \u6B64\u8FC7\u7A0B\u53EF\u80FD\u6BD4\u8F83\u8017\u65F6\u3002
RepositoryUpdateManager.MessagesForTDQ=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u67D0\u4E9B\u5206\u6790\u4F9D\u8D56\u5173\u7CFB\u4F1A\u4E22\u5931\u4FE1\u606F\u3002\n\u6B64\u8FC7\u7A0B\u53EF\u80FD\u6BD4\u8F83\u8017\u65F6\u3002
RepositoryUpdateManager.Messages=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u53EF\u80FD\u8981\u5F88\u4E45\u3002
RepositoryUpdateManager.MessagesForTDQ=\u662F\u5426\u8981\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u67D0\u4E9B\u5206\u6790\u4F9D\u8D56\u5173\u7CFB\u4F1A\u4E22\u5931\u4FE1\u606F\u3002\n\u53EF\u80FD\u8981\u5F88\u4E45
RepositoryUpdateManager.NoModificationTitle=\u6CA1\u6709\u9700\u8981\u7684\u4FEE\u6539
RepositoryUpdateManager.NoModificationMessages=\u6CA1\u6709\u66F4\u65B0\u6240\u9700\u7684\u4FEE\u6539\u3002
RepositoryUpdateManager.NotFoundMessages=\u6CA1\u6709\u53EF\u5BFB\u627E\u7684\u5173\u7CFB\u3002
RepositoryUpdateManager.NotFoundTitle=\u627E\u4E0D\u5230
RepositoryUpdateManager.RenameContextMessagesNoBuiltIn=\u662F\u5426\u786E\u5B9A\u8981\u628A\u91CD\u547D\u540D\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F \n\n \u5982\u7EE7\u7EED\uFF0C\u5219\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002
RepositoryUpdateManager.RenameContextMessagesNoBuiltIn=\u662F\u5426\u771F\u7684\u8981\u7ACB\u5373\u5C06\u91CD\u547D\u540D\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\n\u5982\u679C\u662F\uFF0C\u66F4\u65B0\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u3002
RepositoryUpdateManager.RenameContextTitle=\u91CD\u547D\u540D\u95EE\u9898
RepositoryUpdateManager.ItemsToUpdate=\u68C0\u67E5\u8981\u66F4\u65B0\u7684\u9879\u76EE
RepositoryUpdateManager.job.title=\u6B63\u5728\u66F4\u65B0\u9879\u76EE...
@@ -558,7 +558,7 @@ OpenXSDFileDialog.cancel=\u53D6\u6D88
OpenXSDFileDialog.confirm=\u786E\u8BA4
OpenXSDFileDialog.fileName=\u6587\u4EF6\u540D:
OpenXSDFileDialog.xmlFileSelection=\u9009\u62E9\u8981\u9A8C\u8BC1\u7684 XML \u6587\u4EF6
OpenXSDFileDialog.xmlSelectedOrNot=\u7531\u4E8E\u60A8\u9009\u62E9\u4E86 XSD \u5143\u6570\u636E\u6587\u4EF6\uFF0C \n \u5E94\u8BE5\u6709\u4E00\u4E2A XML \u6587\u4EF6\u9700\u8981\u9A8C\u8BC1\u3002
OpenXSDFileDialog.xmlSelectedOrNot=\u7531\u4E8E\u60A8\u9009\u62E9\u4E86 XSD \u5143\u6570\u636E\u6587\u4EF6\uFF0C\n \u5E94\u8BE5\u6709\u4E00\u4E2A xml \u6587\u4EF6\u9700\u8981\u9A8C\u8BC1\u3002
RepositoryContentProvider.repositoryLabel.Queries=\u67E5\u8BE2
RepositoryContentProvider.repositoryLabel.sapBapi=SAP Bapi
RepositoryContentProvider.repositoryLabel.sapBapi.input=\u8F93\u5165

View File

@@ -12,14 +12,9 @@
// ============================================================================
package org.talend.core.service;
import java.util.List;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.widgets.Shell;
import org.talend.core.IService;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.process.IContext;
import org.talend.core.model.properties.ContextItem;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.repository.model.RepositoryNode;
@@ -40,12 +35,4 @@ public interface IMetadataManagmentUiService extends IService {
public boolean isContextMode(Connection connection, String value);
public boolean promptConfirmLauch(Shell shell, Connection connection, ContextItem contextItem);
public IContext promptConfirmLauch(Shell shell, List<IContext> contexts, IContext defaultContext);
public boolean promptConfirmLauch(Shell shell, IContext context);
public boolean isPromptNeeded(List<IContext> contexts);
}

View File

@@ -14,7 +14,6 @@ package org.talend.core.service;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.nexus.ArtifactRepositoryBean;
import org.talend.utils.json.JSONException;
@@ -39,15 +38,4 @@ public interface IRemoteService extends IService {
boolean isTokenUsed(String adminUrl) throws Exception;
String getPendoKeyFromLicense() throws Exception;
public boolean isCloudConnection();
public static IRemoteService get() {
GlobalServiceRegister gsr = GlobalServiceRegister.getDefault();
if (gsr.isServiceRegistered(IRemoteService.class)) {
return gsr.getService(IRemoteService.class);
}
return null;
}
}

View File

@@ -15,7 +15,6 @@ package org.talend.core.service;
import java.net.URI;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
@@ -23,10 +22,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.general.Project;
import org.talend.core.model.update.IStudioUpdateConfig;
/**
* DON'T remove/change existing API for patch!
* DOC cmeng class global comment. Detailled comment
*/
public interface IStudioLiteP2Service extends IService {
@@ -124,10 +122,6 @@ public interface IStudioLiteP2Service extends IService {
boolean checkProjectCompatibility(IProgressMonitor monitor, Project proj) throws Exception;
boolean adaptNewProjectVersion(IProgressMonitor monitor, Map<String, String> props) throws Exception;
void setupTmcUpdate(IProgressMonitor monitor, IStudioUpdateConfig updateConfig) throws Exception;
public static IStudioLiteP2Service get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);
@@ -137,9 +131,7 @@ public interface IStudioLiteP2Service extends IService {
public static abstract class AbsCheckUpdateListener {
public void beforeCheckUpdate(IProgressMonitor monitor) throws Exception {
IStudioLiteP2Service.get().unregistCheckUpdateListener(this);
}
abstract public void beforeCheckUpdate(IProgressMonitor monitor) throws Exception;
}
@@ -198,42 +190,18 @@ public interface IStudioLiteP2Service extends IService {
boolean isReleaseEditable();
@Deprecated
URI getRelease(IProgressMonitor monitor) throws Exception;
@Deprecated
void setRelease(IProgressMonitor monitor, URI uri) throws Exception;
URI getLocalRelease(IProgressMonitor monitor) throws Exception;
void setLocalRelease(IProgressMonitor monitor, URI uri) throws Exception;
String getTmcRelease(IProgressMonitor monitor) throws Exception;
boolean isUpdateEditable();
@Deprecated
Collection<URI> getUpdates(IProgressMonitor monitor) throws Exception;
@Deprecated
void setUpdates(IProgressMonitor monitor, Collection<URI> uris) throws Exception;
Collection<URI> getLocalUpdates(IProgressMonitor monitor) throws Exception;
void setLocalUpdates(IProgressMonitor monitor, Collection<URI> uris) throws Exception;
String getTmcUpdate(IProgressMonitor monitor) throws Exception;
void resetToDefault(IProgressMonitor monitor) throws Exception;
boolean isEnableTmcUpdateSettings(IProgressMonitor monitor) throws Exception;
void enableTmcUpdateSettings(IProgressMonitor monitor, boolean enable) throws Exception;
boolean isOverwriteTmcUpdateSettings(IProgressMonitor monitor) throws Exception;
void overwriteTmcUpdateSettings(IProgressMonitor monitor, boolean overwrite) throws Exception;
}

View File

@@ -173,8 +173,6 @@ public class ConnectionParameters {
private Map<String, String> parameters;
private String selectContext = null;
/**
* Sets the connectionComment.
*
@@ -909,12 +907,4 @@ public class ConnectionParameters {
this.isFirstOpenSqlBuilder = isFirstOpenSqlBuilder;
}
public String getSelectContext() {
return this.selectContext;
}
public void setSelectContext(String selectContext) {
this.selectContext = selectContext;
}
}

View File

@@ -50,10 +50,6 @@ public interface IBrandingService extends IService {
public boolean isPoweredOnlyCamel();
/**
* TP_All license also has the flag 'isCloud'
* @return
*/
public default boolean isCloudLicense() {
return false;
}

View File

@@ -45,8 +45,6 @@ public interface ICamelDesignerCoreService extends IService {
boolean isInstanceofCamelBeansJar(Item item);
boolean isRouteletProcess(Item item);
/**
* Synchronized Route resource
*

View File

@@ -202,8 +202,4 @@ public interface IDesignerCoreService extends IService {
public String[] getNeedRemoveModulesForLog4j();
public void openComponentOnlineHelp(String componentName);
public IProcess getJobletProcessByItem(Item item);
}

View File

@@ -26,7 +26,6 @@ import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.language.ECodeLanguage;
@@ -134,7 +133,7 @@ public interface IRunProcessService extends IService {
public void updateLibraries(Set<ModuleNeeded> jobModuleList, IProcess process, Set<ModuleNeeded> alreadyRetrievedModules)
throws ProcessorException;
public boolean updateLibraries(Item routineItem);
public void updateLibraries(Item routineItem);
public void refreshView();
@@ -280,6 +279,4 @@ public interface IRunProcessService extends IService {
void updateAllCodeCacheStatus(boolean isUpdated);
IContext promptConfirmLauch(Shell shell, IProcess process);
}

View File

@@ -39,9 +39,9 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProjectReference;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.GITConstant;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.model.repository.GITConstant;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.util.URIHelper;
@@ -836,7 +836,8 @@ public final class ProjectManager {
return null;
}
public Map<String, String> getProjectLabelWithOriginVersion() {
return projectLabelWithOriginVersion;
}
}
}

View File

@@ -65,12 +65,10 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
loadFromContent = true;
}
@Override
public void initSettings() throws BusinessException, PersistenceException {
loadSettings();
}
@Override
public void loadSettings() throws PersistenceException {
referenceProjectList = null;
TypeReference<ReferenceProjectConfiguration> typeReference = new TypeReference<ReferenceProjectConfiguration>() {
@@ -153,7 +151,11 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
public void saveSettings() throws PersistenceException, IOException {
IProject iProject = ResourceUtils.getProject(project.getTechnicalLabel());
IFile file = iProject.getFolder(CONFIGURATION_FOLDER_NAME).getFile(CONFIGURATION_FILE_NAME);
String content = toFileContents();
if (referenceProjectConfig == null) {
referenceProjectConfig = new ReferenceProjectConfiguration();
}
ObjectMapper objectMapper = new ObjectMapper();
String content = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(referenceProjectConfig);
ByteArrayInputStream source = new ByteArrayInputStream(content.getBytes());
try {
if (!file.exists()) {
@@ -166,15 +168,6 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
}
}
public String toFileContents() throws IOException {
if (referenceProjectConfig == null) {
referenceProjectConfig = new ReferenceProjectConfiguration();
}
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(referenceProjectConfig);
}
@Override
public boolean isHasConfigurationFile() {
return hasConfigurationFile;
}

View File

@@ -17,7 +17,6 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -28,7 +27,6 @@ import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.runtime.service.ITaCoKitService;
import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.hadoop.IHadoopClusterService;
@@ -379,7 +377,7 @@ public class RepositoryNodeUtilities {
return node;
} else {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService = GlobalServiceRegister
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
.getDefault().getService(ITestContainerProviderService.class);
if (testContainerService != null) {
String originalID = testContainerService.getOriginalID(curNode);
@@ -712,7 +710,7 @@ public class RepositoryNodeUtilities {
ERepositoryObjectType type = connection.getObject().getRepositoryObjectType();
IGenericWizardService wizardService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
}
if (wizardService != null && wizardService.isGenericType(type)) {
return getGenericSchemaNode(connection, tableName);
@@ -872,7 +870,6 @@ public class RepositoryNodeUtilities {
// RelationshipItemBuilder
if (item instanceof ConnectionItem) {
ConnectionItem connectionItem = (ConnectionItem) item;
if (connectionItem.getConnection().isContextMode()) {
String id = connectionItem.getConnection().getContextId();
if (id != null) {
@@ -885,31 +882,7 @@ public class RepositoryNodeUtilities {
checkItemDependencies(object, repositoryObjects, includeSystemItems, includeReferenceProjectItems,
needRebuild);
}
} else {
ITaCoKitService coKitService = ITaCoKitService.getInstance();
String parentItemId = null;
IRepositoryViewObject obj = null;
if (coKitService != null) {
parentItemId = coKitService.getParentItemIdFromItem(item);
}
if (StringUtils.isNotBlank(parentItemId)) {
if (includeReferenceProjectItems) {
obj = factory.getLastVersion(parentItemId);
} else {
obj = factory.getLastVersion(ProjectManager.getInstance().getCurrentProject(),
parentItemId);
}
}
if (obj != null) {
if (obj instanceof IRepositoryViewObject && !repositoryObjects.contains(obj)) {
repositoryObjects.add(obj);
}
}
}
}
} catch (PersistenceException et) {
ExceptionHandler.process(et);
@@ -917,30 +890,10 @@ public class RepositoryNodeUtilities {
}
private static void checkParentItemForTacokit(IRepositoryViewObject obj,
List<IRepositoryViewObject> repositoryObjects) {
ITaCoKitService coKitService = ITaCoKitService.getInstance();
if (coKitService == null) {
return;
}
Object datastoreFromDataset = coKitService.getDatastoreFromDataset(obj);
if (datastoreFromDataset instanceof IRepositoryViewObject
&& !repositoryObjects.contains(datastoreFromDataset)) {
repositoryObjects.add((IRepositoryViewObject) datastoreFromDataset);
}
}
private static void checkItemDependencies(IRepositoryViewObject obj, List<IRepositoryViewObject> repositoryObjects,
boolean includeSystemItems, boolean includeReferenceProjectItems, boolean needRebuild) {
if (obj != null && !repositoryObjects.contains(obj)) {
repositoryObjects.add(obj);
checkParentItemForTacokit(obj, repositoryObjects);
checkAllVersionLatest(repositoryObjects, obj, includeSystemItems, includeReferenceProjectItems);
checkItemDependencies(obj.getProperty().getItem(), repositoryObjects, includeSystemItems,
includeReferenceProjectItems, needRebuild);
@@ -1008,7 +961,7 @@ public class RepositoryNodeUtilities {
List<ERepositoryObjectType> extraTypes = new ArrayList<ERepositoryObjectType>();
IGenericDBService dbService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
dbService = GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
}
if (dbService != null) {
extraTypes.addAll(dbService.getExtraTypes());

View File

@@ -581,4 +581,3 @@ I18nPreferencePage.restoreDefault=Restore default
I18nPreferencePage.wait_process=The process will hold for several minutes, please wait...
MetadataPreferencePage.EnableBasic.name=Enable Basic Authentication Header
MetadataPreferencePage.MessageDialog.Restart=The Studio needs to restart for this setting to take effect.\nAre you sure?
TalendTabbedPropertyTitle.componentHelpTooltip=Open online help

View File

@@ -1,3 +1,4 @@
AbstractBrandingService_job_license_header_content=// ============================================================================\n//\n// Copyright (c) 2005-2011, Talend SA.\n//\n// Le code source a \u00E9t\u00E9 automatiquement g\u00E9n\u00E9r\u00E9 par_{0}\n// / JobDesigner (CodeGenerator version {1}).\n// Vous pouvez trouver plus d'informations sur les produits Talend sur www.talend.com.\n// Vous pouvez distribuer ce code sous les termes de la licence GNU LGPL\n// (http://www.gnu.org/licenses/lgpl.html).\n//\n// ============================================================================
AbstractBrandingService.routines_license_header_content=Copyright (c) 2005-2011, Talend SA.\n//\n// Ce code source a \u00E9t\u00E9 automatiquement g\u00E9n\u00E9r\u00E9 par_{0}\n// CodeGenerator version {1}\n// Vous pouvez trouver plus d'informations sur les produits Talend sur www.talend.com.\n// Vous pouvez distribuer ce code sous les termes de la licence GNU LGPL\n// (http://www.gnu.org/licenses/lgpl.html).
AbstractComponentsProvider.folderNotExist=Le dossier {0} n'existe pas.
@@ -256,7 +257,7 @@ SchemaOperationChoiceDialog.StatusMessage=Le sch\u00E9ma est invalide, ou il exi
SchemaOperationChoiceDialog.Title=Sch\u00E9ma
SchemaOperationChoiceDialog.ViewSchemaMessage=Voir le sch\u00E9ma (lecture seule)
SchemaXPathQuerysDialog.Mappings=Correspondances
SelectRepositoryContextDialog.DeselectAll=Tout d\u00E9s\u00E9lectionner
SelectRepositoryContextDialog.DeselectAll=D\u00E9s\u00E9lectionner tout
SelectRepositoryContextDialog.CollapseAll=Tout r\u00E9duire
SelectRepositoryContextDialog.DuplicationMessage=Vous avez s\u00E9lectionn\u00E9 la variable "{0}" dans le contexte "{1}".
SelectRepositoryContextDialog.DuplicationTitle=Avertissement de duplication !
@@ -581,4 +582,3 @@ I18nPreferencePage.restoreDefault=Restaurer les param\u00E8tres par d\u00E9faut
I18nPreferencePage.wait_process=Le processus va prendre plusieurs minutes, patientez...
MetadataPreferencePage.EnableBasic.name=Autorise l'en-t\u00EAte d'authentification basique
MetadataPreferencePage.MessageDialog.Restart=Le Studio doit red\u00E9marrer pour que ce param\u00E8tre soit pris en compte.\nContinuer malgr\u00E9 tout ?
TalendTabbedPropertyTitle.componentHelpTooltip=Ouvrir l'aide en ligne

View File

@@ -231,12 +231,12 @@ RepositoryUpdateManager.Title=\u5909\u66F4
RepositoryUpdateManager.Check=\u30C1\u30A7\u30C3\u30AF\u4E2D...
RepositoryUpdateManager.Messages=\u5909\u66F4\u3092\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n \u3053\u306E\u64CD\u4F5C\u306B\u306F\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.NoModificationTitle=\u5909\u66F4\u4E0D\u8981
RepositoryUpdateManager.NoModificationMessages=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NoModificationMessages=\u66F4\u65B0\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundMessages=\u95A2\u4FC2\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundTitle=\u898B\u3064\u304B\u308A\u307E\u305B\u3093
RepositoryUpdateManager.RenameContextMessages=\u5909\u6570\u306E\u540D\u524D\u5909\u66F4\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextMessages=\u5909\u6570\u306E\u540D\u524D\u5909\u66F4\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextTitle=\u540D\u524D\u5909\u66F4\u306E\u8CEA\u554F
RepositoryUpdateManager.ItemsToUpdate=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RepositoryUpdateManager.ItemsToUpdate=\u66F4\u65B0\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RuleOperationChoiceDialog.editRules=\u30EB\u30FC\u30EB\u3092\u7DE8\u96C6
RuleOperationChoiceDialog.rule=\u30EB\u30FC\u30EB:
RuleOperationChoiceDialog.selectRulesFile=\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30EB\u30FC\u30EB\u3092\u9078\u629E
@@ -363,8 +363,8 @@ EUpdateItemType.Components=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
EUpdateItemType.Name=\u540D\u524D
EUpdateItemType.JobVersion=\u30B8\u30E7\u30D6\u30D0\u30FC\u30B8\u30E7\u30F3
EUpdateResult.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30E2\u30FC\u30C9\u306B\u5909\u66F4
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u66F4\u65B0
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u66F4\u65B0
EUpdateResult.Reload=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30EA\u30ED\u30FC\u30C9
EUpdateResult.Rename=\u540D\u524D\u3092\u5909\u66F4
EUpdateResult.Add=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u8FFD\u52A0
@@ -581,4 +581,3 @@ I18nPreferencePage.restoreDefault=\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u5FA9\u51
I18nPreferencePage.wait_process=\u3053\u306E\u51E6\u7406\u306B\u306F\u6570\u5206\u304B\u304B\u308A\u307E\u3059\u3002\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u304F\u3060\u3055\u3044...
MetadataPreferencePage.EnableBasic.name=\u57FA\u672C\u8A8D\u8A3C\u30D8\u30C3\u30C0\u30FC\u3092\u6709\u52B9\u306B\u3059\u308B
MetadataPreferencePage.MessageDialog.Restart=\u3053\u306E\u8A2D\u5B9A\u304C\u6709\u52B9\u306B\u306A\u308B\u3088\u3046\u3001Studio\u3092\u518D\u8D77\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u7D9A\u884C\u3057\u307E\u3059\u304B?
TalendTabbedPropertyTitle.componentHelpTooltip=\u30AA\u30F3\u30E9\u30A4\u30F3\u30D8\u30EB\u30D7\u3092\u958B\u304F

View File

@@ -1,5 +1,5 @@
AbstractBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2005-2011\uFF0CTalend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// / JobDesigner (CodeGenerator \u7248\u672C {1})\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002\n//\n// ============================================================================
AbstractBrandingService.routines_license_header_content=\u7248\u6743\u6240\u6709 (c) 2005-2011\uFF0CTalend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0} \u81EA\u52A8\u751F\u6210\n// CodeGenerator \u7248\u672C {1}\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002
AbstractBrandingService_job_license_header_content=// ============================================================================\n//\n// \u7248\u6743\u6240\u6709 (c) 2005-2011, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0}\n\u81EA\u52A8\u751F\u6210// / JobDesigner (CodeGenerator \u7248\u672C {1})\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3\u6709\u5173 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002.\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html).\n//\n// ============================================================================
AbstractBrandingService.routines_license_header_content=\u7248\u6743\u6240\u6709 (c) 2005-2011, Talend Inc.\n//\n// \u6B64\u6E90\u4EE3\u7801\u5DF2\u7531_{0}\n \u81EA\u52A8\u751F\u6210// CodeGenerator \u7248\u672C {1}\n// \u60A8\u53EF\u4EE5\u8BBF\u95EE www.talend.com \u4E86\u89E3\u6709\u5173 Talend \u4EA7\u54C1\u7684\u66F4\u591A\u4FE1\u606F\u3002\n// \u60A8\u53EF\u4EE5\u6839\u636E GNU LGPL \u8BB8\u53EF\u8BC1\u6761\u6B3E\u5206\u53D1\u6B64\u4EE3\u7801\n// http://www.gnu.org/licenses/lgpl.html)\u3002
AbstractComponentsProvider.folderNotExist=\u6587\u4EF6\u5939 {0} \u4E0D\u5B58\u5728\u3002
AbstractItemMigrationTask.taskFailed=\u8FC1\u79FB\u4EFB\u52A1 {0} \u5728\u8FC1\u79FB\u9879\u76EE {1} \u65F6\u5931\u8D25
AdvancedSocketFactory.failedInitial=\u9519\u8BEF\uFF1A\u65E0\u6CD5\u521D\u59CB\u5316:
@@ -229,12 +229,12 @@ RepositoryObject.NotImplemented=\u672A\u5B9E\u73B0
RepositoryToComponentProperty.xmlFileSelection=\u9009\u62E9\u8981\u9A8C\u8BC1\u7684 XML \u6587\u4EF6
RepositoryUpdateManager.Title=\u4FEE\u6539
RepositoryUpdateManager.Check=\u68C0\u67E5\u4E2D...
RepositoryUpdateManager.Messages=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F \n \u53EF\u80FD\u8981\u5F88\u4E45.
RepositoryUpdateManager.Messages=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u53EF\u80FD\u8981\u5F88\u4E45\u3002
RepositoryUpdateManager.NoModificationTitle=\u6CA1\u6709\u9700\u8981\u7684\u4FEE\u6539
RepositoryUpdateManager.NoModificationMessages=\u6CA1\u6709\u66F4\u65B0\u6240\u9700\u7684\u4FEE\u6539\u3002
RepositoryUpdateManager.NotFoundMessages=\u6CA1\u6709\u53EF\u5BFB\u627E\u7684\u5173\u7CFB\u3002
RepositoryUpdateManager.NotFoundTitle=\u627E\u4E0D\u5230
RepositoryUpdateManager.RenameContextMessages=\u662F\u5426\u786E\u5B9A\u8981\u7ACB\u5373\u5C06\u91CD\u547D\u540D\u7684\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u7684\u4F5C\u4E1A\uFF1F \n\n \u5982\u7EE7\u7EED\uFF0C\u5219\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002\n\n \u5426\u5219\uFF0C\u65E7\u7684\u53D8\u91CF\u5C06\u53D8\u4E3A\u4F5C\u4E1A\u4E2D\u7684\u5185\u7F6E\u53D8\u91CF\u3002
RepositoryUpdateManager.RenameContextMessages=\u662F\u5426\u786E\u5B9A\u8981\u7ACB\u5373\u5C06\u91CD\u547D\u540D\u7684\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u7684\u4F5C\u4E1A\uFF1F\n\n \u5982\u679C\u662F\uFF0C\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002\n\n \u5982\u679C\u4E0D\u662F\uFF0C\u65E7\u7684\u53D8\u91CF\u5C06\u6539\u4E3A\u5185\u7F6E\u4E8E\u4F5C\u4E1A\u4E2D\u3002
RepositoryUpdateManager.RenameContextTitle=\u91CD\u547D\u540D\u95EE\u9898
RepositoryUpdateManager.ItemsToUpdate=\u68C0\u67E5\u8981\u66F4\u65B0\u7684\u9879\u76EE
RuleOperationChoiceDialog.editRules=\u7F16\u8F91\u89C4\u5219
@@ -410,7 +410,7 @@ OpenXSDFileDialog.cancel=\u53D6\u6D88
OpenXSDFileDialog.confirm=\u786E\u8BA4
OpenXSDFileDialog.fileName=\u6587\u4EF6\u540D:
OpenXSDFileDialog.xmlFileSelection=\u9009\u62E9\u8981\u9A8C\u8BC1\u7684 XML \u6587\u4EF6
OpenXSDFileDialog.xmlSelectedOrNot=\u7531\u4E8E\u60A8\u9009\u62E9\u4E86 XSD \u5143\u6570\u636E\u6587\u4EF6\uFF0C \n \u5E94\u8BE5\u6709\u4E00\u4E2A XML \u6587\u4EF6\u9700\u8981\u9A8C\u8BC1\u3002
OpenXSDFileDialog.xmlSelectedOrNot=\u7531\u4E8E\u60A8\u9009\u62E9\u4E86 XSD \u5143\u6570\u636E\u6587\u4EF6\uFF0C\n \u5E94\u8BE5\u6709\u4E00\u4E2A xml \u6587\u4EF6\u9700\u8981\u9A8C\u8BC1\u3002
repository.metadataFileBRMS=BRMS
repository.metadataFileBRMS.alias=BRMS
repository.jobscript=\u4F5C\u4E1A\u811A\u672C
@@ -453,7 +453,7 @@ TalendDataCollectorUploadingPreferencePage_UploadPeriod=\u4E0A\u4F20\u5468\u671F
TalendDataCollectorUploadingPreferencePage_Days=\u65E5
repository.servicesOperation=\u64CD\u4F5C
repository.servicesPort=\u7AEF\u53E3
RepositoryUpdateManager.MessagesForTDQ=\u662F\u5426\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u67D0\u4E9B\u5206\u6790\u4F9D\u8D56\u5173\u7CFB\u4F1A\u4E22\u5931\u4FE1\u606F\u3002\n\u53EF\u80FD\u8981\u5F88\u4E45.
RepositoryUpdateManager.MessagesForTDQ=\u662F\u5426\u8981\u5C06\u4FEE\u6539\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F\n\u67D0\u4E9B\u5206\u6790\u4F9D\u8D56\u5173\u7CFB\u4F1A\u4E22\u5931\u4FE1\u606F\u3002\n\u53EF\u80FD\u8981\u5F88\u4E45\u3002
EComponentCategory.executeJob=\u6267\u884C\u4F5C\u4E1A
EComponentCategory.monitoring=\u76D1\u63A7
BinRepositoryNode.label=\u56DE\u6536\u7AD9
@@ -530,7 +530,7 @@ RoutinesFunctionProposal.VariableName.v1=\u793A\u4F8B\uFF1A{3}\n\n
RoutinesFunctionProposal.User=\u7528\u6237
RoutinesFunctionProposal.System=\u7CFB\u7EDF
NodeReturnProposal.Description=\u63CF\u8FF0\uFF1A{0}
NodeReturnProposal.GlobalVariable=\n\n\u5168\u5C40\u53D8\u91CF\uFF0C\u7EC4\u4EF6\u5C5E\u6027 {1} [{2}].
NodeReturnProposal.GlobalVariable=\n\n\u5168\u5C40\u53D8\u91CF\uFF0C\u7EC4\u4EF6 {1} [{2}] \u7684\u5C5E\u6027\u3002
NodeReturnProposal.Type=\n\u7C7B\u578B\uFF1A {3}
NodeReturnProposal.Availability=\n\u53EF\u7528\u6027\uFF1A {4}
NodeReturnProposal.VariableName=\n\n\u53D8\u91CF\u540D\uFF1A {5}
@@ -553,7 +553,7 @@ ContextTreeValuesComposite.Menu=\u83DC\u5355
ContextMissSettingComposite.missingModuleMessages=\u8FD9\u4E2A\u4E0A\u4E0B\u6587\u89C6\u56FE\u9700\u8981 \u5B89\u88C5\u4E00\u4E2A\u5916\u90E8jar
ContextMissSettingComposite.installName=\u5B89\u88C5
ContextMissSettingComposite.Title_Missing_jars_for_plugin=\u7F3A\u5C11\u7B2C\u4E09\u65B9\u5E93
ContextMissSettingComposite.description_jars_to_be_installed_in=Studio \u8981\u6C42\u5B89\u88C5\u7B2C\u4E09\u65B9\u4F9D\u8D56\u5E93\u3002\n\u8BF7\u5728\u5173\u95ED\u6B64\u7A97\u53E3\u524D\u5B89\u88C5\u4EE5\u4E0B jar \u5305\u3002
ContextMissSettingComposite.description_jars_to_be_installed_in=Studio \u8981\u6C42\u5B89\u88C5\u7B2C\u4E09\u65B9\u5E93\uFF0C\n\u8BF7\u5728\u5173\u95ED\u6B64\u7A97\u53E3\u524D\u5B89\u88C5\u4EE5\u4E0B jar\u3002
ContextTreeTable.AddToBuildIn_label=\u6DFB\u52A0\u5230\u6784\u5EFA\u4E2D
ContextTreeTable.AddToRepository_label=\u6DFB\u52A0\u5230\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587
ContextNebulaComposite.ContextsUnAvailable=\u4E0A\u4E0B\u6587\u89C6\u56FE\u4E0D\u53EF\u7528
@@ -580,5 +580,4 @@ I18nPreferencePage.restartButton=\u91CD\u542F\u540E\u751F\u6548\u3002
I18nPreferencePage.restoreDefault=\u6062\u590D\u9ED8\u8BA4\u8BBE\u7F6E
I18nPreferencePage.wait_process=\u8FD9\u4E2A\u8FC7\u7A0B\u5C06\u6301\u7EED\u51E0\u5206\u949F\u65F6\u95F4\uFF0C\u8BF7\u7A0D\u5019...
MetadataPreferencePage.EnableBasic.name=\u542F\u7528\u57FA\u672C\u8EAB\u4EFD\u9A8C\u8BC1\u6807\u5934
MetadataPreferencePage.MessageDialog.Restart=\u6B64\u8BBE\u7F6E\u5C06\u5728 Studio \u91CD\u542F\u540E\u751F\u6548\u3002\n\u662F\u5426\u786E\u5B9A\uFF1F
TalendTabbedPropertyTitle.componentHelpTooltip=\u6253\u5F00\u5728\u7EBF\u5E2E\u52A9
MetadataPreferencePage.MessageDialog.Restart=\u6B64\u8BBE\u7F6E\u5C06\u5728 Studio \u91CD\u542F\u540E\u751F\u6548\u3002\n\u662F\u5426\u786E\u5B9A\u91CD\u542F\uFF1F

View File

@@ -636,7 +636,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
visibleItemCount = 20;
}
contextsCombo.setVisibleItemCount(visibleItemCount);
contextsCombo.getParent().getParent().pack();
}
private void checkContextGroupSource() {

View File

@@ -144,7 +144,7 @@ public class ContextTreeTable {
private IContextModelManager manager;
private final static int fixedCheckBoxWidth = 90;
private final static int fixedCheckBoxWidth = 30;
private final static int fixedTypeWidth = 90;
@@ -341,6 +341,7 @@ public class ContextTreeTable {
private void attachCheckColumnTip(NatTable nt) {
DefaultToolTip toolTip = new ContextNatTableToolTip(nt);
toolTip.setBackgroundColor(natTable.getDisplay().getSystemColor(7));
toolTip.setPopupDelay(500);
toolTip.activate();
toolTip.setShift(new Point(10, 10));
@@ -594,7 +595,7 @@ public class ContextTreeTable {
// the columns after "type" will caculated by the contexts
// 0=Name,1=Type,2=Comment.
int j = 3;
for (IContext context : contexts) {
for (int i = 0; i < contexts.size(); i++) {
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CONTEXT_VALUE });
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CHECK_PROPERTY });
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_PROMPT_PROPERTY });

View File

@@ -23,9 +23,9 @@ public class ContextTableConstants {
public static final String COLUMN_COMMENT_PROPERTY = "Comment"; //$NON-NLS-1$
public static final String COLUMN_CHECK_PROPERTY = "Enable prompt"; //$NON-NLS-1$
public static final String COLUMN_CHECK_PROPERTY = ""; //$NON-NLS-1$
public static final String COLUMN_PROMPT_PROPERTY = "Prompt label"; //$NON-NLS-1$
public static final String COLUMN_PROMPT_PROPERTY = "Prompt"; //$NON-NLS-1$
public static final String COLUMN_CONTEXT_VALUE = "Value"; //$NON-NLS-1$

View File

@@ -172,10 +172,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
@Override
public boolean isEditable(int columnIndex, int rowIndex) {
if (columnIndex == 4) {
// active the prompt when export as context
return true;
}
if (modelManager != null && modelManager.isReadOnly()) {
return false;
}

View File

@@ -19,9 +19,6 @@ import java.util.List;
import java.util.Map;
import org.dom4j.Element;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.components.EComponentType;
import org.talend.core.model.genhtml.HTMLDocUtils;
import org.talend.core.model.genhtml.IHTMLDocConstants;
import org.talend.core.model.process.EComponentCategory;
@@ -30,9 +27,7 @@ import org.talend.core.model.process.IComponentDocumentation;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.utils.ParameterValueUtil;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.designer.core.IDesignerCoreService;
/**
@@ -108,64 +103,13 @@ public class ExternalNodeComponentHandler extends AbstractComponentHandler {
for (INode externalNode : this.componentsList) {
Element componentElement = generateComponentDetailsInfo(true, externalNode, this.externalNodeElement,
this.picFilePathMap, this.sourceConnectionMap, this.targetConnectionMap,
this.repositoryDBIdAndNameMap);
this.picFilePathMap, this.sourceConnectionMap, this.targetConnectionMap, this.repositoryDBIdAndNameMap);
String componentName = externalNode.getUniqueName();
IComponentDocumentation componentDocumentation = externalNode.getExternalNode().getComponentDocumentation(
componentName, HTMLDocUtils.getTmpFolder() /* checkExternalPathIsExists(tempFolderPath) */);
if (EComponentType.JOBLET == externalNode.getComponent().getComponentType()) {
String jobletName = externalNode.getComponent().getProcess().getName();
String version = externalNode.getComponent().getProcess().getVersion();
componentElement.addAttribute("joblet", HTMLDocUtils.checkString(jobletName));
// ../b/b_0.1.html
String href = "../" + jobletName + "/" + jobletName + "_" + version + ".html";
componentElement.addAttribute("href", HTMLDocUtils.checkString(href));
}
if (EComponentType.EMF == externalNode.getComponent().getComponentType()
&& externalNode.getElementParameter("SELECTED_JOB_NAME") != null) {
IElementParameter elp = externalNode.getElementParameter("SELECTED_JOB_NAME");
String cjobName = (String) elp.getValue();
componentElement.addAttribute("joblet", HTMLDocUtils.checkString(cjobName));
Map<String, IElementParameter> childParameters = elp.getChildParameters();
String version = null;
String processId = null;
if (childParameters != null) {
IElementParameter processElementId = childParameters.get("PROCESS_TYPE_PROCESS");
if (processElementId != null) {
processId = (String) processElementId.getValue();
}
IElementParameter versionElement = childParameters.get("PROCESS_TYPE_VERSION");
if (versionElement != null) {
version = (String) versionElement.getValue();
if ("Latest".equals(version) && processId != null) {
try {
IRepositoryViewObject rep = ProxyRepositoryFactory.getInstance()
.getLastVersion(processId);
if (rep != null) {
version = rep.getProperty().getVersion();
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
}
}
}
if (version == null) {
version = "0.1";
ExceptionHandler.log("The property of sbujob is missing");
}
String href = "../" + cjobName + "/" + cjobName + "_" + version + ".html";
componentElement.addAttribute("href", HTMLDocUtils.checkString(href));
}
// Checks if generating html file for external node failed, generating the same
// information as internal node
// Checks if generating html file for external node failed, generating the same information as internal node
// instead.
if (componentDocumentation == null) {
Element parametersElement = componentElement.addElement("parameters"); //$NON-NLS-1$

View File

@@ -18,17 +18,13 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.genhtml.HTMLDocUtils;
import org.talend.core.model.genhtml.IHTMLDocConstants;
import org.talend.core.model.process.EParameterFieldType;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.utils.ParameterValueUtil;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.designer.core.IDesignerCoreService;
@@ -92,58 +88,11 @@ public class InternalNodeComponentHandler extends AbstractComponentHandler {
*/
@Override
public void generateComponentInfo() {
for (INode node : this.componentsList) {
Element componentElement = generateComponentDetailsInfo(false, node, this.internalNodeElement,
this.picFilePathMap, this.sourceConnectionMap, this.targetConnectionMap,
this.repositoryDBIdAndNameMap);
Element componentElement = generateComponentDetailsInfo(false, node, this.internalNodeElement, this.picFilePathMap,
this.sourceConnectionMap, this.targetConnectionMap, this.repositoryDBIdAndNameMap);
CoreRuntimePlugin.getInstance().getRepositoryService().setInternalNodeHTMLMap(node, internalNodeHTMLMap);
boolean istRunJob = node.getComponent().getName().equals("tRunJob"); //$NON-NLS-1$
if (istRunJob) {
String version = null;
String processId = null;
IElementParameter processElement = node.getElementParameter("PROCESS");
if (processElement != null) {
Map<String, IElementParameter> childParameters = processElement.getChildParameters();
if (childParameters != null) {
IElementParameter processElementId = childParameters.get("PROCESS_TYPE_PROCESS");
if (processElementId != null) {
processId = (String) processElementId.getValue();
}
IElementParameter versionElement = childParameters.get("PROCESS_TYPE_VERSION");
if (versionElement != null) {
version = (String) versionElement.getValue();
if ("Latest".equals(version) && processId != null) {
try {
IRepositoryViewObject rep = ProxyRepositoryFactory.getInstance()
.getLastVersion(processId);
if (rep != null) {
version = rep.getProperty().getVersion();
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
}
}
}
}
if (version == null) {
version = "0.1";
ExceptionHandler.log("The property of sbujob is missing");
}
componentElement.addAttribute("job", HTMLDocUtils.checkString(node.getLabel()));
// ../b/b_0.1.html
if (processElement != null && processElement.getValue() != null) {
String processName = processElement.getValue().toString();
String href = "../" + processName + "/" + processName + "_" + version + ".html";
componentElement.addAttribute("href", HTMLDocUtils.checkString(href));
}
}
generateComponentElemParamters(node, componentElement);
}
}
@@ -156,9 +105,10 @@ public class InternalNodeComponentHandler extends AbstractComponentHandler {
*/
protected void generateComponentElemParamters(INode node, Element componentElement) {
Element parametersElement = componentElement.addElement("parameters"); //$NON-NLS-1$
List elementParameterList = node.getElementParameters();
boolean istRunJob = node.getComponent().getName().equals("tRunJob"); //$NON-NLS-1$
generateComponentElementParamInfo(istRunJob, parametersElement, elementParameterList, node);
generateComponentSchemaInfo(node, componentElement);

View File

@@ -15,8 +15,8 @@ package org.talend.core.ui.preference.collector;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.service.IRemoteService;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
/**
* ggu class global comment. Detailled comment
@@ -33,7 +33,7 @@ public class TalendDataCollectorPreferenceInitializer extends AbstractPreference
IPreferenceStore preferenceStore = CoreUIPlugin.getDefault().getPreferenceStore();
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_UPLOAD_PERIOD, 5);
if(IRemoteService.get().isCloudConnection()) {
if(IBrandingService.get().isCloudLicense()) {
preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
}
}

View File

@@ -24,8 +24,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.service.IRemoteService;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.core.ui.i18n.Messages;
import org.talend.core.ui.token.TokenCollectorFactory;
@@ -47,7 +47,7 @@ public class TalendDataCollectorPreferencePage extends FieldEditorPreferencePage
@Override
protected void createFieldEditors() {
if(!IRemoteService.get().isCloudConnection()) {
if(!IBrandingService.get().isCloudLicense()) {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED,
Messages.getString("TalendDataCollectorPreferencePage_EnableCapture"), getFieldEditorParent())); //$NON-NLS-1$
}

View File

@@ -24,6 +24,7 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.views.properties.tabbed.ITabItem;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
@@ -128,14 +129,6 @@ public class HorizontalTabFactory {
title.setTitleImage(image);
}
public void setHelpComponentName(String componentName) {
title.setComponentName(componentName);
}
public TalendTabbedPropertyTitle getTabbedPropertyTitle() {
return title;
}
/**
* yzhang HorizontalTabFactory class global comment. Detailled comment <br/>
*

View File

@@ -12,14 +12,11 @@
// ============================================================================
package org.talend.core.ui.properties.tab;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
@@ -30,16 +27,9 @@ import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.i18n.Messages;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.themes.core.elements.stylesettings.TalendTabbedPropertyColorHelper;
import org.talend.themes.core.elements.widgets.ITalendTabbedPropertyTitleWidget;
@@ -54,16 +44,6 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
private Image image = null;
private String text = null;
private ToolItem helpLabel;
private String componentName;
private Composite titleLabelComp;
private Composite helpComp;
private boolean isComponentTitle;
private static final String BLANK = ""; //$NON-NLS-1$
@@ -91,10 +71,8 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
public void paintControl(PaintEvent e) {
if (image == null && (text == null || text.equals(BLANK))) {
label.setVisible(false);
helpComp.setVisible(false);
} else {
label.setVisible(true);
helpComp.setVisible(isComponentTitle && StringUtils.isNotBlank(componentName));
drawTitleBackground(e);
}
}
@@ -118,70 +96,25 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
}
font = JFaceResources.getFont(TITLE_FONT);
titleLabelComp = new Composite(this, SWT.None);
FormData compData = new FormData();
compData.left = new FormAttachment(0, 0);
compData.top = new FormAttachment(0, 0);
compData.right = new FormAttachment(100, 0);
compData.bottom = new FormAttachment(100, 0);
titleLabelComp.setLayoutData(compData);
titleLabelComp.setLayout(new FormLayout());
label = factory.createCLabel(titleLabelComp, BLANK);
label = factory.createCLabel(this, BLANK);
if (colorHelper.getTitleBackground() == null) {
label.setBackground(new Color[] { factory.getColors().getColor(IFormColors.H_GRADIENT_END),
factory.getColors().getColor(IFormColors.H_GRADIENT_START) }, new int[] { 100 }, true);
} else {
label.setBackground(colorHelper.getTitleBackground());
}
label.setFont(font);
label.setForeground(colorHelper.getTitleForeground());
FormData data = new FormData();
data.left = new FormAttachment(0, 0);
data.top = new FormAttachment(0, 0);
data.right = new FormAttachment(100, -25);
data.right = new FormAttachment(100, 0);
data.bottom = new FormAttachment(100, 0);
label.setLayoutData(data);
helpComp = new Composite(titleLabelComp, SWT.None);
FormData helpFormData = new FormData();
helpFormData.top = new FormAttachment(50, -12);
helpFormData.right = new FormAttachment(100, 0);
helpFormData.bottom = new FormAttachment(50, 12);
helpFormData.left = new FormAttachment(100, -25);
helpComp.setLayoutData(helpFormData);
helpComp.setLayout(new FormLayout());
ToolBar toolBar = new ToolBar(helpComp, SWT.CENTER | SWT.NO_FOCUS);
FormData toolBarData = new FormData();
toolBarData.left = new FormAttachment(0, 0);
toolBarData.top = new FormAttachment(0, 0);
toolBarData.right = new FormAttachment(100, 0);
toolBarData.bottom = new FormAttachment(100, 0);
helpLabel = new ToolItem(toolBar, SWT.CHECK | SWT.CENTER);
helpLabel.setImage(ImageProvider.getImage(EImage.HELP_ICON));
helpLabel.setToolTipText(Messages.getString("TalendTabbedPropertyTitle.componentHelpTooltip"));
helpLabel.setSelection(false);
helpLabel.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (StringUtils.isNotBlank(componentName)
&& GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService service = GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
if (service != null) {
service.openComponentOnlineHelp(componentName);
}
}
helpLabel.setSelection(false);
}
});
helpComp.setVisible(false);
if (colorHelper.getTitleBackground() == null) {
label.setBackground(new Color[] { factory.getColors().getColor(IFormColors.H_GRADIENT_END),
factory.getColors().getColor(IFormColors.H_GRADIENT_START) }, new int[] { 100 }, true);
titleLabelComp.setBackground(factory.getColors().getColor(IFormColors.H_GRADIENT_START));
helpComp.setBackground(factory.getColors().getColor(IFormColors.H_GRADIENT_START));
} else {
label.setBackground(colorHelper.getTitleBackground());
titleLabelComp.setBackground(colorHelper.getTitleBackground());
helpComp.setBackground(colorHelper.getTitleBackground());
}
/*
* setImage(PlatformUI.getWorkbench().getSharedImages().getImage( ISharedImages.IMG_OBJ_ELEMENT));
*/
}
/**
@@ -192,12 +125,8 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
if (colorHelper.getTitleBackground() == null) {
label.setBackground(new Color[] { factory.getColors().getColor(IFormColors.H_GRADIENT_END),
factory.getColors().getColor(IFormColors.H_GRADIENT_START) }, new int[] { 100 }, true);
titleLabelComp.setBackground(factory.getColors().getColor(IFormColors.H_GRADIENT_START));
helpComp.setBackground(factory.getColors().getColor(IFormColors.H_GRADIENT_START));
} else {
label.setBackground(colorHelper.getTitleBackground());
titleLabelComp.setBackground(colorHelper.getTitleBackground());
helpComp.setBackground(colorHelper.getTitleBackground());
}
Color bg = factory.getColors().getColor(IFormColors.H_GRADIENT_END);
Color gbg = factory.getColors().getColor(IFormColors.H_GRADIENT_START);
@@ -229,7 +158,6 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
label.setText(text);
} else {
label.setText(BLANK);
componentName = null;
}
label.setImage(image);
redraw();
@@ -241,14 +169,6 @@ public class TalendTabbedPropertyTitle extends Composite implements ITalendTabbe
redraw();
}
public void setComponentName(String componentName) {
this.componentName = componentName;
}
public void setIsComponentTitle(boolean isComponentTitle) {
this.isComponentTitle = isComponentTitle;
}
@Override
public TalendTabbedPropertyColorHelper getColorHelper() {
return this.colorHelper;

View File

@@ -16,7 +16,6 @@ import java.text.MessageFormat;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.fieldassist.IContentProposal;
import org.talend.commons.utils.PasswordEncryptUtil;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.utils.ContextParameterUtils;
@@ -77,15 +76,11 @@ public class ContextParameterProposal implements IContentProposal {
} else {
desc = Messages.getString("ContextParameterProposal.NoCommentAvaiable"); //$NON-NLS-1$
}
String type = contextParameter.getType();
String value = contextParameter.getValue();
if (PasswordEncryptUtil.isPasswordType(type)) {
value = "******"; //$NON-NLS-1$
}
// TDI-30683:fix the NPE pb and another description match pb(need move "\n" from message.propreties to code).
MessageFormat format = new MessageFormat(getDescriptionMessagePattern());
if (contextParameter.getContext() != null) {
Object[] replaceArgs = new Object[] { desc, contextParameter.getContext().getName(), type, value };
Object[] replaceArgs = new Object[] { desc, contextParameter.getContext().getName(), contextParameter.getType(),
contextParameter.getValue() };
return format.format(replaceArgs);
}
return desc;

View File

@@ -2,7 +2,6 @@ package org.talend.core.ui.services;
import java.io.Serializable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
@@ -27,8 +26,6 @@ public interface IGitUIProviderService extends IService {
public void openPushFailedDialog(Object pushResult);
boolean migrateOption(IProgressMonitor monitor, String newVersion, boolean hasUpdate) throws Exception;
public static IGitUIProviderService get() {
GlobalServiceRegister register = GlobalServiceRegister.getDefault();
if (!register.isServiceRegistered(IGitUIProviderService.class)) {

View File

@@ -162,7 +162,7 @@ RuleOperationChoiceDialog.editRules=\u00C9diter les r\u00E8gles
RuleOperationChoiceDialog.rule=R\u00E8gle :
RuleOperationChoiceDialog.selectRulesFile=S\u00E9lectionner une r\u00E8gle depuis un fichier
RuleOperationChoiceDialog.viewRules=Voir les r\u00E8gles (lecture seule)
SelectRepositoryContextDialog.DeselectAll=Tout d\u00E9s\u00E9lectionner
SelectRepositoryContextDialog.DeselectAll=D\u00E9s\u00E9lectionner tout
SelectRepositoryContextDialog.CollapseAll=Tout r\u00E9duire
SelectRepositoryContextDialog.DuplicationMessage=Vous avez s\u00E9lectionn\u00E9 la variable "{0}" dans le contexte "{1}".
SelectRepositoryContextDialog.DuplicationTitle=Avertissement de duplication !

View File

@@ -152,12 +152,12 @@ RepositoryUpdateManager.Title=\u5909\u66F4
RepositoryUpdateManager.Check=\u30C1\u30A7\u30C3\u30AF\u4E2D...
RepositoryUpdateManager.Messages=\u3053\u306E\u30A2\u30A4\u30C6\u30E0\u3067\u884C\u308F\u308C\u308B\u5909\u66F4\u306B\u5F71\u97FF\u3055\u308C\u308B\u30B8\u30E7\u30D6\u3092\u3059\u3079\u3066\u691C\u51FA\u3057\u307E\u3059\u304B? \u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
RepositoryUpdateManager.NoModificationTitle=\u5909\u66F4\u4E0D\u8981
RepositoryUpdateManager.NoModificationMessages=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NoModificationMessages=\u66F4\u65B0\u306B\u5FC5\u8981\u306A\u5909\u66F4\u304C\u3042\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundMessages=\u95A2\u4FC2\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
RepositoryUpdateManager.NotFoundTitle=\u898B\u3064\u304B\u308A\u307E\u305B\u3093
RepositoryUpdateManager.RenameContextMessages=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextMessages=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \n\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
RepositoryUpdateManager.RenameContextTitle=\u540D\u524D\u5909\u66F4\u306E\u8CEA\u554F
RepositoryUpdateManager.ItemsToUpdate=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RepositoryUpdateManager.ItemsToUpdate=\u66F4\u65B0\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u3092\u30C1\u30A7\u30C3\u30AF
RuleOperationChoiceDialog.editRules=\u30EB\u30FC\u30EB\u3092\u7DE8\u96C6
RuleOperationChoiceDialog.rule=\u30EB\u30FC\u30EB:
RuleOperationChoiceDialog.selectRulesFile=\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30EB\u30FC\u30EB\u3092\u9078\u629E
@@ -192,8 +192,8 @@ EUpdateItemType.Components=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
EUpdateItemType.Name=\u540D\u524D
EUpdateItemType.JobVersion=\u30B8\u30E7\u30D6\u30D0\u30FC\u30B8\u30E7\u30F3
EUpdateResult.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30E2\u30FC\u30C9\u306B\u5909\u66F4
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
EUpdateResult.JobletUpdate=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u30CE\u30FC\u30C9\u306E\u66F4\u65B0
EUpdateResult.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u66F4\u65B0
EUpdateResult.Reload=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30EA\u30ED\u30FC\u30C9
EUpdateResult.Rename=\u540D\u524D\u3092\u5909\u66F4
EUpdateResult.Add=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u306B\u8FFD\u52A0

View File

@@ -155,7 +155,7 @@ RepositoryUpdateManager.NoModificationTitle=\u6CA1\u6709\u9700\u8981\u7684\u4FEE
RepositoryUpdateManager.NoModificationMessages=\u6CA1\u6709\u66F4\u65B0\u6240\u9700\u7684\u4FEE\u6539\u3002
RepositoryUpdateManager.NotFoundMessages=\u6CA1\u6709\u53EF\u5BFB\u627E\u7684\u5173\u7CFB\u3002
RepositoryUpdateManager.NotFoundTitle=\u627E\u4E0D\u5230
RepositoryUpdateManager.RenameContextMessages=\u662F\u5426\u786E\u5B9A\u8981\u628A\u91CD\u547D\u540D\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u4F5C\u4E1A\uFF1F \n\n \u5982\u7EE7\u7EED\uFF0C\u5219\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002\n\n \u5426\u5219\uFF0C\u65E7\u7684\u53D8\u91CF\u5C06\u53D8\u4E3A\u4F5C\u4E1A\u4E2D\u7684\u5185\u7F6E\u53D8\u91CF\u3002
RepositoryUpdateManager.RenameContextMessages=\u662F\u5426\u786E\u5B9A\u8981\u7ACB\u5373\u5C06\u91CD\u547D\u540D\u7684\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u7684\u4F5C\u4E1A\uFF1F\n\n \u5982\u679C\u662F\uFF0C\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002\n\n \u5982\u679C\u4E0D\u662F\uFF0C\u65E7\u7684\u53D8\u91CF\u5C06\u6539\u4E3A\u5185\u7F6E\u4E8E\u4F5C\u4E1A\u4E2D\u3002
RepositoryUpdateManager.RenameContextTitle=\u91CD\u547D\u540D\u95EE\u9898
RepositoryUpdateManager.ItemsToUpdate=\u68C0\u67E5\u8981\u66F4\u65B0\u7684\u9879\u76EE
RuleOperationChoiceDialog.editRules=\u7F16\u8F91\u89C4\u5219

View File

@@ -12,10 +12,21 @@
// ============================================================================
package org.talend.core;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -30,12 +41,15 @@ import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.exception.SystemException;
import org.talend.commons.runtime.xml.XmlUtil;
import org.talend.commons.ui.runtime.image.OverlayImageProvider;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.model.general.LibraryInfo;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.ColumnNameChanged;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.MetadataToolHelper;
import org.talend.core.model.metadata.QueryUtil;
import org.talend.core.model.metadata.builder.ConvertionHelper;
@@ -63,9 +77,16 @@ import org.talend.designer.codegen.ITalendSynchronizer;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.repository.ProjectManager;
import org.talend.repository.RepositoryWorkUnit;
import org.talend.repository.model.RepositoryConstants;
import org.talend.utils.xml.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* DOC Administrator class global comment. Detailled comment
@@ -329,15 +350,120 @@ public class CoreService implements ICoreService {
}
@Override
@Deprecated
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject) {
//
try {
if (talendJavaProject == null) {
return;
}
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
File mappingSource = new File(url.getPath());
FilenameFilter filter = new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
if (XmlUtil.isXMLFile(name)) {
return true;
}
return false;
}
};
for (File file : mappingSource.listFiles(filter)) {
String targetName = getTargetName(file);
IFile targetFile = xmlMappingFolder.getFile(targetName);
copyFile(file, targetFile);
}
}
} catch (CoreException e) {
ExceptionHandler.process(e);
} catch (IOException e) {
ExceptionHandler.process(e);
} catch (SystemException e) {
ExceptionHandler.process(e);
}
}
@Override
@Deprecated
public void syncMappingsFileFromSystemToProject() {
//
RepositoryWorkUnit workUnit = new RepositoryWorkUnit("Sync mapping files from system to project") { //$NON-NLS-1$
@Override
protected void run() throws LoginException, PersistenceException {
try {
File sysMappingfolder = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()).getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
if (!projectMappingFolder.exists()) {
projectMappingFolder.create(true, true, null);
}
for (File in : sysMappingfolder.listFiles()) {
IFile out = projectMappingFolder.getFile(in.getName());
copyFile(in, out);
}
} catch (SystemException | CoreException | IOException e) {
ExceptionHandler.process(e);
}
}
};
workUnit.setAvoidUnloadResources(true);
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
}
public String getTargetName(File file) {
String targetName = file.getName();
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 void copyFile(File in, IFile out) throws CoreException, IOException {
FileInputStream fis = new FileInputStream(in);
if (out.exists()) {
out.setContents(fis, true, false, null);
} else {
out.create(fis, true, null);
}
fis.close();
}
@Override

View File

@@ -87,9 +87,7 @@ public interface ICoreTisService extends IService {
boolean hasNewPatchInPatchesFolder();
boolean isDefaultLicenseAndProjectType();
void syncProjectUpdateSettingsFromServer(IProgressMonitor monitor, Project proj) throws Exception;
void refreshPatchesFolderCache();
static ICoreTisService get() {

View File

@@ -10,7 +10,7 @@
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.service;
package org.talend.core.services;
import java.io.File;
import java.text.ParseException;
@@ -76,17 +76,7 @@ public interface IDetectCVEService extends IService {
*/
ImpactedItem detect(Item item, Set<CVEData> datas, boolean includeNotFixed);
/**
* Persist final cve report
* @param impactedItems impacted items
* @param reportFile - report file path
*/
void writeReport(List<ImpactedItem> impactedItems, File reportFile);
/**
* Clear CVE cache
*/
void clearCache();
public static String mavenUri2GAV(String uri) {
if (MavenUrlHelper.isMvnUrl(uri)) {
@@ -94,11 +84,7 @@ public interface IDetectCVEService extends IService {
if (art == null) {
return null;
}
String gavc = String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
if (!StringUtils.isEmpty(art.getClassifier())) {
gavc += ":" + art.getClassifier();
}
return gavc;
return String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
}
return null;
}
@@ -116,8 +102,6 @@ public interface IDetectCVEService extends IService {
private String a;
private String v;
private String c;
/**
* @return the g
@@ -161,28 +145,8 @@ public interface IDetectCVEService extends IService {
this.v = v;
}
/**
* @return the c
*/
public String getC() {
return c;
}
/**
* @param c the c to set
*/
public void setC(String c) {
this.c = c;
}
public String getGAVString() {
String gav = String.format("%s:%s:%s", g, a, v);
if (!StringUtils.isEmpty(c)) {
gav += ":" + c;
}
return gav;
return String.format("%s:%s:%s", g, a, v);
}
public String getGA() {
@@ -194,16 +158,13 @@ public interface IDetectCVEService extends IService {
return null;
}
String[] gavs = gav.split(":");
if (gavs.length < 3) {
if (gavs.length != 3) {
return null;
}
GAV ret = new GAV();
ret.setG(gavs[0]);
ret.setA(gavs[1]);
ret.setV(gavs[2]);
if (gavs.length > 3) {
ret.setC(gavs[3]);
}
return ret;
}
@@ -213,7 +174,19 @@ public interface IDetectCVEService extends IService {
}
String gav = mavenUri2GAV(mavenURI);
return parseFromGAV(gav);
if (StringUtils.isEmpty(gav)) {
return null;
}
String[] gavs = gav.split(":");
if (gavs.length != 3) {
return null;
}
GAV ret = new GAV();
ret.setG(gavs[0]);
ret.setA(gavs[1]);
ret.setV(gavs[2]);
return ret;
}
public GAV clone() throws CloneNotSupportedException {
@@ -241,12 +214,6 @@ public interface IDetectCVEService extends IService {
sb.append(v);
sb.append(",");
}
if (!StringUtils.isEmpty(c)) {
sb.append("c:");
sb.append(c);
sb.append(",");
}
if (sb.lastIndexOf(",") > 0) {
sb.deleteCharAt(sb.length() - 1);
@@ -268,9 +235,6 @@ public interface IDetectCVEService extends IService {
if (!StringUtils.isEmpty(v)) {
hash += hash * 31 + v.hashCode();
}
if (!StringUtils.isEmpty(c)) {
hash += hash * 31 + c.hashCode();
}
return hash;
}
@@ -293,12 +257,8 @@ public interface IDetectCVEService extends IService {
if (!StringUtils.equals(a, gav.getA())) {
return false;
}
if (!StringUtils.equals(v, gav.getV())) {
return false;
}
return StringUtils.equals(c, gav.getC());
return StringUtils.equals(v, gav.getV());
}

View File

@@ -59,6 +59,7 @@ import org.talend.commons.utils.generation.JavaUtils;
import org.talend.commons.utils.time.TimeMeasure;
import org.talend.core.CorePlugin;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.ITDQItemService;
import org.talend.core.PluginChecker;
import org.talend.core.context.Context;
@@ -88,7 +89,6 @@ import org.talend.core.model.process.JobInfo;
import org.talend.core.model.process.ProcessUtils;
import org.talend.core.model.process.ReplaceNodesInProcessProvider;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.Property;
import org.talend.core.model.relationship.RelationshipItemBuilder;
@@ -101,11 +101,13 @@ import org.talend.core.model.routines.CodesJarInfo;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.maven.MavenConstants;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.runtime.process.LastGenerationInfo;
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.core.runtime.repository.build.BuildExportManager;
import org.talend.core.runtime.services.IDesignerMavenService;
import org.talend.core.service.IResourcesDependenciesService;
@@ -136,6 +138,8 @@ public class ProcessorUtilities {
private static Logger log = Logger.getLogger(ProcessorUtilities.class);
public static final String PROP_MAPPINGS_URL = "talend.mappings.url"; //$NON-NLS-1$
/**
* For generating code in CI without param -pl
*/
@@ -690,7 +694,6 @@ public class ProcessorUtilities {
processor.setArguments(argumentsMap);
handelDQComponents(selectedProcessItem, currentProcess);
// generate the code of the father after the childrens
// so the code won't have any error during the check, and it will help to check
// if the generation is really needed.
@@ -706,8 +709,6 @@ public class ProcessorUtilities {
*/
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
checkNeedExportItemsForDQ(currentProcess);
copyDependenciedResources(currentProcess);
return processor;
@@ -729,10 +730,30 @@ public class ProcessorUtilities {
boolean hasDynamicMetadata = hasMetadataDynamic(currentProcess, jobInfo);
LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), hasDynamicMetadata);
if (hasDynamicMetadata) {
ITalendProcessJavaProject talendJavaProject = jobInfo.getProcessor().getTalendJavaProject();
if (talendJavaProject != null) {
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
MetadataTalendType.syncMappingFiles(xmlMappingFolder.getLocation().toFile(), true);
try {
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
if (url != null) {
// set the project mappings url
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
IFolder xmlMappingFolder = jobInfo.getProcessor().getTalendJavaProject().getResourceSubFolder(null,
JavaUtils.JAVA_XML_MAPPING);
ProjectPreferenceManager manager = CoreRuntimePlugin.getInstance().getProjectPreferenceManager();
boolean updated = manager.getBoolean(MetadataTalendType.UPDATED_MAPPING_FILES);
if ((xmlMappingFolder.members().length == 0 || updated)
&& GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
ICoreService coreService =
GlobalServiceRegister.getDefault().getService(ICoreService.class);
coreService.synchronizeMapptingXML(jobInfo.getProcessor().getTalendJavaProject());
// reset
if (updated) {
manager.setValue(MetadataTalendType.UPDATED_MAPPING_FILES, false);
manager.save();
}
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
}
@@ -1233,8 +1254,6 @@ public class ProcessorUtilities {
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
TimeMeasure.step(idTimer, "generateBuildInfo");
checkNeedExportItemsForDQ(currentProcess);
copyDependenciedResources(currentProcess);
return processor;
@@ -1334,34 +1353,11 @@ public class ProcessorUtilities {
}
}
/**
* if the job includes tdqReportRun, set 'needExportItemsForDQ'to true so as the item folder can be exported
*
* @param processItem
* @param currentProcess
*/
private static void checkNeedExportItemsForDQ(IProcess currentProcess) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQItemService.class)) {
ITDQItemService tdqItemService =
GlobalServiceRegister.getDefault().getService(ITDQItemService.class);
// TDQ-19637 if it includes 'tDqReportRun',must export item folder
if (tdqItemService != null && !needExportItemsForDQ) {
for (INode node : currentProcess.getGeneratingNodes()) {
String componentName = node.getComponent().getName();
if ("tDqReportRun".equals(componentName)) {
needExportItemsForDQ = true;
break;
}
}
}
}
}
/**
*
* Specail operation for DQ components:
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to
* '.Java/src/resources'
* - For tdqReportRun, set 'needExportItemsForDQ'to true so as the item folder can be exported
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
*
* @param processItem
*/
@@ -1373,6 +1369,16 @@ public class ProcessorUtilities {
return;
}
try {
// TDQ-19637 if it includes 'tDqReportRun',must export item folder
if (!needExportItemsForDQ) {
for (INode node : currentProcess.getGeneratingNodes()) {
String componentName = node.getComponent().getName();
if ("tDqReportRun".equals(componentName)) {
needExportItemsForDQ = true;
break;
}
}
}
/* 1.TDQ-12474 copy the "metadata/survivorship/rulePackage" to ".Java/src/main/resources/". so that it will be
used by maven command 'include-survivorship-rules' to export.
2.TDQ-14308 current drools file in 'src/resourcesmetadata/survivorship/' should be included to job jar.
@@ -1928,6 +1934,12 @@ public class ProcessorUtilities {
private static void updateCodeSources() throws ProcessorException {
if (isRemoteProject()) {
// TESB-29071
try {
ProxyRepositoryFactory.getInstance().initialize();
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.ROUTINES);
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.BEANS);
}
@@ -2493,13 +2505,6 @@ public class ProcessorUtilities {
ExceptionHandler.process(e);
}
}
// TUP-35219 avoid resource unload
if (property != null && property.getItem() != null
&& property.getItem() instanceof JobletProcessItem) {
((JobletProcessItem) property.getItem()).getJobletProcess();
}
JobInfo jobInfo = new JobInfo(property, jobletProcess.getDefaultContext());
if (!jobInfos.contains(jobInfo)) {
jobInfos.add(jobInfo);

View File

@@ -89,7 +89,7 @@ _UI_Column_type=\u30AB\u30E9\u30E0
_UI_Procedure_type=\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3\u30FC
_UI_Trigger_type=\u30C8\u30EA\u30AC\u30FC
_UI_SQLIndex_type=SQL\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9
_UI_UniqueConstraint_type=\u4E00\u610F\u5236\u7D04
_UI_UniqueConstraint_type=\u4E00\u610F\u306E\u5236\u7D04
_UI_SQLIndexColumn_type=SQL\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u30AB\u30E9\u30E0
_UI_PrimaryKey_type=\u30D7\u30E9\u30A4\u30DE\u30EA\u30AD\u30FC
_UI_Row_type=\u884C
@@ -566,24 +566,24 @@ _UI_Trigger_usedColumnSet_feature=\u4F7F\u7528\u3055\u308C\u308B\u30AB\u30E9\u30
_UI_Trigger_table_feature=\u30C6\u30FC\u30D6\u30EB
_UI_SQLIndex_filterCondition_feature=\u30D5\u30A3\u30EB\u30BF\u30FC\u6761\u4EF6
_UI_SQLIndex_isNullable_feature=NULL\u53EF\u80FD
_UI_SQLIndex_autoUpdate_feature=\u81EA\u52D5\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
_UI_SQLIndex_autoUpdate_feature=\u81EA\u52D5\u66F4\u65B0
_UI_UniqueConstraint_deferrability_feature=\u9045\u5EF6\u53EF\u80FD\u6027
_UI_ForeignKey_deleteRule_feature=\u524A\u9664\u30EB\u30FC\u30EB
_UI_ForeignKey_updateRule_feature=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u30EB\u30FC\u30EB
_UI_ForeignKey_updateRule_feature=\u66F4\u65B0\u30EB\u30FC\u30EB
_UI_ForeignKey_deferrability_feature=\u9045\u5EF6\u53EF\u80FD\u6027
_UI_CheckConstraint_deferrability_feature=\u9045\u5EF6\u53EF\u80FD\u6027
_UI_Field_length_feature=\u9577\u3055
_UI_Field_precision_feature=\u7CBE\u5EA6
_UI_Field_scale_feature=\u30B9\u30B1\u30FC\u30EB
_UI_RecordDef_fieldDelimiter_feature=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A
_UI_RecordDef_fieldDelimiter_feature=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A\u8A18\u53F7
_UI_RecordDef_isFixedWidth_feature=\u56FA\u5B9A\u5E45\u3067\u3042\u308B
_UI_RecordDef_textDelimiter_feature=\u30C6\u30AD\u30B9\u30C8\u533A\u5207\u308A
_UI_RecordDef_textDelimiter_feature=\u30C6\u30AD\u30B9\u30C8\u533A\u5207\u308A\u8A18\u53F7
_UI_RecordDef_file_feature=\u30D5\u30A1\u30A4\u30EB
_UI_RecordDef_section_feature=\u30BB\u30AF\u30B7\u30E7\u30F3
_UI_FixedOffsetField_offset_feature=\u30AA\u30D5\u30BB\u30C3\u30C8
_UI_FixedOffsetField_offsetUnitBits_feature=\u5358\u4F4D\u30D3\u30C3\u30C8\u30AA\u30D5\u30BB\u30C3\u30C8
_UI_RecordFile_isSelfDescribing_feature=\u81EA\u5DF1\u8AAC\u660E\u3067\u3042\u308B
_UI_RecordFile_recordDelimiter_feature=\u30EC\u30B3\u30FC\u30C9\u533A\u5207\u308A
_UI_RecordFile_recordDelimiter_feature=\u30EC\u30B3\u30FC\u30C9\u533A\u5207\u308A\u8A18\u53F7
_UI_RecordFile_skipRecords_feature=\u30EC\u30B3\u30FC\u30C9\u3092\u30B9\u30AD\u30C3\u30D7
_UI_RecordFile_record_feature=\u30EC\u30B3\u30FC\u30C9
_UI_Dimension_dimensionedObject_feature=\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\uFF84\uFF9E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8
@@ -845,7 +845,7 @@ _UI_Domain_default_feature=\u30C7\u30D5\u30A9\u30EB\u30C8
_UI_Domain_validationRule_feature=\u691C\u8A3C\u30EB\u30FC\u30EB
_UI_Domain_baseType_feature=\u30D9\u30FC\u30B9\u30BF\u30A4\u30D7
_UI_RelationshipEnd_delete_feature=\u524A\u9664
_UI_RelationshipEnd_update_feature=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
_UI_RelationshipEnd_update_feature=\u66F4\u65B0
_UI_RelationshipEnd_insert_feature=\u633F\u5165
_UI_RelationshipEnd_foreignKey_feature=\u5916\u90E8\u30AD\u30FC
_UI_COBOLFD_organization_feature=\u7D44\u7E54
@@ -1252,7 +1252,7 @@ _UI_DeferrabilityType_initiallyImmediate_literal=initiallyImmediate
_UI_DeferrabilityType_notDeferrable_literal=notDeferrable
_UI_EventManipulationType_insert_literal=\u633F\u5165
_UI_EventManipulationType_delete_literal=\u524A\u9664
_UI_EventManipulationType_update_literal=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
_UI_EventManipulationType_update_literal=\u66F4\u65B0
_UI_NullableType_columnNoNulls_literal=columnNoNulls
_UI_NullableType_columnNullable_literal=columnNullable
_UI_NullableType_columnNullableUnknown_literal=columnNullableUnknown

Some files were not shown because too many files have changed in this diff Show More