Compare commits

...

10 Commits

Author SHA1 Message Date
build-talend
4295c0a6bc DEVOPS-1729 Nexus migration: Update URLs 2017-03-02 01:23:49 +01:00
GGu
a4c06ffb38 TUP-4233: fixed one token problem for "key not found" 2016-04-13 18:41:03 +08:00
Pingwen Lin
602a44ab3b TMDM-9472 : tMDMRestInput not work in CE version 2016-04-13 18:32:25 +08:00
ycbai
7b2aaefacd TUP-4355: use tag value instead of RAW tag. 2016-04-13 17:25:02 +08:00
ycbai
aae6e5ba91 [TCOMP-57] Connection info fields should be updated after
"referencedComponentId" property changes
1. wrap double qoute when flag is RAW
2. remove componentProperties from ComponentReferenceProperties for
runtime
2016-04-13 17:24:31 +08:00
ycbai
e30c238ae1 [TCOMP-57] remove double quote for
"referencedComponentId" property changes and change to use RAW flag
2016-04-13 17:24:00 +08:00
ycbai
ffc8ab21da [TCOMP-57] Connection info fields should be updated after
"referencedComponentId" property changes
2016-04-13 17:23:30 +08:00
mswei
616f8dff6a TDI-35432: AWS Cluster Resizing (EMR/Redshift)
https://jira.talendforge.org/browse/TDI-35432
2016-04-13 17:10:53 +08:00
Irene Wang
e28f5abe88 Set versions for 6.2.0 RC1 2016-04-12 16:15:20 +02:00
nrousseau
e22e438fb4 TUP-4233: enhance token 2016-04-12 21:17:49 +08:00
165 changed files with 197 additions and 1214 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.componentdesigner.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.componentdesigner.rcp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.abstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.diagram.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.codegen.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.exchange.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.dbmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.documentation.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.hl7.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.mapper.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.job.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.runprocess.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.scd.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.webservice.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.xmlmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.expressionbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.ftp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.json.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.view.di.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sbi.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.spagic.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sqlbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.componentdesigner.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sbi.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.spagic.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.components.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.libraries.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.componentdesigner.rcp</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.componentdesigner</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.abstractmap</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.alfrescooutput</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.diagram</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.codegen</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.exchange</artifactId>

View File

@@ -15,7 +15,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cxf.version>3.1.1</cxf.version>
<talend.nexus.url>http://newbuild.talend.com:8081</talend.nexus.url>
<talend.nexus.url>https://artifacts-zl.talend.com</talend.nexus.url>
</properties>
<distributionManagement>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.libs</artifactId>

View File

@@ -81,7 +81,7 @@
</PARAMETER>
<PARAMETER NAME="APPLICATION" FIELD="CLOSED_LIST" NUM_ROW="32"
SHOW_IF="(ACTION=='START') AND ((CLUSTER_VERSION=='EMR4_2_0') OR (CLUSTER_VERSION=='EMR4_1_0') OR (CLUSTER_VERSION=='EMR4_0_0'))" GROUP="CONFIGURATION">
SHOW_IF="(ACTION=='START') AND ((CLUSTER_VERSION=='EMR4_5_0') OR (CLUSTER_VERSION=='EMR4_2_0') OR (CLUSTER_VERSION=='EMR4_1_0') OR (CLUSTER_VERSION=='EMR4_0_0'))" GROUP="CONFIGURATION">
<ITEMS DEFAULT="CORE_HADOOP">
<ITEM NAME="ALL_APPLICATIONS" VALUE="ALL_APPLICATIONS" />
<ITEM NAME="CORE_HADOOP" VALUE="CORE_HADOOP" />

View File

