Compare commits

..

6 Commits

Author SHA1 Message Date
Christophe Le Saec
451f25526a TDI-42230 remove SNAPSHOT 2019-07-04 09:58:46 +02:00
Christophe Le Saec
b4c77184f3 fix(TDI-42230) : custom lib on copy with version 2019-07-03 10:28:44 +02:00
Christophe Le Saec
4efe837b40 fix(TDI-42230) - put filecopy librarie directly in studio 2019-07-02 10:17:28 +02:00
Christophe Le Saec
2164c692d2 fix(TDI-42230) : use filecopy from nexus in studio 2019-06-28 16:56:38 +02:00
Christophe Le Saec
c1de5f5fc0 fix(TDI-42230) filecopy.jar removed from git 2019-06-28 09:53:57 +02:00
Christophe Le Saec
bd31878bcd fix(TDI-42230) : utilisation de la classe standard java.nio.Files 2019-06-27 17:17:23 +02:00
221 changed files with 1635 additions and 5346 deletions

View File

@@ -11,6 +11,7 @@
<import feature="org.talend.tos.feature" version="0.0.0" match="greaterOrEqual"/>
</requires>
<plugin id="org.talend.designer.maven.tos" download-size="0" install-size="0" version="0.0.0" fragment="true"/>
<plugin id="org.talend.libraries.mdm.webservice.ce" download-size="0" install-size="0" version="0.0.0" fragment="true"/>
<plugin id="org.talend.presentation.onboarding" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.presentation.onboarding.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.presentation.onboarding.resource" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

View File

@@ -55,6 +55,5 @@
<plugin id="org.talend.testutils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.updates.runtime.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.utils.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.sdk.component.studio-integration.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="test.all.test.suite" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
</feature>

View File

@@ -445,7 +445,6 @@
lastStr = "";
}
}
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
<%if(isLog4jEnabled){%>
if(!"".equals(log4jLevel)){
@@ -494,11 +493,7 @@
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("appender.file.maxsize", "52428800");
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("appender.file.maxbackup", "20");
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("host", "false");
System.getProperties().stringPropertyNames().stream()
.filter(it -> it.startsWith("monitoring.audit.logger.properties."))
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("monitoring.audit.logger.properties.".length()), System.getProperty(key)));
auditLogger_<%=jobCatcherNode.getUniqueName()%> = org.talend.job.audit.JobEventAuditLoggerFactory.createJobAuditLogger(properties_<%=jobCatcherNode.getUniqueName()%>);
}
<%
@@ -1514,10 +1509,12 @@ if (execStat) {
}
} else if (arg.startsWith("--log4jLevel=")) {
log4jLevel = arg.substring(13);
} else if (arg.startsWith("--monitoring") && arg.contains("=")) {//for trunjob call
final int equal = arg.indexOf('=');
final String key = arg.substring("--".length(), equal);
System.setProperty(key, arg.substring(equal + 1));
} else if (arg.startsWith("--monitoring=")) {//for trunjob call
enableLogStash = "true".equalsIgnoreCase(arg.substring(13));
}
if(!enableLogStash) {
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
}
}

View File

