Compare commits

..

64 Commits

Author SHA1 Message Date
vdrokov
ae6c3cf5a7 APPINT-32811: CVE for commons-codec-1.6 on studio 7.3 2021-04-16 17:02:15 +03:00
Jane Ding
ac5cc1ee1d fix(TUP-30992):CVE: junit-4.11,4.13 (#6110)
https://jira.talendforge.org/browse/TUP-30992

Signed-off-by: jding-tlnd <jding@talend.com>
2021-04-16 19:19:19 +08:00
wang wei
70a75cf790 fix(TDI-45577): Job using snowflake dynamic schema fails with special char (#6095) 2021-04-16 18:11:34 +08:00
Jane Ding
db870ecc30 fix(TUP-30992):CVE: junit-4.11,4.13 (#6106)
https://jira.talendforge.org/browse/TUP-30992
fix(TUP-29033):Fail to run testcase in studio and CI
https://jira.talendforge.org/browse/TUP-29033

Signed-off-by: jding-tlnd <jding@talend.com>
2021-04-16 16:30:14 +08:00
Oleksandr Zhelezniak
78f9b554eb feat(TDI-45323): new auth provider web token (#6060)
* replace checkbox with drop-down credential provider list
* migration task
2021-04-15 12:57:13 +03:00
apoltavtsev
7146bdf26c bugfix(APPINT-32288) Propagate "bundleVersion" option 2021-04-15 10:28:05 +02:00
jiezhang-tlnd
4655c0a059 fix(TUP-30992)CVE: junit-4.11,4.13 (#6090) 2021-04-15 16:13:14 +08:00
Max
49658a28d3 fix(TBD-12112): commons-beanutils-core-1.8.0.jar to 1.9.4 (#6012)
* fix(TBD-12112): commons-beanutils-core-1.8.0.jar to 1.9.4

* fix(TBD-12112): dead code elimination

* fix(TBD-12112): additional code cleanup
2021-04-15 10:53:11 +03:00
SunChaoqun
cda46bb231 APPINT-32688:R2021-03 issue with tDB*** using datasource (#6085) 2021-04-15 10:25:13 +08:00
Zhiwei Xue
9df3a48b78 fix(TUP-30791): remove setup code dependencies action for testcase (#6089) 2021-04-14 16:54:13 +08:00
hcyi
9cce21a3bd fix(TUP-30438):Issue when updating snowflake table using tELTOutput. (#5883)
* fix(TUP-30438):Issue when updating snowflake table using tELTOutput.

* fix(TUP-30438):add junts.

* fix(TUP-30438):Issue when updating snowflake table using tELTOutput.
2021-04-14 16:14:48 +08:00
kjwang
174ea89be9 TUP-31145 TCK:Guess schema use an exist connection will overwrite the parameters of component tNetSuiteV2019Input (#6081)
* TUP-31145 TCK:Guess schema use an exist connection will overwrite the
parameters of component tNetSuiteV2019Input
https://jira.talendforge.org/browse/TUP-31145

* TUP-31145 TCK:Guess schema use an exist connection will overwrite the
parameters of component tNetSuiteV2019Input (Fix guess schema issue
cause by TDI-45246)
https://jira.talendforge.org/browse/TUP-31145
2021-04-14 15:26:20 +08:00
kjwang
b4f2124a60 kjwang/Feat TUP-21090 Support connection component for tacokit (#5977)
* kjwang/Feat TUP-21090 Support connection component for tacokit
https://jira.talendforge.org/browse/TUP-21090
2021-04-13 18:06:53 +08:00
Richard Lecomte
5ac16bb7cc TDI-45014 : SFTP auth with password and public key (#6030)
* TDI-45014 : SFTP auth with password and public key

* TDI-45014 : SFTP auth with password and public key

* TDI-45014 : SFTP auth with password and public key

* TDI-45014 : SFTP auth with password and public key

Added parenthesis

* TDI-45014 : SFTP auth with password and public key

Smarter getPassword method
2021-04-13 11:56:15 +02:00
Emmanuel GALLOIS
bc445f065c feat(TDI-45842): bump component-runtime to 1.31.2 (#6029)
* feat(TDI-45842): bump component-runtime to 1.31.1-SNAPSHOT

* feat(TDI-45842): bump component-runtime to 1.31.2

Co-authored-by: jzhao-talend <jzhao@talend.com>
Co-authored-by: mbasiuk <mbasiuk@talend.com>
2021-04-13 12:40:03 +03:00
zyuan-talend
891e6a9d5e fix(TUP-29284): only show proposals for enabled categories(proposal (#6070)
kinds).
2021-04-13 17:20:38 +08:00
hzhao-talendbj
c6e4e79411 fix(TUP-30625): update maven project after convert jobscript to job (#6069) 2021-04-13 14:49:16 +08:00
sbliu
47ffb3d242 feat(TUP-30358) Enhance Data Collector - Route usage details 2021-04-13 10:57:20 +08:00
jiezhang-tlnd
ae30bc1fb3 fix(TUP-30954)CVE_xstream-1.4.15.jar (#6035) 2021-04-13 10:54:41 +08:00
Emmanuel GALLOIS
6b7fce2f78 feat(TDI-45246): do not put in configuration hidden parameters 2021-04-12 12:02:03 +02:00
hcyi
6049577e03 feat(TUP-30291):Add Suggestable support for Table options (List<Row>) in Studio. (#6013)
* feat(TUP-30291):Add Suggestable support for Table options (List<Row>) in
Studio.

* feat(TUP-30291):Add Suggestable support for Table options (List<Row>) in
Studio.

* feat(TUP-30291):improve for the implementation.

* feat(TUP-30291):fix TUP-31031 Add condition, NOT select field, directly
select operator, then throw errors

* feat(TUP-30291):fix TUP-31031 Add condition, NOT select field, directly
select operator, then throw errors

* feat(TUP-30291):fix TUP-31032 [random] Studio can't save field value.

* feat(TUP-30291):fix TUP-31032 [random] Studio can't save field value.
2021-04-12 15:24:26 +08:00
jiezhang-tlnd
186fcafb29 feat(TUP-30381)Support greenplum driver for Greenplum Database in studio (#5995)
* feat(TUP-30381)Support greenplum driver for Greenplum Database in studio
metadata
https://jira.talendforge.org/browse/TUP-30381

Conflicts:
	main/plugins/org.talend.repository/plugin.xml

* remove hard code

* add dbversion for greenplum

* Add REPOSITORY_VALUE for Greenplum components

* set right dbversionString
2021-04-12 10:02:40 +08:00
wang wei
7f3d3b7a59 fix(TDI-45650): [7.3.1] tDeltaLakeOutput- not handling the updates when we are using Dynamic schema(#5908) 2021-04-12 09:35:14 +08:00
Zhiwei Xue
9a11a94043 fix(TUP-30783):Support inner routine with the same name in different (#6065)
custom jar.
2021-04-09 15:50:36 +08:00
Zhiwei Xue
a47de9821f feat(TUP-29952):Change "Assign Routine to" action to "Copy Routine to". (#6059) 2021-04-09 15:49:34 +08:00
Dmytro Sylaiev
f6114ef000 fix(TDI-45642): Count key columns (#6039)
* fix(TDI-45642): Count key columns

* fix(TDI-45642): Fix another regression related to dynamic schema
2021-04-08 19:29:23 +03:00
Zhiwei Xue
9d93ff1652 fix(TUP-30786):Avoid to click finish button more than once when do (#6053)
create custom routine jar/bean jar.
2021-04-08 18:32:57 +08:00
clesaec
51a97c8b24 TDI-45786 - add charset on dynamic (#6027)
* TDI-45786 - add charset on dynamic
2021-04-08 11:38:21 +02:00
Dmytro Sylaiev
29ec16e725 fix(TDI-42478): tFTPConnection : SSL/TLS Client Authentication does not work : no suitable certificate found - continuing without client authentication (#5971)
Co-authored-by: s.bovsunovskyi <s.bovsunovskyi@globallogic.com>
2021-04-08 10:56:55 +03:00
hcyi
6e5e7d1e0a fix(TUP-30731):tELTPostgresqloutput context not work when checked "use (#6021)
update statement without subqueries"
2021-04-08 14:57:12 +08:00
hcyi
5dda69da6a fix(TUP-30793):TCK Datastore on studio Metadata. (#6049) 2021-04-08 11:20:44 +08:00
hzhao-talendbj
e534bed3e0 chore(TUP-27039): Update Commons Compress to 1.19 backport to 7.3 (#5996) 2021-04-08 10:51:44 +08:00
wang wei
56bc8ee766 fix(TDI-45815): CVE: xstream-1.4.15.jar (#6040) 2021-04-08 09:34:57 +08:00
Zhiwei Xue
71413a41dc fix(TUP-30780):Only check used custom jars when run/build Job (#6041) 2021-04-06 15:52:30 +08:00
Dmytro Sylaiev
6240c4331e fix(TDI-45776): Bump slf4j-jdk14 version to make it downloadable (#6017)
* fix(TDI-45776): Bump slf4j-jdk14 version to make it downloadable

* fix(TDI-45776): Apply also for tBonitaInstantiateProcess
2021-04-06 10:48:53 +03:00
Zhiwei Xue
92fac62ac0 fix(TUP-30977):test run map using custom routines and beans doesn't work (#6023)
after switch branch
2021-04-06 12:05:56 +08:00
Laurent BOURGEOIS
8bdca657d4 fix(TBD-11968):CVE commons-collections 3.2.1 (#5866) 2021-04-02 15:43:30 +02:00
bhe-talendbj
ea33bcd37e feat(TUP-30047): Need support of tRunJob with Dynamic Job option enabled on test cases / CI/CD (#6007)
* fix(TUP-30047): Correct classpath for tRunJob in CI mode

* feat(TUP-30047): support running dynamic jobs

* feat(TUP-30047): change location of classpath.jar if running ci test
2021-04-02 16:14:27 +08:00
AlixMetivier
61b2b21833 feat(TBD-11317): allow tS3Configuration to work with assume role in joblet (#5980) 2021-04-01 14:11:27 +02:00
pyzhou
399ae80700 fix(TDI-45834):tFileCopy change module name (#6019) 2021-03-31 16:49:31 +08:00
jiezhang-tlnd
10fd426856 chore(TUP-29381): add dependency for assembly (#5574) (#5839)
* chore(TUP-29381): add dependency for assembly

* add dependency

* add to template

Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>
2021-03-30 15:57:13 +08:00
bkatiukhov
c113df2c41 TESB-32307 tESBConsumer - wrong header content-type (#5976)
Co-authored-by: bohdan.katiukhov <bohdan.katiukhov@KBP1-LHP-A00125.synapse.com>
2021-03-29 10:18:38 +02:00
pyzhou
4eb679c6e9 fix(TDI-45727):CVE jackson-mapper-asl (#5946) 2021-03-26 18:49:01 +08:00
Dmytro Sylaiev
1cf44a07ec fix(TDI-45642): Throw an warning exception when every column is a key… (#5855)
* fix(TDI-45642): Throw an warning exception when every column is a key for update

* Refactor, deduplicate code

* fix(TDI-45642): Fix codegen error for mssql

* fix(TDI-45642): Throw an error for update on duplicate mysql

* fix(TDI-45642): Warn message instead of exception for insert or update
2021-03-25 11:23:49 +02:00
Zhiwei Xue
0bdf41d228 fix(TUP-30813):Add Junits for dependency management feature (#6003) 2021-03-25 09:39:19 +08:00
Laurent BOURGEOIS
c64fec7601 fix(TBD-12776): Fix testAddLog4jToModuleList unit test (#5998) 2021-03-24 11:05:56 +01:00
Oleksandr Zhelezniak
8ab6492011 feat(TDI-45732): extend not dieoneerror area (#5991)
* extend try-block that includes "Input tables (lookups)"
2021-03-24 10:28:51 +02:00
Zhiwei Xue
780ce47ad7 fix(TUP-30779):Custom jar resource unload issue after git pull&merge. (#5982)
* fix(TUP-30779):Custom jar resource unload issue after git pull&merge.

* fix(TUP-30845): fix refreshing NPE
2021-03-24 16:21:11 +08:00
clesaec
9d04099b86 TDI-45772 : unarchiv correction (#5981) 2021-03-23 09:29:59 +01:00
sbliu
e3775bacfe fix(TUP-25417) JDK11: run a job call a child job use twebservice meet error.
using relative path for building parent job(whose child job contains esb cxf components) on jdk11
2021-03-23 14:55:04 +08:00
Jane Ding
0e1a65b82f fix(TUP-30615):Schema Update Detection popping up everytime upon opening (#5973)
the job
https://jira.talendforge.org/browse/TUP-30615

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-23 11:30:23 +08:00
Oleksandr Zhelezniak
75c51b6dec feat(TDI-45746): fix date context variable (#5943)
* fix the logic of passing date variable to sub jobs
2021-03-19 10:58:02 +02:00
Dmytro Sylaiev
f809f597b4 fix(TDI-45741): Fix checkbox visibility (#5924) 2021-03-19 09:53:22 +02:00
sbliu
97bad0d5ca chore(TUP-30522) add test case for version contains 'SNAPSHOT' 2021-03-18 14:16:56 +08:00
apoltavtsev
a74a54214e fix(TESB-32507) Correct manifest generation for org.talend.esb.authorization.xacml.rt.pep 2021-03-17 20:21:23 +01:00
Jane Ding
bbc2e81686 fix(TUP-30758):tSingleStoreOutputBulkExec can't work (#5964)
https://jira.talendforge.org/browse/TUP-30758

Signed-off-by: jding-tlnd <jding@talend.com>
2021-03-17 09:43:47 +08:00
Max
6bf37640b9 fix(TBD-12011): tDBclose connection deltalake on error - moved to correct package (#5905) 2021-03-16 11:50:49 +02:00
clesaec
b5d8c8d0f3 Clesaec/tdi 45301 t s3 acl (#5829)
* TDI-45301 - ACL canned options added
2021-03-16 10:41:20 +01:00
Oleksandr Zhelezniak
95afb4904e feat(TCOMP-1877): clean cached libs studio-integration (#5961)
* clean cached libs during clean phase for studio-integration plugin
* help to avoid using the out-to-date version of jars in plugin
2021-03-16 10:45:16 +02:00
Zhiwei Xue
322a55e751 feat(TUP-29014): bugfix 2021-03-15 (#5951) 2021-03-15 15:33:36 +08:00
SunChaoqun
028578141e TESB-32453:DemoServiceConsumer/DemoRESTConsumer fail to deploy to (#5952)
runtime with message"[statistics] disconnected"
2021-03-15 15:04:23 +08:00
Dmytro Grygorenko
d7c09e2d71 feat(TDI-45590): migration task for CosmosDB (#5861) 2021-03-14 08:25:45 +02:00
AlixMetivier
24ae727858 feat(TBD-11882): update tCollectAndCheck for BD (#5919) 2021-03-12 16:49:57 +01:00
hzhao-talendbj
1e39f1e09c TUP-30589 fix junit failed (missing jar beanutils-1.9.2 & axis-1.4) (#5939) 2021-03-12 10:30:56 +08:00
205 changed files with 4967 additions and 7756 deletions

View File

@@ -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"/>

View File

@@ -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();
}

View File

@@ -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" />

View File

@@ -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>

View File

@@ -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
*

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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%>;

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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'" />

View File

@@ -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')" />

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();

View File

@@ -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>

View File

@@ -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

View File

@@ -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 %>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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%>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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%>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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%>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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;
<% } %>
}
};

View File

@@ -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>

View File

@@ -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

View File

@@ -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 %>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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%>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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%>();

View File

@@ -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>

View File

@@ -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

View File

@@ -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" />

View File

@@ -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{

View File

@@ -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{

View File

@@ -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());
<% }%>

View File

@@ -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__");

View File

@@ -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">

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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">

View File

@@ -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);
}

View File

@@ -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">

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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%>;

View File

@@ -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__");

View File

@@ -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"%>
<%

View File

@@ -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__");

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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 {
<%
}
%>// ###############################
<%

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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++) {

View File

@@ -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);
}

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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.");
<%
}

View File

@@ -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"
>

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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)) {

View File

@@ -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

View File

@@ -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__");

View File

@@ -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