@@ -1,551 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
"
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
LogUtil logUtil = new LogUtil(node);
String cid = node.getUniqueName();
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas != null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columnList = metadata.getListColumns();
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
// if output columns are defined
if (outgoingConns != null && outgoingConns.size() > 0) {
IConnection outgoingConn = outgoingConns.get(0);
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { // start 1
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
String tmdmService = "TMDMService_" + connection;
String mdmTransaction = "mdmTransaction_" + connection;
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
String username = ElementParameterParser.getValue(node, "__USERNAME__");
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
String containerType = ElementParameterParser.getValue(node, "__CONTAINER_TYPE__");
boolean retrieveRawData = ("true").equals(ElementParameterParser.getValue(node,"__RETRIEVE_RAW_DATA__"));
String xmlField = ElementParameterParser.getValue(node, "__XMLFIELD__");
String acceptType = retrieveRawData ? ElementParameterParser.getValue(node, "__ACCEPT_TYPE__") : "application/json";
boolean returnXml = ("application/xml").equals(acceptType);
String queryText = ElementParameterParser.getValue(node, "__QUERY_TEXT__").replaceAll(" ","").replaceAll("\n","").replaceAll("\r","").replaceAll("\"", "'");
String fetchSize = ElementParameterParser.getValue(node, "__FETCHSIZE__");
%>
class QueryDelegater_<%=cid%> {
private org.json.simple.parser.JSONParser parser = new org.json.simple.parser.JSONParser();
private org.json.simple.JSONObject queryObject;
private String dataCluster;
private String containerType;
private boolean retrieveRawData;
private String acceptType;
private Long orgStart;
private Long orgLimit;
private int fetchSize;
private String transactionId;
private org.apache.cxf.jaxrs.client.WebClient webClient;
public QueryDelegater_<%=cid%>(java.util.Map<String, String> connConfig, String dataCluster, String containerType, String queryText,
boolean retrieveRawData, String acceptType, int fetchSize) {
this.initQueryObject(queryText);
this.dataCluster = dataCluster;
this.containerType = containerType;
this.retrieveRawData = retrieveRawData;
this.acceptType = acceptType;
this.fetchSize = fetchSize;
this.transactionId = connConfig.get("transactionId");
webClient = org.apache.cxf.jaxrs.client.WebClient.create(connConfig.get("url"),
java.util.Arrays.asList(new com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider()),
connConfig.get("username"), connConfig.get("password"), null);
}
private void initQueryObject(String queryText) {
try {
queryObject = (org.json.simple.JSONObject) parser.parse(queryText.replaceAll("'", "\""));
org.json.simple.JSONObject select = (org.json.simple.JSONObject) queryObject.get("select");
orgStart = (Long) select.get("start");
orgLimit = (Long) select.get("limit");
} catch (org.json.simple.parser.ParseException e) {
<%if(dieOnError){%>
throw new RuntimeException("Query text is not a valid JSON string.", e);
<%}else{%>
<% logUtil.error("\"Query text is not a valid JSON string.\"");%>
e.printStackTrace();
<%}%>
}
}
@SuppressWarnings("unchecked")
public org.json.simple.JSONObject getCountQuery() {
org.json.simple.JSONObject countQuery = null;
if (queryObject != null) {
org.json.simple.JSONObject orgSelect = (org.json.simple.JSONObject) queryObject.get("select");
org.json.simple.JSONArray orgFrom = (org.json.simple.JSONArray) orgSelect.get("from");
org.json.simple.JSONObject orgWhere = (org.json.simple.JSONObject) orgSelect.get("where");
org.json.simple.JSONObject select = new org.json.simple.JSONObject();
if (orgFrom != null)
select.put("from", orgFrom);
if (orgWhere != null)
select.put("where", orgSelect.get("where"));
try {
select.put("fields", parser.parse("[{\"count\":{}}]"));
} catch (org.json.simple.parser.ParseException e) {
<%if(dieOnError){%>
throw new RuntimeException("Failed to get count query JSON.", e);
<%}else{%>
<% logUtil.error("\"Failed to get count query JSON.\"");%>
e.printStackTrace();
<%}%>
}
countQuery = new org.json.simple.JSONObject();
countQuery.put("select", select);
}
return countQuery;
}
public String executeQuery(org.json.simple.JSONObject queryObj, boolean isCount) {
webClient.path("data/" + dataCluster + "/query").query("container", containerType).type("application/json");
if(transactionId != null) {
webClient.header("transaction-id", transactionId);
}
if (isCount) {
webClient.accept("application/xml");
} else {
if (retrieveRawData) {
webClient.accept(acceptType);
} else {
webClient.accept("application/json");
}
}
<% logUtil.debug("\"Execute query:\" + queryObj.toJSONString()");%>
try {
javax.ws.rs.core.Response response = webClient.put(queryObj.toJSONString());
String queryResult = response.readEntity(String.class);
int statusCode = response.getStatus();
webClient.reset();
if (statusCode == 200) {
return queryResult;
} else {
<%if(dieOnError){%>
if (statusCode == 401) {
throw new RuntimeException("Unauthorized! Invalid username and password.");
} else if (statusCode == 404) {
throw new RuntimeException("Not found! URL is not correct.");
} else if (statusCode == 500 && org.apache.commons.lang.StringUtils.isBlank(dataCluster)) {
throw new RuntimeException("Data container is empty or null.");
} else {
throw new RuntimeException(queryResult);
}
<%}else{%>
if (statusCode == 401) {
<% logUtil.error("\"Unauthorized! Invalid username and password.\"");%>
} else if (statusCode == 404) {
<% logUtil.error("\"Not found! URL is not correct.\"");%>
} else if (statusCode == 500 && org.apache.commons.lang.StringUtils.isBlank(dataCluster)) {
<% logUtil.error("\"Data container is empty or null.\"");%>
} else {
<% logUtil.error("queryResult");%>
}
return null;
<%}%>
}
} catch(Exception e) {
<%if(dieOnError){%>
throw new RuntimeException("Unexpected exception.", e);
<%}else{%>
<% logUtil.error("\"Unexpected exception.\" + e.getMessage()");%>
e.printStackTrace();
return null;
<%}%>
}
}
public int getTotalCount() {
int totalCount = -1;
org.json.simple.JSONObject countQuery = getCountQuery();
if (countQuery != null) {
String dbCountResult = executeQuery(countQuery, true);
if (dbCountResult != null) {
int dbTotalCount = Integer.parseInt(dbCountResult.replaceAll("<results><result><count>", "").replaceAll("</count></result></results>", ""));
if (orgLimit == null || orgLimit > dbTotalCount) {
totalCount = dbTotalCount;
} else {
totalCount = orgLimit.intValue();
}
}
}
return totalCount;
}
@SuppressWarnings("unchecked")
public String getPagedResult(int totalCount, int loopInd) {
org.json.simple.JSONObject select = (org.json.simple.JSONObject)queryObject.get("select");
if(fetchSize > 0) {
int start = fetchSize * loopInd + (orgStart == null ? 0 : orgStart.intValue());
int limit = totalCount > fetchSize * (loopInd + 1) ? fetchSize : totalCount - fetchSize * loopInd;
select.put("start", start);
select.put("limit", limit);
}
return executeQuery(queryObject, false);
}
public int getTotalLoop(int totalCount) {
if(fetchSize <= 0) {
return 1;
}
return (int) Math.ceil((totalCount + fetchSize - 1) / fetchSize);
}
}
<%if(retrieveRawData && returnXml){%>
class XMLStreamUnwrapper_<%=cid%> implements java.util.Enumeration<String> {
private static final int RECORD_LEVEL = 1;
private javax.xml.stream.XMLEventReader reader;
private ResettableStringWriter_<%=cid%> stringWriter = new ResettableStringWriter_<%=cid%>();
private javax.xml.stream.XMLOutputFactory xmlOutputFactory;
private int level = 0;
public XMLStreamUnwrapper_<%=cid%>(java.io.InputStream stream) {
try {
reader = javax.xml.stream.XMLInputFactory.newFactory().createXMLEventReader(stream);
// Skip to first record
while (reader.hasNext() && level < RECORD_LEVEL) {
final javax.xml.stream.events.XMLEvent event = reader.nextEvent();
if (event.isStartElement()) {
level++;
}
}
xmlOutputFactory = javax.xml.stream.XMLOutputFactory.newFactory();
} catch (javax.xml.stream.XMLStreamException e) {
<%if(dieOnError){%>
throw new RuntimeException("Unexpected parsing configuration error.", e);
<%}else{%>
<% logUtil.error("\"Unexpected parsing configuration error.\"+ e.getMessage()");%>
e.printStackTrace();
<%}%>
}
}
@Override
public boolean hasMoreElements() {
moveToNext();
return stringWriter.getBuffer().length() > 0;
}
@Override
public String nextElement() {
return stringWriter.reset();
}
/**
* Moves to next record in stream and stores it in {@link #stringWriter}.
*/
private void moveToNext() {
try {
javax.xml.stream.XMLStreamWriter writer = xmlOutputFactory.createXMLStreamWriter(stringWriter);
boolean hasMadeChanges;
do {
if (!reader.hasNext()) {
break;
}
hasMadeChanges = false; // Keep a state to skip line feeds
final javax.xml.stream.events.XMLEvent event = reader.nextEvent();
if (event.isEndElement()) {
level--;
} else if (event.isStartElement()) {
level++;
} else if (event.isEndDocument()) {
level--;
}
if (level >= RECORD_LEVEL) {
if (event.isEndElement()) {
writer.writeEndElement();
hasMadeChanges = true;
} else if (event.isStartElement()) {
final javax.xml.stream.events.StartElement startElement = event.asStartElement();
final javax.xml.namespace.QName name = startElement.getName();
writer.writeStartElement(name.getNamespaceURI(), name.getLocalPart());
// Declare namespaces (if any)
final java.util.Iterator namespaces = startElement.getNamespaces();
while (namespaces.hasNext()) {
javax.xml.stream.events.Namespace namespace = (javax.xml.stream.events.Namespace) namespaces.next();
writer.writeNamespace(namespace.getPrefix(), namespace.getNamespaceURI());
}
// Write attributes
final java.util.Iterator attributes = startElement.getAttributes();
while (attributes.hasNext()) {
javax.xml.stream.events.Attribute attribute = (javax.xml.stream.events.Attribute) attributes.next();
javax.xml.namespace.QName attributeName = attribute.getName();
String value = attribute.getValue();
if (attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) {
writer.writeAttribute(attributeName.getLocalPart(), value);
} else {
writer.writeAttribute(attributeName.getNamespaceURI(), attributeName.getLocalPart(), value);
}
}
hasMadeChanges = true;
} else if (event.isCharacters()) {
final String text = event.asCharacters().getData().trim();
if (!text.isEmpty()) {
writer.writeCharacters(text);
hasMadeChanges = true;
}
}
}
} while (level > RECORD_LEVEL || !hasMadeChanges);
writer.flush();
} catch (javax.xml.stream.XMLStreamException e) {
<%if(dieOnError){%>
throw new RuntimeException("Unexpected parsing exception.", e);
<%}else{%>
<% logUtil.error("\"Unexpected parsing exception.\" + e.getMessage()");%>
e.printStackTrace();
<%}%>
}
}
class ResettableStringWriter_<%=cid%> extends java.io.StringWriter {
private java.io.StringWriter delegate = new java.io.StringWriter();
private int currentLength = 0;
private int maxLength = -1;
public ResettableStringWriter_<%=cid%>() {
}
public String reset() {
if (currentLength > maxLength) {
maxLength = currentLength;
}
currentLength = 0;
String result = delegate.toString();
delegate = new java.io.StringWriter(maxLength);
return result;
}
@Override
public void write(int c) {
currentLength++;
delegate.write(c);
}
@Override
public void write(char[] cbuf, int off, int len) {
currentLength += len;
delegate.write(cbuf, off, len);
}
@Override
public void write(String str) {
currentLength += str.length();
delegate.write(str);
}
@Override
public void write(String str, int off, int len) {
currentLength += len;
delegate.write(str, off, len);
}
@Override
public void write(char[] cbuf) throws java.io.IOException {
currentLength += cbuf.length;
delegate.write(cbuf);
}
@Override
public java.io.StringWriter append(CharSequence csq) {
currentLength += csq.length();
return delegate.append(csq);
}
@Override
public java.io.StringWriter append(CharSequence csq, int start, int end) {
currentLength += csq.length();
return delegate.append(csq, start, end);
}
@Override
public java.io.StringWriter append(char c) {
currentLength++;
return delegate.append(c);
}
@Override
public String toString() {
return delegate.toString();
}
@Override
public StringBuffer getBuffer() {
return delegate.getBuffer();
}
@Override
public void flush() {
delegate.flush();
}
@Override
public void close() throws java.io.IOException {
delegate.close();
}
}
}
<%}%>
int nb_line_<%=cid %> = 0;
<% logUtil.debug("\"Initializing data service base from URL: \"", mdmUrl,"\".\"");%>
java.util.Map<String, String> connConfig_<%=cid%> = new java.util.HashMap<String, String>();
<%if(useExistingConn){%>
javax.xml.ws.BindingProvider tmdmService_<%=cid %> = (javax.xml.ws.BindingProvider) globalMap.get("<%=tmdmService%>");
if(tmdmService_<%=cid %> != null) {
java.util.Map<String, Object> context_<%=cid %> = tmdmService_<%=cid %>.getRequestContext();
connConfig_<%=cid%>.put("url", ((String)context_<%=cid %>.get(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY)).replace("/soap", "/rest"));
connConfig_<%=cid%>.put("username", (String)context_<%=cid %>.get(javax.xml.ws.BindingProvider.USERNAME_PROPERTY));
connConfig_<%=cid%>.put("password", (String)context_<%=cid %>.get(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY));
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid%> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get("<%=mdmTransaction%>");
if(mdmTransaction_<%=cid%> != null) {
connConfig_<%=cid%>.put("transactionId", mdmTransaction_<%=cid%>.getId());
}
}
<%}else{%>
<% String passwordFieldName = "__PASSWORD__"; %>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
connConfig_<%=cid%>.put("url", <%=mdmUrl%>);
connConfig_<%=cid%>.put("username", <%=username %>);
connConfig_<%=cid%>.put("password", decryptedPassword_<%=cid%>);
<%}%>
String dataCluster_<%=cid%> = <%=dataCluster%>;
String containerType_<%=cid%> = "<%=containerType%>";
String queryText_<%=cid%> = "<%=queryText%>";
boolean retrieveRawData_<%=cid%> = <%=retrieveRawData%>;
String acceptType_<%=cid%> = "<%=acceptType%>";
int fetchSize_<%=cid%> = <%=fetchSize%>;
QueryDelegater_<%=cid%> queryDelegater_<%=cid%> = new QueryDelegater_<%=cid%>(connConfig_<%=cid%>, dataCluster_<%=cid%>, containerType_<%=cid%>, queryText_<%=cid%>, retrieveRawData_<%=cid%>, acceptType_<%=cid%>, fetchSize_<%=cid%>);
int totalCount_<%=cid%> = queryDelegater_<%=cid%>.getTotalCount();
int totalLoop_<%=cid%> = queryDelegater_<%=cid%>.getTotalLoop(totalCount_<%=cid%>);
<% logUtil.info("\"Get item count: \" + totalCount_" + cid);%>
for(int loopInd_<%=cid%> = 0; loopInd_<%=cid%> < totalLoop_<%=cid%>; loopInd_<%=cid%> ++) {
String pagedResult_<%=cid%> = queryDelegater_<%=cid%>.getPagedResult(totalCount_<%=cid%>, loopInd_<%=cid%>);
<% logUtil.debug("\"Query page\" + loopInd_" + cid + " + \" result from server:\" + pagedResult_" + cid);%>
if(pagedResult_<%=cid%> != null) {
<%if(retrieveRawData && returnXml){%>
java.util.List<String> items_<%=cid%> = new java.util.ArrayList<String>();
try {
java.io.InputStream content_<%=cid%> = new java.io.ByteArrayInputStream(pagedResult_<%=cid%>.getBytes());
XMLStreamUnwrapper_<%=cid%> tokenizer_<%=cid%> = new XMLStreamUnwrapper_<%=cid%>(content_<%=cid%>);
while (tokenizer_<%=cid%>.hasMoreElements()) {
items_<%=cid%>.add(tokenizer_<%=cid%>.nextElement());
}
} catch (Exception e) {
<%if(dieOnError){%>
throw new RuntimeException("Parsing query XML result failed.", e);
<%}else{%>
<% logUtil.error("\"Parsing query XML result failed.\" + e.getMessage()");%>
e.printStackTrace();
<%}%>
}
<%}else{%>
java.util.List<org.json.simple.JSONObject> items_<%=cid%> = new java.util.ArrayList<org.json.simple.JSONObject>();
org.json.simple.parser.JSONParser parser_<%=cid%> = new org.json.simple.parser.JSONParser();
try {
org.json.simple.JSONArray array_<%=cid%> = (org.json.simple.JSONArray) parser_<%=cid%>.parse(pagedResult_<%=cid%>);
<%if(!retrieveRawData){%>
for(Object obj_<%=cid%> : array_<%=cid%>) {
org.json.simple.JSONObject jsonObj_<%=cid%> = (org.json.simple.JSONObject) obj_<%=cid%>;
items_<%=cid%>.add((org.json.simple.JSONObject)jsonObj_<%=cid%>.get(jsonObj_<%=cid%>.keySet().iterator().next()));
}
<%}else{%>
items_<%=cid%> = array_<%=cid%>;
<%}%>
} catch (org.json.simple.parser.ParseException e) {
<%if(dieOnError){%>
throw new RuntimeException("Parsing query JSON result failed.", e);
<%}else{%>
<% logUtil.error("\"Parsing query JSON result failed.\" + e.getMessage()");%>
e.printStackTrace();
<%}%>
}
<%}%>
for(int i_<%=cid %>=0; i_<%=cid %> < items_<%=cid %>.size(); i_<%=cid %>++) {
nb_line_<%=cid %> ++;
<%if(retrieveRawData){%>
<%=outgoingConn.getName() %>.<%=xmlField %> = items_<%=cid %>.get(i_<%=cid %>).toString();
<%}else {
for(IMetadataColumn column : columnList){
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
String patternValue = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
String defaultValue = column.getDefault();
String defaultValueToSet = (column.isNullable() || (defaultValue != null && defaultValue.length() > 0)) ? defaultValue : "\"" + JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate) + "\"";
String labelValue = column.getLabel();
String key1 = labelValue.toLowerCase(); // id
String key2 = "metadata:" + key1; // metadata:timestamp
String key3 = key2.replaceAll("_", ""); // metadata:taskid
%>
String obj_<%=cid%>_<%=labelValue%> = null;
if (items_<%=cid %>.get(i_<%=cid %>).containsKey("<%=key1%>")) {
obj_<%=cid%>_<%=labelValue%> = (String)items_<%=cid %>.get(i_<%=cid %>).get("<%=key1%>");
} else if(items_<%=cid %>.get(i_<%=cid %>).containsKey("<%=key2%>")) {
obj_<%=cid%>_<%=labelValue%> = (String)items_<%=cid %>.get(i_<%=cid %>).get("<%=key2%>");
} else {
obj_<%=cid%>_<%=labelValue%> = (String)items_<%=cid %>.get(i_<%=cid %>).get("<%=key3%>");
}
if(org.apache.commons.lang.StringUtils.isEmpty(obj_<%=cid%>_<%=labelValue%>)) {
obj_<%=cid%>_<%=labelValue%> = <%=defaultValueToSet%>;
}
<% if(javaType == JavaTypesManager.STRING || javaType == JavaTypesManager.OBJECT) {//_1 %>
<%=outgoingConn.getName() %>.<%=labelValue%> = obj_<%=cid%>_<%=labelValue%>;
<%} else {//_1
if(javaType == JavaTypesManager.DATE) {//_2 %>
<%=outgoingConn.getName() %>.<%=labelValue%> = org.apache.commons.lang.StringUtils.isEmpty(obj_<%=cid%>_<%=labelValue%>) ? null : ParserUtils.parseTo_Date(obj_<%=cid%>_<%=labelValue%>, <%=patternValue%>);
<%} else {//_2 %>
<%=outgoingConn.getName() %>.<%=labelValue%> = org.apache.commons.lang.StringUtils.isEmpty(obj_<%=cid%>_<%=labelValue%>) ? null : ParserUtils.parseTo_<%=typeToGenerate %>(obj_<%=cid%>_<%=labelValue%>);
<%}//_2
}//_1
}
}
}
}
}
}
%>

