Compare commits

..

177 Commits

Author SHA1 Message Date
pyzhou
61d8175d80 fix(TDI-45863): remove Input limit for tck reuse connection (#7088) 2022-03-09 09:20:58 +08:00
wang wei
738b55f748 fix(TDI-47154): send exception info for audit log (#7288) 2022-03-08 22:02:07 +08:00
bhe-talendbj
0ae5d46067 feat(TUP-33809): check modulelist (#7209)
* feat(TUP-33809): check modulelist

* feat(TUP-33809): get all sub jobs
2022-03-08 10:44:03 +08:00
zshen-talend
15aff46503 Zshen/feat/tdq 20069 backport on 80 for patch3 (#7280) 2022-03-07 17:23:58 +08:00
Dmytro Sylaiev
4ca2a26c61 feat(TDI-47211): Revert from R2022-03
This reverts commit ecb8c2d693.
2022-03-07 09:53:41 +02:00
wang wei
8590938a0c fix(TDI-47230): close thread pool for spring boot case (#7272) (#7275) 2022-03-07 09:38:40 +08:00
pyzhou
fb709ec46e feat(TDI-47136):tcreateTable upgrade snowflake driver (#7241) 2022-03-04 17:56:58 +08:00
Chao MENG
2b9b21b2ed fix(TUP-30599): tMap drag and drop does not work seamlessly in Linux GUI (#7269)
as it does in Windows
https://jira.talendforge.org/browse/TUP-30599
2022-03-04 16:13:08 +08:00
Dmytro Grygorenko
54375a9349 fix(TDI-47485): update "protobuf-java" to 3.19.2 (#7187) 2022-03-04 11:09:52 +08:00
jiezhang-tlnd
fa924629aa Backport localized files 0303 (#7277)
* Add localized files (#7231)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7236)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7240)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7276)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
2022-03-04 08:41:24 +08:00
jiezhang-tlnd
f00f9c3c39 Jzhang/80/tup 34609 (#7252)
* fix(TUP-34609)Cannot retrieve Module Name in tSalesforceInput with
password starting with double-quotes

* change condition
2022-03-02 18:26:06 +08:00
kjwang
9151de9cde Kjwang/fix tup 32950 on ubuntu (#7265)
* Fix TUP-32950 On Ubuntu 18.04.5 documentation comment is displayed as a
black box in Talend Studio designer tab
https://jira.talendforge.org/browse/TUP-32950
2022-03-02 17:28:06 +08:00
Xilai Dai
a597e57466 fix(APPINT-33965) add the rhino dependencies into OSGi build of tRESTRequest (#7257) 2022-03-02 10:28:24 +08:00
Dmytro Ochkas
e5f763b4e1 fix(TDI-46789): tMSSqlOutputBulkExec can't work with server on Linux … (#7142)
* fix(TDI-46789): tMSSqlOutputBulkExec can't work with server on Linux platform

Added new checkbox which enables/disables codepage

* fix(TDI-46789): tMSSqlOutputBulkExec can't work with server on Linux platform

Fixed formatting issues

* fix(TDI-46789): tMSSqlOutputBulkExec can't work with server on Linux platform

Fixed one more formatting issue

* fix(TDI-46789): tMSSqlOutputBulkExec can't work with server on Linux platform

Adjusted naming with tMssqlBulkExec component
2022-03-01 14:08:02 +08:00
Liu Xinquan
c3426fdd2f fix(TBD-13419) Class not found happen in spark job calling a standard… (#7163) (#7238) 2022-02-28 14:54:38 +08:00
sbliu
d3f6f5b292 fix(TUP-34769) add junit (#7254) 2022-02-28 14:24:54 +08:00
wwang-talend
941da0bc39 fix(TDI-47230): use fixedthreadpool for TDM 2022-02-28 14:06:05 +08:00
hcyi
d0f9060bd4 fix(TUP-34593):Cannot connect to Salesforce with password starting with double-quotes (#7248)
* fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes

* fix(TUP-34593):Cannot connect to Salesforce with password starting with
double-quotes

* fix(TUP-34593):add junits
2022-02-25 17:51:57 +08:00
wang wei
02ed52e0cc fix(TDI-46642): Observability: connector_label is not correct (#7171) 2022-02-24 18:33:53 +08:00
wang wei
e976c9bf62 fix(TDI-47230): avoid create thread for every task for twritexmlfield/twritejsonfield in loop (#7235) 2022-02-24 14:34:16 +08:00
sbliu
bfbf2bbf36 fix(TUP-34769) Error fields for Rejects get dropped from tSalesforceOutput after Sync Columns. (#7233)
fix bug TUP-33497
2022-02-23 18:01:28 +08:00
apoltavtsev
af3fd09333 fix(APPINT-34330) Deprecated build type conversion is removed 2022-02-23 05:36:56 +01:00
Dmytro Sylaiev
f16c97d6bd feat(TDI-47211): Update active dir drivers for mssql (#7057)
* feat(TDI-47211): Update active dir drivers for mssql

* feat(TDI-47211): Fix the pb with component descriptor
2022-02-21 13:58:11 +02:00
pyzhou
4c0894125f fix(TDI-47223):CVE axis2-kernel 1.8.0 (#7153)
* fix(TDI-47223):CVE axis2-kernel 1.8.0

* Other axis2 jar

* upgrade dependency

* correct compile error

* compile error
2022-02-21 17:22:07 +08:00
Dmytro Grygorenko
f56ea273f8 fix(TDI-47524): replace non-dynamic column for PosgresqlOutput with dynamic schema. (#7223) 2022-02-21 10:22:21 +02:00
Jane Ding
e52b6fd10f Revert "fix(TUP-28898):Drag Exasol connection to a job choose tDBOutput(Exasol) (#7023)" (#7217)
This reverts commit 6b82e95328.
2022-02-18 17:17:40 +08:00
unknown
51432e83c6 Revert "feat(TBD-12990): Dataproc TP"
This reverts commit 982a048e43.
2022-02-17 19:22:16 +01:00
Svitlana Ponomarova
982a048e43 feat(TBD-12990): Dataproc TP 2022-02-17 14:19:53 +02:00
AlixMetivier
b1f26c263b feat(TBD-12989): add databricks to universal plugins (#7143)
* feat(TBD-12989): add databricks to universal plugins

* feat(TBD-12989): add databricks to universal plugin
2022-02-17 11:32:16 +01:00
kjwang
5e89b28c72 Revert "Fix TUP-32950 On Ubuntu 18.04.5 documentation comment is displayed as a (#7098)" (#7211)
This reverts commit 20a1cd9476.
2022-02-17 17:32:07 +08:00
ypiel
53328080a5 fix(TDI-46848): mscrm oauth2+on-premise + client secret (#7157)
* fix(TDI-46848): add mscrm oauth2 logs

* fix(TDI-46848): Add client secret for oauth2 on-premise

* fix(TDI-46848): Fix pom version.

* fix(TDI-46848): client_secret not mandatory
2022-02-17 10:23:36 +01:00
kjwang
044548edc1 TUP-34156 UI is broken for TCK Table structures in 8.0.1 + nighty (#7202)
TUP-34156 UI is broken for TCK Table structures in 8.0.1 + nighty
https://jira.talendforge.org/browse/TUP-34156
2022-02-17 11:46:57 +08:00
Dmytro Ochkas
af479b6e6a fix(TDI-47435): tPostgreSqlOutput 'Debug query mode' and 'Upsert' (#7167)
* Modified some DB templates so they initialize unresolved variable when dataAction is 'Upsert'
2022-02-16 19:12:34 +02:00
Dmytro Grygorenko
c12301d5a3 fix(TDI-47344): update Apache Ant for tFileUnarchive. (#7208) 2022-02-16 16:30:02 +02:00
Dmytro Grygorenko
459cb23bae fix(TDI-47437): check for replaced column for Postgres Upsert action. (#7207) 2022-02-16 16:24:31 +02:00
Dmytro Ochkas
2896cb57d4 fix(TDI-47436): tPostgreSqlOutput upsert and dynamic column (#7172)
* ON CONFLICT clause now contains not only dynamic columns but not dynamic ones as well
2022-02-16 16:00:32 +02:00
Dmytro Ochkas
ece6b4cd0d fix(TDI-47385): tMap error when tenary operator is used (#7188)
Add parentheses so that user don't add them manually
2022-02-16 15:37:11 +02:00
pyzhou
cdd89534b9 fix(TDI-47396):tSCPGet doesn't always close session (#7134) 2022-02-14 17:51:59 +08:00
jiezhang-tlnd
e64820cab0 Master localized file backport 2022 0210 (#7197)
* Add localized files (#7192)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7194)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7196)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: sbouyer <35452259+sbouyer@users.noreply.github.com>
2022-02-14 16:01:31 +08:00
Jane Ding
6b82e95328 fix(TUP-28898):Drag Exasol connection to a job choose tDBOutput(Exasol) (#7023)
not work as tExasolOutput
https://jira.talendforge.org/browse/TUP-28898
2022-02-14 10:12:40 +08:00
hzhao-talendbj
b59ff111a5 fix(TUP-33639): Job which import by metedata bridge:NPE (#7141)
* fix(TUP-33639): Job which import by metedata bridge:NPE when
check/uncheck "use project settings" in stats&logs

* fix(TUP-33639):   add junit

* fix(TUP-33639): add junit

* fix(TUP-33639): Job which import by metedata bridge:NPE
2022-02-10 16:04:57 +08:00
jiezhang-tlnd
7f018d34f1 Master localized file backport 2022 0203 (#7185)
* Add localized files (#7180)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7181)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-02-07 18:02:10 +08:00
zyuan-talend
2281fab273 fix(TUP-34489):forward interpreter to child job in commandline. (#7162) 2022-02-07 12:15:08 +08:00
Dmytro Ochkas
87c369ca1e fix(TDI-35717): tOracleBulkExec's action on table still used when invisible (#7114)
Added additional if wrappers to the sections where data action is processed in tOracleBulkExec_begin.javajet and tOracleBulkExec_end.javajet. The wrappers check if .ctl file or manual .ctl code is used and if so no data action has to be processed
2022-01-28 13:32:21 +02:00
jiezhang-tlnd
346755a798 Master localized file backport 2022 01 27 (#7170)
* Add localized files (#7164)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7165)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-01-28 16:00:50 +08:00
jiezhang-tlnd
6373dabd6f fix(TUP-34575)Correction to messages-properties file (#7168)
* fix(TUP-34575)Correction to messages-properties file

* fix(TUP-34575)Correction to messages-properties file

* fix(TUP-34575)Correction to messages-properties file
2022-01-28 14:53:05 +08:00
apoltavtsev
74cf2ca49d feat(APPINT-32531) Make all DS/Route builds Java 11 and above compatible, design/build & run should work with different Java versions (#7127) 2022-01-27 09:25:39 +01:00
Laurent BOURGEOIS
13d4589675 fix(TBD-13463):No FileSystem for scheme: HDFS on any EMR 5.29 job on Talend 8 (#7124) 2022-01-26 17:54:55 +01:00
jiezhang-tlnd
921629ac8f fix(TUP-34281): Cleanup of old translation files (#7105)
* fix(TUP-34281): Cleanup of old translation files

* Cleanup of old translation files
2022-01-26 18:13:06 +08:00
wang wei
e59cadab69 fix(TDI-47395): tPostgresqlOutput cannot select Insert as Action on Data when disable the Log4j(#7136) 2022-01-26 16:47:10 +08:00
jzhao
64c85d2f10 fix(TDI-47375):tMicrosoftCRM components with compile error when using OnPremise 2011 (#7115)
* fix(TDI-47375):tMicrosoftCRM components with compile error when using
OnPremise 2011

* fix(TDI-47375):class not found issue
2022-01-25 09:36:39 +08:00
kjwang
20a1cd9476 Fix TUP-32950 On Ubuntu 18.04.5 documentation comment is displayed as a (#7098)
Fix TUP-32950 On Ubuntu 18.04.5 documentation comment is displayed as a black box in Talend Studio designer tab
https://jira.talendforge.org/browse/TUP-32950
2022-01-21 14:47:31 +08:00
zyuan-talend
2a4d97e2f9 fix(TUP-27184):add junit test (#7145) 2022-01-21 11:06:59 +08:00
Wei Hua
5dfb2fa414 Hwei/bugfix/801/appint 33765 (#7138)
* APPINT-33765 [7.3.1 patch] ClassNotFoundException in runtime when DB connection (SQLServer) in joblet without using alias

* APPINT-33765 [7.3.1 patch] ClassNotFoundException in runtime when DB connection (SQLServer) in joblet without using alias
2022-01-21 10:30:44 +08:00
jiezhang-tlnd
635ef37f93 Add localized files (#7149) (#7151)
* Add localized files (#7149)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7150)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
2022-01-21 09:55:53 +08:00
Jane Ding
cc8ff04ccb Add localized files (#7123) (#7146)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-01-20 10:12:36 +08:00
Emmanuel GALLOIS
1112ea17e2 feat(TCOMP-2045): Pass meta information about columns (#7099)
* feat(TCOMP-2045): fix quotes and escaping issues
- add import
2022-01-19 17:14:14 +01:00
Jill Yan
aaaf1e0ba5 APPINT-31044 (#7109)
Co-authored-by: jillyan <yan955599@gmail.com>
2022-01-19 17:05:07 +08:00
zshen-talend
05d204762f feat(TDQ-19814): clear the code let it call adjustPomGeneration only to (#7131)
avoid some TDM regression
2022-01-17 19:47:03 +08:00
Abdulhamid Rashankar
759c85b2f9 APPINT-33784: Project analysis task - Warn about custom component dependencies risk (#7129) 2022-01-17 12:41:42 +01:00
Jill Yan
63c037343c Revert "jill/fix/m80/APPINT-33992 (#7071)" (#7125)
This reverts commit 4c48cc91b3.
2022-01-17 12:04:07 +08:00
zyuan-talend
7e61986aa2 fix(TUP-27184):revert javajet change. (#7117) 2022-01-14 22:09:46 +08:00
Zhiwei Xue
766fe40204 fix(TUP-34469):fix comp cache path problem (#7120) 2022-01-14 19:45:31 +08:00
zshen-talend
dea6be3175 Zshen/feat/tdq 19814 backport 80 (#7112)
* feat(TDQ-19814): create a new component for tDataQualityRules

* feat(TDQ-19814): use adjustPomGeneration method instead of
adjustClassPath method to avoid conflict with TDM case
2022-01-13 16:59:38 +08:00
zyuan-talend
8da7c1aa17 fix(TUP-27184):escape label value for javajet. (#7111) 2022-01-13 16:40:15 +08:00
jiezhang-tlnd
b8191aa46c fix(TUP-34021)CVE org.apache.maven:maven-core:3.8.1 (#7106) 2022-01-13 15:27:14 +08:00
Tetyana Meronyk
532b8200f1 feat(TDI-46151): Filter data based on return value in subquery in source database before pushing it down to a tDBInput to execute (#6906) (#7108)
feat(TDI-46151): Filter data based on return value in subquery in source database before pushing it down to a tDBInput to execute

(cherry picked from commit 2c25ae3771)
2022-01-12 17:39:25 +02:00
hcyi
dff1b037c0 fix(I18N-322):change a message to "Set the connection and read timeouts" (#7059) 2022-01-12 16:18:42 +08:00
Jill Yan
4c48cc91b3 jill/fix/m80/APPINT-33992 (#7071)
* APPINT-33992

* revert mis-commit in previous

* APPINT-33992

* APPINT-33992

* APPINT-33992

* APPINT-33992

* APPINT-33992

Co-authored-by: jillyan <yan955599@gmail.com>
2022-01-12 15:57:22 +08:00
ozhelezniak
49493eb6de Merge branch 'maintenance/8.0' of github.com:Talend/tdi-studio-se into maintenance/8.0 2022-01-11 11:37:22 +02:00
Oleksandr Zhelezniak
86de9b6f45 fix(TDI-47222): invoke stop after flush (#7104)
* TCK studio-integration
* method stop should be invoked after the method flush for producers (outputs)
2022-01-11 10:56:20 +02:00
Oleksandr Zhelezniak
ffd5625247 fix(TDI-47222): invoke stop after flush (#6985)
* TCK studio-integration
* method stop should be invoked after the method flush for producers (outputs)

(cherry picked from commit 54b17eea2c)
2022-01-11 10:53:14 +02:00
zyuan-talend
a81d38bb2a fix(TUP-27184): copy label from GraphicNode to DataNode. (#7095) 2022-01-11 15:48:34 +08:00
wang wei
2ce8037e4e fix(TDI-47212): CVE: jackson-mapper(core)-asl-1.9.15-TALEND (#7001) 2022-01-10 15:09:17 +08:00
Jane Ding
2d02f681d9 Add localized files (#7092)
* Add localized files (#7090)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7091)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-01-07 11:17:52 +08:00
kjwang
52c8a51e2b TUP-34282 CVE: log4j-core(1.2-api)-[2-2.16.0) (#7083)
TUP-34282 CVE: log4j-core(1.2-api)-[2-2.16.0)
https://jira.talendforge.org/browse/TUP-34282
2022-01-07 10:00:39 +08:00
Oleksandr Zhelezniak
bb2b0c89f4 fix(TDI-46410): update namespace in xml element (#7018) 2022-01-04 14:38:04 +02:00
Jane Ding
ef8bd6950a Localize message update 4 maintenance80 (#7081)
* Add localized files (#7077)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7079)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-01-04 12:02:13 +08:00
ypiel
fea9ec3fb9 feat(TDI-46093): Customize tck/connection name (#6976)
* feat(TDI-46093): Support defined connection name

* feat(TDI-46093): Update defaultName

* use cache one to avoid recall every time

Co-authored-by: wwang-talend <wwang@talend.com>
2022-01-03 11:46:57 +01:00
Abdulhamid Rashankar
f996786ed7 APPINT-33784: Project analysis task - Warn about custom component dependencies risk (#6997)
Co-authored-by: arashankar <abdulhamid0606@gmail.com>
2022-01-03 10:09:53 +01:00
Jane Ding
156ffa5b3f Localize message update 4 maintenance80 (#7074)
* Add localized files (#7058)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#7065)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2021-12-31 18:06:59 +08:00
pyzhou
241a784b36 fix(TDI-47234):tXSLT cache source in memory (#7021)
* fix(TDI-47234):tXSLT regression

* migration task

* correct migration task

* Correct ExecutionResult

* Correct Migration result
2021-12-31 11:43:32 +08:00
jillyan
9492ef6034 revert for mis-push 2021-12-30 18:14:40 +08:00
jillyan
f806f96585 APPINT-33992 2021-12-30 18:07:21 +08:00
Zhiwei Xue
3457ffb30f workitem(TUP-34111):slow studio build time for remote execution (#7039) 2021-12-30 16:07:09 +08:00
jiezhang-tlnd
08f1d92ee6 fix(TUP-33863)Update of Metadata Hadoop Cluster does not change spark (#6944)
* fix(TUP-33863)Update of Metadata Hadoop Cluster does not change spark
version when propagated
https://jira.talendforge.org/browse/TUP-33863

* format code

* format code

* fix(TUP-33863)Update of Metadata Hadoop Cluster does not change spark
version when propagated

Conflicts:
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/ui/editor/properties/controllers/ComboController.java

* add common judgment

Conflicts:
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/ui/editor/properties/controllers/ComboController.java

* add common fix

* Update of Metadata Hadoop Cluster does not change spark version when
propagated

Conflicts:
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/ui/editor/properties/controllers/ComboController.java
2021-12-30 15:09:31 +08:00
jiezhang-tlnd
5cb031a8ed chore(TUP-34021)CVE: org.apache.maven:maven-core:3.8.1 (#7011) 2021-12-30 15:01:25 +08:00
Olha V
daeea2641a feat(TDI-46430): Kafka Input Output Avro support (#6981) (#7067)
* feat(TDI-46430): Kafka Input Output Avro support

* add migration task for security settings setup order

* feat(TDI-46430): Kafka Input Output Avro support

* add check if https settings not empty

* feat(TDI-46430): Kafka Input Output Avro support

* fix migration task status

* feat(TDI-46430): Kafka Input Output Avro support

* add check for kafka version
2021-12-29 14:56:47 +02:00
Wei Hua
f78696e776 APPINT-34077 RuntimeException: java.lang.NoClassDefFoundError: org/apache/cxf/databinding/DataBinding (#7064) 2021-12-29 14:48:39 +08:00
Jane Ding
02738c0a79 fix(TUP-33830):[7.3] ref project compilation error (#7053)
https://jira.talendforge.org/browse/TUP-33830
2021-12-29 11:35:24 +08:00
Emmanuel GALLOIS
a992419605 fix(TCOMP-2053): correct migration issue w/ context + function call (#7009) 2021-12-29 11:25:28 +08:00
Zhiwei Xue
ffd2e378ae fix(TUP-33966):Studio/commandline fails to generate code for the job, (#6977)
throws "Invalid thread access"
2021-12-29 09:45:56 +08:00
jiezhang-tlnd
c59a2743de fix(TUP-34123)talendcsv-1.0.0.jar is missing on Guess Schema (#7016) 2021-12-28 14:15:50 +08:00
sbliu
e8e4751a2e chore(TUP-33956) remove xercesImpl from libraries needed. (#7027) 2021-12-27 15:50:55 +08:00
hcyi
4cc46a0bc7 fix(TUP-33897):Remove username from Studio Cloud Login. (#7017) 2021-12-27 10:28:30 +08:00
Chao MENG
0a21c8d735 chore: hide parallelize (#7046) 2021-12-23 14:34:41 +08:00
Dmytro Grygorenko
aee76ce19a fix(TDI-47228): tPostgresqlOutput Upsert existing connection (#7049) 2021-12-20 17:07:37 +02:00
Dmytro Grygorenko
78a28bc217 fix(TDI-46743): avoid file locking when using "streaming append" feature. (#7042) 2021-12-20 14:25:34 +02:00
Jane Ding
89f29eecc2 Add localized files (#7032) (#7045)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2021-12-20 09:56:45 +08:00
Dmytro Sylaiev
7444c68931 fix(TDI-46910): Fix codegen and compile errors for dynamic schemas (#7019) 2021-12-17 10:41:37 +02:00
bhe-talendbj
a7d2ebbfe1 fix(TBD-13373): User did not initialize spark context when I run a simple spark job with HDI4 (#7033) 2021-12-16 19:49:37 +08:00
bhe-talendbj
db2e13c963 fix(TUP-34105): backport (#7024) 2021-12-15 11:44:27 +08:00
Tetyana Meronyk
b0700e6aba fix(TDI-46943): Dynamic schema fail's with Excel (#6992)
* fix(TDI-46943): Dynamic schema fail's with Excel
2021-12-14 15:51:50 +02:00
bhe-talendbj
450c4062ef fix(TUP-34105): upgrade log4j2 (#7006)
* fix(TUP-34105): upgrade log4j2

* fix(TUP-34105): update version
2021-12-14 15:40:37 +08:00
wang wei
878c793b30 fix(TDI-46962): tAmazonAuoraOutput compilation errors (#6872) 2021-12-13 11:22:44 +08:00
nrousseau
162d69539c fix(TUP-34110): fix tck dependencies (#7005)
* fix(TUP-34110): fix tck dependencies

* fix(TUP-34110): fix tck dependencies
2021-12-13 11:14:26 +08:00
Tetyana Meronyk
3ce05e9d7f fix(TDI-46834): Additional columns in tDBOutput doesn`t generate code properly (#6825) (#7002)
* fix(TDI-46834): Additional columns in tDBOutput doesn`t generate code properly

(cherry picked from commit 82243d59ac)
2021-12-10 15:21:39 +02:00
Dmytro Sylaiev
bb173c5e77 fix(TDI-46910): Add hadnling escaping of ELTOutput for quotes (#6875)
* fix(TDI-46910): Add hadnling escaping of ELTOutput for quotes

* fix(TDI-46910): Fix create table statement compile error
2021-12-09 16:18:13 +02:00
Xilai Dai
340f572844 Bugfix/maintenance/8.0/appint 34009 (#6901)
* (APPINT-34009) fix the tCosmosDB and tNeo4j dependency issues when building microservice

* (APPINT-34009) fix the regexp and jar name
2021-12-09 17:11:34 +08:00
hcyi
028ffd2beb feat(TUP-33198):Support retrieve SAP ADSO service metadata with SAP JCO3 (#6942) 2021-12-09 16:57:49 +08:00
kjwang
2c3708280a TUP-33713 Logon popup message in a mess when main project and refer (#6954)
* TUP-33713 Logon popup message in a mess when main project and refer
project are on different patch level
https://jira.talendforge.org/browse/TUP-33443
2021-12-09 16:40:30 +08:00
Jane Ding
1a5cc1038d Master loc backport (#6994)
* Add localized files (#6986)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#6988)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: sbouyer <35452259+sbouyer@users.noreply.github.com>
2021-12-09 10:45:16 +08:00
jiezhang-tlnd
a74752e87d Jzhang/80/tup 33728 re (#6968)
* add migration

* add migration

* fix migration

* add copyright
2021-12-09 09:25:46 +08:00
jzhao
8bdc378efd feat(TDI-45793):Add migration task for tSAPADSOInput (#6989)
* feat(TDI-45793):Add migration task for tSAPADSOInput

* chore(TDI-45793):add Copyright for migration task.
2021-12-08 17:54:23 +08:00
Dmytro Grygorenko
99beb58953 fix(TDI-47179): enable batch checkbox for Postgres Upsert. (#6961) 2021-12-08 11:22:52 +02:00
bhe-talendbj
1a7409fcb7 feat(TUP-33718): add distribution version (#6979) (#6982)
* feat(TUP-33718): add distribution version

* feat(TUP-33718): fix version
2021-12-07 17:52:10 +08:00
hcyi
036219f5ca fix(TUP-32940):Remove "Also search from Help when performing a component (#6984)
searching".
2021-12-07 17:35:12 +08:00
Emmanuel GALLOIS
7ed3514e38 fix(TCOMP-1988): add nashorn scripting engine for java11+ (#6974) 2021-12-07 09:31:03 +01:00
Christophe Le Saec
25d47c6db3 TDI-47170 : go root directory for sftp (duplicate code) 2021-12-06 10:08:46 +01:00
Wei Hua
e31db9e33a APPINT-34089 Project analysis task - Warn about duplicated routeId usage (#6970)
* APPINT-34089 Project analysis task - Warn about duplicated routeId usage

* update the way to get code value.

* correct component name in message
2021-12-03 17:31:34 +01:00
pyzhou
7bd2e943ed fix(TDI-47147):tMap TUJ fix (#6971)
# Conflicts:
#	main/plugins/org.talend.designer.components.localprovider/components/tAdvancedHash/tAdvancedHash_java.xml
2021-12-03 17:49:47 +08:00
apoltavtsev
4a1012dba8 fix(APPINT-33820): Add support for log assignment to TESB task. (#6966) 2021-12-02 12:29:59 +01:00
bhe-talendbj
12782d28c9 feat(TUP-33718): add system property to load dynamic distribution jars (#6904) (#6964)
* feat(TUP-33718): add system property to load dynamic distribution jars

* feat(TUP-33718): fix load dynamic distributions

* feat(TUP-33718): load all dynamic distribution jars

* feat(TUP-33718): load bigdata modules

* feat(TUP-33718): load all dynamic distributions

* feat(TUP-33718): show distribution display version

* feat(TUP-33718): replace display version by version

* feat(TUP-33718): fix bug

* feat(TUP-33718): load dynamic distribution modules

* feat(TUP-33718): load dynamic distribution modules
2021-12-02 17:15:05 +08:00
apoltavtsev
9cf5e2a29e fix(APPINT-34066) Fail to build route as OSGI to runtime with ClassNotFoundException on MacOS 2021-11-29 10:41:08 +01:00
wang wei
1ef9cf8cd1 fix(TDI-46850): Upgrade ActiveMQ Jars to 5.16.3 which align with ESB (#6924) 2021-11-29 17:29:11 +08:00
Chao MENG
951055f00c fix(TUP-33121): Talend Studio gives no error if unable to connect to (#6934)
remote GIT repository
https://jira.talendforge.org/browse/TUP-33121
2021-11-29 10:35:20 +08:00
kjwang
ec4be52d06 TUP-33443 The method tFileInputDelimited_1_onSubJobError(Exception, (#6936)
TUP-33443 The method tFileInputDelimited_1_onSubJobError(Exception,String, Map<String,Object>) is undefined for the type xxxxx
https://jira.talendforge.org/browse/TUP-33443
2021-11-29 10:06:05 +08:00
vyu-talend
c04240ee23 feat(TDI-45016):add query time out. (#6539) (#6900) (#6949)
* feat(TDI-45016):add query time out. (#6539)

* feat(TDI-45016):add query time out.

* feat(TDI-45016):optimize codes.

* feat(TDI-45016):fix bugs.

* feat(TDI-45016):fix some issues.

Conflicts:
	main/plugins/org.talend.designer.components.localprovider/components/tAS400Input/tAS400Input_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/tAS400Output/tAS400Output_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/tAS400Row/tAS400Row_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/tMSSqlInput/tMSSqlInput_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/tMSSqlOutput/tMSSqlOutput_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/tMSSqlRow/tMSSqlRow_messages.properties
	main/plugins/org.talend.designer.components.localprovider/components/templates/_tableActionForOutput.javajet

* feat(TDI-45016): fix something.
2021-11-26 18:00:17 +08:00
Wei Hua
53a35c7551 APPINT-32136 Job & Run view displays DI job icon and/or label when a route or routelet editor is active (#6889) (#6941)
* APPINT-32136 Job & Run view displays DI job icon and/or label when a route or routelet editor is active

* Fixing labels and Routelet icon

* change the way to determine routelet

* Solve NPE issue

* small changes
2021-11-25 17:00:29 +08:00
wang wei
5f966a7796 fix(TDI-47078): [7.3]Multiple SQL Statements in SQL Template => Duplicate local variable(#6909) 2021-11-25 15:48:35 +08:00
bhe-talendbj
b384608b4c fix(TUP-32838): Custom value in a table column with suggestable values is not allowed (#6819) (#6926)
* fix(TUP-32838): editable properties table

* fix(TUP-32838): support editable properties table

* fix(TUP-32838): support editable properties table

* fix(TUP-32838): support editable properties table

* fix(TUP-32838): rename property name

* fix(TUP-32838): editable for all of suggestable parameters

* fix(TUP-32838): resolve comments

* fix(TUP-32838): avoid invoking component
2021-11-25 14:55:41 +08:00
pyzhou
bdfe560cb4 fix(TDI-45710):tXSLT support for streaming input and output (#6251) (#6830)
* Added streaming support on inputs

* Added InputStream for the 2 input files

* Added support for input / output columns

* Removed the label as it was confusing than helpful.
Changed the XML / XSLT label as it supports Stream.

Output however does NOT support stream so changed it in the Override to File only.

* Upgraded the 15 year old saxon9.jar
My tests passed.

* fix xml column was not used issue

* According to the new writing standard, only the capitalize the first character of first word

Co-authored-by: pyzhou <pyzhou@talend.com>
# Conflicts:
#	main/plugins/org.talend.designer.components.localprovider/components/tXSLT/tXSLT_messages.properties

Co-authored-by: bgunics-talend <63251373+bgunics-talend@users.noreply.github.com>
2021-11-25 14:01:16 +08:00
pyzhou
979574709e fix(TDI-46857):Upgrade bcprov-jdk15on-1.69 2021-11-25 12:20:21 +08:00
bhe-talendbj
2b76ccc994 fix(TUP-33859): force upgrade for bcprov (#6915) (#6923)
Co-authored-by: nrousseau <nrousseau@talend.com>
2021-11-25 10:12:15 +08:00
Tetyana Meronyk
5f172ec096 fix(TDI-46986): tFTPGet component unable to get file from FileZilla Server, with a particular Filemask in Studio, after September patch, Patch_20210924_R2021-09_v2-7.3.1
(cherry picked from commit 69f3e4b340)
2021-11-24 11:47:41 +02:00
Tetyana Meronyk
15b20a6b4a fix(TDI-46791): tBigQueryInput - Component returning extra row of NULL values (#6724) (#6921)
fix(TDI-46791): tBigQueryInput - Component returning extra row of NULL values

(cherry picked from commit 56af81bdbc)
2021-11-24 11:47:16 +02:00
Olha V
352b69ee78 chore(TDI-46752): CVE: Oauth 2.0 SDK with OpenID (#6811) (#6935)
* chore(TDI-46752): CVE: Oauth 2.0 SDK with OpenID

* chore(TDI-46752): CVE: Oauth 2.0 SDK with OpenID

* bump talend-mscrm in tMicrosoftCrm

* chore(TDI-46752): CVE: Oauth 2.0 SDK with OpenID

* add content-type dependency
2021-11-23 18:24:13 +02:00
hzhao-talendbj
d4eb8346cc chore(TUP-33736): Backport for 8.0 (#6912)
* Add localized files

* Add localized files (#6884)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#6885)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: sbouyer <35452259+sbouyer@users.noreply.github.com>
2021-11-23 17:31:17 +08:00
Oleksandr Zhelezniak
3072be03f6 fix(TDI-46930): wrap filename (#6846) (#6930)
* wrap a filename in parenthesis to explicit handle java operations priority
2021-11-23 11:02:29 +02:00
jiezhang-tlnd
2587b78d01 fix(TUP-33467)Need to adjust the UI of check connection when tck (#6925)
component in studio
https://jira.talendforge.org/browse/TUP-33467
2021-11-23 16:37:47 +08:00
Dmytro Grygorenko
96daa21f6f feat(TDI-44717): fix backport issue for "maintenance/8.0" branch. (#6928) 2021-11-23 09:43:06 +02:00
Christophe Le Saec
05928ddb45 TDI-46905 : treat absolute path 2021-11-23 08:39:49 +01:00
Dmytro Grygorenko
f574223e1d feat(TDI-44717): Postgres Upsert feature (backport to 8.0.1). (#6919) 2021-11-22 14:29:34 +02:00
Dmytro Grygorenko
5e0191fc6b fix(TDI-46912): tELTOutput cannot locate & drop existing table in Snowflake. (#6918) 2021-11-22 14:09:36 +02:00
Dmytro Sylaiev
e4bc47faf4 fix(TDI-46790): Fix fetching big files GSGet (#6706) 2021-11-22 13:55:08 +02:00
Dmytro Grygorenko
15485b8073 fix(TDI-46746): CVE - update "protobuf-java" to 3.4.0 2021-11-22 09:40:36 +02:00
Xilai Dai
e54a5539a3 Bugfix/maintenance/8.0/appint 34059 (#6908)
* (APPINT-34059) fix the plexus-utils version in maven-bundle-plugin

* (APPINT-34059) fix the plexus-classworlds
2021-11-22 11:10:41 +08:00
apoltavtsev
dc2fe3ebff fix(APPINT-33956) Project analysis task - Seek for unresolved dependencies (Part 2) (#6913) 2021-11-19 14:20:51 +01:00
Jill Yan
3393c79cfc APPINT-34090 (#6911)
Co-authored-by: jillyan <yan955599@gmail.com>
2021-11-19 17:37:19 +08:00
Zhiwei Xue
ce827cf975 chore(TUP-33614):Update each component plugin, make sure it generates a (#6902) (#6910)
new timestamp at each build
2021-11-19 17:26:08 +08:00
bhe-talendbj
3aa81c490d Update version from 8.0.2-SNAPSHOT to 8.0.1-SNAPSHOT (#6898) 2021-11-18 12:02:03 +08:00
Christophe Le Saec
1bce339197 TDI-47072 : fix context 2021-11-17 08:58:51 +01:00
Jenkins Continuous Build server
8a9c24f80a Set version to 8.0.2 SNAPSHOT 2021-11-16 11:09:32 +01:00
apoltavtsev
ec3be21f28 feat (APPINT-33956) Project analysis task - Seek for unresolved dependencies (Part 2) (#6881)
* feat (APPINT-33956) Project analysis task - Seek for unresolved dependencies (Part 2)

* Update messages.properties

* Add files via upload

* Update UnresolvedComponentsDependenciesAnalysisTask.java
2021-11-09 09:25:33 +01:00
jiezhang-tlnd
ec4b7f1862 fix(TUP-33627)[Linux aarch64] License agreement panel and introduction (#6877)
are blank
2021-11-05 20:04:47 +08:00
Jane Ding
87b2d61e0c fix(TUP-33385):Error pops up while logging on migrated project (#6867) (#6873)
* fix(TUP-33385):Error pops up while logging on migrated project if the
project which exported from monthly patch studio>Studio
https://jira.talendforge.org/browse/TUP-33385

* fix(TUP-33385):Error pops up while logging on migrated project if the
project which exported from monthly patch studio>Studio
https://jira.talendforge.org/browse/TUP-33385
2021-11-04 19:55:46 +08:00
sbouyer
3aeb0f435f Add localized files (#6866)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2021-11-04 10:48:41 +08:00
Alexiane Yvonet
d3e732661d Add localized files (#6852)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2021-11-04 10:48:30 +08:00
tsasada-talend
4b02eab8ce Add localized files (#6853)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2021-11-04 10:48:19 +08:00
Jenkins Continuous Build server
df2cac92df Set version to 8.0.1 2021-11-03 17:02:08 +01:00
Dmytro Grygorenko
7ee99a9e56 fix(TDI-46968): fix compile error for tGreenplumOutput. (#6863) 2021-11-02 09:41:36 +02:00
hcyi
d9ad02e2b6 fix(TUP-33449):tPreJob trigger fails with GSS exception when "Set path (#6848)
to custom hadoop jar" is checked in 7.3.1
2021-11-02 15:23:50 +08:00
sbliu
74b894166d fix(TUP-33596) NPE when try to open project setting. (#6859) (#6861)
add NPE judgment
2021-11-02 11:30:23 +08:00
vyu-talend
d6d2dfdb6f fix(TDI-46921):change maven url path for miscrm. (#6856) 2021-11-01 11:38:33 +08:00
sbliu
b08087e24a feat(TUP-33462) Removal / deprecate of DB versions linked to DI components. (#6851) 2021-10-29 17:23:58 +08:00
pyzhou
4308b888d7 fix(TDI-46937): fix tmap tuj (#6845)
* fix(TDI-46937): fix tmap tuj

* fix(TDI-46937):fix tuj
2021-10-29 16:47:26 +08:00
Jane Ding
04448025a4 fix(TUP-33447):"servlet-api-2.5-20081211.jar" download failed when (#6810)
(#6809)

install libraries
https://jira.talendforge.org/browse/TUP-33447

Conflicts:
	main/plugins/org.talend.libraries.servlet/META-INF/MANIFEST.MF
	main/plugins/org.talend.libraries.servlet/pom.xml
	pom.xml
2021-10-29 15:09:18 +08:00
wang wei
a56fab7f5b fix(TDI-46476): as we remove some components, should adjust some tup junit(#6837) 2021-10-29 14:55:35 +08:00
Dmytro Sylaiev
f2422727b3 fix(TDI-46876): Fix dependencies list for tGoogleDataprocManage (#6847) 2021-10-29 10:45:42 +08:00
hcyi
94f818195d Hcyi/tup 33477 release/8.0.1 (#6823)
* feat(TUP-33477):Remove username/password authentication from Studio.

* feat(TUP-33477):Remove username/password authentication from Studio.

* feat(TUP-33477):keep username authentication for cloud on license select
dialog.
2021-10-28 15:47:04 +08:00
hzhao-talendbj
8679592c7e fix(TUP-33485): [tELTMap] Delimited identifiers does not work for (#6833) (#6838)
* fix(TUP-33485): [tELTMap] Delimited identifiers does not work for

* fix(TUP-33485): [tELTMap] Delimited identifiers does not work for

* fix(TUP-33485): [tELTMap] Delimited identifiers does not work for
2021-10-27 18:10:54 +08:00
wang wei
086d2763f3 fix(TDI-46286): upgrade org.slf4j version to 1.7.29 from 1.7.25 (#6733) 2021-10-27 15:47:09 +08:00
bhe-talendbj
939dd01908 chore(TUP-33502): Show installation of components only in debug mode (#6832) (#6835)
* chore(TUP-33502): change logs

* chore(TUP-33502): print logs in debug mode
2021-10-27 15:40:56 +08:00
zyuan-talend
5dfcdcfe5b fix(TUP-33392): remove un-needed Map Reduce related tests. (#6822) (#6834) 2021-10-27 15:24:07 +08:00
wang wei
d04e966718 fix(TDI-46476): Remove deprecated components in 8.0 (#6730) 2021-10-26 16:58:10 +08:00
jiezhang-tlnd
4294ecd024 update text (#6814) (#6817) 2021-10-25 14:37:28 +08:00
Jenkins Continuous Build server
1d2d17d71d Set version to 8.0.1 2021-10-21 16:11:20 +02:00
1168 changed files with 6117 additions and 26605 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.designer.feature" label="Designer Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.designer.feature" label="Designer Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
<description url="http://www.talend.com/online/featuresdescription.html#designer-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#designer-feature</description>
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
<license>The licence are describe in branding feature</license>

View File

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

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.fragment.jars.di.feature"
label="Fragment Jars in DI"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.di.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.gmf.feature"
label="Gmf"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
GMF

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.gmf.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.rcp.branding.tos.feature" label="Tos branding feature" version="8.8.8.qualifier" provider-name=".Talend SA." plugin="org.talend.rcp.branding.tos">
<feature id="org.talend.rcp.branding.tos.feature" label="Tos branding feature" version="8.0.1.qualifier" provider-name=".Talend SA." plugin="org.talend.rcp.branding.tos">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license>[Enter License Description here.]</license>

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.rcp.branding.tos.test.feature" label="Test feature for TOS" version="8.8.8.qualifier">
<feature id="org.talend.rcp.branding.tos.test.feature" label="Test feature for TOS" version="8.0.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
@@ -48,7 +48,6 @@
<plugin id="org.talend.repository.localprovider.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.metadata.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.sqlbuilder.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.view.di.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.view.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.testutils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.repository.feature" label="Repository Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.repository.feature" label="Repository Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
<description url="http://www.talend.com/online/featuresdescription.html#repository-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#repository-feature</description>
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
<license>The licence are describe in branding feature</license>

View File

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

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.azurestorage.feature"
label="Azure Storage"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Azure Storage

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.azurestorage.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.googledrive.feature"
label="Google Drive"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Google drive component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.googledrive.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.jdbc.feature"
label="JDBC_feature"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.jdbc.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.jira.feature"
label="Jira"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Jira component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.jira.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.marketo.feature"
label="Marketo"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Marketo component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.marketo.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.marklogic.feature"
label="Marklogic"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Marklogic component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.marklogic.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.netsuite.feature"
label="Netsuite"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Netsuite

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.netsuite.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.salesforce.feature"
label="Salesforce"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Salesforce component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.salesforce.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.snowflake.feature"
label="SNOWFLAKE_feature"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Snowflake

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.snowflake.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.splunk.feature"
label="Splunk"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
Splunk component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.1-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.splunk.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.tos.components.feature"
label="Components-feature"
version="8.8.8.qualifier">
version="8.0.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.core.feature" label="Feature" version="8.8.8.qualifier">
<feature id="org.talend.tos.core.feature" label="Feature" version="8.0.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.feature" label="Tos feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.tos.feature" label="Tos feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license>[Enter License Description here.]</license>

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.libraries.feature" label="Libraries_feature" version="8.8.8.qualifier">
<feature id="org.talend.tos.libraries.feature" label="Libraries_feature" version="8.0.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>

View File

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

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Abstract Map Plug-in
Bundle-SymbolicName: org.talend.designer.abstractmap;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1.qualifier
Bundle-Activator: org.talend.designer.abstractmap.MapPlugin
Require-Bundle: org.eclipse.core.runtime,
org.talend.core,

View File

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

View File

@@ -6,7 +6,7 @@ prefs.configuration.LINK_STYLE.LINE=\u76F4\u7EBF (\u5FEB)
DraggingInfosPopup.draggingEntry=\u62D6\u52A8 {0} \u6761\u76EE
DraggingInfosPopup.dropInvalid=\n<< \u65E0\u6548\u91CA\u653E >>\n
DraggingInfosPopup.draggingEntries=\u62D6\u52A8 {0} \u4E2A\u6761\u76EE\u3002
DraggingInfosPopup.dropInvalidWithKey=\n<< \u65E0\u6548\u653E\u7F6E >>\n\u6309\u4F4F Shift \u548C Ctrl \u952E\u4EE5\u8FDB\u884C\u4E00\u5BF9\u4E00\u6620\u5C04\u5E76\u6539\u5199
DraggingInfosPopup.dropInvalidWithKey=\n<<\u65E0\u6548\u653E\u7F6E>>\n\u6309\u4F4F Shift \u548C Ctrl \u952E\u4EE5\u8FDB\u884C\u4E00\u5BF9\u4E00\u6620\u5C04\u5E76\u6539\u5199
DraggingInfosPopup.overwriteMode= > \u91CD\u5199\u6A21\u5F0F
DraggingInfosPopup.appendMode= >\u9644\u52A0\u6A21\u5F0F
DraggingInfosPopup.appendModeToOverwrite= > \u8FFD\u52A0\u6A21\u5F0F (Ctrl \u952E\u6765\u6539\u5199)

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Alfresco Output Component Plug-in
Bundle-SymbolicName: org.talend.designer.alfrescooutput;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1.qualifier
Bundle-Vendor: .Talend SA.
Require-Bundle: org.eclipse.core.runtime,
org.talend.core,

View File

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

View File

@@ -13,8 +13,8 @@ AlfrescoModelDialog.addModelFailed=\u6DFB\u52A0\u6A21\u578B\u5931\u8D25
AlfrescoModelDialog.remove=\u79FB\u9664
AlfrescoModelDialog.removeModelFailed=\u79FB\u9664\u6A21\u578B\u5931\u8D25
AlfrescoModelDialog.missingTypeDefinitions.title=\u7F3A\u7701\u7C7B\u578B\u5B9A\u4E49
AlfrescoModelDialog.missingTypeDefinitions.msg=\u6240\u9009\u62E9\u7684\u7C7B\u578B\u6D89\u53CA\u672A\u77E5\u7684 Alfresco \u7C7B\u578B\u6216\u65B9\u9762: ${0}\u3002\n\u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingTypeDefinitions.msg=\u6240\u9009\u62E9\u7684\u7C7B\u578B\u6D89\u53CA\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u77E5\u7684 Alfresco \u7C7B\u578B\u6216asepct: ${0}.\n \u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B \u7C7B\u578B\u6216 aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingAspectDefinitions.title=\u7F3A\u7701\u65B9\u9762\u5B9A\u4E49
AlfrescoModelDialog.missingAspectDefinitions.msg=\u6240\u9009\u62E9\u7684\u65B9\u9762\u6D89\u53CA\u672A\u77E5\u7684Alfresco\u65B9\u9762: ${0}.\n\u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingAspectDefinitions.msg=\u6240\u9009\u62E9\u7684\u65B9\u9762\u6D89\u53CA\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u77E5\u7684 Alfresco aspect: ${0}.\n \u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.modelTable.title=\u6807\u9898
AlfrescoModelDialog.modelTable.name=\u540D\u79F0

View File

@@ -1,3 +1,4 @@
#Thu Jan 06 14:39:43 CST 2011
eclipse.preferences.version=1
encoding//src/main/java/org/talend/designer/codegen/components/model/ComponentsFactory.java=UTF-8
encoding//src/main/java/org/talend/designer/codegen/components/ui/ComponentsPreferencePage.java=UTF-8

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CodeGen Plug-in
Bundle-SymbolicName: org.talend.designer.codegen;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1.qualifier
Bundle-Localization: plugin
Require-Bundle: org.talend.core.repository,
org.eclipse.emf.codegen,
@@ -33,10 +33,8 @@ Export-Package: org.talend.designer.codegen,
org.talend.designer.codegen.components.ui,
org.talend.designer.codegen.config,
org.talend.designer.codegen.exception,
org.talend.designer.codegen.i18n,
org.talend.designer.codegen.model,
org.talend.designer.codegen.proxy,
org.talend.designer.codegen.stigma
org.talend.designer.codegen.proxy
Bundle-Vendor: .Talend SA.
Bundle-Activator: org.talend.designer.codegen.CodeGeneratorActivator
Import-Package: org.apache.commons.lang

View File

@@ -7,7 +7,6 @@ bin.includes = plugin.xml,\
jet_stub/,\
plugin.properties,\
plugin_de.properties,\
plugin_en.properties,\
plugin_es.properties,\
plugin_fr.properties,\
plugin_ja.properties,\

View File

@@ -1,232 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String nbRows = ElementParameterParser.getValue(node, "__NB_ROWS__");
List<Map<String, String>> tableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__VALUES__"
);
boolean use_singleMode = ("true").equals(ElementParameterParser.getValue(node, "__USE_SINGLEMODE__"));
boolean use_inTable = ("true").equals(ElementParameterParser.getValue(node, "__USE_INTABLE__"));
boolean use_inlineContent = ("true").equals(ElementParameterParser.getValue(node, "__USE_INLINECONTENT__"));
String fieldSeparator = ElementParameterParser.getValue(node, "__FIELDSEPARATOR__");
String rowSeparator = ElementParameterParser.getValue(node, "__ROWSEPARATOR__");
List<Map<String, String>> inTableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__INTABLE__"
);
List<IMetadataTable> metadatas = node.getMetadataList();
IMetadataTable metadata = null;
if ((metadatas!=null)&&(metadatas.size()>0)) {
metadata = metadatas.get(0);
}
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
//************** the original part that get only one value for each column ********************
if(use_singleMode){
if(tableValues != null && tableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
} // if(conn) end
} // for(conns) end
if (firstConnName !=null && !"".equals(firstConnName)) {
for(Map<String, String> tableValue : tableValues) {
String lable = tableValue.get("SCHEMA_COLUMN");
String value = tableValue.get("VALUE");
if(value == null || value.length() == 0){ //use the default value
IMetadataColumn column = metadata.getColumn(lable);
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
<%=firstConnName%>.<%=lable %> = <%=defaultValue %>;
<%
}else{
%>
<%=firstConnName%>.<%=lable %> = <%=value %>;
<%
}
} // for (map) end
} // if(firstConnName) end
}
//***************************the original part end ***************************************
}else if(use_inTable){
//******************the new part ---get several values for each column*********************
if(inTableValues != null && inTableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
int nb_line_<%=cid %> = 0;
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(firstConnName!=null && !firstConnName.equals("")){//XXX
%>
List<<%=firstConnName%>Struct> cacheList_<%=cid %> = new java.util.ArrayList<<%=firstConnName%>Struct>();
<%
for(Map<String, String> tableValue : inTableValues) {
%>
<%=firstConnName%> = new <%=firstConnName%>Struct();
<%
for(IMetadataColumn column: metadata.getListColumns()){
String label = column.getLabel();
String value = tableValue.get(label);
if(value == null || value.length() == 0){ //use the default value
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
<%=firstConnName%>.<%=label %> = <%=defaultValue %>;
<%
}else{
%>
<%=firstConnName%>.<%=label %> = <%=value %>;
<%
}
}
%>
cacheList_<%=cid %>.add(<%=firstConnName%>);
<%
}
}
%>
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
for(<%=firstConnName%>Struct tmpRow_<%=cid %> : cacheList_<%=cid %>){
<%
}
%>
nb_line_<%=cid %> ++;
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
<%=firstConnName%> = tmpRow_<%=cid %>;
<%
}
}
//********************the new part end*****************************************************
}else if(use_inlineContent){
String fileContent = ElementParameterParser.getValue(node,"__INLINECONTENT__");
String lineSeparator = "\r\n";
String fileContentEnCodeStr = "";
try {
fileContentEnCodeStr = java.util.Base64.getMimeEncoder().encodeToString(fileContent.getBytes("UTF-8"));
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}
%>
StringBuilder result_<%=cid %> = new StringBuilder();
<%
String[] arrayStr = fileContentEnCodeStr.split(lineSeparator);
for(String item : arrayStr){
%>
result_<%=cid %>.append("<%=item %>");
<%}%>
String originalFileContent_<%=cid %> = "";
try {
originalFileContent_<%=cid %> = new String(java.util.Base64.getMimeDecoder().decode(result_<%=cid %>.toString()), utf8Charset);
} catch (java.lang.Exception e) {
globalMap.put("<%=cid%>_ERROR_MESSAGE",e.getMessage());
e.printStackTrace();
}
int nb_line_<%=cid %> = 0;
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
java.io.InputStream ins_<%=cid %> = new java.io.ByteArrayInputStream(originalFileContent_<%=cid %>.getBytes(utf8Charset));
org.talend.fileprocess.FileInputDelimited fid_<%=cid %> = new org.talend.fileprocess.FileInputDelimited(ins_<%=cid %>, utf8Charset,<%=fieldSeparator %>,<%=rowSeparator %>,true, 0, 0, -1, -1, false);
while (fid_<%=cid %>.nextRecord()) {
nb_line_<%=cid %>++;
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(!firstConnName.equals("")){//XXX
%>
<%=firstConnName %> = new <%=firstConnName %>Struct();
<%
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeListColumns = columns.size();
for (int i=0;i<sizeListColumns;i++) {//AAA
IMetadataColumn column=columns.get(i);
String label = column.getLabel();
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
String patternValue = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
if(<%=i %> < fid_<%=cid %>.getColumnsCountOfCurrentRow()){
String colContent = fid_<%=cid %>.get(<%=i %>);
<%if(javaType == JavaTypesManager.STRING || javaType == JavaTypesManager.OBJECT) {%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? <%=defaultValue %>: colContent;
<%}else if(javaType == JavaTypesManager.DATE){%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? ParserUtils.parseTo_Date(<% if((defaultValue==null)||"".equals(defaultValue) || "null".equals(defaultValue)){%>(String)<%}%> <%=defaultValue %>, <%= patternValue %>) : ParserUtils.parseTo_Date(colContent, <%= patternValue %>);
<%}else if(javaType == JavaTypesManager.BYTE_ARRAY){%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? <%=defaultValue %> : colContent.getBytes();
<%}else{%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.trim().length() == 0) ? <%=defaultValue %> : ParserUtils.parseTo_<%= typeToGenerate %>(colContent);
<%}%>
} else {
<%if(javaType != JavaTypesManager.DATE){%>
<%=firstConnName %>.<%=label %> = <%=defaultValue %>;
<%}else {%>
<%=firstConnName %>.<%=label %> = ParserUtils.parseTo_Date(<% if(defaultValue==null||"".equals(defaultValue)|| "null".equals(defaultValue)){%>(String)<%}%><%=defaultValue %>, <%= patternValue %>);
<%}%>
}
<%
}//AAA
%>
<%
}//XXX
//********************the use_inTable part end*****************************************************
}
%>

View File

@@ -1,80 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.IConnection
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnectionCategory
java.util.List
java.util.Map"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String nbRows = ElementParameterParser.getValue(node, "__NB_ROWS__");
boolean use_singleMode = ("true").equals(ElementParameterParser.getValue(node, "__USE_SINGLEMODE__"));
boolean use_inTable = ("true").equals(ElementParameterParser.getValue(node, "__USE_INTABLE__"));
boolean use_inlineContent = ("true").equals(ElementParameterParser.getValue(node, "__USE_INLINECONTENT__"));
List<Map<String, String>> tableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__VALUES__"
);
List<Map<String, String>> inTableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__INTABLE__"
);
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
if(use_singleMode){
if(tableValues != null && tableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
}
globalMap.put("<%=cid%>_NB_LINE", <%=nbRows%>);
<%
}
//********************the new part*****************************************************
}else if(use_inTable){
if(inTableValues != null && inTableValues.size() > 0 && conns != null && conns.size() > 0) {
String firstConnName = null;
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(firstConnName!=null && !firstConnName.equals("")){
%>
}
<%
}
%>
}
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
cacheList_<%=cid %>.clear();
<%
}
%>
globalMap.put("<%=cid%>_NB_LINE", nb_line_<%=cid %>);
<%
}
//********************the new part*****************************************************
} else if(use_inlineContent){
%>
}
fid_<%=cid %>.close();
}
globalMap.put("<%=cid%>_NB_LINE", nb_line_<%=cid %>);
<%
}
%>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,90 +0,0 @@
<COMPONENT>
<HEADER PLATEFORM="ALL" SERIAL="" VERSION="0.102" STATUS="ALPHA"
COMPATIBILITY="ALL" AUTHOR="Talend" RELEASE_DATE="20050320A"
STARTABLE="true">
<SIGNATURE />
</HEADER>
<FAMILIES>
<FAMILY>Misc</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL />
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="0" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
<CONNECTOR CTYPE="COMPONENT_ERROR" />
<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true"
NUM_ROW="10">
<DEFAULT />
</PARAMETER>
<PARAMETER NAME="NB_ROWS" FIELD="TEXT" NUM_ROW="20">
<DEFAULT>1</DEFAULT>
</PARAMETER>
<PARAMETER NAME="USE_SINGLEMODE" FIELD="RADIO" REQUIRED="true"
NUM_ROW="30" GROUP="MODE">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="VALUES" FIELD="TABLE" REQUIRED="true"
NUM_ROW="35" NB_LINES="5" SHOW_IF="USE_SINGLEMODE=='true'" GROUP="MODE">
<ITEMS BASED_ON_SCHEMA="true">
<ITEM NAME="VALUE" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="USE_INTABLE" FIELD="RADIO" REQUIRED="true"
NUM_ROW="40" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="INTABLE" FIELD="TABLE" REQUIRED="true"
NUM_ROW="45" NB_LINES="5" SHOW_IF="USE_INTABLE=='true'" GROUP="MODE">
<ITEMS COLUMNS_BASED_ON_SCHEMA="true">
</ITEMS>
</PARAMETER>
<PARAMETER NAME="USE_INLINECONTENT" FIELD="RADIO" REQUIRED="true"
NUM_ROW="50" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="ROWSEPARATOR" FIELD="TEXT" NUM_ROW="52"
REQUIRED="true" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
<DEFAULT>"\n"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FIELDSEPARATOR" FIELD="TEXT" NUM_ROW="52"
REQUIRED="true" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
<DEFAULT>";"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="INLINECONTENT" FIELD="MEMO" RAW="true" REQUIRED="true"
NUM_ROW="55" NB_LINES="10" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
</PARAMETER>
</PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>

View File

@@ -1,14 +0,0 @@
LONG_NAME=Creates a fixed flow from internal variables
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=Number of lines
NB_ROWS.NAME=Number of rows
VALUES.NAME=Values
VALUES.ITEM.VALUE=Value
INTABLE.NAME=Inline Table
MODE.NAME=Mode
USE_SINGLEMODE.NAME=Use Single Table
USE_INTABLE.NAME=Use Inline Table
USE_INLINECONTENT.NAME=Use Inline Content(delimited file)
INLINECONTENT.NAME=Content
ROWSEPARATOR.NAME=Row Separator
FIELDSEPARATOR.NAME=Field Separator

View File

@@ -1,7 +0,0 @@
NB_LINE.NAME=Anzahl an Zeilen
VALUES.NAME=Wert
VALUES.ITEM.VALUE=Wert
MODE.NAME=Modus
INLINECONTENT.NAME=Inhalt
ROWSEPARATOR.NAME=Zeilenseparator
FIELDSEPARATOR.NAME=Feldseparator

View File

@@ -1,6 +0,0 @@
NB_ROWS.NAME=N\u00FAmero de filas
VALUES.NAME=Valores
VALUES.ITEM.VALUE=Valor
INLINECONTENT.NAME=Contenido
ROWSEPARATOR.NAME=Separador de Fila
FIELDSEPARATOR.NAME=Separador de Campo

View File

@@ -1,14 +0,0 @@
LONG_NAME=Cr\u00E9e un flux fixe \u00E0 partir de variables internes
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=Nombre de lignes
NB_ROWS.NAME=Nombre de lignes
VALUES.NAME=Valeurs
VALUES.ITEM.VALUE=Valeur
INTABLE.NAME=Utiliser le tableau
MODE.NAME=Mode
USE_SINGLEMODE.NAME=Utiliser une table seule
USE_INTABLE.NAME=Utiliser le tableau
USE_INLINECONTENT.NAME=Utiliser du contenu align\u00E9 (fichier d\u00E9limit\u00E9)
INLINECONTENT.NAME=Contenu
ROWSEPARATOR.NAME=S\u00E9parateur de lignes
FIELDSEPARATOR.NAME=S\u00E9parateur de champs

View File

@@ -1,13 +0,0 @@
LONG_NAME=Crea un flusso fisso da variabili interne
NB_LINE.NAME=Numero di linee
NB_ROWS.NAME=Numero di righe
VALUES.NAME=Valori
VALUES.ITEM.VALUE=Valore
INTABLE.NAME=Tabella InLine
MODE.NAME=Modo
USE_SINGLEMODE.NAME=Utilizza tabella singola
USE_INTABLE.NAME=Utilizza tabella InLine
USE_INLINECONTENT.NAME=Utilizza contenuto Inline (file delimitato)
INLINECONTENT.NAME=contenuto
ROWSEPARATOR.NAME=Separatore riga
FIELDSEPARATOR.NAME=Separatore di campo

View File

@@ -1,14 +0,0 @@
LONG_NAME=\u5185\u90E8\u5909\u6570\u304B\u3089\u56FA\u5B9A\u30D5\u30ED\u30FC\u3092\u751F\u6210\u3057\u307E\u3059\u3002
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884C\u6570
NB_ROWS.NAME=\u884C\u6570
VALUES.NAME=\u5024
VALUES.ITEM.VALUE=\u5024
INTABLE.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30C6\u30FC\u30D6\u30EB
MODE.NAME=\u30E2\u30FC\u30C9
USE_SINGLEMODE.NAME=\u30B7\u30F3\u30B0\u30EB\u30C6\u30FC\u30D6\u30EB\u306E\u4F7F\u7528
USE_INTABLE.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30C6\u30FC\u30D6\u30EB\u306E\u4F7F\u7528
USE_INLINECONTENT.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u4F7F\u7528
INLINECONTENT.NAME=\u30B3\u30F3\u30C6\u30F3\u30C4
ROWSEPARATOR.NAME=\u884C\u533A\u5207\u308A
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A

View File

@@ -1,10 +0,0 @@
LONG_NAME=\u5185\u90E8\u5909\u6570\u304B\u3089\u56FA\u5B9A\u30D5\u30ED\u30FC\u3092\u4F5C\u6210
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884c\u6570
NB_ROWS.NAME=\u30ed\u30a6\u6570
VALUES.NAME=\u5024
VALUES.ITEM.VALUE=\u5024
MODE.NAME=\u30E2\u30FC\u30C9
INLINECONTENT.NAME=\u30B3\u30F3\u30C6\u30F3\u30C4
ROWSEPARATOR.NAME=\u30ED\u30A6\u30BB\u30D1\u30EC\u30FC\u30BF
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u30BB\u30D1\u30EC\u30FC\u30BF

View File

@@ -1,6 +0,0 @@
NB_LINE.NAME=\u0427\u0438\u0441\u043B\u043E \u0441\u0442\u0440\u043E\u043A
VALUES.NAME=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u044F
VALUES.ITEM.VALUE=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435
INLINECONTENT.NAME=\u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435
ROWSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0441\u0442\u0440\u043E\u043A
FIELDSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u043F\u043E\u043B\u0435\u0439

View File

@@ -1,3 +0,0 @@
VALUES.ITEM.VALUE=Hodnota
MODE.NAME=M\u00F3d
INLINECONTENT.NAME=Obsah

View File

@@ -1,3 +0,0 @@
VALUES.ITEM.VALUE=Hodnota
MODE.NAME=Mód
INLINECONTENT.NAME=Obsah

View File

@@ -1,14 +0,0 @@
LONG_NAME=\u4ECE\u5185\u90E8\u53D8\u91CF\u521B\u5EFA\u56FA\u5B9A\u6D41
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884C\u6570
NB_ROWS.NAME=\u884C\u6570
VALUES.NAME=\u503C
VALUES.ITEM.VALUE=\u503C
INTABLE.NAME=\u5185\u8054\u8868
MODE.NAME=\u6A21\u5F0F
USE_SINGLEMODE.NAME=\u4F7F\u7528\u5355\u8868
USE_INTABLE.NAME=\u4F7F\u7528\u5185\u8054\u8868
USE_INLINECONTENT.NAME=\u4F7F\u7528\u5185\u8054\u5185\u5BB9 (\u5206\u9694\u6587\u4EF6)
INLINECONTENT.NAME=\u5185\u5BB9
ROWSEPARATOR.NAME=\u884C\u5206\u9694\u7B26
FIELDSEPARATOR.NAME=\u5B57\u6BB5\u5206\u9694\u7B26

View File

@@ -1,14 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
%>
<%=ElementParameterParser.getValue(node, "__CODE__") %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,52 +0,0 @@
<COMPONENT>
<HEADER
PLATEFORM="ALL"
SERIAL=""
VERSION="0.101"
STATUS="ALPHA"
COMPATIBILITY="ALL"
AUTHOR="Talend"
RELEASE_DATE="20070210A"
STARTABLE="true"
PARTITIONING="AUTO"
>
<SIGNATURE></SIGNATURE>
</HEADER>
<FAMILIES>
<FAMILY>Custom_Code</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL/>
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1"/>
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK"/>
<CONNECTOR CTYPE="COMPONENT_ERROR"/>
<CONNECTOR CTYPE="RUN_IF"/>
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="CODE" FIELD="MEMO_JAVA" RAW="true" REQUIRED="false" NUM_ROW="2" NB_LINES="9" CONTEXT="begin">
<DEFAULT>String foo = "bar";</DEFAULT>
</PARAMETER>
</PARAMETERS>
<ADVANCED_PARAMETERS>
<PARAMETER NAME="IMPORT" FIELD="MEMO_IMPORT" RAW="true" REQUIRED="false" NUM_ROW="1" NB_LINES="3">
<DEFAULT>//import java.util.List;</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION/>
<RETURNS/>
</COMPONENT>

View File

@@ -1,4 +0,0 @@
CODE.NAME=Code
HELP=org.talend.help.tJava
LONG_NAME=Allows to enter manually the start Java-code part of a component
IMPORT.NAME=Import

View File

@@ -1,3 +0,0 @@
CODE.NAME=Code
LONG_NAME=Erm\u00F6glich die manuelle Eingabe des Java-Codes f\u00FCr den Start Bereich der Komponente
IMPORT.NAME=Importiere

View File

@@ -1,4 +0,0 @@
CODE.NAME=Code
HELP=org.talend.help.tJava
LONG_NAME=Permet de saisir manuellement le code Java initial d'un composant
IMPORT.NAME=Import

View File

@@ -1,3 +0,0 @@
CODE.NAME=Codice
LONG_NAME=Permetti di inserire manualmente lo start Java-code in un componente
IMPORT.NAME=Importa

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u30B3\u30FC\u30C9
HELP=org.talend.help.tJava
LONG_NAME=Java\u30B3\u30FC\u30C9\u306B\u3066\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u958B\u59CB\u51E6\u7406(begin)\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30DE\u30CB\u30E5\u30A2\u30EB\u4F5C\u6210
IMPORT.NAME=\u30A4\u30F3\u30DD\u30FC\u30C8

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u30B3\u30FC\u30C9
HELP=org.talend.help.tJava
LONG_NAME=Java\u30B3\u30FC\u30C9\u306B\u3066\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u958B\u59CB\u51E6\u7406(begin)\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30DE\u30CB\u30E5\u30A2\u30EB\u4F5C\u6210
IMPORT.NAME=\u30A4\u30F3\u30DD\u30FC\u30C8

View File

@@ -1 +0,0 @@
CODE.NAME=\u041A\u043E\u0434

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u4EE3\u7801
HELP=org.talend.help.tJava
LONG_NAME=\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u7EC4\u4EF6\u7684 Java \u4EE3\u7801\u7684\u5F00\u59CB\u90E8\u5206\u3002
IMPORT.NAME=\u5BFC\u5165

View File

@@ -1,441 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaType
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.utils.NodeUtil
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
String label = ElementParameterParser.getValue(node, "__LABEL__");
if(("__UNIQUE_NAME__").equals(label))
label=cid;
boolean tablePrint = ("true").equals(ElementParameterParser.getValue(node,"__TABLE_PRINT__"));
String printHeader = ElementParameterParser.getValue(node,"__PRINT_HEADER__");
boolean vertical = ("true").equals(ElementParameterParser.getValue(node,"__VERTICAL__"));
boolean uniquePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_UNIQUE__"));
boolean titlePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_LABEL__"));
boolean uniqueTitlePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_UNIQUE_LABEL__"));
boolean basic = !(tablePrint||vertical);
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean isLogContent = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_CONTENT_WITH_LOG4J__"));
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeColumns = columns.size();
%>
///////////////////////
<%
if(tablePrint) { // table display mode
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/tablePrintLogUtil.javajet"%>
<%
}
// vertical display mode
if(vertical) {
%>
class Util_<%=cid %> {
String[] des_top = { ".", "-" };
String[] des_data = { "-", "+" };
String[] des_frame = { "|" };
public void printLine(StringBuilder sb, int titleWidth, int dataWidth){
sb.append("+");
for(int i=0; i<titleWidth+2; i++)
sb.append("-");
sb.append("+");
for(int i=0; i<dataWidth+2; i++)
sb.append("-");
sb.append("+" + "\n");
}
public String print(String[] row, int nbLine){
StringBuilder sb = new StringBuilder();
<%
if(uniquePrint) {
%>
String title = "#" + nbLine + ". " + "<%=cid%>";
<%
} else if(titlePrint) {
%>
String title = "#" + nbLine + ". " + "<%=label%>";
<%
} else if(uniqueTitlePrint) {
%>
String title = "#" + nbLine + ". " + "<%=cid%>--<%=label%>";
<%
}
%>
//step 1: get the max length of all the row[] member;
int dataWidth = 5; //the length of the string "value"
for(int i=0;i<row.length;i++) {
if(row[i] == null && 4 > dataWidth) {
dataWidth = 4;
}
else if(row[i] != null && row[i].length()>dataWidth)
dataWidth = row[i].length();
}
<%
int titleWidth = 3; //the length of the string 'key'
for(IMetadataColumn column:columns)
if(column.getLabel().length()>titleWidth) titleWidth = column.getLabel().length();
%>
int titleWidth = <%=titleWidth%>;
int totalWidth = dataWidth + titleWidth + 5;
//step 2: print the header with line number
sb.append(".");
for(int i=0 ; i<totalWidth ; i++)
sb.append("-");
sb.append("." + "\n" + "|");
int emptyCenterWidth = (totalWidth-title.length())/2;
for(int i=0 ; i<emptyCenterWidth; i++)
sb.append(" ");
sb.append(title);
for(int i=0 ; i<totalWidth - emptyCenterWidth - title.length() ; i++)
sb.append(" ");
sb.append("|" + "\n");
//step 3: print "key" and "value"
printLine(sb,titleWidth,dataWidth);
sb.append("|" + " key");
for(int i=0; i<titleWidth-2; i++)
sb.append(" ");
sb.append("|" + " value");
for(int i=0; i<dataWidth-4; i++)
sb.append(" ");
sb.append("|" + "\n");
printLine(sb,titleWidth,dataWidth);
//step 4: print dataset
<%
int count = 0;
for(IMetadataColumn column:columns){
%>
//for(int i=0; i<row.length; i++){
sb.append("| " + "<%=column.getLabel()%>");
for(int i=0; i<titleWidth -"<%=column.getLabel()%>".length()+ 1 ;i++)
sb.append(" ");
sb.append("| " + row[<%=count%>]);
for(int i=0; row[<%=count%>] == null && i<dataWidth - 3 || row[<%=count%>] != null && i<dataWidth -row[<%=count%>].length()+ 1 ;i++)
sb.append(" ");
sb.append("|" + "\n");
//}
<%
count++;
}%>
//step 5: print a line gap
printLine(sb,titleWidth,dataWidth);
return sb.toString();
}
}
Util_<%=cid %> util_<%=cid %> = new Util_<%=cid %>();
java.io.PrintStream consoleOut_<%=cid%> = null;
if (globalMap.get("tLogRow_CONSOLE")!=null){
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}else{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
}
if(basic) {// basic display mode
%>
final String OUTPUT_FIELD_SEPARATOR_<%=cid %> = <%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>;
java.io.PrintStream consoleOut_<%=cid%> = null;
<%
if (("true").equals(printHeader)) {
%>
StringBuilder sbHeader_<%=cid%> = new StringBuilder();
<%
for (int i = 0; i < sizeColumns; i++) {
IMetadataColumn column = columns.get(i);
%>
sbHeader_<%=cid%>.append("<%=column.getLabel() %>");
<%
if(i == sizeColumns-1) break;
%>
sbHeader_<%=cid%>.append("\t");
<%
}
%>
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Header names: " + sbHeader_<%=cid%>.toString());
<%
}
%>
consoleOut_<%=cid%>.println(sbHeader_<%=cid%>.toString());
consoleOut_<%=cid%>.flush();
<%
}
%>
<%
}
%>
StringBuilder strBuffer_<%=cid%> = null;
int nb_line_<%=cid%> = 0;
///////////////////////
<%
String printColumnNames = ElementParameterParser.getValue(node,"__PRINT_COLNAMES__");
String useFixedLength = ElementParameterParser.getValue(node,"__USE_FIXED_LENGTH__");
List<Map<String, String>> lengths = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node,"__LENGTHS__");
List< ? extends IConnection> conns = node.getIncomingConnections();
for (IConnection conn : conns) {//3
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
int schemaOptNum=100;
String schemaOptNumStr=ElementParameterParser.getValue(node, "__SCHEMA_OPT_NUM__");
if(schemaOptNumStr!=null && !"".equals(schemaOptNumStr) && !"\"\"".equals(schemaOptNumStr)){
schemaOptNum = Integer.parseInt(schemaOptNumStr);
}
boolean isOptimizeCode = false;
if(schemaOptNum < sizeColumns){
isOptimizeCode = true;
}
if(isOptimizeCode){//5
%>
class LogRowUtil_<%=cid%>{
<%
if (basic||vertical) { // A1
for (int i = 0; i < sizeColumns; i++) {//B1
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(i%schemaOptNum==0){
%>
public void putBasicVerticalValue_<%=i/schemaOptNum%>(final <%=NodeUtil.getPrivateConnClassName(conn)%>Struct <%=conn.getName() %>,StringBuilder strBuffer_<%=cid%>){
<%
}
if (("true").equals(useFixedLength)) {//fix the column length
%>
java.util.Formatter formatter_<%=column.getLabel() %>_<%=cid%> = new java.util.Formatter(new StringBuilder());
<%
}
if (("true").equals(printColumnNames)) {//print the schema name
%>
strBuffer_<%=cid%>.append("<%=column.getLabel() %>: ");
<%
}
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
if (("true").equals(useFixedLength)) {//AAA
%>
strBuffer_<%=cid%>.append(formatter_<%=column.getLabel() %>_<%=cid%>.format("%1$"+<%=lengths.get(i).get("LENGTH") %>+"s",
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
).toString());
<%
} else {//AAA
%>
strBuffer_<%=cid%>.append(
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
);
<%
}//AAA
if(!isPrimitive) {//end
%>
} //
<%
}
if(i == sizeColumns-1){
if((i+1)%schemaOptNum==0){
%>
}
<%
}
break;
}else{
%>
strBuffer_<%=cid%>.append(<%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>);
<%
}
if((i+1)%schemaOptNum==0){
%>
}
<%
}
}//B1
if(sizeColumns>0 && (sizeColumns%schemaOptNum)>0){
%>
}
<%
}
}//A1
if(tablePrint || vertical) { //C1
for (int i = 0; i < sizeColumns; i++) {//D1
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(i%schemaOptNum==0){
%>
public void putTableVerticalValue_<%=i/schemaOptNum%>(final <%=NodeUtil.getPrivateConnClassName(conn) %>Struct <%=conn.getName() %>,String[] row_<%=cid%>){
<%
}
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
row_<%=cid%>[<%=i %>]=
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
;
<%
if(!isPrimitive) {//end
%>
} //
<%
}
if((i+1)%schemaOptNum==0){
%>
}
<%
}
}//D1
if(sizeColumns>0&&(sizeColumns%schemaOptNum)>0){
%>
}
<%
}
}//C1
%>
}
LogRowUtil_<%=cid%> logRowUtil_<%=cid%>=new LogRowUtil_<%=cid%>();
<%
}//5
}//4
}//3
}//2
}//1
%>

View File

@@ -1,54 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
java.util.List
"
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
log = new LogUtil(node);
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
String tablePrint = ElementParameterParser.getValue(node,"__TABLE_PRINT__");
%>
//////
<%
if (("true").equals(tablePrint)) {//print all records one time
%>
java.io.PrintStream consoleOut_<%=cid%> = null;
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
consoleOut_<%=cid%>.println(util_<%=cid %>.format().toString());
consoleOut_<%=cid%>.flush();
<%
}
%>
//////
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
<%log.info(log.str("Printed row count: "), log.var("nb_line"), log.str("."));%>
///////////////////////
<%
}//2
}//1
%>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,103 +0,0 @@
<!-- $Id: tLogRow_perl.xml 1528 2007-01-19 17:03:36 +0000 (星期五, 19 一月 2007) smallet $ -->
<COMPONENT>
<HEADER PLATEFORM="ALL" SERIAL="" VERSION="0.101" STATUS="ALPHA"
COMPATIBILITY="ALL" AUTHOR="Talend" RELEASE_DATE="20050320A"
STARTABLE="false" PARTITIONING="AUTO" LOG4J_ENABLED="true">
<SIGNATURE></SIGNATURE>
</HEADER>
<FAMILIES>
<FAMILY>Logs_Errors</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL />
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="0" MAX_INPUT="0" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
<CONNECTOR CTYPE="COMPONENT_ERROR" />
<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true"
NUM_ROW="10" />
<PARAMETER NAME="BASIC_MODE" FIELD="RADIO" NUM_ROW="11" GROUP="MODE">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="TABLE_PRINT" FIELD="RADIO" NUM_ROW="12" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="VERTICAL" FIELD="RADIO" NUM_ROW="13" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_LABEL" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE_LABEL" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FIELDSEPARATOR" FIELD="TEXT" NUM_ROW="20"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>"|"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_HEADER" FIELD="CHECK" NUM_ROW="25"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE_NAME" FIELD="CHECK" NUM_ROW="30"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_COLNAMES" FIELD="CHECK" NUM_ROW="40"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="USE_FIXED_LENGTH" FIELD="CHECK" NUM_ROW="50"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="LENGTHS" FIELD="TABLE" REQUIRED="true"
NUM_ROW="60" NB_LINES="5"
SHOW_IF="(USE_FIXED_LENGTH == 'true') and ((TABLE_PRINT == 'false') and (VERTICAL == 'false'))">
<ITEMS BASED_ON_SCHEMA="true">
<ITEM NAME="LENGTH" VALUE="10" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="PRINT_CONTENT_WITH_LOG4J" FIELD="CHECK" NUM_ROW="70" >
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="SCHEMA_OPT_NUM" FIELD="TEXT" NUM_ROW="100" REQUIRED="true" SHOW="false">
<DEFAULT>100</DEFAULT>
</PARAMETER>
</PARAMETERS>
<CODEGENERATION />
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>

View File

@@ -1,313 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
boolean tablePrint = ("true").equals(ElementParameterParser.getValue(node,"__TABLE_PRINT__"));
boolean vertical = ("true").equals(ElementParameterParser.getValue(node,"__VERTICAL__"));
boolean basic = !(tablePrint||vertical);
String printUniqueName = ElementParameterParser.getValue(node,"__PRINT_UNIQUE_NAME__");
String printColumnNames = ElementParameterParser.getValue(node,"__PRINT_COLNAMES__");
String useFixedLength = ElementParameterParser.getValue(node,"__USE_FIXED_LENGTH__");
List<Map<String, String>> lengths = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node,"__LENGTHS__");
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean isLogContent = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_CONTENT_WITH_LOG4J__"));
List< ? extends IConnection> conns = node.getIncomingConnections();
for (IConnection conn : conns) {//3
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
%>
///////////////////////
<%
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeColumns = columns.size();
int schemaOptNum=100;
String schemaOptNumStr=ElementParameterParser.getValue(node, "__SCHEMA_OPT_NUM__");
if(schemaOptNumStr!=null && !"".equals(schemaOptNumStr) && !"\"\"".equals(schemaOptNumStr)){
schemaOptNum = Integer.parseInt(schemaOptNumStr);
}
boolean isOptimizeCode = false;
if(schemaOptNum < sizeColumns){
isOptimizeCode = true;
}
%>
<%
if (basic||vertical) { // don't print the table form//***
%>
strBuffer_<%=cid%> = new StringBuilder();
<%
if (("true").equals(printUniqueName)) {//print the component name.
%>
strBuffer_<%=cid%>.append("[<%=cid%>] ");
<%
}
%>
<%
for (int i = 0; i < sizeColumns; i++) {//5
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(isOptimizeCode){
if(i%schemaOptNum == 0){
%>
logRowUtil_<%=cid%>.putBasicVerticalValue_<%=i/schemaOptNum%>(<%=conn.getName() %>,strBuffer_<%=cid%>);
<%
}
}else{
if (("true").equals(useFixedLength)) {//fix the column length
%>
java.util.Formatter formatter_<%=column.getLabel() %>_<%=cid%> = new java.util.Formatter(new StringBuilder());
<%
}
%>
<%
if (("true").equals(printColumnNames)) {//print the schema name
%>
strBuffer_<%=cid%>.append("<%=column.getLabel() %>: ");
<%
}
%>
<%
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
<%
if (("true").equals(useFixedLength)) {//fixed the column length
%>
strBuffer_<%=cid%>.append(formatter_<%=column.getLabel() %>_<%=cid%>.format("%1$"+<%=lengths.get(i).get("LENGTH") %>+"s",
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
).toString());
<%
} else {
%>
strBuffer_<%=cid%>.append(
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
);
<%
}
%>
<%
if(!isPrimitive) {//end
%>
} //
<%
}
%>
<%
if(i == sizeColumns-1) break;
%>
strBuffer_<%=cid%>.append(<%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>);
<%
}
}//5
}
if (basic) {
%>
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Content of row "+(nb_line_<%=cid %>+1)+": " + strBuffer_<%=cid%>.toString());
<%
}
%>
consoleOut_<%=cid%>.println(strBuffer_<%=cid%>.toString());
consoleOut_<%=cid%>.flush();
nb_line_<%=cid %>++;
<%
}
if(tablePrint || vertical) { //print the table and vertical model//***
%>
String[] row_<%=cid%> = new String[<%=sizeColumns %>];
<%
for (int i = 0; i < sizeColumns; i++) {//5
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(isOptimizeCode){
if(i%schemaOptNum == 0){
%>
logRowUtil_<%=cid%>.putTableVerticalValue_<%=i/schemaOptNum%>(<%=conn.getName() %>,row_<%=cid%>);
<%
}
}else{
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
row_<%=cid%>[<%=i %>]=
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
;
<%
if(!isPrimitive) {//end
%>
} //
<%
}
%>
<%
}
}//5
if(tablePrint){
%>
util_<%=cid %>.addRow(row_<%=cid%>);
nb_line_<%=cid %>++;
<%
}else{
%>
nb_line_<%=cid %>++;
consoleOut_<%=cid%>.println(util_<%=cid %>.print(row_<%=cid%>,nb_line_<%=cid%>));
consoleOut_<%=cid%>.flush();
<%
}
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Content of row "+nb_line_<%=cid %>+": " + TalendString.unionString("|",row_<%=cid%>));
<%
}
}//***
%>
//////
//////
///////////////////////
<%
}//4
}//3
}//2
}//1
%>

View File

@@ -1,20 +0,0 @@
LONG_NAME=Displays the flow content (rows) on the Run Job console
HELP=org.talend.help.tLogRow
MODE.NAME=Mode
BASIC_MODE.NAME=Basic
TABLE_PRINT.NAME=Table (print values in cells of a table)
VERTICAL.NAME=Vertical (each row is a key/value list)
FIELDSEPARATOR.NAME=Field Separator
NB_LINE.NAME=Number of lines
PRINT_UNIQUE_NAME.NAME=Print component unique name in front of each output row
PRINT_COLNAMES.NAME=Print schema column name in front of each value
USE_FIXED_LENGTH.NAME=Use fixed length for values
LENGTHS.NAME=Lengths
LENGTHS.ITEM.LENGTH=Length
PRINT_HEADER.NAME=Print header
PRINT_UNIQUE.NAME=Print unique name
PRINT_LABEL.NAME=Print label
PRINT_UNIQUE_LABEL.NAME=Print unique name and label
TITLE_PRINT.NAME=Title printing mode
SCHEMA_OPT_NUM.NAME=Min column number of optimize code
PRINT_CONTENT_WITH_LOG4J.NAME=Print content with log4j

View File

@@ -1,10 +0,0 @@
LONG_NAME=Zeigt den Inhalt (Zeilen) des Datenflusses auf der RunJob-Konsole an.
MODE.NAME=Modus
BASIC_MODE.NAME=Einfach
VERTICAL.NAME=Vertikal (wobei jede Zeile eine Schl\u00FCssel/Wertliste ist)
FIELDSEPARATOR.NAME=Feldseparator
NB_LINE.NAME=Anzahl an Zeilen
USE_FIXED_LENGTH.NAME=Feste L\u00E4nge f\u00FCr Werte verwenden
LENGTHS.ITEM.LENGTH=L\u00E4nge
PRINT_HEADER.NAME=Kopfzeile ausgeben
PRINT_LABEL.NAME=Beschriftungen ausgeben

View File

@@ -1,3 +0,0 @@
BASIC_MODE.NAME=Basico
FIELDSEPARATOR.NAME=Separador de Campo
LENGTHS.ITEM.LENGTH=Longitud

View File

@@ -1,20 +0,0 @@
LONG_NAME=Affiche le contenu du flux (lignes) dans la console d'ex\u00E9cution du Job
HELP=org.talend.help.tLogRow
MODE.NAME=Mode
BASIC_MODE.NAME=Simple
TABLE_PRINT.NAME=Table (afficher les valeurs dans des cellules)
VERTICAL.NAME=Vertical (chaque ligne est une liste cl\u00E9/valeur)
FIELDSEPARATOR.NAME=S\u00E9parateur de champs
NB_LINE.NAME=Nombre de lignes
PRINT_UNIQUE_NAME.NAME=Afficher le nom unique du composant devant chaque ligne de sortie
PRINT_COLNAMES.NAME=Afficher le nom de la colonne du sch\u00E9ma en face de chaque valeur
USE_FIXED_LENGTH.NAME=Utiliser une longueur fixe pour les valeurs
LENGTHS.NAME=Longueurs
LENGTHS.ITEM.LENGTH=Longueur
PRINT_HEADER.NAME=Afficher l'en-t\u00EAte
PRINT_UNIQUE.NAME=Afficher le nom unique
PRINT_LABEL.NAME=Afficher le libell\u00E9
PRINT_UNIQUE_LABEL.NAME=Afficher le nom unique et le libell\u00E9
TITLE_PRINT.NAME=Mode d'affichage du titre
SCHEMA_OPT_NUM.NAME=Nombre minimum de colonnes au code optimis\u00E9
PRINT_CONTENT_WITH_LOG4J.NAME=Afficher le contenu avec Log4j

View File

@@ -1,17 +0,0 @@
LONG_NAME=Mostra il contenuto del flusso (righe) nella console del Run Job
MODE.NAME=Modalit\u00E0
BASIC_MODE.NAME=Base
TABLE_PRINT.NAME=Tabella (stampa valori nelle celle di una tabella)
VERTICAL.NAME=Verticale (ogni riga \u00E8 una lista chiave/valore)
FIELDSEPARATOR.NAME=Separatore di campo
NB_LINE.NAME=Numero riga
PRINT_UNIQUE_NAME.NAME=Stampa nome componenti univoci all'inizio di ogni riga di output
PRINT_COLNAMES.NAME=Stampa nome colonna dello schema all'inizio di ogni valore
USE_FIXED_LENGTH.NAME=Usa lunghezza fissa per valori
LENGTHS.NAME=Lunghezze
LENGTHS.ITEM.LENGTH=Lunghezza
PRINT_HEADER.NAME=Stampa Header
PRINT_UNIQUE.NAME=Stampa nome univoco
PRINT_LABEL.NAME=Stampa etichetta
PRINT_UNIQUE_LABEL.NAME=Stampa etichetta e nome univoco
TITLE_PRINT.NAME=Titolo modalit\u00E0 stampa

View File

@@ -1,20 +0,0 @@
LONG_NAME=[\u30B8\u30E7\u30D6\u5B9F\u884C]\u30B3\u30F3\u30BD\u30FC\u30EB\u3067\u30D5\u30ED\u30FC\u30B3\u30F3\u30C6\u30F3\u30C4(\u884C)\u3092\u8868\u793A\u3057\u307E\u3059\u3002
HELP=org.talend.help.tLogRow
MODE.NAME=\u30E2\u30FC\u30C9
BASIC_MODE.NAME=\u30D9\u30FC\u30B7\u30C3\u30AF
TABLE_PRINT.NAME=\u30C6\u30FC\u30D6\u30EB\uFF08\u8868\u306E\u30BB\u30EB\u3067\u5024\u3092\u8868\u793A\uFF09
VERTICAL.NAME=\u7E26\u306B\u51FA\u529B\uFF08\u5404\u884C\u3092\u30AD\u30FC/\u5024\u306E\u30EA\u30B9\u30C8\u3067\u8868\u793A\uFF09
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A
NB_LINE.NAME=\u884C\u6570
PRINT_UNIQUE_NAME.NAME=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30E6\u30CB\u30FC\u30AF\u540D\u3092\u51FA\u529B\u306E\u5404\u884C\u306E\u524D\u306B\u8868\u793A
PRINT_COLNAMES.NAME=\u30AB\u30E9\u30E0\u540D\u3092\u5024\u306E\u524D\u306B\u8868\u793A
USE_FIXED_LENGTH.NAME=\u5024\u3092\u56FA\u5B9A\u9577\u3067\u8868\u793A
LENGTHS.NAME=\u9577\u3055
LENGTHS.ITEM.LENGTH=\u9577\u3055
PRINT_HEADER.NAME=\u30D8\u30C3\u30C0\u30FC\u306E\u8868\u793A
PRINT_UNIQUE.NAME=\u30E6\u30CB\u30FC\u30AF\u540D\u306E\u8868\u793A
PRINT_LABEL.NAME=\u30E9\u30D9\u30EB\u306E\u8868\u793A
PRINT_UNIQUE_LABEL.NAME=\u30E6\u30CB\u30FC\u30AF\u540D\u3068\u30E9\u30D9\u30EB\u306E\u8868\u793A
TITLE_PRINT.NAME=\u30BF\u30A4\u30C8\u30EB\u8868\u793A\u30E2\u30FC\u30C9
SCHEMA_OPT_NUM.NAME=\u6700\u9069\u5316\u30B3\u30FC\u30C9\u306E\u6700\u5C0F\u30AB\u30E9\u30E0\u6570
PRINT_CONTENT_WITH_LOG4J.NAME=log4j\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u5370\u5237

View File

@@ -1,7 +0,0 @@
HELP=org.talend.help.tLogRow
MODE.NAME=\u30E2\u30FC\u30C9
BASIC_MODE.NAME=\u30D9\u30FC\u30B7\u30C3\u30AF
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u30BB\u30D1\u30EC\u30FC\u30BF
NB_LINE.NAME=\u30E9\u30A4\u30F3\u6570
LENGTHS.NAME=\u9577\u3055
LENGTHS.ITEM.LENGTH=\u9577\u3055

View File

@@ -1,5 +0,0 @@
BASIC_MODE.NAME=\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439
VERTICAL.NAME=\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0439 (\u043A\u0430\u0436\u0434\u044B\u0439 \u0440\u044F\u0434 - \u043F\u0430\u0440\u0430 \u043A\u043B\u044E\u0447/\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435)
FIELDSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u043F\u043E\u043B\u0435\u0439
NB_LINE.NAME=\u0427\u0438\u0441\u043B\u043E \u0441\u0442\u0440\u043E\u043A
LENGTHS.ITEM.LENGTH=\u0414\u043B\u0438\u043D\u0430

View File

@@ -1,2 +0,0 @@
MODE.NAME=M\u00F3d
LENGTHS.ITEM.LENGTH=D\u013A\u017Eka

View File

@@ -1,2 +0,0 @@
MODE.NAME=Mód
LENGTHS.ITEM.LENGTH=D\u013A\u017Eka

View File

@@ -1,20 +0,0 @@
LONG_NAME=\u5728\u8FD0\u884C\u4F5C\u4E1A\u63A7\u5236\u53F0\u4E0A\u663E\u793A\u6D41\u5185\u5BB9 (\u884C)
HELP=org.talend.help.tLogRow
MODE.NAME=\u6A21\u5F0F
BASIC_MODE.NAME=\u57FA\u672C
TABLE_PRINT.NAME=\u8868 (\u5728\u8868\u7684\u5355\u5143\u683C\u4E2D\u6253\u5370\u503C)
VERTICAL.NAME=\u5782\u76F4 (\u6BCF\u884C\u90FD\u662F\u4E00\u4E2A\u952E/\u503C\u5217\u8868)
FIELDSEPARATOR.NAME=\u5B57\u6BB5\u5206\u9694\u7B26
NB_LINE.NAME=\u884C\u6570
PRINT_UNIQUE_NAME.NAME=\u5728\u6BCF\u4E00\u4E2A\u8F93\u51FA\u884C\u524D\u6253\u5370\u552F\u4E00\u7EC4\u4EF6\u540D
PRINT_COLNAMES.NAME=\u5C06 schema \u5217\u540D\u6253\u5370\u5728\u6BCF\u4E2A\u503C\u7684\u524D\u9762
USE_FIXED_LENGTH.NAME=\u4F7F\u7528\u56FA\u5B9A\u957F\u5EA6\u7684\u503C
LENGTHS.NAME=\u957F\u5EA6
LENGTHS.ITEM.LENGTH=\u957F\u5EA6
PRINT_HEADER.NAME=\u6253\u5370\u6587\u4EF6\u5934
PRINT_UNIQUE.NAME=\u6253\u5370\u552F\u4E00\u540D\u79F0
PRINT_LABEL.NAME=\u6253\u5370\u6807\u7B7E
PRINT_UNIQUE_LABEL.NAME=\u6253\u5370\u552F\u4E00\u540D\u79F0\u548C\u6807\u7B7E
TITLE_PRINT.NAME=\u6807\u9898\u6253\u5370\u6A21\u5F0F
SCHEMA_OPT_NUM.NAME=\u4F18\u5316\u4EE3\u7801\u7684\u6700\u5C0F\u5217\u6570
PRINT_CONTENT_WITH_LOG4J.NAME=\u7528 log4j \u6253\u5370\u5185\u5BB9

View File

@@ -1,57 +0,0 @@
<%@ jet
%>
<%
JavaType[] commonTypes = {
JavaTypesManager.STRING,
JavaTypesManager.INTEGER,
JavaTypesManager.LONG,
JavaTypesManager.SHORT,
JavaTypesManager.BOOLEAN,
JavaTypesManager.CHARACTER,
JavaTypesManager.BYTE,
JavaTypesManager.BYTE_ARRAY,
JavaTypesManager.DATE,
JavaTypesManager.DOUBLE,
JavaTypesManager.FLOAT,
JavaTypesManager.OBJECT,
JavaTypesManager.LIST,
JavaTypesManager.BIGDECIMAL
};
for(JavaType sourceType : commonTypes) {
for(JavaType targetType : commonTypes) {
if(sourceType == targetType) {
continue;
}
String sourceTypeToGenerate = JavaTypesManager.getTypeToGenerate(sourceType.getId(), true);
sourceTypeToGenerate = sourceTypeToGenerate.contains(".") ? sourceTypeToGenerate.substring(sourceTypeToGenerate.lastIndexOf(".") + 1) : sourceTypeToGenerate;
if (("byte[]").equals(sourceTypeToGenerate)){
sourceTypeToGenerate = "byteArray";
}
String targetTypeToGenerate = JavaTypesManager.getTypeToGenerate(targetType.getId(), true);
targetTypeToGenerate = targetTypeToGenerate.contains(".") ? targetTypeToGenerate.substring(targetTypeToGenerate.lastIndexOf(".") + 1) : targetTypeToGenerate;
if (("byte[]").equals(targetTypeToGenerate)){
targetTypeToGenerate = "byteArray";
}
String function = null;
if("Date".equals(targetTypeToGenerate) && ("String".equals(sourceTypeToGenerate)||"Object".equals(sourceTypeToGenerate))) {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0}, ${1})");
} else if("String".equals(targetTypeToGenerate) && "Date".equals(sourceTypeToGenerate)) {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0}, ${1})");
} else {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0})");
}
autoConverterMap.put(contact(sourceType.getId(), ":", targetType.getId()), function);
}
}
autoConverterMap.put(contact("id_Dynamic", ":", JavaTypesManager.STRING.getId()), "String.valueOf(${0})");
autoConverterMap.put(contact("id_Document", ":", JavaTypesManager.STRING.getId()), "String.valueOf(${0})");
autoConverterMap.put(contact(JavaTypesManager.STRING.getId(), ":", "id_Document"), "routines.system.ParserUtils.parseTo_Document(${0})");
%>

View File

@@ -1,40 +0,0 @@
<%@ jet
imports="
java.util.ArrayList
java.util.List
java.util.Map
java.util.HashMap
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.designer.mapper.MapperComponent
org.talend.designer.mapper.external.data.ExternalMapperData
org.talend.designer.mapper.external.data.ExternalMapperTable
org.talend.designer.mapper.external.data.ExternalMapperTableEntry
org.talend.core.model.process.IConnection
org.talend.designer.mapper.language.ILanguage
org.talend.designer.mapper.language.generation.GenerationManagerFactory
org.talend.designer.mapper.language.generation.JavaGenerationManager
org.talend.designer.mapper.language.LanguageProvider
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.EConnectionType
org.talend.core.model.process.INode
org.talend.core.model.utils.TalendTextUtils
org.talend.designer.mapper.model.tableentry.TableEntryLocation
org.talend.designer.mapper.utils.DataMapExpressionParser
"
skeleton="tMap_commons.skeleton"
%>
<%@ include file="tMap_begin.inc.javajet" %>

View File

@@ -1,259 +0,0 @@
public class CLASS {
public boolean hasConcurrencyContext(List<IConnection> inputConnections, List<? extends INode> graphicalNodes) {
for(IConnection connection : inputConnections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
INode node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}
return false;
}
public boolean hasIterateConnectionBefore(List<IConnection> inputConnections, List<? extends INode> graphicalNodes) {
for(IConnection connection : inputConnections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
INode node = connection.getSource();
return recursiveSearchIterate(node, graphicalNodes);
}
}
return false;
}
public boolean recursiveSearchIterate(INode node, List<? extends INode> graphicalNodes) {
//System.out.println(node);
List<IConnection> connections = (List<IConnection>) node.getIncomingConnections();
for(IConnection connection : connections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
node = connection.getSource();
//System.out.println(connection.getName() + " connectionType=" + connectionType + " connection=" + String.valueOf(connection));
return recursiveSearchIterate(node, graphicalNodes);
} else if(connectionType == EConnectionType.ITERATE) {
//System.out.println("ITERATE return true");
return true;
}else{
//for virtual component
boolean find = false;
for(INode loopNode : graphicalNodes) {
if(loopNode.getUniqueName().equals(node.getUniqueName())){
find = true;
}
}
if(!find){
List<IConnection> vConnections = (List<IConnection>) node.getIncomingConnections();
for(IConnection vConnection : vConnections) {
node = vConnection.getSource();
break;
}
return recursiveSearchIterate(node, graphicalNodes);
}
}
}
//System.out.println("return false");
return false;
}
private boolean recursiveSearchIterateForConcurrency(INode node, List<? extends INode> graphicalNodes) {
List<IConnection> connections = (List<IConnection>) node.getIncomingConnections();
for(IConnection connection : connections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
} else if(connectionType == EConnectionType.ITERATE) {
boolean parallelIterate = "true".equals(ElementParameterParser.getValue(connection, "__ENABLE_PARALLEL__"));
if(parallelIterate) {
return true;
} else {
node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}else{
//for virtual component
boolean find = false;
for(INode loopNode : graphicalNodes) {
if(loopNode.getUniqueName().equals(node.getUniqueName())){
find = true;
}
}
if(!find){
List<IConnection> vConnections = (List<IConnection>) node.getIncomingConnections();
for(IConnection vConnection : vConnections) {
node = vConnection.getSource();
break;
}
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}
}
return false;
}
public INode searchSubProcessStartNode(IConnection connection) {
INode source = connection.getSource();
//System.out.println(" source=" + source);
INode subprocessStartNode = null;
if(source != null) {
String searchedComponentName = source.getUniqueName();
//System.out.println(" searchedComponentName=" + searchedComponentName);
List<? extends INode> generatedNodes = source.getProcess().getGeneratingNodes();
for(INode loopNode : generatedNodes) {
if(loopNode.getUniqueName().equals(searchedComponentName)) {
subprocessStartNode = loopNode.getSubProcessStartNode(false);
//System.out.println(" subprocessStartNode=" + subprocessStartNode.getUniqueName());
}
}
}
return subprocessStartNode;
}
public boolean hasJoinedTable(String tableNameToTest, ExternalMapperData data) {
for (ExternalMapperTable table : data.getOutputTables()) {
if (table.getIsJoinTableOf() != null && table.getIsJoinTableOf().equals(tableNameToTest)) {
return true;
}
}
return false;
}
public boolean isErrorReject(ExternalMapperTable table){
String errorMessage = null;
String errorStackTrace = null;
if(table!=null&&table.getName()!=null&&table.getName().endsWith("ErrorReject")){
for(ExternalMapperTableEntry entry:table.getMetadataTableEntries()){
if("errorMessage".equals(entry.getName())){
errorMessage = entry.getName();
}else if("errorStackTrace".equals(entry.getName())){
errorStackTrace = entry.getName();
}
}
if(errorMessage!=null&&errorStackTrace!=null){
return true;
}
}
return false;
}
public String getExpressionWithAutoConvertFunction(
String expression,
ExternalMapperTableEntry targetTableEntry,
IMetadataColumn targetColumn,
DataMapExpressionParser expressionParser,
Map<TableEntryLocation, ExternalMapperTableEntry> locationMap4Entry,
Map<TableEntryLocation, IMetadataColumn> locationMap4Column,
Map<String,String> autoConverterMap,
boolean enable_auto_convert_type) {
if(!enable_auto_convert_type) {
return expression;
}
if(expression == null || expression.isEmpty()) {
return expression;
}
TableEntryLocation uniqueLocation = getUniqueEntryLocation(expression);
if(uniqueLocation == null) {
return expression;
}
ExternalMapperTableEntry uniqueSourceEntry = locationMap4Entry.get(uniqueLocation);
if(uniqueSourceEntry == null) {
return expression;
}
String source_talend_type = uniqueSourceEntry.getType();
String target_talend_type = targetTableEntry.getType();
String convertFunction = autoConverterMap.get(contact(source_talend_type, ":", target_talend_type));
if(convertFunction!=null && !convertFunction.isEmpty()) {
StringBuilder strbuilder = new StringBuilder();
if(uniqueSourceEntry.isNullable()) {
strbuilder.append("(((").append(expression).append(") == null) ? null : (");
}
expression = convertFunction.replace("${0}", expression);
String pattern = null;
if((JavaTypesManager.STRING.getId().equals(source_talend_type)||JavaTypesManager.OBJECT.getId().equals(source_talend_type)) && JavaTypesManager.DATE.getId().equals(target_talend_type)) {
if(targetColumn!=null) {
pattern = targetColumn.getPattern();
}
if(pattern == null || pattern.isEmpty()) {
pattern = "\"dd-MM-yyyy\"";
}
} else if(JavaTypesManager.DATE.getId().equals(source_talend_type) && JavaTypesManager.STRING.getId().equals(target_talend_type)) {
IMetadataColumn sourceColumn = locationMap4Column.get(uniqueLocation);
if(sourceColumn!=null) {
pattern = sourceColumn.getPattern();
}
if(pattern == null || pattern.isEmpty()) {
pattern = "\"dd-MM-yyyy\"";
}
}
if(pattern != null) {
expression = expression.replace("${1}", pattern);
}
strbuilder.append(expression);
if(uniqueSourceEntry.isNullable()) {
strbuilder.append("))");
}
return strbuilder.toString();
}
return expression;
}
java.util.regex.Pattern locationPattern = java.util.regex.Pattern.compile(LanguageProvider.getJavaLanguage().getLocationPattern());
private TableEntryLocation getUniqueEntryLocation(String expression) {
java.util.regex.Matcher matcher = locationPattern.matcher(expression);
if(matcher.matches()) {
return new TableEntryLocation(matcher.group(1), matcher.group(2));
}
return null;
}
StringBuilder strbuilder = new StringBuilder(20);
private String contact(String... content) {
strbuilder.setLength(0);
for(String each : content) {
strbuilder.append(each);
}
return strbuilder.toString();
}
public String generate(Object argument) {
}
}

View File

@@ -1,169 +0,0 @@
<%@ jet
imports="
java.util.ArrayList
java.util.List
org.talend.designer.mapper.external.data.ExternalMapperData
org.talend.designer.mapper.external.data.ExternalMapperTable
org.talend.designer.mapper.external.data.ExternalMapperTableEntry
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.designer.mapper.MapperComponent
org.talend.core.model.process.IElementParameter
org.talend.core.model.process.INode
org.talend.core.model.process.IConnection
java.util.HashMap
java.util.Map
org.talend.core.model.process.ElementParameterParser
"
skeleton="tMap_commons.skeleton"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
MapperComponent node = (MapperComponent) codeGenArgument.getArgument();
boolean stats = codeGenArgument.isStatistics();
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ExternalMapperData data = (ExternalMapperData) node.getExternalData();
String componentName = node.getUniqueName();
boolean isVirtualIn = componentName.endsWith("TMAP_IN");
boolean isVirtualOut = componentName.endsWith("TMAP_OUT");
List<IConnection> inputConnections = (List<IConnection>) node.getIncomingConnections();
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
String uniqueNameComponent = componentName.replaceAll("_TMAP_IN", "");
uniqueNameComponent = uniqueNameComponent.replaceAll("_TMAP_OUT", "");
if(isVirtualIn) {
String searchedComponentName = componentName.replaceAll("TMAP_IN", "TMAP_OUT");
List<? extends INode> generatedNodes = node.getProcess().getGeneratingNodes();
for(INode loopNode : generatedNodes) {
if(loopNode.getUniqueName().equals(searchedComponentName)) {
inputConnections = (List<IConnection>) loopNode.getIncomingConnections();
break;
}
}
}
// Bug partially fixed, see bug:785
// Bug partially fixed, see bug:3966
boolean hasIterate = hasIterateConnectionBefore(inputConnections, node.getProcess().getGraphicalNodes());
%>
// ###############################
// # Lookup hashes releasing
<%
if(!isVirtualOut) {
HashMap<String, IConnection> hNameToConnection = new HashMap<String, IConnection>();
for (IConnection connection : inputConnections) {
hNameToConnection.put(connection.getName(), connection);
}
List<ExternalMapperTable> inputTablesList = new ArrayList<ExternalMapperTable>(data.getInputTables());
int lstSizeInputs = inputTablesList.size();
if(lstSizeInputs > 1) {
String mainTableName = inputTablesList.get(0).getName();
int joinedTableIndex = 0;
int tmpJoinedTableIndex = 0;
boolean hasPersistentLookup = false;
for (int i = 0; i < lstSizeInputs; i++) {
ExternalMapperTable inputTable = (ExternalMapperTable) inputTablesList.get(i);
if(hNameToConnection.get(inputTable.getName()) != null) {
if(inputTable.isPersistent()
&& !"ALL_ROWS".equals(inputTable.getMatchingMode())
) {
joinedTableIndex = tmpJoinedTableIndex;
hasPersistentLookup = true;
}
tmpJoinedTableIndex++;
}
}
if(hasPersistentLookup) {
%>
fsi_<%=uniqueNameComponent%>_<%=joinedTableIndex%>.endGet();
<%
}
}
for (int i = 1; i < lstSizeInputs; i++) {
ExternalMapperTable inputTable = (ExternalMapperTable) inputTablesList.get(i);
List<ExternalMapperTableEntry> tableEntries = inputTable.getMetadataTableEntries();
if (tableEntries == null) {
continue;
}
String tableName = inputTable.getName();
IConnection connection = hNameToConnection.get(tableName);
if(connection == null) {
continue;
}
String lookupMode = inputTable.getLookupMode();
boolean isCacheOrReload = org.talend.designer.mapper.model.table.LOOKUP_MODE.CACHE_OR_RELOAD.name().equals(lookupMode);
if(!hasIterate) {
%>
if(tHash_Lookup_<%=tableName%> != null) {
tHash_Lookup_<%=tableName%>.endGet();
}
globalMap.remove( "tHash_Lookup_<%=tableName%>" );
<%
if(isCacheOrReload) {
%>
tHash_Lookup_Cache_<%=tableName%>.endGet();
tHash_Lookup_Cache_<%=tableName%> = null;
tHash_Lookup_Real_<%=tableName%> = null;
<%
}
%>
<%
}
}
}
%>
// ###############################
<%
List<IConnection> outputConnections = (List<IConnection>) node.getOutgoingConnections();
Map<String, IConnection> nameToOutputConnection = new HashMap<String, IConnection>();
for (IConnection connection : outputConnections) {
nameToOutputConnection.put(connection.getName(), connection);
}
List<ExternalMapperTable> outputTables = data.getOutputTables();
for(ExternalMapperTable outputTable : outputTables){
String outputTableName = outputTable.getName();
List<ExternalMapperTableEntry> tableEntries = outputTable.getMetadataTableEntries();
if (tableEntries == null || nameToOutputConnection.get(outputTable.getName()) == null) {
continue;
}
if(isLog4jEnabled){
if(!isVirtualOut) {
%>
log.debug("<%=uniqueNameComponent%> - Written records count in the table '<%=outputTableName%>': " + count_<%=outputTableName%>_<%=uniqueNameComponent%> + ".");
<%
}
}
}
%>

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