Compare commits
64 Commits
bugfix/rel
...
vdrokov_fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae6c3cf5a7 | ||
|
|
ac5cc1ee1d | ||
|
|
70a75cf790 | ||
|
|
db870ecc30 | ||
|
|
78f9b554eb | ||
|
|
7146bdf26c | ||
|
|
4655c0a059 | ||
|
|
49658a28d3 | ||
|
|
cda46bb231 | ||
|
|
9df3a48b78 | ||
|
|
9cce21a3bd | ||
|
|
174ea89be9 | ||
|
|
b4f2124a60 | ||
|
|
5ac16bb7cc | ||
|
|
bc445f065c | ||
|
|
891e6a9d5e | ||
|
|
c6e4e79411 | ||
|
|
47ffb3d242 | ||
|
|
ae30bc1fb3 | ||
|
|
6b7fce2f78 | ||
|
|
6049577e03 | ||
|
|
186fcafb29 | ||
|
|
7f3d3b7a59 | ||
|
|
9a11a94043 | ||
|
|
a47de9821f | ||
|
|
f6114ef000 | ||
|
|
9d93ff1652 | ||
|
|
51a97c8b24 | ||
|
|
29ec16e725 | ||
|
|
6e5e7d1e0a | ||
|
|
5dda69da6a | ||
|
|
e534bed3e0 | ||
|
|
56bc8ee766 | ||
|
|
71413a41dc | ||
|
|
6240c4331e | ||
|
|
92fac62ac0 | ||
|
|
8bdca657d4 | ||
|
|
ea33bcd37e | ||
|
|
61b2b21833 | ||
|
|
399ae80700 | ||
|
|
10fd426856 | ||
|
|
c113df2c41 | ||
|
|
4eb679c6e9 | ||
|
|
1cf44a07ec | ||
|
|
0bdf41d228 | ||
|
|
c64fec7601 | ||
|
|
8ab6492011 | ||
|
|
780ce47ad7 | ||
|
|
9d04099b86 | ||
|
|
e3775bacfe | ||
|
|
0e1a65b82f | ||
|
|
75c51b6dec | ||
|
|
f809f597b4 | ||
|
|
97bad0d5ca | ||
|
|
a74a54214e | ||
|
|
bbc2e81686 | ||
|
|
6bf37640b9 | ||
|
|
b5d8c8d0f3 | ||
|
|
95afb4904e | ||
|
|
322a55e751 | ||
|
|
028578141e | ||
|
|
d7c09e2d71 | ||
|
|
24ae727858 | ||
|
|
1e39f1e09c |
@@ -6,7 +6,7 @@
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<requires>
|
||||
<import feature="org.eclipse.test" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.talend.commons.runtime" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.talend.commons.ui" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.talend.core" version="0.0.0" match="greaterOrEqual"/>
|
||||
|
||||
@@ -120,7 +120,8 @@ if(hasInput){
|
||||
dm_<%=cid%>.getLogicalType(),
|
||||
dm_<%=cid%>.getFormat(),
|
||||
dm_<%=cid%>.getDescription(),
|
||||
dm_<%=cid%>.isNullable());
|
||||
dm_<%=cid%>.isNullable(),
|
||||
dm_<%=cid%>.isKey());
|
||||
}
|
||||
incomingEnforcer_<%=cid%>.createRuntimeSchema();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<path id="compile.classpath">
|
||||
<pathelement location="${couchdb.lib.home}/lightcouch-0.0.6.jar" />
|
||||
<pathelement location="${couchdb.lib.home}/gson-2.2.4.jar" />
|
||||
<pathelement location="${apache.lib.home}/commons-codec-1.6.jar" />
|
||||
<pathelement location="${apache.lib.home}/commons-codec-1.15.jar" />
|
||||
<pathelement location="${apache.lib.home}/commons-logging-1.1.jar" />
|
||||
<pathelement location="${http.lib.home}/httpclient-4.2.5.jar" />
|
||||
<pathelement location="${http.lib.home}/httpcore-4.2.4.jar" />
|
||||
|
||||
@@ -7,21 +7,21 @@
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>talend-codegen-utils</artifactId>
|
||||
<!-- release for revert version of library -->
|
||||
<version>0.28.0</version>
|
||||
<version>0.30.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<avro.version>1.8.0</avro.version>
|
||||
<components.version>0.25.0-SNAPSHOT</components.version>
|
||||
<daikon.version>0.26.0-SNAPSHOT</daikon.version>
|
||||
<components.version>0.30.0</components.version>
|
||||
<daikon.version>0.31.11</daikon.version>
|
||||
<hamcrest.version>1.3</hamcrest.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<java-formatter.plugin.version>0.1.0</java-formatter.plugin.version>
|
||||
<formatter.plugin.version>1.6.0-SNAPSHOT</formatter.plugin.version>
|
||||
<mockito.version>2.2.15</mockito.version>
|
||||
<jacoco.plugin.version>0.7.8</jacoco.plugin.version>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
</properties>
|
||||
|
||||
@@ -24,8 +24,10 @@ import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.avro.Schema;
|
||||
@@ -33,9 +35,11 @@ import org.apache.avro.Schema.Field;
|
||||
import org.apache.avro.SchemaBuilder;
|
||||
import org.apache.avro.generic.GenericData;
|
||||
import org.apache.avro.generic.IndexedRecord;
|
||||
import org.apache.avro.SchemaParseException;
|
||||
import org.talend.codegen.DiSchemaConstants;
|
||||
import org.talend.daikon.avro.AvroUtils;
|
||||
import org.talend.daikon.avro.LogicalTypeUtils;
|
||||
import org.talend.daikon.avro.NameUtil;
|
||||
import org.talend.daikon.avro.SchemaConstants;
|
||||
|
||||
/**
|
||||
@@ -133,6 +137,7 @@ public class IncomingSchemaEnforcer {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO remove this method as no place use it now in javajet
|
||||
/**
|
||||
* Take all of the parameters from the dynamic metadata and adapt it to a field for the runtime Schema.
|
||||
*
|
||||
@@ -144,6 +149,62 @@ public class IncomingSchemaEnforcer {
|
||||
addDynamicField(name, type, null, format, description, isNullable);
|
||||
}
|
||||
|
||||
private Set<String> existNames;
|
||||
|
||||
private Map<String, String> unvalidName2ValidName;
|
||||
|
||||
private int index = 0;
|
||||
|
||||
/**
|
||||
* Recreates dynamic field from parameters retrieved from DI dynamic metadata
|
||||
*
|
||||
* @param name dynamic field name
|
||||
* @param diType di column type
|
||||
* @param logicalType dynamic field logical type; could be null
|
||||
* @param fieldPattern dynamic field date format
|
||||
* @param description dynamic field description
|
||||
* @param isNullable defines whether dynamic field may contain <code>null</code> value
|
||||
* @param isKey defines whether dynamic field is key field
|
||||
*/
|
||||
public void addDynamicField(String name, String diType, String logicalType, String fieldPattern, String description,
|
||||
boolean isNullable, boolean isKey) {
|
||||
if (!needsInitDynamicColumns())
|
||||
return;
|
||||
Schema fieldSchema = diToAvro(diType, logicalType);
|
||||
|
||||
if (isNullable) {
|
||||
fieldSchema = SchemaBuilder.nullable().type(fieldSchema);
|
||||
}
|
||||
|
||||
Schema.Field field;
|
||||
try {
|
||||
field = new Schema.Field(name, fieldSchema, description, (Object) null);
|
||||
} catch (SchemaParseException e) {
|
||||
//if the name contains special char which can't pass avro name check like $ and #,
|
||||
//but uniode like Japanese which can pass too though that is not expected
|
||||
if (existNames == null) {
|
||||
existNames = new HashSet<>();
|
||||
unvalidName2ValidName = new HashMap<>();
|
||||
}
|
||||
|
||||
String validName = NameUtil.correct(name, index++, existNames);
|
||||
existNames.add(validName);
|
||||
unvalidName2ValidName.put(name, validName);
|
||||
|
||||
field = new Schema.Field(validName, fieldSchema, description, (Object) null);
|
||||
field.addProp(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME, name);
|
||||
}
|
||||
|
||||
// Set pattern for date type
|
||||
if ("id_Date".equals(diType) && fieldPattern != null) {
|
||||
field.addProp(SchemaConstants.TALEND_COLUMN_PATTERN, fieldPattern);
|
||||
}
|
||||
if (isKey) {
|
||||
field.addProp(SchemaConstants.TALEND_COLUMN_IS_KEY, "true");
|
||||
}
|
||||
dynamicFields.add(field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recreates dynamic field from parameters retrieved from DI dynamic metadata
|
||||
*
|
||||
@@ -154,21 +215,10 @@ public class IncomingSchemaEnforcer {
|
||||
* @param description dynamic field description
|
||||
* @param isNullable defines whether dynamic field may contain <code>null</code> value
|
||||
*/
|
||||
@Deprecated
|
||||
public void addDynamicField(String name, String diType, String logicalType, String fieldPattern, String description,
|
||||
boolean isNullable) {
|
||||
if (!needsInitDynamicColumns())
|
||||
return;
|
||||
Schema fieldSchema = diToAvro(diType, logicalType);
|
||||
|
||||
if (isNullable) {
|
||||
fieldSchema = SchemaBuilder.nullable().type(fieldSchema);
|
||||
}
|
||||
Schema.Field field = new Schema.Field(name, fieldSchema, description, (Object) null);
|
||||
// Set pattern for date type
|
||||
if ("id_Date".equals(diType) && fieldPattern != null) {
|
||||
field.addProp(SchemaConstants.TALEND_COLUMN_PATTERN, fieldPattern);
|
||||
}
|
||||
dynamicFields.add(field);
|
||||
addDynamicField(name, diType, logicalType, fieldPattern, description, isNullable, false);
|
||||
}
|
||||
|
||||
public void addIncomingNodeField(String name, String className) {
|
||||
@@ -369,6 +419,9 @@ public class IncomingSchemaEnforcer {
|
||||
return designSchema;
|
||||
}
|
||||
|
||||
//here we do special process for dynamic input name, but in fact,
|
||||
//we have issue which support Japanese char or special char as label for basic talend column too,
|
||||
//so not only dynamic columns may have special name, but also basic may have, but here, we don't consider that, that's TODO
|
||||
/**
|
||||
* Converts DI data value to Avro format and put it into record by field name
|
||||
*
|
||||
@@ -376,9 +429,16 @@ public class IncomingSchemaEnforcer {
|
||||
* @param diValue data value
|
||||
*/
|
||||
public void put(String name, Object diValue) {
|
||||
if (unvalidName2ValidName != null) {
|
||||
String validName = unvalidName2ValidName.get(name);
|
||||
if (validName != null) {
|
||||
name = validName;
|
||||
}
|
||||
}
|
||||
put(columnToFieldIndex.get(name), diValue);
|
||||
}
|
||||
|
||||
//TODO make it private, no place to call it except current class?
|
||||
/**
|
||||
* Converts DI data value to Avro format and put it into record by field index
|
||||
*
|
||||
|
||||
@@ -52,6 +52,8 @@ public class IncomingSchemaEnforcerTest {
|
||||
*/
|
||||
private IndexedRecord componentRecord;
|
||||
|
||||
private IndexedRecord componentRecordWithSpecialName;
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
@@ -72,9 +74,29 @@ public class IncomingSchemaEnforcerTest {
|
||||
componentRecord.put(3, true);
|
||||
componentRecord.put(4, "Main Street");
|
||||
componentRecord.put(5, "This is a record with six columns.");
|
||||
|
||||
Schema componentSchemaWithSpecialName = SchemaBuilder.builder().record("Record").fields() //
|
||||
.name("id").type().intType().noDefault() //
|
||||
.name("name").type().stringType().noDefault() //
|
||||
.name("age").type().intType().noDefault() //
|
||||
.name("性别").type().booleanType().noDefault() //why this don't store the origin name, as it can pass the avro name check, it's a avro bug
|
||||
.name("address_").prop(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME, "address#").type().stringType().noDefault() //
|
||||
.name("comment_").prop(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME, "comment$").type().stringType().noDefault() //
|
||||
.endRecord();
|
||||
componentRecordWithSpecialName = new GenericData.Record(componentSchemaWithSpecialName);
|
||||
componentRecordWithSpecialName.put(0, 1);
|
||||
componentRecordWithSpecialName.put(1, "User");
|
||||
componentRecordWithSpecialName.put(2, 100);
|
||||
componentRecordWithSpecialName.put(3, true);
|
||||
componentRecordWithSpecialName.put(4, "Main Street");
|
||||
componentRecordWithSpecialName.put(5, "This is a record with six columns.");
|
||||
}
|
||||
|
||||
private void checkEnforcerWithComponentRecordData(IncomingSchemaEnforcer enforcer) {
|
||||
checkEnforcerWithComponentRecordData(enforcer, false);
|
||||
}
|
||||
|
||||
private void checkEnforcerWithComponentRecordData(IncomingSchemaEnforcer enforcer, boolean specialName) {
|
||||
// The enforcer must be ready to receive values.
|
||||
assertThat(enforcer.needsInitDynamicColumns(), is(false));
|
||||
|
||||
@@ -88,15 +110,25 @@ public class IncomingSchemaEnforcerTest {
|
||||
IndexedRecord adapted = enforcer.createIndexedRecord();
|
||||
|
||||
// Ensure that the result is the same as the expected component record.
|
||||
assertThat(adapted, is(componentRecord));
|
||||
if (specialName) {
|
||||
assertThat(adapted, is(componentRecordWithSpecialName));
|
||||
} else {
|
||||
assertThat(adapted, is(componentRecord));
|
||||
}
|
||||
|
||||
// Ensure that we create a new instance when we give it another value.
|
||||
enforcer.put("id", 2);
|
||||
enforcer.put("name", "User2");
|
||||
enforcer.put("age", 200);
|
||||
enforcer.put("valid", false);
|
||||
enforcer.put("address", "2 Main Street");
|
||||
enforcer.put("comment", "2 This is a record with six columns.");
|
||||
if (specialName) {
|
||||
enforcer.put("性别", false);
|
||||
enforcer.put("address#", "2 Main Street");
|
||||
enforcer.put("comment$", "2 This is a record with six columns.");
|
||||
} else {
|
||||
enforcer.put("valid", false);
|
||||
enforcer.put("address", "2 Main Street");
|
||||
enforcer.put("comment", "2 This is a record with six columns.");
|
||||
}
|
||||
IndexedRecord adapted2 = enforcer.createIndexedRecord();
|
||||
|
||||
// It should have the same schema, but not be the same instance.
|
||||
@@ -392,6 +424,39 @@ public class IncomingSchemaEnforcerTest {
|
||||
checkEnforcerWithComponentRecordData(enforcer);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDynamicColumnWithSpecialName() {
|
||||
Schema designSchema = SchemaBuilder.builder().record("Record") //
|
||||
.prop(DiSchemaConstants.TALEND6_DYNAMIC_COLUMN_POSITION, "3") //
|
||||
.prop(SchemaConstants.INCLUDE_ALL_FIELDS, "true") //
|
||||
.fields() //
|
||||
.name("id").type().intType().noDefault() //
|
||||
.name("name").type().stringType().noDefault() //
|
||||
.name("age").type().intType().noDefault() //
|
||||
.endRecord();
|
||||
|
||||
IncomingSchemaEnforcer enforcer = new IncomingSchemaEnforcer(designSchema);
|
||||
|
||||
// The enforcer isn't usable yet.
|
||||
assertThat(enforcer.getDesignSchema(), is(designSchema));
|
||||
assertFalse(enforcer.areDynamicFieldsInitialized());
|
||||
assertThat(enforcer.getRuntimeSchema(), nullValue());
|
||||
|
||||
enforcer.addDynamicField("性别", "id_Boolean", null, null, null, false, false);
|
||||
enforcer.addDynamicField("address#", "id_String", null, null, null, false, false);
|
||||
enforcer.addDynamicField("comment$", "id_String", null, null, null, false, false);
|
||||
assertFalse(enforcer.areDynamicFieldsInitialized());
|
||||
enforcer.createRuntimeSchema();
|
||||
assertTrue(enforcer.areDynamicFieldsInitialized());
|
||||
|
||||
// Check the run-time schema was created.
|
||||
assertThat(enforcer.getDesignSchema(), is(designSchema));
|
||||
assertThat(enforcer.getRuntimeSchema(), not(nullValue()));
|
||||
|
||||
// Put values into the enforcer and get them as an IndexedRecord.
|
||||
checkEnforcerWithComponentRecordData(enforcer, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeConversion_toDate() {
|
||||
// The expected schema after enforcement.
|
||||
@@ -699,6 +764,28 @@ public class IncomingSchemaEnforcerTest {
|
||||
assertThat(record.get(1), is((Object) new Date(1234567891011L)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks key field setting
|
||||
*/
|
||||
@Test
|
||||
public void testAddDynamicFieldKey() {
|
||||
Schema expectedRuntimeSchema = SchemaBuilder.builder().record("Record").fields().name("id")
|
||||
.prop(SchemaConstants.TALEND_COLUMN_IS_KEY, "true").type().intType().noDefault().endRecord();
|
||||
|
||||
Schema designSchema = SchemaBuilder.builder().record("Record").prop(SchemaConstants.INCLUDE_ALL_FIELDS, "true")
|
||||
.prop(DiSchemaConstants.TALEND6_DYNAMIC_COLUMN_POSITION, "0").fields().endRecord();
|
||||
|
||||
IncomingSchemaEnforcer enforcer = new IncomingSchemaEnforcer(designSchema);
|
||||
|
||||
enforcer.addDynamicField("id", "id_Integer", null, null, null, false, true);
|
||||
|
||||
enforcer.createRuntimeSchema();
|
||||
assertTrue(enforcer.areDynamicFieldsInitialized());
|
||||
|
||||
Schema actualRuntimeSchema = enforcer.getRuntimeSchema();
|
||||
assertEquals(expectedRuntimeSchema, actualRuntimeSchema);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks {@link IncomingSchemaEnforcer#put()} converts string value to date according pattern specified in dynamic field
|
||||
* TODO (iv.gonchar): this is incorrect behavior, because avro record should not contain java.util.Date value. It should store
|
||||
|
||||
@@ -86,39 +86,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
@@ -132,7 +100,7 @@ int tmp_batchUpdateCount_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
|
||||
@@ -58,39 +58,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
@@ -100,7 +69,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
|
||||
@@ -120,39 +120,10 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateOnDuplicateKey.javajet"%>
|
||||
|
||||
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
@@ -163,7 +134,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
|
||||
@@ -144,39 +144,8 @@ for(Column column : stmtStructure) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
@@ -188,6 +157,7 @@ int tmp_batchUpdateCount_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -94,6 +94,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
String dbschema_<%=cid%> = null;
|
||||
String tableName_<%=cid%> = null;
|
||||
@@ -137,38 +138,10 @@ String identityKey = ElementParameterParser.getValue(node, "__IDENTITY_FIELD__")
|
||||
getManager(dbmsId, cid, node).setIsSpecifyIdentityKey(isSpecifyIdentityKey);
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if (("INSERT_IF_NOT_EXIST").equals(dataAction)){
|
||||
if (("INSERT_IF_NOT_EXIST").equals(dataAction)){
|
||||
int insertKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
|
||||
@@ -166,12 +166,12 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
|
||||
<IMPORT NAME="xstream-1.4.15.jar" MODULE="xstream-1.4.15.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.15" REQUIRED_IF="(DB_VERSION=='BONITA_523') OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
<IMPORT NAME="xstream-1.4.16.jar" MODULE="xstream-1.4.16.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.16" REQUIRED_IF="(DB_VERSION=='BONITA_523') OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
|
||||
<!-- Bonita 5.2.3 -->
|
||||
<IMPORT NAME="bonita_client_523" MODULE="bonita-client-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="bonita_server_523" MODULE="bonita-server-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-server-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="atlr_276" MODULE="antlr-2.7.6.jar" MVN="mvn:org.talend.libraries/antlr-2.7.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/antlr-2.7.6.jar" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="atlr_276" MODULE="antlr-2.7.6.jar" MVN="mvn:org.talend.libraries/antlr-2.7.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/antlr-2.7.6.jar" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="asm_153" MODULE="asm-1.5.3.jar" MVN="mvn:org.talend.libraries/asm-1.5.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.asm/lib/asm-1.5.3.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="asm_31" MODULE="asm-3.1.jar" MVN="mvn:org.talend.libraries/asm-3.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.asm/lib/asm-3.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="asm_attrs_153" MODULE="asm-attrs-1.5.3.jar" MVN="mvn:org.talend.libraries/asm-attrs-1.5.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.asm/lib/asm-attrs-1.5.3.jar" REQUIRED="false" />
|
||||
@@ -186,7 +186,7 @@
|
||||
<IMPORT NAME="h2_12132" MODULE="h2-1.2.132.jar" MVN="mvn:com.h2database/h2/1.2.132" REQUIRED="false" />
|
||||
<IMPORT NAME="hibernate_326_ga" MODULE="hibernate-3.2.6.ga.jar" MVN="mvn:org.talend.libraries/hibernate-3.2.6.ga/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-3.2.6.ga.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="jline_0994" MODULE="jline-0.9.94.jar" MVN="mvn:org.talend.libraries/jline-0.9.94/6.0.0" REQUIRED="false" />
|
||||
<IMPORT NAME="jta_11" MODULE="jta-1.1.jar" MVN="mvn:javax.transaction/jta/1.1" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="jta_11" MODULE="jta-1.1.jar" MVN="mvn:javax.transaction/jta/1.1" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="novabpmidentity_10" MODULE="novaBpmIdentity-1.0.jar" MVN="mvn:org.talend.libraries/novaBpmIdentity-1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.novabpm/lib/novaBpmIdentity-1.0.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="novabpmperf_10" MODULE="novaBpmPerf-1.0.jar" MVN="mvn:org.talend.libraries/novaBpmPerf-1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.novabpm/lib/novaBpmPerf-1.0.jar" REQUIRED="false" />
|
||||
|
||||
@@ -197,22 +197,22 @@
|
||||
<IMPORT NAME="bonita_client_53" MODULE="bonita-client-5.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_531'" />
|
||||
<IMPORT NAME="bonita_server_53" MODULE="bonita-server-5.3.jar" MVN="mvn:org.talend.libraries/bonita-server-5.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_531'" />
|
||||
<IMPORT NAME="hibernate_core_356" MODULE="hibernate-core-3.5.6-Final.jar" MVN="mvn:org.talend.libraries/hibernate-core-3.5.6-Final/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-core-3.5.6-Final.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="commons_collections_31" MODULE="commons-collections-3.2.2.jar" MVN="mvn:commons-collections/commons-collections/3.2.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-3.2.2.jar" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="commons_collections_31" MODULE="commons-collections-3.2.2.jar" MVN="mvn:commons-collections/commons-collections/3.2.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-3.2.2.jar" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="ehcache_core_220" MODULE="ehcache-core-2.2.0.jar" MVN="mvn:org.talend.libraries/ehcache-core-2.2.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.ehcache/lib/ehcache-core-2.2.0.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="hibernate_commons_annotations_320_Final" MODULE="hibernate-commons-annotations-3.2.0.Final.jar" MVN="mvn:org.talend.libraries/hibernate-commons-annotations-3.2.0.Final/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-commons-annotations-3.2.0.Final.jar" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="hibernate_commons_annotations_320_Final" MODULE="hibernate-commons-annotations-3.2.0.Final.jar" MVN="mvn:org.talend.libraries/hibernate-commons-annotations-3.2.0.Final/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-commons-annotations-3.2.0.Final.jar" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="hibernate_search_321_Final" MODULE="hibernate-search-3.2.1.Final.jar" MVN="mvn:org.talend.libraries/hibernate-search-3.2.1.Final/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-search-3.2.1.Final.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="javassist_380_GA" MODULE="javassist-3.8.0.GA.jar" MVN="mvn:org.talend.libraries/javassist-3.8.0.GA/6.0.0" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="lucene_core_293" MODULE="lucene-core-2.9.3.jar" MVN="mvn:org.talend.libraries/lucene-core-2.9.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.lucene/lib/lucene-core-2.9.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="slf4j_api_161" MODULE="slf4j-api-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.6.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_logging_111" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="commons_logging_111" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
|
||||
<!-- Bonita 5.6.1 -->
|
||||
<IMPORT NAME="bonita_server_561" MODULE="bonita-server-5.6.1.jar" MVN="mvn:org.talend.libraries/bonita-server-5.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.6.1.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="chemistry_opencmis_client_api_020_incubating" MODULE="chemistry-opencmis-client-api-0.2.0-incubating.jar" MVN="mvn:org.talend.libraries/chemistry-opencmis-client-api-0.2.0-incubating/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.chemistry/lib/chemistry-opencmis-client-api-0.2.0-incubating.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="chemistry_opencmis_commons_api_020_incubating" MODULE="chemistry-opencmis-commons-api-0.2.0-incubating.jar" MVN="mvn:org.talend.libraries/chemistry-opencmis-commons-api-0.2.0-incubating/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.chemistry/lib/chemistry-opencmis-commons-api-0.2.0-incubating.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="h2_12139" MODULE="h2-1.2.139.jar" MVN="mvn:com.h2database/h2/1.2.139" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="slf4j_api_161" MODULE="slf4j-api-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.6.1.jar" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="slf4j_jdk14_161" MODULE="slf4j-jdk14-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-jdk14-1.6.1/6.0.0" REQUIRED_IF="DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101'" />
|
||||
<IMPORT NAME="h2_12139" MODULE="h2-1.2.139.jar" MVN="mvn:com.h2database/h2/1.2.139" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="slf4j_api_161" MODULE="slf4j-api-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.6.1.jar" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="slf4j_jdk14_1712" MODULE="slf4j-jdk14-1.7.12.jar" MVN="mvn:org.talend.libraries/slf4j-jdk14-1.7.12/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_561') OR (DB_VERSION=='BONITA_5101')" />
|
||||
|
||||
<!-- Bonita 5.10.1 -->
|
||||
<IMPORT NAME="bonita_server_5101" MODULE="bonita-server-5.10.1.jar" MVN="mvn:org.talend.libraries/bonita-server-5.10.1/6.0.0" REQUIRED_IF="DB_VERSION=='BONITA_5101'" />
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
|
||||
<IMPORT NAME="xstream-1.4.15.jar" MODULE="xstream-1.4.15.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.15" REQUIRED_IF="((DB_VERSION!='BONITA_652') AND (DB_VERSION!='BONITA_724')) OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
<IMPORT NAME="xstream-1.4.16.jar" MODULE="xstream-1.4.16.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.16" REQUIRED_IF="((DB_VERSION!='BONITA_652') AND (DB_VERSION!='BONITA_724')) OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
<!-- Bonita 5.2.3 -->
|
||||
<IMPORT NAME="bonita_client_523" MODULE="bonita-client-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="bonita_server_523" MODULE="bonita-server-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-server-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
@@ -260,7 +260,7 @@
|
||||
<IMPORT NAME="chemistry_opencmis_commons_api_020_incubating" MODULE="chemistry-opencmis-commons-api-0.2.0-incubating.jar" MVN="mvn:org.talend.libraries/chemistry-opencmis-commons-api-0.2.0-incubating/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.chemistry/lib/chemistry-opencmis-commons-api-0.2.0-incubating.jar" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561')" />
|
||||
<IMPORT NAME="h2_12139" MODULE="h2-1.2.139.jar" MVN="mvn:com.h2database/h2/1.2.139" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="slf4j_api_161" MODULE="slf4j-api-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.6.1.jar" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="slf4j_jdk14_161" MODULE="slf4j-jdk14-1.6.1.jar" MVN="mvn:org.talend.libraries/slf4j-jdk14-1.6.1/6.0.0" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="slf4j_jdk14_1712" MODULE="slf4j-jdk14-1.7.12.jar" MVN="mvn:org.talend.libraries/slf4j-jdk14-1.7.12/6.0.0" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561' OR DB_VERSION=='BONITA_5101')" />
|
||||
<!-- Bonita 5.10.1 -->
|
||||
<IMPORT NAME="bonita_server_510" MODULE="bonita-server-5.10.1.jar" MVN="mvn:org.talend.libraries/bonita-server-5.10.1/6.0.0" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_5101')" />
|
||||
<IMPORT NAME="hibernate_search_330_Final" MODULE="hibernate-search-3.3.0.Final.jar" MVN="mvn:org.talend.libraries/hibernate-search-3.3.0.Final/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.hibernate/lib/hibernate-search-3.3.0.Final.jar" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_5101')" />
|
||||
|
||||
@@ -66,6 +66,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%> = 0;
|
||||
int updatedCount_<%=cid%> = 0;
|
||||
int insertedCount_<%=cid%> = 0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%> = 0;
|
||||
<%
|
||||
getManager(dbmsId, cid, node);
|
||||
@@ -115,39 +116,7 @@ if(stmtStructure!=null) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -111,39 +111,9 @@ if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
} else {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "." + <%=table%>;
|
||||
}
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
@@ -153,6 +123,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -84,15 +84,13 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
public String getPassword() { return null; }
|
||||
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
@@ -103,15 +101,19 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASS__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo();
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -138,7 +139,7 @@
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD'))"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -148,7 +149,7 @@
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="6"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD'))"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -31,6 +31,7 @@ PRIVATEKEY.NAME=Private key
|
||||
PASSPHRASE.NAME=Key Passphrase
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
|
||||
FTPS.NAME=FTPS Support
|
||||
|
||||
@@ -109,23 +109,27 @@ int nb_file_<%=cid%> = 0;
|
||||
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid %>();
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -137,7 +138,7 @@
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -147,7 +148,7 @@
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -19,6 +19,7 @@ CONNECTION.NAME=Component list
|
||||
DIE_ON_ERROR.NAME=Die on error
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
PRIVATEKEY.NAME=Private key
|
||||
PASSPHRASE.NAME=Key Passphrase
|
||||
|
||||
@@ -110,26 +110,29 @@ if (sftp) { // *** sftp *** //
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
public String getPassword() { return null; }
|
||||
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid%>();
|
||||
|
||||
@@ -123,6 +123,7 @@ COMPATIBILITY="ALL"
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -130,7 +131,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -140,7 +141,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -46,6 +46,7 @@ FILENAME.NAME=File Name
|
||||
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
PRIVATEKEY.NAME=Private key
|
||||
PASSPHRASE.NAME=Key Passphrase
|
||||
|
||||
@@ -127,26 +127,29 @@ if (sftp) {// *** sftp *** //
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
public String getPassword() { return null; }
|
||||
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid%>();
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -115,7 +116,7 @@
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -125,7 +126,7 @@
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -15,6 +15,7 @@ CONNECTION.NAME=Component list
|
||||
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
KEYSTORE_FILE.NAME=Keystore File
|
||||
KEYSTORE_PASS.NAME=Keystore Password
|
||||
SECURITY_MODE.NAME=Security Mode
|
||||
|
||||
@@ -133,24 +133,27 @@ if (sftp) { // *** sftp *** //
|
||||
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid%>();
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<DEFAULT>"suomynona"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SFTP" FIELD="CHECK" NUM_ROW="80" REPOSITORY_VALUE="SFTP" SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
|
||||
<PARAMETER NAME="SFTP" FIELD="CHECK" NUM_ROW="80" REPOSITORY_VALUE="SFTP" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (FTPS == 'false')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -112,7 +113,7 @@
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="21"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -122,7 +123,7 @@
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -12,6 +12,7 @@ CONNECTION.NAME=Component list
|
||||
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
PRIVATEKEY.NAME=Private key
|
||||
PASSPHRASE.NAME=Key Passphrase
|
||||
|
||||
@@ -124,27 +124,29 @@ if (sftp) { // *** sftp *** //
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
public String getPassword() { return null; }
|
||||
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ COMPATIBILITY="ALL"
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -105,7 +106,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="31"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -115,7 +116,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="41"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
APPEND.NAME=Append
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
CURRENT_STATUS.NAME=Current Status
|
||||
FILES.ITEM.FILEMASK=Filemask
|
||||
|
||||
@@ -130,24 +130,27 @@ int nb_file_<%=cid%> = 0;
|
||||
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid %>();
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ COMPATIBILITY="ALL"
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -138,7 +139,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -148,7 +149,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="6"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#Mon Apr 16 16:48:27 CST 2007
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
FILES.ITEM.FILEMASK=Filemask
|
||||
FILES.ITEM.NEWNAME=New name
|
||||
|
||||
@@ -111,23 +111,26 @@ if (sftp) { // *** sftp *** //
|
||||
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
boolean[] echo) {
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid%>();
|
||||
|
||||
@@ -96,6 +96,7 @@ COMPATIBILITY="ALL"
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -104,7 +105,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -114,7 +115,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#Sat Jan 10 17:57:27 CST 2009
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
CURRENT_STATUS.NAME=Current Status
|
||||
FILES.ITEM.FILEMASK=Filename
|
||||
|
||||
@@ -110,23 +110,26 @@ if (sftp) {// *** sftp *** //
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
public boolean promptPassphrase(String arg0) { return true; }
|
||||
public boolean promptYesNo(String arg0) { return true; }
|
||||
public void showMessage(String arg0) { }
|
||||
public void showMessage(String arg0) { }
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
return new String[] {getPassword()};
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
<% if ("PASSWORD".equals(authMethod) || "PUBLIC_KEY_AND_PASSWORD".equals(authMethod)) { %>
|
||||
<% passwordFieldName = "__PASSWORD__"; %>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
return decryptedPassword_<%=cid%>;
|
||||
<% } else { %>
|
||||
return null;
|
||||
<% } %>
|
||||
}
|
||||
};
|
||||
final com.jcraft.jsch.UserInfo defaultUserInfo_<%=cid%> = new MyUserInfo_<%=cid%>();
|
||||
|
||||
@@ -102,6 +102,7 @@ COMPATIBILITY="ALL"
|
||||
<ITEMS DEFAULT="PASSWORD">
|
||||
<ITEM NAME="PUBLICKEY" VALUE="PUBLICKEY"/>
|
||||
<ITEM NAME="PASSWORD" VALUE="PASSWORD"/>
|
||||
<ITEM NAME="PUBLIC_KEY_AND_PASSWORD" VALUE="PUBLIC_KEY_AND_PASSWORD"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -109,7 +110,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PRIVATEKEY"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
@@ -119,7 +120,7 @@ COMPATIBILITY="ALL"
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
SHOW_IF="(SFTP=='true') AND ((AUTH_METHOD == 'PUBLICKEY') OR (AUTH_METHOD == 'PUBLIC_KEY_AND_PASSWORD')) AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
REPOSITORY_VALUE="PASSPHRASE"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
|
||||
@@ -20,6 +20,7 @@ CONNECTION.NAME=Component list
|
||||
|
||||
AUTH_METHOD.ITEM.PASSWORD=Password
|
||||
AUTH_METHOD.ITEM.PUBLICKEY=Public key
|
||||
AUTH_METHOD.ITEM.PUBLIC_KEY_AND_PASSWORD=Public key and password
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
PRIVATEKEY.NAME=Private key
|
||||
PASSPHRASE.NAME=Key Passphrase
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="filecopy" MODULE="filecopy.jar"
|
||||
<IMPORT NAME="filecopy" MODULE="filecopy-2.0.1.jar"
|
||||
MVN="mvn:org.talend.components/filecopy/2.0.1"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.custom/lib/filecopy-2.0.1.jar"
|
||||
REQUIRED="true" />
|
||||
|
||||
@@ -128,10 +128,10 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {//A1
|
||||
if(column.getTalendType().equals("id_Dynamic")){
|
||||
if(advancedSeparator){
|
||||
%>
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, <%= thousandsSeparator %>, <%= decimalSeparator %>);
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, <%= thousandsSeparator %>, <%= decimalSeparator %>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
<%
|
||||
}else{%>
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>);
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
<%}
|
||||
}else{
|
||||
%>
|
||||
@@ -255,8 +255,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {//A1
|
||||
null
|
||||
<%
|
||||
}
|
||||
%>
|
||||
);
|
||||
%>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
}
|
||||
<%
|
||||
}else{
|
||||
|
||||
@@ -177,10 +177,10 @@ if(("false").equals(ElementParameterParser.getValue(node,"__CSV_OPTION__"))) {
|
||||
dynamic_column_index = i;
|
||||
if(advancedSeparator){
|
||||
%>
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, <%= thousandsSeparator %>, <%= decimalSeparator %>);
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, <%= thousandsSeparator %>, <%= decimalSeparator %>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
<%
|
||||
}else{%>
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>);
|
||||
routines.system.DynamicUtils.writeValuesToStringBuilder(<%=conn.getName() %>.<%=column.getLabel() %>, sb_<%=cid %>, OUT_DELIM_<%=cid %>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
<%}
|
||||
}else{
|
||||
%>
|
||||
@@ -567,8 +567,7 @@ if(("false").equals(ElementParameterParser.getValue(node,"__CSV_OPTION__"))) {
|
||||
null
|
||||
<%
|
||||
}
|
||||
%>
|
||||
);
|
||||
%>, java.nio.charset.Charset.forName(<%=encoding %>));
|
||||
}
|
||||
<%
|
||||
}else{
|
||||
|
||||
@@ -97,10 +97,10 @@
|
||||
util_<%=cid %>.output(outputPath_<%=cid %>, filename_<%=cid %>, isDirectory_<%=cid%>, is_<%=cid%>);
|
||||
|
||||
<% if (extractPath == true) {%>
|
||||
java.io.File f = new java.io.File(outputPath_<%=cid %>+"/"+ filename_<%=cid %>);
|
||||
java.io.File f = new java.io.File(outputPath_<%=cid %>, filename_<%=cid %>);
|
||||
f.setLastModified(entry_<%=cid %>.getModTime().getTime());
|
||||
<%} else {%>
|
||||
java.io.File unzippedFile = new java.io.File(outputPath_<%=cid %> + util_<%=cid %>.getEntryName(filename_<%=cid %>));
|
||||
java.io.File unzippedFile = new java.io.File(outputPath_<%=cid %>, util_<%=cid %>.getEntryName(filename_<%=cid %>));
|
||||
unzippedFile.setLastModified(entry_<%=cid %>.getModTime().getTime());
|
||||
<% }%>
|
||||
}
|
||||
@@ -141,10 +141,10 @@
|
||||
util_<%=cid %>.output(outputPath_<%=cid %>, filename_<%=cid %>, isDirectory_<%=cid%>, is_<%=cid%>);
|
||||
|
||||
<% if (extractPath == true) {%>
|
||||
java.io.File f = new java.io.File(outputPath_<%=cid %>+"/"+ filename_<%=cid %>);
|
||||
java.io.File f = new java.io.File(outputPath_<%=cid %>, filename_<%=cid %>);
|
||||
f.setLastModified(entry_<%=cid %>.getModTime().getTime());
|
||||
<%} else {%>
|
||||
java.io.File unzippedFile = new java.io.File(outputPath_<%=cid %> + util_<%=cid %>.getEntryName(filename_<%=cid %>));
|
||||
java.io.File unzippedFile = new java.io.File(outputPath_<%=cid %>, util_<%=cid %>.getEntryName(filename_<%=cid %>));
|
||||
unzippedFile.setLastModified(entry_<%=cid %>.getModTime().getTime());
|
||||
<% }%>
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
@@ -107,39 +108,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="3"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="10"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
<ITEM NAME="POSTGRESQL" VALUE="POSTGRESQL" />
|
||||
|
||||
@@ -248,6 +248,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
<ITEM NAME="POSTGRESQL" VALUE="POSTGRESQL" />
|
||||
|
||||
@@ -192,6 +192,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
|
||||
@@ -113,39 +113,8 @@ if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "\".\"" + <%=tableName%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
@@ -155,6 +124,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
@@ -214,20 +184,20 @@ if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
try (java.sql.Statement stmtDrop_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().dropTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().dropTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtDrop_<%=cid%>.execute("<%=manager.getDropTableSQL()%>");
|
||||
<%dbLog.table().dropDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().dropDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
<%dbLog.table().createTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>)");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
}
|
||||
<%
|
||||
} else if(("CREATE").equals(tableAction)) {
|
||||
%>
|
||||
try (java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>)");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
}
|
||||
<%
|
||||
} else if(("CREATE_IF_NOT_EXISTS").equals(tableAction) || ("DROP_IF_EXISTS_AND_CREATE").equals(tableAction)) {
|
||||
@@ -258,9 +228,9 @@ if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
if(!whetherExist_<%=cid%>) {
|
||||
try (java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>)");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
}
|
||||
}
|
||||
<%
|
||||
@@ -268,15 +238,15 @@ if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
if(whetherExist_<%=cid%>) {
|
||||
try (java.sql.Statement stmtDrop_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().dropTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().dropTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtDrop_<%=cid%>.execute("<%=manager.getDropTableSQL()%>");
|
||||
<%dbLog.table().dropDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().dropDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
}
|
||||
}
|
||||
try (java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>)");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().createDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
@@ -285,9 +255,9 @@ if(columnList != null && columnList.size()>0) {
|
||||
try (java.sql.Statement stmtClearCount_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
java.sql.ResultSet rsClearCount_<%=cid%> = stmtClearCount_<%=cid%>.executeQuery("<%=manager.getSelectionSQL()%>");
|
||||
java.sql.Statement stmtClear_<%=cid%> = conn_<%=cid%>.createStatement()) {
|
||||
<%dbLog.table().clearTry(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().clearTry(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
stmtClear_<%=cid%>.executeUpdate("<%=manager.getTruncateTableSQL()%>");
|
||||
<%dbLog.table().clearDone(dbLog.var("tableName"));%>
|
||||
<%dbLog.table().clearDone(dbLog.varForTableName("tableName", dbmsId));%>
|
||||
while(rsClearCount_<%=cid%>.next()) {
|
||||
deletedCount_<%=cid%> += rsClearCount_<%=cid%>.getInt(1);
|
||||
}
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
|
||||
@@ -169,6 +169,7 @@
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="3"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
<ITEM NAME="POSTGRESQL" VALUE="POSTGRESQL" />
|
||||
|
||||
@@ -199,6 +199,7 @@
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
<ITEM NAME="POSTGRESQL" VALUE="POSTGRESQL" />
|
||||
|
||||
@@ -475,6 +475,7 @@
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
REPOSITORY_VALUE="DB_VERSION"
|
||||
>
|
||||
<ITEMS DEFAULT="GREENPLUM">
|
||||
<ITEM NAME="POSTGRESQL" VALUE="POSTGRESQL" />
|
||||
|
||||
@@ -105,6 +105,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
@@ -117,39 +118,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
java.lang.Class.forName("org.hsqldb.jdbcDriver");
|
||||
<%dbLog.conn().logJDBCDriver(dbLog.str("org.hsqldb.jdbcDriver"));%>
|
||||
String dbUser_<%=cid %> = <%=dbuser%>;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -102,6 +102,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String dbschema_<%=cid%> = null;
|
||||
@@ -134,39 +135,8 @@ if(useBatch){
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
if (useExistingConnection) {
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
|
||||
@@ -78,6 +78,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%> = 0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
@@ -105,39 +106,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
@@ -103,39 +104,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
|
||||
@@ -64,39 +64,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
String jdbcDriver_<%=cid%> = null;
|
||||
String url_<%=cid%> = null;
|
||||
@@ -174,7 +142,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
|
||||
@@ -135,37 +135,12 @@ if(isUseParallelize || identityInsert || (!"DROP_CREATE".equals(tableAction) &&
|
||||
}
|
||||
String identityKey = ElementParameterParser.getValue(node, "__IDENTITY_FIELD__");
|
||||
getManager(dbmsId, cid, node).setIsSpecifyIdentityKey(isSpecifyIdentityKey);
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if (("INSERT_IF_NOT_EXIST").equals(dataAction)){
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
if (("INSERT_IF_NOT_EXIST").equals(dataAction)){
|
||||
int insertKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
}
|
||||
}
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
|
||||
boolean dieonerror = ("true").equals(ElementParameterParser.getValue(node, "__DIE_ON_ERROR__"));
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ILanguage currentLanguage = LanguageProvider.getJavaLanguage();
|
||||
@@ -426,6 +427,14 @@
|
||||
} // T_TM_M_291
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<%
|
||||
if (!dieonerror) {
|
||||
%>
|
||||
try {
|
||||
<%
|
||||
} // close dieonerror if check
|
||||
%>
|
||||
// ###############################
|
||||
// # Input tables (lookups)
|
||||
@@ -1358,13 +1367,7 @@
|
||||
|
||||
} // for (ExternalMapperTable externalTable : inputTables) { // T_TM_M_261
|
||||
boolean atLeastOneInputTableWithInnerJoin = !inputTablesWithInnerJoin.isEmpty();
|
||||
boolean dieonerror = ("true").equals(ElementParameterParser.getValue(node, "__DIE_ON_ERROR__"));
|
||||
|
||||
if (!dieonerror) {
|
||||
%>
|
||||
try {
|
||||
<%
|
||||
}
|
||||
%>// ###############################
|
||||
<%
|
||||
|
||||
|
||||
@@ -50,39 +50,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
|
||||
@@ -104,39 +104,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateOnDuplicateKey.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
|
||||
@@ -64,39 +64,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
|
||||
@@ -150,39 +150,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, the schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, the schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -114,39 +114,8 @@ if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "\".\"" + <%=tableName%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -116,39 +116,8 @@ if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "\".\"" + <%=tableName%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -145,39 +145,8 @@ if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "\".\"" + (<%=table%>)<%=convertToLowercase ? ".toLowerCase()" : ""%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -153,39 +153,8 @@ if(tableNameWithSchema){
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
int nb_line_<%=cid%> = 0;
|
||||
int nb_line_update_<%=cid%> = 0;
|
||||
int nb_line_inserted_<%=cid%> = 0;
|
||||
|
||||
@@ -7,6 +7,7 @@ imports="
|
||||
org.talend.designer.runprocess.ProcessorException
|
||||
java.util.Map
|
||||
java.util.List
|
||||
java.util.Date
|
||||
"
|
||||
%>
|
||||
<%
|
||||
@@ -230,16 +231,35 @@ try {
|
||||
%>
|
||||
childJob_commandLine_<%=cid%> = new java.util.ArrayList<String>();
|
||||
<%
|
||||
commandLine = ProcessorUtilities.getCommandLine("win32", false, true, childJobIds[i], context,org.talend.designer.runprocess.IProcessor.NO_STATISTICS,org.talend.designer.runprocess.IProcessor.NO_TRACES, use_custom_jvm_setting, codeOptions);
|
||||
|
||||
// remove the frontal 2 lines
|
||||
if (commandLine.length > 0 && ProcessorUtilities.isExportConfig()){
|
||||
int tmpSize = commandLine.length - 2;
|
||||
String[] tmp = new String[tmpSize];
|
||||
System.arraycopy(commandLine, 2, tmp, 0, tmpSize);
|
||||
commandLine = tmp;
|
||||
String oldInterpreter = ProcessorUtilities.getInterpreter();
|
||||
String oldCodeLocation = ProcessorUtilities.getCodeLocation();
|
||||
String oldLibraryPath = ProcessorUtilities.getLibraryPath();
|
||||
boolean oldExportConfig = ProcessorUtilities.isExportConfig();
|
||||
Date oldExportTimestamp = ProcessorUtilities.getExportTimestamp();
|
||||
boolean isJobTest = ProcessorUtilities.isJobTest(node.getProcess().getId(),context,null);
|
||||
if(isJobTest&&ProcessorUtilities.isCIMode()) {
|
||||
ProcessorUtilities.setExportConfig(false);
|
||||
ProcessorUtilities.setDynamicJobAndCITest(true);
|
||||
}
|
||||
|
||||
try {
|
||||
commandLine = ProcessorUtilities.getCommandLine("win32", false, true, childJobIds[i], context,org.talend.designer.runprocess.IProcessor.NO_STATISTICS,org.talend.designer.runprocess.IProcessor.NO_TRACES, use_custom_jvm_setting, codeOptions);
|
||||
|
||||
// remove the frontal 2 lines
|
||||
if (commandLine.length > 0 && ProcessorUtilities.isExportConfig()){
|
||||
int tmpSize = commandLine.length - 2;
|
||||
String[] tmp = new String[tmpSize];
|
||||
System.arraycopy(commandLine, 2, tmp, 0, tmpSize);
|
||||
commandLine = tmp;
|
||||
}
|
||||
} finally {
|
||||
if(isJobTest&&ProcessorUtilities.isCIMode()) {
|
||||
ProcessorUtilities.setExportConfig(oldInterpreter, oldCodeLocation, oldLibraryPath, oldExportConfig,
|
||||
oldExportTimestamp);
|
||||
ProcessorUtilities.setDynamicJobAndCITest(false);
|
||||
}
|
||||
}
|
||||
|
||||
boolean isCP = false;
|
||||
|
||||
for (int j = 0; j < commandLine.length; j++) {
|
||||
|
||||
@@ -480,11 +480,7 @@ String inputConnName = null;
|
||||
%>
|
||||
obj_<%=cid%> = <%=value %>;
|
||||
if(obj_<%=cid%>!=null) {
|
||||
if (obj_<%=cid %>.getClass().getName().equals("java.util.Date")) {
|
||||
paraList_<%=cid %>.add("--context_param <%=name %>=" + ((java.util.Date) obj_<%=cid %>).getTime());
|
||||
} else {
|
||||
paraList_<%=cid %>.add("--context_param <%=name %>=" + RuntimeUtils.tRunJobConvertContext(obj_<%=cid%>));
|
||||
}
|
||||
paraList_<%=cid %>.add("--context_param <%=name %>=" + RuntimeUtils.tRunJobConvertContext(obj_<%=cid%>));
|
||||
} else {
|
||||
paraList_<%=cid %>.add("--context_param <%=name %>=" + NULL_VALUE_EXPRESSION_IN_COMMAND_STRING_FOR_CHILD_JOB_ONLY);
|
||||
}
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,24 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -170,16 +175,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -51,7 +51,14 @@ CLIENT_CONFIGURATION.ITEM.CLIENT_PARAMETER.ITEM.SIGNEROVERRIDE=Explicitly Specif
|
||||
CLIENT_CONFIGURATION.ITEM.VALUE=Value
|
||||
DIE_ON_ERROR.NAME=Die on error
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -171,15 +175,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -50,7 +50,14 @@ REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -171,15 +175,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -53,7 +53,14 @@ DIE_ON_ERROR.NAME=Die on error
|
||||
BUCKET_EXIST.NAME=Bucket exist
|
||||
BUCKET_NAME.NAME=Bucket name
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -154,16 +158,43 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
FIELD="TABLE"
|
||||
|
||||
@@ -50,7 +50,14 @@ REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<%@ jet
|
||||
<%@ jet
|
||||
%>
|
||||
<%
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
|
||||
|
||||
String accessKey = ElementParameterParser.getValue(node, "__ACCESS_KEY__");
|
||||
|
||||
boolean configClient = "true".equals(ElementParameterParser.getValue(node, "__CONFIG_CLIENT__"));
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
List<Map<String,String>> clientConfiguration = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node,"__CLIENT_CONFIGURATION__");
|
||||
String region = ElementParameterParser.getValue(node,"__REGION__");
|
||||
|
||||
|
||||
boolean useRegionEndpoint = "true".equals(ElementParameterParser.getValue(node, "__USE_REGION_ENDPOINT__"));
|
||||
String regionEndpoint = ElementParameterParser.getValue(node,"__REGION_ENDPOINT__");
|
||||
|
||||
|
||||
boolean assumeRole = "true".equals(ElementParameterParser.getValue(node, "__ASSUME_ROLE__"));
|
||||
String arn = ElementParameterParser.getValue(node,"__ARN__");
|
||||
String roleSessionName = ElementParameterParser.getValue(node,"__ROLE_SESSION_NAME__");
|
||||
@@ -22,24 +22,24 @@
|
||||
List<Map<String, String>> tagInfoList = (List<Map<String, String>>)ElementParameterParser.getObjectValue(node, "__TAGS__");
|
||||
List<Map<String, String>> policyList = (List<Map<String, String>>)ElementParameterParser.getObjectValue(node, "__POLICY_TABLE__");
|
||||
String policyJson = ElementParameterParser.getValue(node,"__POLICY__");
|
||||
|
||||
|
||||
boolean setStsEndpoint = "true".equals(ElementParameterParser.getValue(node,"__SET_STS_ENDPOINT__"));
|
||||
String stsEndpoint = ElementParameterParser.getValue(node,"__STS_ENDPOINT__");
|
||||
String signingRegion = ElementParameterParser.getValue(node,"__SIGNING_REGION__");
|
||||
|
||||
|
||||
boolean set_signingRegion = (signingRegion!=null && !signingRegion.isEmpty() && !"DEFAULT".equalsIgnoreCase(signingRegion));
|
||||
|
||||
|
||||
boolean enableAccelerateMode = "true".equals(ElementParameterParser.getValue(node,"__ENABLE_ACCELERATE__"));
|
||||
boolean enablePathStyleAccess = "true".equals(ElementParameterParser.getValue(node,"__PATHSTYLEACCESS__"));
|
||||
|
||||
|
||||
String sessionDuration = ElementParameterParser.getValue(node,"__SESSION_DURATION__");
|
||||
if(sessionDuration == null || sessionDuration.isEmpty()) {
|
||||
sessionDuration = "15";
|
||||
}
|
||||
|
||||
|
||||
boolean set_region = (region!=null && !region.isEmpty() && !"DEFAULT".equalsIgnoreCase(region));
|
||||
final String AWSTracker = org.talend.core.utils.TrackerUtil.getAWSTracker();
|
||||
|
||||
|
||||
if(("true").equals(useExistingConn)) {
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "conn_" + connection;;
|
||||
@@ -47,7 +47,7 @@
|
||||
com.amazonaws.services.s3.AmazonS3Client conn_<%=cid%> = (com.amazonaws.services.s3.AmazonS3Client)globalMap.get("<%=conn%>");
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
%>
|
||||
log.info("<%=cid%> - Get an free connection from " + "<%=connection%>" + ".");
|
||||
<%
|
||||
}
|
||||
@@ -55,42 +55,72 @@
|
||||
%>
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
%>
|
||||
log.info("<%=cid%> - Creating new connection.");
|
||||
<%
|
||||
}
|
||||
|
||||
boolean inherit_credentials = "true".equals(ElementParameterParser.getValue(node, "__INHERIT_CREDENTIALS__"));
|
||||
if(!inherit_credentials) {
|
||||
String passwordFieldName = "__SECRET_KEY__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
com.amazonaws.auth.AWSCredentials credentials_<%=cid%> = new com.amazonaws.auth.BasicAWSCredentials(<%=accessKey%>,decryptedPassword_<%=cid%>);
|
||||
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.internal.StaticCredentialsProvider(credentials_<%=cid%>);
|
||||
String settingCredentialProvider = ElementParameterParser.getValue(node, "__CREDENTIAL_PROVIDER__");
|
||||
if ("STATIC_CREDENTIALS".equals(settingCredentialProvider)) {
|
||||
String passwordFieldName = "__SECRET_KEY__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
com.amazonaws.auth.AWSCredentials credentials_<%=cid%> = new com.amazonaws.auth.BasicAWSCredentials(<%=accessKey%>,decryptedPassword_<%=cid%>);
|
||||
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.auth.AWSStaticCredentialsProvider(credentials_<%=cid%>);
|
||||
<%
|
||||
} else if ("WEB_TOKEN".equals(settingCredentialProvider)) {
|
||||
String webTokenFile = ElementParameterParser.getValue(node, "__WEB_IDENTITY_TOKEN_FILE__");
|
||||
String webTokenArn = ElementParameterParser.getValue(node, "__WEB_TOKEN_ARN__");
|
||||
String webTokenSessionName = ElementParameterParser.getValue(node, "__WEB_TOKEN_ROLE_SESSION_NAME__");
|
||||
%>
|
||||
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = com.amazonaws.auth.WebIdentityTokenCredentialsProvider
|
||||
.builder()
|
||||
<%
|
||||
if (webTokenFile != null && !webTokenFile.isEmpty()) {
|
||||
%>
|
||||
.webIdentityTokenFile(<%=webTokenFile%>)
|
||||
<%
|
||||
}
|
||||
if (webTokenArn != null && !webTokenArn.isEmpty()) {
|
||||
%>
|
||||
.roleArn(<%=webTokenArn%>)
|
||||
<%
|
||||
}
|
||||
if (webTokenSessionName != null && !webTokenSessionName.isEmpty()) {
|
||||
%>
|
||||
.roleSessionName(<%=webTokenSessionName%>)
|
||||
<%
|
||||
}
|
||||
%>
|
||||
.build();
|
||||
<%
|
||||
} else if ("INHERIT_CREDENTIALS".equals(settingCredentialProvider)) {
|
||||
%>
|
||||
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
// Unknown credential provider is used: <%=settingCredentialProvider%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper();
|
||||
<%
|
||||
}
|
||||
|
||||
boolean encrypt = "true".equals(ElementParameterParser.getValue(node,"__ENCRYPT__"));
|
||||
|
||||
|
||||
//work for tRedshiftOutputBulk
|
||||
String encryptionKeyPropertyName = "__ENCRYPTED_KEY__";
|
||||
|
||||
|
||||
//work for s3 components
|
||||
String key_type = ElementParameterParser.getValue(node,"__KEY_TYPE__");
|
||||
String algorithm_symmetric_master_key = ElementParameterParser.getValue(node,"__ALGORITHM_SYMMETRIC_MASTER_KEY__");
|
||||
String algorithm_asymmetric_master_key = ElementParameterParser.getValue(node,"__ALGORITHM_ASYMMETRIC_MASTER_KEY__");
|
||||
String encoding = ElementParameterParser.getValue(node,"__ENCODING__");
|
||||
|
||||
|
||||
String encrypted_key_x509 = ElementParameterParser.getValue(node,"__ENCRYPTED_KEY_X509__");
|
||||
String public_key = ElementParameterParser.getValue(node,"__PUBLIC_KEY__");
|
||||
String private_key = ElementParameterParser.getValue(node,"__PRIVATE_KEY__");
|
||||
|
||||
|
||||
if(encrypt && node.getComponent().getName().startsWith("tRedshift")) {
|
||||
if (ElementParameterParser.canEncrypt(node, encryptionKeyPropertyName)) {
|
||||
%>
|
||||
@@ -98,7 +128,7 @@
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
String masterKey_<%=cid%> = <%=ElementParameterParser.getValue(node, encryptionKeyPropertyName) %>;
|
||||
String masterKey_<%=cid%> = <%=ElementParameterParser.getValue(node, encryptionKeyPropertyName) %>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
@@ -108,23 +138,23 @@
|
||||
<%
|
||||
} else if(encrypt && "KMS_CMK".equals(key_type)) {//KMS
|
||||
%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, "__ENCRYPTED_KEY_CMK__")) {%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, "__ENCRYPTED_KEY_CMK__")) {%>
|
||||
final String kms_cmk_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, "__ENCRYPTED_KEY_CMK__")%>);
|
||||
<%} else {%>
|
||||
final String kms_cmk_<%=cid%> = <%= ElementParameterParser.getValue(node, "__ENCRYPTED_KEY_CMK__")%>;
|
||||
final String kms_cmk_<%=cid%> = <%= ElementParameterParser.getValue(node, "__ENCRYPTED_KEY_CMK__")%>;
|
||||
<%}%>
|
||||
|
||||
|
||||
com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider encryptionMaterialsProvider_<%=cid%> = new com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider(kms_cmk_<%=cid%>);
|
||||
<%
|
||||
} else if(encrypt && "SYMMETRIC_MASTER_KEY".equals(key_type)) {//symmetric master key
|
||||
if("AES".equals(algorithm_symmetric_master_key) && "BASE64".equals(encoding)) {
|
||||
%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, "__ENCRYPTED_KEY_BASE64__")) {%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, "__ENCRYPTED_KEY_BASE64__")) {%>
|
||||
final String smk_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, "__ENCRYPTED_KEY_BASE64__")%>);
|
||||
<%} else {%>
|
||||
final String smk_<%=cid%> = <%= ElementParameterParser.getValue(node, "__ENCRYPTED_KEY_BASE64__")%>;
|
||||
final String smk_<%=cid%> = <%= ElementParameterParser.getValue(node, "__ENCRYPTED_KEY_BASE64__")%>;
|
||||
<%}%>
|
||||
|
||||
|
||||
javax.crypto.spec.SecretKeySpec symmetricKey_<%=cid%> = new javax.crypto.spec.SecretKeySpec(org.apache.commons.codec.binary.Base64.decodeBase64(smk_<%=cid%>.getBytes("UTF-8")), "AES");
|
||||
com.amazonaws.services.s3.model.EncryptionMaterials encryptionMaterials_<%=cid%> = new com.amazonaws.services.s3.model.EncryptionMaterials(symmetricKey_<%=cid%>);
|
||||
com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider encryptionMaterialsProvider_<%=cid%> = new com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider(encryptionMaterials_<%=cid%>);
|
||||
@@ -144,7 +174,7 @@
|
||||
keyfis_<%=cid%>.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
com.amazonaws.services.s3.model.EncryptionMaterials encryptionMaterials_<%=cid%> = new com.amazonaws.services.s3.model.EncryptionMaterials(symmetricKey_<%=cid%>);
|
||||
com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider encryptionMaterialsProvider_<%=cid%> = new com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider(encryptionMaterials_<%=cid%>);
|
||||
<%
|
||||
@@ -163,7 +193,7 @@
|
||||
fis_<%=cid%>.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
java.io.File filePrivateKey_<%=cid%> = new java.io.File(<%=private_key%>);
|
||||
byte[] encodedPrivateKey_<%=cid%> = null;
|
||||
try {
|
||||
@@ -175,19 +205,19 @@
|
||||
fis_<%=cid%>.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
java.security.KeyFactory keyFactory_<%=cid%> = java.security.KeyFactory.getInstance("<%=algorithm_asymmetric_master_key%>");
|
||||
|
||||
|
||||
java.security.spec.X509EncodedKeySpec publicKeySpec_<%=cid%> = new java.security.spec.X509EncodedKeySpec(
|
||||
encodedPublicKey_<%=cid%>);
|
||||
java.security.PublicKey publicKey_<%=cid%> = keyFactory_<%=cid%>.generatePublic(publicKeySpec_<%=cid%>);
|
||||
|
||||
|
||||
java.security.spec.PKCS8EncodedKeySpec privateKeySpec_<%=cid%> = new java.security.spec.PKCS8EncodedKeySpec(
|
||||
encodedPrivateKey_<%=cid%>);
|
||||
java.security.PrivateKey privateKey_<%=cid%> = keyFactory_<%=cid%>.generatePrivate(privateKeySpec_<%=cid%>);
|
||||
|
||||
|
||||
java.security.KeyPair asymmetricKey_<%=cid%> = new java.security.KeyPair(publicKey_<%=cid%>, privateKey_<%=cid%>);
|
||||
|
||||
|
||||
com.amazonaws.services.s3.model.EncryptionMaterials encryptionMaterials_<%=cid%> = new com.amazonaws.services.s3.model.EncryptionMaterials(asymmetricKey_<%=cid%>);
|
||||
com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider encryptionMaterialsProvider_<%=cid%> = new com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider(encryptionMaterials_<%=cid%>);
|
||||
<%
|
||||
@@ -231,9 +261,9 @@
|
||||
cc_<%=cid%>.setSocketBufferSizeHints(scketSendBufferSizeHints_<%=cid%>,socketReceiveBufferSizeHints_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(assumeRole) {
|
||||
int policyListSize = policyList.size();
|
||||
int tagInfoListSize = tagInfoList.size();
|
||||
@@ -241,9 +271,9 @@
|
||||
int policyListSize_<%=cid%> = <%=policyListSize%>;
|
||||
int tagInfoListSize_<%=cid%> = <%=tagInfoListSize%>;
|
||||
int sessionDurationSeconds_<%=cid%> = <%=sessionDuration%> * 60;
|
||||
|
||||
|
||||
List<com.amazonaws.services.securitytoken.model.PolicyDescriptorType> policyArnList_<%=cid%> = null;
|
||||
|
||||
|
||||
<%
|
||||
if(policyListSize > 0){
|
||||
%>
|
||||
@@ -259,7 +289,7 @@
|
||||
%>
|
||||
List<com.amazonaws.services.securitytoken.model.Tag> tagList_<%=cid%> = null;
|
||||
List<String> tranTagKeys_<%=cid%> = null;
|
||||
|
||||
|
||||
<%
|
||||
if(tagInfoListSize > 0){
|
||||
%>
|
||||
@@ -272,7 +302,7 @@
|
||||
String tagTransitive = tagInfoList.get(tagInfoListIndex).get("TAG_TRANSITIVE");
|
||||
%>
|
||||
tagList_<%=cid%>.add(new com.amazonaws.services.securitytoken.model.Tag().withKey(<%=tagKey%>).withValue(<%=tagValue%>));
|
||||
<%
|
||||
<%
|
||||
if("true".equals(tagTransitive)) {
|
||||
%>
|
||||
tranTagKeys_<%=cid%>.add(<%=tagKey%>);
|
||||
@@ -281,32 +311,32 @@
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
com.amazonaws.services.securitytoken.AWSSecurityTokenService stsClient_<%=cid%> =
|
||||
|
||||
com.amazonaws.services.securitytoken.AWSSecurityTokenService stsClient_<%=cid%> =
|
||||
com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder.standard()
|
||||
.withCredentials(credentialsProvider_<%=cid%>)
|
||||
.withClientConfiguration(cc_<%=cid%>)
|
||||
<%if(setStsEndpoint && stsEndpoint != null && !stsEndpoint.isEmpty()){%>
|
||||
|
||||
|
||||
<%if(set_signingRegion){%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=stsEndpoint%>, <%=signingRegion%>))
|
||||
<%}else{%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=stsEndpoint%>, null))
|
||||
<%}%>
|
||||
|
||||
|
||||
<%}else{%>
|
||||
|
||||
|
||||
<%if(set_signingRegion){%>
|
||||
.withRegion(<%=signingRegion%>)
|
||||
<%}else{%>
|
||||
.withRegion(com.amazonaws.regions.Regions.US_EAST_1)
|
||||
<%}%>
|
||||
|
||||
|
||||
<%}%>
|
||||
.build();
|
||||
|
||||
|
||||
com.amazonaws.services.securitytoken.model.AssumeRoleRequest assumeRoleRequest_<%=cid%> =
|
||||
|
||||
|
||||
com.amazonaws.services.securitytoken.model.AssumeRoleRequest assumeRoleRequest_<%=cid%> =
|
||||
new com.amazonaws.services.securitytoken.model.AssumeRoleRequest()
|
||||
.withDurationSeconds(sessionDurationSeconds_<%=cid%>)
|
||||
<%if(externalId != null && !externalId.isEmpty() && !("\"\"").equals(externalId)){%>
|
||||
@@ -324,102 +354,69 @@
|
||||
.withTokenCode(<%=tokenCode%>)
|
||||
<%}%>
|
||||
;
|
||||
|
||||
|
||||
if(policyListSize_<%=cid%> > 0 && policyArnList_<%=cid%> != null && policyArnList_<%=cid%>.size() > 0){
|
||||
assumeRoleRequest_<%=cid%>.withPolicyArns(policyArnList_<%=cid%>);
|
||||
}
|
||||
|
||||
|
||||
if(tagInfoListSize_<%=cid%> > 0 && tagList_<%=cid%> != null && tagList_<%=cid%>.size() > 0){
|
||||
assumeRoleRequest_<%=cid%>.withTags(tagList_<%=cid%>);
|
||||
}
|
||||
|
||||
|
||||
if(tagInfoListSize_<%=cid%> > 0 && tranTagKeys_<%=cid%> != null && tranTagKeys_<%=cid%>.size() > 0){
|
||||
assumeRoleRequest_<%=cid%>.withTransitiveTagKeys(tranTagKeys_<%=cid%>);
|
||||
}
|
||||
|
||||
|
||||
com.amazonaws.services.securitytoken.model.AssumeRoleResult assumeRoleResult_<%=cid%> = stsClient_<%=cid%>.assumeRole(assumeRoleRequest_<%=cid%>);
|
||||
com.amazonaws.services.securitytoken.model.Credentials assumeRoleCred_<%=cid%> = assumeRoleResult_<%=cid%>.getCredentials();
|
||||
com.amazonaws.auth.BasicSessionCredentials roleSessionCredentials_<%=cid%> =
|
||||
com.amazonaws.auth.BasicSessionCredentials roleSessionCredentials_<%=cid%> =
|
||||
new com.amazonaws.auth.BasicSessionCredentials(
|
||||
assumeRoleCred_<%=cid%>.getAccessKeyId(),
|
||||
assumeRoleCred_<%=cid%>.getSecretAccessKey(),
|
||||
assumeRoleCred_<%=cid%>.getSessionToken());
|
||||
credentialsProvider_<%=cid%> = new com.amazonaws.auth.AWSStaticCredentialsProvider(roleSessionCredentials_<%=cid%>);
|
||||
|
||||
<%
|
||||
}
|
||||
if(encrypt) {
|
||||
%>
|
||||
com.amazonaws.services.s3.AmazonS3 conn_<%=cid%> = com.amazonaws.services.s3.AmazonS3EncryptionClientBuilder.standard()
|
||||
<%if(useRegionEndpoint && regionEndpoint != null && !regionEndpoint.isEmpty()){%>
|
||||
|
||||
<%if(!set_region){%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,null))
|
||||
.withForceGlobalBucketAccessEnabled(true)
|
||||
<%}else{%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,<%=region%>))
|
||||
<%}%>
|
||||
|
||||
<%}else{%>
|
||||
|
||||
<%if(!set_region){%>
|
||||
.withRegion("us-east-1") // The first region to try your request against
|
||||
.withForceGlobalBucketAccessEnabled(true) // If a bucket is in a different region, try again in the correct region
|
||||
<%}else{%>
|
||||
.withRegion(<%=region%>)
|
||||
<%}%>
|
||||
|
||||
<%}%>
|
||||
<%if(enableAccelerateMode){%>
|
||||
.withAccelerateModeEnabled(true)
|
||||
<%}%>
|
||||
.withCredentials(credentialsProvider_<%=cid%>)
|
||||
.withClientConfiguration(cc_<%=cid%>)
|
||||
.withEncryptionMaterials(encryptionMaterialsProvider_<%=cid%>)
|
||||
<%if("KMS_CMK".equals(key_type) && set_region) {%>
|
||||
.withCryptoConfiguration(new com.amazonaws.services.s3.model.CryptoConfiguration().withAwsKmsRegion(com.amazonaws.regions.RegionUtils.getRegion(<%=region%>)))
|
||||
<%}%>
|
||||
<%if(useRegionEndpoint && enablePathStyleAccess) {%>
|
||||
.enablePathStyleAccess()
|
||||
<%}%>
|
||||
.build();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
com.amazonaws.services.s3.AmazonS3 conn_<%=cid%> = com.amazonaws.services.s3.AmazonS3ClientBuilder.standard()
|
||||
<%if(useRegionEndpoint && regionEndpoint != null && !regionEndpoint.isEmpty()){%>
|
||||
|
||||
<%if(!set_region){%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,null))
|
||||
.withForceGlobalBucketAccessEnabled(true)
|
||||
<%}else{%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,<%=region%>))
|
||||
<%}%>
|
||||
|
||||
<%}else{%>
|
||||
|
||||
<%if(!set_region){%>
|
||||
.withRegion("us-east-1") // The first region to try your request against
|
||||
.withForceGlobalBucketAccessEnabled(true) // If a bucket is in a different region, try again in the correct region
|
||||
<%}else{%>
|
||||
.withRegion(<%=region%>)
|
||||
<%}%>
|
||||
|
||||
<%}%>
|
||||
|
||||
<%if(enableAccelerateMode){%>
|
||||
.withAccelerateModeEnabled(true)
|
||||
<%}%>
|
||||
.withCredentials(credentialsProvider_<%=cid%>)
|
||||
.withClientConfiguration(cc_<%=cid%>)
|
||||
<%if(useRegionEndpoint && enablePathStyleAccess) {%>
|
||||
.enablePathStyleAccess()
|
||||
<%}%>
|
||||
.build();
|
||||
<%
|
||||
}
|
||||
<%
|
||||
} // end if (assumeRole)
|
||||
%>
|
||||
<% if(encrypt) { %>
|
||||
com.amazonaws.services.s3.AmazonS3 conn_<%=cid%> = com.amazonaws.services.s3.AmazonS3EncryptionClientBuilder.standard()
|
||||
.withEncryptionMaterials(encryptionMaterialsProvider_<%=cid%>)
|
||||
<% if("KMS_CMK".equals(key_type) && set_region) { %>
|
||||
.withCryptoConfiguration(new com.amazonaws.services.s3.model.CryptoConfiguration()
|
||||
.withAwsKmsRegion(com.amazonaws.regions.RegionUtils.getRegion(<%=region%>)))
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
com.amazonaws.services.s3.AmazonS3 conn_<%=cid%> = com.amazonaws.services.s3.AmazonS3ClientBuilder.standard()
|
||||
<% } %>
|
||||
|
||||
<% if(useRegionEndpoint && regionEndpoint != null && !regionEndpoint.isEmpty()) { %>
|
||||
<%if(!set_region){%>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,null))
|
||||
.withForceGlobalBucketAccessEnabled(true)
|
||||
<% } else { %>
|
||||
.withEndpointConfiguration(new com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration(<%=regionEndpoint%>,<%=region%>))
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% if(!set_region) { %>
|
||||
.withRegion("us-east-1") // The first region to try your request against
|
||||
.withForceGlobalBucketAccessEnabled(true) // If a bucket is in a different region, try again in the correct region
|
||||
<% } else { %>
|
||||
.withRegion(<%=region%>)
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if(enableAccelerateMode) { %>
|
||||
.withAccelerateModeEnabled(true)
|
||||
<% } %>
|
||||
.withCredentials(credentialsProvider_<%=cid%>)
|
||||
.withClientConfiguration(cc_<%=cid%>)
|
||||
<% if(useRegionEndpoint && enablePathStyleAccess) { %>
|
||||
.enablePathStyleAccess()
|
||||
<% } %>
|
||||
.build();
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
%>
|
||||
log.info("<%=cid%> - Creating new connection successfully.");
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -36,12 +36,25 @@
|
||||
|
||||
<PARAMETERS>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="15"
|
||||
REQUIRED="true"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="15"
|
||||
NUM_ROW="16"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -49,22 +62,13 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="15"
|
||||
NUM_ROW="16"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="16"
|
||||
REQUIRED="true"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -162,7 +166,7 @@
|
||||
FIELD="CLOSED_LIST"
|
||||
RAW="true"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="isShow[KEY_TYPE] AND (KEY_TYPE == 'SYMMETRIC_MASTER_KEY')"
|
||||
SHOW_IF="isShow[KEY_TYPE] AND (KEY_TYPE == 'SYMMETRIC_MASTER_KEY')"
|
||||
REQUIRED="true"
|
||||
GROUP="ENCRYPT_GROUP"
|
||||
>
|
||||
@@ -251,10 +255,37 @@
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="CREDENTIAL_PROVIDER == 'WEB_TOKEN'"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="CREDENTIAL_PROVIDER == 'WEB_TOKEN'"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="CREDENTIAL_PROVIDER == 'WEB_TOKEN'"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
|
||||
@@ -73,7 +73,14 @@ ALGORITHM_ASYMMETRIC_MASTER_KEY.ITEM.DSA=DSA
|
||||
ENCODING.ITEM.BASE64=Base64
|
||||
ENCODING.ITEM.X509=X509
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -231,16 +235,43 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
FIELD="TABLE"
|
||||
|
||||
@@ -58,7 +58,14 @@ TO_CONFIG.NAME=Destination Configuration
|
||||
|
||||
ENABLE_SERVER_SIDE_ENCRYPTION.NAME=Server-Side Encryption
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -180,15 +184,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -51,7 +51,14 @@ REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -281,15 +285,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -75,7 +75,14 @@ ALGORITHM_ASYMMETRIC_MASTER_KEY.ITEM.DSA=DSA
|
||||
ENCODING.ITEM.BASE64=Base64
|
||||
ENCODING.ITEM.X509=X509
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -122,7 +126,7 @@
|
||||
NAME="REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
RAW="true"
|
||||
NUM_ROW="26"
|
||||
NUM_ROW="26"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
@@ -192,16 +196,43 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
FIELD="TABLE"
|
||||
|
||||
@@ -60,7 +60,14 @@ REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -43,12 +43,27 @@
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="CONNECTION_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NAME="CREDENTIAL_PROVIDER"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<ITEMS DEFAULT="STATIC_CREDENTIALS"> <!-- It's just a basic one -->
|
||||
<ITEM NAME="STATIC_CREDENTIALS" VALUE="STATIC_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="INHERIT_CREDENTIALS" VALUE="INHERIT_CREDENTIALS" SHOW_IF="true" />
|
||||
<ITEM NAME="WEB_TOKEN" VALUE="WEB_TOKEN" SHOW_IF="true" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -56,25 +71,14 @@
|
||||
<PARAMETER
|
||||
NAME="SECRET_KEY"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="20"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="21"
|
||||
REQUIRED="true"
|
||||
GROUP="CONNECTION_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (CREDENTIAL_PROVIDER == 'STATIC_CREDENTIALS')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="ASSUME_ROLE"
|
||||
FIELD="CHECK"
|
||||
@@ -122,7 +126,7 @@
|
||||
NAME="REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
RAW="true"
|
||||
NUM_ROW="26"
|
||||
NUM_ROW="26"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
@@ -160,7 +164,7 @@
|
||||
NAME="KEY_TYPE"
|
||||
FIELD="CLOSED_LIST"
|
||||
RAW="true"
|
||||
NUM_ROW="28"
|
||||
NUM_ROW="28"
|
||||
REQUIRED="true"
|
||||
GROUP="ENCRYPT_GROUP"
|
||||
SHOW_IF="isShow[ENCRYPT] AND (ENCRYPT == 'true')"
|
||||
@@ -306,15 +310,42 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="WEB_IDENTITY_TOKEN_FILE"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="10"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ARN"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="11"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="WEB_TOKEN_ROLE_SESSION_NAME"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="12"
|
||||
REQUIRED="false"
|
||||
GROUP="WEB_IDENTITY_TOKEN"
|
||||
SHOW_IF="isShow[CREDENTIAL_PROVIDER] AND (CREDENTIAL_PROVIDER == 'WEB_TOKEN')"
|
||||
/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CONFIG_CLIENT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="15"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
GROUP="CLIENT_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="CLIENT_CONFIGURATION"
|
||||
|
||||
@@ -77,7 +77,14 @@ ALGORITHM_ASYMMETRIC_MASTER_KEY.ITEM.DSA=DSA
|
||||
ENCODING.ITEM.BASE64=Base64
|
||||
ENCODING.ITEM.X509=X509
|
||||
|
||||
INHERIT_CREDENTIALS.NAME=Inherit credentials from AWS role
|
||||
CREDENTIAL_PROVIDER.NAME=Credential Provider
|
||||
CREDENTIAL_PROVIDER.ITEM.STATIC_CREDENTIALS=Static Credentials
|
||||
CREDENTIAL_PROVIDER.ITEM.WEB_TOKEN=Web Identity Token
|
||||
CREDENTIAL_PROVIDER.ITEM.INHERIT_CREDENTIALS=Inherit credentials from AWS role
|
||||
WEB_IDENTITY_TOKEN.NAME=Web Identity Token
|
||||
WEB_IDENTITY_TOKEN_FILE.NAME=Token File
|
||||
WEB_TOKEN_ARN.NAME=Role ARN
|
||||
WEB_TOKEN_ROLE_SESSION_NAME.NAME=Role Session Name
|
||||
|
||||
ASSUME_ROLE.NAME=Assume Role
|
||||
ARN.NAME=Role ARN
|
||||
|
||||
@@ -99,39 +99,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
<%
|
||||
if(("true").equals(useExistingConn)) {
|
||||
|
||||
@@ -363,15 +363,15 @@
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jackson-core-asl-1.9.14-TALEND"
|
||||
MODULE="jackson-core-asl-1.9.14-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-core-asl/1.9.14-TALEND"
|
||||
NAME="jackson-core-asl-1.9.15-TALEND"
|
||||
MODULE="jackson-core-asl-1.9.15-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-core-asl/1.9.15-TALEND"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jackson-mapper-asl-1.9.14-TALEND"
|
||||
MODULE="jackson-mapper-asl-1.9.14-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.14-TALEND"
|
||||
NAME="jackson-mapper-asl-1.9.15-TALEND"
|
||||
MODULE="jackson-mapper-asl-1.9.15-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.15-TALEND"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
|
||||
@@ -118,39 +118,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
if(useExistingConn){
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
|
||||
@@ -70,6 +70,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
@@ -138,39 +139,9 @@ if (useBatch) {
|
||||
%>
|
||||
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/Output/CheckKeysForUpdateAndDelete.javajet"%>
|
||||
|
||||
<%
|
||||
if(("UPDATE").equals(dataAction) || ("INSERT_OR_UPDATE").equals(dataAction) || ("UPDATE_OR_INSERT").equals(dataAction)) {
|
||||
int updateKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isUpdateKey() && !column.isDynamic()) {
|
||||
updateKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int updateKeyCount_<%=cid%> = <%=updateKeyCount%>;
|
||||
if(updateKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For update, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else if(("DELETE").equals(dataAction)) {
|
||||
int deleteKeyCount = 0;
|
||||
if(stmtStructure != null) {
|
||||
for(Column column : stmtStructure) {
|
||||
if(column.isDeleteKey() && !column.isDynamic()) {
|
||||
deleteKeyCount++;
|
||||
}
|
||||
}
|
||||
%>
|
||||
int deleteKeyCount_<%=cid%> = <%=deleteKeyCount%>;
|
||||
if(deleteKeyCount_<%=cid%> < 1) {
|
||||
throw new RuntimeException("For delete, Schema must have a key");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(useExistingConnection) {
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "conn_" + connection;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user