View File

@@ -1,47 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.IMetadataTable
java.util.List
"
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
LogUtil logUtil = new LogUtil(node);
String cid = node.getUniqueName();
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas != null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columnList = metadata.getListColumns();
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
// if output columns are defined
if (outgoingConns != null && outgoingConns.size() > 0){
IConnection outgoingConn = outgoingConns.get(0);
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { // start 1
%>
}
}
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
<%
}
}
}
}
%>

View File

@@ -1,277 +0,0 @@
<COMPONENT>
<HEADER
PLATEFORM="ALL"
SERIAL=""
VERSION="0.101"
STATUS="ALPHA"
COMPATIBILITY="ALL"
AUTHOR="Talend"
RELEASE_DATE="20160320A"
STARTABLE="true"
LOG4J_ENABLED="true"
HAS_CONDITIONAL_OUTPUTS="true"
IS_MULTIPLYING_OUTPUTS="true">
<SIGNATURE></SIGNATURE>
</HEADER>
<FAMILIES>
<FAMILY>Talend MDM</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL />
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="0" MAX_OUTPUT="1"/>
<CONNECTOR NAME="REJECT" NOT_SHOW_IF="(DIE_ON_ERROR == 'true')" CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1" LINE_STYLE="2" COLOR="FF0000" BASE_SCHEMA="FLOW" />
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
<CONNECTOR CTYPE="COMPONENT_ERROR" />
<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>
<PARAMETERS>
<PARAMETER
NAME="PROPERTY"
FIELD="PROPERTY_TYPE"
SHOW="true"
NUM_ROW="1"
REPOSITORY_VALUE="MDM">
</PARAMETER>
<PARAMETER
NAME="SCHEMA"
FIELD="SCHEMA_TYPE"
REQUIRED="true"
NUM_ROW="1">
</PARAMETER>
<PARAMETER
NAME="SCHEMA_REJECT"
FIELD="SCHEMA_TYPE"
REQUIRED="true"
NUM_ROW="2"
CONTEXT="REJECT"
SHOW="true">
<TABLE READONLY="true">
<COLUMN NAME="errorXMLField" TYPE="id_String" LENGTH="255" READONLY="false" CUSTOM="true" />
<COLUMN NAME="errorCode" TYPE="id_String" LENGTH="255" READONLY="false" CUSTOM="true" />
<COLUMN NAME="errorMessage" TYPE="id_String" LENGTH="255" READONLY="false" CUSTOM="true" />
</TABLE>
</PARAMETER>
<PARAMETER
NAME="USE_EXISTING_CONNECTION"
FIELD="CHECK"
NUM_ROW="10"
GROUP="CONNECTION_GRP">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="CONNECTION"
FIELD="COMPONENT_LIST"
REQUIRED="true"
FILTER="tMDMConnection"
NUM_ROW="15"
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
GROUP="CONNECTION_GRP">
</PARAMETER>
<PARAMETER
NAME="MDMURL"
FIELD="TEXT"
NUM_ROW="20"
REQUIRED="true"
REPOSITORY_VALUE="MDMURL"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
GROUP="CONNECTION_GRP">
<DEFAULT>"http://localhost:8180/talendmdm/services/rest"</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="USERNAME"
FIELD="TEXT"
REQUIRED="true"
NUM_ROW="30"
REPOSITORY_VALUE="USERNAME"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
GROUP="CONNECTION_GRP">
<DEFAULT>"userName"</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="PASSWORD"
FIELD="PASSWORD"
REQUIRED="true"
NUM_ROW="30"
REPOSITORY_VALUE="PASSWORD"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
GROUP="CONNECTION_GRP">
<DEFAULT>"password"</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="DATACLUSTER"
FIELD="TEXT"
REQUIRED="true"
NUM_ROW="45"
REPOSITORY_VALUE="DATACLUSTER">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="CONTAINER_TYPE"
FIELD="CLOSED_LIST"
NUM_ROW="45"
REQUIRED="true">
<ITEMS DEFAULT="MASTER">
<ITEM NAME="MASTER" VALUE="MASTER" />
<ITEM NAME="STAGING" VALUE="STAGING" />
</ITEMS>
</PARAMETER>
<PARAMETER
NAME="RETRIEVE_RAW_DATA"
FIELD="CHECK"
NUM_ROW="55">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="XMLFIELD"
FIELD="COLUMN_LIST"
REQUIRED="true"
NUM_ROW="55"
SHOW_IF="RETRIEVE_RAW_DATA == 'true'">
</PARAMETER>
<PARAMETER
NAME="ACCEPT_TYPE"
FIELD="CLOSED_LIST"
NUM_ROW="55"
REQUIRED="true"
SHOW_IF="RETRIEVE_RAW_DATA == 'true'">
<ITEMS DEFAULT="JSON">
<ITEM NAME="JSON" VALUE="application/json" />
<ITEM NAME="XML" VALUE="application/xml" />
</ITEMS>
</PARAMETER>
<PARAMETER
NAME="QUERY_TEXT"
FIELD="MEMO"
NUM_ROW="60"
NB_LINES="10">
<DEFAULT>{"select":{"from":["Type1"],"fields":[{"field":"Type1/Field1"}]}}</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="DIE_ON_ERROR"
FIELD="CHECK"
NUM_ROW="80">
<DEFAULT>false</DEFAULT>
</PARAMETER>
</PARAMETERS>
<ADVANCED_PARAMETERS>
<PARAMETER
NAME="FETCHSIZE"
FIELD="TEXT"
NUM_ROW="10">
<DEFAULT>50</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="commons_lang"
MODULE="commons-lang-2.6.jar"
MVN="mvn:org.talend.libraries/commons-lang-2.6/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar"
REQUIRED="true"/>
<IMPORT NAME="json_simple"
MODULE="json_simple-1.1.jar"
MVN="mvn:org.talend.libraries/json_simple-1.1/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json_simple-1.1.jar"
REQUIRED="true" />
<IMPORT NAME="cxf-core-3.1.4"
MODULE="cxf-core-3.1.4.jar"
MVN="mvn:org.talend.libraries/cxf-core-3.1.4/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/cxf-core-3.1.4.jar"
REQUIRED="true"/>
<IMPORT NAME="cxf-rt-frontend-jaxrs-3.1.4"
MODULE="cxf-rt-frontend-jaxrs-3.1.4.jar"
MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxrs-3.1.4/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxrs-3.1.4.jar"
REQUIRED="true"/>
<IMPORT NAME="cxf-rt-rs-client-3.1.4"
MODULE="cxf-rt-rs-client-3.1.4.jar"
MVN="mvn:org.talend.libraries/cxf-rt-rs-client-3.1.4/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/cxf-rt-rs-client-3.1.4.jar"
REQUIRED="true"/>
<IMPORT NAME="cxf-rt-transports-http-3.1.4"
MODULE="cxf-rt-transports-http-3.1.4.jar"
MVN="mvn:org.talend.libraries/cxf-rt-transports-http-3.1.4/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-3.1.4.jar"
REQUIRED="true"/>
<IMPORT NAME="stax2-api-3.1.4"
MODULE="stax2-api-3.1.4.jar"
MVN="mvn:org.talend.libraries/stax2-api-3.1.1/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/stax2-api-3.1.4.jar"
REQUIRED="true"/>
<IMPORT NAME="woodstox-core-asl-4.4.1"
MODULE="woodstox-core-asl-4.4.1.jar"
MVN="mvn:org.talend.libraries/woodstox-core-asl-4.4.1/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/woodstox-core-asl-4.4.1.jar"
REQUIRED="true"/>
<IMPORT NAME="xmlschema-core-2.2.1"
MODULE="xmlschema-core-2.2.1.jar"
MVN="mvn:org.talend.libraries/xmlschema-core-2.2.1/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/xmlschema-core-2.2.1.jar"
REQUIRED="true"/>
<IMPORT NAME="javax.ws.rs-api-2.0.1"
MODULE="javax.ws.rs-api-2.0.1.jar"
MVN="mvn:org.talend.libraries/javax.ws.rs-api-2.0.1/6.2.0"
REQUIRED="true"/>
<IMPORT NAME="javax.annotation-api-1.2"
MODULE="javax.annotation-api-1.2.jar"
MVN="mvn:org.talend.libraries/javax.annotation-api-1.2/6.2.0"
REQUIRED="true"/>
<IMPORT NAME="jackson-annotations-2.5.3"
MODULE="jackson-annotations-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-annotations-2.5.3/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/jackson-annotations-2.5.3.jar"
REQUIRED="true"/>
<IMPORT NAME="jackson-core-2.5.3"
MODULE="jackson-core-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-core-2.5.3/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/jackson-core-2.5.3.jar"
REQUIRED="true"/>
<IMPORT NAME="jackson-databind-2.5.3"
MODULE="jackson-databind-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-databind-2.5.3/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/jackson-databind-2.5.3.jar"
REQUIRED="true"/>
<IMPORT NAME="jackson-jaxrs-json-provider-2.5.3"
MODULE="jackson-jaxrs-json-provider-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-jaxrs-json-provider-2.5.3/6.2.0"
REQUIRED="true"/>
<IMPORT NAME="jackson-jaxrs-base-2.5.3"
MODULE="jackson-jaxrs-base-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-jaxrs-base-2.5.3/6.2.0"
REQUIRED="true"/>
<IMPORT NAME="jackson-module-jaxb-annotations-2.5.3"
MODULE="jackson-module-jaxb-annotations-2.5.3.jar"
MVN="mvn:org.talend.libraries/jackson-module-jaxb-annotations-2.5.3/6.2.0"
REQUIRED="true"/>
</IMPORTS>
</CODEGENERATION>
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>

