Compare commits

..

19 Commits

Author SHA1 Message Date
Zhiwei Xue
5210b033d0 feat(TUP-38140):SAP CDS Views over Talend (#6178) 2023-06-08 15:17:17 +08:00
hzhao
e91b347450 fix(TUP-38590): CI/CD Pipeline generating different code (#6177) 2023-06-08 09:38:58 +08:00
Emmanuel GALLOIS
ea459b8710 feat(TDI-49854): bump component-runtime to 1.57 (#6207) 2023-06-07 15:48:28 +02:00
wang wei
2ee58ac9d0 fix(TDI-49753): improve tsetkeystore 2023-06-07 18:14:12 +08:00
Jane Ding
0e668b3239 feat(TUP-38589):Managed updates improvements (#6196)
* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589

* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589
2023-06-07 16:41:28 +08:00
msjian
1fe8bec5cf fix(TDQ-21109): fix Dialog on tStandardizeRow support dark mode (#6212) 2023-06-07 16:03:11 +08:00
zyuan-talend
74d5eb4d90 fix(TUP-38922): Clear old storage of git project. (#6210) 2023-06-05 15:25:09 +08:00
jiezhang-tlnd
12a842a565 Add localized files (#6221) (#6225)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-05 14:10:09 +08:00
sponomarova
9419f94c07 feat(TBD-15036): Beta - Universal Spark 3.1 for HDInsight 5.0 (#6203) 2023-06-01 08:26:53 +03:00
Abdulhamid Rashankar
0beef6b531 APPINT-35612:Metadata failed to propagate modifications to routes (#6197)
* APPINT-35612:Metadata failed to propagate modifications to routes

* APPINT-35612:Metadata failed to propagate modifications to routes

* APPINT-35612:Metadata failed to propagate modifications to routes
2023-05-31 09:11:42 +02:00
jiezhang-tlnd
d19f0dbce7 feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X (#6173)
* feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X
https://jira.talendforge.org/browse/TUP-38935

* update mysql driver

* add dbversion for drag and drop

* set default version

* add libray needed
2023-05-29 10:45:59 +08:00
jiezhang-tlnd
6ff18c0449 Add localized files (#6208) (#6209)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-26 16:10:23 +08:00
jiezhang-tlnd
4c93a1bed0 chore(TUP-38346)maven-core:3.8.6 (#6079)
* chore(TUP-38346)maven-core:3.8.6

* for update time stamp
2023-05-24 09:38:22 +08:00
kjwang
2462a7a792 Kjwang/feat tup 31305 improve the code to avoid encrypt (#6135)
* TUP-31305 Improve the code to avoid encrypt the password in job
everytime
https://jira.talendforge.org/browse/TUP-31305
2023-05-22 17:33:54 +08:00
jiezhang-tlnd
e18ffe5f0f Add localized files (#6194) (#6195)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-19 19:06:56 +08:00
sbliu
b22b9decce chore(TUP-38577) upgrade spring-framework-bom to 5.2.9.RELEASE (#6188) 2023-05-18 16:41:36 +08:00
sbliu
9a3307bace chore(TUP-38415) upgrade xercesImpl to 2.12.2 (#6143) 2023-05-17 17:19:20 +08:00
jiezhang-tlnd
dd5400af61 chore(TUP-38624)Request for an API to determine if a joblet refactoring (#6166)
is ongoing
2023-05-15 18:52:38 +08:00
jiezhang-tlnd
505609aa4b Add localized files (#6183) (#6184)
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-12 16:08:06 +08:00
50 changed files with 457 additions and 87 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

View File

@@ -40,8 +40,8 @@ public enum EImage implements IImage {
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$
CREATE_CONNECTION_ICON("/icons/connection.gif"), //$NON-NLS-1$

View File

@@ -92,7 +92,7 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>

View File

@@ -175,6 +175,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
ProjectRepositoryNode.sapBWInfoObject=SAP InfoObject
ProjectRepositoryNode.sapContentExtractor=SAP BI Content Extractor
ProjectRepositoryNode.sapCDSView=SAP CDS View
RepositoryDropAdapter_copyingItems=Copying items...
RepositoryDropAdapter_errorMsg=This directory contains the locked item,it can not be moved now
RepositoryDropAdapter_lockedByOthers=This item is locked by other users, it can not be moved now.

View File

@@ -102,6 +102,7 @@ import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.SAPBWTableHelper;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.cwm.helper.TableHelper;
import org.talend.cwm.helper.TaggedValueHelper;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.BinRepositoryNode;
@@ -1751,6 +1752,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
// 10. BW Business Content Extractor:
createSAPContentExtractorNodes(repObj, metadataConnection, node, validationRules);
// 11. CDS views:
createSAPCDSViewNodes(repObj, metadataConnection, node, validationRules);
} else if (metadataConnection instanceof SalesforceSchemaConnection) {
createSalesforceModuleNodes(repObj, metadataConnection, node, validationRules);
} else {
@@ -1784,7 +1788,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
for (MetadataTable tablesWithOrder : tablesWithOrders) {
EMap<String, String> properties = tablesWithOrder.getAdditionalProperties();
String partitionKey = properties.get(EProperties.CONTENT_TYPE.name());
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)) {
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)
&& !ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
tables.add(tablesWithOrder);
}
}
@@ -1967,6 +1973,32 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
private void createSAPCDSViewNodes(IRepositoryViewObject repObj, Connection metadataConnection, RepositoryNode node,
List<IRepositoryViewObject> validationRules) {
StableRepositoryNode tableContainer = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.sapCDSView"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
tableContainer.setChildrenObjectType(ERepositoryObjectType.METADATA_CON_TABLE);
tableContainer.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_CDS_VIEW);
IRepositoryNode cacheNode = nodeCache.getCache(tableContainer);
if (cacheNode != null && cacheNode instanceof StableRepositoryNode) {
tableContainer = (StableRepositoryNode) cacheNode;
tableContainer.getChildren().clear();
} else {
nodeCache.addCache(tableContainer, true);
}
node.getChildren().add(tableContainer);
List<MetadataTable> tablesWithOrders = ConnectionHelper.getTablesWithOrders(metadataConnection);
EList<MetadataTable> tables = new BasicEList<>();
for (MetadataTable tablesWithOrder : tablesWithOrders) {
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
if (ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
tables.add(tablesWithOrder);
}
}
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
}
private void createSalesforceModuleNodes(IRepositoryViewObject rebObj, Connection metadataConnection,
RepositoryNode connectionNode, List<IRepositoryViewObject> validationRules) {
EList modules = ((SalesforceSchemaConnection) metadataConnection).getModules();

View File

@@ -54,9 +54,7 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
import org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
@@ -447,12 +445,10 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
if (currentShell == null) {
currentShell = DisplayUtils.getDefaultShell(false);
}
MessageBox box = new MessageBox(currentShell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
box.setText(Messages.getString("ProxyRepositoryFactory.JobNameErroe")); //$NON-NLS-1$
box.setMessage(Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " + Messages.getString("ProxyRepositoryFactory.ReplaceJob")); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
if (box.open() == SWT.OK) {
if (MessageDialog.openQuestion(currentShell,
Messages.getString("ProxyRepositoryFactory.JobNameErroe"), //$NON-NLS-1$
Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Messages.getString("ProxyRepositoryFactory.ReplaceJob"))) { //$NON-NLS-1$
ok[0] = true;
}
}

View File

@@ -40,6 +40,7 @@ import org.talend.core.model.utils.CloneConnectionUtils;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.model.bridge.ReponsitoryContextBridge;
@@ -67,6 +68,7 @@ public class StandaloneConnectionContextUtils {
String server = getOriginalValue(contextProperties, dbConn.getServerName());
String username = getOriginalValue(contextProperties, dbConn.getUsername());
String password = getOriginalValue(contextProperties, dbConn.getRawPassword());
String originEncryptedPassword = getOriginalValue(contextProperties, dbConn.getPassword());
String port = getOriginalValue(contextProperties, dbConn.getPort());
String sidOrDatabase = getOriginalValue(contextProperties, dbConn.getSID());
String datasource = getOriginalValue(contextProperties, dbConn.getDatasourceName());
@@ -87,6 +89,8 @@ public class StandaloneConnectionContextUtils {
cloneConn.setDatasourceName(datasource);
cloneConn.setDBRootPath(dbRootPath);
cloneConn.setFileFieldName(filePath);
//To avoid encrypt the same value
cloneConn.setPassword(originEncryptedPassword);
cloneConn.setRawPassword(password); // the password is raw.
cloneConn.setPort(port);
cloneConn.setUiSchema(schemaOracle);

View File

@@ -52,6 +52,7 @@ public enum EDatabase4DriverClassName {
MYSQL8(EDatabaseTypeName.MYSQL, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
MARIADB(EDatabaseTypeName.MYSQL, "org.mariadb.jdbc.Driver"), //$NON-NLS-1$
AMAZON_AURORA(EDatabaseTypeName.AMAZON_AURORA, "org.gjt.mm.mysql.Driver"), //$NON-NLS-1$
AMAZON_AURORA_3(EDatabaseTypeName.AMAZON_AURORA, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
NETEZZA(EDatabaseTypeName.NETEZZA, "org.netezza.Driver"), //$NON-NLS-1$
ORACLEFORSID(EDatabaseTypeName.ORACLEFORSID, "oracle.jdbc.OracleDriver", "oracle.jdbc.driver.OracleDriver"), //$NON-NLS-1$ //$NON-NLS-2$

View File

@@ -69,7 +69,7 @@ public enum EDatabaseVersion4Drivers {
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
// MYSQL, add for 9594
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-j-8.0.33.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
@@ -156,7 +156,10 @@ public enum EDatabaseVersion4Drivers {
"aws-java-sdk-redshift-internal-1.12.x.jar", "aws-java-sdk-core-1.12.315.jar", //$NON-NLS-1$ //$NON-NLS-2$
"aws-java-sdk-sts-1.12.315.jar", "aws-java-sdk-redshift-1.12.315.jar", "jmespath-java-1.12.315.jar" })), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 5", "MYSQL_5", //$NON-NLS-1$
"mysql-connector-java-5.1.49.jar")),
AMAZON_AURORA_3(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 8", "MYSQL_8", //$NON-NLS-1$
"mysql-connector-j-8.0.33.jar"));
private DbVersion4Drivers dbVersionBean;

View File

@@ -15,8 +15,10 @@ package org.talend.core.hadoop;
import java.util.Collection;
import java.util.HashSet;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.ExceptionHandler;
@@ -25,6 +27,9 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.runtime.hd.IDynamicDistributionManager;
import org.talend.core.runtime.i18n.Messages;
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.TalendFileFactory;
/**
* created by cmeng on Jul 20, 2015 Detailled comment
@@ -145,4 +150,58 @@ public class BigDataBasicUtil {
return null;
}
public static String getDistributionByVersion(String version) {
if (StringUtils.isEmpty(version))
return null;
if (version.startsWith("EMR")) {
return "AMAZON_EMR";
} else if (version.equals("SYNAPSE")) {
return "AZURE_SYNAPSE";
} else if (version.contains("CDH") || version.contains("CDP")) {
return "CLOUDERA";
} else if (version.startsWith("Databricks")) {
return "DATABRICKS";
} else if (version.contains("HDP")) {
return "HORTONWORKS";
} else if (version.startsWith("MICROSOFT_HD_INSIGHT")) {
return "MICROSOFT_HD_INSIGHT";
} else if (version.startsWith("SPARK")) {
return "SPARK";
}
return null;
}
public static void setDistribution(NodeType node, String dbVersionName) {
if (node == null || dbVersionName == null) {
return;
}
EList<ElementParameterType> elementParameters = node.getElementParameter();
String distribution = null;
String dbVersion = null;
// Iterate over the item elementParameters in order to find the "DISTRIBUTION" and "SPARK_VERSION"
// parameters values.
for (int i = 0; i < elementParameters.size(); i++) {
ElementParameterType param = elementParameters.get(i);
if (dbVersionName.equals(param.getName())) {
dbVersion = param.getValue();
break;
}
}
try {
ElementParameterType property = TalendFileFactory.eINSTANCE.createElementParameterType();
distribution = BigDataBasicUtil.getDistributionByVersion(dbVersion);
if (distribution != null) {
property.setName("DISTRIBUTION"); //$NON-NLS-1$
property.setField("CLOSED_LIST"); //$NON-NLS-1$
property.setValue(distribution);
elementParameters.add(property);
} else {
ExceptionHandler.log("no matched distribution for version " + dbVersion);//$NON-NLS-1$
}
} catch (Exception e) {
ExceptionHandler.log(e.getMessage());
}
}
}

View File

@@ -30,6 +30,8 @@ public class HadoopConstants {
public static final String SPARK_MODE_DATAPROC = "DATAPROC";
public static final String SPARK_MODE_SYNAPSE = "SYNAPSE";
public static final String SPARK_MODE_HDI = "HDI";
public static final String FRAMEWORK = "FRAMEWORK";

View File

@@ -33,6 +33,7 @@ import org.talend.core.model.properties.ContextItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.cwm.helper.ResourceHelper;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
@@ -335,6 +336,8 @@ public class JobContextManager implements IContextManager {
} else {
contextParam.setType(MetadataTalendType.getDefaultTalendType());
}
//To avoid encrypt the same value}
contextParam.setOriginEncryptedValue(contextParamType.getValue());
contextParam.setValue(contextParamType.getRawValue());
contextParam.setPromptNeeded(contextParamType.isPromptNeeded());
@@ -560,7 +563,10 @@ public class JobContextManager implements IContextManager {
contextParamType.setName(contextParam.getName());
contextParamType.setPrompt(contextParam.getPrompt());
contextParamType.setType(contextParam.getType());
//To avoid encrypt the same value
contextParamType.setValue(contextParam.getOriginEncryptedValue());
contextParamType.setRawValue(contextParam.getValue());
contextParam.setOriginEncryptedValue(contextParamType.getValue()); // For origin encrypted value is null or encryption key upgrade
contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
contextParamType.setComment(contextParam.getComment());
if (!contextParam.isBuiltIn()) {

View File

@@ -46,6 +46,9 @@ public class JobContextParameter implements IContextParameter, Cloneable {
String[] valueList;
String internalId;
/*This value may dirty, only use to cache encrypted value*/
String originEncryptedValue;
/**
* change to save id always for bug 13184.
@@ -301,6 +304,15 @@ public class JobContextParameter implements IContextParameter, Cloneable {
this.source = source;
}
public String getOriginEncryptedValue() {
return originEncryptedValue;
}
public void setOriginEncryptedValue(String originEncryptedValue) {
this.originEncryptedValue = originEncryptedValue;
}
/*
* (non-Javadoc)
*

View File

@@ -1091,6 +1091,10 @@ public class RepositoryToComponentProperty {
if (dbVersionString != null) {
return dbVersionString.toUpperCase();
}
} else if (EDatabaseConnTemplate.AMAZON_AURORA.getDBDisplayName().equals(databaseType)) {
if (dbVersionString != null) {
return dbVersionString.toUpperCase();
}
} else if (EDatabaseTypeName.HIVE.getDisplayName().equals(databaseType)) {
return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
} else if (EDatabaseTypeName.HBASE.getDisplayName().equals(databaseType)) {

View File

@@ -75,4 +75,9 @@ public interface IContextParameter {
public String getInternalId();
public void setInternalId(String internalId);
/*This value may dirty, only use to cache encrypted value*/
public String getOriginEncryptedValue();
public void setOriginEncryptedValue(String originEncryptedValue);
}

View File

@@ -234,4 +234,9 @@ public interface IElementParameter {
public void setSerialized(boolean isSerialized);
public boolean isSelectedFromItemValue();
/*This value may dirty, only use to cache encrypted value*/
public String getOrignEncryptedValue();
public void setOrignEncryptedValue(String value);
}

View File

@@ -71,6 +71,9 @@ public interface IProcess2 extends IRepositoryObject, IProcess {
@Override
void setActivate(boolean b);
public boolean isRefactoringToJoblet();
public void refactoringToJoblet(boolean isRefactoring);
/**
* DOC qzhang Comment method "checkStartNodes".
*/

View File

@@ -368,6 +368,9 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
"repository.metadataCalculationView", "METADATA_CON_CALCULATION_VIEW", 106, true, true, new String[] { PROD_DI },
new String[] {}, false);
public final static ERepositoryObjectType METADATA_SAP_CDS_VIEW = new ERepositoryObjectType("repository.SAPTable", //$NON-NLS-1$
"METADATA_SAP_CDS_VIEW", 107, true, true, new String[] { PROD_DI }, new String[] {}, false);
private String label;
private String alias;

View File

@@ -137,6 +137,10 @@ public interface IStudioLiteP2Service extends IService {
void setupTmcUpdate(IProgressMonitor monitor, IStudioUpdateConfig updateConfig) throws Exception;
void handleTmcUpdateObserve(boolean trunOn);
boolean isUpdateManagedByTmc(IProgressMonitor monitor);
boolean removeM2() throws Exception;
void saveRemoveM2(boolean remove) throws Exception;

View File

@@ -317,3 +317,4 @@ ActionBarBuildHelper.SaveAll_toolTip=Save All
ContextOrderProperty.BuiltInComment=Built-in context variables
ContextOrderProperty.RepositoryComment=Context variables from repository context:
BaseComponentInstallerTask.installComponent=Installing component {0}
ApplicationWorkbenchWindowAdvisor.repositoryConnection=Connection

View File

@@ -47,6 +47,8 @@ public class ObjectElementParameter implements IElementParameter {
private boolean enable = true;
private String originEncryptedValue;
/**
* Constructs a new TextElementParameter.
*/
@@ -1052,4 +1054,15 @@ public class ObjectElementParameter implements IElementParameter {
// TODO Auto-generated method stub
return false;
}
@Override
public String getOrignEncryptedValue() {
return originEncryptedValue;
}
@Override
public void setOrignEncryptedValue(String value) {
this.originEncryptedValue = value;
}
}

View File

@@ -0,0 +1,86 @@
// ============================================================================
//
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.utils;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.CorePlugin;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.i18n.Messages;
import org.talend.core.model.general.Project;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.service.IRemoteService;
import org.talend.core.service.IStudioLiteP2Service;
import org.talend.core.ui.IInstalledPatchService;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.repository.ui.login.connections.ConnectionUserPerReader;
/**
* DOC jding class global comment. Detailled comment
*/
public class TalendWorkbenchUtil {
public static final String MANAGED_BY_ADMIN = " Managed by administrator"; //$NON-NLS-1$
public static String getWorkbenchWindowTitle() {
String title = "";
RepositoryContext repositoryContext = (RepositoryContext) CorePlugin.getContext()
.getProperty(Context.REPOSITORY_CONTEXT_KEY);
Project project = repositoryContext.getProject();
String appName = IBrandingService.get().getFullProductName();
// TDI-18644
ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
boolean localProvider = false;
try {
localProvider = factory.isLocalConnectionProvider();
} catch (PersistenceException e) {
localProvider = true;
}
String buildIdField = " (" + VersionUtils.getVersion() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
if (GlobalServiceRegister.getDefault().isServiceRegistered(IInstalledPatchService.class)) {
IInstalledPatchService pachService = (IInstalledPatchService) GlobalServiceRegister.getDefault()
.getService(IInstalledPatchService.class);
if (pachService != null) {
String patchVersion = pachService.getLatestInstalledVersion(true);
if (patchVersion != null) {
buildIdField = " (" + patchVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$ ;
if (IRemoteService.get() != null && IRemoteService.get().isCloudConnection()) {
IStudioLiteP2Service liteP2Service = IStudioLiteP2Service.get();
if (liteP2Service != null && liteP2Service.isUpdateManagedByTmc(new NullProgressMonitor())) {
buildIdField += MANAGED_BY_ADMIN;
}
}
}
}
}
if (TalendPropertiesUtil.isHideBuildNumber()) {
buildIdField = ""; //$NON-NLS-1$
}
if (localProvider) {
title = appName + buildIdField + " | " + project.getLabel() + " (" //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("ApplicationWorkbenchWindowAdvisor.repositoryConnection") + ": " //$NON-NLS-1$ //$NON-NLS-2$
+ ConnectionUserPerReader.getInstance().readLastConncetion() + ")"; //$NON-NLS-1$
} else {
title = appName + buildIdField + " | " + repositoryContext.getUser() + " | " + project.getLabel() + " (" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Messages.getString("ApplicationWorkbenchWindowAdvisor.repositoryConnection") + ": " //$NON-NLS-1$ //$NON-NLS-2$
+ ConnectionUserPerReader.getInstance().readLastConncetion() + ")"; //$NON-NLS-1$
}
return title;
}
}

View File

@@ -95,4 +95,6 @@ public interface IGITProviderService extends IService {
}
return register.getService(IGITProviderService.class);
}
public void clearOldStorage(IProgressMonitor monitor, Project project) throws PersistenceException;
}

View File

@@ -151,7 +151,7 @@ _UI_ApplicationInputSpecification_type=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E
_UI_AttributeUsageRelation_type=\u5C5E\u6027\u7528\u6CD5\u95A2\u4FC2
_UI_Category_type=\u30AB\u30C6\u30B4\u30EA\u30FC
_UI_CategoryHierarchy_type=\u30AB\u30C6\u30B4\u30EA\u30FC\u968E\u5C64
_UI_CostMatrix_type=\u30B3\u30B9\u30C8\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9
_UI_CostMatrix_type=\u30B3\u30B9\u30C8\u30DE\u30C8\u30EA\u30AF\u30B9
_UI_MiningAttribute_type=\u30DE\u30A4\u30CB\u30F3\u30B0\u5C5E\u6027
_UI_MiningDataSpecification_type=\u30DE\u30A4\u30CB\u30F3\u30B0\u30C7\u30FC\u30BF\u4ED5\u69D8
_UI_MiningModel_type=\u30DE\u30A4\u30CB\u30F3\u30B0\u30E2\u30C7\u30EB
@@ -418,7 +418,7 @@ _UI_Parameter_behavioralFeature_feature=\u52D5\u4F5C\u6A5F\u80FD
_UI_Parameter_event_feature=\u30A4\u30D9\u30F3\u30C8
_UI_Parameter_type_feature=\u30BF\u30A4\u30D7
_UI_AssociationEnd_aggregation_feature=\u96C6\u7D04
_UI_AssociationEnd_isNavigable_feature=Navigable\u3067\u3042\u308B
_UI_AssociationEnd_isNavigable_feature=\u8A98\u5C0E\u53EF\u80FD\u3067\u3042\u308B
_UI_Generalization_child_feature=\u5B50
_UI_Generalization_parent_feature=\u89AA
_UI_Instance_valueSlot_feature=\u5024\u30BB\u30C3\u30C8
@@ -552,7 +552,7 @@ _UI_Column_isNullable_feature=NULL\u53EF\u80FD
_UI_Column_length_feature=\u9577\u3055
_UI_Column_collationName_feature=\u7167\u5408\u540D
_UI_Column_characterSetName_feature=\u6587\u5B57\u30BB\u30C3\u30C8\u540D
_UI_Column_referencedTableType_feature=\u53C2\u7167\u3055\u308C\u308B\u30C6\u30FC\u30D6\u30EB\u30BF\u30A4\u30D7
_UI_Column_referencedTableType_feature=\u53C2\u7167\u30C6\u30FC\u30D6\u30EB\u30BF\u30A4\u30D7
_UI_Column_optionScopeColumnSet_feature=\u30AA\u30D7\u30B7\u30E7\u30F3\u30B9\u30B3\u30FC\u30D7\u30AB\u30E9\u30E0\u30BB\u30C3\u30C8
_UI_Procedure_type_feature=\u30BF\u30A4\u30D7
_UI_Trigger_eventManipulation_feature=\u30A4\u30D9\u30F3\u30C8\u64CD\u4F5C
@@ -743,7 +743,7 @@ _UI_ClusteringSettings_clusterIdAttributeName_feature=\u30AF\u30E9\u30B9\u30BF\u
_UI_SupervisedMiningSettings_confidenceAttributeName_feature=\u4FE1\u7528\u5C5E\u6027\u540D
_UI_SupervisedMiningSettings_predictedAttributeName_feature=\u4E88\u6E2C\u3055\u308C\u308B\u5C5E\u6027\u540D
_UI_SupervisedMiningSettings_costFunction_feature=\u30B3\u30B9\u30C8\u95A2\u6570
_UI_ClassificationSettings_costMatrix_feature=\u30B3\u30B9\u30C8\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9
_UI_ClassificationSettings_costMatrix_feature=\u30B3\u30B9\u30C8\u30DE\u30C8\u30EA\u30AF\u30B9
_UI_AssociationRulesSettings_minimumSupport_feature=\u6700\u5C0F\u30B5\u30DD\u30FC\u30C8
_UI_AssociationRulesSettings_minimumConfidence_feature=\u6700\u5C0F\u306E\u4FE1\u7528
_UI_AssociationRulesSettings_itemId_feature=\u30A2\u30A4\u30C6\u30E0ID

View File

@@ -184,10 +184,10 @@ _UI_RecordEditor_label = \u30EC\u30B3\u30FC\u30C9\u30E2\u30C7\u30EB\u30A8\u30C7\
_UI_RecordEditorFilenameDefaultBase = My
_UI_RecordEditorFilenameExtension = \u30EC\u30B3\u30FC\u30C9
_UI_MultidimensionalModelWizard_label = \u591A\u6B21\u5143\u7684\u30E2\u30C7\u30EB
_UI_MultidimensionalModelWizard_description = \u65B0\u898F\u306E\u591A\u6B21\u5143\u7684\u30E2\u30C7\u30EB\u3092\u4F5C\u6210
_UI_MultidimensionalModelWizard_label = \u591A\u6B21\u5143\u30E2\u30C7\u30EB
_UI_MultidimensionalModelWizard_description = \u65B0\u898F\u306E\u591A\u6B21\u5143\u30E2\u30C7\u30EB\u3092\u4F5C\u6210
_UI_MultidimensionalEditor_label = \u591A\u6B21\u5143\u7684\u30E2\u30C7\u30EB\u30A8\u30C7\u30A3\u30BF
_UI_MultidimensionalEditor_label = \u591A\u6B21\u5143\u30E2\u30C7\u30EB\u30A8\u30C7\u30A3\u30BF\u30FC
_UI_MultidimensionalEditorFilenameDefaultBase = My
_UI_MultidimensionalEditorFilenameExtension = \u591A\u6B21\u5143\u7684

View File

@@ -76,7 +76,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>5.2.7.RELEASE</version>
<version>5.2.9.RELEASE</version>
<type>pom</type>
</dependency>
<dependency>

View File

@@ -13,7 +13,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>

View File

@@ -32,7 +32,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
@@ -123,7 +123,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.56.1</tcomp.version>
<tcomp.version>1.57.1</tcomp.version>
<slf4j.version>1.7.34</slf4j.version>
<reload4j.version>1.2.22</reload4j.version>
</properties>

View File

@@ -37,3 +37,4 @@ Export-Package: org.talend.designer.maven,
org.talend.designer.maven.tools.extension,
org.talend.designer.maven.utils
Import-Package: org.slf4j

View File

@@ -26,5 +26,4 @@
serviceId="IDesignerMavenService">
</Service>
</extension>
</plugin>

View File

@@ -59,7 +59,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -69,7 +69,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -101,7 +101,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -148,7 +148,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -200,12 +200,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
<version>3.8.8</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>

View File

@@ -231,7 +231,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
Dependency mavenCoreDep = new Dependency();
mavenCoreDep.setGroupId("org.apache.maven");
mavenCoreDep.setArtifactId("maven-core");
mavenCoreDep.setVersion("3.8.6");
mavenCoreDep.setVersion("3.8.8");
shade.getDependencies().add(guavaDep);
shade.getDependencies().add(codecDep);

View File

@@ -0,0 +1,46 @@
// ============================================================================
//
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package routines.system;
import java.util.concurrent.ConcurrentHashMap;
public class SingletonHolder {
private java.util.Map<String, Object> map = null;
private static SingletonHolder INSTANCE;
private SingletonHolder() {
map = new ConcurrentHashMap<String, Object>();
}
public static synchronized SingletonHolder getInstance() {
if (INSTANCE == null) {
INSTANCE = new SingletonHolder();
}
return INSTANCE;
}
public void put(String key, Object value) {
map.put(key, value);
}
public Object get(String key) {
return map.get(key);
}
public boolean containsKey(String key) {
return map.containsKey(key);
}
}

View File

@@ -53,6 +53,7 @@ import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.CatalogHelper;
import org.talend.cwm.helper.ConnectionHelper;
import org.talend.cwm.helper.SchemaHelper;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.metadata.managment.repository.ManagerConnection;
import org.talend.metadata.managment.ui.model.IConnParamName;
@@ -1003,6 +1004,7 @@ public final class DBConnectionContextUtils {
// get values
String server = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getServerName());
String username = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getUsername());
String originEncryptedPassword = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getPassword());
String password = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getRawPassword());
String port = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getPort());
String sidOrDatabase = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getSID());
@@ -1024,6 +1026,8 @@ public final class DBConnectionContextUtils {
cloneConn.setDatasourceName(datasource);
cloneConn.setDBRootPath(dbRootPath);
cloneConn.setFileFieldName(filePath);
// To avoid encrypt the same value
cloneConn.setPassword(originEncryptedPassword);
cloneConn.setRawPassword(password); // the password is raw.
cloneConn.setPort(port);
cloneConn.setUiSchema(schemaOracle);
@@ -1491,6 +1495,7 @@ public final class DBConnectionContextUtils {
}
String server = ContextParameterUtils.getOriginalValue(contextType, conn.getServerName());
String username = ContextParameterUtils.getOriginalValue(contextType, conn.getUsername());
String originEncryptedPassword = ContextParameterUtils.getOriginalValue(contextType, conn.getPassword());
String password = ContextParameterUtils.getOriginalValue(contextType, conn.getRawPassword());
String port = ContextParameterUtils.getOriginalValue(contextType, conn.getPort());
String sidOrDatabase = ContextParameterUtils.getOriginalValue(contextType, conn.getSID());
@@ -1511,6 +1516,8 @@ public final class DBConnectionContextUtils {
conn.setDatasourceName(datasource);
conn.setDBRootPath(dbRootPath);
conn.setFileFieldName(filePath);
// To avoid encrypt the same value
conn.setPassword(originEncryptedPassword);
conn.setRawPassword(password);
conn.setPort(port);
conn.setUiSchema(schemaOracle);

View File

@@ -116,6 +116,14 @@
name="postgresql-42.2.26.jar"
required="true">
</libraryNeeded>
<libraryNeeded
context="Mysql 8 dbwizard"
language="java"
message="Mysql 8 dbwizard for TOP"
mvn_uri="mvn:com.mysql/mysql-connector-j/8.0.33"
name="mysql-connector-j-8.0.33.jar"
required="true">
</libraryNeeded>
<libraryNeeded
context="Sybase wizard"
language="java"

View File

@@ -1009,6 +1009,12 @@ public class ExtractMetaDataUtils {
}else if(EDatabaseTypeName.GREENPLUM.getDisplayName().equals(dbType)
&& EDatabaseVersion4Drivers.GREENPLUM.getVersionValue().equals(dbVersion)){
driverClassName = EDatabase4DriverClassName.GREENPLUM.getDriverClass();
} else if (EDatabaseTypeName.AMAZON_AURORA.getXmlName().equals(dbType)) {
if (EDatabaseVersion4Drivers.AMAZON_AURORA.getVersionValue().equals(dbVersion)) {
driverClassName = EDatabase4DriverClassName.AMAZON_AURORA.getDriverClass();
} else if (EDatabaseVersion4Drivers.AMAZON_AURORA_3.getVersionValue().equals(dbVersion)) {
driverClassName = EDatabase4DriverClassName.AMAZON_AURORA_3.getDriverClass();
}
}
}
} else {

View File

@@ -50,7 +50,7 @@ public enum EHiveWithTezJars {
"jersey-json-1.9.jar", "jersey-server-1.9.jar", "jetty-util-6.1.26.hwx.jar",
"microsoft-windowsazure-storage-sdk-0.6.0.jar", "netty-3.6.2.Final.jar", "paranamer-2.3.jar", "servlet-api-2.5.jar",
"slf4j-api-1.7.5.jar", "slf4j-log4j12-1.7.5.jar", "snappy-java-1.0.4.1.jar", "stax-api-1.0.1.jar",
"xercesImpl-2.9.1.jar", "xml-apis-1.3.04.jar", "xmlenc-0.52.jar", "xz-1.0.jar", "zookeeper-3.4.6.jar" }),
"xercesImpl-2.12.2.jar", "xml-apis-1.4.01.jar", "xmlenc-0.52.jar", "xz-1.0.jar", "zookeeper-3.4.6.jar" }),
HDP_2_3(new String[] { "aopalliance-1.0.jar", "apacheds-i18n-2.0.0-M15.jar", "apacheds-kerberos-codec-2.0.0-M15.jar",
"api-asn1-api-1.0.0-M20.jar", "api-util-1.0.0-M20.jar", "asm-3.2.jar", "avro-1.7.5.jar",
@@ -66,7 +66,7 @@ public enum EHiveWithTezJars {
"jersey-guice-1.9.jar", "jersey-json-1.9.jar", "jersey-server-1.9.jar", "jetty-util-6.1.26.hwx.jar",
"microsoft-windowsazure-storage-sdk-0.6.0.jar", "netty-3.6.2.Final.jar", "paranamer-2.3.jar", "servlet-api-2.5.jar",
"slf4j-api-1.7.10.jar", "slf4j-log4j12-1.7.10.jar", "snappy-java-1.0.4.1.jar", "stax-api-1.0-2.jar",
"xercesImpl-2.9.1.jar", "xml-apis-1.3.04.jar", "xmlenc-0.52.jar", "xz-1.0.jar", "zookeeper-3.4.6.2.3.2.0-2950.jar" }),
"xercesImpl-2.12.2.jar", "xml-apis-1.4.01.jar", "xmlenc-0.52.jar", "xz-1.0.jar", "zookeeper-3.4.6.2.3.2.0-2950.jar" }),
MAPR401(new String[] { "commons-collections4-4.0.jar", "guava-11.0.2.jar", "guice-3.0.jar",
"hadoop-mapreduce-client-shuffle-2.4.1-mapr-1408.jar", "jettison-1.3.4.jar", "snappy-java-1.0.4.1.jar",
"tez-api-0.4.0-mapr-1408.jar", "tez-common-0.4.0-mapr-1408.jar", "tez-dag-0.4.0-mapr-1408.jar",

View File

@@ -879,7 +879,7 @@ _UI_TdSqlDataType_javaDataType_feature=Java\u30C7\u30FC\u30BF\u578B
_UI_TdSqlDataType_nullable_feature=NULL\u53EF\u80FD
_UI_TdSqlDataType_unsignedAttribute_feature=\u7B26\u53F7\u306A\u3057\u5C5E\u6027
_UI_TdSqlDataType_caseSensitive_feature=\u5927\u6587\u5B57\u3068\u5C0F\u6587\u5B57\u3092\u533A\u5225
_UI_TdSqlDataType_autoIncrement_feature=\u81EA\u52D5\u30A4\u30F3\u30AF\u30EA\u30E1\u30F3\u30C8
_UI_TdSqlDataType_autoIncrement_feature=\u81EA\u52D5\u5897\u5206
_UI_TdSqlDataType_localTypeName_feature=\u30ED\u30FC\u30AB\u30EB\u30BF\u30A4\u30D7\u540D
_UI_TdSqlDataType_searchable_feature=\u691C\u7D22\u53EF\u80FD
_UI_TdXMLElement_xsdElementDeclaration_feature=XSD\u30A8\u30EC\u30E1\u30F3\u30C8\u5BA3\u8A00

View File

@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
import org.talend.core.model.metadata.builder.connection.CDCConnection;
import org.talend.core.model.metadata.builder.connection.ConnectionPackage;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.cwm.helper.StudioEncryptionHelper;
/**
* <!-- begin-user-doc --> An implementation of the model object '<em><b>Database Connection</b></em>'. <!--
@@ -723,7 +724,7 @@ public class DatabaseConnectionImpl extends ConnectionImpl implements DatabaseCo
*/
public void setPort(String newPort) {
String oldPort = port;
port = newPort;
port = newPort;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConnectionPackage.DATABASE_CONNECTION__PORT, oldPort, port));
}
@@ -773,6 +774,9 @@ public class DatabaseConnectionImpl extends ConnectionImpl implements DatabaseCo
}
public void setRawPassword(String value) {
if (value != null && StudioEncryptionHelper.isLatestEncryptionKey(password) && value.equals(getRawPassword())) {
return;
}
setPassword(getValue(value, true));
}

View File

@@ -0,0 +1,37 @@
// ============================================================================
//
// 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.cwm.helper;
import org.talend.utils.security.StudioEncryption;
import org.talend.utils.security.StudioKeySource;
public class StudioEncryptionHelper {
public static Boolean isLatestEncryptionKey(String encryptedValue) {
if (encryptedValue != null && StudioEncryption.hasEncryptionSymbol(encryptedValue)) {
if (encryptedValue.startsWith(StudioEncryption.PREFIX_PASSWORD)) {
String[] srcData = encryptedValue.split("\\:");
StudioKeySource ks = StudioEncryption.getKeySource(srcData[1], false);
if (ks.getKeyName().isSystemKey() && StudioEncryption.getKeySource(StudioEncryption.EncryptionKeyName.SYSTEM.toString(), true)
.getKeyName().getKeyName().equals(ks.getKeyName().getKeyName())) {
return true;
}
if (ks.getKeyName().isRoutineKey() && StudioEncryption.getKeySource(StudioEncryption.EncryptionKeyName.ROUTINE.toString(), true)
.getKeyName().getKeyName().equals(ks.getKeyName().getKeyName())) {
return true;
}
}
}
return false;
}
}

View File

@@ -10,6 +10,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.talend.commons.utils.PasswordEncryptUtil;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage;
import org.talend.utils.security.StudioEncryption;
@@ -408,6 +409,9 @@ public class ContextParameterTypeImpl extends EObjectImpl implements ContextPara
public void setRawValue(String newValue) {
if (newValue != null && newValue.length() > 0 && PasswordEncryptUtil.isPasswordType(getType())) {
if (StudioEncryptionHelper.isLatestEncryptionKey(value) && newValue.equals(getRawValue())) {
return;
}
String encryptValue = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
.encrypt(newValue);
if (encryptValue != null) {

View File

@@ -7,6 +7,7 @@ package org.talend.designer.core.model.utils.emf.talendfile.impl;
import java.util.Collection;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
@@ -17,6 +18,7 @@ import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.talend.commons.utils.PasswordEncryptUtil;
import org.talend.cwm.helper.StudioEncryptionHelper;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ElementValueType;
import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage;
@@ -326,6 +328,9 @@ public class ElementParameterTypeImpl extends EObjectImpl implements ElementPara
public void setRawValue(String newValue) {
if (newValue != null && newValue.length() > 0 && PasswordEncryptUtil.isPasswordField(getField())) {
if (StudioEncryptionHelper.isLatestEncryptionKey(value) && newValue.equals(getRawValue())) {
return;
}
String encryptValue = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM)
.encrypt(newValue);
if (encryptValue != null) {

View File

@@ -34,7 +34,6 @@ ExportLogsWizardPage.confirmMsg=Warning: this file already exist, do you want to
ExportLogsWizardPage.exportLog=Export logs to an archive file
ApplicationWorkbenchWindowAdvisor.wrongJavaSetup=Wrong Java setup
ApplicationWorkbenchWindowAdvisor.jdkRequired=A JDK is required to build Jobs. You can define which JDK to use in Window > Preferences > Java > Installed JREs.
ApplicationWorkbenchWindowAdvisor.repositoryConnection=Connection
ApplicationWorkbenchAdvisor.ProgressJobsTitle=Progress Jobs Title
ApplicationWorkbenchAdvisor.ProgressJobsMessages=Exit Application without waiting for the Progress be finished.
LinksToolbarItem_0=Learn from tutorials

View File

@@ -76,7 +76,6 @@ import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.utils.CheatSheetPerspectiveAdapter;
import org.talend.commons.utils.VersionUtils;
import org.talend.commons.utils.time.TimeMeasurePerformance;
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
@@ -86,17 +85,13 @@ import org.talend.core.GlobalServiceRegister;
import org.talend.core.ITDQItemService;
import org.talend.core.ITDQRepositoryService;
import org.talend.core.PluginChecker;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.model.general.Project;
import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.model.utils.RepositoryManagerHelper;
import org.talend.core.model.utils.TalendPropertiesUtil;
import org.talend.core.model.utils.TalendWorkbenchUtil;
import org.talend.core.prefs.IDEInternalPreferences;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.IInstalledPatchService;
import org.talend.core.ui.branding.IBrandingConfiguration;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.core.ui.perspective.RestoreAllRegisteredPerspectivesProvider;
@@ -114,7 +109,6 @@ import org.talend.rcp.i18n.Messages;
import org.talend.rcp.util.ApplicationDeletionUtil;
import org.talend.repository.RepositoryWorkUnit;
import org.talend.repository.token.RepositoryActionLogger;
import org.talend.repository.ui.login.connections.ConnectionUserPerReader;
import org.talend.repository.ui.views.IRepositoryView;
/**
@@ -175,49 +169,11 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
configurer.setShowProgressIndicator(true);
configurer.setShowPerspectiveBar(true);
configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter(configurer.getWindow()));
RepositoryContext repositoryContext = (RepositoryContext) CorePlugin.getContext().getProperty(
Context.REPOSITORY_CONTEXT_KEY);
Project project = repositoryContext.getProject();
IBrandingService service = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
IBrandingConfiguration brandingConfiguration = service.getBrandingConfiguration();
String appName = service.getFullProductName();
// TDI-18644
ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
boolean localProvider = false;
try {
localProvider = factory.isLocalConnectionProvider();
} catch (PersistenceException e) {
localProvider = true;
}
String buildIdField = " (" + VersionUtils.getVersion() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
if (GlobalServiceRegister.getDefault().isServiceRegistered(IInstalledPatchService.class)) {
IInstalledPatchService pachService = (IInstalledPatchService) GlobalServiceRegister
.getDefault().getService(IInstalledPatchService.class);
if (pachService != null) {
String patchVersion = pachService.getLatestInstalledVersion(true);
if(patchVersion != null) {
buildIdField = " (" + patchVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$;
}
}
}
if (TalendPropertiesUtil.isHideBuildNumber()) {
buildIdField = ""; //$NON-NLS-1$
}
if (localProvider) {
configurer
.setTitle(appName
+ buildIdField
+ " | " + project.getLabel() + " (" //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("ApplicationWorkbenchWindowAdvisor.repositoryConnection") + ": " + ConnectionUserPerReader.getInstance().readLastConncetion() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
configurer
.setTitle(appName
+ buildIdField
+ " | " + repositoryContext.getUser() + " | " + project.getLabel() + " (" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Messages.getString("ApplicationWorkbenchWindowAdvisor.repositoryConnection") + ": " + ConnectionUserPerReader.getInstance().readLastConncetion() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
configurer.setTitle(TalendWorkbenchUtil.getWorkbenchWindowTitle());
ActionBarBuildHelper helper = (ActionBarBuildHelper) brandingConfiguration.getHelper();
if (helper == null) {
helper = new ActionBarBuildHelper();

View File

@@ -129,7 +129,7 @@ public class MetadataService implements IMetadataService {
} else {
objectType = realNode.getObjectType();
}
if (objectType.equals(ERepositoryObjectType.METADATA_CONNECTIONS)) {
if (objectType.equals(ERepositoryObjectType.METADATA_CONNECTIONS) || (null!=objectType.getLabel() && objectType.getLabel().equals("JDBC"))) {
relatedWizard = new DatabaseWizard(PlatformUI.getWorkbench(), creation, realNode, null);
} else if (objectType.equals(ERepositoryObjectType.METADATA_FILE_DELIMITED)) {
relatedWizard = new DelimitedFileWizard(PlatformUI.getWorkbench(), creation, realNode, null);

View File

@@ -4358,6 +4358,8 @@ public class DatabaseForm extends AbstractForm {
return getSybaseVersionDrivers(dbType);
}else if(asGreenplumVersionEnable()) {
return getGreenplumVersionDrivers(dbType);
} else if (asAmazonAuroraVersionEnable()) {
return getAmazonAuroraVersionDrivers(dbType);
}
List<String> result = new ArrayList<String>();
List<EDatabaseVersion4Drivers> v4dList = EDatabaseVersion4Drivers.indexOfByDbType(dbType);
@@ -4391,6 +4393,14 @@ public class DatabaseForm extends AbstractForm {
result.add(EDatabaseVersion4Drivers.GREENPLUM_PSQL.getVersionDisplay());
return result;
}
private List<String> getAmazonAuroraVersionDrivers(String dbType) {
List<String> result = new ArrayList<String>();
result.add(EDatabaseVersion4Drivers.AMAZON_AURORA_3.getVersionDisplay());
result.add(EDatabaseVersion4Drivers.AMAZON_AURORA.getVersionDisplay());
return result;
}
private void addFieldsForGeneralDB(Composite parent) {
generalDbCompositeParent = new Composite(parent, SWT.NULL);
@@ -4947,6 +4957,7 @@ public class DatabaseForm extends AbstractForm {
return oracleVersionEnable() || as400VersionEnable()
|| EDatabaseConnTemplate.ACCESS.getDBDisplayName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.MYSQL.getDBDisplayName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.AMAZON_AURORA.getDBDisplayName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.HIVE.getDBDisplayName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.PLUSPSQL.getDBDisplayName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.VERTICA.getDBDisplayName().equals(getConnectionDBType())
@@ -5841,6 +5852,7 @@ public class DatabaseForm extends AbstractForm {
boolean isSAS = asSASVersionEnable();
boolean isImpala = ImpalaVersionEnable();
boolean isMsSQL = asMsSQLVersionEnable();
boolean isAmazonAurora = asAmazonAuroraVersionEnable();
boolean isSybase = asSybaseVersionEnable();
boolean isGreenplum = asGreenplumVersionEnable();
@@ -5862,6 +5874,9 @@ public class DatabaseForm extends AbstractForm {
} else if (dbType.equals(EDatabaseConnTemplate.MYSQL.getDBDisplayName())) {
dbVersionCombo.getCombo().setItems(versions);
dbVersionCombo.setHideWidgets(!isMySQL);
} else if (dbType.equals(EDatabaseConnTemplate.AMAZON_AURORA.getDBDisplayName())) {
dbVersionCombo.getCombo().setItems(versions);
dbVersionCombo.setHideWidgets(!isAmazonAurora);
} else if (dbType.equals(EDatabaseConnTemplate.VERTICA.getDBDisplayName())) {
dbVersionCombo.getCombo().setItems(versions);
dbVersionCombo.setHideWidgets(!isVertica);
@@ -6873,6 +6888,7 @@ public class DatabaseForm extends AbstractForm {
boolean isOracle = visible && oracleVersionEnable();
boolean isAS400 = visible && as400VersionEnable();
boolean isMySQL = visible && asMySQLVersionEnable();
boolean isAmazonAurora = visible && asAmazonAuroraVersionEnable();
boolean isVertica = visible && asVerticaVersionEnable();
boolean isSAS = visible && asSASVersionEnable();
boolean isHbase = visible && asHbaseVersionEnable();
@@ -6886,7 +6902,8 @@ public class DatabaseForm extends AbstractForm {
dbVersionCombo
.setEnabled(!isReadOnly()
&& (isOracle || isAS400 || isMySQL || isVertica || isSAS || isImpala || isMsSQL || isSybase||isGreenplum
&& (isOracle || isAS400 || isMySQL || isAmazonAurora || isVertica || isSAS || isImpala || isMsSQL
|| isSybase || isGreenplum
|| EDatabaseConnTemplate.PSQL.getDBTypeName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.PLUSPSQL.getDBTypeName().equals(getConnectionDBType())
|| EDatabaseConnTemplate.ACCESS.getDBTypeName().equals(getConnectionDBType()) || EDatabaseConnTemplate.MSSQL05_08
@@ -7572,6 +7589,15 @@ public class DatabaseForm extends AbstractForm {
&& LanguageManager.getCurrentLanguage().equals(ECodeLanguage.JAVA);
}
private boolean asAmazonAuroraVersionEnable() {
if (getConnectionDBType().length() <= 0) {
return false;
}
EDatabaseConnTemplate template = EDatabaseConnTemplate.indexOfTemplate(getConnectionDBType());
return template != null && template == EDatabaseConnTemplate.AMAZON_AURORA
&& LanguageManager.getCurrentLanguage().equals(ECodeLanguage.JAVA);
}
private boolean asGreenplumVersionEnable() {
if (getConnectionDBType().length() <= 0) {
return false;

View File

@@ -511,6 +511,12 @@ public class DatabaseWizard extends CheckLastVersionRepositoryWizard implements
} else if (EDatabaseVersion4Drivers.MARIADB.getVersionValue().equals(dbVersion)) {
driverClass = EDatabase4DriverClassName.MARIADB.getDriverClass();
}
} else if (EDatabaseTypeName.AMAZON_AURORA.equals(dbType)) {
if (EDatabaseVersion4Drivers.AMAZON_AURORA.getVersionValue().equals(dbVersion)) {
driverClass = EDatabase4DriverClassName.AMAZON_AURORA.getDriverClass();
} else if (EDatabaseVersion4Drivers.AMAZON_AURORA_3.getVersionValue().equals(dbVersion)) {
driverClass = EDatabase4DriverClassName.AMAZON_AURORA_3.getDriverClass();
}
} else if (EDatabaseTypeName.MSSQL.equals(dbType)
&& EDatabaseVersion4Drivers.MSSQL_PROP.getVersionValue().equals(dbVersion)) {
driverClass = EDatabase4DriverClassName.MSSQL2.getDriverClass();

View File

@@ -1171,4 +1171,16 @@ public class TestElementParameter implements IElementParameter {
// TODO Auto-generated method stub
return false;
}
@Override
public String getOrignEncryptedValue() {
// TODO Auto-generated method stub
return null;
}
@Override
public void setOrignEncryptedValue(String value) {
// TODO Auto-generated method stub
}
}

View File

@@ -582,6 +582,18 @@ public class RepositoryObjectTypeBuildProviderTest {
return null;
}
@Override
public boolean isRefactoringToJoblet() {
// TODO Auto-generated method stub
return false;
}
@Override
public void refactoringToJoblet(boolean isRefactoring) {
// TODO Auto-generated method stub
}
}
@Before