Compare commits
214 Commits
patch/7.3.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4615ebdb75 | ||
|
|
5616d65272 | ||
|
|
ca85dd4b73 | ||
|
|
11d3c32066 | ||
|
|
a866707aae | ||
|
|
53e052989f | ||
|
|
f52c747409 | ||
|
|
6d36ff79bb | ||
|
|
c362aa776c | ||
|
|
318724d32c | ||
|
|
4b377af1aa | ||
|
|
695dcba405 | ||
|
|
4dc7e4e82f | ||
|
|
4c819add92 | ||
|
|
9c0f5e966d | ||
|
|
da5b7979fd | ||
|
|
8d3832fdfb | ||
|
|
cd8ff90b5b | ||
|
|
d98e5ea43c | ||
|
|
13b57c8823 | ||
|
|
0436bc8dd2 | ||
|
|
091de02e75 | ||
|
|
eb84dfe75d | ||
|
|
a7dd89cc3a | ||
|
|
211abcac09 | ||
|
|
089f43ccd4 | ||
|
|
d008463ef1 | ||
|
|
d7ed643621 | ||
|
|
0972593afd | ||
|
|
c50c5c2e46 | ||
|
|
0b7b156f22 | ||
|
|
30aa2d25a6 | ||
|
|
6a813e2a73 | ||
|
|
4b7a59b497 | ||
|
|
d5490d2663 | ||
|
|
fbfc3735ad | ||
|
|
76fbd6fd32 | ||
|
|
43ef7fa5e0 | ||
|
|
be28a0d122 | ||
|
|
e44522bb69 | ||
|
|
67f04b7db3 | ||
|
|
2502688e64 | ||
|
|
6175aca630 | ||
|
|
55f7531d68 | ||
|
|
d6c888e235 | ||
|
|
7db18b198f | ||
|
|
039ed90481 | ||
|
|
eea9c85609 | ||
|
|
ca9d09e04e | ||
|
|
b5dadab5a5 | ||
|
|
2add3ffc0e | ||
|
|
38b02ee746 | ||
|
|
d8daf75329 | ||
|
|
555a722ade | ||
|
|
8a003e1a21 | ||
|
|
ce75b33a11 | ||
|
|
72fe8689bd | ||
|
|
f71f9c03ed | ||
|
|
7063b514ff | ||
|
|
ee60d35aba | ||
|
|
93db6863a8 | ||
|
|
680031d91f | ||
|
|
e779dfec2d | ||
|
|
e16c7e1af3 | ||
|
|
55aa8236ba | ||
|
|
e381b2f237 | ||
|
|
44b7aee6d0 | ||
|
|
499759ad39 | ||
|
|
cf830accc0 | ||
|
|
ae4cc4cdfd | ||
|
|
909a8e4fb7 | ||
|
|
59d71296ce | ||
|
|
b80b862bcd | ||
|
|
ed2b236467 | ||
|
|
152a06856f | ||
|
|
258be81901 | ||
|
|
8c0bdc29bf | ||
|
|
e09d3b98eb | ||
|
|
774e01ef34 | ||
|
|
5dac1b510a | ||
|
|
cdcba355d4 | ||
|
|
80d00edde3 | ||
|
|
b30b349b9b | ||
|
|
fc1c8d067b | ||
|
|
b762239fa2 | ||
|
|
13d7814fd5 | ||
|
|
bf855a7bb1 | ||
|
|
f3b2637867 | ||
|
|
e405558bd4 | ||
|
|
915701e64b | ||
|
|
4038574557 | ||
|
|
69a2741416 | ||
|
|
e43cc1f85b | ||
|
|
250ff496ba | ||
|
|
c99b037c7b | ||
|
|
810b694e5d | ||
|
|
7e66cf70d2 | ||
|
|
0285fdc191 | ||
|
|
59990aa2ca | ||
|
|
2eff81da52 | ||
|
|
13a40cfda7 | ||
|
|
e5ada32a75 | ||
|
|
cdfd2170ba | ||
|
|
5a7f0e8fe9 | ||
|
|
cacdff8623 | ||
|
|
e462ba015b | ||
|
|
8223b8f650 | ||
|
|
489c28c19f | ||
|
|
22f764d543 | ||
|
|
6c48bc0f4e | ||
|
|
5256afcd57 | ||
|
|
38f32f5d5e | ||
|
|
43b4b220d5 | ||
|
|
c476f7bfbd | ||
|
|
448217029f | ||
|
|
a046c641b0 | ||
|
|
982e319f9d | ||
|
|
48ab34ef4a | ||
|
|
b52c6e53e9 | ||
|
|
ae6b3f729b | ||
|
|
185064bf0f | ||
|
|
7dfd4d8e81 | ||
|
|
a561e95c43 | ||
|
|
ea0b76f84c | ||
|
|
b8a08d2228 | ||
|
|
c36ca11190 | ||
|
|
450cf88fbb | ||
|
|
273dbaff1d | ||
|
|
6d502306dc | ||
|
|
4f7bd39423 | ||
|
|
44bfd08c04 | ||
|
|
2237c0b071 | ||
|
|
6c77d40d68 | ||
|
|
0017db5b19 | ||
|
|
09adee337e | ||
|
|
b83227af06 | ||
|
|
16586b7bfa | ||
|
|
c2ce08daeb | ||
|
|
40c71f6911 | ||
|
|
776c0725b6 | ||
|
|
1228c42ed9 | ||
|
|
75df15acaa | ||
|
|
992ae04ae9 | ||
|
|
2b8ff4f36a | ||
|
|
30d8840a31 | ||
|
|
3ea2179438 | ||
|
|
e22daaaedf | ||
|
|
571a496303 | ||
|
|
86171f4473 | ||
|
|
ebe668a985 | ||
|
|
cff7a54f6f | ||
|
|
13309d3297 | ||
|
|
311c5680d3 | ||
|
|
743d863776 | ||
|
|
9a87e0c49e | ||
|
|
78522294dc | ||
|
|
2854fa80b5 | ||
|
|
7389610259 | ||
|
|
ae319f0d85 | ||
|
|
98a80d18b6 | ||
|
|
f878723f81 | ||
|
|
1ac0beea10 | ||
|
|
cc0cab9532 | ||
|
|
0d7971730f | ||
|
|
75cc28c0be | ||
|
|
f8e3b6d5cb | ||
|
|
8a82cff8f3 | ||
|
|
ab9d3d1db2 | ||
|
|
05779d09a3 | ||
|
|
d40317d16a | ||
|
|
0c3625940c | ||
|
|
00c0652cbb | ||
|
|
823b72bcd9 | ||
|
|
f760212388 | ||
|
|
9da9e8199a | ||
|
|
baf574ea55 | ||
|
|
892065d2c4 | ||
|
|
724dc1b72d | ||
|
|
132d794131 | ||
|
|
2298c44339 | ||
|
|
03e462f8ff | ||
|
|
f7fb174301 | ||
|
|
54fc6ecd51 | ||
|
|
779e9a8086 | ||
|
|
f2d189c792 | ||
|
|
84edc461db | ||
|
|
b06ee57323 | ||
|
|
4590b8456d | ||
|
|
b2c74643a7 | ||
|
|
b35fb11251 | ||
|
|
576d3abf29 | ||
|
|
14ca2dfaa7 | ||
|
|
b607ed6fb3 | ||
|
|
acd02c4c18 | ||
|
|
615a4f209e | ||
|
|
172f3c3483 | ||
|
|
a4ce2f457e | ||
|
|
f2af89413f | ||
|
|
0c8c872bd6 | ||
|
|
38ed0b9f1f | ||
|
|
4df14e99d0 | ||
|
|
0c3e5175dd | ||
|
|
4ed8a4a803 | ||
|
|
365700699e | ||
|
|
dab6da165f | ||
|
|
b33018d422 | ||
|
|
81ec1966bd | ||
|
|
d3246a9713 | ||
|
|
b098e18278 | ||
|
|
f635d5a9f6 | ||
|
|
49b4be0929 | ||
|
|
39afb9e94a | ||
|
|
d119efe8d6 | ||
|
|
66cdd796fd |
@@ -65,7 +65,7 @@ Module.view.download.external.modules.action.text=Download external modules
|
||||
Module.view.download.external.modules.action.description=Download external modules
|
||||
download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules.
|
||||
download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually.
|
||||
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
|
||||
download.external.dialog.help.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
AcceptModuleLicensesWizard.title=Download external modules
|
||||
AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all
|
||||
AcceptModuleLicensesWizardDialog.cancelConfirmation.title=Confirmation
|
||||
|
||||
@@ -1136,7 +1136,7 @@ DatabaseForm.hc.link.none=None
|
||||
DatabaseForm.hc.link.repository=Repository
|
||||
DatabaseForm.hc.link.title=Hadoop Cluster
|
||||
DatabaseForm.checkFileExist=The file {0} is invalid or doesn't exist
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://help.talend.com/pages/viewpage.action?pageId=14230347
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
DatabaseForm.helpInfo.installDriverLink.label=How to install a driver
|
||||
SelectorTableForm.toolTip=Not available with this database
|
||||
FileStep1.modeButText=Read excel2007 file format(xlsx)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.commons-configuration2" version="2.8.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
|
||||
@@ -92,14 +92,13 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -57,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static Boolean isJunitWorking;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
@@ -123,6 +125,35 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isJunitWorking() {
|
||||
if (isJunitWorking == null) {
|
||||
try {
|
||||
String[] args = Platform.getCommandLineArgs();
|
||||
String applicationId = null;
|
||||
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
if (args[i].equalsIgnoreCase("-application")) { //$NON-NLS-1$
|
||||
applicationId = args[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (applicationId != null
|
||||
&& (applicationId.equals("org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication") //$NON-NLS-1$
|
||||
|| applicationId.equals("org.eclipse.pde.junit.runtime.uitestapplication"))) { //$NON-NLS-1$
|
||||
isJunitWorking = true;
|
||||
} else {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
}
|
||||
if (isJunitWorking == null) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
return isJunitWorking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
* happens during testing.
|
||||
|
||||
@@ -56,6 +56,19 @@ public class Hex {
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
public static boolean isNeedConvertToHex(String value) {
|
||||
if (value == null || "".equals(value.trim())) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
int ch = value.charAt(i);
|
||||
if (ch < 32) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int toDigit(char ch, int index) {
|
||||
int digit = Character.digit(ch, 16);
|
||||
|
||||
@@ -277,6 +277,10 @@ public class NetworkUtil {
|
||||
if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) {
|
||||
String addr = inetAddress.getHostAddress();
|
||||
if (!addr.startsWith("[") || !addr.endsWith("]")) {
|
||||
int idx = addr.indexOf("%");
|
||||
if (idx > 0) {
|
||||
addr = addr.substring(0, idx);
|
||||
}
|
||||
addr = "[" + addr + "]";
|
||||
}
|
||||
return addr;
|
||||
|
||||
@@ -12,16 +12,28 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.workbench.extensions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.IllegalPluginConfigurationException;
|
||||
import org.talend.commons.i18n.internal.Messages;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
/**
|
||||
* Utilities class uses to get implementation of extension points defined by plug-ins. <br/>
|
||||
@@ -36,6 +48,10 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
|
||||
private String plugInId;
|
||||
|
||||
public final static String FILE_FEATURES_INDEX = "extra_feature.index";
|
||||
|
||||
public final static String DROP_BUNDLE_INFO = "drop.bundle.info";
|
||||
|
||||
/**
|
||||
* Default Constructor. Must not be used.
|
||||
*/
|
||||
@@ -166,9 +182,17 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
}
|
||||
|
||||
IExtension[] extensions = pt.getExtensions();
|
||||
|
||||
Map<String, String> dropBundles = null;
|
||||
try {
|
||||
dropBundles = getDropBundleInfo();
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
for (IExtension extension : extensions) {
|
||||
|
||||
if (dropBundles != null && dropBundles.containsKey(extension.getNamespaceIdentifier())
|
||||
&& StringUtils.isEmpty(dropBundles.get(extension.getNamespaceIdentifier()))) {
|
||||
continue;
|
||||
}
|
||||
if (plugInId == null || extension.getNamespaceIdentifier().equals(plugInId)) {
|
||||
String configurationElementName = extensionPointLimiter.getConfigurationElementName();
|
||||
if (configurationElementName != null) {
|
||||
@@ -196,6 +220,32 @@ public abstract class ExtensionImplementationProvider<I> {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
* Copied from org.talend.commons.configurator
|
||||
**********************************************************/
|
||||
public Map<String, String> getDropBundleInfo() throws IOException {
|
||||
File indexFile = new File(ConfigurationScope.INSTANCE.getLocation().toFile(), FILE_FEATURES_INDEX);
|
||||
if (!indexFile.exists()) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<String, String> dropInfoMap = new HashMap<>();
|
||||
try {
|
||||
String jsonStr = new String(Files.readAllBytes(indexFile.toPath()));
|
||||
if (!jsonStr.isEmpty()) {
|
||||
JSONObject obj = new JSONObject(jsonStr);
|
||||
JSONObject dropInfo = obj.getJSONObject(DROP_BUNDLE_INFO);
|
||||
Iterator<String> iterator = dropInfo.keys();
|
||||
while (iterator.hasNext()) {
|
||||
String key = iterator.next();
|
||||
dropInfoMap.put(key, dropInfo.getString(key));
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
return dropInfoMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC amaumont Comment method "createAndAddImplementation".
|
||||
*
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.advanced.composite;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Sash;
|
||||
|
||||
/**
|
||||
* This class is used for constructing 2 composites, putting 1 sashes in the middle composite, which is used for
|
||||
* changing other 2 composites.
|
||||
*
|
||||
*/
|
||||
public class TwoCompositesSashForm extends Composite {
|
||||
|
||||
public static final int SASH_WIDTH = 3;
|
||||
|
||||
private Composite leftComposite;
|
||||
|
||||
private Composite rightComposite;
|
||||
|
||||
private Sash midSash;
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
*
|
||||
* @param parent
|
||||
* @param style
|
||||
*/
|
||||
public TwoCompositesSashForm(Composite parent, int style) {
|
||||
super(parent, style);
|
||||
final GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.numColumns = 3;
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
|
||||
setLayout(gridLayout);
|
||||
final GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
setLayoutData(gridData);
|
||||
|
||||
addComponents();
|
||||
addSashListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes all widgets's position when sash was moved.
|
||||
*
|
||||
* @param shift
|
||||
*/
|
||||
private void setCompositesBounds(int shift) {
|
||||
// Set mid Composite Width.
|
||||
int midSashPreLocation = midSash.getBounds().x;
|
||||
midSash.setLocation(midSashPreLocation + shift, midSash.getBounds().y);
|
||||
if (midSash.getBounds().x > 0) {
|
||||
if (midSashPreLocation < 0) {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift + midSashPreLocation, leftComposite
|
||||
.getBounds().height);
|
||||
} else {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift, leftComposite.getBounds().height);
|
||||
}
|
||||
} else {
|
||||
leftComposite.setSize(0, leftComposite.getBounds().height);
|
||||
}
|
||||
// Set Right Composte Width.
|
||||
rightComposite.setLocation(rightComposite.getBounds().x + shift, rightComposite.getBounds().y);
|
||||
rightComposite.setSize(rightComposite.getBounds().width - shift, rightComposite.getBounds().height);
|
||||
}
|
||||
|
||||
public Composite getLeftComposite() {
|
||||
return this.leftComposite;
|
||||
}
|
||||
|
||||
public Composite getRightComposite() {
|
||||
return this.rightComposite;
|
||||
}
|
||||
|
||||
private void addSashListeners() {
|
||||
midSash.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
/*
|
||||
* (non-Java)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
|
||||
*/
|
||||
public void handleEvent(Event event) {
|
||||
int shift = event.x - midSash.getBounds().x;
|
||||
setCompositesBounds(shift);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void addComponents() {
|
||||
leftComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
|
||||
leftComposite.setLayout(gridLayout);
|
||||
leftComposite.setLayoutData(gridData);
|
||||
|
||||
midSash = new Sash(this, SWT.VERTICAL | SWT.SMOOTH);
|
||||
GridData gridData2 = new GridData(GridData.FILL_VERTICAL);
|
||||
midSash.setLayoutData(gridData2);
|
||||
midSash.setSize(SASH_WIDTH, midSash.getBounds().height);
|
||||
|
||||
rightComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout3 = new GridLayout();
|
||||
gridLayout3.marginBottom = 0;
|
||||
gridLayout3.marginHeight = 0;
|
||||
gridLayout3.marginLeft = 0;
|
||||
gridLayout3.marginRight = 0;
|
||||
gridLayout3.marginTop = 0;
|
||||
gridLayout3.marginWidth = 0;
|
||||
gridLayout3.horizontalSpacing = 0;
|
||||
rightComposite.setLayout(gridLayout3);
|
||||
GridData gridData4 = new GridData(GridData.FILL_BOTH);
|
||||
rightComposite.setLayoutData(gridData4);
|
||||
}
|
||||
|
||||
public void setGridDatas() {
|
||||
Composite composite = (Composite) leftComposite.getChildren()[0];
|
||||
GridLayout gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite.setLayout(gridLayout2);
|
||||
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
Composite composite2 = (Composite) rightComposite.getChildren()[0];
|
||||
gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite2.setLayout(gridLayout2);
|
||||
composite2.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -463,4 +463,8 @@ public interface IRepositoryFactory {
|
||||
public boolean isRepositoryBusy();
|
||||
|
||||
public RepositoryWorkUnit getWorkUnitInProgress();
|
||||
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
|
||||
|
||||
public void batchDeleteOldVersionsPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote, IProgressMonitor monitor) throws PersistenceException;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
@@ -89,7 +88,6 @@ import org.talend.core.hadoop.BigDataBasicUtil;
|
||||
import org.talend.core.model.general.ILibrariesService;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.migration.IMigrationToolService;
|
||||
@@ -110,6 +108,7 @@ import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SpagoBiServer;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.TDQItem;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.model.properties.impl.FolderItemImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
@@ -141,6 +140,7 @@ import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.service.IUpdateService;
|
||||
import org.talend.core.service.IDetectCVEService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
@@ -411,7 +411,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
|
||||
boolean isThrow = true;
|
||||
if (tdqRepService != null && CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) {
|
||||
if (tdqRepService != null && (CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()
|
||||
|| item instanceof TDQItem)) {
|
||||
// change MessageBox to DeleteModelElementConfirmDialog
|
||||
InputDialog inputDialog = tdqRepService.getInputDialog(item);
|
||||
if (MessageDialog.OK == inputDialog.open()) {
|
||||
@@ -2238,14 +2239,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
try {
|
||||
// for new added mapping file, sync to project mapping folder
|
||||
MetadataTalendType.syncNewMappingFileToProject();
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
CodesJarResourceCache.initCodesJarCache();
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2281,6 +2274,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
IRunProcessService runProcessService = getRunProcessService();
|
||||
if (runProcessService != null) {
|
||||
runProcessService.initMavenJavaProject(monitor, project);
|
||||
|
||||
// before afterLogon migration execute, check and update daikon dependency
|
||||
runProcessService.checkAndUpdateDaikonDependencies();
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2343,17 +2339,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
try {
|
||||
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
|
||||
if (url != null) {
|
||||
// set the project mappings url
|
||||
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
|
||||
}
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
if (runProcessService != null && !isCommandLineLocalRefProject) {
|
||||
runProcessService.initializeRootPoms(monitor);
|
||||
|
||||
@@ -2462,6 +2447,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (runProcessService != null) {
|
||||
runProcessService.clearProjectRelatedSettings();
|
||||
}
|
||||
|
||||
// clear detect CVE cache
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDetectCVEService.class)) {
|
||||
IDetectCVEService detectCVESvc = GlobalServiceRegister.getDefault().getService(IDetectCVEService.class);
|
||||
if (detectCVESvc != null) {
|
||||
detectCVESvc.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
fullLogonFinished = false;
|
||||
@@ -2784,4 +2778,81 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException {
|
||||
if (project == null || objToDelete == null || objToDelete.getProperty() == null) {
|
||||
return;
|
||||
}
|
||||
// RepositoryViewObject is dynamic, so force to use in all case the RepositoryObject with fixed object.
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, object, version);
|
||||
|
||||
// i18n
|
||||
//log.info("Physical deletion [" + objToDelete + "] by " + getRepositoryContext().getUser() + ".");
|
||||
String str[] = new String[] { object.toString()+ "_" + version, getRepositoryContext().getUser().toString() };
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$ }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException {
|
||||
if (project == null || objToDeleteList == null || objToDeleteList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> idList = new ArrayList<>();
|
||||
List<IRepositoryViewObject> repositoryObjectList = new ArrayList<>();
|
||||
String label = "",lastLabel = "";
|
||||
for (IRepositoryViewObject objToDelete : objToDeleteList) {
|
||||
label = objToDelete.getProperty().getLabel();
|
||||
String versionedLabel = objToDelete.getProperty().getLabel() + "_" + objToDelete.getProperty().getVersion();
|
||||
monitor.setTaskName("Removing " + objToDelete.getRepositoryObjectType() + ":"+ versionedLabel);
|
||||
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
boolean isExtendPoint = false;
|
||||
|
||||
idList.add(object.getProperty().getId());
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
repositoryObjectList.add(object);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, objToDelete,objToDelete.getProperty().getVersion());
|
||||
if (label != null && !label.equals(lastLabel)) monitor.worked(1); //for different versions in progress bar
|
||||
lastLabel = label;
|
||||
}
|
||||
|
||||
// save project will handle git/svn update
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,280 +1,304 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="VARBINARY" default="true" />
|
||||
<dbType type="BINARY" />
|
||||
<dbType type="BIT" />
|
||||
<dbType type="BLOB" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
<dbType type="CHAR" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
@@ -190,9 +190,9 @@
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
@@ -282,8 +282,8 @@
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
{
|
||||
"mapping_AS400.xml": {
|
||||
"28fe6b6c94e4e486d431873ba556c1c18ae09140": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"3d4845af057220e02773029683a0fd99dee489e5": "a9861e98b581dfdafa7839238710bd930989960a",
|
||||
"458d597928478f43c94098dfe47d9bb8d07e89e2": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"76a4aa354d986ed5682797337817a8ddbb80ae89": "d568bf814d7b27fc7c63cbd07ea6b4a3b0ad3ff8"
|
||||
},
|
||||
"mapping_Access.xml": {
|
||||
"55d314ed9708263bfcec193abb57a1e25806626e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"718db25f8e86d6b61284a4ffdc1fd19faffb98a9": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_AmazonAurora.xml": {
|
||||
"a93c809bdf8e5df8095580e3f23b29658e044302": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"ba16c203a8a993e13ebab0da5cccb7a5e1c01e56": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_BigQuery.xml": {
|
||||
"db723e5b4a38bbc8316593be33ab9d74f57776e6": "e1770847f656589810753c19d420228326462f34",
|
||||
"e12df204d9f5081971d03c64b43de2456557e02e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e9c02d3e9bc3a3649fd33803353e61db6fcd2ea8": "01749151dcc171ebb6457ba872ee352d58a1dfd4"
|
||||
},
|
||||
"mapping_Cassandra.xml": {
|
||||
"20ed188f8824c14852304920cf82ca7119eb1be0": "ab7b23e6c94946ca2358cc0cfd82c4d77a4c5839",
|
||||
"692353c474569bafd44854b7f7343929beddee83": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e42bdadd0009e7595773edcc1652f181a8fdf151": "76ed27054255165c23d8c0c8db081a41a50430c9",
|
||||
"ff005c2bfc47789e5715e949f98bd6d72c934b54": "ebe76b0edd0eda3488527b95f2a6d925d091a408"
|
||||
},
|
||||
"mapping_Cassandra22_datastax.xml": {
|
||||
"2ddd561eac2a04a7b08949c0764c5e76f80c89f5": "b0378fb45ae238b884417db468872341e156f138",
|
||||
"33b483680a44a8229b09698df3803f5834987f18": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra40.xml": {
|
||||
"e92b373950021eb425db9e3eba8391f98ce7e4a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra_datastax.xml": {
|
||||
"3cb6b5cf167fb5ba82b3ebdc602f22ecdacdafb5": "56fad9370b27d03a9636d8368350274480fc2bce",
|
||||
"ca09b169eee6e6dcfa81f976bd98ef4aae81cdf2": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1620c54d6793c6d1885e3e2fcdf242c0e3a4059": "df28e2b92f57ba0486215f334edb649a58788712"
|
||||
},
|
||||
"mapping_Databricks_Delta_Lake.xml": {
|
||||
"d48793d7173ea7d07090f5e683045c3f60cc12c8": "21f5ac777158fc55288af7337737aa675e20bdf3",
|
||||
"dcbe4533fe16fee70f24702edddec78b81e26463": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Exasol.xml": {
|
||||
"21ff2b1a69b7242fa48a1218b0d5f8a6b0ba607e": "a0d36282ff5d6825b206ab6f794d13e048ac2192",
|
||||
"3768b1e7a941e66f8a70ad7e1a65aa7d2b598daa": "7ef9ede0f988f10489c1f5ffe16ea24d2d14ecdd",
|
||||
"6babf3080a3baa05bcd8a2815d2f31a0b15e1550": "02a98e53d3b6457272768ce0ae5c82992b403465",
|
||||
"7de8a81bc2eb7c4da639af148c2c67b5c6de4bc0": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"a728306274b817e8afa0101d3b7621398addc2f3": "b5b116b3758f58e7500058e1805bf93bf5a2f0c1",
|
||||
"dc2eba14e50ce7c413fb7696355e67d26fe5fb9b": "57bacf1f97951fcf6f650f1afdec35b5ea22638c",
|
||||
"f670268dfd5a8f80fbdbe6fe4ad668cb6c8f25d6": "ead0fb11f124cf05ad0f7fde21cdedbb3cf2160b"
|
||||
},
|
||||
"mapping_Firebird.xml": {
|
||||
"51a041d0b43678433f6303aebac5f92bfdb7b8a6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"d504ece6ca9e10e23f5e0f05660e5f49e7d999ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Greenplum.xml": {
|
||||
"16418522006e4505c7fb7d44c4d06928de20eaf8": "ec04f46618ef0586081fd3b17ad7b85239958194",
|
||||
"4f3e1b53baca729eef796979e97592c8724a2d91": "caf54e3d2b6c6d685cdcf2a243c28c408a9cd652",
|
||||
"525a7ca1a48599a840b1feca641ef6a413d7384b": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"c4ed635e67d7d82c24008677f313e17df98f5d08": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_H2.xml": {
|
||||
"4e3ed630d3133326a0cf4728865b3efa4cbecc63": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"84b0b863c0532f93bffc0ab54d98a449f331e319": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"cb093084dc1dc3f999707a1b9d1474f87bbf6d17": "341b1220b6bc6bf59eef81e97c694d06134bd8a2"
|
||||
},
|
||||
"mapping_HSQLDB.xml": {
|
||||
"0a37e2aec423d0c401aff092e4fda9e01c5dd4ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"73af8e3e8646ea58f4cfe60fe4905e90340b3e12": "890a391388725c112ffbbd2dd8b8d267305df4a7",
|
||||
"98819a80cd8994a02579ea1d9b0992a0b68a5403": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Hive.xml": {
|
||||
"0265c6f16ab2c9eea7da660e4e1c8a3ec7bc0ab3": "37ef13c438cda4cd1c3e091d99a00036b328e57f",
|
||||
"1f5811f41b2836cd7baeb23daef91d2ea313f2c6": "3646a1bcd980a3209501a5c846338823f55d74b2",
|
||||
"21a44cd9d32a5478a4de61a86b398a9ef80401ac": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"5444fa9a484704d774259430623e0db1495a867f": "ef872732cde37c6c7684dc773641be0b78f5c57c",
|
||||
"e7f128915578dd29538a7debeb5f47528b5a6e59": "86ba7c19d9300a02dbcb0801852e728acd261132"
|
||||
},
|
||||
"mapping_IBMDB2.xml": {
|
||||
"dc42cf143f3a0f10ad8c280f16ef44ae1f907123": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"f8aea23cc5b48ebb3cdd229be3f66b28890ff4f8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Impala.xml": {
|
||||
"55ed99aa28c989bd5777f41b7c87ed4eb9f245a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Informix.xml": {
|
||||
"40da9213cf85b1712f38474dea4f2ec3447dfe3c": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"938e41f3719c29248d4f58c303464bbfb50e343a": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Ingres.xml": {
|
||||
"811e8bf4e7bc2e6b9c3fcb5f074601a873f15e1d": "15afc1b074c8a6e4aee39c1d5a3347555dbe36a0",
|
||||
"95873faa81ee3de2eea02efab5c127e6188df796": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"9c5682f564e861e1db3b5184fd40e718e0912a4a": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Interbase.xml": {
|
||||
"4d37474d07991154aa0148e7a030c4725d45ef0d": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"71e8386c3e21f726550234c52d3ca50dcfa655de": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_JavaDB.xml": {
|
||||
"652fd7f2f11fc27903d333e1699cc419804caa66": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"66dbe13a0043798498f37b6e5495bc3aaa8fb90b": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_MSSQL.xml": {
|
||||
"305eeb294ae8bb07bee7d1e182e431e2e7f6273d": "d7761630e63b399f89eaaeb9e19e775bf1579dde",
|
||||
"b93c0825ffd799d89608239385d7e4b60de96209": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MaxDB.xml": {
|
||||
"586fc7ac94a9abec8a76a587dc6aa0fae0079bf3": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm.xml": {
|
||||
"e1c5e77e19adea1406e5bb511a1c6adb8b610bfe": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm_odata.xml": {
|
||||
"1166b9ce6ce163d11a57046db5ee2dc9d5e496df": "e86fd3fd5c3b4ba9ff613155fba014a80c40cf01",
|
||||
"3f25ced1039b99d1c07b23e3d27cac1562e52a6f": "c1190dfa35e839496745516dbcfeb8a309fa49d0",
|
||||
"750541f00f3c5da6007623f3514add6dc3417a5f": "54331fa4ec501557eb9c32d434c332cf3d121349",
|
||||
"9612a2611bd29461dd46fc70f0e2841892f3f096": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MsOdbc.xml": {
|
||||
"01561cb7b5630a4a6aed576215ccdb3991d2db52": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"a9c94a6255061e8100b15590da35196464b77d46": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Mysql.xml": {
|
||||
"128d7d66eb994a032128949fcbe0c953c158beaa": "956802047d6623ba61e2da68aba2db8f38bca48a",
|
||||
"522654fad6fa3d008ef386fc9360ae51df910729": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5dfc7b71e1f6a9fad6ebf47a1d748893c85bbe5e": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"894b0d1d2c23c98f2e14920013b82524334dd255": "74b3640e2923d4c60c92042ff03d15b4ac4e9341",
|
||||
"8cb3d2b06d8a2b12e8673e6e9519f85ec08b35ec": "f22d442cbde13623a1b96c15ea2df8dd1a7d755e",
|
||||
"a94341e5bd6c4ba0eef57f9d6d3cc6c0006c785b": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"d7e74c8e9f8a47ab258472ec43236d2933c70838": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"edc9d1453c8f9ac8548822ff2f90a4defcd02094": "fd4d974c755ced1969b27126844b3f462bca1a52"
|
||||
},
|
||||
"mapping_Netezza.xml": {
|
||||
"0c769aa277190990fb33a918cc57189b9ba6306f": "c8ca64da55ceb677fd97169f6a924ec80f01b2fc",
|
||||
"0f5e9677f936a5414ce6593229aa47ea5b757276": "3074a57eee1407a413e460ed27e31d48d21d609b",
|
||||
"b3e25e55f8281cb616b3f549e6a2e5a83d4ad62a": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Oracle.xml": {
|
||||
"0407cea7e87144cb601bc9a3f039121feca79b65": "cb6b87dabdc71be0f1db4bdca694bcb61b679c05",
|
||||
"064d2a5940379346638412dd7f4cb7dbcc30e672": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"26a2295f6401de6e17feb61b261f7fbdfc4d609d": "e7604a488f339028a3cf14ae4031b0fb3fd50bcc",
|
||||
"9b0306aacec772d9d82be49ab702254ce1e08bea": "912702dc8ea921a34ea0522235db65f8655bf8e9",
|
||||
"df2537b329d0b09828c281e62208daf379f7b60a": "544faa63bbe63dd070a94c84139c705ac6432314"
|
||||
},
|
||||
"mapping_ParAccel.xml": {
|
||||
"1ba71027d3a60773c7c008143c2146e4db2ef112": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5085a1e922f77895a2f7c85e2347acfe03034493": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Postgres.xml": {
|
||||
"ce8b7f58644b8f7814a5522d172b4192ff89bd4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1c1f04f95222bcadda336d6a4f0ea07c6ebb08e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_PostgresPlus.xml": {
|
||||
"69b7d7f722538a322fb0bf867177d1ce5a0d7ad6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f576a7bb0327eeff1fd63a9a09106ae33f3ec90e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Redshift.xml": {
|
||||
"0cc6e153fe35041a009cb222e0276e35ddbc92f1": "2023289b9965fc14b959463ba5050be6aead361a",
|
||||
"3b941be88a5f13bd8fd905fb1fa5f2a241e89ed9": "915a307b629c7a75bcbedc86267db1e8995b77f3",
|
||||
"85ba89fdadfca4a2d755856a75e904f6015926a9": "de08533f6561319fc2914181a2705ccd75e29c40",
|
||||
"8f3eda24c1f413b17b2b8c48695dbd786fa29b6b": "93112768d7eea6df44d92a3efbd4f1dfa20e06b6",
|
||||
"ab86d7fda94e0b368f739f73994ce2a2147be12d": "0fd3f58b7aa78aaae6fb40d042780bec64da75e6",
|
||||
"ad0eecc7e9f25c3b904cc11b062a8185456478ee": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Redshift_new.xml": {
|
||||
"43085952e178e2c570ab7d2a262278dd2896dd96": "699efe42a33aab3ca0bbaa7a1abee23368e61606"
|
||||
},
|
||||
"mapping_SAPHana.xml": {
|
||||
"1a07a8174468a5a1d55378dd0e21d7c1f9e531bc": "48ea42be6b348a3c993760e7f2c94c58ac08fdae",
|
||||
"331ae8a035e6b1f2cd722be6411df4ae4a95bb33": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_SQLite.xml": {
|
||||
"0a97b6e8acf8bd16aa34a3c01707f1e2a9eeff1f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"b7b7b7c690efacc208316c911571a8513b5ea713": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_SingleStore.xml": {
|
||||
"9da7d92af5e9b0697436f74fffd190e8af061567": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Snowflake.xml": {
|
||||
"d459c6be3786f9358615eaf692a1c7920b4c6e74": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Sybase.xml": {
|
||||
"081038547cac8342cf5cadf8bfd02fe4d2929323": "1ff9877dce90e2ef39b267ea60de534796035a95",
|
||||
"09a0f4dc71ff9a844e1162600409317e92e1ff18": "28534ffb4ae599adec53853776856e82c23c815a",
|
||||
"4ee2c12f372953e77404481a962b3aca14abadb0": "f02b1b6902098b2da90cde6b22a9a49ec328970a",
|
||||
"5752dcfa409e903af77587f151d580c68c9e4ac7": "3db0fa1fbed8ae378d52aa8c36b6fed55d184e5b",
|
||||
"6f4e7913b4b31e8fb4e097690c8b903a58842283": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"7676e2d94473564322ce37cad92b7f8b09751b1b": "1cc6237de63892e097c77637ac8457cf8fefbf6f",
|
||||
"8bbad7895713f3a399ddb195c40353e18d3e83b9": "984ca27e4ee0177793b2111797700390424cb746",
|
||||
"bbc091c50a7bd8a8fe630d99a9c2e3f2f878ac88": "67a9b521c9d698b3411fb49410ac61a15f4bc7db",
|
||||
"d841719dcf79a12d0189301e40c0e9e973a45c4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e103a9671d9bcf360fd2e61ee97f4547d0d52241": "e19031add3dc54bf9d0e731f3a05738af48ebb6d",
|
||||
"e1c42d74cc0dc3681b5bd45a901a3bedeb53ec68": "75df15acaa5c8d1dcd4a8e855e0df969fdea25d5",
|
||||
"e30d1f01e88bdaf926855e00d1aef3a37a7eb6e4": "c91dd79086a42dce5417de77bb7ce61c0bd6cbbf",
|
||||
"ee5d7f5f9510f63c340f87862327b869bf4cb743": "607764748cdbff669d2ccfcbaafdaa0d83598f32"
|
||||
},
|
||||
"mapping_Teradata.xml": {
|
||||
"10ed107c1d66b38d51739ffdd0820db676c42cef": "45dbf10541f6dd32283038bcc5b04b10e305770a",
|
||||
"55e6a511c2cb39aca11de302a3850eb2d1f6e3a5": "fc652f1cc70f6caa05d5c65e57115f86653f7841",
|
||||
"ac9ffae887ab4d20d4eca0eddc83163e99507ec8": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f9b0367424f721cd8029d3540c9a82f39d74a6b4": "c002b50a69b8a0193780e7c0d1788bbd9a5145c3"
|
||||
},
|
||||
"mapping_VectorWise.xml": {
|
||||
"06f86121a9492b3104047691b19718a5d9d49be9": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb",
|
||||
"edf255202bcfad77ff6f3fac11714891934225c4": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Vertica.xml": {
|
||||
"28153eaab1c47b8718ca3c49553ec40b047d2878": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"2ee78d7679d4201ad29adba4cc0a48084f161e25": "eecc481d671d330bfb46406ab2533830c668bf22",
|
||||
"819be4680c04a7f77c51fc65ebd1d964a714aa78": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9218d5e7b682513ddf1b891f5f0467ab9938fec3": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"d9745a57d9f1b6c638ebd57cd5281be020e0614c": "e8f788c5c260f9b82eaaa88d0402423d86a5680d",
|
||||
"dec55a19094d1bcc20f12a8888b27460e83c2e67": "3b582b21fc5ac7ccfb05321c7923591433ced716"
|
||||
},
|
||||
"mapping_XSD.xml": {
|
||||
"1ef837521e274c5b93f5f228955204285b3dd28a": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9c454252343dfe1400d356cbf41bf88e842b4e1e": "c615b3a622e2f6ba8577e812e71977d9f1b1930d"
|
||||
},
|
||||
"mapping_dynamodb.xml": {
|
||||
"891099e88d8074570dc029f9b7d8b04bbc241383": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_ebcdic.xml": {
|
||||
"b47b25edc9e40d312b548270dbb3f978475be4e7": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_sap.xml": {
|
||||
"0339bc60ae47e3796c343eee7e2fb1cb1869cefa": "ee49a27e5c3ba3217ab497b1cd4467c088e59f5e",
|
||||
"1f41a55f6f7f1d6d2118e766daf7e3dbfd77551d": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"64c23be0c363ab703528677c999e4ef707d54497": "27908d5685066221f02cd3890a5319838215eb8b",
|
||||
"83688cf3134e60d9f5a08b316643a41246717e92": "740c431e0b623cc7d41166588961028ad3efab80",
|
||||
"9df72b6a1f1a72d9be1a4a7fd428873ad9b75bff": "94804b5e96a71d63a294eb9bcfbbb5290824009f",
|
||||
"a300fcd290aa65c254c44d683d30a9fa6ae14a2f": "45e5d88e9c49cb87b47413468073c571f60c0117",
|
||||
"b74c01dff88a52afca5f8c84fbe41d71a34eb6b5": "32832fe0edfbd10d50ed85528481e5c9ca2ec8e0",
|
||||
"c814f616005e1637ec107dd8c0f269bd69661d2e": "7d07608dceb06f7364b5bb8babc0f6e921fc443a"
|
||||
},
|
||||
"mapping_sas.xml": {
|
||||
"4aeb0deb41f61dbe69e85e780fb1e985c9f3d758": "fd44bfb0ee3fc8288465507b937c53619f43c0ec"
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@ public interface ICoreService extends IService {
|
||||
|
||||
public String validateValueForDBType(String columnName);
|
||||
|
||||
@Deprecated
|
||||
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
|
||||
|
||||
public IPreferenceStore getPreferenceStore();
|
||||
@@ -124,6 +125,14 @@ public interface ICoreService extends IService {
|
||||
|
||||
public IMetadataTable convert(MetadataTable originalTable);
|
||||
|
||||
@Deprecated
|
||||
public void syncMappingsFileFromSystemToProject();
|
||||
|
||||
public static ICoreService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,11 +16,13 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.RetrieveResult;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
@@ -77,6 +79,8 @@ public interface ILibraryManagerService extends IService {
|
||||
public void saveMavenIndex(Map<String, String> libsToMavenUri, IProgressMonitor... monitorWrap);
|
||||
|
||||
public void createModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
public Map<String,String> buildModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "retrieve".
|
||||
@@ -107,6 +111,8 @@ public interface ILibraryManagerService extends IService {
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
RetrieveResult retrieveModules(ERepositoryObjectType codeType, Set<ModuleNeeded> modulesNeeded, String pathToStore,
|
||||
boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
/**
|
||||
*
|
||||
* Resolve the jar from custom nexus
|
||||
@@ -149,19 +155,14 @@ public interface ILibraryManagerService extends IService {
|
||||
public boolean contains(String jarName);
|
||||
|
||||
public void clearCache();
|
||||
|
||||
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean checkJarInstalledFromPlatform(String uriPath);
|
||||
|
||||
/**
|
||||
* deploy jars from lib/java to local maven if any jar already exist in maven and need update , for jars that not
|
||||
* exist in maven won't be deploy by this funciton , those jars should be deploy when it is needed Comment method
|
||||
* "synToLocalMaven".
|
||||
*/
|
||||
public void synToLocalMaven();
|
||||
|
||||
public String getMavenUriFromIndex(String jarName);
|
||||
|
||||
public void setCustomMavenURI(String orignalURI, String customURI);
|
||||
|
||||
@@ -149,7 +149,9 @@ public enum EDatabaseTypeName {
|
||||
"HBase", "HBase", Boolean.FALSE, "HBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
MAPRDB(
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SNOWFLAKE(
|
||||
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
|
||||
|
||||
// displayName is used in Java code.
|
||||
private String displayName;
|
||||
|
||||
@@ -214,6 +214,36 @@ public class ConnParameterKeys {
|
||||
|
||||
/******************************************/
|
||||
|
||||
/*********** Azure Synapse keys ***************/
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_HOST = "CONN_PARA_KEY_SYNAPSE_HOST"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN = "CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_SPARK_POOLS = "CONN_PARA_KEY_SYNAPSE_SPARK_POOLS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME = "CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_CONTAINER = "CONN_PARA_KEY_SYNAPSE_FS_CONTAINER"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_MEMORY = "CONN_PARA_KEY_DRIVER_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_CORES = "CONN_PARA_KEY_DRIVER_CORES"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
|
||||
|
||||
/******************************************/
|
||||
|
||||
/**
|
||||
* HBase keys.
|
||||
*/
|
||||
@@ -321,6 +351,8 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
@@ -334,5 +366,20 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_SET_HADOOP_CONF = "CONN_PARA_KEY_SET_HADOOP_CONF";
|
||||
|
||||
public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR";
|
||||
|
||||
/**Knox*/
|
||||
public static final String CONN_PARA_KEY_SPARK_MODE="CONN_PARA_KEY_SPARK_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_KNOX="CONN_PARA_KEY_USE_KNOX";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_URL="CONN_PARA_KEY_KNOX_URL";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_USER = "CONN_PARA_KEY_KNOX_USER";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_PASSWORD="CONN_PARA_KEY_KNOX_PASSWORD";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_TIMEOUT="CONN_PARA_KEY_KNOX_TIMEOUT";
|
||||
|
||||
}
|
||||
|
||||
@@ -300,13 +300,20 @@ public class DatabaseConnStrUtil {
|
||||
if (!url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url + ";"; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "ssl=true;"; //$NON-NLS-1$
|
||||
|
||||
boolean isHiveDriver = url.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE);
|
||||
|
||||
url = url + ( isHiveDriver ? "ssl=true;" : "SSL=1;" ); //$NON-NLS-1$
|
||||
|
||||
String trustStorePath = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PATH);
|
||||
|
||||
if (trustStorePath != null) {
|
||||
url = url + "sslTrustStore=" + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
url = url + ( isHiveDriver ? "sslTrustStore=" : "SSLTrustStore=" ) + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
String trustStorePassword = null;
|
||||
trustStorePassword = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PASSWORD);
|
||||
|
||||
if (trustStorePassword != null) {
|
||||
if (encryptPassword) {
|
||||
trustStorePassword = "encrypted"; //$NON-NLS-1$
|
||||
@@ -318,7 +325,7 @@ public class DatabaseConnStrUtil {
|
||||
if (trustStorePassword == null) {
|
||||
trustStorePassword = ""; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "trustStorePassword=" + trustStorePassword; //$NON-NLS-1$
|
||||
url = url + ( isHiveDriver ? "trustStorePassword=" : "SSLTrustStorePwd=" ) + trustStorePassword; //$NON-NLS-1$
|
||||
}
|
||||
if (url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url.substring(0, url.length() - 1);
|
||||
@@ -385,7 +392,8 @@ public class DatabaseConnStrUtil {
|
||||
template = EDatabaseConnTemplate.IMPALA_IMPALA_DRIVER.getUrlTemplate(null);
|
||||
}
|
||||
String standardURlString = getImpalaURlString(template, supportContext, server, port, sid);
|
||||
String principalSuffix = "principal="; //$NON-NLS-1$
|
||||
|
||||
String principalSuffix = "IMPALA".equals(driver) ? "AuthMech=1" : "principal="; //$NON-NLS-1$
|
||||
boolean hasPrinc = false;
|
||||
String[] urlArray = standardURlString.split(SEMICOLON);
|
||||
if (urlArray[urlArray.length - 1].startsWith(principalSuffix)) {
|
||||
@@ -397,7 +405,21 @@ public class DatabaseConnStrUtil {
|
||||
}
|
||||
} else {
|
||||
if (Principal != null) {
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
|
||||
if("IMPALA".equals(driver)) {
|
||||
String krbServiceName = (Principal.split("/")[0]);
|
||||
String krbHostFQDN = (Principal.split("/")[1].split("@")[0]);
|
||||
String krbRealm = (Principal.split("/")[1].split("@")[1]);
|
||||
String urlKerberosParameter = ";KrbServiceName=" + krbServiceName
|
||||
+ ";KrbHostFQDN=" + krbHostFQDN
|
||||
+ ";KrbRealm=" + krbRealm;
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(urlKerberosParameter);
|
||||
|
||||
} else {
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public enum EDatabaseConnTemplate {
|
||||
MYSQL(new DbConnStr(EDatabaseTypeName.MYSQL, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"3306", //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true")), //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true&enabledTLSProtocols=TLSv1.2,TLSv1.1,TLSv1")), //$NON-NLS-1$
|
||||
|
||||
AMAZON_AURORA(new DbConnStr(EDatabaseTypeName.AMAZON_AURORA, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.talend.core.database.conn.DatabaseConnConstants;
|
||||
public enum EDatabaseVersion4Drivers {
|
||||
// access
|
||||
ACCESS_JDBC(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, new String[] {
|
||||
"jackcess-2.1.0.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.1.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.0.jar", "bcprov-jdk15on-1.51.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
"jackcess-2.1.12.jar", "ucanaccess-2.0.9.5.jar", "commons-lang-2.6.jar", "commons-logging-1.1.3.jar", "hsqldb.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackcess-encrypt-2.1.4.jar", "bcprov-jdk15on-1.69.jar", "talend-ucanaccess-utils-1.0.0.jar" })),
|
||||
ACCESS_2003(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2003", "Access_2003")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// oracle
|
||||
@@ -58,7 +58,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.4.198.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
@@ -71,13 +71,14 @@ public enum EDatabaseVersion4Drivers {
|
||||
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
SAS_9_1(new DbVersion4Drivers(EDatabaseTypeName.SAS, "SAS 9.1", "SAS_9.1", new String[] { "sas.core.jar", //$NON-NLS-1$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"SAS 9.2", "SAS_9.2", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19jar" })),
|
||||
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
|
||||
// MYSQL, add for 9594
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.30-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.49.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-2.5.3.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// add for 9594
|
||||
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -85,10 +86,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.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.5.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-6.5.jar",
|
||||
"json-smart-2.4.2.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "log4j-1.2.17.jar",
|
||||
"accessors-smart-1.1.jar", "asm-5.0.3.jar" })),
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.9.jar", "oauth2-oidc-sdk-9.7.jar",
|
||||
"json-smart-2.4.9.jar", "nimbus-jose-jwt-9.22.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
|
||||
"accessors-smart-2.4.9.jar", "asm-9.5.jar", "content-type-2.1.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -106,12 +107,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -168,13 +169,15 @@ public enum EDatabaseVersion4Drivers {
|
||||
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.37.1061.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.10.1.jar", "jackson-annotations-2.10.1.jar", "httpcore-4.4.11.jar", "httpclient-4.5.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-core-2.13.4.jar", //$NON-NLS-1$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.11.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"httpclient-4.5.9.jar", //$NON-NLS-1$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
|
||||
|
||||
private DbVersion4Drivers dbVersionBean;
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@ public class HadoopClassLoaderFactory2 {
|
||||
public static ClassLoader getHDFSClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb);
|
||||
}
|
||||
|
||||
public static ClassLoader getHDFSKnoxClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return HadoopClassLoaderFactory2.getClassLoader(relatedClusterId, EHadoopCategory.HDFS, distribution, version, useKrb,
|
||||
IHadoopArgs.HDFS_ARG_KNOX);
|
||||
}
|
||||
public static ClassLoader getMRClassLoader(String relatedClusterId, String distribution, String version, boolean useKrb) {
|
||||
return getClassLoader(relatedClusterId, EHadoopCategory.MAP_REDUCE, distribution, version, useKrb);
|
||||
}
|
||||
|
||||
@@ -22,4 +22,6 @@ public interface IHadoopArgs {
|
||||
|
||||
public static final String HIVE_ARG_STANDALONE = "STANDALONE"; //$NON-NLS-1$
|
||||
|
||||
public static final String HDFS_ARG_KNOX = "USE_KNOX"; //$NON-NLS-1$
|
||||
|
||||
}
|
||||
|
||||
@@ -101,22 +101,59 @@ public enum EHadoopProperties {
|
||||
HD_AZURE_DEPLOYBOLB,
|
||||
|
||||
HD_JOB_RESULT_FOLDER,
|
||||
|
||||
|
||||
SYNAPSE_ENDPOINT,
|
||||
|
||||
SYNAPSE_TOKEN,
|
||||
|
||||
SPARK_POOL_NAME,
|
||||
|
||||
SYNAPSE_STORAGE_HOST,
|
||||
|
||||
SYNAPSE_STORAGE_CONTAINER,
|
||||
|
||||
SYNAPSE_STORAGE_USERNAME,
|
||||
|
||||
SYNAPSE_STORAGE_PASSWORD,
|
||||
|
||||
DEPLOY_FOLDER,
|
||||
|
||||
SPARK_DRIVER_MEM,
|
||||
|
||||
SPARK_DRIVER_CORES,
|
||||
|
||||
SPARK_EXECUTOR_MEMORY,
|
||||
|
||||
QUBOLE_API_TOKEN,
|
||||
|
||||
QUBOLE_CLUSTER,
|
||||
|
||||
QUBOLE_CLUSTER_LABEL,
|
||||
|
||||
QUBOLE_ENDPOINT,
|
||||
|
||||
QUBOLE_ENDPOINT_URL,
|
||||
|
||||
QUBOLE_S3_ACCESS_KEY,
|
||||
|
||||
QUBOLE_S3_SECRET_KEY,
|
||||
|
||||
QUBOLE_S3_BUCKET_NAME,
|
||||
|
||||
QUBOLE_S3_BUCKET_KEY,
|
||||
|
||||
QUBOLE_S3_REGION,
|
||||
|
||||
DATABRICKS_ENDPOINT,
|
||||
|
||||
DATABRICKS_CLOUD_PROVIDER,
|
||||
|
||||
DATABRICKS_RUN_MODE,
|
||||
|
||||
DATABRICKS_CLUSTER_ID,
|
||||
|
||||
DATABRICKS_TOKEN,
|
||||
|
||||
DATABRICKS_DBFS_DEP_FOLDER;
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -34,6 +34,8 @@ public enum EHadoopDistributions {
|
||||
PIVOTAL_HD("Pivotal HD"), //$NON-NLS-1$
|
||||
|
||||
MICROSOFT_HD_INSIGHT("Microsoft HD Insight"), //$NON-NLS-1$
|
||||
|
||||
AZURE_SYNAPSE("Azure Synapse Runtime for Apache Spark 3.0"), //$NON-NLS-1$
|
||||
|
||||
GOOGLE_CLOUD_DATAPROC("Google Cloud Dataproc"), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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 ESynapseStorage {
|
||||
|
||||
ADLS_GEN2("ADLS Gen2"); //$NON-NLS-1$
|
||||
|
||||
private String displayName;
|
||||
|
||||
ESynapseStorage(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static List<String> getAllSynapseStorageDisplayNames() {
|
||||
return getAllSynapseStorageNames(true);
|
||||
}
|
||||
|
||||
public static List<String> getAllSynapseStorageNames(boolean display) {
|
||||
List<String> names = new ArrayList<String>();
|
||||
ESynapseStorage[] values = values();
|
||||
for (ESynapseStorage storage : values) {
|
||||
if (display) {
|
||||
names.add(storage.getDisplayName());
|
||||
} else {
|
||||
names.add(storage.getName());
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static ESynapseStorage getSynapseStoragenByDisplayName(String name) {
|
||||
return getSynapseStorageByName(name, true);
|
||||
}
|
||||
|
||||
public static ESynapseStorage getSynapseStorageByName(String name, boolean display) {
|
||||
if (name != null) {
|
||||
for (ESynapseStorage storage : values()) {
|
||||
if (display) {
|
||||
if (name.equalsIgnoreCase(storage.getDisplayName())) {
|
||||
return storage;
|
||||
}
|
||||
} else {
|
||||
if (name.equalsIgnoreCase(storage.getName())) {
|
||||
return storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -951,6 +951,14 @@ public class ContextUtils {
|
||||
params.add(param);
|
||||
}
|
||||
|
||||
public boolean remove(Item item, String param) {
|
||||
Set<String> params = map.get(item);
|
||||
if (params != null && params.contains(param)) {
|
||||
return params.remove(param);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set<String> get(Item item) {
|
||||
Set<String> params = map.get(item);
|
||||
|
||||
@@ -57,6 +57,11 @@ public class ConnectionBean implements Cloneable {
|
||||
private static final String TOKEN = "token"; //$NON-NLS-1$
|
||||
|
||||
private static final String URL = "url"; //$NON-NLS-1$
|
||||
|
||||
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
|
||||
|
||||
private String credentials = ""; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC smallet ConnectionBean constructor comment.
|
||||
*/
|
||||
@@ -178,6 +183,9 @@ public class ConnectionBean implements Cloneable {
|
||||
public String getPassword() {
|
||||
try {
|
||||
if (conDetails.has(PASSWORD)) {
|
||||
if (isStoreCredentials() && credentials != null) {
|
||||
return this.credentials;
|
||||
}
|
||||
return conDetails.getString(PASSWORD);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
@@ -326,6 +334,7 @@ public class ConnectionBean implements Cloneable {
|
||||
toReturn.setWorkSpace(st[i++]);
|
||||
toReturn.setComplete(new Boolean(st[i++]));
|
||||
toReturn.setToken(new Boolean(st[i++]));
|
||||
toReturn.setStoreCredentials(new Boolean(st[i++]));
|
||||
JSONObject dynamicJson = new JSONObject();
|
||||
toReturn.getConDetails().put(DYNAMICFIELDS, dynamicJson);
|
||||
while (i < st.length) {
|
||||
@@ -408,4 +417,30 @@ public class ConnectionBean implements Cloneable {
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean isStoreCredentials() {
|
||||
try {
|
||||
if (conDetails.has(STORECREDENTIALS)) {
|
||||
return (Boolean) conDetails.get(STORECREDENTIALS);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setStoreCredentials(boolean store) {
|
||||
try {
|
||||
conDetails.put(STORECREDENTIALS, store);
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getCredentials() {
|
||||
return this.credentials;
|
||||
}
|
||||
|
||||
public void setCredentials(String credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,14 @@ package org.talend.core.model.general;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.osgi.framework.Version;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.database.conn.version.DatabaseDriversCache;
|
||||
@@ -29,6 +31,9 @@ import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.json.JSONTokener;
|
||||
|
||||
/**
|
||||
* This bean is use to manage needed moduless (perl) and libraries (java).<br/>
|
||||
@@ -38,6 +43,10 @@ import org.talend.core.utils.TalendQuoteUtils;
|
||||
*/
|
||||
public class ModuleNeeded {
|
||||
|
||||
public static final String ATTR_USED_BY_DYNAMIC_DISTRIBUTION = "dynamicDistribution";
|
||||
|
||||
public static final String ATTR_DYNAMIC_DISTRIBUTION_VERSION = "distributionVersion";
|
||||
|
||||
private String id;
|
||||
|
||||
private String context;
|
||||
@@ -94,8 +103,11 @@ public class ModuleNeeded {
|
||||
*/
|
||||
private boolean useReleaseVersion = false;
|
||||
|
||||
private Map<String, String> attributes;
|
||||
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
|
||||
|
||||
/**
|
||||
* DOC smallet ModuleNeeded class global comment. Detailled comment <br/>
|
||||
@@ -162,6 +174,10 @@ public class ModuleNeeded {
|
||||
this.required = required;
|
||||
this.installURL = installURL;
|
||||
this.requiredIf = requiredIf;
|
||||
this.attributes = analyseMessage(informationMsg);
|
||||
if (!this.attributes.isEmpty()) {
|
||||
this.informationMsg = "";
|
||||
}
|
||||
String name = moduleName;
|
||||
String uri = mavenUrl;
|
||||
if (moduleName != null) {
|
||||
@@ -184,6 +200,32 @@ public class ModuleNeeded {
|
||||
setMavenUri(uri);
|
||||
}
|
||||
|
||||
private Map<String, String> analyseMessage(String msg) {
|
||||
Map<String, String> attrMap = new HashMap<>();
|
||||
if (StringUtils.isBlank(msg) || !msg.startsWith("{") || !msg.endsWith("}")) {
|
||||
return attrMap;
|
||||
}
|
||||
try {
|
||||
JSONObject jo = new JSONObject(new JSONTokener(msg));
|
||||
Iterator<String> keys = jo.keys();
|
||||
keys.forEachRemaining(key -> {
|
||||
try {
|
||||
Object object = jo.get(key);
|
||||
if (object != null) {
|
||||
attrMap.put(key, object.toString());
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
if (Boolean.getBoolean("talend.studio.moduleNeeded.init.debug")) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return attrMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModuleNeeded clone() {
|
||||
ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri);
|
||||
@@ -212,6 +254,7 @@ public class ModuleNeeded {
|
||||
cloned.requiredIf = requiredIf;
|
||||
cloned.status = status;
|
||||
cloned.useReleaseVersion = useReleaseVersion;
|
||||
cloned.attributes = attributes;
|
||||
|
||||
return cloned;
|
||||
}
|
||||
@@ -671,6 +714,10 @@ public class ModuleNeeded {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usedByDynamicDistribution() {
|
||||
return Boolean.valueOf(attributes.get(ATTR_USED_BY_DYNAMIC_DISTRIBUTION));
|
||||
}
|
||||
|
||||
public boolean isDynamic() {
|
||||
return this.dynamic;
|
||||
}
|
||||
@@ -709,5 +756,12 @@ public class ModuleNeeded {
|
||||
public void setUseReleaseVersion(boolean useReleaseVersion) {
|
||||
this.useReleaseVersion = useReleaseVersion;
|
||||
}
|
||||
|
||||
|
||||
public String getDynamicDistributionVersion() {
|
||||
return attributes.get(ATTR_DYNAMIC_DISTRIBUTION_VERSION);
|
||||
}
|
||||
|
||||
public void setDynamicDistributionVersion(String distribution) {
|
||||
attributes.put(ATTR_DYNAMIC_DISTRIBUTION_VERSION, distribution);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class RetrieveResult {
|
||||
|
||||
private boolean allResolved;
|
||||
|
||||
private Set<ModuleNeeded> resovledModules = new HashSet<>();
|
||||
|
||||
private Set<ModuleNeeded> unresolvedModules = new HashSet<>();
|
||||
|
||||
public boolean isAllResolved() {
|
||||
return allResolved;
|
||||
}
|
||||
|
||||
public void setAllResolved(boolean allResolved) {
|
||||
this.allResolved = allResolved;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getResovledModules() {
|
||||
return resovledModules;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getUnresolvedModules() {
|
||||
return unresolvedModules;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -194,6 +194,10 @@ public interface IMetadataConnection extends IMetadata {
|
||||
public String getContextName();
|
||||
|
||||
public void setContextName(String contextName);
|
||||
|
||||
public boolean isSupportNLS();
|
||||
|
||||
public void setSupportNLS(boolean newSupportNLS);
|
||||
|
||||
/**
|
||||
* Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For
|
||||
|
||||
@@ -69,6 +69,8 @@ public interface IMetadataTable {
|
||||
|
||||
public boolean sameMetadataAs(IMetadataTable other, int options);
|
||||
|
||||
public boolean sameMetadataAs(List<IMetadataColumn> otherMetadataTableColumns, int options);
|
||||
|
||||
public void sortCustomColumns();
|
||||
|
||||
public boolean isReadOnly();
|
||||
|
||||
@@ -252,8 +252,13 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
if (!(input instanceof IMetadataTable)) {
|
||||
return false;
|
||||
}
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true);
|
||||
return sameMetadataAs(inputColumnListWithUnselected, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sameMetadataAs(List<IMetadataColumn> inputColumnListWithUnselected, int options) {
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
if (thisColumnListWithUnselected == null) {
|
||||
if (inputColumnListWithUnselected != null) {
|
||||
return false;
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -24,18 +25,20 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ProjectScope;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@@ -46,9 +49,9 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
@@ -59,6 +62,8 @@ import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
@@ -75,14 +80,13 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public final class MetadataTalendType {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String INTERNAL_MAPPINGS_FOLDER = "mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
|
||||
public static final String FILE_MAPPING_REVISION = "mapping_revision.json"; //$NON-NLS-1$
|
||||
|
||||
public static final String MAPPING_FILE_PATTERN = "^mapping_.*\\.xml$"; //$NON-NLS-1$
|
||||
|
||||
private static ECodeLanguage codeLanguage;
|
||||
|
||||
@@ -459,13 +463,14 @@ public final class MetadataTalendType {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static URL getSystemForderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getSystemFolderURLOfMappingsFile() throws SystemException {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
URL url = null;
|
||||
Path filePath = new Path(dirPath);
|
||||
Bundle b = Platform.getBundle(CoreRuntimePlugin.PLUGIN_ID);
|
||||
if (b != null) {
|
||||
try {
|
||||
// Enumeration<URL> entries = b.findEntries(dirPath, "mapping_*.xml", false);
|
||||
url = FileLocator.toFileURL(FileLocator.find(b, filePath, null));
|
||||
} catch (IOException e) {
|
||||
throw new SystemException(e);
|
||||
@@ -474,46 +479,169 @@ public final class MetadataTalendType {
|
||||
return url;
|
||||
}
|
||||
|
||||
public static URL getProjectForderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getProjectFolderURLOfMappingsFile() throws SystemException {
|
||||
try {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IPath settingPath = new ProjectScope(project).getLocation();
|
||||
IPath mappingPath = settingPath.append(dirPath);
|
||||
File mappingFolder = mappingPath.toFile();
|
||||
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
|
||||
ICoreService service = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
service.syncMappingsFileFromSystemToProject();
|
||||
}
|
||||
}
|
||||
return mappingFolder.toURL();
|
||||
File mappingFolder = settingPath.append(dirPath).toFile();
|
||||
return mappingFolder.toURI().toURL();
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getSha1OfFile(File file) {
|
||||
String sha1 = null;
|
||||
FileInputStream fileInputStream = null;
|
||||
public static URL getProjectTempMappingFolder() {
|
||||
try {
|
||||
fileInputStream = new FileInputStream(file);
|
||||
sha1 = DigestUtils.shaHex(fileInputStream);
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
File folder = ResourceUtils
|
||||
.getFolder(project, RepositoryConstants.TEMP_DIRECTORY + "/" + INTERNAL_MAPPINGS_FOLDER, false).getLocation()
|
||||
.toFile();
|
||||
syncMappingFiles(folder, false);
|
||||
return folder.toURI().toURL();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace(); // Just print the exception for debug.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void syncMappingFiles(File target, boolean rename) {
|
||||
if (!target.exists()) {
|
||||
target.mkdir();
|
||||
}
|
||||
File[] arr = target.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (arr == null) {
|
||||
arr = new File[0];
|
||||
}
|
||||
try {
|
||||
Map<String, File> targetFileMap = Stream.of(arr).collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
Map<String, File> workingFileMap = getWorkingMappingFiles().stream()
|
||||
.collect(Collectors.toMap(f -> getTargetName(f, rename), Function.identity(), (f1, f2) -> f1));
|
||||
|
||||
targetFileMap.entrySet().stream().filter(entry -> !workingFileMap.containsKey(entry.getKey()))
|
||||
.forEach(entry -> entry.getValue().delete());
|
||||
|
||||
for (Entry<String, File> entry : workingFileMap.entrySet()) {
|
||||
String targetName = entry.getKey();
|
||||
File workingMappingFile = entry.getValue();
|
||||
boolean needUpdate = false;
|
||||
File targetMappingFile = targetFileMap.get(targetName);
|
||||
if (targetMappingFile == null) {
|
||||
targetMappingFile = new File(target, targetName);
|
||||
needUpdate = true;
|
||||
} else if (!getSha1OfFile(workingMappingFile).equals(getSha1OfFile(targetMappingFile))) {
|
||||
needUpdate = true;
|
||||
}
|
||||
if (needUpdate) {
|
||||
if (targetMappingFile.exists()) {
|
||||
targetMappingFile.delete();
|
||||
}
|
||||
FilesUtils.copyFile(workingMappingFile, targetMappingFile);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return sha1;
|
||||
}
|
||||
|
||||
public static String getTargetName(File file, boolean rename) {
|
||||
String targetName = file.getName();
|
||||
if (!rename) {
|
||||
return targetName;
|
||||
}
|
||||
try {
|
||||
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
|
||||
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
|
||||
Document document = analyser.parse(file);
|
||||
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
|
||||
String dbmsIdValue = "";
|
||||
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
|
||||
Node dbmsNode = dbmsNodes.item(iDbms);
|
||||
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
|
||||
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
|
||||
|
||||
}
|
||||
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
|
||||
final String[] fileNameSplit = targetName.split("_");
|
||||
String idA = "_id";
|
||||
String idB = "id_";
|
||||
final int indexA = dbmsIdValue.indexOf(idA);
|
||||
final int indexB = dbmsIdValue.indexOf(idB);
|
||||
String secondeName = "";
|
||||
if (indexA > 0) {
|
||||
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
|
||||
} else if (indexB == 0) {
|
||||
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
|
||||
} else if (indexA == -1 && indexB == -1) {
|
||||
secondeName = dbmsIdValue;
|
||||
}
|
||||
if (secondeName != null && !"".equals(secondeName)) {
|
||||
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
|
||||
}
|
||||
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return targetName;
|
||||
}
|
||||
|
||||
public static JSONObject getRevisionObject() {
|
||||
try {
|
||||
File revisonFile = new File(MetadataTalendType.getSystemFolderURLOfMappingsFile().getFile(),
|
||||
MetadataTalendType.FILE_MAPPING_REVISION);
|
||||
String jsonStr = new String(Files.readAllBytes(revisonFile.toPath()));
|
||||
return new JSONObject(jsonStr);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
|
||||
public static boolean restoreMappingFiles() throws Exception {
|
||||
List<File> toDelete = new ArrayList<>();
|
||||
JSONObject revision = getRevisionObject();
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
if (projectMappingFolder.exists()) {
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles != null) {
|
||||
for (File file : projectMappingFiles) {
|
||||
if (revision.has(file.getName())) {
|
||||
String sha1 = MetadataTalendType.getSha1OfFile(file);
|
||||
if (revision.getJSONObject(file.getName()).has(sha1)) {
|
||||
toDelete.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File xsd = new File(projectMappingFolder, "mapping_validate.xsd"); //$NON-NLS-1$
|
||||
if (xsd.exists()) {
|
||||
xsd.delete();
|
||||
}
|
||||
}
|
||||
toDelete.forEach(File::delete);
|
||||
return !toDelete.isEmpty();
|
||||
}
|
||||
|
||||
public static String getSha1OfFile(File file) {
|
||||
try {
|
||||
String text = new String(Files.readAllBytes(file.toPath()));
|
||||
return getSha1OfText(text);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getSha1OfText(String text) {
|
||||
text = text.replace("\r\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return DigestUtils.sha1Hex(text);
|
||||
}
|
||||
|
||||
public static void copyFile(File in, IFile out) throws CoreException, IOException {
|
||||
FileInputStream fis = new FileInputStream(in);
|
||||
if (out.exists()) {
|
||||
@@ -524,49 +652,6 @@ public final class MetadataTalendType {
|
||||
fis.close();
|
||||
}
|
||||
|
||||
public static void syncNewMappingFileToProject() throws SystemException {
|
||||
try {
|
||||
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
|
||||
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
|
||||
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
|
||||
File projectMappingFiles = new File(projectMappingFolder.getLocationURI());
|
||||
if (!sysMappingFiles.exists() || !projectMappingFiles.exists()) {
|
||||
return;
|
||||
}
|
||||
for (File sysMapping : sysMappingFiles.listFiles()) {
|
||||
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
|
||||
if (projectMapping.exists() && StringUtils.equals(sysMapping.getName(), "mapping_Greenplum.xml")) {
|
||||
|
||||
String sha1OfFile = DigestUtils.shaHex(projectMapping.getContents());
|
||||
String shalOfOldSystem = "8431f19215dacb3caa126778ae695954552cce2a";
|
||||
if (StringUtils.equals(sha1OfFile, shalOfOldSystem)) {
|
||||
copyFile(sysMapping, projectMapping);
|
||||
}
|
||||
}
|
||||
if (!projectMapping.exists()) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(sysMapping);
|
||||
projectMapping.create(fis, true, null);
|
||||
} catch (CoreException coreExc) {
|
||||
throw new SystemException(coreExc);
|
||||
} finally {
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException ioExc) {
|
||||
throw new SystemException(ioExc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Load db types and mapping with the current activated language (Java, Perl, ...).
|
||||
@@ -574,20 +659,38 @@ public final class MetadataTalendType {
|
||||
* @throws SystemException
|
||||
*/
|
||||
public static void loadCommonMappings() throws SystemException {
|
||||
URL url = getProjectForderURLOfMappingsFile();
|
||||
File dir = new File(url.getPath());
|
||||
metadataMappingFiles = new ArrayList<File>();
|
||||
dbmsSet.clear();
|
||||
if (dir.isDirectory()) {
|
||||
File[] files = dir.listFiles();
|
||||
for (File file : files) {
|
||||
if (file.getName().matches("^mapping_.*\\.xml$")) { //$NON-NLS-1$
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
}
|
||||
}
|
||||
for (File file : getWorkingMappingFiles()) {
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<File> getWorkingMappingFiles() throws SystemException {
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
File systemMappingFolder = new File(getSystemFolderURLOfMappingsFile().getFile());
|
||||
File[] systemMappingFiles = systemMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles == null || projectMappingFiles.length == 0) {
|
||||
return Arrays.asList(systemMappingFiles);
|
||||
}
|
||||
List<File> workingMappingFiles = new ArrayList<>();
|
||||
Map<String, File> projectMappingFilesMap = Stream.of(projectMappingFiles)
|
||||
.collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
workingMappingFiles.addAll(projectMappingFilesMap.values());
|
||||
Stream.of(systemMappingFiles).filter(f -> !projectMappingFilesMap.containsKey(f.getName()))
|
||||
.forEach(f -> workingMappingFiles.add(f));
|
||||
return workingMappingFiles;
|
||||
}
|
||||
|
||||
public static String getSha1OfSystemMappingFile(String fileName) {
|
||||
try {
|
||||
return getSha1OfFile(new File(getSystemFolderURLOfMappingsFile().getFile(), fileName));
|
||||
} catch (SystemException e) {
|
||||
ExceptionHandler.process(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMapping(File file) throws SystemException {
|
||||
|
||||
@@ -254,6 +254,7 @@ public final class ConvertionHelper {
|
||||
result.setContentModel(connection.isContextMode());
|
||||
result.setContextId(sourceConnection.getContextId());
|
||||
result.setContextName(sourceConnection.getContextName());
|
||||
result.setSupportNLS(sourceConnection.isSupportNLS());
|
||||
// handle oracle database connnection of general_jdbc.
|
||||
result.setSchema(getMeataConnectionSchema(result));
|
||||
convertOtherParameters(result, connection);
|
||||
|
||||
@@ -113,6 +113,7 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
|
||||
private String contextName;
|
||||
|
||||
private boolean supportNLS = false;
|
||||
// ~
|
||||
|
||||
private String comment;
|
||||
@@ -729,6 +730,14 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
public void setContextName(String contextName) {
|
||||
this.contextName = contextName;
|
||||
}
|
||||
|
||||
public boolean isSupportNLS() {
|
||||
return supportNLS;
|
||||
}
|
||||
|
||||
public void setSupportNLS(boolean supportNLS) {
|
||||
this.supportNLS = supportNLS;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -1225,6 +1225,11 @@ public class RepositoryToComponentProperty {
|
||||
return value2;
|
||||
|
||||
}
|
||||
|
||||
if(value.equals("SUPPORT_NLS")) {
|
||||
return connection.isSupportNLS();
|
||||
}
|
||||
|
||||
if (value.equals("CDC_TYPE_MODE")) { //$NON-NLS-1$
|
||||
return new Boolean(CDCTypeMode.LOG_MODE.getName().equals(connection.getCdcTypeMode()));
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package org.talend.core.model.metadata.designerproperties;
|
||||
* DOC talend class global comment. Detailled comment
|
||||
*/
|
||||
public enum SapJcoVersion {
|
||||
SAP2("sap jco 2.*", "sapjco.jar"), //$NON-NLS-1$
|
||||
SAP3("sap jco 3.*", "sapjco3.jar");//$NON-NLS-1$
|
||||
SAP2("sap jco 2.*", "sapjco.jar"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAP3("sap jco 3.*", "com.sap.conn.jco.sapjco.jar");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private String displayName;
|
||||
|
||||
|
||||
@@ -139,4 +139,8 @@ public enum EParameterFieldType {
|
||||
}
|
||||
return TEXT; // Default Value
|
||||
}
|
||||
|
||||
public static boolean isPassword(EParameterFieldType type) {
|
||||
return EParameterFieldType.PASSWORD.equals(type) || EParameterFieldType.LICENSEKEY.equals(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
import org.talend.commons.utils.generation.CodeGenerationUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
import org.talend.core.model.metadata.types.JavaType;
|
||||
@@ -37,6 +38,7 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.utils.JavaResourcesHelper;
|
||||
import org.talend.core.model.utils.SQLPatternUtils;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IDesignerXMLMapperService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
@@ -293,8 +295,7 @@ public final class ElementParameterParser {
|
||||
|
||||
List<IElementParameter> params = (List<IElementParameter>) element.getElementParametersWithChildrens();
|
||||
if (params != null && !params.isEmpty()) {
|
||||
for (int i = 0; i < params.size(); i++) {
|
||||
IElementParameter param = params.get(i);
|
||||
for (IElementParameter param : params) {
|
||||
if (text.indexOf(param.getVariableName()) != -1
|
||||
|| (param.getVariableName() != null && param.getVariableName().contains(text))) {
|
||||
if (param.getFieldType() == EParameterFieldType.TABLE) {
|
||||
@@ -422,8 +423,8 @@ public final class ElementParameterParser {
|
||||
}
|
||||
IElementParameter param;
|
||||
|
||||
for (int i = 0; i < element.getElementParameters().size(); i++) {
|
||||
param = element.getElementParameters().get(i);
|
||||
for (IElementParameter element2 : element.getElementParameters()) {
|
||||
param = element2;
|
||||
if (text.indexOf(param.getVariableName()) != -1) {
|
||||
if (param.getFieldType() == EParameterFieldType.TABLE) {
|
||||
return createTableValuesXML((List<Map<String, Object>>) param.getValue(), param);
|
||||
@@ -483,7 +484,21 @@ public final class ElementParameterParser {
|
||||
if (element instanceof INode) {
|
||||
INode node = (INode) element;
|
||||
if (node.getExternalNode() != null) {
|
||||
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
|
||||
Object obj = null;
|
||||
if (node.isVirtualGenerateNode()) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerXMLMapperService.class)) {
|
||||
final IDesignerXMLMapperService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IDesignerXMLMapperService.class);
|
||||
if (service != null) {
|
||||
obj = service.rebuildXmlMapData(node.getExternalNode());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj != null) {
|
||||
return obj;
|
||||
} else {
|
||||
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -496,8 +511,8 @@ public final class ElementParameterParser {
|
||||
}
|
||||
IElementParameter param;
|
||||
newText = text;
|
||||
for (int i = 0; i < element.getElementParameters().size(); i++) {
|
||||
param = element.getElementParameters().get(i);
|
||||
for (IElementParameter element2 : element.getElementParameters()) {
|
||||
param = element2;
|
||||
if (newText.contains(param.getVariableName())) {
|
||||
String value = getDisplayValue(param);
|
||||
newText = newText.replace(param.getVariableName(), value);
|
||||
|
||||
@@ -58,6 +58,11 @@ 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();
|
||||
|
||||
@@ -728,6 +728,46 @@ public final class ProcessUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean isRoute(Property property) {
|
||||
return property!= null && (ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE) ||
|
||||
ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE_MICROSERVICE));
|
||||
}
|
||||
|
||||
public static boolean isRouteWithChildJobs(IProcess process) {
|
||||
|
||||
if (process instanceof IProcess2) {
|
||||
Property p = ((IProcess2) process).getProperty();
|
||||
if (isRoute(p)) {
|
||||
return false;
|
||||
}
|
||||
Item item = p.getItem();
|
||||
return isRouteWithChildJobs(item);
|
||||
} else {
|
||||
for (INode node : process.getGraphicalNodes()) {
|
||||
if (node.getComponent().getName().equals("cTalendJob")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isRouteWithChildJobs(Item item) {
|
||||
|
||||
if (item!= null && item instanceof ProcessItem) {
|
||||
for (Object obj : ((ProcessItem) item).getProcess().getNode()) {
|
||||
if (obj instanceof NodeType) {
|
||||
if (((NodeType) obj).getComponentName().equals("cTalendJob")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static int getAssertAmount(IProcess process) {
|
||||
int count = 0;
|
||||
@@ -1046,6 +1086,18 @@ public final class ProcessUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("cHttp".equals(node.getComponentName())) {
|
||||
for (Object elementParameter : node.getElementParameter()) {
|
||||
ElementParameterType elementParameterType = (ElementParameterType)elementParameter;
|
||||
|
||||
String name = elementParameterType.getName();
|
||||
String value = elementParameterType.getValue();
|
||||
|
||||
if ("SERVER".equals(name) && (value != null && "true".equals(value.toString()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -54,4 +54,10 @@ public interface IRepositoryPrefConstants {
|
||||
public static final String REF_PROJECT_BRANCH_SETTING = "ref_project_branch_setting";
|
||||
|
||||
public static final String ITEM_EXPORT_DEPENDENCIES = "item_export_dependencies";
|
||||
|
||||
public static final String ITEM_IMPORT_DEPENDENCIES = "item_import_dependencies";
|
||||
|
||||
public static final String ITEM_IMPORT_BRANCH_DEPENDENCIES = "item_import_from_branch_dependencies";
|
||||
|
||||
public static final String ITEM_DISABLE_SCREENSHOT = "item_disable_screenshot";
|
||||
}
|
||||
|
||||
@@ -2023,8 +2023,8 @@ public abstract class RepositoryUpdateManager {
|
||||
|
||||
};
|
||||
repositoryUpdateManager.checkAddContextGroup = detectAddContextGroup;
|
||||
repositoryUpdateManager.isConfigContextGroup = repositoryContextManager.isConfigContextGroup();
|
||||
if (repositoryContextManager != null) {
|
||||
repositoryUpdateManager.isConfigContextGroup = repositoryContextManager.isConfigContextGroup();
|
||||
// add for bug 9119 context group
|
||||
Map<ContextItem, List<IContext>> repositoryContextGroupMap = new HashMap<ContextItem, List<IContext>>();
|
||||
List<IContext> addGroupContext = repositoryContextManager.getAddGroupContext();
|
||||
|
||||
@@ -310,8 +310,8 @@ public enum UpdateManagerProviderDetector {
|
||||
Item item = node.getObject().getProperty().getItem();
|
||||
List<Relation> allRelations = new ArrayList<Relation>();
|
||||
if (node.getObject() != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(item.getProperty().getId(),
|
||||
RelationshipItemBuilder.LATEST_VERSION, RelationshipItemBuilder.PROPERTY_RELATION);
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsHaveRelationWith(item.getProperty().getId(),
|
||||
RelationshipItemBuilder.LATEST_VERSION);
|
||||
if (relations != null && relations.size() > 0) {
|
||||
allRelations.addAll(relations);
|
||||
}
|
||||
|
||||
@@ -1492,4 +1492,29 @@ public class NodeUtil {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* TUP-32758:Used to judge if two components are compatible from name
|
||||
* for example tAmazonMysqlConnection and tMysqlConnection ,tAmazonOracleCommit and tOracleCommit
|
||||
*/
|
||||
public static boolean isCompatibleByName(String componentName1, String componentName2) {
|
||||
boolean isCompatable = false;
|
||||
if ( componentName1 ==null || componentName2 == null
|
||||
|| componentName1.length()<1 || componentName2.length() < 1) return false;
|
||||
if (componentName1.replaceFirst("t", "tAmazon").equals(componentName2) ||
|
||||
componentName2.replaceFirst("t", "tAmazon").equals(componentName1)) {
|
||||
isCompatable = true;
|
||||
}
|
||||
return isCompatable;
|
||||
}
|
||||
|
||||
public static boolean isDatabaseFamily(String orginalFamilyName) {
|
||||
boolean isDatabaseFamily = false;
|
||||
String rootFamily = "";
|
||||
rootFamily = orginalFamilyName != null ? orginalFamilyName.split("/")[0] : "";
|
||||
if (rootFamily.equals("Databases")) {
|
||||
isDatabaseFamily = true;
|
||||
}
|
||||
return isDatabaseFamily;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,4 +79,8 @@ public final class TalendPropertiesUtil {
|
||||
public static String getProductApp() {
|
||||
return System.getProperty(PROD_APP);
|
||||
}
|
||||
|
||||
public static boolean isEnabledUseShortJobletName() {
|
||||
return isEnabled("talend.job.build.useShortJobletName"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* created by wchen on 2015年6月16日 Detailled comment
|
||||
@@ -255,7 +256,7 @@ public class TalendLibsServerManager {
|
||||
if (enableProxyFlag) {
|
||||
serverBean.setServer(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_URL));
|
||||
serverBean.setUserName(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_USERNAME));
|
||||
serverBean.setPassword(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD));
|
||||
serverBean.setPassword(StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM).decrypt(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD)));
|
||||
serverBean.setRepositoryId(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_REPOSITORY_ID));
|
||||
serverBean.setType(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_TYPE));
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ import org.ops4j.pax.url.mvn.MavenResolver;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.service.cm.ManagedService;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.network.IProxySelectorProvider;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
@@ -47,39 +45,6 @@ public class TalendMavenResolver {
|
||||
|
||||
private static MavenResolver mavenResolver = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC wchen TalendMavenResolver constructor comment.
|
||||
*/
|
||||
static {
|
||||
// the tracker is use in case the service is modifed
|
||||
final BundleContext context = CoreRuntimePlugin.getInstance().getBundle().getBundleContext();
|
||||
ServiceTracker<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver> serviceTracker = new ServiceTracker<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver>(
|
||||
context, org.ops4j.pax.url.mvn.MavenResolver.class,
|
||||
new ServiceTrackerCustomizer<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver>() {
|
||||
|
||||
@Override
|
||||
public org.ops4j.pax.url.mvn.MavenResolver addingService(
|
||||
ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference) {
|
||||
return context.getService(reference);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifiedService(ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference,
|
||||
org.ops4j.pax.url.mvn.MavenResolver service) {
|
||||
mavenResolver = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removedService(ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference,
|
||||
org.ops4j.pax.url.mvn.MavenResolver service) {
|
||||
mavenResolver = null;
|
||||
}
|
||||
});
|
||||
serviceTracker.open();
|
||||
}
|
||||
|
||||
public static void updateMavenResolver(String resolverKey, Dictionary<String, String> props) throws Exception {
|
||||
if (!needUpdate(resolverKey)) {
|
||||
return;
|
||||
|
||||
@@ -210,6 +210,14 @@ public class ProjectPreferenceManager {
|
||||
setValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, isAllow);
|
||||
}
|
||||
|
||||
public boolean isDisableScreenshot() {
|
||||
return getPreferenceStore().getBoolean(IRepositoryPrefConstants.ITEM_DISABLE_SCREENSHOT);
|
||||
}
|
||||
|
||||
public void setDisableScreenshot(boolean isDisable) {
|
||||
getPreferenceStore().setValue(IRepositoryPrefConstants.ITEM_DISABLE_SCREENSHOT, isDisable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the configurations.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.runtime.services;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
@@ -25,6 +30,10 @@ public interface IDesignerMavenService extends IService {
|
||||
|
||||
void updateCodeJarMavenProject(CodesJarInfo info, boolean needReSync) throws Exception;
|
||||
|
||||
void enableMavenNature(IProgressMonitor monitor, IProject project);
|
||||
|
||||
void addProjectClasspathEntry(IProgressMonitor monitor, IProject project, List<IClasspathEntry> entries);
|
||||
|
||||
public static IDesignerMavenService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMavenService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IDesignerMavenService.class);
|
||||
|
||||
@@ -27,47 +27,12 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IUpdateService;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
import org.talend.utils.string.DigestUtil;
|
||||
|
||||
public class SharedStudioUtils {
|
||||
|
||||
public static final String FILE_EXTRA_FEATURE_INDEX = "extra_feature.index"; //$NON-NLS-1$
|
||||
|
||||
public static final String SIGNATURE_FILE_NAME_SUFFIX = ".sig"; //$NON-NLS-1$
|
||||
public static final String PROP_DEVMODE = "osgi.dev"; //$NON-NLS-1$
|
||||
|
||||
public static boolean updateExtraFeatureFile() {
|
||||
File userConfigFolder = new File(Platform.getConfigurationLocation().getURL().getPath());
|
||||
File studioConfigFolder = new File(Platform.getInstallLocation().getURL().getPath(), "configuration");//$NON-NLS-1$
|
||||
if (!userConfigFolder.getAbsolutePath().equals(studioConfigFolder.getAbsolutePath())) {
|
||||
File studioExtraFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX);
|
||||
File studioExtraSignFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
|
||||
File userExtraFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX);
|
||||
File userExtraSignFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
|
||||
boolean isNeedUpdate = false;
|
||||
if (!studioExtraSignFile.exists() && userExtraSignFile.exists()) {
|
||||
userExtraSignFile.delete();
|
||||
if (userExtraFile.exists()) {
|
||||
userExtraFile.delete();
|
||||
}
|
||||
return true;
|
||||
} else if (studioExtraSignFile.exists()) {
|
||||
isNeedUpdate = true;
|
||||
}
|
||||
if (isNeedUpdate) {
|
||||
try {
|
||||
FilesUtils.copyFile(studioExtraFile, userExtraFile);
|
||||
FilesUtils.copyFile(studioExtraSignFile, userExtraSignFile);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isSharedStudioMode() {
|
||||
if (isDevEnvironment()) {
|
||||
return false;
|
||||
|
||||
@@ -30,4 +30,6 @@ public interface IDesignerXMLMapperService extends IService {
|
||||
*/
|
||||
public boolean isVirtualComponent(final INode node);
|
||||
|
||||
public Object rebuildXmlMapData(final INode node);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
package org.talend.core.service;
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
@@ -14,6 +15,8 @@ public interface IResourcesDependenciesService extends IService {
|
||||
|
||||
public String getResourcePathForContext(IProcess process, String resourceContextValue);
|
||||
|
||||
public String getResourcePathForContext(IProcess process, String resourceContextValue, boolean forceRelative);
|
||||
|
||||
public String getResourceItemFilePath(String resourceContextValue);
|
||||
|
||||
public void refreshDependencyViewer();
|
||||
@@ -21,4 +24,12 @@ public interface IResourcesDependenciesService extends IService {
|
||||
public void setContextParameterChangeDirtyManually();
|
||||
|
||||
public void removeBuildJobCacheForResource(String resourceId);
|
||||
|
||||
public static IResourcesDependenciesService get() {
|
||||
GlobalServiceRegister register = GlobalServiceRegister.getDefault();
|
||||
if (register.isServiceRegistered(IResourcesDependenciesService.class)) {
|
||||
return register.getService(IResourcesDependenciesService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,6 +264,40 @@ public final class TalendQuoteUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isStartEndsWithQuotation(String expression, boolean checkStart, boolean checkEnd) {
|
||||
if (StringUtils.isBlank(expression)) {
|
||||
return false;
|
||||
}
|
||||
boolean startsWith = false;
|
||||
boolean endsWith = false;
|
||||
|
||||
ECodeLanguage language = LanguageManager.getCurrentLanguage();
|
||||
switch (language) {
|
||||
case JAVA:
|
||||
startsWith = expression.startsWith(QUOTATION_MARK);
|
||||
endsWith = expression.endsWith(QUOTATION_MARK);
|
||||
if (checkStart && checkEnd) {
|
||||
return startsWith & endsWith;
|
||||
} else if (checkStart) {
|
||||
return startsWith;
|
||||
} else if (checkEnd) {
|
||||
return endsWith;
|
||||
}
|
||||
default: // PERL
|
||||
startsWith = expression.startsWith(SINGLE_QUOTE);
|
||||
endsWith = expression.endsWith(SINGLE_QUOTE);
|
||||
if (checkStart && checkEnd) {
|
||||
return startsWith & endsWith;
|
||||
} else if (checkStart) {
|
||||
return startsWith;
|
||||
} else if (checkEnd) {
|
||||
return endsWith;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String removeQuotes(String text, String quotation) {
|
||||
if (text == null) {
|
||||
return null;
|
||||
@@ -429,6 +463,8 @@ public final class TalendQuoteUtils {
|
||||
return QUOTATION_MARK;
|
||||
case H2:
|
||||
return QUOTATION_ESC_MARK;
|
||||
case SNOWFLAKE:
|
||||
return QUOTATION_MARK;
|
||||
// case JAVADB_DERBYCLIENT:
|
||||
// return QUOTATION_MARK;
|
||||
// case JAVADB_JCCJDBC:
|
||||
|
||||
@@ -196,6 +196,7 @@ public abstract class AbstractTalendFunctionParser extends AbstractFunctionParse
|
||||
function.setName(funcName);
|
||||
function.setDescription(des);
|
||||
function.setParameters(Arrays.asList(paras));
|
||||
function.setFullQualifiedName(fullName);
|
||||
if (!category.equals(EMPTY_STRING)) {
|
||||
function.setCategory(category);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
import org.talend.utils.json.JSONException;
|
||||
@@ -45,6 +46,10 @@ public class Function implements Cloneable {
|
||||
|
||||
private boolean isUserDefined;
|
||||
|
||||
private boolean rountineJarDependencyMissing = true;
|
||||
|
||||
private String fullQualifiedName;
|
||||
|
||||
/**
|
||||
* yzhang Function constructor comment.
|
||||
*/
|
||||
@@ -517,6 +522,40 @@ public class Function implements Cloneable {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getFullQualifiedName() {
|
||||
return fullQualifiedName;
|
||||
}
|
||||
|
||||
public void setFullQualifiedName(String fullQualifiedName) {
|
||||
this.fullQualifiedName = fullQualifiedName;
|
||||
}
|
||||
|
||||
public String getRoutineJarName() {
|
||||
String[] fqns = fullQualifiedName.split("\\.");
|
||||
if (fqns.length > 1) {
|
||||
return fqns[fqns.length - 2];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isRoutineJar() {
|
||||
if (this.fullQualifiedName == null || this.fullQualifiedName.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return this.fullQualifiedName.contains("." + JavaUtils.JAVA_ROUTINESJAR_DIRECTORY + ".");
|
||||
}
|
||||
|
||||
public boolean isRoutineJarDependencyMissing() {
|
||||
if (!this.isRoutineJar()) {
|
||||
return false;
|
||||
}
|
||||
return this.rountineJarDependencyMissing;
|
||||
}
|
||||
|
||||
public void setRountineJarDependencyMissing(boolean rountineJarDependencyMissing) {
|
||||
this.rountineJarDependencyMissing = rountineJarDependencyMissing;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public String toSerialized() throws JSONException {
|
||||
JSONObject functionObj = new JSONObject();
|
||||
|
||||
@@ -109,6 +109,11 @@ public class FunctionManager {
|
||||
parser = new RoutineFunctionParser();
|
||||
parser.parse();
|
||||
talendTypes = parser.getList();
|
||||
|
||||
parser = new RoutineJarsFunctionParser();
|
||||
parser.parse();
|
||||
talendTypes.addAll(parser.getList());
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.designer.rowgenerator.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.jdt.core.ICompilationUnit;
|
||||
import org.eclipse.jdt.core.IJavaElement;
|
||||
import org.eclipse.jdt.core.IMember;
|
||||
import org.eclipse.jdt.core.IMethod;
|
||||
import org.eclipse.jdt.core.IPackageFragment;
|
||||
import org.eclipse.jdt.core.IPackageFragmentRoot;
|
||||
import org.eclipse.jdt.core.IType;
|
||||
import org.eclipse.jdt.core.JavaModelException;
|
||||
import org.eclipse.jdt.internal.core.SourceType;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.Project;
|
||||
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.repository.IRepositoryObject;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.impl.ProcessTypeImpl;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryService;
|
||||
|
||||
/**
|
||||
* Created by bhe on Jun 24, 2021
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RoutineJarsFunctionParser extends AbstractTalendFunctionParser {
|
||||
|
||||
public static final String MAVEN_PLUGIN_ID = "org.talend.designer.maven";
|
||||
|
||||
private List<String> systems = new ArrayList<String>();
|
||||
|
||||
private final Set<CodesJarInfo> infos = new HashSet<CodesJarInfo>();
|
||||
|
||||
public RoutineJarsFunctionParser() {
|
||||
super();
|
||||
initProcessCodesJarInfo();
|
||||
}
|
||||
|
||||
private void initProcessCodesJarInfo() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
IRepositoryObject process = (IRepositoryObject) service.getActiveProcess();
|
||||
|
||||
if (process == null || process.getProperty() == null || process.getProperty().getItem() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Item processItem = process.getProperty().getItem();
|
||||
|
||||
Set<CodesJarInfo> allSet = CodesJarResourceCache.getAllCodesJars();
|
||||
Set<RoutinesParameterType> rps = new HashSet<RoutinesParameterType>();
|
||||
if (processItem instanceof ProcessItem) {
|
||||
ProcessType pt = ((ProcessItem) processItem).getProcess();
|
||||
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
|
||||
// if it is test process
|
||||
int pidFeature = TalendFilePackage.PROCESS_TYPE_FEATURE_COUNT + 2;
|
||||
int versionFeature = TalendFilePackage.PROCESS_TYPE_FEATURE_COUNT + 4;
|
||||
ProcessTypeImpl pi = (ProcessTypeImpl) pt;
|
||||
if (pi.eClass() != null && StringUtils.equals(pi.eClass().getName(), "TestContainer")) {
|
||||
|
||||
try {
|
||||
Object pid = pi.eGet(pidFeature, true, false);
|
||||
Object version = pi.eGet(versionFeature, true, false);
|
||||
if (pid != null) {
|
||||
IProxyRepositoryService svc = IProxyRepositoryService.get();
|
||||
try {
|
||||
List<IRepositoryViewObject> vos = svc.getProxyRepositoryFactory().getAllVersion(pid.toString());
|
||||
for (IRepositoryViewObject vo : vos) {
|
||||
if (StringUtils.equals(vo.getVersion(), String.valueOf(version))) {
|
||||
Item parentProcessItem = vo.getProperty().getItem();
|
||||
if (parentProcessItem instanceof ProcessItem) {
|
||||
pt = ((ProcessItem) parentProcessItem).getProcess();
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
} else if (processItem instanceof JobletProcessItem) {
|
||||
ProcessType pt = ((JobletProcessItem) processItem).getJobletProcess();
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
}
|
||||
|
||||
if (!rps.isEmpty()) {
|
||||
rps.forEach(rp -> {
|
||||
for (CodesJarInfo info : allSet) {
|
||||
if (StringUtils.equals(info.getId(), rp.getId())) {
|
||||
infos.add(info);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("restriction")
|
||||
public void parse() {
|
||||
typeMethods.clear();
|
||||
try {
|
||||
|
||||
Set<CodesJarInfo> jarInfos = CodesJarResourceCache.getAllCodesJars();
|
||||
|
||||
jarInfos.forEach(e -> {
|
||||
try {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
ITalendProcessJavaProject talendProcessJavaProject = service.getTalendCodesJarJavaProject(e);
|
||||
if (talendProcessJavaProject != null) {
|
||||
IFolder srcFolder = talendProcessJavaProject.getSrcFolder();
|
||||
IPackageFragmentRoot root = talendProcessJavaProject.getJavaProject()
|
||||
.getPackageFragmentRoot(srcFolder);
|
||||
final List<IJavaElement> elements = new ArrayList<IJavaElement>();
|
||||
|
||||
addEveryProjectElements(root, elements,
|
||||
getGroupId() + "." + JavaUtils.JAVA_ROUTINESJAR_DIRECTORY + "." + e.getLabel().toLowerCase());
|
||||
|
||||
// for (IJavaElement element : elements) {
|
||||
// see bug 8055,reversal the getLastName() method
|
||||
for (int i = elements.size(); i > 0; i--) {
|
||||
IJavaElement element = elements.get(i - 1);
|
||||
if (element instanceof ICompilationUnit) {
|
||||
ICompilationUnit compilationUnit = (ICompilationUnit) element;
|
||||
IType[] types = compilationUnit.getAllTypes();
|
||||
if (types.length > 0) {
|
||||
// SourceType sourceType = (SourceType) types[0];
|
||||
IMember sourceType = types[0];
|
||||
if (sourceType != null) {
|
||||
// processSourceType(sourceType, sourceType.getElementName(),
|
||||
// sourceType.getFullyQualifiedName(),
|
||||
// sourceType.getElementName(), false);
|
||||
processSourceType(sourceType, sourceType.getElementName(),
|
||||
types[0].getFullyQualifiedName(), sourceType.getElementName(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.talend.designer.rowgenerator.data.AbstractTalendFunctionParser#processSourceType(org.eclipse.jdt.internal
|
||||
* .core.SourceType)
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
@Override
|
||||
protected void processSourceType(IMember member, String className, String fullName, String funcName, boolean isSystem) {
|
||||
try {
|
||||
if (member instanceof SourceType) {
|
||||
IMethod[] methods = ((SourceType) member).getMethods();
|
||||
for (IMethod method : methods) {
|
||||
super.processSourceType(method, className, fullName, method.getElementName(), systems.contains(className));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.designer.rowgenerator.data.AbstractTalendFunctionParser#getPackageFragment()
|
||||
*/
|
||||
@Override
|
||||
protected String getPackageFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ITalendProcessJavaProject getTalendCodeProject() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Function parseJavaCommentToFunctions(String string, String className, String fullName, String funcName,
|
||||
boolean isSystem) {
|
||||
Function func = super.parseJavaCommentToFunctions(string, className, fullName, funcName, isSystem);
|
||||
|
||||
// set routine jars dependency missing or not
|
||||
infos.forEach(info -> {
|
||||
if (func.getRoutineJarName().equals(info.getLabel().toLowerCase())) {
|
||||
func.setRountineJarDependencyMissing(false);
|
||||
}
|
||||
});
|
||||
|
||||
return func;
|
||||
}
|
||||
|
||||
protected void addEveryProjectElements(IPackageFragmentRoot root, List<IJavaElement> elements, String packageFragment)
|
||||
throws JavaModelException {
|
||||
if (root == null || elements == null) {
|
||||
return;
|
||||
}
|
||||
// system
|
||||
IPackageFragment Pkg = root.getPackageFragment(packageFragment);
|
||||
if (Pkg != null && Pkg.exists()) {
|
||||
elements.addAll(Arrays.asList(Pkg.getChildren()));
|
||||
}
|
||||
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
|
||||
// referenced project.
|
||||
projectManager.retrieveReferencedProjects();
|
||||
for (Project p : projectManager.getReferencedProjects()) {
|
||||
IPackageFragment userPkg = root.getPackageFragment(packageFragment + "." + p.getLabel().toLowerCase()); //$NON-NLS-1$
|
||||
if (userPkg != null && userPkg.exists()) {
|
||||
elements.addAll(Arrays.asList(userPkg.getChildren()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getGroupId() {
|
||||
Project p = ProjectManager.getInstance().getCurrentProject();
|
||||
ProjectPreferenceManager preferenceManager = new ProjectPreferenceManager(p, MAVEN_PLUGIN_ID, false);
|
||||
return preferenceManager.getValue(MavenConstants.PROJECT_GROUPID);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,6 +39,7 @@ import org.talend.core.model.process.JobInfo;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
@@ -132,7 +133,7 @@ public interface IRunProcessService extends IService {
|
||||
public void updateLibraries(Set<ModuleNeeded> jobModuleList, IProcess process, Set<ModuleNeeded> alreadyRetrievedModules)
|
||||
throws ProcessorException;
|
||||
|
||||
public void updateLibraries(Item routineItem);
|
||||
public boolean updateLibraries(Item routineItem);
|
||||
|
||||
public void refreshView();
|
||||
|
||||
@@ -233,6 +234,8 @@ public interface IRunProcessService extends IService {
|
||||
|
||||
void clearProjectRelatedSettings();
|
||||
|
||||
void clearAllBuildCaches();
|
||||
|
||||
void batchDeleteAllVersionTalendJobProject(List<String> idList);
|
||||
|
||||
boolean isExportConfig();
|
||||
@@ -271,5 +274,9 @@ public interface IRunProcessService extends IService {
|
||||
|
||||
void deleteTalendCodesJarProject(ERepositoryObjectType type, String projectTechName, String codesJarName,
|
||||
boolean deleteContent);
|
||||
|
||||
public void deleteOldVersionTalendJobProject(IRepositoryViewObject object);
|
||||
|
||||
public void checkAndUpdateDaikonDependencies();
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.Map;
|
||||
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
@@ -565,4 +566,8 @@ public interface IProxyRepositoryFactory {
|
||||
|
||||
public void batchDeleteObjectPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList)
|
||||
throws PersistenceException;
|
||||
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
|
||||
|
||||
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException;
|
||||
}
|
||||
|
||||
@@ -636,6 +636,7 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
visibleItemCount = 20;
|
||||
}
|
||||
contextsCombo.setVisibleItemCount(visibleItemCount);
|
||||
contextsCombo.getParent().getParent().pack();
|
||||
}
|
||||
|
||||
private void checkContextGroupSource() {
|
||||
|
||||
@@ -337,7 +337,6 @@ 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));
|
||||
|
||||
@@ -379,8 +379,11 @@ public class MetadataDialog extends Dialog {
|
||||
metadataTableEditor = new MetadataTableEditor(outputMetaTable, titleOutput);
|
||||
}
|
||||
//enable dbcolumn manipulate feature only on Database output component
|
||||
String nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
String rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
String nodeFamily = "", rootFamily = "";
|
||||
if ( outputNode != null && outputNode.getComponent() != null ) {
|
||||
nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
}
|
||||
if (rootFamily.equals("Databases")) {
|
||||
outputMetaView = new DialogMetadataDBOutputTableEditorView(composite, SWT.NONE, metadataTableEditor, outputReadOnly, true,
|
||||
true, false);
|
||||
@@ -555,8 +558,11 @@ public class MetadataDialog extends Dialog {
|
||||
metadataTableEditorForOutput = new MetadataTableEditor(outputMetaTable, titleOutput + " (Output)");
|
||||
}
|
||||
//Enable dbcolumn manipulate feature only on Database output component
|
||||
String nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
String rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
String nodeFamily = "", rootFamily = "";
|
||||
if ( outputNode != null && outputNode.getComponent() != null ) {
|
||||
nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
}
|
||||
if (rootFamily.equals("Databases")) {
|
||||
outputMetaView = new DialogMetadataDBOutputTableEditorView(compositesSachForm.getRightComposite(), SWT.NONE,
|
||||
metadataTableEditorForOutput, outputReadOnly, true, true, false);
|
||||
|
||||
@@ -78,6 +78,7 @@ public class RoutinesFunctionProposal implements IContentProposal {
|
||||
message += Messages.getString("RoutinesFunctionProposal.CreatedBy");
|
||||
message += Messages.getString("RoutinesFunctionProposal.ReturnType");
|
||||
message += Messages.getString("RoutinesFunctionProposal.VariableName");
|
||||
message = message.replaceAll("\n", System.getProperty("line.separator", "\n")); // for display on Windows platform
|
||||
|
||||
MessageFormat format = new MessageFormat(message);
|
||||
Object[] args = new Object[] { function.getDescription(),
|
||||
|
||||
@@ -134,7 +134,7 @@ public final class TokenInforUtil {
|
||||
targetArray = new JSONArray();
|
||||
Map<String,List<JSONObject>> objectMap = new HashMap<String,List<JSONObject>>();
|
||||
for (Object obj : data) {
|
||||
if((obj instanceof JSONObject) && ((JSONObject)obj).get("component_name")!=null){//$NON-NLS-1$
|
||||
if((obj instanceof JSONObject) && ((JSONObject)obj).has("component_name") && ((JSONObject)obj).get("component_name")!=null){//$NON-NLS-1$
|
||||
List<JSONObject> dataList = new ArrayList<JSONObject>();
|
||||
String componentName = (String) ((JSONObject)obj).get("component_name");//$NON-NLS-1$
|
||||
if(objectMap.containsKey(componentName)){
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-api-2.12.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-core-2.12.1.jar"/>
|
||||
<classpathentry kind="src" path="src/main/java/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-api-2.17.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-core-2.17.1.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/main/java/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -55,6 +55,6 @@ Export-Package: org.talend.core,
|
||||
org.talend.core.views,
|
||||
org.talend.designer.runprocess
|
||||
Import-Package: org.apache.commons.collections4.map
|
||||
Bundle-ClassPath: lib/log4j-api-2.12.1.jar,
|
||||
lib/log4j-core-2.12.1.jar,
|
||||
.
|
||||
Bundle-ClassPath: .,
|
||||
lib/log4j-api-2.17.1.jar,
|
||||
lib/log4j-core-2.17.1.jar
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -12,20 +12,10 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
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;
|
||||
@@ -40,15 +30,12 @@ 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;
|
||||
@@ -74,16 +61,9 @@ 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
|
||||
@@ -354,121 +334,15 @@ 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
|
||||
|
||||
@@ -374,6 +374,13 @@ public class TalendTextUtils {
|
||||
// for bug 12092
|
||||
boolean isSqlKeyword = KeywordsValidator.isSqlKeyword(temp, name.getProduct());
|
||||
|
||||
/*******************************************
|
||||
* This is a temp fix for snowflake database https://jira.talendforge.org/browse/TUP-31883
|
||||
*******************************************/
|
||||
if (EDatabaseTypeName.GENERAL_JDBC.equals(name) && temp.toUpperCase().equals("KEY")) {
|
||||
isSqlKeyword = false;
|
||||
}
|
||||
|
||||
boolean isH2 = EDatabaseTypeName.H2 == name;
|
||||
|
||||
// if the database type is IBMDB2/ORACLE and the field name contain lowercase character, should add quotes
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuild
|
||||
import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
@@ -56,19 +57,20 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.jdt.core.IClasspathAttribute;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.eclipse.jdt.core.JavaCore;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
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;
|
||||
@@ -98,6 +100,7 @@ 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;
|
||||
@@ -111,14 +114,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;
|
||||
import org.talend.core.services.ICoreTisService;
|
||||
import org.talend.core.services.ISVNProviderService;
|
||||
@@ -147,8 +149,6 @@ 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
|
||||
*/
|
||||
@@ -198,6 +198,8 @@ public class ProcessorUtilities {
|
||||
private static boolean isDynamicJobAndCITest = false;
|
||||
|
||||
private static JobInfo mainJobInfo;
|
||||
|
||||
private static boolean needExportItemsForDQ = false;
|
||||
|
||||
public static void addOpenEditor(IEditorPart editor) {
|
||||
openedEditors.add(editor);
|
||||
@@ -286,6 +288,7 @@ public class ProcessorUtilities {
|
||||
exportAsOSGI = false;
|
||||
exportTimeStamp = null;
|
||||
exportJobAsMicroService = false;
|
||||
needExportItemsForDQ = false;
|
||||
}
|
||||
|
||||
public static String getInterpreter() {
|
||||
@@ -699,7 +702,8 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
copyDQDroolsToSrc(selectedProcessItem);
|
||||
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.
|
||||
@@ -715,6 +719,8 @@ public class ProcessorUtilities {
|
||||
*/
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
|
||||
checkNeedExportItemsForDQ(currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
@@ -736,30 +742,10 @@ public class ProcessorUtilities {
|
||||
boolean hasDynamicMetadata = hasMetadataDynamic(currentProcess, jobInfo);
|
||||
LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), hasDynamicMetadata);
|
||||
if (hasDynamicMetadata) {
|
||||
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);
|
||||
ITalendProcessJavaProject talendJavaProject = jobInfo.getProcessor().getTalendJavaProject();
|
||||
if (talendJavaProject != null) {
|
||||
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
|
||||
MetadataTalendType.syncMappingFiles(xmlMappingFolder.getLocation().toFile(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1243,7 +1229,7 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
copyDQDroolsToSrc(selectedProcessItem);
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor,
|
||||
currentProcess, currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
@@ -1260,6 +1246,8 @@ public class ProcessorUtilities {
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
TimeMeasure.step(idTimer, "generateBuildInfo");
|
||||
|
||||
checkNeedExportItemsForDQ(currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
@@ -1273,39 +1261,6 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
private static void syncContextResourcesForParentJob(IProcess currentProcess, IProgressMonitor progressMonitor) {
|
||||
ITalendProcessJavaProject processJavaProject = mainJobInfo.getProcessor().getTalendJavaProject();
|
||||
|
||||
final IFolder mainResourcesFolder = processJavaProject.getExternalResourcesFolder();
|
||||
final File targetFolder = mainResourcesFolder.getLocation().toFile();
|
||||
|
||||
final Set<JobInfo> dependenciesItems = mainJobInfo.getProcessor().getBuildChildrenJobs();
|
||||
|
||||
final IRunProcessService runProcessService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(
|
||||
IRunProcessService.class);
|
||||
|
||||
List<ProcessItem> dependenciesItemsFiltered = dependenciesItems.stream().filter(jobInfo -> !jobInfo.isJoblet())
|
||||
.map(JobInfo::getProcessItem).collect(Collectors.toList());
|
||||
|
||||
if (dependenciesItemsFiltered.size() > 0) {
|
||||
dependenciesItemsFiltered.forEach(item -> {
|
||||
ITalendProcessJavaProject childJavaProject = runProcessService.getTalendJobJavaProject(item.getProperty());
|
||||
if (childJavaProject != null) {
|
||||
final IFolder childResourcesFolder = childJavaProject.getExternalResourcesFolder();
|
||||
if (childResourcesFolder.exists()) {
|
||||
FileCopyUtils.syncFolder(childResourcesFolder.getLocation().toFile(), targetFolder, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
mainResourcesFolder.refreshLocal(IResource.DEPTH_INFINITE, progressMonitor);
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<ModuleNeeded> getAllJobTestcaseModules(ProcessItem selectedProcessItem) {
|
||||
Set<ModuleNeeded> neededLibraries = new HashSet<>();
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
|
||||
@@ -1379,13 +1334,38 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
|
||||
* Specail operation for DQ components:
|
||||
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to
|
||||
* '.Java/src/resources'
|
||||
*
|
||||
* @param processItem
|
||||
*/
|
||||
private static void copyDQDroolsToSrc(ProcessItem processItem) {
|
||||
private static void handelDQComponents(ProcessItem processItem,IProcess currentProcess) {
|
||||
// 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.
|
||||
@@ -1397,6 +1377,10 @@ public class ProcessorUtilities {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
/* 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.
|
||||
*/
|
||||
ExportFileResource resouece = new ExportFileResource();
|
||||
BuildExportManager.getInstance().exportDependencies(resouece, processItem);
|
||||
if (resouece.getAllResources().isEmpty()) {
|
||||
@@ -1497,7 +1481,6 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
}
|
||||
syncContextResourcesForParentJob(currentProcess, progressMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1553,6 +1536,7 @@ public class ProcessorUtilities {
|
||||
}
|
||||
jobInfo.setProcessItem(null);
|
||||
if (!BitwiseOptionUtils.containOption(option, GENERATE_MAIN_ONLY)) {
|
||||
List<JobInfo> firstSubjobs = new ArrayList<JobInfo>();
|
||||
// handle subjob in joblet. see bug 004937: tRunJob in a Joblet
|
||||
for (INode node : currentProcess.getGeneratingNodes()) {
|
||||
String componentName = node.getComponent().getName();
|
||||
@@ -1641,6 +1625,8 @@ public class ProcessorUtilities {
|
||||
|
||||
if (!BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
|
||||
currentProcess.setNeedRegenerateCode(true);
|
||||
} else {
|
||||
firstSubjobs.add(subJobInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1649,6 +1635,9 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
|
||||
handleGenerateFirstChildOnlyClasspath(progressMonitor, jobInfo, firstSubjobs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1658,6 +1647,32 @@ public class ProcessorUtilities {
|
||||
jobInfo.setIncludeESBFlag(includeESBFlag);
|
||||
}
|
||||
|
||||
private static void handleGenerateFirstChildOnlyClasspath(IProgressMonitor progressMonitor, JobInfo jobInfo,
|
||||
List<JobInfo> subjobInfoList) {
|
||||
IDesignerMavenService mavenService = IDesignerMavenService.get();
|
||||
if (mavenService == null || jobInfo == null || subjobInfoList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
|
||||
for (JobInfo subJobInfo : subjobInfoList) {
|
||||
if (subJobInfo.getProcessor() != null) {
|
||||
IProject codeProject = subJobInfo.getProcessor().getCodeProject();
|
||||
if (codeProject != null) {
|
||||
mavenService.enableMavenNature(progressMonitor, codeProject);
|
||||
IClasspathEntry classpathEntry = JavaCore.newSourceEntry(codeProject.getFullPath(), new IPath[0],
|
||||
new IPath[0], null, new IClasspathAttribute[] {});
|
||||
classpathEntries.add(classpathEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jobInfo.getProcessor() != null) {
|
||||
IProject codeProject = jobInfo.getProcessor().getCodeProject();
|
||||
if (codeProject != null) {
|
||||
mavenService.addProjectClasspathEntry(progressMonitor, codeProject, classpathEntries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void setGenerationInfoWithChildrenJob(INode node, JobInfo jobInfo, final JobInfo subJobInfo) {
|
||||
final LastGenerationInfo generationInfo = LastGenerationInfo.getInstance();
|
||||
|
||||
@@ -2031,7 +2046,7 @@ public class ProcessorUtilities {
|
||||
}
|
||||
|
||||
public static IProcessor generateCode(IProcess process, IContext context, boolean statistics, boolean trace,
|
||||
boolean properties, int option) throws ProcessorException {
|
||||
boolean properties, int option, IProgressMonitor progressMonitor) throws ProcessorException {
|
||||
// added by nma, to refresh routines when generating code in SVN mode. 10225.
|
||||
ISVNProviderService service = null;
|
||||
if (PluginChecker.isSVNProviderPluginLoaded()) {
|
||||
@@ -2043,8 +2058,7 @@ public class ProcessorUtilities {
|
||||
// achen modify to fix 0006107
|
||||
JobInfo jobInfo = new JobInfo(process, context);
|
||||
resetBuildFlagsAndCaches();
|
||||
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties, option,
|
||||
new NullProgressMonitor());
|
||||
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties, option, progressMonitor);
|
||||
resetBuildFlagsAndCaches();
|
||||
return genCode;
|
||||
}
|
||||
@@ -2502,6 +2516,13 @@ 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);
|
||||
@@ -2920,4 +2941,8 @@ public class ProcessorUtilities {
|
||||
public static boolean isDynamicJobAndCITest() {
|
||||
return isDynamicJobAndCITest;
|
||||
}
|
||||
|
||||
public static boolean isNeedExportItemsForDQ() {
|
||||
return needExportItemsForDQ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,17 @@
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
<version>${wagon.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.14.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
|
||||
@@ -46,6 +46,8 @@ import org.talend.designer.maven.aether.util.TalendAetherProxySelector;
|
||||
*/
|
||||
public class RepositorySystemFactory {
|
||||
|
||||
private static Boolean ignoreArtifactDescriptorRepositories;
|
||||
|
||||
private static Map<LocalRepository, DefaultRepositorySystemSession> sessions = new HashMap<LocalRepository, DefaultRepositorySystemSession>();
|
||||
|
||||
private static DefaultRepositorySystemSession newRepositorySystemSession(String localRepositoryPath)
|
||||
@@ -61,6 +63,8 @@ public class RepositorySystemFactory {
|
||||
repositorySystemSession.setTransferListener(new ChainedTransferListener());
|
||||
repositorySystemSession.setRepositoryListener(new ChainedRepositoryListener());
|
||||
repositorySystemSession.setProxySelector(new TalendAetherProxySelector());
|
||||
repositorySystemSession.setIgnoreArtifactDescriptorRepositories(
|
||||
RepositorySystemFactory.isIgnoreArtifactDescriptorRepositories());
|
||||
sessions.put(localRepo, repositorySystemSession);
|
||||
}
|
||||
|
||||
@@ -157,4 +161,13 @@ public class RepositorySystemFactory {
|
||||
doDeploy(content, pomFile, localRepository, repositoryId, repositoryUrl, userName, password, groupId, artifactId,
|
||||
classifier, extension, version);
|
||||
}
|
||||
|
||||
public static boolean isIgnoreArtifactDescriptorRepositories() {
|
||||
if (ignoreArtifactDescriptorRepositories == null) {
|
||||
ignoreArtifactDescriptorRepositories = Boolean.valueOf(
|
||||
System.getProperty("talend.studio.aether.ignoreArtifactDescriptorRepositories", Boolean.TRUE.toString()));
|
||||
}
|
||||
return ignoreArtifactDescriptorRepositories;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ import org.eclipse.m2e.core.MavenPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.designer.maven.aether.DummyDynamicMonitor;
|
||||
import org.talend.designer.maven.aether.IDynamicMonitor;
|
||||
import org.talend.designer.maven.aether.RepositorySystemFactory;
|
||||
import org.talend.designer.maven.aether.node.DependencyNode;
|
||||
import org.talend.designer.maven.aether.node.ExclusionNode;
|
||||
import org.talend.designer.maven.aether.selector.DynamicDependencySelector;
|
||||
@@ -513,6 +514,7 @@ public class DynamicDistributionAetherUtils {
|
||||
LocalRepository localRepo = new LocalRepository(repositoryPath);
|
||||
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
|
||||
session.setProxySelector(new TalendAetherProxySelector());
|
||||
session.setIgnoreArtifactDescriptorRepositories(RepositorySystemFactory.isIgnoreArtifactDescriptorRepositories());
|
||||
|
||||
updateDependencySelector(session, monitor);
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.codehaus.plexus.PlexusContainerException;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.RepositorySystem;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
import org.eclipse.aether.artifact.Artifact;
|
||||
import org.eclipse.aether.artifact.DefaultArtifact;
|
||||
import org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory;
|
||||
import org.eclipse.aether.impl.DefaultServiceLocator;
|
||||
@@ -57,6 +56,7 @@ import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.NexusConstants;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.designer.maven.aether.RepositorySystemFactory;
|
||||
|
||||
public class MavenLibraryResolverProvider {
|
||||
|
||||
@@ -283,8 +283,9 @@ public class MavenLibraryResolverProvider {
|
||||
LocalRepository localRepo = new LocalRepository( /* "target/local-repo" */target);
|
||||
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
|
||||
session.setProxySelector(new TalendAetherProxySelector());
|
||||
session.setIgnoreArtifactDescriptorRepositories(RepositorySystemFactory.isIgnoreArtifactDescriptorRepositories());
|
||||
|
||||
return session;
|
||||
return session;
|
||||
}
|
||||
|
||||
private String getLocalMVNRepository() {
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -31,6 +39,11 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -23,8 +23,29 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
@@ -67,6 +88,32 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.14.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -21,6 +21,23 @@
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -10,10 +10,51 @@
|
||||
<artifactId>talend-compiler-plugin-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-compiler-jdt</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -30,6 +30,22 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
@@ -39,6 +55,10 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -50,6 +70,10 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -61,6 +85,14 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -75,7 +107,15 @@
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -88,6 +128,26 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache-extras.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
<version>2.0b6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.marshalling</groupId>
|
||||
<artifactId>jboss-marshalling</artifactId>
|
||||
<version>2.0.12.Final</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20140107</version>
|
||||
<version>20230227</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
@@ -151,6 +151,12 @@
|
||||
<groupId>org.talend.components</groupId>
|
||||
<artifactId>components-marklogic-runtime</artifactId>
|
||||
<version>${components.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.components</groupId>
|
||||
@@ -210,6 +216,11 @@
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
@@ -55,4 +55,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<module>zip/pom.xml</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<m2.fasterxml.jackson.version>2.11.4</m2.fasterxml.jackson.version>
|
||||
<jackson-codehaus.version>1.9.15-TALEND</jackson-codehaus.version>
|
||||
<m2.fasterxml.jackson.version>2.13.4</m2.fasterxml.jackson.version>
|
||||
<jackson-codehaus.version>1.9.16-TALEND</jackson-codehaus.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<artifactId>studio-tacokit-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<tacokit.components.version>1.22.0</tacokit.components.version>
|
||||
<tacokit.components.version>1.27.23</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -1,139 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-tcompv1-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.33.1</tcomp.version>
|
||||
<slf4j.version>1.7.28</slf4j.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>talend_open_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_releases</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-server</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime-di</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-api</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>slf4j-standard</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-tcompv1-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.38.9</tcomp.version>
|
||||
<slf4j.version>1.7.32</slf4j.version>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
<reload4j.version>1.2.19</reload4j.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>talend_open_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_releases</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jul</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jcl</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-to-slf4j</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-web</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-server</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime-di</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-api</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>slf4j-standard</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>${reload4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository</artifactId>
|
||||
<version>7.3.1.v20210520</version>
|
||||
<version>7.3.1.v20220325</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${project.basedir}/../repository</outputDirectory>
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<zip destfile="${basedir}/../repository/maven_repository.zip" basedir="${basedir}/../tmp/" />
|
||||
<zip destfile="${basedir}/../repository/maven_repository.zip" basedir="${basedir}/../tmp/" >
|
||||
<fileset dir="${basedir}/../tmp/">
|
||||
<exclude name="repository/dom4j/dom4j/1.6.1/**" />
|
||||
</fileset>
|
||||
</zip>
|
||||
<delete dir="${basedir}/../tmp/" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
|
||||
@@ -10,10 +10,11 @@ ProjectPomProjectSettingPage_ConfirmMessage=Will apply and update for project PO
|
||||
ProjectPomProjectSettingPage_FilterPomLabel=Filter to use to generate poms:
|
||||
ProjectPomProjectSettingPage_FilterErrorMessage=Invalid filter: {0}
|
||||
ProjectPomProjectSettingPage.syncAllPomsButtonText=Force full re-synchronize poms
|
||||
ProjectPomProjectSettingPage.syncBuildTypesButtonText=Force full re-synchronize build types
|
||||
AbstractPersistentProjectSettingPage.syncAllPoms=Do you want to update all poms? \n This operation might take long time depends on your project size.
|
||||
MavenProjectSettingPage.filterExampleMessage=Filter examples:\nlabel=myJob \t\t\t\t=> Generate only the job named "myJob"\n!(label=myJob) \t\t\t\t=> Generate any job except the one named "myJob"\n(path=folder1/folder2) \t\t\t=> Generate any job in the folder "folder1/folder2"\n(path=folder1/folder2)or(label=myJob)\t=> Generate any job in the folder "folder1/folder2" or named "myJob"\n(label=myJob)and(version=0.2) \t=> Generate only the job named "myJob" with version 0.2\n!((label=myJob)and(version=0.1)) \t=> Generate every jobs except the "myJob" version 0.1
|
||||
MavenProjectSettingPage.refModuleText=Set reference project modules in profile
|
||||
MavenProjectSettingPage.excludeDeletedItems=Exclude deleted items
|
||||
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize poms button to apply the new settings.
|
||||
MavenProjectSettingPage.skipFolders=Skip folders
|
||||
BuildProjectSettingPage.allowRecursiveJobs=Allow recursive jobs (Not recommended)
|
||||
BuildProjectSettingPage.allowRecursiveJobs=Allow recursive jobs (Not recommended)
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.talend.core.runtime.projectsetting.AbstractProjectSettingPage;
|
||||
import org.talend.core.runtime.services.IFilterService;
|
||||
import org.talend.designer.maven.DesignerMavenPlugin;
|
||||
import org.talend.designer.maven.tools.AggregatorPomsHelper;
|
||||
import org.talend.designer.maven.tools.BuildTypeManager;
|
||||
import org.talend.designer.maven.ui.i18n.Messages;
|
||||
|
||||
/**
|
||||
@@ -169,7 +170,25 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
if (isSyncBuildTypeAllowed()) {
|
||||
Button syncBuildTypes = new Button(parent, SWT.NONE);
|
||||
syncBuildTypes.setText(Messages.getString("ProjectPomProjectSettingPage.syncBuildTypesButtonText")); //$NON-NLS-1$
|
||||
|
||||
syncBuildTypes.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
try {
|
||||
new BuildTypeManager().syncBuildTypes(getCurrentPage());
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void addSyncWarning() {
|
||||
setMessage(Messages.getString("MavenProjectSettingPage.syncAllPomsWarning"), IMessage.WARNING); //$NON-NLS-1$
|
||||
@@ -203,4 +222,12 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
|
||||
return displayVersion;
|
||||
}
|
||||
|
||||
private static boolean isSyncBuildTypeAllowed() {
|
||||
return Boolean.getBoolean("talend.builtype.syncallowed");
|
||||
}
|
||||
|
||||
private MavenProjectSettingPage getCurrentPage() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.talend.common.ui.runtime,
|
||||
org.talend.core.runtime,
|
||||
org.eclipse.jface,
|
||||
org.talend.core.repository
|
||||
org.talend.core.repository,
|
||||
org.talend.core
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: org.talend.designer.maven,
|
||||
org.talend.designer.maven.launch,
|
||||
|
||||
@@ -49,13 +49,28 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -73,6 +88,11 @@
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -88,13 +108,33 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-io</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<archive>
|
||||
@@ -120,8 +160,23 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -134,6 +189,16 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -151,6 +216,11 @@
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -12,11 +12,17 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
import org.talend.designer.maven.tools.CodesJarM2CacheManager;
|
||||
import org.talend.designer.maven.utils.CodesJarMavenUtil;
|
||||
import org.talend.designer.maven.utils.MavenProjectUtils;
|
||||
|
||||
public class DesignerMavenService implements IDesignerMavenService {
|
||||
|
||||
@@ -35,4 +41,14 @@ public class DesignerMavenService implements IDesignerMavenService {
|
||||
CodesJarM2CacheManager.updateCodesJarProject(info, needReSync);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableMavenNature(IProgressMonitor monitor, IProject project) {
|
||||
MavenProjectUtils.enableMavenNature(monitor, project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addProjectClasspathEntry(IProgressMonitor monitor, IProject project, List<IClasspathEntry> entries) {
|
||||
MavenProjectUtils.addProjectClasspathEntry(monitor, project, entries);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.designer.maven.migration.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.ui.ITestContainerCoreService;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class ItemReportRecorder {
|
||||
|
||||
protected Item item;
|
||||
|
||||
protected String detailMessage;
|
||||
|
||||
public String getItemType() {
|
||||
String type = "";
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (itemType != null) {
|
||||
if (ERepositoryObjectType.getAllTypesOfTestContainer().contains(itemType)) {
|
||||
Item parentJobItem = getTestCaseParentJobItem(item);
|
||||
if (parentJobItem != null) {
|
||||
ERepositoryObjectType parentJobType = ERepositoryObjectType.getItemType(parentJobItem);
|
||||
if (parentJobType != null) {
|
||||
String parentTypePath = getCompleteObjectTypePath(parentJobType);
|
||||
if (StringUtils.isNotBlank(parentTypePath)) {
|
||||
type = parentTypePath + "/";
|
||||
}
|
||||
}
|
||||
}
|
||||
type += itemType;
|
||||
} else {
|
||||
type = getCompleteObjectTypePath(itemType);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getItemPath() {
|
||||
String path = "";
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
|
||||
if (ERepositoryObjectType.getAllTypesOfTestContainer().contains(itemType)) {
|
||||
StringBuffer testcaseBuffer = new StringBuffer();
|
||||
Item parentJobItem = getTestCaseParentJobItem(item);
|
||||
if (parentJobItem != null) {
|
||||
if (parentJobItem.getState() != null && StringUtils.isNotBlank(parentJobItem.getState().getPath())) {
|
||||
testcaseBuffer.append(parentJobItem.getState().getPath()).append("/");
|
||||
}
|
||||
testcaseBuffer.append(parentJobItem.getProperty() != null ? parentJobItem.getProperty().getLabel() : "");
|
||||
if (StringUtils.isNotBlank(testcaseBuffer.toString())) {
|
||||
buffer.append(testcaseBuffer.toString()).append("/");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (item.getState() != null && StringUtils.isNotBlank(item.getState().getPath())) {
|
||||
buffer.append(item.getState().getPath()).append("/");
|
||||
}
|
||||
}
|
||||
|
||||
Property property = item.getProperty();
|
||||
if (property != null) {
|
||||
buffer.append(property.getLabel() + "_" + property.getVersion());
|
||||
}
|
||||
path = buffer.toString();
|
||||
return path;
|
||||
}
|
||||
|
||||
private Item getTestCaseParentJobItem(Item testcaseItem) {
|
||||
Item parentJobItem = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerCoreService.class)) {
|
||||
ITestContainerCoreService testcaseService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITestContainerCoreService.class);
|
||||
if (testcaseService != null) {
|
||||
try {
|
||||
parentJobItem = testcaseService.getParentJobItem(item);
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentJobItem;
|
||||
}
|
||||
|
||||
private String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
|
||||
ERepositoryObjectType rootItemType = itemType;
|
||||
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
|
||||
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
List<String> typeLabels = new ArrayList<String>();
|
||||
findOutCompleteTypePath(rootItemType, typeLabels);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (!typeLabels.isEmpty()) {
|
||||
for (int i = 0; i < typeLabels.size(); i++) {
|
||||
if (i != 0) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(typeLabels.get(i));
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
|
||||
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
|
||||
if (parentType != null) {
|
||||
findOutCompleteTypePath(parentType, typeLabels);
|
||||
}
|
||||
typeLabels.add(type.getLabel());
|
||||
}
|
||||
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public void setItem(Item item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
return detailMessage;
|
||||
}
|
||||
|
||||
public void setDetailMessage(String detailMessage) {
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.designer.maven.migration.common;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class ItemsReportUtil {
|
||||
|
||||
|
||||
public static boolean generateReportFile(File reportFile, String header, List<String> records) throws Exception {
|
||||
boolean generateDone = false;
|
||||
BufferedWriter printWriter = null;
|
||||
try {
|
||||
File parentFolder = new Path(reportFile.getAbsolutePath()).removeLastSegments(1).toFile();
|
||||
// File parentFolder = new File(parentPath);
|
||||
if (!parentFolder.exists()) {
|
||||
parentFolder.mkdirs();
|
||||
}
|
||||
if (!reportFile.exists()) {
|
||||
reportFile.createNewFile();
|
||||
}
|
||||
FileOutputStream fos = new FileOutputStream(reportFile);
|
||||
fos.write(new byte[] { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF });
|
||||
OutputStreamWriter outputWriter = new OutputStreamWriter(fos, "UTF-8");
|
||||
printWriter = new BufferedWriter(outputWriter);
|
||||
printWriter.write(header);
|
||||
printWriter.newLine();
|
||||
for (String recordStr : records) {
|
||||
printWriter.write(recordStr);
|
||||
printWriter.newLine();
|
||||
}
|
||||
printWriter.flush();
|
||||
generateDone = true;
|
||||
} finally {
|
||||
if (printWriter != null) {
|
||||
printWriter.close();
|
||||
}
|
||||
}
|
||||
return generateDone;
|
||||
}
|
||||
|
||||
public static String handleColumnQuotes(String text) {
|
||||
String quoteMark = TalendQuoteUtils.QUOTATION_MARK;
|
||||
text = StringUtils.isBlank(text) ? "" : text;
|
||||
if (text.contains(quoteMark)) {
|
||||
// replace to double quote surround
|
||||
text = text.replace(quoteMark, quoteMark + quoteMark);
|
||||
}
|
||||
return quoteMark + text + quoteMark;
|
||||
}
|
||||
|
||||
public static String getCurrentTimeString() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String time = dateFormat.format(new Date());
|
||||
return time;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.designer.maven.migration.common;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.IScopeContext;
|
||||
import org.osgi.service.prefs.BackingStoreException;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.migration.IProjectMigrationTask;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class MigrationReportHelper {
|
||||
|
||||
private static final String COMMA = ",";
|
||||
|
||||
private static final String PLUGIN_ID = "org.talend.designer.maven";
|
||||
|
||||
private static final String DO_NOT_SHOW_PREF_KEY = "talend.migrationReportDialog.doNotShowAgain";
|
||||
|
||||
private static final String MIGRATION_REPORT_HEAD = "Task name,Task description,Item type,Path to migrated item,Migration details";
|
||||
|
||||
private static final MigrationReportHelper instance = new MigrationReportHelper();
|
||||
|
||||
public static MigrationReportHelper getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private String reportGeneratedPath = "";
|
||||
|
||||
private Set<String> taskItemRecords = new HashSet<String>();
|
||||
|
||||
private List<MigrationReportRecorder> migrationReportRecorders = new ArrayList<MigrationReportRecorder>();
|
||||
|
||||
public void generateMigrationReport(String projectTecName) {
|
||||
if (migrationReportRecorders == null || migrationReportRecorders.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PluginChecker.isTIS()) {
|
||||
clearRecorders();
|
||||
return;
|
||||
}
|
||||
|
||||
File exportFolder = null;
|
||||
File reportFile = null;
|
||||
try {
|
||||
String currentTime = getCurrentTime();
|
||||
String filePath = getReportExportFolder(currentTime) + "/" + getReportFileName(currentTime, projectTecName);
|
||||
reportGeneratedPath = filePath;
|
||||
reportFile = new File(filePath);
|
||||
List<String> recordLines = new ArrayList<String>();
|
||||
for (MigrationReportRecorder record : migrationReportRecorders) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(ItemsReportUtil.handleColumnQuotes(record.getTaskClassName())).append(COMMA);
|
||||
buffer.append(ItemsReportUtil.handleColumnQuotes(record.getTaskDescription())).append(COMMA);
|
||||
buffer.append(ItemsReportUtil.handleColumnQuotes(record.getItemType())).append(COMMA);
|
||||
buffer.append(ItemsReportUtil.handleColumnQuotes(record.getItemPath())).append(COMMA);
|
||||
buffer.append(ItemsReportUtil.handleColumnQuotes(record.getDetailMessage()));
|
||||
recordLines.add(buffer.toString());
|
||||
}
|
||||
ItemsReportUtil.generateReportFile(reportFile, MIGRATION_REPORT_HEAD, recordLines);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
if (reportFile != null && reportFile.exists()) {
|
||||
reportFile.delete();
|
||||
}
|
||||
if (exportFolder != null && exportFolder.exists()) {
|
||||
exportFolder.delete();
|
||||
}
|
||||
} finally {
|
||||
migrationReportRecorders.clear();
|
||||
taskItemRecords.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isRequireDefaultRecord(IProjectMigrationTask task, Item item) {
|
||||
boolean require = true;
|
||||
if (task.getOrder() != null) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(task.getOrder());
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
if (year <= 2016) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (item.getProperty() != null) {
|
||||
Property property = item.getProperty();
|
||||
String key = task.getId() + "_" + property.getId() + "_" + property.getVersion();
|
||||
if (taskItemRecords.contains(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return require;
|
||||
}
|
||||
|
||||
private String getCurrentTime() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String time = dateFormat.format(new Date());
|
||||
return time;
|
||||
}
|
||||
|
||||
private String getReportExportFolder(String time) {
|
||||
String folderName = "migrationReport" + "_" + time;
|
||||
String path = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + "/report/" + folderName;
|
||||
return path;
|
||||
}
|
||||
|
||||
private String getReportFileName(String time, String projectTecName) {
|
||||
String fileName = time + "_" + projectTecName + "_" + "Migration" + "_" + "Report.csv";
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public static void storeDoNotShowAgainPref(boolean selected) {
|
||||
IScopeContext scopeContext = ConfigurationScope.INSTANCE;
|
||||
IEclipsePreferences pref = scopeContext.getNode(PLUGIN_ID);
|
||||
pref.putBoolean(DO_NOT_SHOW_PREF_KEY, selected);
|
||||
try {
|
||||
pref.flush();
|
||||
} catch (BackingStoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isReportDialogDisable() {
|
||||
IScopeContext scopeContext = ConfigurationScope.INSTANCE;
|
||||
IEclipsePreferences pref = scopeContext.getNode(PLUGIN_ID);
|
||||
return pref.getBoolean(DO_NOT_SHOW_PREF_KEY, false);
|
||||
}
|
||||
|
||||
public void addRecorder(MigrationReportRecorder recorder) {
|
||||
if (recorder != null) {
|
||||
migrationReportRecorders.add(recorder);
|
||||
if (recorder.getItem() != null && recorder.getItem().getProperty() != null) {
|
||||
Property property = recorder.getItem().getProperty();
|
||||
taskItemRecords.add(recorder.getTask().getId() + "_" + property.getId() + "_" + property.getVersion());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void clearRecorders() {
|
||||
reportGeneratedPath = "";
|
||||
migrationReportRecorders.clear();
|
||||
taskItemRecords.clear();
|
||||
}
|
||||
|
||||
public String getReportGeneratedPath() {
|
||||
return reportGeneratedPath;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.designer.maven.migration.common;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.migration.IProjectMigrationTask;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class MigrationReportRecorder extends ItemReportRecorder {
|
||||
|
||||
private IProjectMigrationTask task;
|
||||
|
||||
private MigrationOperationType operationType;
|
||||
|
||||
private NodeType node;
|
||||
|
||||
private String paramName;
|
||||
|
||||
private String oldValue;
|
||||
|
||||
private String newValue;
|
||||
|
||||
public enum MigrationOperationType {
|
||||
ADD,
|
||||
MODIFY,
|
||||
DELETE
|
||||
}
|
||||
|
||||
public MigrationReportRecorder(IProjectMigrationTask task, Item item) {
|
||||
super();
|
||||
this.task = task;
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public MigrationReportRecorder(IProjectMigrationTask task, MigrationOperationType operationType, Item item, NodeType node,
|
||||
String paramName, String oldValue, String newValue) {
|
||||
super();
|
||||
this.task = task;
|
||||
this.operationType = operationType;
|
||||
this.item = item;
|
||||
this.node = node;
|
||||
this.paramName = paramName;
|
||||
this.oldValue = oldValue;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
public MigrationReportRecorder(IProjectMigrationTask task, Item item, String detailMessage) {
|
||||
super();
|
||||
this.task = task;
|
||||
this.item = item;
|
||||
this.detailMessage = detailMessage;
|
||||
}
|
||||
|
||||
public String getTaskClassName() {
|
||||
return task.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
public String getTaskDescription() {
|
||||
String description = "";
|
||||
if (StringUtils.isNotBlank(task.getDescription())) {
|
||||
description = task.getDescription();
|
||||
}
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
String details = detailMessage;
|
||||
if (StringUtils.isNotBlank(detailMessage)) {
|
||||
return details;
|
||||
}
|
||||
|
||||
if (operationType == null || StringUtils.isBlank(paramName)) {
|
||||
details = getTaskClassName() + " task is applied";
|
||||
return details;
|
||||
}
|
||||
|
||||
StringBuffer detailBuffer = new StringBuffer();
|
||||
if (node != null) {
|
||||
// migration for node, e.g. tRESTClient component "tRESTClient_2":
|
||||
detailBuffer.append(node.getComponentName()).append(" component ");
|
||||
ElementParameterType uniqueName = ComponentUtilities.getNodeProperty(node, "UNIQUE_NAME");
|
||||
detailBuffer.append(TalendQuoteUtils.addQuotes(uniqueName.getValue())).append(":");
|
||||
} else {
|
||||
// migration for item, e.g. context item "testContext":
|
||||
detailBuffer.append(getItemType() + " item ")
|
||||
.append(TalendQuoteUtils.addQuotes(item.getProperty().getLabel())).append(":");
|
||||
}
|
||||
|
||||
detailBuffer.append(paramName).append(" was ");
|
||||
switch (operationType) {
|
||||
case ADD:
|
||||
detailBuffer.append("added");
|
||||
if (StringUtils.isNotBlank(newValue)) {
|
||||
detailBuffer.append(" with ").append(newValue);
|
||||
}
|
||||
break;
|
||||
case MODIFY:
|
||||
detailBuffer.append("changed");
|
||||
if (StringUtils.isNotBlank(oldValue)) {
|
||||
detailBuffer.append(" from ").append(oldValue);
|
||||
}
|
||||
if (StringUtils.isNotBlank(newValue)) {
|
||||
detailBuffer.append(" to ").append(newValue);
|
||||
}
|
||||
break;
|
||||
case DELETE:
|
||||
detailBuffer.append("deleted");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
details = detailBuffer.toString();
|
||||
|
||||
return details;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for task.
|
||||
*
|
||||
* @return the task
|
||||
*/
|
||||
public IProjectMigrationTask getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the task.
|
||||
*
|
||||
* @param task the task to set
|
||||
*/
|
||||
public void setTask(IProjectMigrationTask task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the operationType.
|
||||
*
|
||||
* @param operationType the operationType to set
|
||||
*/
|
||||
public void setOperationType(MigrationOperationType operationType) {
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the node.
|
||||
*
|
||||
* @param node the node to set
|
||||
*/
|
||||
public void setNode(NodeType node) {
|
||||
this.node = node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the paramName.
|
||||
*
|
||||
* @param paramName the paramName to set
|
||||
*/
|
||||
public void setParamName(String paramName) {
|
||||
this.paramName = paramName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the oldValue.
|
||||
*
|
||||
* @param oldValue the oldValue to set
|
||||
*/
|
||||
public void setOldValue(String oldValue) {
|
||||
this.oldValue = oldValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the newValue.
|
||||
*
|
||||
* @param newValue the newValue to set
|
||||
*/
|
||||
public void setNewValue(String newValue) {
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package org.talend.designer.maven.migration.tasks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.runtime.model.emf.EmfHelper;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.filters.IComponentFilter;
|
||||
import org.talend.core.model.migration.AbstractItemMigrationTask;
|
||||
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.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.utils.ConvertJobsUtil;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.maven.migration.common.MigrationReportHelper;
|
||||
import org.talend.designer.maven.migration.common.MigrationReportRecorder;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
public abstract class AbstractCorrectBuildItemMigrationTask extends AbstractItemMigrationTask implements ICorrectBuildTypeMigrationTask {
|
||||
|
||||
protected static final String BUILD_TYPE_PROPERTY = "BUILD_TYPE";
|
||||
protected static final String BUILD_TYPE_STANDALONE = "STANDALONE";
|
||||
protected static final String BUILD_TYPE_OSGI = "OSGI";
|
||||
protected static final String BUILD_TYPE_ROUTE = "ROUTE";
|
||||
protected static final String BUILD_TYPE_ROUTE_MICROSERVICE = "ROUTE_MICROSERVICE";
|
||||
protected static final String REST_MS = "REST_MS";
|
||||
|
||||
|
||||
protected static Map<String, String> migratedJobs = new HashMap<String, String>();
|
||||
|
||||
protected static void clearMigratedJobs () {
|
||||
migratedJobs.clear();
|
||||
}
|
||||
|
||||
protected static void skipMigrationForJob (String jobName, String migrationTask) {
|
||||
migratedJobs.put(jobName, migrationTask);
|
||||
}
|
||||
|
||||
protected static void storeMigratedJob (String jobName, String migrationTask) {
|
||||
migratedJobs.put(jobName, migrationTask);
|
||||
}
|
||||
|
||||
protected static boolean isJobMigrated (String jobName) {
|
||||
return migratedJobs.containsKey(jobName);
|
||||
}
|
||||
|
||||
protected static String getStoredJobMigraionTask (String jobName) {
|
||||
return migratedJobs.get(jobName);
|
||||
}
|
||||
|
||||
public void generateReportRecord(MigrationReportRecorder recorder) {
|
||||
MigrationReportHelper.getInstance().addRecorder(recorder);
|
||||
}
|
||||
|
||||
public static List<NodeType> searchComponent(ProcessType processType, IComponentFilter filter) {
|
||||
List<NodeType> list = new ArrayList<NodeType>();
|
||||
if (filter == null || processType == null) {
|
||||
return list;
|
||||
}
|
||||
|
||||
for (Object o : processType.getNode()) {
|
||||
if (filter.accept((NodeType) o)) {
|
||||
list.add((NodeType) o);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void save(Item item) throws PersistenceException {
|
||||
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRepositoryService.class);
|
||||
IProxyRepositoryFactory factory = service.getProxyRepositoryFactory();
|
||||
factory.save(item, true);
|
||||
}
|
||||
|
||||
public ProcessType getProcessType(Item item) {
|
||||
ProcessType processType = null;
|
||||
if (item instanceof ProcessItem) {
|
||||
processType = ((ProcessItem) item).getProcess();
|
||||
}
|
||||
if (item instanceof JobletProcessItem) {
|
||||
processType = ((JobletProcessItem) item).getJobletProcess();
|
||||
}
|
||||
if (processType != null) {
|
||||
EmfHelper.visitChilds(processType);
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (itemType == ERepositoryObjectType.TEST_CONTAINER
|
||||
&& !ConvertJobsUtil.JobType.STANDARD.getDisplayName().equalsIgnoreCase(processType.getJobType())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
return processType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find element parameter with a given parameter name
|
||||
*
|
||||
* @param paramName
|
||||
* @param elementParameterTypes
|
||||
* @return
|
||||
*/
|
||||
public static final ElementParameterType findElementParameterByName(String paramName, NodeType node) {
|
||||
for (Object obj : node.getElementParameter()) {
|
||||
ElementParameterType cpType = (ElementParameterType) obj;
|
||||
if (paramName.equals(cpType.getName())) {
|
||||
return cpType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
abstract public void clear ();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user