View File

@@ -1,29 +0,0 @@
USE_EXISTING_CONNECTION.NAME=Use an existing connection
CONNECTION.NAME=Component List
MDMURL.NAME=URL
USERNAME.NAME=Username
PASSWORD.NAME=Password
DATACLUSTER.NAME=Data Container
CONTAINER_TYPE.NAME=Type
CONTAINER_TYPE.ITEM.MASTER=Master
CONTAINER_TYPE.ITEM.STAGING=Staging
RETRIEVE_RAW_DATA.NAME=Retrieve raw data
XMLFIELD.NAME=XML Field
ACCEPT_TYPE.NAME=Accept Type
ACCEPT_TYPE.ITEM.JSON=JSON
ACCEPT_TYPE.ITEM.XML=XML
CONNECTION_GRP.NAME=Connection
GUESS_QUERY.NAME=Guess Query
GUESS_SCHEMA.NAME=Guess Schema
QUERY_TEXT.NAME=Query Text
FETCHSIZE.NAME=Batch Size
REJECT.LINK=Reject
REJECT.MENU=Reject
NB_LINE.NAME=Number of line
DIE_ON_ERROR.NAME=Die on error
HELP=org.talend.help.tMDMRestInput
LONG_NAME=Read a json/xml structure from the web service

View File