@@ -69,140 +69,145 @@ if(hasInput){
}
}
}
boolean hasValidInput = inputConn!=null;
if (hasValidInput) {
IMetadataTable metadata = null;
List<IMetadataTable> metadatas = node.getMetadataList();
boolean haveValidNodeMetadata = ((metadatas != null) && (metadatas.size() > 0) && (metadata = metadatas.get(0)) != null);
if (hasValidInput && haveValidNodeMetadata) {
List<IMetadataColumn> input_columnList = inputConn.getMetadataTable().getListColumns();
if(input_columnList == null) {
input_columnList = new ArrayList<IMetadataColumn>();
}
// add incoming (not present) columns to enforcer for this comps
if (cid.contains("tDataStewardship") || cid.contains("tMarkLogic")){
%>
boolean shouldCreateRuntimeSchemaForIncomingNode = false;
<%
for (int i = 0; i < input_columnList.size(); i++) {
if(!input_columnList.get(i).getTalendType().equals("id_Dynamic")) {
if (input_columnList!=null && !input_columnList.isEmpty()) {
// add incoming (not present) columns to enforcer for this comps
if (cid.contains("tDataStewardship") || cid.contains("tMarkLogic")){
%>
if (incomingEnforcer_<%=cid%>.getDesignSchema().getField("<%=input_columnList.get(i)%>") == null){
incomingEnforcer_<%=cid%>.addIncomingNodeField("<%=input_columnList.get(i)%>", ((Object) <%=inputConn.getName()%>.<%=input_columnList.get(i)%>).getClass().getCanonicalName());
shouldCreateRuntimeSchemaForIncomingNode = true;
boolean shouldCreateRuntimeSchemaForIncomingNode = false;
<%
for (int i = 0; i < input_columnList.size(); i++) {
if(!input_columnList.get(i).getTalendType().equals("id_Dynamic")) {
%>
if (incomingEnforcer_<%=cid%>.getDesignSchema().getField("<%=input_columnList.get(i)%>") == null){
incomingEnforcer_<%=cid%>.addIncomingNodeField("<%=input_columnList.get(i)%>", ((Object) <%=inputConn.getName()%>.<%=input_columnList.get(i)%>).getClass().getCanonicalName());
shouldCreateRuntimeSchemaForIncomingNode = true;
}
<%
}
<%
}
}
%>
if (shouldCreateRuntimeSchemaForIncomingNode){
incomingEnforcer_<%=cid%>.createRuntimeSchema();
}
<%
}
// If there are dynamic columns in the schema, they need to be
// initialized into the runtime schema of the actual IndexedRecord
// provided to the component.
int dynamicPos = -1;
for (int i = 0; i < input_columnList.size(); i++) {
if (input_columnList.get(i).getTalendType().equals("id_Dynamic")) {
dynamicPos = i;
break;
}
}
if (dynamicPos != -1) {
%>
if (!incomingEnforcer_<%=cid%>.areDynamicFieldsInitialized()) {
// Initialize the dynamic columns when they are first encountered.
for (routines.system.DynamicMetadata dm_<%=cid%> : <%=inputConn.getName()%>.<%=input_columnList.get(dynamicPos).getLabel()%>.metadatas) {
incomingEnforcer_<%=cid%>.addDynamicField(
dm_<%=cid%>.getName(),
dm_<%=cid%>.getType(),
dm_<%=cid%>.getLogicalType(),
dm_<%=cid%>.getFormat(),
dm_<%=cid%>.getDescription(),
dm_<%=cid%>.isNullable());
}
incomingEnforcer_<%=cid%>.createRuntimeSchema();
}
<%
}
%>
incomingEnforcer_<%=cid%>.createNewRecord();
<%
for (int i = 0; i < input_columnList.size(); i++) { // column
IMetadataColumn column = input_columnList.get(i);
if (dynamicPos != i) {
%>
//skip the put action if the input column doesn't appear in component runtime schema
if (incomingEnforcer_<%=cid%>.getRuntimeSchema().getField("<%=input_columnList.get(i)%>") != null){
incomingEnforcer_<%=cid%>.put("<%=column.getLabel()%>", <%=inputConn.getName()%>.<%=column.getLabel()%>);
}
<%
} else {
%>
for (int i = 0; i < <%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnCount(); i++) {
incomingEnforcer_<%=cid%>.put(<%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnMetadata(i).getName(),
<%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnValue(i));
if (shouldCreateRuntimeSchemaForIncomingNode){
incomingEnforcer_<%=cid%>.createRuntimeSchema();
}
<%
}
} // column
// If there are dynamic columns in the schema, they need to be
// initialized into the runtime schema of the actual IndexedRecord
// provided to the component.
// If necesary, generate the code to handle outgoing connections.
// TODO: For now, this can only handle one outgoing record for
// each incoming record. To handle multiple outgoing records, code
// generation needs to occur in component_begin in order to open
// a for() loop.
int dynamicPos = -1;
for (int i = 0; i < input_columnList.size(); i++) {
if (input_columnList.get(i).getTalendType().equals("id_Dynamic")) {
dynamicPos = i;
break;
}
}
// There will be a ClassCastException if the output component does
// not implement WriterWithFeedback, but permits outgoing
// connections.
ComponentProperties componentProps = node.getComponentProperties();
ProcessPropertiesGenerator generator = new ProcessPropertiesGenerator(cid, component);
List<Component.CodegenPropInfo> propsToProcess = component.getCodegenPropInfos(componentProps);
for (Component.CodegenPropInfo propInfo : propsToProcess) { // propInfo
List<NamedThing> properties = propInfo.props.getProperties();
for (NamedThing prop : properties) { // property
if (prop instanceof Property) { // if, only deal with valued Properties
Property property = (Property)prop;
if (property.getFlags() != null && (property.getFlags().contains(Property.Flags.DESIGN_TIME_ONLY) || property.getFlags().contains(Property.Flags.HIDDEN)))
continue;
if(property.getTaggedValue(IGenericConstants.DYNAMIC_PROPERTY_VALUE)!=null && Boolean.valueOf(String.valueOf(property.getTaggedValue(IGenericConstants.DYNAMIC_PROPERTY_VALUE)))) {
generator.setPropertyValues(property, propInfo, null, false, false);
if (dynamicPos != -1) {
%>
if (!incomingEnforcer_<%=cid%>.areDynamicFieldsInitialized()) {
// Initialize the dynamic columns when they are first encountered.
for (routines.system.DynamicMetadata dm_<%=cid%> : <%=inputConn.getName()%>.<%=input_columnList.get(dynamicPos).getLabel()%>.metadatas) {
incomingEnforcer_<%=cid%>.addDynamicField(
dm_<%=cid%>.getName(),
dm_<%=cid%>.getType(),
dm_<%=cid%>.getLogicalType(),
dm_<%=cid%>.getFormat(),
dm_<%=cid%>.getDescription(),
dm_<%=cid%>.isNullable());
}
incomingEnforcer_<%=cid%>.createRuntimeSchema();
}
<%
}
%>
incomingEnforcer_<%=cid%>.createNewRecord();
<%
for (int i = 0; i < input_columnList.size(); i++) { // column
IMetadataColumn column = input_columnList.get(i);
if (dynamicPos != i) {
%>
//skip the put action if the input column doesn't appear in component runtime schema
if (incomingEnforcer_<%=cid%>.getRuntimeSchema().getField("<%=input_columnList.get(i)%>") != null){
incomingEnforcer_<%=cid%>.put("<%=column.getLabel()%>", <%=inputConn.getName()%>.<%=column.getLabel()%>);
}
<%
} else {
%>
for (int i = 0; i < <%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnCount(); i++) {
incomingEnforcer_<%=cid%>.put(<%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnMetadata(i).getName(),
<%=inputConn.getName()%>.<%=column.getLabel()%>.getColumnValue(i));
}
<%
}
} // column
// If necesary, generate the code to handle outgoing connections.
// TODO: For now, this can only handle one outgoing record for
// each incoming record. To handle multiple outgoing records, code
// generation needs to occur in component_begin in order to open
// a for() loop.
// There will be a ClassCastException if the output component does
// not implement WriterWithFeedback, but permits outgoing
// connections.
ComponentProperties componentProps = node.getComponentProperties();
ProcessPropertiesGenerator generator = new ProcessPropertiesGenerator(cid, component);
List<Component.CodegenPropInfo> propsToProcess = component.getCodegenPropInfos(componentProps);
for (Component.CodegenPropInfo propInfo : propsToProcess) { // propInfo
List<NamedThing> properties = propInfo.props.getProperties();
for (NamedThing prop : properties) { // property
if (prop instanceof Property) { // if, only deal with valued Properties
Property property = (Property)prop;
if (property.getFlags() != null && (property.getFlags().contains(Property.Flags.DESIGN_TIME_ONLY) || property.getFlags().contains(Property.Flags.HIDDEN)))
continue;
if(property.getTaggedValue(IGenericConstants.DYNAMIC_PROPERTY_VALUE)!=null && Boolean.valueOf(String.valueOf(property.getTaggedValue(IGenericConstants.DYNAMIC_PROPERTY_VALUE)))) {
generator.setPropertyValues(property, propInfo, null, false, false);
}
}
}
} // property
} // propInfo
%>
org.apache.avro.generic.IndexedRecord data_<%=cid%> = incomingEnforcer_<%=cid%>.getCurrentRecord();
<%
boolean isParallelize ="true".equalsIgnoreCase(ElementParameterParser.getValue(node, "__PARALLELIZE__"));
if (isParallelize) {
String sourceComponentId = inputConn.getSource().getUniqueName();
if(sourceComponentId!=null && sourceComponentId.contains("tAsyncIn")) {
%>
globalMap.put(buffersSizeKey_<%=cid%>, buffersSize_<%=sourceComponentId%>);
<%
}
}
%>
writer_<%=cid%>.write(data_<%=cid%>);
nb_line_<%=cid %>++;
<%if(hasMainOutput){
} // property
} // propInfo
%>
if(!(writer_<%=cid%> instanceof org.talend.components.api.component.runtime.WriterWithFeedback)) {
// For no feedback writer,just pass the input record to the output
if (data_<%=cid%>!=null) {
outgoingMainRecordsList_<%=cid%> = java.util.Arrays.asList(data_<%=cid%>);
}
}
<%
org.apache.avro.generic.IndexedRecord data_<%=cid%> = incomingEnforcer_<%=cid%>.getCurrentRecord();
<%
boolean isParallelize ="true".equalsIgnoreCase(ElementParameterParser.getValue(node, "__PARALLELIZE__"));
if (isParallelize) {
String sourceComponentId = inputConn.getSource().getUniqueName();
if(sourceComponentId!=null && sourceComponentId.contains("tAsyncIn")) {
%>
globalMap.put(buffersSizeKey_<%=cid%>, buffersSize_<%=sourceComponentId%>);
<%
}
}
%>
writer_<%=cid%>.write(data_<%=cid%>);
nb_line_<%=cid %>++;
<%if(hasMainOutput){
%>
if(!(writer_<%=cid%> instanceof org.talend.components.api.component.runtime.WriterWithFeedback)) {
// For no feedback writer,just pass the input record to the output
if (data_<%=cid%>!=null) {
outgoingMainRecordsList_<%=cid%> = java.util.Arrays.asList(data_<%=cid%>);
}
}
<%
}
}
}
} // canStart

View File

@@ -139,7 +139,7 @@ for (INode node : process.getNodesOfType("tRESTClient")) {
}
boolean talendEsbJobFactory = actAsProvider || !process.getNodesOfType("tRouteInput").isEmpty();
boolean talendEsbJob = talendEsbJobFactory || actAsConsumer || ProcessorUtilities.isEsbJob(process);
boolean talendEsbJob = talendEsbJobFactory || actAsConsumer || ProcessorUtilities.isEsbJob(process.getId(), process.getVersion());
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<artifactId>commons-net-ftps-proxy</artifactId>
<version>3.6.1-talend-20190726</version>
<version>3.6.1-talend-20190128</version>
<name>commons-net-talend</name>

View File

@@ -29,8 +29,11 @@ public class SSLSessionReuseFTPSClient extends FTPSClient {
final Object cache = sessionHostPortCache.get(context);
final Method putMethod = cache.getClass().getDeclaredMethod("put", Object.class, Object.class);
putMethod.setAccessible(true);
final Method getHostMethod = socket.getClass().getDeclaredMethod("getHost");
getHostMethod.setAccessible(true);
Object host = getHostMethod.invoke(socket);
final String key =
String.format("%s:%s", socket.getInetAddress().getHostName(), String.valueOf(socket.getPort())).toLowerCase(Locale.ROOT);
String.format("%s:%s", host, String.valueOf(socket.getPort())).toLowerCase(Locale.ROOT);
putMethod.invoke(cache, key, session);
} catch (Exception e) {
e.printStackTrace();

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<artifactId>simpleexcel-2.2-20190722</artifactId>
<artifactId>simpleexcel-2.1-20190507</artifactId>
<version>6.0.0</version>
<packaging>jar</packaging>

View File

@@ -12,21 +12,17 @@
// ============================================================================
package com.talend.excel.xssf.event;
import org.apache.poi.ooxml.util.PackageHelper;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.poifs.crypt.Decryptor;
import org.apache.poi.poifs.crypt.EncryptionInfo;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable;
import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.StylesTable;
import org.apache.poi.ooxml.util.PackageHelper;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@@ -36,6 +32,7 @@ import java.util.concurrent.FutureTask;
/**
* created by wwang on 2012-9-27 Detailled comment
*
*/
public class ExcelReader implements Callable {
@@ -49,8 +46,6 @@ public class ExcelReader implements Callable {
private String charset = "UTF-8";
private String password = null;
private java.io.InputStream is;
private List<String> sheetNames = new ArrayList<String>();
@@ -69,17 +64,15 @@ public class ExcelReader implements Callable {
task = new Thread(futureTask);
}
public void parse(String fileURL, String charset, String password) {
public void parse(String fileURL, String charset) {
this.fileURL = fileURL;
this.charset = charset;
this.password = password;
task.start();
}
public void parse(java.io.InputStream is, String charset, String password) {
public void parse(java.io.InputStream is, String charset) {
this.is = is;
this.charset = charset;
this.password = password;
task.start();
}
@@ -127,25 +120,11 @@ public class ExcelReader implements Callable {
public Object call() throws Exception {
OPCPackage pkg = null;
POIFSFileSystem fs = null;
try {
if (password != null) {
if (fileURL != null) {
fs = new POIFSFileSystem(new File(fileURL));
} else {
fs = new POIFSFileSystem(is);
}
Decryptor d = Decryptor.getInstance(new EncryptionInfo(fs));
if (!d.verifyPassword(password)) {
throw new RuntimeException("Error: Cannot decrypt Excel file. Invalid password.");
}
pkg = OPCPackage.open(d.getDataStream(fs));
if (fileURL != null) {
pkg = OPCPackage.open(fileURL);
} else {
if (fileURL != null) {
pkg = OPCPackage.open(fileURL);
} else {
pkg = PackageHelper.open(is);
}
pkg = PackageHelper.open(is);
}
XSSFReader r = new XSSFReader(pkg);
@@ -225,9 +204,6 @@ public class ExcelReader implements Callable {
if (pkg != null) {
pkg.revert();
}
if (fs != null) {
fs.close();
}
cache.notifyErrorOccurred();
}
return null;

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<artifactId>talend-soap</artifactId>
<version>2.1-20190716</version>
<version>2.1-20190513</version>
<packaging>jar</packaging>
<name>talend-soap</name>

View File

@@ -124,9 +124,7 @@ public class SOAPUtil {
}
SOAPMessage message = messageFactory.createMessage();
MimeHeaders mimeHeaders = message.getMimeHeaders();
setSoapAction(version, soapAction, mimeHeaders);
mimeHeaders.setHeader("SOAPAction", soapAction);
if (basicAuth) {
addBasicAuthHeader(mimeHeaders, username, password);
}
@@ -265,8 +263,8 @@ public class SOAPUtil {
}
SOAPMessage message = messageFactory.createMessage();
MimeHeaders mimeHeaders = message.getMimeHeaders();
setSoapAction(version, soapAction, mimeHeaders);
SOAPPart soapPart = message.getSOAPPart();
mimeHeaders.setHeader("SOAPAction", soapAction);
SOAPPart soapPart = message.getSOAPPart();
String encoding = getEncoding(soapMessage);
@@ -293,20 +291,8 @@ public class SOAPUtil {
return null;
}
}
/* https://jira.talendforge.org/browse/TDI-42581 skip add SOAPAction directly to header v1.2 */
private void setSoapAction(String version, String soapAction, MimeHeaders mimeHeaders) {
if (SOAP12.equals(version)) {
// in soap version 1.2 param 'action' optional and should not be empty
if( soapAction != null && !soapAction.trim().isEmpty()) {
mimeHeaders.setHeader("Content-Type", "application/soap+xml; charset=utf-8; action=\"" + soapAction + "\"");
}
} else {
mimeHeaders.setHeader("SOAPAction", soapAction);
}
}
private String getEncoding(String text) {
private String getEncoding(String text) {
String result = Charset.defaultCharset().name();
if(text == null) {

View File

@@ -7,7 +7,7 @@
<groupId>org.talend.libraries</groupId>
<artifactId>talend-codegen-utils</artifactId>
<!-- release for revert version of library -->
<version>0.28.0</version>
<version>0.25.4</version>
<packaging>jar</packaging>
<properties>

View File

@@ -51,8 +51,6 @@ public final class TypeConverter {
public static final String LIST = "id_List";
public static final String OBJECT = "id_Object";
private TypeConverter() {
// Class provides static utility methods and shouldn't be instantiated
}
@@ -169,8 +167,6 @@ public final class TypeConverter {
return SHORT;
case "java.util.Date":
return DATE;
case "java.lang.Object":
return OBJECT;
default:
throw new UnsupportedOperationException("Unrecognized java class " + javaClass);
}

View File

@@ -7,7 +7,7 @@
<groupId>org.talend.libraries</groupId>
<artifactId>talend-db-exasol</artifactId>
<version>2.1.3</version>
<version>2.1.2</version>
<packaging>jar</packaging>
<name>talend-db-exasol</name>

View File

@@ -94,11 +94,12 @@ public class EXABulkUtil {
private String createNumberFormat(Integer length, Integer precision, boolean hasGroups) {
if (length != null && length.intValue() > 0) {
StringBuilder sb = new StringBuilder();
for (int i = length - 1; i >= 0; i--) {
if(hasGroups && i < length - 1 && i > 0 && (i % 3 == 2)) {
sb.append("G");
}
sb.append("9");
int numGroups = (length.intValue() / 3) + 1;
for (int i = 0; i < numGroups; i++) {
if (i > 0 && hasGroups) {
sb.append("G");
}
sb.append("999");
}
if (precision != null && precision.intValue() > 0) {
sb.append("D");

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<artifactId>talendExcel-1.5-20190731</artifactId>
<artifactId>talendExcel-1.4-20190531</artifactId>
<version>6.0.0</version>
<packaging>jar</packaging>

View File

@@ -3,7 +3,6 @@ package org.talend;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
@@ -11,23 +10,17 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.poifs.crypt.EncryptionInfo;
import org.apache.poi.poifs.crypt.EncryptionMode;
import org.apache.poi.poifs.crypt.Encryptor;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbookType;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
public class ExcelTool {
@@ -77,8 +70,6 @@ public class ExcelTool {
private boolean isTrackAllColumns = false;
private String password = null;
public ExcelTool() {
cellStylesMapping = new HashMap<>();
}
@@ -119,7 +110,21 @@ public class ExcelTool {
initPreXlsx(fileName);
}
if (appendWorkbook) {
appendActionForFile(fileName);
InputStream inp = new FileInputStream(fileName);
wb = WorkbookFactory.create(inp);
sheet = wb.getSheet(sheetName);
if (sheet != null) {
if (appendSheet) {
if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
curY = sheet.getLastRowNum() + 1;
}
} else {
wb.removeSheetAt(wb.getSheetIndex(sheetName));
sheet = wb.createSheet(sheetName);
}
} else {
sheet = wb.createSheet(sheetName);
}
} else {
xlsxFile.delete();
wb = new SXSSFWorkbook(rowAccessWindowSize);
@@ -135,47 +140,6 @@ public class ExcelTool {
}
}
public void prepareXlsmFile(String fileName) throws Exception {
File xlsmFile = new File(fileName);
if (xlsmFile.exists()) {
if (isAbsY && keepCellFormat) {
initPreXlsx(fileName);
}
if (appendWorkbook) {
appendActionForFile(fileName);
} else {
xlsmFile.delete();
wb = new SXSSFWorkbook(new XSSFWorkbook(XSSFWorkbookType.XLSM), rowAccessWindowSize);
sheet = wb.createSheet(sheetName);
}
} else {
wb = new SXSSFWorkbook(new XSSFWorkbook(XSSFWorkbookType.XLSM), rowAccessWindowSize);
sheet = wb.createSheet(sheetName);
}
if (isAbsY) {
startX = absX;
curY = absY;
}
}
private void appendActionForFile(String fileName) throws IOException {
InputStream inp = new FileInputStream(fileName);
wb = WorkbookFactory.create(inp);
sheet = wb.getSheet(sheetName);
if (sheet != null) {
if (appendSheet) {
if (sheet.getLastRowNum() != 0 || sheet.getRow(0) != null) {
curY = sheet.getLastRowNum() + 1;
}
} else {
wb.removeSheetAt(wb.getSheetIndex(sheetName));
sheet = wb.createSheet(sheetName);
}
} else {
sheet = wb.createSheet(sheetName);
}
}
/**
*
* @return start insert row index.
@@ -338,14 +302,13 @@ public class ExcelTool {
}
public void writeExcel(OutputStream outputStream) throws Exception {
try {
wb.write(outputStream);
wb.close();
} finally {
if (outputStream != null) {
outputStream.close();
}
}
try {
wb.write(outputStream);
} finally {
if(outputStream != null) {
outputStream.close();
}
}
}
public void writeExcel(String fileName, boolean createDir) throws Exception {
@@ -356,29 +319,14 @@ public class ExcelTool {
pFile.mkdirs();
}
}
FileOutputStream fileOutput = new FileOutputStream(fileName);
if (appendWorkbook && appendSheet && recalculateFormula) {
evaluateFormulaCell();
}
FileOutputStream fileOutput = new FileOutputStream(fileName);
POIFSFileSystem fs = null;
try {
if (password == null) {
wb.write(fileOutput);
} else {
fs = new POIFSFileSystem();
Encryptor encryptor = new EncryptionInfo(EncryptionMode.agile).getEncryptor();
encryptor.confirmPassword(password);
OutputStream encryptedDataStream = encryptor.getDataStream(fs);
wb.write(encryptedDataStream);
encryptedDataStream.close(); // this is mandatory to do that at that point
fs.writeFilesystem(fileOutput);
}
wb.write(fileOutput);
} finally {
wb.close();
fileOutput.close();
if (fs != null) {
fs.close();
}
fileOutput.close();
}
}
@@ -401,9 +349,4 @@ public class ExcelTool {
((SXSSFSheet) sheet).flushRows();
}
}
public void setPasswordProtection(String password) {
this.password = password;
}
}

View File

@@ -7,7 +7,6 @@
<FAMILIES>
<FAMILY>Databases/DB Specifics/Amazon/Redshift</FAMILY>
<FAMILY>Cloud/Amazon/Redshift</FAMILY>
</FAMILIES>
<DOCUMENTATION>

View File

@@ -24,15 +24,13 @@
String dataset = ElementParameterParser.getValue(node, "__DATASET__");
String table = ElementParameterParser.getValue(node, "__TABLE__");
String gsFile = ElementParameterParser.getValue(node, "__GS_FILE__");
boolean setFieldDelimiter = ElementParameterParser.getBooleanValue(node, "__SET_FIELD_DELIMITER__");
String fieldDelimiter = ElementParameterParser.getValue(node, "__FIELD_DELIMITER__");
String actionOnData = ElementParameterParser.getValue(node, "__ACTION_ON_DATA__");
boolean dieOnError = ElementParameterParser.getBooleanValue(node, "__DIE_ON_ERROR__");
boolean createTableIfNotExist = ElementParameterParser.getBooleanValue(node, "__CREATE_TABLE_IF_NOT_EXIST__");
String gsFileHeader = ElementParameterParser.getValue(node, "__GS_FILE_HEADER__");
boolean dieOnError = "true".equals(ElementParameterParser.getValue(node, "__DIE_ON_ERROR__"));
String tokenFile = ElementParameterParser.getValue(node,"__TOKEN_NAME__");
boolean isLog4jEnabled = ElementParameterParser.getBooleanValue(node.getProcess(), "__LOG4J_ACTIVATE__");
boolean dropTable = ElementParameterParser.getBooleanValue(node, "__DROP__");
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
String passwordFieldName = "";
@@ -203,7 +201,7 @@
} else {
throw new IllegalArgumentException("authentication mode should be either \"SERVICEACCOUNT\" or \"OAUTH\", but it is " + authMode);
}
boolean bulkFileAlreadyExists = ElementParameterParser.getBooleanValue(node, "__BULK_FILE_ALREADY_EXIST__");
boolean bulkFileAlreadyExists = "true".equals(ElementParameterParser.getValue(node, "__BULK_FILE_ALREADY_EXIST__"));
String accessKey = ElementParameterParser.getValue(node, "__GS_ACCESS_KEY__");
String secretKey = ElementParameterParser.getValue(node, "__GS_SECRET_KEY__");
String localFilename = ElementParameterParser.getValue(node, "__GS_LOCAL_FILE__");
@@ -236,7 +234,6 @@
}
%>
gsService_<%=cid%>.putObject(<%=bucketName%>, fileObject_<%=cid%>);
/* ----END-UPLOADING-FILE---- */
<%
if(isLog4jEnabled){
%>
@@ -245,6 +242,7 @@
}
}
%>
/* ----END-UPLOADING-FILE---- */
<%
if (authMode.equals("OAUTH")) {
@@ -260,131 +258,95 @@
com.google.api.services.bigquery.model.JobConfiguration config_<%=cid%> = new com.google.api.services.bigquery.model.JobConfiguration();
com.google.api.services.bigquery.model.JobConfigurationLoad queryLoad_<%=cid%> = new com.google.api.services.bigquery.model.JobConfigurationLoad();
<%if (dropTable) {%>
try {
bigqueryclient_<%=cid%>.tables().delete(PROJECT_ID_<%=cid%>, <%=dataset%>, <%=table%>).execute();
} catch (com.google.api.client.googleapis.json.GoogleJsonResponseException e_<%=cid%>) {
if (e_<%=cid%>.getDetails().getCode() != 404) {
<%
if(dieOnError) {
%>
throw e_<%=cid%>;
<%
} else {
if(isLog4jEnabled){
%>
log.error("<%=cid%> - "+ e_<%=cid%>.getDetails().getMessage());
<%
}
%>
System.err.println(e_<%=cid%>.getDetails().getMessage());
<%
com.google.api.services.bigquery.model.TableSchema schema_<%=cid%> = new com.google.api.services.bigquery.model.TableSchema();
<%
if(isLog4jEnabled){
%>
log.info("<%=cid%> - Table field schema:");
<%
}
%>
java.util.List<com.google.api.services.bigquery.model.TableFieldSchema> fields_<%=cid%> = new java.util.ArrayList<com.google.api.services.bigquery.model.TableFieldSchema>();
<%
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columns = metadata.getListColumns();
int nbColumns = columns.size();
for (int i = 0; i < nbColumns; i++ ) {
IMetadataColumn column = columns.get(i);
String columnName = column.getLabel();
String typeToGenerate = "string";
if("id_Float".equals(column.getTalendType()) || "id_Double".equals(column.getTalendType())) {
typeToGenerate = "float";
}else if("id_Integer".equals(column.getTalendType()) || "id_Long".equals(column.getTalendType()) || "id_Short".equals(column.getTalendType())) {
typeToGenerate = "integer";
} else if("id_Character".equals(column.getTalendType())) {
typeToGenerate = "string";
} else if("id_BigDecimal".equals(column.getTalendType())) {
typeToGenerate = "numeric";
} else if("id_Boolean".equals(column.getTalendType())) {
typeToGenerate = "boolean";
} else if("id_Date".equals(column.getTalendType())) {
String pattern = column.getPattern();
if(pattern.length() == 12 || pattern.isEmpty() || "\"\"".equals(pattern)) {
typeToGenerate = "date";
}else if(pattern.length() > 12){
typeToGenerate = "timestamp";
}else{
typeToGenerate = "string";
}
}
%>
}
}
<%}%>
<%if (createTableIfNotExist) { %>
try {
com.google.api.services.bigquery.model.Table getTable = bigqueryclient_<%=cid%>.tables().get(PROJECT_ID_<%=cid%>, <%=dataset%>, <%=table%>).execute();
queryLoad_<%=cid%>.setCreateDisposition("CREATE_NEVER");
} catch (com.google.api.client.googleapis.json.GoogleJsonResponseException e_<%=cid%>){
if (e_<%=cid%>.getDetails().getCode() == 404) {
com.google.api.services.bigquery.model.TableSchema schema_<%=cid%> = new com.google.api.services.bigquery.model.TableSchema();
<%
String modeType = null;
if (!column.isNullable()) {
modeType = "REQUIRED";
} else {
modeType = "NULLABLE";
}
%>
com.google.api.services.bigquery.model.TableFieldSchema <%=columnName%>_<%=cid%> = new com.google.api.services.bigquery.model.TableFieldSchema();
<%=columnName%>_<%=cid%>.setName("<%=columnName%>");
<%=columnName%>_<%=cid%>.setType("<%=typeToGenerate%>");
<%=columnName%>_<%=cid%>.setMode("<%=modeType%>");
fields_<%=cid%>.add(<%=columnName%>_<%=cid%>);
<%
if(isLog4jEnabled){
%>
log.info("<%=cid%> - Table field schema:");
log.debug("<%=cid%> - Field index[<%=i%>] {\"name\":\"<%=columnName%>\",\"type\":\"<%=typeToGenerate%>\",\"mode\":\"<%=modeType%>\"}");
<%
}
%>
java.util.List<com.google.api.services.bigquery.model.TableFieldSchema> fields_<%=cid%> = new java.util.ArrayList<com.google.api.services.bigquery.model.TableFieldSchema>();
<%
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columns = metadata.getListColumns();
int nbColumns = columns.size();
for (int i = 0; i < nbColumns; i++ ) {
IMetadataColumn column = columns.get(i);
String columnName = column.getLabel();
String typeToGenerate = "string";
if("id_Float".equals(column.getTalendType()) || "id_Double".equals(column.getTalendType())) {
typeToGenerate = "float";
}else if("id_Integer".equals(column.getTalendType()) || "id_Long".equals(column.getTalendType()) || "id_Short".equals(column.getTalendType())) {
typeToGenerate = "integer";
} else if("id_Character".equals(column.getTalendType())) {
typeToGenerate = "string";
} else if("id_BigDecimal".equals(column.getTalendType())) {
typeToGenerate = "numeric";
} else if("id_Boolean".equals(column.getTalendType())) {
typeToGenerate = "boolean";
} else if("id_Date".equals(column.getTalendType())) {
String pattern = column.getPattern();
if(pattern.length() == 12 || pattern.isEmpty() || "\"\"".equals(pattern)) {
typeToGenerate = "date";
}else if(pattern.length() > 12){
typeToGenerate = "timestamp";
}else{
typeToGenerate = "string";
}
}
String modeType = (!column.isNullable()) ? "REQUIRED" : "NULLABLE";
%>
com.google.api.services.bigquery.model.TableFieldSchema <%=columnName%>_<%=cid%> = new com.google.api.services.bigquery.model.TableFieldSchema();
<%=columnName%>_<%=cid%>.setName("<%=columnName%>");
<%=columnName%>_<%=cid%>.setType("<%=typeToGenerate%>");
<%=columnName%>_<%=cid%>.setMode("<%=modeType%>");
fields_<%=cid%>.add(<%=columnName%>_<%=cid%>);
<%
if(isLog4jEnabled){
%>
log.debug("<%=cid%> - Field index[<%=i%>] {\"name\":\"<%=columnName%>\",\"type\":\"<%=typeToGenerate%>\",\"mode\":\"<%=modeType%>\"}");
<%
}
}
}
}
%>
schema_<%=cid%>.setFields(fields_<%=cid%>);
queryLoad_<%=cid%>.setSchema(schema_<%=cid%>);
queryLoad_<%=cid%>.setCreateDisposition("CREATE_IF_NEEDED");
} else {
<%
if(dieOnError) {
%>
throw e_<%=cid%>;
<%
} else {
if(isLog4jEnabled){
%>
log.error("<%=cid%> - "+ e_<%=cid%>.getDetails().getMessage());
<%
}
%>
System.err.println(e_<%=cid%>.getDetails().getMessage());
<%
}
%>
}
}
}
%>
schema_<%=cid%>.setFields(fields_<%=cid%>);
queryLoad_<%=cid%>.setSchema(schema_<%=cid%>);
<%
if("true".equals(ElementParameterParser.getValue(node, "__CREATE_TABLE_IF_NOT_EXIST__"))) {
%>
queryLoad_<%=cid%>.setCreateDisposition("CREATE_IF_NEEDED");
<%
} else {
%>
queryLoad_<%=cid%>.setCreateDisposition("CREATE_NEVER");
<%
}
if(setFieldDelimiter) {
if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) {
%>
queryLoad_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>);
<%
}
%>
queryLoad_<%=cid%>.setAllowQuotedNewlines(true);
queryLoad_<%=cid%>.setWriteDisposition("WRITE_<%=actionOnData%>");
com.google.api.services.bigquery.model.TableReference destinationTable_<%=cid%> = new com.google.api.services.bigquery.model.TableReference();
destinationTable_<%=cid%>.setProjectId(PROJECT_ID_<%=cid%>);
@@ -392,8 +354,8 @@
destinationTable_<%=cid%>.setTableId(<%=table%>);
queryLoad_<%=cid%>.setDestinationTable(destinationTable_<%=cid%>);
queryLoad_<%=cid%>.setSourceUris(java.util.Arrays.asList(<%=gsFile%>));
queryLoad_<%=cid%>.setSkipLeadingRows(<%=gsFileHeader%>);
queryLoad_<%=cid%>.setSourceUris(java.util.Arrays.asList(<%=ElementParameterParser.getValue(node, "__GS_FILE__")%>));
queryLoad_<%=cid%>.setSkipLeadingRows(<%=ElementParameterParser.getValue(node, "__GS_FILE_HEADER__")%>);
queryLoad_<%=cid%>.setNullMarker("\\N");
config_<%=cid%>.setLoad(queryLoad_<%=cid%>);
@@ -497,11 +459,9 @@
%>
/* ----START-CREATING-JOB (Cloud API)---- */
com.google.cloud.bigquery.TableId tableId_<%=cid%> = com.google.cloud.bigquery.TableId.of(<%=projectId%>, <%=dataset%>, <%=table%>);
com.google.cloud.bigquery.Table table_<%=cid%> = bigquery_<%=cid%>.getTable(tableId_<%=cid%>);
com.google.cloud.bigquery.LoadJobConfiguration.Builder loadJobBuilder_<%=cid%> = com.google.cloud.bigquery.LoadJobConfiguration.newBuilder(tableId_<%=cid%>, <%=gsFile%>);
boolean dropTable_<%=cid%> = <%=dropTable%>;
if (dropTable_<%=cid%> && bigquery_<%=cid%>.getTable(tableId_<%=cid%>) != null) {
if (<%=ElementParameterParser.getBooleanValue(node, "__DROP__")%> && table_<%=cid%> != null) {
boolean deleted = bigquery_<%=cid%>.delete(tableId_<%=cid%>);
if (deleted) {
<%
@@ -515,100 +475,123 @@
throw new RuntimeException("Unable to delete table " + tableId_<%=cid%>);
}
}
<%if(createTableIfNotExist){%>
if(bigquery_<%=cid%>.getTable(tableId_<%=cid%>) == null){
java.util.List<com.google.cloud.bigquery.Field> fields_<%=cid%> = new java.util.ArrayList<>();
<%
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columns = metadata.getListColumns();
int nbColumns = columns.size();
for (int i = 0; i < nbColumns; i++ ) {
IMetadataColumn column = columns.get(i);
String columnName = column.getLabel();
String typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
if("id_String".equals(column.getTalendType()) || "id_Character".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
} else if ("id_Float".equals(column.getTalendType()) || "id_Double".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.FLOAT";
} else if ("id_Short".equals(column.getTalendType()) || "id_Integer".equals(column.getTalendType()) || "id_Long".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.INTEGER";
} else if ("id_BigDecimal".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.NUMERIC";
} else if ("id_Boolean".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.BOOLEAN";
} else if ("id_Date".equals(column.getTalendType())) {
String pattern = column.getPattern();
if(pattern.length() == 12 || pattern.isEmpty() || "\"\"".equals(pattern)) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.DATE";
}else if(pattern.length() > 12){
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.TIMESTAMP";
}else{
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
}
}
String modeType = (!column.isNullable()) ? "REQUIRED" : "NULLABLE";
if (<%=ElementParameterParser.getBooleanValue(node, "__DROP__")%> || <%=ElementParameterParser.getBooleanValue(node, "__CREATE_TABLE_IF_NOT_EXIST__")%>) {
java.util.List<com.google.cloud.bigquery.Field> fields_<%=cid%> = new java.util.ArrayList<>();
<%
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null) && (metadatas.size() > 0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata != null) {
List<IMetadataColumn> columns = metadata.getListColumns();
int nbColumns = columns.size();
for (int i = 0; i < nbColumns; i++ ) {
IMetadataColumn column = columns.get(i);
String columnName = column.getLabel();
String typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
if("id_String".equals(column.getTalendType()) || "id_Character".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
} else if ("id_Float".equals(column.getTalendType()) || "id_Double".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.FLOAT";
} else if ("id_Short".equals(column.getTalendType()) || "id_Integer".equals(column.getTalendType()) || "id_Long".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.INTEGER";
} else if ("id_BigDecimal".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.NUMERIC";
} else if ("id_Boolean".equals(column.getTalendType())) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.BOOLEAN";
} else if ("id_Date".equals(column.getTalendType())) {
String pattern = column.getPattern();
if(pattern.length() == 12 || pattern.isEmpty() || "\"\"".equals(pattern)) {
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.DATE";
}else if(pattern.length() > 12){
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.TIMESTAMP";
}else{
typeToGenerate = "com.google.cloud.bigquery.LegacySQLTypeName.STRING";
}
}
String modeType = "NULLABLE";
if (!column.isNullable()) {
modeType = "REQUIRED";
}
%>
com.google.cloud.bigquery.Field field_<%=i%> = com.google.cloud.bigquery.Field.newBuilder("<%=columnName%>", <%=typeToGenerate%>)
.setMode(com.google.cloud.bigquery.Field.Mode.valueOf("<%=modeType%>"))
.build();
fields_<%=cid%>.add(field_<%=i%>);
<%
if(isLog4jEnabled){
%>
log.debug("<%=cid%> - Field index[<%=i%>] {\"name\":\"<%=columnName%>\",\"type\":\"<%=typeToGenerate%>\"}");
<%
}
<%
if(isLog4jEnabled){
%>
log.debug("<%=cid%> - Field index[<%=i%>] {\"name\":\"<%=columnName%>\",\"type\":\"<%=typeToGenerate%>\"}");
<%
}
}
}
%>
com.google.cloud.bigquery.Schema schema_<%=cid%> = com.google.cloud.bigquery.Schema.of(fields_<%=cid%>);
com.google.cloud.bigquery.TableInfo tableInfo_<%=cid%> = com.google.cloud.bigquery.TableInfo.newBuilder(tableId_<%=cid%>, com.google.cloud.bigquery.StandardTableDefinition.of(schema_<%=cid%>)).build();
com.google.cloud.bigquery.Table table_<%=cid%> = bigquery_<%=cid%>.create(tableInfo_<%=cid%>);
loadJobBuilder_<%=cid%>.setSchema(schema_<%=cid%>);
loadJobBuilder_<%=cid%>.setCreateDisposition(com.google.cloud.bigquery.JobInfo.CreateDisposition.CREATE_IF_NEEDED);
} else {
loadJobBuilder_<%=cid%>.setCreateDisposition(com.google.cloud.bigquery.JobInfo.CreateDisposition.CREATE_NEVER);
}
<%} else {%>
loadJobBuilder_<%=cid%>.setCreateDisposition(com.google.cloud.bigquery.JobInfo.CreateDisposition.CREATE_NEVER);
<%}%>
%>
loadJobBuilder_<%=cid%>.setWriteDisposition(com.google.cloud.bigquery.JobInfo.WriteDisposition.WRITE_<%=actionOnData%>);
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
csvOptions_<%=cid%>.setSkipLeadingRows(<%=gsFileHeader%>);
<%if(setFieldDelimiter) {
%>
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>).build());
<%
}
%>
com.google.cloud.bigquery.Schema schema_<%=cid%> = com.google.cloud.bigquery.Schema.of(fields_<%=cid%>);
com.google.cloud.bigquery.TableInfo tableInfo_<%=cid%> = com.google.cloud.bigquery.TableInfo.newBuilder(tableId_<%=cid%>, com.google.cloud.bigquery.StandardTableDefinition.of(schema_<%=cid%>)).build();
table_<%=cid%> = bigquery_<%=cid%>.create(tableInfo_<%=cid%>);
loadJobBuilder_<%=cid%>.setSchema(schema_<%=cid%>);
}
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build()));
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)));
if (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {
<%
if(isLog4jEnabled){
%>
log.info("<%=cid%> - Job execution status: " + job_<%=cid%>.getStatus());
<%
}
%>
<%
if("true".equals(ElementParameterParser.getValue(node, "__CREATE_TABLE_IF_NOT_EXIST__"))) {
%>
loadJobBuilder_<%=cid%>.setCreateDisposition(com.google.cloud.bigquery.JobInfo.CreateDisposition.CREATE_IF_NEEDED);
<%
} else {
List<com.google.cloud.bigquery.BigQueryError> errorList = job_<%=cid%>.getStatus().getExecutionErrors();
throw new RuntimeException("Job failed: " + errorList.get(errorList.size() - 1));
%>
loadJobBuilder_<%=cid%>.setCreateDisposition(com.google.cloud.bigquery.JobInfo.CreateDisposition.CREATE_NEVER);
<%
}
%>
<%
if("APPEND".equals(actionOnData)) {
%>
loadJobBuilder_<%=cid%>.setWriteDisposition(com.google.cloud.bigquery.JobInfo.WriteDisposition.WRITE_APPEND);
<%
} else if("TRUNCATE".equals(actionOnData)) {
%>
loadJobBuilder_<%=cid%>.setWriteDisposition(com.google.cloud.bigquery.JobInfo.WriteDisposition.WRITE_TRUNCATE);
<%
}
else {
%>
loadJobBuilder_<%=cid%>.setWriteDisposition(com.google.cloud.bigquery.JobInfo.WriteDisposition.WRITE_EMPTY);
<%
}
%>
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
<%if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) {
%>
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>).build());
<%
}
%>
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build()));
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)));
if (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {
<%
if(isLog4jEnabled){
%>
log.info("<%=cid%> - Job execution status: " + job_<%=cid%>.getStatus());
<%
}
%>
} else {
List<com.google.cloud.bigquery.BigQueryError> errorList = job_<%=cid%>.getStatus().getExecutionErrors();
throw new RuntimeException("Job failed: " + errorList.get(errorList.size() - 1));
}
/* ----END-CREATING-JOB (Cloud API)---- */
<%

View File

@@ -173,7 +173,7 @@
SHOW_IF="(SET_FIELD_DELIMITER == 'true')">
<DEFAULT>","</DEFAULT>
</PARAMETER>
<PARAMETER NAME="DROP" FIELD="CHECK" REQUIRED="true" NUM_ROW="25">
<PARAMETER NAME="DROP" FIELD="CHECK" REQUIRED="true" NUM_ROW="25" SHOW_IF="AUTH_MODE == 'SERVICEACCOUNT'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="ENCODING" FIELD="ENCODING_TYPE" NUM_ROW="30"

View File

@@ -53,7 +53,6 @@
<PARAMETER
NAME="DBTYPE"
REPOSITORY_VALUE="DBTYPE"
FIELD="CLOSED_LIST"
NUM_ROW="10"
>

View File

@@ -1564,7 +1564,7 @@ class TeradataManager extends Manager {
private boolean useExistingConnection;
private String connection;
private static final String SEPARATOR = "/";
private static final String SEPARATOR = ",";
protected TeradataManager(String host, String port, String dbName, String tableName,
String userName, String cid, boolean useExistingConnection, String connection, String additionalParams ) {

View File

@@ -118,7 +118,7 @@ DB_VERTICA_VERSION.ITEM.VERTICA_7_1_X=Vertica 7.1.X
DB_VERTICA_VERSION.ITEM.VERTICA_9_0=Vertica 9
DB_POSTGRE_VERSION.NAME=DB Version
DB_POSTGRE_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_POSTGRE_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_POSTGRE_VERSION.ITEM.V9_X=v9 and later
QUERY.NAME=Query

View File

@@ -36,8 +36,6 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
String defaultDateFormat = ElementParameterParser.getValue(node, "__DEFAULT_DATE_FORMAT__");
String defaultTimestampFormat = ElementParameterParser.getValue(node, "__DEFAULT_TIMESTAMP_FORMAT__");
String numGroupSep = ElementParameterParser.getValue(node, "__THOUSANDS_SEPARATOR__");
boolean useLenPrecision = "true".equals(ElementParameterParser.getValue(node, "__USE_PRECISION_LENGTH_FROM_SCHEMA__"));
if (numGroupSep == null|| numGroupSep.trim().isEmpty()) {
numGroupSep = "null";
}
@@ -209,24 +207,12 @@ org.talend.database.exasol.imp.EXABulkUtil <%=cid%> = new org.talend.database.ex
String lengthStr = "null";
String precisionStr = "null";
Integer length = column.getLength();
if(useLenPrecision) {
if (length != null) {
lengthStr = String.valueOf(length);
}
} else {
if (length != null && hasGroupSep) {
lengthStr = String.valueOf(length);
}
}
if (length != null) {
lengthStr = String.valueOf(length);
}
Integer precision = column.getPrecision();
if(useLenPrecision) {
if (precision != null) {
precisionStr = String.valueOf(precision);
}
} else {
if (precision != null && hasGroupSep) {
precisionStr = String.valueOf(precision);
}
if (precision != null) {
precisionStr = String.valueOf(precision);
}
String talendType = column.getTalendType();
if ("id_Date".equals(talendType)

View File

@@ -635,23 +635,14 @@
>
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="USE_PRECISION_LENGTH_FROM_SCHEMA"
FIELD="CHECK"
NUM_ROW="115"
REQUIRED="true"
>
<DEFAULT>false</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED="true" />
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.3.jar" MVN="mvn:org.talend.libraries/talend-db-exasol/2.1.3"
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.3.jar" REQUIRED="true" />
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.2.jar" MVN="mvn:org.talend.libraries/talend-db-exasol-2.1.2/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.2.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -108,6 +108,4 @@ NB_LINE_INSERTED.NAME=Rows inserted
NB_LINE_DELETED.NAME=Rows deleted
SOURCE_QUERY.NAME=Source query
TEST_MODE.NAME=Test mode (no statements are executed)
USE_PRECISION_LENGTH_FROM_SCHEMA.NAME=Use precision and length from schema
TEST_MODE.NAME=Test mode (no statements are executed)

View File

@@ -7,89 +7,82 @@ int retry_max_<%=cid%> = 5;
com.jcraft.jsch.Session session_<%=cid%> = null;
com.jcraft.jsch.Channel channel_<%=cid%> = null;
do {
retry_<%=cid%> = false;
retry_<%=cid%> = false;
com.jcraft.jsch.JSch jsch_<%=cid%> = new com.jcraft.jsch.JSch();
<%if (("PUBLICKEY").equals(authMethod)){%>
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - SFTP authentication using a public key.");
log.debug("<%=cid%> - Private key: '" + <%=privateKey%> + "'.");
<%}%>
jsch_<%=cid%>.addIdentity(<%=privateKey %>, defaultUserInfo_<%=cid%>.getPassphrase());
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - SFTP authentication using a public key.");
log.debug("<%=cid%> - Private key: '" + <%=privateKey%> + "'.");
<%}%>
jsch_<%=cid%>.addIdentity(<%=privateKey %>, defaultUserInfo_<%=cid%>.getPassphrase());
<%}%>
session_<%=cid%> = jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
session_<%=cid%>.setConfig("PreferredAuthentications", "publickey,password,keyboard-interactive,gssapi-with-mic");
<%if (("PASSWORD").equals(authMethod)) {%>
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - SFTP authentication using a password.");
<%}%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - SFTP authentication using a password.");
<%}%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
<%}%>
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
<%if (!useProxy) {%>
if(("true").equals(System.getProperty("http.proxySet")) ){
com.jcraft.jsch.ProxyHTTP proxy_<%=cid%> = new com.jcraft.jsch.ProxyHTTP(System.getProperty("http.proxyHost"),Integer.parseInt(System.getProperty("http.proxyPort")));
if(!"".equals(System.getProperty("http.proxyUser"))){
proxy_<%=cid%>.setUserPasswd(System.getProperty("http.proxyUser"),System.getProperty("http.proxyPassword"));
}
session_<%=cid%>.setProxy(proxy_<%=cid%>);
}
if(("true").equals(System.getProperty("http.proxySet")) ){
com.jcraft.jsch.ProxyHTTP proxy_<%=cid%> = new com.jcraft.jsch.ProxyHTTP(System.getProperty("http.proxyHost"),Integer.parseInt(System.getProperty("http.proxyPort")));
if(!"".equals(System.getProperty("http.proxyUser"))){
proxy_<%=cid%>.setUserPasswd(System.getProperty("http.proxyUser"),System.getProperty("http.proxyPassword"));
}
session_<%=cid%>.setProxy(proxy_<%=cid%>);
}
<%}%>
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user%> + "'.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user%> + "'.");
<%}%>
channel_<%=cid%> = null;
try {
if (connectionTimeout_<%=cid %> > 0) {
session_<%=cid%>.connect(connectionTimeout_<%=cid %>);
} else {
session_<%=cid%>.connect();
}
channel_<%=cid%> = session_<%=cid%>.openChannel("sftp");
if (connectionTimeout_<%=cid %> > 0) {
channel_<%=cid%>.connect(connectionTimeout_<%=cid %>);
} else {
channel_<%=cid%>.connect();
}
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
<%}%>
} catch (com.jcraft.jsch.JSchException e_<%=cid%>) {
try {
if(channel_<%=cid%>!=null) {
channel_<%=cid%>.disconnect();
}
if(session_<%=cid%>!=null) {
session_<%=cid%>.disconnect();
}
} catch(java.lang.Exception ce_<%=cid%>) {
<%if(isLog4jEnabled){%>
log.warn("<%=cid%> - close sftp connection failed : " + ce_<%=cid%>.getClass() + " : " + ce_<%=cid%>.getMessage());
<%}%>
}
String message_<%=cid%> = new TalendException(null, null, null).getExceptionCauseMessage(e_<%=cid%>);
if(message_<%=cid%>.contains("Signature length not correct") || message_<%=cid%>.contains("connection is closed by foreign host")) {
retry_<%=cid%> = true;
retry_count_<%=cid%>++;
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - connect: Signature length not correct or connection is closed by foreign host, so retry, retry time : " + retry_count_<%=cid%>);
<%}%>
} else {
throw e_<%=cid%>;
}
}
channel_<%=cid%> = null;
try {
session_<%=cid%>.connect();
channel_<%=cid%> = session_<%=cid%>.openChannel("sftp");
channel_<%=cid%>.connect();
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
<%}%>
} catch (com.jcraft.jsch.JSchException e_<%=cid%>) {
try {
if(channel_<%=cid%>!=null) {
channel_<%=cid%>.disconnect();
}
if(session_<%=cid%>!=null) {
session_<%=cid%>.disconnect();
}
} catch(java.lang.Exception ce_<%=cid%>) {
<%if(isLog4jEnabled){%>
log.warn("<%=cid%> - close sftp connection failed : " + ce_<%=cid%>.getClass() + " : " + ce_<%=cid%>.getMessage());
<%}%>
}
String message_<%=cid%> = new TalendException(null, null, null).getExceptionCauseMessage(e_<%=cid%>);
if(message_<%=cid%>.contains("Signature length not correct") || message_<%=cid%>.contains("connection is closed by foreign host")) {
retry_<%=cid%> = true;
retry_count_<%=cid%>++;
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - connect: Signature length not correct or connection is closed by foreign host, so retry, retry time : " + retry_count_<%=cid%>);
<%}%>
} else {
throw e_<%=cid%>;
}
}
} while(retry_<%=cid%> && (retry_count_<%=cid%> < retry_max_<%=cid%>));
com.jcraft.jsch.ChannelSftp c_<%=cid%> = (com.jcraft.jsch.ChannelSftp)channel_<%=cid%>;

View File

@@ -32,7 +32,6 @@ String sEncoding = ElementParameterParser.getValue(node, "__ENCODING__");
String securityMode = ElementParameterParser.getValue(node, "__SECURITY_MODE__");
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
String passwordFieldName = "";
@@ -61,9 +60,7 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
});
<%
}
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
if (!sftp && !ftps) { // *** ftp *** //
if(isLog4jEnabled){%>
log.debug("<%=cid%> - " + <%=(("ACTIVE").equals(connectMode))?"\"Using the active mode.\"":"\"Using the passive mode.\""%>);
@@ -81,11 +78,6 @@ if (!sftp && !ftps) { // *** ftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%
@@ -187,11 +179,6 @@ if (!sftp && !ftps) { // *** ftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort%>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");

View File

@@ -232,11 +232,6 @@
NUM_ROW="95" SHOW_IF="(FTPS=='true')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -244,7 +239,7 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar" MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" REQUIRED_IF="(FTPS == 'true')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar" MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" REQUIRED_IF="(FTPS == 'true')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -40,5 +40,4 @@ SECURITY_MODE.NAME=Security Mode
SECURITY_MODE.ITEM.IMPLICIT=Implicit
SECURITY_MODE.ITEM.EXPLICIT=Explicit
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -43,7 +43,6 @@ boolean sftp = false;
boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
if (("true").equals(useExistingConn)) {
List<? extends INode> nodeList = node.getProcess().getGeneratingNodes();
@@ -56,9 +55,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -205,11 +201,6 @@ int nb_file_<%=cid%> = 0;
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
@@ -328,10 +319,6 @@ int nb_file_<%=cid%> = 0;
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username: '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -288,11 +288,6 @@
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -301,8 +296,8 @@
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -56,5 +56,4 @@ IGNORE_FAILURE_AT_QUIT.NAME=Ignore Failure At Quit
PERL5_REGEX.NAME=Use Perl5 Regex Expressions as Filemask (Unchecked means Glob Expressions)
MOVE_TO_THE_CURRENT_DIRECTORY.NAME=Move to the current directory
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -42,7 +42,6 @@ boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -58,9 +57,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
String passwordFieldName = "";
@@ -192,11 +188,6 @@ if (sftp) { // *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
@@ -278,11 +269,6 @@ if (sftp) { // *** sftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username: '" +<%=username %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -276,11 +276,6 @@ COMPATIBILITY="ALL"
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -288,8 +283,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -56,5 +56,4 @@ CONNECT_MODE.ITEM.PASSIVE=Passive
IGNORE_FAILURE_AT_QUIT.NAME=Ignore Failure At Quit
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -42,7 +42,6 @@ boolean sftp = false;
boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
if (("true").equals(useExistingConn)) {
@@ -57,9 +56,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
String passwordFieldName = "";
@@ -271,11 +267,6 @@ if (sftp) {// *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%
if(isLog4jEnabled){
@@ -427,11 +418,6 @@ if (sftp) {// *** sftp *** //
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -254,11 +254,6 @@
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -266,8 +261,8 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -51,5 +51,4 @@ FILES.NAME=Files
FILES.ITEM.FILEMASK=Filemask
MOVE_TO_THE_CURRENT_DIRECTORY.NAME=Move to the current directory
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -46,7 +46,6 @@ boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
log4jFileUtil.componentStartInfo(node);
@@ -63,9 +62,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -240,11 +236,6 @@ if (sftp) { // *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
@@ -367,11 +358,6 @@ if (sftp) { // *** sftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -251,11 +251,6 @@
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -263,8 +258,8 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -50,5 +50,4 @@ MODE.ITEM.ASCII=ascii
MODE.ITEM.BINARY=binary
MODE.NAME=Transfer mode
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -49,7 +49,6 @@ boolean sftp = false;
boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -67,9 +66,6 @@ if ("true".equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
%>
int nb_file_<%=cid%> = 0;
@@ -554,11 +550,6 @@ if (sftp) { // *** sftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%
@@ -691,11 +682,6 @@ if (sftp) { // *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");

View File

@@ -294,11 +294,6 @@ COMPATIBILITY="ALL"
NUM_ROW="100" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -307,8 +302,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -68,5 +68,4 @@ PRINT_MESSAGE.NAME=Print message
PERL5_REGEX.NAME=Use Perl5 Regex Expressions as Filemask (Unchecked means Glob Expressions)
MOVE_TO_THE_CURRENT_DIRECTORY.NAME=Move to the current directory
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -46,7 +46,6 @@ boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -63,11 +62,8 @@ if (("true").equals(useExistingConn)) {
}
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
}
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
@@ -264,11 +260,6 @@ int nb_file_<%=cid%> = 0;
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%
@@ -376,11 +367,6 @@ int nb_file_<%=cid%> = 0;
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");

View File

@@ -339,11 +339,6 @@ COMPATIBILITY="ALL"
NUM_ROW="100" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -351,8 +346,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -73,5 +73,4 @@ FTPSOVERWRITE.ITEM.NEVER=never
FTPSOVERWRITE.ITEM.ALWAYS=always
FTPSOVERWRITE.NAME=Overwrite file
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -42,7 +42,6 @@ boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
@@ -58,9 +57,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -210,11 +206,6 @@ if (sftp) { // *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Connect to '" + <%=host %> + "' has succeeded.");
@@ -334,11 +325,6 @@ if (sftp) { // *** sftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -257,11 +257,6 @@ COMPATIBILITY="ALL"
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -269,8 +264,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -55,5 +55,4 @@ CONNECT_MODE.ITEM.PASSIVE=Passive
IGNORE_FAILURE_AT_QUIT.NAME=Ignore Failure At Quit
MOVE_TO_THE_CURRENT_DIRECTORY.NAME=Move to the current directory
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -41,7 +41,6 @@ boolean sftp = false;
boolean ftps = false;
String protectionLevel = ElementParameterParser.getValue(node, "__FTPS_PROT__");
String protectionBufferSize = ElementParameterParser.getValue(node, "__FTPS_PROTECTION_BUFF_SIZE__");
String timeoutValue = ElementParameterParser.getValue(node, "__CONNECTION_TIMEOUT__");
boolean useRemoteVerification = ("true").equals(ElementParameterParser.getValue(node, "__REMOTE_VERIFICATION__"));
if (("true").equals(useExistingConn)) {
@@ -56,9 +55,6 @@ if (("true").equals(useExistingConn)) {
} else {
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
%>
int connectionTimeout_<%=cid %> = Integer.valueOf(<%=timeoutValue %>);
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -207,11 +203,6 @@ if (sftp) {// *** sftp *** //
log.info("<%=cid%> -FTPS security Mode is <%=securityMode%>.");
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" + <%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setDefaultTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect(<%=host %>,<%=ftpsPort %>);
<%
if(isLog4jEnabled){
@@ -321,11 +312,6 @@ if (sftp) {// *** sftp *** //
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Attempt to connect to '" + <%=host %> + "' with username '" +<%=user %>+ "'.");
<%}%>
if (connectionTimeout_<%=cid %> > 0) {
ftp_<%=cid %>.setTimeout(connectionTimeout_<%=cid %>);
}
ftp_<%=cid %>.connect();
<%

View File

@@ -245,11 +245,6 @@ COMPATIBILITY="ALL"
NUM_ROW="95" SHOW_IF="(FTPS=='true') AND (USE_EXISTING_CONNECTION == 'false')" REPOSITORY_VALUE="REMOTE_VERIFICATION">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT"
NUM_ROW="96" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" REPOSITORY_VALUE="CONNECTION_TIMEOUT">
<DEFAULT>0</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -258,8 +253,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190726" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190726.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -52,5 +52,4 @@ IGNORE_FAILURE_AT_QUIT.NAME=Ignore Failure At Quit
PERL5_REGEX.NAME=Use Perl5 Regex Expressions as Filemask (Unchecked means Glob Expressions)
MOVE_TO_THE_CURRENT_DIRECTORY.NAME=Move to the current directory
USE_ENCODING.NAME=Filename encoding
CONNECTION_TIMEOUT.NAME=Connection timeout
USE_ENCODING.NAME=Filename encoding

View File

@@ -9,11 +9,11 @@
%>
<%@ include file="../templates/Log4j/Log4jFileUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String cid = node.getUniqueName();
String directory = ElementParameterParser.getValue(node, "__SOURCE__");
String zipFile = ElementParameterParser.getValue(node, "__TARGET__");
@@ -24,16 +24,16 @@
boolean overwrite = ("true").equals(ElementParameterParser.getValue(node, "__OVERWRITE__"));
String encoding = ElementParameterParser.getValue(node,"__ENCODING__");
boolean isEncrypted = ("true").equals(ElementParameterParser.getValue(node, "__ENCRYPT_FILES__"));
List<Map<String, String>> masks = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__MASK__");
List<Map<String, String>> masks = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__MASK__");
String zip64Mode = ElementParameterParser.getValue(node, "__ZIP64_MODE__");
String encryptMethod = ElementParameterParser.getValue(node, "__ENCRYPT_METHOD__");
String aesKeyStrength = ElementParameterParser.getValue(node, "__AES_KEY_STRENGTH__");
String archiveFormat = ElementParameterParser.getValue(node, "__ARCHIVE_FORMAT__");
String sourceFile = ElementParameterParser.getValue(node, "__SOURCE_FILE__");
boolean isSyncFlush = "true".equals(ElementParameterParser.getValue(node, "__USE_SYNC_FLUSH__"));
log4jFileUtil.componentStartInfo(node);
@@ -47,11 +47,6 @@
<%
}
%>
if (java.nio.file.Files.notExists(java.nio.file.Paths.get(sourceFile_<%=cid %>), java.nio.file.LinkOption.NOFOLLOW_LINKS)){
throw new java.io.FileNotFoundException(sourceFile_<%=cid %> + " (The system cannot find the path specified)");
}
String zipFile_<%=cid %> = <%=zipFile %>;
com.talend.compress.zip.Zip zip_<%=cid%> = new com.talend.compress.zip.Zip(sourceFile_<%=cid %>, zipFile_<%=cid %>);

View File

@@ -253,9 +253,6 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
client_<%=cid %>.getState().setProxyCredentials(
new org.apache.commons.httpclient.auth.AuthScope(<%=proxyHost %>, Integer.parseInt(<%=proxyPort%>), null),
new org.apache.commons.httpclient.UsernamePasswordCredentials(<%=proxyUser %>, decryptedPassword_<%=cid%>));
java.util.List<String> authPrefs_<%=cid %> = java.util.Collections.singletonList(org.apache.commons.httpclient.auth.AuthPolicy.BASIC);
client_<%=cid %>.getParams().setParameter(org.apache.commons.httpclient.auth.AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs_<%=cid %>);
<%}
}

View File

@@ -55,17 +55,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
String mode = ElementParameterParser.getValue(node,"__GENERATION_MODE__");
final boolean eventMode = "EVENT_MODE".equals(mode);
if (version07) {
String passwordFieldName = "__PASSWORD__";
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
String password_<%=cid%> = decryptedPassword_<%=cid%>;
if (password_<%=cid%>.isEmpty()){
password_<%=cid%> = null;
}
<%
}
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
int dynamic_index = -1;
@@ -703,9 +692,9 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
org.apache.poi.xssf.usermodel.XSSFWorkbook workbook_<%=cid%> = null;
if(source_<%=cid %> instanceof String){
workbook_<%=cid%> = (org.apache.poi.xssf.usermodel.XSSFWorkbook) org.apache.poi.ss.usermodel.WorkbookFactory.create(new java.io.File((String)source_<%=cid %>), password_<%=cid%>);
workbook_<%=cid%> = new org.apache.poi.xssf.usermodel.XSSFWorkbook((String)source_<%=cid %>);
} else if(source_<%=cid %> instanceof java.io.InputStream) {
workbook_<%=cid%> = (org.apache.poi.xssf.usermodel.XSSFWorkbook) org.apache.poi.ss.usermodel.WorkbookFactory.create((java.io.InputStream)source_<%=cid %>, password_<%=cid%>);
workbook_<%=cid%> = new org.apache.poi.xssf.usermodel.XSSFWorkbook((java.io.InputStream)source_<%=cid %>);
} else{
workbook_<%=cid%> = null;
throw new java.lang.Exception("The data source should be specified as Inputstream or File Path!");
@@ -1277,9 +1266,9 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
char decimalChar_<%=cid %> = df_<%=cid %>.getDecimalFormatSymbols().getDecimalSeparator();
if(source_<%=cid %> instanceof String){
excelReader_<%=cid%>.parse((String)source_<%=cid %>,<%=encoding %>, password_<%=cid%>);
excelReader_<%=cid%>.parse((String)source_<%=cid %>,<%=encoding %>);
} else if(source_<%=cid %> instanceof java.io.InputStream) {
excelReader_<%=cid%>.parse((java.io.InputStream)source_<%=cid %>,<%=encoding %>, password_<%=cid%>);
excelReader_<%=cid%>.parse((java.io.InputStream)source_<%=cid %>,<%=encoding %>);
}
<%
if(hasDynamic){

View File

@@ -39,10 +39,6 @@
<DEFAULT>"__COMP_DEFAULT_FILE_DIR__/in.xls"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PASSWORD" FIELD="PASSWORD" REQUIRED="false" SHOW_IF="(VERSION_2007 == 'true')" NUM_ROW="25">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="ALL_SHEETS" FIELD="CHECK" REQUIRED="true" NUM_ROW="30" REPOSITORY_VALUE="SELECT_ALL_SHEETS">
<DEFAULT>false</DEFAULT>
</PARAMETER>
@@ -186,7 +182,7 @@
<IMPORT NAME="poi-ooxml-schemas" MODULE="poi-ooxml-schemas-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi-ooxml-schemas/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-ooxml-schemas-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="poi-scratchpad" MODULE="poi-scratchpad-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi-scratchpad/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-scratchpad-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-3.1.0.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.1.0" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="simpleexcel" MODULE="simpleexcel-2.2-20190722.jar" MVN="mvn:org.talend.libraries/simpleexcel-2.2-20190722/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/simpleexcel-2.2-20190722.jar" REQUIRED_IF="(VERSION_2007 == 'true') AND GENERATION_MODE == 'EVENT_MODE')" />
<IMPORT NAME="simpleexcel" MODULE="simpleexcel-2.1-20190507.jar" MVN="mvn:org.talend.libraries/simpleexcel-2.1-20190507/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/simpleexcel-2.1-20190507.jar" REQUIRED_IF="(VERSION_2007 == 'true') AND GENERATION_MODE == 'EVENT_MODE')" />
<IMPORT NAME="commons-collections4" MODULE="commons-collections4-4.1.jar" MVN="mvn:org.talend.libraries/commons-collections4-4.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/commons-collections4-4.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.18.jar" MVN="mvn:org.apache.commons/commons-compress/1.18" REQUIRED_IF="(VERSION_2007 == 'true')" />

View File

@@ -8,7 +8,6 @@ DIE_ON_ERROR.NAME=Die on error
ENCODING.NAME=Encoding
END_OF_FILE.NAME=End Of File
FILENAME.NAME=File Name/Input Stream
PASSWORD.NAME=Password
FIRST_COLUMN.NAME=First column
FOOTER.NAME=Footer
HEADER.NAME=Header
@@ -30,7 +29,7 @@ STOPREAD_ON_EMPTYROW.NAME=Stop to read on empty row
SUPPRESS_WARN.NAME=Ignore the warning
THOUSANDS_SEPARATOR.NAME=Thousands separator
WITH_FORMAT.NAME=With format
VERSION_2007.NAME=Read excel2007 file format (xlsx / xlsm)
VERSION_2007.NAME=Read excel2007 file format(xlsx)
TRIMALL.NAME=Trim all column
TRIMSELECT.ITEM.TRIM=Trim
TRIMSELECT.NAME=Check column to trim

View File

@@ -66,26 +66,25 @@
}
}
DecodeString_<%=cid%> decode_<%=cid%> = new DecodeString_<%=cid%>();
try{
fileInput<%=cid%> = new java.io.FileInputStream(<%=filename %>);
javax.mail.Session session_<%=cid %> = javax.mail.Session.getInstance(System.getProperties(), null);
javax.mail.internet.MimeMessage msg_<%=cid %> = new javax.mail.internet.MimeMessage(session_<%=cid %>, fileInput<%=cid%>);
javax.mail.internet.MimeMessage msg_<%=cid %> = new javax.mail.internet.MimeMessage(session_<%=cid %>, fileInput<%=cid%>);
java.util.List<String> list_<%=cid %> = new java.util.ArrayList<String>();
for (int i_<%=cid %> = 0; i_<%=cid %> < mailParts_<%=cid %>.length; i_<%=cid %>++) {
String part_<%=cid %> = mailParts_<%=cid %>[i_<%=cid %>];
String sep_<%=cid%>= mailSeparator_<%=cid %>[i_<%=cid %>];
if(part_<%=cid %>.equalsIgnoreCase("body")) {
for (int i_<%=cid %> =0;i_<%=cid %> < mailParts_<%=cid %>.length;i_<%=cid %>++) {
String part_<%=cid %> = mailParts_<%=cid %>[i_<%=cid %>];
String sep_<%=cid%>= mailSeparator_<%=cid %>[i_<%=cid %>];
if(part_<%=cid %>.equalsIgnoreCase("body")) {
if(msg_<%=cid %>.isMimeType("multipart/*")) {
javax.mail.Multipart mp<%=cid%> = (javax.mail.Multipart) msg_<%=cid %>.getContent();
for (int i = 0; i < mp<%=cid%>.getCount(); i++) {
javax.mail.BodyPart mpart<%=cid%> = mp<%=cid%>.getBodyPart(i);
String disposition<%=cid%> = mpart<%=cid%>.getDisposition();
if (!((disposition<%=cid%> != null) && ((disposition<%=cid%>
.equals(javax.mail.Part.ATTACHMENT)) || (disposition<%=cid%>.equals(javax.mail.Part.INLINE))))) {
// the following extract the body part(text/plain + text/html)
try{
for (int i = 0; i < mp<%=cid%>.getCount(); i++) {
javax.mail.BodyPart mpart<%=cid%> = mp<%=cid%>.getBodyPart(i);
String disposition<%=cid%> = mpart<%=cid%>.getDisposition();
if (!((disposition<%=cid%> != null) && ((disposition<%=cid%>
.equals(javax.mail.Part.ATTACHMENT)) || (disposition<%=cid%>.equals(javax.mail.Part.INLINE))))) {
// the following extract the body part(text/plain + text/html)
try{
Object content_<%=cid %> = mpart<%=cid %>.getContent();
if (content_<%=cid %> instanceof javax.mail.internet.MimeMultipart) {
javax.mail.internet.MimeMultipart mimeMultipart_<%=cid %> = (javax.mail.internet.MimeMultipart) content_<%=cid %>;
@@ -125,104 +124,105 @@
<%}%>
}
<%
//both attachment and message context in the email,bug TDI-19065
//both attachment and message context in the email,bug TDI-19065
%>
}else if(disposition<%=cid%> != null && disposition<%=cid%>.equals(javax.mail.Part.INLINE)){
list_<%=cid %>.add(mpart<%=cid%>.getContent().toString());
}
}
}
} else {
java.io.InputStream in_<%=cid %> = msg_<%=cid %>.getInputStream();
byte[] buffer_<%=cid %> = new byte[1024];
int length_<%=cid %> = 0;
java.io.ByteArrayOutputStream baos_<%=cid %> = new java.io.ByteArrayOutputStream();
while ((length_<%=cid %> = in_<%=cid %>.read(buffer_<%=cid %>, 0, 1024)) != -1) {
baos_<%=cid %>.write(buffer_<%=cid %>, 0, length_<%=cid %>);
}
String contentType_<%=cid%> = msg_<%=cid%>.getContentType();
String charsetName_<%=cid%> = "";
if(contentType_<%=cid%>!=null && contentType_<%=cid%>.trim().length()>0){
javax.mail.internet.ContentType cy_<%=cid%> = new javax.mail.internet.ContentType(contentType_<%=cid%>);
charsetName_<%=cid%> = cy_<%=cid%>.getParameter("charset");
}
if(charsetName_<%=cid%>!=null && charsetName_<%=cid%>.length()>0){
list_<%=cid %>.add(baos_<%=cid %>.toString(charsetName_<%=cid%>));
}else{
list_<%=cid %>.add(baos_<%=cid %>.toString());
}
in_<%=cid %>.close();
baos_<%=cid %>.close();
byte[] buffer_<%=cid %> = new byte[1024];
int length_<%=cid %> = 0;
java.io.ByteArrayOutputStream baos_<%=cid %> = new java.io.ByteArrayOutputStream();
while ((length_<%=cid %> = in_<%=cid %>.read(buffer_<%=cid %>, 0, 1024)) != -1) {
baos_<%=cid %>.write(buffer_<%=cid %>, 0, length_<%=cid %>);
}
String contentType_<%=cid%> = msg_<%=cid%>.getContentType();
String charsetName_<%=cid%> = "";
if(contentType_<%=cid%>!=null && contentType_<%=cid%>.trim().length()>0){
javax.mail.internet.ContentType cy_<%=cid%> = new javax.mail.internet.ContentType(contentType_<%=cid%>);
charsetName_<%=cid%> = cy_<%=cid%>.getParameter("charset");
}
if(charsetName_<%=cid%>!=null && charsetName_<%=cid%>.length()>0){
list_<%=cid %>.add(baos_<%=cid %>.toString(charsetName_<%=cid%>));
}else{
list_<%=cid %>.add(baos_<%=cid %>.toString());
}
in_<%=cid %>.close();
baos_<%=cid %>.close();
}
}else if(part_<%=cid %>.equalsIgnoreCase("header")){
java.util.Enumeration em = msg_<%=cid %>.getAllHeaderLines();
int em_count=0;
String tempStr_<%=cid %>="";
}else if(part_<%=cid %>.equalsIgnoreCase("header")){
java.util.Enumeration em = msg_<%=cid %>.getAllHeaderLines();
int em_count=0;
String tempStr_<%=cid %>="";
while (em.hasMoreElements()) {
tempStr_<%=cid %> = tempStr_<%=cid %> + (String) em.nextElement() + sep_<%=cid%> ;
}
list_<%=cid%>.add(decode_<%=cid%>.decode(tempStr_<%=cid%>));
} else {
if(("true").equals(mailChecked_<%=cid %>[i_<%=cid%>])){
}else{
if(("true").equals(mailChecked_<%=cid %>[i_<%=cid%>])){
String[] sa_<%=cid%> = msg_<%=cid %>.getHeader(part_<%=cid%>);
String tempStr_<%=cid%>="";
for(int i=0;i<sa_<%=cid%>.length;i++){
tempStr_<%=cid%>=tempStr_<%=cid%>+sa_<%=cid%>[i] + sep_<%=cid%>;
}
list_<%=cid%>.add(decode_<%=cid%>.decode(tempStr_<%=cid%>));
}else{
String content_<%=cid %> = msg_<%=cid %>.getHeader(part_<%=cid %>, null);
list_<%=cid %>.add(decode_<%=cid%>.decode(content_<%=cid %>));
}
}
}else{
String content_<%=cid %> = msg_<%=cid %>.getHeader(part_<%=cid %>, null);
list_<%=cid %>.add(decode_<%=cid%>.decode(content_<%=cid %>));
}
}
}
//attachment Deal
if(msg_<%=cid %>.isMimeType("multipart/*")){
javax.mail.Multipart mp<%=cid%> = (javax.mail.Multipart) msg_<%=cid %>.getContent();
String attachfileName<%=cid%> = "";
String path<%=cid%> = "";
java.io.BufferedOutputStream out<%=cid%> = null;
java.io.BufferedInputStream in<%=cid%> = null;
for (int i = 0; i < mp<%=cid%>.getCount(); i++) {
javax.mail.BodyPart mpart<%=cid%> = mp<%=cid%>.getBodyPart(i);
String disposition<%=cid%> = mpart<%=cid%>.getDisposition();
<%
// fixed bug TDI-8586,to deal with attachments download
%>
if (mpart<%=cid%>.getFileName()!=null
&& ((disposition<%=cid%> != null && (disposition<%=cid%>.equals(javax.mail.Part.ATTACHMENT) || disposition<%=cid%>.equals(javax.mail.Part.INLINE)))
|| disposition<%=cid%>==null)) { <%// TDI-29179 %>
attachfileName<%=cid%> = mpart<%=cid%>.getFileName();
attachfileName<%=cid%> = javax.mail.internet.MimeUtility.decodeText(attachfileName<%=cid%>);
if(!(<%=directory%>).endsWith("/")){
path<%=cid%> = <%=directory%> + "/";
}else{
path<%=cid%> =<%=directory%>;
}
path<%=cid%> = path<%=cid%> + attachfileName<%=cid%>;
<% if(isLog4jEnabled){ %>
log.info("<%= cid %> - Extracted attachment: '"+attachfileName<%=cid%>+"'.");
<% } %>
java.io.File attachFile = new java.io.File(path<%=cid%>);
out<%=cid%> = new java.io.BufferedOutputStream(new java.io.FileOutputStream(attachFile));
in<%=cid%> = new java.io.BufferedInputStream(mpart<%=cid%>.getInputStream());
int buffer<%=cid%> = 0;
while ((buffer<%=cid%> = in<%=cid%>.read()) != -1) {
out<%=cid%>.write(buffer<%=cid%>);
out<%=cid%>.flush();
}
out<%=cid%>.close();
in<%=cid%>.close();
}
}
}
//attachment Deal
class MessagePartProcessor {
void saveAttachment(javax.mail.Part mpart) throws IOException, javax.mail.MessagingException {
if (mpart.getFileName() != null && (
mpart.getDisposition() == null ||
(mpart.getDisposition().equals(javax.mail.Part.ATTACHMENT) || mpart.getDisposition().equals(javax.mail.Part.INLINE))
)) {
String attachFileName = javax.mail.internet.MimeUtility.decodeText(mpart.getFileName());
String path = <%=directory%>;
if(!path.endsWith("/")){
path = path + "/";
}
path = path + attachFileName;
<% if(isLog4jEnabled){ %>
log.info("<%= cid %> - Extracted attachment: '" + attachFileName + "'.");
<% } %>
java.io.File attachFile = new java.io.File(path);
java.io.BufferedOutputStream out = new java.io.BufferedOutputStream(new java.io.FileOutputStream(attachFile));
java.io.BufferedInputStream in = new java.io.BufferedInputStream(mpart.getInputStream());
int buffer = 0;
while ((buffer = in.read()) != -1) {
out.write(buffer);
out.flush();
}
out.close();
in.close();
}
}
// recursively process body parts
void processPart(javax.mail.Part part) throws javax.mail.MessagingException, IOException {
if (part.isMimeType("multipart/*")) {
javax.mail.Multipart multipartContent = (javax.mail.Multipart) part.getContent();
for (int i = 0; i < multipartContent.getCount(); i++) {
javax.mail.Part mpart = multipartContent.getBodyPart(i);
saveAttachment(mpart);
processPart(mpart);
}
}
}
}
new MessagePartProcessor().processPart(msg_<%=cid %>);
// for output
<%
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
@@ -282,10 +282,10 @@
for (int i=1;i<conns.size();i++) {
IConnection conn2 = conns.get(i);
if ((conn2.getName().compareTo(firstConnName)!=0)&&(conn2.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA))) {
for (IMetadataColumn column: metadata.getListColumns()) {%>
<%=conn2.getName() %>.<%=column.getLabel() %> = <%=firstConnName %>.<%=column.getLabel() %>;
<%
}
for (IMetadataColumn column: metadata.getListColumns()) {%>
<%=conn2.getName() %>.<%=column.getLabel() %> = <%=firstConnName %>.<%=column.getLabel() %>;
<%
}
}
}
}

View File

@@ -37,17 +37,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
}else{
globalMap.put("<%=cid %>_EXPORTED_FILE_PATH",<%=directory%>);
}
// create output directory if not exists
String path = <%=directory%>;
if(!path.endsWith("/")){
path = path + "/";
}
java.io.File outputDir = new java.io.File(path);
if (!outputDir.exists()) {
outputDir.mkdirs();
}
boolean hasData_<%=cid%> = false;
<%
if("MIME".equals(mailType)) {

View File

@@ -69,16 +69,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
if (metadata!=null) {
List<IMetadataColumn> columns = metadata.getListColumns();
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean protectFile = ("true").equals(ElementParameterParser.getValue(node, "__PROTECT_FILE__")) ? true : false;
if (protectFile) {
String passwordFieldName = "__PASSWORD__";
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
String password_<%=cid%> = decryptedPassword_<%=cid%>;
<%
}
boolean hasDynamic = false;
int dynamic_index = 0;
String datePattern = "\"dd-MM-yyyy\"";
@@ -426,13 +416,13 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
<%
}
}
%>
%>
writableSheet_<%=cid %> = writeableWorkbook_<%=cid %>.getSheet(<%=sheetname %>);
if(writableSheet_<%=cid %> == null){
writableSheet_<%=cid %> = writeableWorkbook_<%=cid %>.createSheet(<%=sheetname %>, writeableWorkbook_<%=cid %>.getNumberOfSheets());
}
<%if(!useStream && isAppendFile && !isAppendSheet){%>
else {
@@ -489,7 +479,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
}else{
%>
if(true){
throw new RuntimeException("Date pattern must be set for column <%=column.getLabel() %> in the schema of component <%=cid %>! ");
throw new RuntimeException("Date pattern must be set for column <%=column.getLabel() %> in the schema of component <%=cid %>!");
}
<% }
}
@@ -770,9 +760,6 @@ if(!hasDynamic && isIncludeHeader){
%>
int nb_line_<%=cid%> = 0;
org.talend.ExcelTool xlsxTool_<%=cid%> = new org.talend.ExcelTool();
<% if (protectFile) { %>
xlsxTool_<%=cid%>.setPasswordProtection(password_<%=cid%>);
<%}%>
<%
if(flushOnRow && (useStream || !isAppendFile)){
%>
@@ -793,15 +780,7 @@ if(!hasDynamic && isIncludeHeader){
java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object> chm_<%=cid%> = (java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>) globalMap.get("concurrentHashMap");
java.lang.Object lockObj_<%=cid%> = chm_<%=cid%>.computeIfAbsent("EXCEL_OUTPUT_LOCK_OBJ_<%=cid%>", k -> new Object());
synchronized (lockObj_<%=cid%>) {
<%
String rowFileName = filename.replaceAll("\"", "");
String fileExtension = rowFileName.substring(rowFileName.lastIndexOf(".") + 1);
if (fileExtension.equalsIgnoreCase("xlsm")){
%>
xlsxTool_<%=cid%>.prepareXlsmFile(fileName_<%=cid%>);
<%} else {%>
xlsxTool_<%=cid%>.prepareXlsxFile(fileName_<%=cid%>);
<%}%>
xlsxTool_<%=cid%>.prepareXlsxFile(fileName_<%=cid%>);
}
<%}else{%>
xlsxTool_<%=cid%>.prepareStream();

View File

@@ -149,14 +149,7 @@
</ITEMS>
</PARAMETER>
<PARAMETER NAME="PROTECT_FILE" FIELD="CHECK" REQUIRED="false" SHOW_IF="(VERSION_2007 == 'true') AND (USESTREAM=='false')" NUM_ROW="72">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PASSWORD" FIELD="PASSWORD" REQUIRED="true" SHOW_IF="isShow[PROTECT_FILE] AND (PROTECT_FILE == 'true')" NUM_ROW="72">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER
<PARAMETER
NAME="SCHEMA"
FIELD="SCHEMA_TYPE"
REQUIRED="true"
@@ -227,7 +220,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel-1.5-20190731.jar" MVN="mvn:org.talend.libraries/talendExcel-1.5-20190731/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel-1.5-20190731.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel-1.4-20190531.jar" MVN="mvn:org.talend.libraries/talendExcel-1.4-20190531/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel-1.4-20190531.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.8.1.jar" MVN="mvn:org.apache.commons/commons-lang3/3.8.1" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:dom4j/dom4j/1.6.1" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />

View File

@@ -74,8 +74,6 @@ IS_ALL_AUTO_SZIE.NAME=Define all columns auto size
KEEP_LEADING_ZEROS.NAME=Keep leading zeros
LONG_NAME=Writes the cells row by row in a Microsoft Excel file
NB_LINE.NAME=Number of line
PROTECT_FILE.NAME=Protect file
PASSWORD.NAME=Password
SCHEMA.NAME=Schema
SHEETNAME.NAME=Sheet name
THOUSANDS_SEPARATOR.NAME=Thousands separator
@@ -86,8 +84,8 @@ FIRST_CELL_Y_ABSOLUTE.NAME=Is absolute Y pos.
KEEP_CELL_FORMATING.NAME=Keep existing cell format
USESTREAM.NAME=Use Output Stream
STREAMNAME.NAME=Output Stream
VERSION_2007.NAME=Write excel2007 file format (xlsx / xlsm)
VERSION_2007.NAME=Write excel2007 file format(xlsx)
FLUSHONROW.NAME=Custom the flush buffer size
FLUSHONROW_NUM.NAME=Row number
RECALCULATE_FORMULA.NAME=Recalculate formula
RECALCULATE_FORMULA.NAME=Recalculate formula

View File

@@ -185,14 +185,14 @@ imports="
%>
for (org.jets3t.service.model.GSObject objectSummary_<%=cid%> : objects_<%=cid%>) {
String objkey_<%=cid%> = objectSummary_<%=cid%>.getKey();
java.io.File file_<%=cid%> = new java.io.File(<%=outputsDir%>, objkey_<%=cid%>);
java.io.File file_<%=cid%> = new java.io.File(<%=outputsDir%>+objkey_<%=cid%>);
org.jets3t.service.model.GSObject obj_<%=cid%> = service_<%=cid%>.getObject(currentBucketName_<%=cid%>, objkey_<%=cid%>);
<%
}else{
%>
for (java.util.Map<String, String> map_<%=cid %>: list_<%=cid%>) {
String currentBucketName_<%=cid%>=map_<%=cid %>.get("BUCKET_NAME");
java.io.File file_<%=cid%> = new java.io.File(<%=outputsDir%>, map_<%=cid %>.get("OBJECT_NEWNAME"));
java.io.File file_<%=cid%> = new java.io.File(<%=outputsDir%>+map_<%=cid %>.get("OBJECT_NEWNAME"));
org.jets3t.service.model.GSObject obj_<%=cid%> =null;
try {
obj_<%=cid%> = service_<%=cid%>.getObject(currentBucketName_<%=cid%>, map_<%=cid %>.get("OBJECT_KEY"));
@@ -275,4 +275,4 @@ imports="
obj_<%=cid%>.closeDataInputStream();
<%
}
%>
%>

View File

@@ -52,6 +52,6 @@ SCHEMA.NAME=Schema
NOTE.NAME=Note
CONNECTION.NAME=Component List
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -72,7 +72,7 @@
SHOW="false"
REPOSITORY_VALUE="TYPE"
>
<DEFAULT>PostgresPlus</DEFAULT>
<DEFAULT>PostgreSQL</DEFAULT>
</PARAMETER>
<PARAMETER

View File

@@ -17,5 +17,5 @@ AUTO_COMMIT.NAME = Auto Commit
TYPE.NAME=Database Driver
PROPERTY.NAME=Property Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later

View File

@@ -89,7 +89,7 @@
SHOW="false"
REPOSITORY_VALUE="TYPE"
>
<DEFAULT>PostgresPlus</DEFAULT>
<DEFAULT>PostgreSQL</DEFAULT>
</PARAMETER>
<PARAMETER

View File

@@ -39,6 +39,6 @@ GUESS_SCHEMA.NAME=Guess Schema
CONNECTION.NAME=Component List
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -115,7 +115,7 @@
SHOW="false"
REPOSITORY_VALUE="TYPE"
>
<DEFAULT>PostgresPlus</DEFAULT>
<DEFAULT>PostgreSQL</DEFAULT>
</PARAMETER>
<PARAMETER

View File

@@ -25,7 +25,7 @@ PORT.NAME=Port
TABLE.NAME=Table
FIELD_OPTIONS.NAME=Field options
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
SQL_SYNTAX.NAME=Sql Syntax
ADD_COLS.NAME=Additional columns

View File

@@ -50,5 +50,5 @@ STANDARD_CONFORMING_STRING.NAME=Use standard_conforming_string ON
PROPERTY_DB.NAME=Property Type
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later

View File

@@ -61,6 +61,6 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Time=Time
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Null=Null
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=Parameter Value
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -71,6 +71,6 @@ DIE_ON_ERROR.NAME=Die on error
REJECT.LINK=Rejects
REJECT.MENU=Rejects
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -84,6 +84,6 @@ PROPERTY_DB.NAME=Property Type
CONNECTION.NAME=Component List
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -57,7 +57,7 @@ SCHEMA.NAME=Schema
NOTE.NAME=Note
CONNECTION.NAME=Component List
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
LOCAL_FILE.NAME=Use local file for copy (for DB server 8.2 or newer)
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -17,7 +17,7 @@ AUTO_COMMIT.NAME = Auto Commit
TYPE.NAME=Database Driver
PROPERTY.NAME=Property Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias

View File

@@ -39,7 +39,7 @@ GUESS_SCHEMA.NAME=Guess Schema
CONNECTION.NAME=Component List
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias

View File

@@ -91,7 +91,7 @@ BATCH_SIZE.NAME= Batch Size
SAVE_POINT.NAME= Use save point
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
NB_LINE_REJECTED.NAME=Number Of Rejected Lines

View File

@@ -51,7 +51,7 @@ STANDARD_CONFORMING_STRING.NAME=Use standard_conforming_string ON
PROPERTY_DB.NAME=Property Type
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
LOCAL_FILE.NAME=Use local file for copy (for DB server 8.2 or newer)
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -61,7 +61,7 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Time=Time
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Null=Null
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=Parameter Value
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias

View File

@@ -71,6 +71,6 @@ DIE_ON_ERROR.NAME=Die on error
REJECT.LINK=Rejects
REJECT.MENU=Rejects
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -84,6 +84,6 @@ PROPERTY_DB.NAME=Property Type
CONNECTION.NAME=Component List
MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.PRIOR_TO_V9=v7.2 to v8.X
DB_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_VERSION.ITEM.V9_X=v9 and later
PROPERTIES.NAME=Additional JDBC Parameters

View File

@@ -134,12 +134,12 @@
<!-- S3 -->
<PARAMETER NAME="ACCESS_KEY" FIELD="TEXT" NUM_ROW="50"
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
REQUIRED="true" GROUP="S3_CONFIG" NOT_SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="SECRET_KEY" FIELD="PASSWORD" NUM_ROW="50"
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
REQUIRED="true" GROUP="S3_CONFIG" NOT_SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -419,7 +419,7 @@
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
MVN="mvn:commons-codec/commons-codec/1.6"
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
REQUIRED="true" />
</IMPORTS>

View File

@@ -207,7 +207,6 @@
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO')" />
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO')" />
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -288,7 +288,6 @@
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -378,7 +378,6 @@
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -538,7 +538,7 @@
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
REQUIRED="true" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
MVN="mvn:commons-codec/commons-codec/1.6"
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
REQUIRED="true" />
</IMPORTS>

View File

@@ -306,7 +306,6 @@
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -7,7 +7,6 @@
<FAMILIES>
<FAMILY>Databases/DB Specifics/Amazon/Redshift</FAMILY>
<FAMILY>Cloud/Amazon/Redshift</FAMILY>
</FAMILIES>
<DOCUMENTATION>
@@ -282,7 +281,6 @@
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>
<RETURNS />

View File

@@ -425,7 +425,7 @@ String inputConnName = null;
%>
<%=childJob %> childJob_<%=cid %> = new <%=childJob %>();
<%
if (ProcessorUtilities.isEsbJob(currentProcess)) {
if (ProcessorUtilities.isEsbJob(process, version)) {
%>
childJob_<%=cid %>.setEndpointRegistry(registry);
<%
@@ -555,92 +555,66 @@ String inputConnName = null;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// use independent process to run subjob
%>
class ConsoleHelper_<%=cid %> {
private Thread getNormalThread(Process process) {
return new Thread() {
public void run() {
try {
java.io.BufferedReader reader = new java.io.BufferedReader(
new java.io.InputStreamReader(
process.getInputStream()));
String line = "";
try {
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
} finally {
reader.close();
}
} catch (java.io.IOException ioe) {
<%if(isLog4jEnabled){%>
log.error("<%=cid %> - " + ioe.getMessage());
<%}%>
ioe.printStackTrace();
}
}
};
}
private Thread getErrorThread(Process process, StringBuffer sb) {
return new Thread() {
public void run() {
try {
java.io.BufferedReader reader = new java.io.BufferedReader(
new java.io.InputStreamReader(
process.getErrorStream()));
String line = "";
try {
while ((line = reader.readLine()) != null) {
sb.append(line)
.append("\n");
}
} finally {
reader.close();
}
} catch (java.io.IOException ioe) {
<%if(isLog4jEnabled){%>
log.error("<%=cid %> - " + ioe.getMessage());
<%}%>
ioe.printStackTrace();
}
}
};
}
}
ConsoleHelper_<%=cid %> consoleHelper_<%=cid %> = new ConsoleHelper_<%=cid %>();
Runtime runtime_<%=cid %> = Runtime.getRuntime();
Process ps_<%=cid %> = null;
final Process ps_<%=cid %>;
ps_<%=cid %> = runtime_<%=cid %>.exec((String[])paraList_<%=cid %>.toArray(new String[paraList_<%=cid %>.size()]));
//0 indicates normal termination
int result_<%=cid %>;
StringBuffer errorMsg_<%=cid %> = new StringBuffer();
try {
ps_<%=cid %> = runtime_<%=cid %>.exec((String[])paraList_<%=cid %>.toArray(new String[paraList_<%=cid %>.size()]));
Thread normal_<%=cid %> = new Thread() {
public void run() {
try {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(ps_<%=cid %>.getInputStream()));
String line = "";
try {
while((line = reader.readLine()) != null) {
System.out.println(line);
}
} finally {
reader.close();
}
} catch(java.io.IOException ioe) {
<%if(isLog4jEnabled){%>
log.error("<%=cid %> - " + ioe.getMessage());
<%}%>
ioe.printStackTrace();
}
}
};
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - The child job '<%if(!useDynamicJob){%><%=childJob %><%}else{%>"+<%=dynamicJobName%>+"<%}%>' starts on the version '<%=version%>' with the context '<%=context%>'.");
<%}%>
normal_<%=cid %>.start();
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - The child job '<%if(!useDynamicJob){%><%=childJob %><%}else{%>"+<%=dynamicJobName%>+"<%}%>' is done.");
<%}%>
Thread normal_<%=cid %> = consoleHelper_<%=cid %>.getNormalThread(ps_<%=cid %>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - The child job '<%if(!useDynamicJob){%><%=childJob %><%}else{%>"+<%=dynamicJobName%>+"<%}%>' starts on the version '<%=version%>' with the context '<%=context%>'.");
<%}%>
normal_<%=cid %>.start();
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - The child job '<%if(!useDynamicJob){%><%=childJob %><%}else{%>"+<%=dynamicJobName%>+"<%}%>' is done.");
<%}%>
Thread error_<%=cid %> = consoleHelper_<%=cid %>.getErrorThread(ps_<%=cid %>, errorMsg_<%=cid %>);
error_<%=cid %>.start();
result_<%=cid %> = ps_<%=cid %>.waitFor();
normal_<%=cid %>.join(10000);
error_<%=cid %>.join(10000);
} catch (ThreadDeath tde) {
<%if(isLog4jEnabled){%>
log.error("<%=cid %> - thread was terminated.");
<%}%>
ps_<%=cid %>.destroy();
throw tde;
}
final StringBuffer errorMsg_<%=cid %> = new StringBuffer();
Thread error_<%=cid %> = new Thread() {
public void run() {
try {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(ps_<%=cid %>.getErrorStream()));
String line = "";
try {
while((line = reader.readLine()) != null) {
errorMsg_<%=cid %>.append(line).append("\n");
}
} finally {
reader.close();
}
} catch(java.io.IOException ioe) {
<%if(isLog4jEnabled){%>
log.error("<%=cid %> - " + ioe.getMessage());
<%}%>
ioe.printStackTrace();
}
}
};
error_<%=cid %>.start();
//0 indicates normal termination
int result_<%=cid %> = ps_<%=cid %>.waitFor();
normal_<%=cid %>.join(10000);
error_<%=cid %>.join(10000);
globalMap.put("<%=cid %>_CHILD_RETURN_CODE",result_<%=cid %>);
if(result_<%=cid %> != 0){
globalMap.put("<%=cid %>_CHILD_EXCEPTION_STACKTRACE",errorMsg_<%=cid %>.toString());

View File

@@ -128,26 +128,18 @@
>
<ITEMS DEFAULT="DEFAULT">
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
</ITEMS>
</PARAMETER>

View File

@@ -11,23 +11,14 @@ REGION.ITEM.GovCloud=AWS GovCloud (US)
REGION.ITEM.US_EAST_1=US Standard
REGION.ITEM.US_WEST_1=US West (N. California)
REGION.ITEM.US_WEST_2=US West (Oregon)
REGION.ITEM.US_EAST_2=US East (Ohio)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
REGION.ITEM.EU_WEST_1=EU (Ireland)
REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
REGION.ITEM.EU_WEST_2=EU (London)
REGION.ITEM.EU_WEST_3=EU (Paris)
REGION.ITEM.EU_NORTH_1=EU (Stockholm)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
CLIENT_CONFIGURATION.NAME=
CONFIG_CLIENT.NAME=Config client
CONNECTION_CONFIG.NAME=Connection
@@ -46,7 +37,7 @@ CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.PROXYWORKSTATION=Proxy Workstati
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETTIMEOUT=Socket Timeout
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.USERAGENT=User Agent
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETRECEIVEBUFFERSIZEHINT=Socket Receive Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SIGNEROVERRIDE=Explicitly Specify Signature
CLIENT_CONFIGURATION.ITEM.VALUE=Value
DIE_ON_ERROR.NAME=Die on error

View File

@@ -129,26 +129,18 @@
>
<ITEMS DEFAULT="DEFAULT">
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
</ITEMS>
</PARAMETER>

View File

@@ -23,7 +23,7 @@ CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.PROXYWORKSTATION=Proxy Workstati
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETTIMEOUT=Socket Timeout
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.USERAGENT=User Agent
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETRECEIVEBUFFERSIZEHINT=Socket Receive Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SIGNEROVERRIDE=Explicitly Specify Signature
CLIENT_CONFIGURATION.ITEM.VALUE=Value
DIE_ON_ERROR.NAME=Die on error
@@ -33,22 +33,14 @@ REGION.ITEM.GovCloud=AWS GovCloud (US)
REGION.ITEM.US_EAST_1=US Standard
REGION.ITEM.US_WEST_1=US West (N. California)
REGION.ITEM.US_WEST_2=US West (Oregon)
REGION.ITEM.US_EAST_2=US East (Ohio)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
REGION.ITEM.EU_WEST_1=EU (Ireland)
REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
REGION.ITEM.EU_WEST_2=EU (London)
REGION.ITEM.EU_WEST_3=EU (Paris)
REGION.ITEM.EU_NORTH_1=EU (Stockholm)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role

View File

@@ -129,26 +129,18 @@
>
<ITEMS DEFAULT="DEFAULT">
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
</ITEMS>
</PARAMETER>

View File

@@ -11,23 +11,14 @@ REGION.ITEM.GovCloud=AWS GovCloud (US)
REGION.ITEM.US_EAST_1=US Standard
REGION.ITEM.US_WEST_1=US West (N. California)
REGION.ITEM.US_WEST_2=US West (Oregon)
REGION.ITEM.US_EAST_2=US East (Ohio)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
REGION.ITEM.EU_WEST_1=EU (Ireland)
REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
REGION.ITEM.EU_WEST_2=EU (London)
REGION.ITEM.EU_WEST_3=EU (Paris)
REGION.ITEM.EU_NORTH_1=EU (Stockholm)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
CLIENT_CONFIGURATION.NAME=
CONFIG_CLIENT.NAME=Config client
CONNECTION_CONFIG.NAME=Connection
@@ -46,7 +37,7 @@ CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.PROXYWORKSTATION=Proxy Workstati
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETTIMEOUT=Socket Timeout
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.USERAGENT=User Agent
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETRECEIVEBUFFERSIZEHINT=Socket Receive Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SIGNEROVERRIDE=Explicitly Specify Signature
CLIENT_CONFIGURATION.ITEM.VALUE=Value
DIE_ON_ERROR.NAME=Die on error

View File

@@ -129,26 +129,18 @@
>
<ITEMS DEFAULT="DEFAULT">
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="GovCloud" VALUE="&quot;us-gov-west-1&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
</ITEMS>
</PARAMETER>

View File

@@ -24,7 +24,7 @@ CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.PROXYWORKSTATION=Proxy Workstati
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETTIMEOUT=Socket Timeout
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.USERAGENT=User Agent
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETRECEIVEBUFFERSIZEHINT=Socket Receive Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SOCKETSENDBUFFERSIZEHINT=Socket Send Buffersize Hint
CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SIGNEROVERRIDE=Explicitly Specify Signature
CLIENT_CONFIGURATION.ITEM.VALUE=Value
REGION.NAME=Region
@@ -33,22 +33,14 @@ REGION.ITEM.GovCloud=AWS GovCloud (US)
REGION.ITEM.US_EAST_1=US Standard
REGION.ITEM.US_WEST_1=US West (N. California)
REGION.ITEM.US_WEST_2=US West (Oregon)
REGION.ITEM.US_EAST_2=US East (Ohio)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
REGION.ITEM.EU_WEST_1=EU (Ireland)
REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
REGION.ITEM.EU_WEST_2=EU (London)
REGION.ITEM.EU_WEST_3=EU (Paris)
REGION.ITEM.EU_NORTH_1=EU (Stockholm)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
REGION.ITEM.CN_NORTH_1=China (Beijing)
REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role

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