Compare commits
10 Commits
hcyi/TUP-4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34c22ddeee | ||
|
|
80c38990ff | ||
|
|
9809441f9e | ||
|
|
e6217156be | ||
|
|
9c83ffd7e5 | ||
|
|
034579b20b | ||
|
|
b123fb3f74 | ||
|
|
9194dd8867 | ||
|
|
7bae9c36c5 | ||
|
|
8963b2d962 |
@@ -304,7 +304,7 @@
|
||||
<IMPORT NAME="failureaccess-1.0.1.jar" MODULE="failureaccess-1.0.1.jar" MVN="mvn:com.google.guava/failureaccess/1.0.1" REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.14.3.jar" MODULE="jackson-core-2.14.3.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.14.3" REQUIRED="true" />
|
||||
<!-- REQUIRED FOR GOOGLE STORAGE -->
|
||||
<IMPORT NAME="jets3t-0.9.1" MODULE="jets3t-0.9.1.jar" MVN="mvn:org.talend.libraries/jets3t-0.9.1/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="jets3t-0.9.4" MODULE="jets3t-0.9.4.jar" MVN="mvn:net.java.dev.jets3t/jets3t/0.9.4" REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.2" MODULE="commons-logging-1.2.jar" MVN="mvn:commons-logging/commons-logging/1.2" REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.13" MODULE="httpclient-4.5.13.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.13" REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.13" MODULE="httpcore-4.4.13.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.13" REQUIRED="true" />
|
||||
|
||||
@@ -20,6 +20,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -37,6 +38,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -31,6 +31,7 @@ DBTYPE.ITEM.MSSQL=MSSQLServer
|
||||
DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.ODBC=ODBC
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -110,6 +111,7 @@ CONNECTION_INTERBASE.NAME=
|
||||
CONNECTION_MSSQL.NAME=
|
||||
CONNECTION_MYSQL.NAME=
|
||||
CONNECTION_ORACLE.NAME=
|
||||
CONNECTION_POSTGREPLUS.NAME=
|
||||
CONNECTION_POSTGRE.NAME=
|
||||
CONNECTION_SQLITE.NAME=
|
||||
CONNECTION_SYBASE.NAME=
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<!-- json path by javascript api -->
|
||||
<IMPORT NAME="json_simple" MODULE="json-simple-1.1.jar" MVN="mvn:com.googlecode.json-simple/json-simple/1.1" UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json_simple-1.1.jar"
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH_WITHOUTPUT_LOOP')" />
|
||||
<IMPORT NAME="jsonpath" MODULE="jsonpath.jar" MVN="mvn:org.talend.libraries/jsonpath/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/jsonpath.jar"
|
||||
<IMPORT NAME="jsonpath-js" MODULE="jsonpath-js-0.0.1.jar" MVN="mvn:org.talend.components/jsonpath-js/0.0.1" UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/jsonpath.jar"
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH_WITHOUTPUT_LOOP')" />
|
||||
|
||||
<!-- xpath -->
|
||||
|
||||
@@ -14,6 +14,7 @@ DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.MSSQL=MSSQLServer
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DATABASE_NAME.NAME=Nom de la base de donn\u00E9es
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.INTERBASE=Interbase
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.INGRES=Ingres
|
||||
@@ -36,6 +37,7 @@ CONNECTION_MSSQL.NAME=Liste des composants
|
||||
CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_DBORACLE.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
|
||||
@@ -19,6 +19,7 @@ CRITERIA.NAME=Crit\u00E8res de filtre
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DATABASE_NAME.NAME=Nom de la base de donn\u00E9es
|
||||
DBTYPE.ITEM.INTERBASE=Interbase
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.INGRES=Ingres
|
||||
LONG_NAME=It\u00E8re sur un ensemble de nom de tables d\u00E9finies dans une connexion de base de donn\u00E9es
|
||||
@@ -36,6 +37,7 @@ CONNECTION_MSSQL.NAME=Liste des composants
|
||||
CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_DBORACLE.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java Message Service" MODULE="jms.jar" MVN="mvn:org.talend.libraries/jms/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.esb.ext/lib/jms.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Java Message Service" MODULE="jakarta.jms-api-2.0.3.jar" MVN="mvn:jakarta.jms/jakarta.jms-api/2.0.3" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</ADVANCED_PARAMETERS>
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java Message Service" MODULE="jms.jar" MVN="mvn:org.talend.libraries/jms/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.esb.ext/lib/jms.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Java Message Service" MODULE="jakarta.jms-api-2.0.3.jar" MVN="mvn:jakarta.jms/jakarta.jms-api/2.0.3" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java-Feed" MODULE="feed4j.jar" MVN="mvn:org.talend.libraries/feed4j/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-Feed" MODULE="feed4j-1.0.jar" MVN="mvn:feed4j/feed4j/1.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-DOM" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-NEKO" MODULE="nekohtml-0.9.5.jar" MVN="mvn:nekohtml/nekohtml/0.9.5" REQUIRED="true" />
|
||||
<IMPORT NAME="xercesImpl-2.12.2" MODULE="xercesImpl-2.12.2.jar" MVN="mvn:xerces/xercesImpl/2.12.2" REQUIRED="true" BundleID="" />
|
||||
|
||||
@@ -7,7 +7,7 @@ CONTEXTPARAMS.NAME=Param\u00E8tres de contexte
|
||||
PROCESS.NAME=Job
|
||||
SAVE_BEFORE_RUN.NAME=Enregistrer avant ex\u00E9cution
|
||||
TRANSMIT_WHOLE_CONTEXT.NAME=Transmettre le contexte complet
|
||||
USE_INDEPENDENT_PROCESS.NAME=Utiliser un processus ind\u00E9pendant pour ex\u00E9cuter le sous-Job
|
||||
USE_INDEPENDENT_PROCESS.NAME=Utiliser un processus ind\u00E9pendant pour ex\u00E9cuter le Job enfant
|
||||
DIE_ON_CHILD_ERROR.NAME=Arr\u00EAter en cas d'erreur de l'enfant
|
||||
USE_DYNAMIC_JOB.NAME=Utiliser un Job dynamique
|
||||
CONTEXT_JOB.NAME=Context job
|
||||
@@ -22,8 +22,8 @@ USE_CHILD_JVM_SETTING.NAME=Utiliser les arguments JVM du Job enfant
|
||||
USE_CUSTOM_JVM_SETTING.NAME=\u00C9craser les arguments JVM du Job enfant
|
||||
JVM_ARGUMENTS.NAME=JVM
|
||||
JVM_ARGUMENTS.ITEM.ARGUMENT=Argument
|
||||
USE_DYNAMIC_CONTEXT.NAME=Utilisez un contexte dynamique pour le sous-Job
|
||||
USE_DYNAMIC_CONTEXT.NAME=Utiliser un contexte dynamique pour le Job enfant
|
||||
DYNAMIC_CONTEXT.NAME=
|
||||
USE_EXTRA_CLASSPATH.NAME=Utilisez un classpath suppl\u00E9mentaire pour le sous-Job
|
||||
USE_EXTRA_CLASSPATH.NAME=Utilisez un classpath suppl\u00E9mentaire pour le Job enfant
|
||||
EXTRA_CLASSPATH.NAME=
|
||||
LOAD_CONTEXT_FROM_FILE.NAME=Charger les param\u00E8tres de contexte depuis un fichier
|
||||
|
||||
@@ -150,3 +150,7 @@ RETENTION_PERIOD.NAME=P\u00E9riode de r\u00E9tention
|
||||
RETENTION_PERIOD_TYPE.NAME=
|
||||
RETENTION_PERIOD_TYPE.ITEM.DAYS=Jours
|
||||
RETENTION_PERIOD_TYPE.ITEM.YEARS=Ann\u00E9es
|
||||
SET_OBJECT_TAGS.NAME=Configurer les mots-cl\u00E9s des objets
|
||||
OBJECT_TAGS.NAME=
|
||||
OBJECT_TAGS.ITEM.OBJECT_TAG_KEY=Cl\u00E9 du mot-cl\u00E9
|
||||
OBJECT_TAGS.ITEM.OBJECT_TAG_VALUE=Valeur du mot-cl\u00E9
|
||||
|
||||
@@ -43,6 +43,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -63,6 +64,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -46,6 +46,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -83,6 +84,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -46,6 +46,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -68,6 +69,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -46,6 +46,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -67,6 +68,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -47,6 +47,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -66,6 +67,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -21,6 +21,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -39,6 +40,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -46,6 +46,7 @@ DBTYPE.ITEM.MYSQL=Mysql
|
||||
DBTYPE.ITEM.GREENPLUM=Greenplum
|
||||
DBTYPE.ITEM.PARACCEL=Paraccel
|
||||
DBTYPE.ITEM.POSTGRE=Postgresql
|
||||
DBTYPE.ITEM.POSTGREPLUS=PostgresPlus
|
||||
DBTYPE.ITEM.SQLITE=SQLite
|
||||
DBTYPE.ITEM.SYBASE=Sybase
|
||||
DBTYPE.ITEM.TERADATA=Teradata
|
||||
@@ -68,6 +69,7 @@ CONNECTION_MYSQL.NAME=Liste des composants
|
||||
CONNECTION_GREENPLUM.NAME=Liste des composants
|
||||
CONNECTION_PARACCEL.NAME=Liste des composants
|
||||
CONNECTION_POSTGRE.NAME=Liste des composants
|
||||
CONNECTION_POSTGREPLUS.NAME=Liste des composants
|
||||
CONNECTION_SQLITE.NAME=Liste des composants
|
||||
CONNECTION_SYBASE.NAME=Liste des composants
|
||||
CONNECTION_TERADATA.NAME=Liste des composants
|
||||
|
||||
@@ -389,6 +389,8 @@ GEFDeleteAction.deleteConnectionDialog.msg=La suppression de lien ne met pas aut
|
||||
GEFDeleteAction.deleteConnectionDialog.toggleMsg=Ne plus afficher cette bo\u00EEte de dialogue.
|
||||
GEFPasteAction.textWarning=Attention !
|
||||
GEFPasteAction.warningMessages=Impossible de coller les composants sp\u00E9cifiques (Entr\u00E9e/Sortie).
|
||||
GEFPasteAction.copypaste.supportdialog.title=Copier-coller non support\u00E9
|
||||
GEFPasteAction.copypaste.supportdialog.content=L'op\u00E9ration de copier-coller ne peut pas \u00EAtre appliqu\u00E9e sur ce composant actuellement.
|
||||
GuessSchemaController.0=Une erreur est survenue lors de la connexion \u00E0 la base de donn\u00E9es, ou il y a des erreurs dans la requ\u00EAte SQL, ou le bouton 'D\u00E9tecter le sch\u00E9ma' n'est pas compatible avec la requ\u00EAte SQL actuelle.{0}
|
||||
GuessSchemaController.connectionError=Erreur de connexion
|
||||
GuessSchemaController.connectionWarning=Avertissement de connexion
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
%~d0
|
||||
cd %~dp0
|
||||
java -Dtalend.component.manager.m2.repository="%cd%/../lib" ${talend.job.jvmargs} -cp ${talend.job.bat.classpath} ${talend.job.class} ${talend.job.bat.addition} %*
|
||||
java -Dtalend.component.manager.m2.repository=../lib ${talend.job.jvmargs} -cp ${talend.job.bat.classpath} ${talend.job.class} ${talend.job.bat.addition} %*
|
||||
@@ -1072,6 +1072,7 @@ LoginProjectPage.authorizationErrorMessage=Identifiant ou mot de passe invalide
|
||||
LoginProjectPage.errorMessageTitle=Erreur
|
||||
LoginProjectPage.invalidPAT.message=Le jeton que vous utilisez a plus de {0}\u00A0jours. Pour des raisons de s\u00E9curit\u00E9, utilisez un jeton plus r\u00E9cent ou connectez-vous avec Talend Cloud.
|
||||
LoginProjectPage.invalidPAT.more=En savoir plus
|
||||
LoginProjectPage.invalidPAT.network.error=Connexion au serveur suspendue, vous pouvez modifier la valeur du d\u00E9lai avant expiration dans les pr\u00E9f\u00E9rences de performance du studio.
|
||||
LoginNetworkPreferencePage.connect.info=Configurez le d\u00E9lai avant expiration de la connexion et de la lecture dans le champ suivant
|
||||
RemoteBranchesDialog.title=Branches distantes
|
||||
RemoteBranchesDialog.tree.branch=Branches distantes
|
||||
@@ -1091,10 +1092,8 @@ UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings=Utiliser les param\u0
|
||||
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.logon=Utiliser les param\u00E8tres locaux de mise \u00E0 jour
|
||||
UpdatesitePreferencePage.btn.overwriteRemoteUpdateSettings.help=Les param\u00E8tres de mise \u00E0 jour suivants vont \u00E9craser les param\u00E8tres de mise \u00E0 jour de Talend Management Console.
|
||||
UpdatesitePreferencePage.title=Configurer les r\u00E9f\u00E9rentiels de mise \u00E0 jour
|
||||
UpdatesitePreferencePage.base=URL de base
|
||||
UpdatesitePreferencePage.update=URL de mise \u00E0 jour
|
||||
UpdatesitePreferencePage.err.baseCantEmpty=L'URL de base ne peut \u00EAtre vide.
|
||||
UpdatesitePreferencePage.err.baseAndUpdateShouldBeDiff=L'URL de base et l'URL mise \u00E0 jour doivent \u00EAtre diff\u00E9rentes
|
||||
UpdatesitePreferencePage.err.cantEmpty=L'URL de mise \u00E0 jour ne peut \u00EAtre vide.
|
||||
UpdatesitePreferencePage.tooltip.cantEdit=Ce champ est sp\u00E9cifi\u00E9 dans les propri\u00E9t\u00E9s syst\u00E8me, impossible de le modifier.
|
||||
UpdatesitePreferencePage.err.title=Erreur
|
||||
UpdatesitePreferencePage.warn.onPremUpdateSetup=Si l'URL de mise \u00E0 jour est vide, votre Studio ne d\u00E9tecte pas automatiquement pas les mises \u00E0 jour disponibles et ne vous en notifie pas automatiquement.\nCliquez sur Restaurer les valeurs par d\u00E9faut pour configurer l'URL pour les mises \u00E0 jour les plus r\u00E9centes ou saisir une URL de mise \u00E0 jour diff\u00E9rente.
|
||||
|
||||
@@ -100,7 +100,6 @@ public class ProjectSettingsPreferenceDialog extends PreferenceDialog implements
|
||||
switch (buttonId) {
|
||||
case IDialogConstants.OK_ID: {
|
||||
okPressed();
|
||||
commiteProjectSettings();
|
||||
return;
|
||||
}
|
||||
case IDialogConstants.CANCEL_ID: {
|
||||
@@ -142,6 +141,7 @@ public class ProjectSettingsPreferenceDialog extends PreferenceDialog implements
|
||||
super.okPressed();
|
||||
rollBack(false);
|
||||
setInReopen(false);
|
||||
commiteProjectSettings();
|
||||
if (ProjectSettingPage.isRestart()) {
|
||||
ProjectSettingPage.setRestart(false);
|
||||
PlatformUI.getWorkbench().restart();
|
||||
|
||||
@@ -410,7 +410,8 @@ public class LoginWithCloudPage extends AbstractLoginActionPage implements Login
|
||||
+ DigestUtil.sha256Hex(token.getAccessToken().getBytes()) + "\t Refresh token SHA256 is:" + DigestUtil.sha256Hex(token.getRefreshToken().getBytes()));
|
||||
}
|
||||
ConnectionBean conn = saveConnection(token, TMCRepositoryUtil.getCloudAdminURL(dataCenter),
|
||||
ICloudSignOnService.get().getTokenUser(TMCRepositoryUtil.getCloudAdminURL(dataCenter), token));
|
||||
ICloudSignOnService.get().getTokenUser(TMCRepositoryUtil.getCloudAdminURL(dataCenter),
|
||||
token.getAccessToken()));
|
||||
TMCRepositoryUtil.saveRecentDataCenter(dataCenter);
|
||||
LoginHelper.getInstance().setCurrentSelectedConnBean(conn);
|
||||
if (isRefreshToken) {
|
||||
|
||||
@@ -126,9 +126,12 @@ input_<%=cid%>.start();
|
||||
globalMap.put("input_<%=cid%>", input_<%=cid%>);
|
||||
|
||||
<%
|
||||
final List<? extends IConnection> connections = node.getOutgoingConnections(EConnectionType.FLOW_MAIN);
|
||||
List<? extends IConnection> connections = node.getOutgoingConnections(EConnectionType.FLOW_MAIN);
|
||||
if(connections == null || connections.isEmpty()) {
|
||||
connections = node.getOutgoingConnections(EConnectionType.FLOW_MERGE);
|
||||
}
|
||||
boolean optionalRow = "true".equals(ElementParameterParser.getValue(node,"__OPTIONAL_ROW__"));
|
||||
if (!optionalRow && connections.isEmpty()) {
|
||||
if (!optionalRow && (connections == null || connections.isEmpty())) {
|
||||
throw new RuntimeException("Missing output connection for component " + family + "#" + originalName);
|
||||
}
|
||||
final String output = connections.isEmpty()? null: connections.iterator().next().getName();
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
final org.talend.sdk.component.runtime.di.OutputsHandler outputHandler_<%=cid%> = new org.talend.sdk.component.runtime.di.OutputsHandler(jsonb_<%=cid%>, servicesMapper_<%=cid%>);
|
||||
<%
|
||||
for (final IConnection connection : node.getOutgoingSortedConnections()) {
|
||||
if (connection.getLineStyle() != EConnectionType.FLOW_MAIN) {
|
||||
if ((connection.getLineStyle() != EConnectionType.FLOW_MAIN) && (connection.getLineStyle() != EConnectionType.FLOW_MERGE)) {
|
||||
continue;
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
while (outputHandler_<%=cid%>.hasMoreData()){
|
||||
<% for (final IConnection connection : node.getOutgoingSortedConnections()) {
|
||||
if (connection.getLineStyle() != EConnectionType.FLOW_MAIN) {
|
||||
if ((connection.getLineStyle() != EConnectionType.FLOW_MAIN) && (connection.getLineStyle() != EConnectionType.FLOW_MERGE)) {
|
||||
continue;
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -318,6 +318,15 @@
|
||||
name="UpdateEncryptTckMetadataMigrationTask"
|
||||
version="8.0.1">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="8.0.0"
|
||||
class="org.talend.sdk.component.studio.metadata.migration.UpgradeTacokitMetadataMigrationTask"
|
||||
description="Migrate tacokit metadata"
|
||||
id="org.talend.sdk.component.studio.metadata.migration.UpgradeTacokitMetadataMigrationTask"
|
||||
name="UpgradeTacokitMetadataMigrationTask"
|
||||
version="8.0.1">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="8.0.1"
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
*/
|
||||
package org.talend.sdk.component.studio.metadata.migration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
@@ -37,6 +42,7 @@ import org.talend.sdk.component.studio.exception.UserCancelledException;
|
||||
import org.talend.sdk.component.studio.i18n.Messages;
|
||||
import org.talend.sdk.component.studio.metadata.TaCoKitCache;
|
||||
import org.talend.sdk.component.studio.metadata.model.TaCoKitConfigurationModel;
|
||||
import org.talend.sdk.component.studio.model.parameter.ValueConverter;
|
||||
import org.talend.sdk.component.studio.model.update.TaCoKitUpdateManager;
|
||||
import org.talend.sdk.component.studio.util.TaCoKitUtil;
|
||||
import org.talend.sdk.component.studio.websocket.WebSocketClient.V1Component;
|
||||
@@ -47,7 +53,6 @@ import org.talend.sdk.studio.process.TaCoKitNode;
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class TaCoKitMigrationManager {
|
||||
|
||||
private V1ConfigurationType configurationClient;
|
||||
|
||||
private final V1Component componentClient = Lookups.client().v1().component();
|
||||
@@ -56,7 +61,8 @@ public class TaCoKitMigrationManager {
|
||||
configurationClient = Lookups.client().v1().configurationType();
|
||||
}
|
||||
|
||||
public void checkProcessItemMigration(final Item item, final String compType, final IProgressMonitor progressMonitor) throws UserCancelledException {
|
||||
public void checkProcessItemMigration(final Item
|
||||
item, final String compType, final IProgressMonitor progressMonitor) throws UserCancelledException {
|
||||
IProgressMonitor monitor = progressMonitor;
|
||||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
@@ -179,11 +185,72 @@ public class TaCoKitMigrationManager {
|
||||
final int storedVersion = configModel.getVersion();
|
||||
final int newVersion = configModel.getConfigurationVersion();
|
||||
monitor.subTask(Messages.getString("migration.check.progress.execute", label, storedVersion, newVersion)); //$NON-NLS-1$
|
||||
|
||||
Map<String, String> migratedProperties = configurationClient.migrate(configModel.getConfigurationId(),
|
||||
configModel.getVersion(), configModel.getProperties());
|
||||
configModel.migrate(migratedProperties);
|
||||
configModel.getVersion(), expandTableParameters(configModel));
|
||||
configModel.migrate(collapseTableParameters(configModel, migratedProperties));
|
||||
}
|
||||
|
||||
private Map<String, String> expandTableParameters(TaCoKitConfigurationModel configModel) {
|
||||
Map<String, String> properties = new HashMap<>();
|
||||
for (String key : configModel.getProperties().keySet()) {
|
||||
String value = configModel.getProperties().get(key);
|
||||
boolean isAdded = false;
|
||||
if (ValueConverter.isListParameterValue(value)) {
|
||||
List<Map<String, Object>> listValue = ValueConverter.toTable(value);
|
||||
if (listValue.size() > 0) {
|
||||
for (int i = 0; i < listValue.size(); i++) {
|
||||
Map<String, Object> map = listValue.get(i);
|
||||
for (String name : map.keySet()) {
|
||||
String nameWithIndex = ValueConverter.getTableParameterNameWithIndex(i, name);
|
||||
properties.put(nameWithIndex, map.get(name).toString());
|
||||
}
|
||||
}
|
||||
isAdded = true;
|
||||
}
|
||||
}
|
||||
if (!isAdded) {
|
||||
properties.put(key, value);
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
private Map<String, String> collapseTableParameters(TaCoKitConfigurationModel configModel,
|
||||
Map<String, String> migratedProperties) {
|
||||
Map<String, String> properties = new LinkedHashMap<String, String>();
|
||||
Set<String> processedName = new HashSet<String>();
|
||||
for (String key : migratedProperties.keySet()) {
|
||||
int paramIndex = ValueConverter.getTableParameterIndex(key);
|
||||
if (paramIndex >= 0) {
|
||||
String paramName = ValueConverter.getMainTableParameterName(key);
|
||||
if (processedName.contains(paramName)) {
|
||||
continue;
|
||||
} else {
|
||||
processedName.add(paramName);
|
||||
}
|
||||
Map<String, String> newParams = ValueConverter.getSameNameTableParameter(paramName, migratedProperties);
|
||||
List<Map<String, String>> newProperties = new ArrayList<Map<String, String>>();
|
||||
String firstKey = null;
|
||||
Map<String, String> data = null;
|
||||
for (String newParamName : newParams.keySet()) {
|
||||
String propertyName = ValueConverter.getTableParameterNameNoIndex(newParamName);
|
||||
if (firstKey == null) {
|
||||
firstKey = propertyName;
|
||||
}
|
||||
if (firstKey.equals(propertyName)) {
|
||||
data = new HashMap<String, String>();
|
||||
newProperties.add(data);
|
||||
}
|
||||
data.put(propertyName, newParams.get(newParamName));
|
||||
}
|
||||
properties.put(paramName, ValueConverter.toStringValue(newProperties));
|
||||
} else {
|
||||
properties.put(key, migratedProperties.get(key));
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
public void updatedRelatedItems(final ConnectionItem item, final String version, final IProgressMonitor progressMonitor) {
|
||||
IProgressMonitor monitor = progressMonitor;
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2024 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.sdk.component.studio.metadata.migration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.migration.AbstractItemMigrationTask;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.sdk.component.studio.Lookups;
|
||||
import org.talend.sdk.component.studio.metadata.model.TaCoKitConfigurationModel;
|
||||
|
||||
public class UpgradeTacokitMetadataMigrationTask extends AbstractItemMigrationTask {
|
||||
|
||||
private ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
|
||||
@Override
|
||||
public Date getOrder() {
|
||||
GregorianCalendar gc = new GregorianCalendar(2024, 01, 23, 12, 0, 0);
|
||||
return gc.getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Item item) {
|
||||
boolean modified = false;
|
||||
if (item instanceof ConnectionItem) {
|
||||
try {
|
||||
ConnectionItem conItem = (ConnectionItem) item;
|
||||
Connection connection = conItem.getConnection();
|
||||
if (!TaCoKitConfigurationModel.isTacokit(connection)) {
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
try {
|
||||
ITaCoKitService.getInstance().waitForStart();
|
||||
} catch (Throwable t) {
|
||||
// don't block if fail
|
||||
ExceptionHandler.process(t);
|
||||
}
|
||||
TaCoKitMigrationManager taCoKitMigrationManager = Lookups.taCoKitCache().getMigrationManager();
|
||||
TaCoKitConfigurationModel configModel = new TaCoKitConfigurationModel(conItem.getConnection());
|
||||
if (configModel.needsMigration()) {
|
||||
taCoKitMigrationManager.migrate(configModel, null);
|
||||
factory.save(item, true);
|
||||
modified = true;
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
return ExecutionResult.FAILURE;
|
||||
}
|
||||
}
|
||||
if (modified) {
|
||||
return ExecutionResult.SUCCESS_NO_ALERT;
|
||||
} else {
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,9 +16,12 @@
|
||||
package org.talend.sdk.component.studio.model.parameter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
@@ -79,6 +82,16 @@ public final class ValueConverter {
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The logic same with TableElementParameter.getStringValue
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static String toStringValue(List<Map<String, String>> list) {
|
||||
return list.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether String representation of the list is empty or not
|
||||
@@ -110,4 +123,79 @@ public final class ValueConverter {
|
||||
return CURLY_BRACKETS_PATTERN.matcher(str).replaceAll("");
|
||||
}
|
||||
|
||||
|
||||
public static String getMainTableParameterName(String name) {
|
||||
int begin = name.indexOf("[");
|
||||
int end = name.indexOf("]");
|
||||
if (begin > 0 && end > 0 && end > begin) {
|
||||
return name.substring(0, begin);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public static int getTableParameterIndex(String name) {
|
||||
int begin = name.indexOf("[");
|
||||
int end = name.indexOf("]");
|
||||
if (begin > 0 && end > 0 && end > begin) {
|
||||
return Integer.parseInt(name.substring(begin + 1, end));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static String getTableParameterNameNoIndex(String name) {
|
||||
int begin = name.indexOf("[");
|
||||
int end = name.indexOf("]");
|
||||
if (begin > 0 && end > 0 && end > begin) {
|
||||
return name.substring(0, begin + 1) + name.substring(end);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static String getTableParameterNameWithIndex(int index, String paramName) {
|
||||
if (paramName != null && paramName.indexOf("[") >= 0 && paramName.indexOf("]") > 0) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(paramName.substring(0, paramName.indexOf("[") + 1)).append(index)
|
||||
.append(paramName.substring(paramName.indexOf("]")));
|
||||
return sb.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get same main name parameters that key sorted by index
|
||||
* @param paramName
|
||||
* @param migratedProperties
|
||||
* @return same main name parameters that key sorted by index
|
||||
*/
|
||||
public static Map<String, String> getSameNameTableParameter(String paramName, Map<String, String> migratedProperties) {
|
||||
Map<String, String> properties = new HashMap<String, String>();
|
||||
for (String key : migratedProperties.keySet()) {
|
||||
String name = ValueConverter.getMainTableParameterName(key);
|
||||
if (paramName.equals(name)) {
|
||||
properties.put(key, migratedProperties.get(key));
|
||||
}
|
||||
}
|
||||
Map<String, String> sortedMap = new TreeMap<String, String>(new Comparator<String>() {
|
||||
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
int index1 = ValueConverter.getTableParameterIndex(o1);
|
||||
int index2 = ValueConverter.getTableParameterIndex(o2);
|
||||
if (index1 != index2) {
|
||||
return index1 - index2;
|
||||
}
|
||||
return o1.compareTo(o2);
|
||||
}
|
||||
});
|
||||
sortedMap.putAll(properties);
|
||||
return sortedMap;
|
||||
}
|
||||
|
||||
public static boolean isListParameterValue(String value) {
|
||||
if (value != null && value.trim().startsWith("[") && value.trim().endsWith("]")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,8 @@ public class TaCoKitContextHandler extends AbstractRepositoryContextHandler {
|
||||
List<Map<String, Object>> tableValueList = ValueConverter.toTable((String) valueModel.getValue());
|
||||
List<Map<String, Object>> originalTableValueList = new ArrayList<>();
|
||||
for (Map<String, Object> map : tableValueList) {
|
||||
Map<String, Object> originMap = new HashMap<String, Object>();
|
||||
originalTableValueList.add(originMap);
|
||||
for (Entry<String, Object> entryTable : map.entrySet()) {
|
||||
Object value = entryTable.getValue();
|
||||
if (value instanceof String) {
|
||||
@@ -146,8 +148,6 @@ public class TaCoKitContextHandler extends AbstractRepositoryContextHandler {
|
||||
if (tableOriginalValue != null) {
|
||||
String[] splitValues = tableOriginalValue.split(";");
|
||||
for (String s : splitValues) {
|
||||
Map<String, Object> originMap = new HashMap<String, Object>();
|
||||
originalTableValueList.add(originMap);
|
||||
originMap.put(entryTable.getKey(), TalendQuoteUtils.removeQuotes(s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
@@ -28,6 +27,7 @@ import org.talend.sdk.component.server.front.model.ConfigTypeNode;
|
||||
import org.talend.sdk.component.server.front.model.SimplePropertyDefinition;
|
||||
import org.talend.sdk.component.studio.Lookups;
|
||||
import org.talend.sdk.component.studio.model.parameter.PropertyDefinitionDecorator;
|
||||
import org.talend.sdk.component.studio.model.parameter.ValueConverter;
|
||||
import org.talend.sdk.component.studio.model.parameter.VersionParameter;
|
||||
import org.talend.sdk.component.studio.model.parameter.WidgetTypeMapper;
|
||||
import org.talend.sdk.component.studio.util.TaCoKitConst;
|
||||
@@ -136,7 +136,7 @@ public final class TaCoKitNode {
|
||||
} else if (firstColumnKey.equals(eValue.getElementRef())){
|
||||
index++;
|
||||
}
|
||||
String paramName = getTableParamName(index, eValue);
|
||||
String paramName = ValueConverter.getTableParameterNameWithIndex(index, eValue.getElementRef());
|
||||
if (paramName != null) {
|
||||
properties.put(paramName, eValue.getValue());
|
||||
}
|
||||
@@ -145,17 +145,6 @@ public final class TaCoKitNode {
|
||||
}
|
||||
}
|
||||
|
||||
private String getTableParamName(int index, ElementValueType elementValueType) {
|
||||
String paramValue = elementValueType.getElementRef();
|
||||
if (paramValue != null && paramValue.indexOf("[") >= 0 && paramValue.indexOf("]") > 0) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(paramValue.substring(0, paramValue.indexOf("[") + 1)).append(index)
|
||||
.append(paramValue.substring(paramValue.indexOf("]")));
|
||||
return sb.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isComponentProperty(Collection<SimplePropertyDefinition> props, final String name) {
|
||||
return props.stream().anyMatch(property -> property.getPath().equals(name));
|
||||
}
|
||||
@@ -188,27 +177,30 @@ public final class TaCoKitNode {
|
||||
}
|
||||
|
||||
private void fillTableParamData(List<ElementParameterType> tableFieldParamList, String paramKey, String paramValue) {
|
||||
String paramName = paramKey.substring(0, paramKey.indexOf("["));
|
||||
String elemRef = paramKey.substring(0, paramKey.indexOf("[") + 1) + paramKey.substring(paramKey.indexOf("]"));
|
||||
int paramIndex = Integer.parseInt(paramKey.substring(paramKey.indexOf("[") + 1, paramKey.indexOf("]")));
|
||||
String paramName = ValueConverter.getMainTableParameterName(paramKey);
|
||||
String elemRef = ValueConverter.getTableParameterNameNoIndex(paramKey);
|
||||
int paramIndex = ValueConverter.getTableParameterIndex(paramKey);
|
||||
ElementParameterType sameNameParam = null;
|
||||
for (ElementParameterType param : tableFieldParamList) {
|
||||
if (param.getName().equals(paramName)) {
|
||||
sameNameParam = param;
|
||||
List list = param.getElementValue();
|
||||
int index = 0;
|
||||
int rowIndex = -1;
|
||||
String firstKey = null;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ElementValueType eValue = (ElementValueType) list.get(i);
|
||||
if (elemRef.equals(eValue.getElementRef())) {
|
||||
if (paramIndex == index) {
|
||||
eValue.setValue(paramValue);
|
||||
return;
|
||||
} else {
|
||||
index ++;
|
||||
}
|
||||
if (firstKey == null) {
|
||||
firstKey = eValue.getElementRef();
|
||||
}
|
||||
if (firstKey.equals(eValue.getElementRef())) {
|
||||
rowIndex++;
|
||||
}
|
||||
if (elemRef.equals(eValue.getElementRef()) && paramIndex == rowIndex) {
|
||||
eValue.setValue(paramValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sameNameParam == null) {
|
||||
sameNameParam = TalendFileFactoryImpl.eINSTANCE.createElementParameterType();
|
||||
@@ -219,7 +211,28 @@ public final class TaCoKitNode {
|
||||
ElementValueType elementValueType = TalendFileFactoryImpl.eINSTANCE.createElementValueType();
|
||||
elementValueType.setElementRef(elemRef);
|
||||
elementValueType.setValue(paramValue);
|
||||
sameNameParam.getElementValue().add(elementValueType);
|
||||
boolean isAdded = false;
|
||||
if (sameNameParam.getElementValue().size() > 0) {
|
||||
int rowIndex = -1;
|
||||
String firstKey = null;
|
||||
for (int insertIndex = 0; insertIndex < sameNameParam.getElementValue().size(); insertIndex++) {
|
||||
ElementValueType e = (ElementValueType) sameNameParam.getElementValue().get(insertIndex);
|
||||
if (firstKey == null) {
|
||||
firstKey = e.getElementRef();
|
||||
}
|
||||
if (firstKey.equals(e.getElementRef())) {
|
||||
rowIndex++;
|
||||
}
|
||||
if (rowIndex > paramIndex) {
|
||||
sameNameParam.getElementValue().add(insertIndex, elementValueType);
|
||||
isAdded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isAdded) {
|
||||
sameNameParam.getElementValue().add(elementValueType);
|
||||
}
|
||||
}
|
||||
|
||||
private ElementParameterType createParameter(final String name, final String value) {
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/**
|
||||
* Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
|
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package org.talend.sdk.component.studio.model.parameter;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -59,4 +59,114 @@ public class ValueConverterTest {
|
||||
assertEquals(empty, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetMainTableParameterName() {
|
||||
String paramName = "configuration.headers[].key";
|
||||
assertEquals("configuration.headers", ValueConverter.getMainTableParameterName(paramName));
|
||||
|
||||
paramName = "configuration.headers[0].key";
|
||||
assertEquals("configuration.headers", ValueConverter.getMainTableParameterName(paramName));
|
||||
|
||||
paramName = "configuration.headers[0]";
|
||||
assertEquals("configuration.headers", ValueConverter.getMainTableParameterName(paramName));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTableParameterIndex() {
|
||||
String paramName = "configuration.headers[0].key";
|
||||
assertEquals(0, ValueConverter.getTableParameterIndex(paramName));
|
||||
|
||||
paramName = "configuration.headers[1].key";
|
||||
assertEquals(1, ValueConverter.getTableParameterIndex(paramName));
|
||||
|
||||
paramName = "configuration.headers";
|
||||
assertEquals(-1, ValueConverter.getTableParameterIndex(paramName));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTableParameterNameNoIndex() {
|
||||
String paramName = "configuration.headers[0].key";
|
||||
assertEquals("configuration.headers[].key", ValueConverter.getTableParameterNameNoIndex(paramName));
|
||||
|
||||
paramName = "configuration.headers[1].key";
|
||||
assertEquals("configuration.headers[].key", ValueConverter.getTableParameterNameNoIndex(paramName));
|
||||
|
||||
paramName = "configuration.headers[0].value";
|
||||
assertEquals("configuration.headers[].value", ValueConverter.getTableParameterNameNoIndex(paramName));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTableParameterNameWithIndex() {
|
||||
String paramName = "configuration.headers[].key";
|
||||
assertEquals("configuration.headers[0].key", ValueConverter.getTableParameterNameWithIndex(0, paramName));
|
||||
|
||||
assertEquals("configuration.headers[1].key", ValueConverter.getTableParameterNameWithIndex(1, paramName));
|
||||
|
||||
paramName = "configuration.headers";
|
||||
assertNull(ValueConverter.getTableParameterNameWithIndex(1, paramName));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSameNameTableParameter() {
|
||||
Map<String, String> testData = new HashMap<String, String>();
|
||||
testData.put("configuration.headers[0].value", "value-0");
|
||||
testData.put("configuration.headers[2].query", "MAIN");
|
||||
testData.put("configuration.headers[1].query", "MAIN");
|
||||
testData.put("configuration.headers[0].query", "MAIN");
|
||||
testData.put("configuration.headers[2].key", "h3");
|
||||
testData.put("configuration.headers[1].key", "h2");
|
||||
testData.put("configuration.headers[0].key", "h1");
|
||||
testData.put("configuration.headers[1].value", "value-1");
|
||||
testData.put("configuration.headers[2].value", "value-2");
|
||||
testData.put("configuration.datastore.authentication.oauth20.params[2]", "scope2");
|
||||
testData.put("configuration.datastore.authentication.oauth20.params[1]", "scope1");
|
||||
testData.put("configuration.datastore.authentication.oauth20.params[0]", "scope0");
|
||||
|
||||
Map<String, String> sameNameParms = ValueConverter.getSameNameTableParameter("configuration.headers", testData);
|
||||
assertEquals(9, sameNameParms.size());
|
||||
boolean hasError = false;
|
||||
int lastIndex = 0;
|
||||
for (String key : sameNameParms.keySet()) {
|
||||
int index = ValueConverter.getTableParameterIndex(key);
|
||||
if (index >= lastIndex) {
|
||||
lastIndex = index;
|
||||
} else {
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
assertFalse(hasError);
|
||||
|
||||
sameNameParms = ValueConverter.getSameNameTableParameter("configuration.datastore.authentication.oauth20.params",
|
||||
testData);
|
||||
assertEquals(3, sameNameParms.size());
|
||||
lastIndex = 0;
|
||||
for (String key : sameNameParms.keySet()) {
|
||||
int index = ValueConverter.getTableParameterIndex(key);
|
||||
if (index >= lastIndex) {
|
||||
lastIndex = index;
|
||||
} else {
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
assertFalse(hasError);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsListParameterValue() {
|
||||
String data = "[]";
|
||||
assertTrue(ValueConverter.isListParameterValue(data));
|
||||
|
||||
data = " [ ] ";
|
||||
assertTrue(ValueConverter.isListParameterValue(data));
|
||||
|
||||
data = "[{configuration.headers[].key=\"h1\", configuration.headers[].value=\"11\"}, {configuration.headers[].key=\"h2\", configuration.headers[].value=\"22\"}, {configuration.headers[].key=\"h3\", configuration.headers[].value=\"33\"}]";
|
||||
assertTrue(ValueConverter.isListParameterValue(data));
|
||||
|
||||
data = "[{configuration.headers[].key=\"h1\", configuration.headers[].value=\"11\"}]";
|
||||
assertTrue(ValueConverter.isListParameterValue(data));
|
||||
|
||||
data = "[{configuration.headers[].key=\"h1\", configuration.headers[].value=\"11\"}";
|
||||
assertFalse(ValueConverter.isListParameterValue(data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user