@@ -1,3 +0,0 @@
PASSWORD.NAME=\u0631\u0645\u0632 \u0627\u0644\u0645\u0631\u0648\u0631
XMLFIELD.NAME=XML \u062E\u0627\u0646\u0629
CONNECTION_GRP.NAME=\u0627\u0644\u0625\u062A\u0635\u0627\u0644

View File

@@ -1,7 +0,0 @@
PASSWORD.NAME=Passwort
DATACLUSTER.NAME=Daten Container
XMLFIELD.NAME=XML Feld
NB_LINE.NAME=Anzahl an Zeilen
DIE_ON_ERROR.NAME=Abbrechen bei Fehler
CONNECTION.NAME=Komponenten Liste
USE_EXISTING_CONNECTION.NAME=eine bestehende Verbindung verwenden

View File

@@ -1,11 +0,0 @@
USERNAME.NAME=\u038C\u03BD\u03BF\u03BC\u03B1 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7
PASSWORD.NAME=\u039A\u03C9\u03B4\u03B9\u03BA\u03AE \u03BB\u03AD\u03BE\u03B7
DATACLUSTER.NAME=\u03A5\u03C0\u03BF\u03B4\u03BF\u03C7\u03AD\u03B1\u03C2 \u0394\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD
XMLFIELD.NAME=\u03A0\u03B5\u03B4\u03AF\u03BF XML
REJECT.LINK=\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7
REJECT.MENU=\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7
NB_LINE.NAME=\u0391\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD
DIE_ON_ERROR.NAME=\u0394\u03B9\u03B1\u03BA\u03BF\u03C0\u03AE \u03C3\u03B5 \u03C3\u03C6\u03AC\u03BB\u03BC\u03B1
CONNECTION.NAME=\u039B\u03AF\u03C3\u03C4\u03B1 \u03A3\u03C5\u03C3\u03C4\u03B1\u03C4\u03B9\u03BA\u03CE\u03BD \u03A3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03C9\u03BD
USE_EXISTING_CONNECTION.NAME=\u03A7\u03C1\u03AE\u03C3\u03B7 \u03A5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03C3\u03B1\u03C2 \u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\u03C2
CONNECTION_GRP.NAME=\u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7

