Compare commits

...

4 Commits

Author SHA1 Message Date
Jill Yan
482556ffbd Revert "APPINT-34618 add jtds driver support (#7637)" (#7638)
This reverts commit a4effc8e00.
2022-06-08 19:18:51 +08:00
Jill Yan
a4effc8e00 APPINT-34618 add jtds driver support (#7637)
Co-authored-by: jillyan <yan955599@gmail.com>
2022-06-08 19:08:33 +08:00
apoltavtsev
1567eefcd5 fix(APPINT-34416) Migrate to CXF 3.4.7 (#7628) 2022-06-07 15:41:22 +02:00
sbieliaievl
64fb10f2c6 bugfix(APPINT-33830) - migration for demos (#7617)
* Added rename timeout parameters for tRESTClient migration

* Added rename timeout parameters for tRESTClient migration

* Comment changes for RenameTimeoutParameterstRESTClient

* Code refactoring in RenameTimeoutParameterstRESTClient
2022-06-06 10:07:25 +03:00
3 changed files with 106 additions and 12 deletions

View File

@@ -33,21 +33,21 @@
<!-- hd insight common libraries -->
<libraryNeeded
context="plugin:org.talend.libraries.apache.cxf"
id="cxf-rt-bindings-xml-3.3.10.jar"
name="cxf-rt-bindings-xml-3.3.10.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-bindings-xml/3.3.10">
id="cxf-rt-bindings-xml-3.4.7.jar"
name="cxf-rt-bindings-xml-3.4.7.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-bindings-xml/3.4.7">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.libraries.apache.cxf"
id="cxf-rt-frontend-jaxrs-3.3.10.jar"
name="cxf-rt-frontend-jaxrs-3.3.10.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/3.3.10">
id="cxf-rt-frontend-jaxrs-3.4.7.jar"
name="cxf-rt-frontend-jaxrs-3.4.7.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/3.4.7">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.libraries.apache.cxf"
id="cxf-rt-transports-http-3.3.10.jar"
name="cxf-rt-transports-http-3.3.10.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-transports-http/3.3.10">
id="cxf-rt-transports-http-3.4.7.jar"
name="cxf-rt-transports-http-3.4.7.jar"
mvn_uri="mvn:org.apache.cxf/cxf-rt-transports-http/3.4.7">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.libraries.jackson"
@@ -178,9 +178,9 @@
id="HD_INSIGHT_COMMON_LIBRARIES_LATEST"
name="HD_INSIGHT_COMMON_LIBRARIES_LATEST">
<library id="talend-bigdata-launcher-1.1.0-20160405.jar" />
<library id="cxf-rt-bindings-xml-3.3.10.jar" />
<library id="cxf-rt-frontend-jaxrs-3.3.10.jar" />
<library id="cxf-rt-transports-http-3.3.10.jar" />
<library id="cxf-rt-bindings-xml-3.4.7.jar" />
<library id="cxf-rt-frontend-jaxrs-3.4.7.jar" />
<library id="cxf-rt-transports-http-3.4.7.jar" />
<library id="json_simple-1.1.jar" />
<library id="javax.ws.rs-api-2.0-m10.jar" />
<library id="wsdl4j-1.6.3.jar" />

View File

@@ -3710,6 +3710,15 @@
name="XSLTCheckCacheFileInMemoryTask"
version="7.3.1">
</projecttask>
<projecttask
beforeLogon="false"
breaks="7.3.0"
class="org.talend.repository.model.migration.RenameTimeoutParameterstRESTClient"
description="Rename timeout parameters for tRESTClient"
id="org.talend.repository.model.migration.RenameTimeoutParameterstRESTClient"
name="RenameTimeoutParameterstRESTClient"
version="7.3.1">
</projecttask>
</extension>
<extension

View File

@@ -0,0 +1,85 @@
// ============================================================================
//
// 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.repository.model.migration;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.migration.AbstractJobMigrationTask;
import org.talend.core.model.properties.Item;
import org.talend.core.repository.model.ProxyRepositoryFactory;
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;
/**
* Rename timeout parameters for tRESTClient
*/
public class RenameTimeoutParameterstRESTClient extends AbstractJobMigrationTask {
@Override
public ExecutionResult execute(Item item) {
ProcessType processType = getProcessType(item);
if (processType == null) {
return ExecutionResult.NOTHING_TO_DO;
}
try {
renameConnections(item, processType);
return ExecutionResult.SUCCESS_WITH_ALERT;
} catch (Exception e) {
ExceptionHandler.process(e);
return ExecutionResult.FAILURE;
}
}
private void renameConnections(Item item, ProcessType processType) throws PersistenceException {
ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
boolean modified = false;
EList nodes = processType.getNode();
for (Object n : nodes) {
NodeType type = (NodeType) n;
if (type.getComponentName().equals("tRESTClient")) {
EList elementParameterList = type.getElementParameter();
for (Object elem : elementParameterList) {
ElementParameterType elemType = (ElementParameterType) elem;
if (elemType.getName().equals("CONNECTION_TIMEOUT_DESC")) {
elemType.setValue("");
modified = true;
}
if (elemType.getName().equals("RECEIVE_TIMEOUT_DESC")) {
elemType.setValue("(See tRESTClient doc. to configure timeouts for Talend Runtime)");
modified = true;
}
}
}
}
if (modified) {
factory.save(item, true);
}
}
public Date getOrder() {
GregorianCalendar gc = new GregorianCalendar(2022, Calendar.APRIL, 21, 17, 0, 0);
return gc.getTime();
}
}