View File

@@ -1,29 +0,0 @@
USE_EXISTING_CONNECTION.NAME=Use an existing connection
CONNECTION.NAME=Component List
MDMURL.NAME=URL
USERNAME.NAME=Username
PASSWORD.NAME=Password
DATACLUSTER.NAME=Data Container
CONTAINER_TYPE.NAME=Type
CONTAINER_TYPE.ITEM.MASTER=Master
CONTAINER_TYPE.ITEM.STAGING=Staging
RETRIEVE_RAW_DATA.NAME=Retrieve raw data
XMLFIELD.NAME=XML Field
ACCEPT_TYPE.NAME=Accept Type
ACCEPT_TYPE.ITEM.JSON=JSON
ACCEPT_TYPE.ITEM.XML=XML
CONNECTION_GRP.NAME=Connection
GUESS_QUERY.NAME=Guess Query
GUESS_SCHEMA.NAME=Guess Schema
QUERY_TEXT.NAME=Query Text
FETCHSIZE.NAME=Batch Size
REJECT.LINK=Reject
REJECT.MENU=Reject
NB_LINE.NAME=Number of line
DIE_ON_ERROR.NAME=Die on error
HELP=org.talend.help.tMDMRestInput
LONG_NAME=Read a json/xml structure from the web service

View File

@@ -1,5 +0,0 @@
USERNAME.NAME=Nombre de usuario
PASSWORD.NAME=Contrase<EFBFBD>a
XMLFIELD.NAME=Campo XML
USE_EXISTING_CONNECTION.NAME=Usar una conexi<78>n existente
CONNECTION_GRP.NAME=Conecci<EFBFBD>n

View File

@@ -1,14 +0,0 @@
USE_EXISTING_CONNECTION.NAME=Utiliser une connexion existante
CONNECTION.NAME=Liste des composants
USERNAME.NAME=Utilisateur
PASSWORD.NAME=Mot de passe
CONNECTION_GRP.NAME=Connexion
DATACLUSTER.NAME=Conteneur de donn<6E>es
XMLFIELD.NAME=Champ XML
FETCHSIZE.NAME=Taille des lots
NB_LINE.NAME=Nombre de lignes
DIE_ON_ERROR.NAME=Arr<EFBFBD>ter en cas d'erreur
LONG_NAME=Ecrit une structure json/xml dans le service Web

View File

@@ -1,5 +0,0 @@
USERNAME.NAME=Korisni\u010Dko ime
PASSWORD.NAME=Lozinka
XMLFIELD.NAME=XML polje
CONNECTION_GRP.NAME=Konekcija

View File

@@ -1,11 +0,0 @@
MDMURL.NAME=Url
USERNAME.NAME=Username
PASSWORD.NAME=Password
XMLFIELD.NAME=Campo XML
REJECT.LINK=Scarto
REJECT.MENU=Scarto
NB_LINE.NAME=Numero di linee
DIE_ON_ERROR.NAME=Interrompi se rilevato errore
CONNECTION.NAME=Lista componente
USE_EXISTING_CONNECTION.NAME=Usa una connessione esistente
CONNECTION_GRP.NAME=Connessione

View File

@@ -1,7 +0,0 @@
USERNAME.NAME=\u30E6\u30FC\u30B6\u540D
PASSWORD.NAME=\u30D1\u30B9\u30EF\u30FC\u30C9
DATACLUSTER.NAME=\u30C7\u30FC\u30BF\u30B3\u30F3\u30C6\u30CA
XMLFIELD.NAME=XML\u30D5\u30A3\u30FC\u30EB\u30C9
NB_LINE.NAME=\u884C\u6570
DIE_ON_ERROR.NAME=\u30A8\u30E9\u30FC\u3067\u505C\u6B62
USE_EXISTING_CONNECTION.NAME=\u65E2\u5B58\u306E\u63A5\u7D9A\u3092\u4F7F\u7528

View File

@@ -1,4 +0,0 @@
USERNAME.NAME=\u30E6\u30FC\u30B6\u540D
PASSWORD.NAME=\u30D1\u30B9\u30EF\u30FC\u30C9
DATACLUSTER.NAME=\u30C7\u30FC\u30BF\u30AF\u30E9\u30B9\u30BF
XMLFIELD.NAME=XML\u30D5\u30A3\u30FC\u30EB\u30C9

View File

@@ -1,5 +0,0 @@
USERNAME.NAME=\uC0AC\uC6A9\uC790
PASSWORD.NAME=\uBE44\uBC00\uBC88\uD638
XMLFIELD.NAME=Xml \uD544\uB4DC
CONNECTION.NAME=\uCEF4\uD3EC\uB10C\uD2B8\uBAA9\uB85D
CONNECTION_GRP.NAME=\uC5F0\uACB0

View File

@@ -1,4 +0,0 @@
USERNAME.NAME=Gebruikersnaam
PASSWORD.NAME=Wachtwoord
XMLFIELD.NAME=XML Veld
CONNECTION_GRP.NAME=Connectie

View File

@@ -1,7 +0,0 @@
USERNAME.NAME=Nazwa u\u017Cytkownika
PASSWORD.NAME=Has\u0142o
DATACLUSTER.NAME=Kontener danych
XMLFIELD.NAME=Pole XML
CONNECTION.NAME=Lista komponent<6E>w
USE_EXISTING_CONNECTION.NAME=U\u017Cyj istniej\u0105cego po\u0142\u0105czenia
CONNECTION_GRP.NAME=Po\u0142\u0105czenie

View File

@@ -1,5 +0,0 @@
PASSWORD.NAME=Senha
DATACLUSTER.NAME=Selecione a coluna: (ENTER: localizar o prуximo)
XMLFIELD.NAME=Campo XML
CONNECTION.NAME=Lista de componentes
CONNECTION_GRP.NAME=Conexгo

View File

@@ -1,4 +0,0 @@
USERNAME.NAME=Nume utilizator
PASSWORD.NAME=parola
XMLFIELD.NAME=C<EFBFBD>mp XML
USE_EXISTING_CONNECTION.NAME=Folosire conexiune existent\u0103

View File

@@ -1,8 +0,0 @@
USERNAME.NAME=\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F
PASSWORD.NAME=\u041F\u0430\u0440\u043E\u043B\u044C
DATACLUSTER.NAME=\u041A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440 \u0434\u0430\u043D\u043D\u044B\u0445
XMLFIELD.NAME=XML \u043F\u043E\u043B\u0435
NB_LINE.NAME=\u0427\u0438\u0441\u043B\u043E \u0441\u0442\u0440\u043E\u043A
CONNECTION.NAME=\u041B\u0438\u0441\u0442 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442
USE_EXISTING_CONNECTION.NAME=\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0435\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435
CONNECTION_GRP.NAME=\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435

View File

@@ -1,6 +0,0 @@
USERNAME.NAME=U\u017E<37>vate\u013Esk<73> Meno
PASSWORD.NAME=Heslo
DATACLUSTER.NAME=D<EFBFBD>tov<EFBFBD> Kontajner
XMLFIELD.NAME=Xml Pole
CONTAINER_TYPE.NAME=Typ
CONNECTION_GRP.NAME=Pripojenie

View File

@@ -1,3 +0,0 @@
USERNAME.NAME=Kullan\u0131c\u0131 Ad\u0131
PASSWORD.NAME=\u015Eifre
CONNECTION_GRP.NAME=Ba\u011Flant\u0131

View File

@@ -1,6 +0,0 @@
PASSWORD.NAME=\u5fc5\u987b\u6307\u5b9a\u5bc6\u7801
XMLFIELD.NAME=\u8F93\u5165XML\u5B57\u7B26\u4E32
DIE_ON_ERROR.NAME=\u9519\u8bef\u65f6\u7ec8\u6b62
CONNECTION.NAME=\u7ec4\u4ef6\u5217\u8868
USE_EXISTING_CONNECTION.NAME=\u5E94\u7528\u5DF2\u5B58\u5728\u7684\u8FDE\u63A5
CONNECTION_GRP.NAME=\u8FDE\u63A5

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.localprovider</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core.generic</artifactId>

View File

@@ -48,4 +48,9 @@ public interface IGenericConstants {
*/
public static final String AVAILABILITY = "AVAILABILITY";//$NON-NLS-1$
/**
* Tag key which estimates whether need to add quotes for property value.
*/
public static final String ADD_QUOTES = "ADD_QUOTES"; //$NON-NLS-1$
}

View File

@@ -14,7 +14,9 @@ package org.talend.designer.core.generic.controller;
import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
@@ -40,6 +42,7 @@ import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.utils.TalendTextUtils;
import org.talend.core.ui.properties.tab.IDynamicProperty;
import org.talend.designer.core.generic.constants.IGenericConstants;
import org.talend.designer.core.generic.model.GenericElementParameter;
import org.talend.designer.core.i18n.Messages;
import org.talend.designer.core.model.components.EParameterName;
@@ -54,6 +57,8 @@ import org.talend.designer.core.ui.editor.properties.controllers.AbstractElement
*/
public class ComponentRefController extends AbstractElementPropertySectionController {
private Map<String, String> labelToValueMap = new HashMap<>();
public ComponentRefController(IDynamicProperty dp) {
super(dp);
}
@@ -76,7 +81,12 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
continue;
}
if (data != null && data.equals(combo.getData(PARAMETER_NAME))) {
if (!((CCombo) ctrl).getText().equals(elem.getPropertyValue(name))) {
String newValue = ((CCombo) ctrl).getText();
String v = labelToValueMap.get(newValue);
if (v != null) {
newValue = v;
}
if (!newValue.equals(elem.getPropertyValue(name))) {
String value = ""; //$NON-NLS-1$
List<? extends IElementParameter> params = elem.getElementParametersWithChildrens();
boolean done = false;
@@ -96,7 +106,7 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
} else {
props.referenceType
.setValue(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE);
props.componentInstanceId.setValue(TalendTextUtils.addQuotes(value));
props.componentInstanceId.setValue(value);
GenericElementParameter gParameter = (GenericElementParameter) param;
if (gParameter != null && gParameter.getElement() != null
&& gParameter.getElement() instanceof Node) {
@@ -169,6 +179,11 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
combo.setEditable(false);
cLayout.setBackground(subComposite.getBackground());
combo.setEnabled(!param.isReadOnly());
GenericElementParameter gParam = (GenericElementParameter) param;
ComponentReferenceProperties props = (ComponentReferenceProperties) gParam.getWidget().getContent();
props.componentInstanceId.setTaggedValue(IGenericConstants.ADD_QUOTES, true);
combo.addSelectionListener(new SelectionAdapter() {
@Override
@@ -176,8 +191,6 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
if (!(event.getSource() instanceof CCombo)) {
return;
}
GenericElementParameter gParam = (GenericElementParameter) param;
ComponentReferenceProperties props = (ComponentReferenceProperties) gParam.getWidget().getContent();
Command cmd = createComboCommand(event, gParam, props);
executeCommand(cmd);
}
@@ -266,9 +279,9 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
String selectedValue;
Object referenceType = props.referenceType.getValue();
if (referenceType != null && referenceType.equals(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE)) {
selectedValue = currentNode.getUniqueName();
} else {
selectedValue = TalendTextUtils.removeQuotes(props.componentInstanceId.getStringValue());
} else {
selectedValue = currentNode.getUniqueName();
}
for (INode node : refNodes) {
@@ -287,6 +300,7 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
}
itemsLabel.add(displayName);
itemsValue.add(uniqueName);
labelToValueMap.put(displayName, uniqueName);
}
param.setListItemsDisplayName(itemsLabel.toArray(new String[0]));
param.setListItemsDisplayCodeName(itemsLabel.toArray(new String[0]));
@@ -296,7 +310,8 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
int selection = 0;
for (int i = 0; i < itemsValue.size(); i++) {
String iValue = itemsValue.get(i);
if ((selectedValue == null && iValue == null) || (selectedValue != null && selectedValue.equals(iValue))) {
if ((selectedValue == null && (((INode) elem).getUniqueName()).equals(iValue))
|| (selectedValue != null && selectedValue.equals(iValue))) {
iLabel = itemsLabel.get(i);
break;
}

View File

@@ -31,6 +31,7 @@ import org.talend.components.api.component.Connector;
import org.talend.components.api.component.Trigger;
import org.talend.components.api.component.VirtualComponentDefinition;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.components.api.properties.ComponentReferenceProperties;
import org.talend.components.api.service.ComponentService;
import org.talend.components.api.wizard.ComponentWizard;
import org.talend.components.api.wizard.ComponentWizardDefinition;
@@ -943,6 +944,9 @@ public class Component extends AbstractBasicComponent {
protected void processCodegenPropInfos(List<CodegenPropInfo> propList, ComponentProperties props, String fieldString) {
for (NamedThing prop : props.getProperties()) {
if (prop instanceof ComponentProperties) {
if (prop instanceof ComponentReferenceProperties) {
((ComponentReferenceProperties) prop).componentProperties = null;
}
CodegenPropInfo childPropInfo = new CodegenPropInfo();
if (fieldString.equals("")) {//$NON-NLS-1$
childPropInfo.fieldName = "." + prop.getName();//$NON-NLS-1$
@@ -977,6 +981,9 @@ public class Component extends AbstractBasicComponent {
}
public String getCodegenValue(Property property, String value) {
if (Boolean.valueOf(String.valueOf(property.getTaggedValue(IGenericConstants.ADD_QUOTES)))) {
return "\"" + value + "\"";//$NON-NLS-1$ //$NON-NLS-2$
}
if (property.getType() == Property.Type.ENUM) {
return "\"" + value + "\"";//$NON-NLS-1$ //$NON-NLS-2$
}

View File

@@ -51,10 +51,6 @@ import org.talend.designer.core.model.components.ElementParameter;
import org.talend.designer.core.ui.editor.cmd.ChangeMetadataCommand;
import org.talend.designer.core.ui.editor.nodes.Node;
import us.monoid.json.JSONArray;
import us.monoid.json.JSONException;
import us.monoid.json.JSONObject;
/**
* created by ycbai on 2015年9月24日 Detailled comment
*
@@ -104,7 +100,7 @@ public class GenericElementParameter extends ElementParameter {
@Override
public void setValue(Object o) {
super.setValue(o);
if (!isFirstCall) {
if (!isFirstCall || widget.getContent() instanceof ComponentProperties) {
updateProperty(o);
boolean calledValidate = callValidate();
if (calledValidate) {
@@ -264,6 +260,9 @@ public class GenericElementParameter extends ElementParameter {
Object schemaObj = null;
try {
schemaObj = ComponentsUtils.getGenericPropertyValue(componentProperties, schemaPropertyName);
if (schemaObj instanceof String) {
schemaObj = new Schema.Parser().parse((String) schemaObj);
}
} catch (Exception e) {
// do nothing
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.dbmap</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.documentation</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.filemultischemas</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.fileoutputxml</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.gefabstractmap</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.hl7</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.mapper.advanced</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.mapper</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.job</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.publish.core</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.rowgenerator</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>6.2.0-SNAPSHOT</version>
<version>6.2.0-RC1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.runprocess</artifactId>

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