Compare commits
77 Commits
patch/TPS-
...
patch/6.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f78a0e497 | ||
|
|
66ea87d97f | ||
|
|
b0b8d8afb6 | ||
|
|
695ea4cf70 | ||
|
|
007c531a4d | ||
|
|
575ddb14c9 | ||
|
|
000836e176 | ||
|
|
03fbf763cb | ||
|
|
5d2c7533e3 | ||
|
|
cfeb82d1bb | ||
|
|
1550c7a14f | ||
|
|
a0ebd2851b | ||
|
|
788f1923d4 | ||
|
|
f0b81df47e | ||
|
|
2ccb85a82f | ||
|
|
e018f93578 | ||
|
|
ab9b243e63 | ||
|
|
a5f2a1b3ff | ||
|
|
40f70865e9 | ||
|
|
b5e1900671 | ||
|
|
6686722b4e | ||
|
|
216d51c559 | ||
|
|
4a758d5c37 | ||
|
|
1ee32b02c4 | ||
|
|
e6f7fcc5ba | ||
|
|
af6a60f1e7 | ||
|
|
23007cbdca | ||
|
|
3210141373 | ||
|
|
3c9241766e | ||
|
|
359eadf340 | ||
|
|
f3599ef26a | ||
|
|
65614567c1 | ||
|
|
62f2f961a8 | ||
|
|
632752fe85 | ||
|
|
96d578b725 | ||
|
|
2219e60230 | ||
|
|
686266748c | ||
|
|
cd1b5552b4 | ||
|
|
35ee0789c3 | ||
|
|
8275456f03 | ||
|
|
4bf8a8cc22 | ||
|
|
cfd8c225a3 | ||
|
|
b4bd8ea24a | ||
|
|
9de01a44b5 | ||
|
|
8b1607b73c | ||
|
|
8f63611588 | ||
|
|
76ace9d645 | ||
|
|
008c761f70 | ||
|
|
4a4cd47d48 | ||
|
|
2c7b7281cb | ||
|
|
553caefe7f | ||
|
|
0bca09744f | ||
|
|
8063eafd6d | ||
|
|
783e16bbc3 | ||
|
|
e93f54e40b | ||
|
|
dcfa234640 | ||
|
|
fe1221997a | ||
|
|
9b1c6ba0a4 | ||
|
|
ddf4ce4bda | ||
|
|
f72aaad86b | ||
|
|
7b3c19266c | ||
|
|
6d48b6b2c4 | ||
|
|
c1b3f85152 | ||
|
|
e2f6e1513d | ||
|
|
1530f1d559 | ||
|
|
f57b092922 | ||
|
|
3463f21bc4 | ||
|
|
d5aff3ca44 | ||
|
|
16b6f85622 | ||
|
|
cb8b5bb472 | ||
|
|
88619ea8a0 | ||
|
|
0be9d41165 | ||
|
|
58d15d2a5e | ||
|
|
7002a02eb6 | ||
|
|
7bf7cea605 | ||
|
|
e72f158920 | ||
|
|
c9ad66f311 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.componentdesigner.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.componentdesigner.rcp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.documentation.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.hl7.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.mapper.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.job.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.runprocess.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.scd.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.webservice.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.xmlmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.expressionbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.ftp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.json.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.di.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sqlbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.componentdesigner.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
17
main/features/org.talend.designer.feature.patch/.project
Normal file
17
main/features/org.talend.designer.feature.patch/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.talend.designer.feature.patch</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1 @@
|
||||
bin.includes = feature.xml
|
||||
20
main/features/org.talend.designer.feature.patch/feature.xml
Normal file
20
main/features/org.talend.designer.feature.patch/feature.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="org.talend.designer.feature.patch"
|
||||
label="Patch"
|
||||
version="6.1.1.qualifier"
|
||||
license-feature="org.talend.tup.patch.feature"
|
||||
license-feature-version="6.1.1.qualifier">
|
||||
|
||||
<requires>
|
||||
<import feature="org.talend.designer.feature" version="6.1.1.qualifier" patch="true"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="org.talend.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
17
main/features/org.talend.repository.feature.patch/.project
Normal file
17
main/features/org.talend.repository.feature.patch/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.talend.repository.feature.patch</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="org.talend.repository.feature.patch"
|
||||
label="Patch"
|
||||
version="6.1.1.qualifier"
|
||||
license-feature="org.talend.tup.patch.feature"
|
||||
license-feature-version="6.1.1.qualifier">
|
||||
|
||||
<requires>
|
||||
<import feature="org.talend.repository.feature" version="6.1.1.qualifier" patch="true"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="org.talend.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.libraries.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.component.core</artifactId>
|
||||
|
||||
@@ -56,6 +56,7 @@ import org.talend.core.model.temp.ECodePart;
|
||||
import org.talend.core.model.utils.TalendTextUtils;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.ui.services.IComponentsLocalProviderService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.DesignerPlugin;
|
||||
import org.talend.designer.core.model.components.AbstractComponent;
|
||||
import org.talend.designer.core.model.components.DummyComponent;
|
||||
@@ -1633,7 +1634,8 @@ public class Component extends AbstractComponent {
|
||||
return "\"" + value + "\"";//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
if (property.getType() == SchemaElement.Type.SCHEMA) {
|
||||
return "\"" + value.replace("\"", "\\\"") + "\"";//$NON-NLS-1$ //$NON-NLS-2$
|
||||
// Handles embedded escaped quotes which might occur
|
||||
return "\"" + value.replace("\\\"", "\\\\\"").replace("\"", "\\\"") + "\"";//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -15,14 +15,18 @@ package org.talend.component.core.utils;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.component.core.constants.IGenericConstants;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.components.api.properties.ComponentProperties.Deserialized;
|
||||
import org.talend.components.api.schema.Schema;
|
||||
import org.talend.components.api.schema.SchemaElement;
|
||||
import org.talend.components.api.schema.SchemaElement.Type;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.builder.connection.ConnectionFactory;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataColumn;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import orgomg.cwm.objectmodel.core.CoreFactory;
|
||||
import orgomg.cwm.objectmodel.core.TaggedValue;
|
||||
@@ -96,4 +100,24 @@ public class SchemaUtils {
|
||||
metadataColumn.setDefaultValue(schemaElement.getDefaultValue());
|
||||
}
|
||||
|
||||
public static ComponentProperties getCurrentComponentProperties(IMetadataTable table) {
|
||||
if (table != null && table instanceof MetadataTableRepositoryObject) {
|
||||
MetadataTableRepositoryObject metaTableRepObj = (MetadataTableRepositoryObject) table;
|
||||
MetadataTable metadataTable = metaTableRepObj.getTable();
|
||||
if (metadataTable != null && metadataTable.getTaggedValue() != null) {
|
||||
for (TaggedValue serializedProps : metadataTable.getTaggedValue()) {
|
||||
if (IGenericConstants.COMPONENT_PROPERTIES_TAG.equals(serializedProps.getTag())) {
|
||||
String serializedProperties = serializedProps.getValue();
|
||||
if (serializedProperties != null) {
|
||||
Deserialized fromSerializedProperties = ComponentProperties.fromSerialized(serializedProperties);
|
||||
if (fromSerializedProperties != null) {
|
||||
return fromSerializedProperties.properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,4 +162,13 @@
|
||||
class="org.talend.component.ui.wizard.ui.context.handler.GenericRepositoryContextHandler">
|
||||
</RepositoryContext>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.repository.repository_node_provider">
|
||||
<repositoryNode
|
||||
class="org.talend.component.ui.wizard.model.FakeGenericExtendNode"
|
||||
label="FakeGenericNode"
|
||||
products="DI"
|
||||
type="FakeGenericNodeType">
|
||||
</repositoryNode>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.component.ui.wizard</artifactId>
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.beans.PropertyChangeEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.fieldassist.DecoratedField;
|
||||
@@ -36,12 +37,10 @@ import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.component.core.model.GenericElementParameter;
|
||||
import org.talend.component.ui.wizard.ui.DynamicComposite;
|
||||
import org.talend.components.api.properties.NameAndLabel;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.properties.tab.IDynamicProperty;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.i18n.Messages;
|
||||
import org.talend.designer.core.ui.editor.nodes.Node;
|
||||
import org.talend.designer.core.ui.editor.properties.controllers.AbstractElementPropertySectionController;
|
||||
@@ -56,13 +55,8 @@ public class NameAndLabelsReferenceController extends AbstractElementPropertySec
|
||||
|
||||
private static final String MODULE = "MODULE"; //$NON-NLS-1$
|
||||
|
||||
private boolean isWizard;
|
||||
|
||||
public NameAndLabelsReferenceController(IDynamicProperty dp) {
|
||||
super(dp);
|
||||
if (dynamicProperty instanceof DynamicComposite) {
|
||||
isWizard = ((DynamicComposite) dynamicProperty).isWizard();
|
||||
}
|
||||
}
|
||||
|
||||
public Command createCommand() {
|
||||
@@ -83,19 +77,16 @@ public class NameAndLabelsReferenceController extends AbstractElementPropertySec
|
||||
}
|
||||
}
|
||||
}
|
||||
NameAndLabelsDialog nameAndLabelsDialog = new NameAndLabelsDialog(composite.getShell(), nals);
|
||||
if (nameAndLabelsDialog.open() == IDialogConstants.OK_ID) {
|
||||
String propertyName = (String) button.getData(PARAMETER_NAME);
|
||||
String result = StringUtils.trimToEmpty(nameAndLabelsDialog.getResult());
|
||||
Text moduleText = (Text) hashCurControls.get(propertyName);
|
||||
moduleText.setText(result);
|
||||
curParameter.setValue(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
NameAndLabelsDialog nameAndLabelsDialog = new NameAndLabelsDialog(composite.getShell(), nals);
|
||||
if (nameAndLabelsDialog.open() == IDialogConstants.OK_ID) {
|
||||
String propertyName = (String) button.getData(PARAMETER_NAME);
|
||||
String result = nameAndLabelsDialog.getResult();
|
||||
if (!isWizard) {
|
||||
result = TalendQuoteUtils.addQuotesIfNotExist(result);
|
||||
}
|
||||
Text moduleText = (Text) hashCurControls.get(propertyName);
|
||||
moduleText.setText(result);
|
||||
curParameter.setValue(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -154,6 +145,7 @@ public class NameAndLabelsReferenceController extends AbstractElementPropertySec
|
||||
Control cLayout = dField.getLayoutControl();
|
||||
Text moduleText = (Text) dField.getControl();
|
||||
moduleText.setData(PARAMETER_NAME, param.getName());
|
||||
moduleText.setEditable(false);
|
||||
cLayout.setBackground(subComposite.getBackground());
|
||||
|
||||
addDragAndDropTarget(moduleText);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.talend.component.ui.wizard.model;
|
||||
|
||||
import org.talend.commons.ui.runtime.image.IImage;
|
||||
import org.talend.commons.ui.runtime.repository.IExtendRepositoryNode;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.runtime.services.IGenericWizardService;
|
||||
|
||||
/**
|
||||
*
|
||||
* created by ycbai on 2015年12月7日 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class FakeGenericExtendNode implements IExtendRepositoryNode {
|
||||
|
||||
public FakeGenericExtendNode() {
|
||||
initGenericTypes();
|
||||
}
|
||||
|
||||
private void initGenericTypes() {
|
||||
IGenericWizardService wizardService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
|
||||
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
|
||||
}
|
||||
if (wizardService != null) {
|
||||
wizardService.createNodesFromComponentService(null); // Just use to init generic types.
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IImage getNodeImage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrdinal() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getChildren() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -67,8 +67,10 @@ public class GenericWizardService implements IGenericWizardService {
|
||||
String folder = "metadata/" + name; //$NON-NLS-1$ //TODO: maybe need to retrieve it from component service?
|
||||
int ordinal = 100;
|
||||
ERepositoryObjectType repositoryType = internalService.createRepositoryType(name, displayName, name, folder, ordinal);
|
||||
repNodes.add(internalService.createRepositoryNode(curParentNode, wizardDefinition.getDisplayName(), repositoryType,
|
||||
ENodeType.SYSTEM_FOLDER));
|
||||
if (curParentNode != null) {
|
||||
repNodes.add(internalService.createRepositoryNode(curParentNode, wizardDefinition.getDisplayName(),
|
||||
repositoryType, ENodeType.SYSTEM_FOLDER));
|
||||
}
|
||||
}
|
||||
return repNodes;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,16 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.wizard.IWizardContainer;
|
||||
@@ -25,6 +34,7 @@ import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchWizard;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.swt.dialogs.ErrorDialogWidthDetailArea;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.component.core.constants.IGenericConstants;
|
||||
@@ -214,11 +224,10 @@ public class GenericConnWizard extends CheckLastVersionRepositoryWizard {
|
||||
}
|
||||
}
|
||||
try {
|
||||
final IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
Form form = wizPage.getForm();
|
||||
if (form.isCallAfterFormFinish()) {
|
||||
if (creation) {
|
||||
factory.create(connectionItem, new Path("")); //$NON-NLS-1$
|
||||
createConnectionItem();
|
||||
}
|
||||
compService.afterFormFinish(form.getName(), form.getComponentProperties());
|
||||
}
|
||||
@@ -239,6 +248,27 @@ public class GenericConnWizard extends CheckLastVersionRepositoryWizard {
|
||||
}
|
||||
}
|
||||
|
||||
private void createConnectionItem() throws CoreException {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
final IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
IWorkspaceRunnable operation = new IWorkspaceRunnable() {
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
try {
|
||||
factory.create(connectionItem, new Path("")); //$NON-NLS-1$;
|
||||
} catch (PersistenceException e) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, "org.talend.metadata.management.ui",
|
||||
"Error when create the connection", e));
|
||||
}
|
||||
}
|
||||
};
|
||||
ISchedulingRule schedulingRule = workspace.getRoot();
|
||||
// the update the project files need to be done in the workspace runnable to avoid all
|
||||
// notification of changes before the end of the modifications.
|
||||
workspace.run(operation, schedulingRule, IWorkspace.AVOID_UPDATE, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performCancel() {
|
||||
if (!creation) {
|
||||
|
||||
@@ -22,10 +22,13 @@ import org.talend.component.core.constants.IComponentConstants;
|
||||
import org.talend.component.core.dnd.AbstractComponentDragAndDropHandler;
|
||||
import org.talend.component.core.model.GenericElementParameter;
|
||||
import org.talend.component.core.utils.ComponentsUtils;
|
||||
import org.talend.component.core.utils.SchemaUtils;
|
||||
import org.talend.component.ui.model.genericMetadata.GenericConnection;
|
||||
import org.talend.component.ui.model.genericMetadata.GenericConnectionItem;
|
||||
import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.components.api.properties.ComponentProperties.Deserialized;
|
||||
import org.talend.components.api.schema.SchemaElement;
|
||||
import org.talend.components.api.schema.SchemaElement.Type;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
@@ -90,19 +93,25 @@ public class GenericDragAndDropHandler extends AbstractComponentDragAndDropHandl
|
||||
}
|
||||
}
|
||||
if (IComponentConstants.SCHEMA.equalsIgnoreCase(paramName)) {
|
||||
if (table != null) {
|
||||
tableName = table.getTableName();
|
||||
if (tableName != null) {
|
||||
// return table.getId() + " - " + tableName;//$NON-NLS-1$
|
||||
ComponentProperties componentModuleProperties = SchemaUtils.getCurrentComponentProperties(table);
|
||||
if (componentModuleProperties != null) {
|
||||
SchemaElement schemaElement = componentModuleProperties.getProperty(paramName);
|
||||
if (schemaElement != null && schemaElement instanceof ComponentProperties) {
|
||||
return ComponentsUtils.getGenericPropertyValue(componentModuleProperties, schemaElement.getName()
|
||||
+ IComponentConstants.EXP_SEPARATOR + paramName);
|
||||
}
|
||||
}
|
||||
} else if (IComponentConstants.MODULENAME.equalsIgnoreCase(paramName)) {
|
||||
if (table != null) {
|
||||
tableName = table.getLabel();
|
||||
if (tableName == null) {
|
||||
tableName = table.getLabel();
|
||||
ComponentProperties componentModuleProperties = SchemaUtils.getCurrentComponentProperties(table);
|
||||
if (componentModuleProperties != null) {
|
||||
SchemaElement moduleElement = componentModuleProperties.getProperty(paramName);
|
||||
if (moduleElement != null) {
|
||||
if (Type.STRING.equals(moduleElement.getType())) {
|
||||
return getRepositoryValueOfStringType(connection, StringUtils.trimToNull(table.getLabel()));
|
||||
} else {
|
||||
return table.getLabel();
|
||||
}
|
||||
}
|
||||
return getRepositoryValueOfStringType(connection, StringUtils.trimToNull(tableName));
|
||||
}
|
||||
} else if (IComponentConstants.QUERYMODE.equalsIgnoreCase(paramName)) {
|
||||
if (ComponentsUtils.getGenericPropertyValue(componentProperties, value) != null) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.Set;
|
||||
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.ui.navigator.CommonNavigator;
|
||||
import org.eclipse.ui.navigator.CommonViewer;
|
||||
import org.talend.core.repository.model.ProjectRepositoryNode;
|
||||
@@ -33,38 +34,6 @@ public class MetadataGenericContentProvider extends ProjectRepoDirectChildrenNod
|
||||
|
||||
MetadataNodeTester metadataNodeTester = new MetadataNodeTester();
|
||||
|
||||
// private final class GenericNodeDirectChildrenNodeVisitor extends RunnableResourceVisitor {
|
||||
//
|
||||
// @Override
|
||||
// protected boolean visit(IResourceDelta delta, Collection<Runnable> runnables) {
|
||||
// VisitResourceHelper visitHelper = new VisitResourceHelper(delta);
|
||||
// if (visitHelper.isIgnoredResource(delta)) {
|
||||
// return false;
|
||||
// }
|
||||
// Set<RepositoryNode> topLevelNodes = getTopLevelNodes();
|
||||
// if (topLevelNodes == null) {
|
||||
// return false;
|
||||
// }
|
||||
// boolean visitChildren = true;
|
||||
// for (final RepositoryNode repoNode : topLevelNodes) {
|
||||
// if ((repoNode.getContentType() == ERepositoryObjectType.PROCESS)
|
||||
// || (repoNode.getContentType() == ERepositoryObjectType.PROCESS_MR)) {
|
||||
// visitChildren = false; // if valid, don't visit the children any more.
|
||||
// if (viewer instanceof RepoViewCommonViewer) {
|
||||
// runnables.add(new TopLevelNodeRunnable(repoNode) {
|
||||
//
|
||||
// @Override
|
||||
// public void run() {
|
||||
// refreshTopLevelNode(repoNode);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return visitChildren;
|
||||
// }
|
||||
// }
|
||||
|
||||
private final class GenericNodeDirectChildrenNodeVisitor extends RunnableResourceVisitor {
|
||||
|
||||
@Override
|
||||
@@ -110,8 +79,9 @@ public class MetadataGenericContentProvider extends ProjectRepoDirectChildrenNod
|
||||
getTopLevelNodes().addAll(projectRepositoryNode.getGenericTopNodesMap().values());
|
||||
return getTopLevelNodes().toArray();
|
||||
}
|
||||
if (getTopLevelNodes().contains(repoNode)) {
|
||||
if (getTopLevelNodes().contains(repoNode) && !repoNode.isInitialized()) {
|
||||
projectRepositoryNode.initializeChildren(repoNode);
|
||||
repoNode.setInitialized(true);
|
||||
}
|
||||
return repoNode.getChildren().toArray();
|
||||
}
|
||||
@@ -144,4 +114,21 @@ public class MetadataGenericContentProvider extends ProjectRepoDirectChildrenNod
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
// visitor
|
||||
if (this.viewer != null && this.genericNodeVisitor != null && this.viewer instanceof RepoViewCommonViewer) {
|
||||
final Control control = this.viewer.getControl();
|
||||
if (control != null && !control.isDisposed()) {
|
||||
CommonNavigator commonNavigator = ((RepoViewCommonViewer) this.viewer).getCommonNavigator();
|
||||
if (commonNavigator instanceof RepoViewCommonNavigator) {
|
||||
((RepoViewCommonNavigator) commonNavigator).removeVisitor(this.genericNodeVisitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.componentdesigner.rcp</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.componentdesigner</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -61,7 +61,8 @@ props_<%=cid %>.setRuntimeOnly().init();
|
||||
for (Component.CodegenPropInfo propInfo : propsToProcess) { // propInfo
|
||||
List<SchemaElement> properties = propInfo.props.getProperties();
|
||||
for (SchemaElement property : properties) { // property
|
||||
if (propInfo.props.getValue(property) != null) { // if
|
||||
Object value = propInfo.props.getValue(property);
|
||||
if (value != null && (!(value instanceof String) || !((String)value).equals(""))) { // if
|
||||
%>
|
||||
props_<%=cid %><%=propInfo.fieldName%>.setValue("<%=property.getName()%>",
|
||||
<%=component.getCodegenValue(property, propInfo.props.getStringValue(property))%>);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<cxf.version>3.1.1</cxf.version>
|
||||
<talend.nexus.url>http://newbuild.talend.com:8081</talend.nexus.url>
|
||||
<talend.nexus.url>https://artifacts-zl.talend.com</talend.nexus.url>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>6.1.1-SNAPSHOT</version>
|
||||
<version>6.1.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -212,9 +212,9 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<IMPORT NAME="cglib_nodep_213" MODULE="cglib-nodep-2.1_3.jar" MVN="mvn:org.talend.libraries/cglib-nodep-2.1_3/6.0.0" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_collections_211" MODULE="commons-collections-2.1.1.jar" MVN="mvn:org.talend.libraries/commons-collections-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-2.1.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_logging_104" MODULE="commons-logging-1.0.4.jar" MVN="mvn:org.talend.libraries/commons-logging-1.0.4/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="dom4j_161" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" />
|
||||
<IMPORT NAME="dom4j_161" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="DB_VERSION=='BONITA_561'" BundleID="" />
|
||||
<IMPORT NAME="ehcache_123" MODULE="ehcache-1.2.3.jar" MVN="mvn:org.talend.libraries/ehcache-1.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.ehcache/lib/ehcache-1.2.3.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="groovy_all_170" MODULE="groovy-all-1.7.0.jar" MVN="mvn:org.talend.libraries/groovy-all-1.7.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.groovy/lib/groovy-all-1.7.0.jar" REQUIRED="false" />
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<IMPORT NAME="cglib_nodep_213" MODULE="cglib-nodep-2.1_3.jar" MVN="mvn:org.talend.libraries/cglib-nodep-2.1_3/6.0.0" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_collections_211" MODULE="commons-collections-2.1.1.jar" MVN="mvn:org.talend.libraries/commons-collections-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-2.1.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_logging_104" MODULE="commons-logging-1.0.4.jar" MVN="mvn:org.talend.libraries/commons-logging-1.0.4/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="dom4j_161" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561')" />
|
||||
<IMPORT NAME="dom4j_161" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561')" BundleID="" />
|
||||
<IMPORT NAME="ehcache_123" MODULE="ehcache-1.2.3.jar" MVN="mvn:org.talend.libraries/ehcache-1.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.ehcache/lib/ehcache-1.2.3.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="groovy_all_170" MODULE="groovy-all-1.7.0.jar" MVN="mvn:org.talend.libraries/groovy-all-1.7.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.groovy/lib/groovy-all-1.7.0.jar" REQUIRED="false" />
|
||||
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
|
||||
<IMPORT NAME="json-lib" MODULE="json-lib-2.4-jdk15.jar" MVN="mvn:org.talend.libraries/json-lib-2.4-jdk15/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json-lib-2.4-jdk15.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
<IMPORT NAME="commons_lang" MODULE="commons-lang-2.6.jar" MVN="mvn:org.talend.libraries/commons-lang-2.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
<IMPORT NAME="commons_logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
|
||||
@@ -170,8 +170,8 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
|
||||
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID=""/>
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="log4j" MODULE="log4j-1.2.15.jar" MVN="mvn:org.talend.libraries/log4j-1.2.15/6.0.0" UrlPath="platform:/base/plugins/org.apache.log4j_1.2.15.v201012070815.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="poi" MODULE="poi-3.11-20141221_modified_talend.jar" MVN="mvn:org.talend.libraries/poi-3.11-20141221_modified_talend/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-3.11-20141221_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="poi-ooxml" MODULE="poi-ooxml-3.11-20141221_modified_talend.jar" MVN="mvn:org.talend.libraries/poi-ooxml-3.11-20141221_modified_talend/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-ooxml-3.11-20141221_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_talendSAX" MODULE="TalendSAX.jar" MVN="mvn:org.talend.libraries/TalendSAX/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/TalendSAX.jar"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -138,14 +138,14 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" BundleID="org.apache.servicemix.bundles.dom4j" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar"
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" BundleID="org.apache.servicemix.bundles.dom4j" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar"
|
||||
REQUIRED_IF="GENERATION_MODE == 'DOM4J'" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" BundleID="org.apache.servicemix.bundles.jaxen" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" BundleID="org.apache.servicemix.bundles.jaxen" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
|
||||
REQUIRED_IF="GENERATION_MODE == 'DOM4J'" />
|
||||
<IMPORT NAME="Java_xercesImpl" MODULE="xercesImpl.jar" MVN="mvn:org.talend.libraries/xercesImpl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xercesImpl.jar"
|
||||
REQUIRED_IF="(GENERATION_MODE == 'XERCES') OR (GENERATION_MODE == 'SAX')" />
|
||||
REQUIRED_IF="(GENERATION_MODE == 'XERCES') OR (GENERATION_MODE == 'SAX')" BundleID="" />
|
||||
<IMPORT NAME="Java_xalan" MODULE="xalan.jar" MVN="mvn:org.talend.libraries/xalan/6.0.0" UrlPath="platform:/base/plugins/org.apache.xalan_2.7.1.v201005080400.jar"
|
||||
REQUIRED_IF="GENERATION_MODE == 'XERCES'" />
|
||||
REQUIRED_IF="GENERATION_MODE == 'XERCES'" BundleID="" />
|
||||
<IMPORT NAME="Java_talendSAX" MODULE="TalendSAX.jar" MVN="mvn:org.talend.libraries/TalendSAX/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/TalendSAX.jar"
|
||||
REQUIRED_IF="GENERATION_MODE == 'SAX'" />
|
||||
<IMPORT NAME="xpathutil" MODULE="xpathutil-1.0.0.jar" MVN="mvn:org.talend.libraries/xpathutil-1.0.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpathutil-1.0.0.jar"
|
||||
|
||||
@@ -222,8 +222,8 @@
|
||||
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
|
||||
|
||||
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel.jar" MVN="mvn:org.talend.libraries/talendExcel/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID=""/>
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="log4j" MODULE="log4j-1.2.15.jar" MVN="mvn:org.talend.libraries/log4j-1.2.15/6.0.0" UrlPath="platform:/base/plugins/org.apache.log4j_1.2.15.v201012070815.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="poi" MODULE="poi-3.11-20141221_modified_talend.jar" MVN="mvn:org.talend.libraries/poi-3.11-20141221_modified_talend/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-3.11-20141221_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="poi-ooxml" MODULE="poi-ooxml-3.11-20141221_modified_talend.jar" MVN="mvn:org.talend.libraries/poi-ooxml-3.11-20141221_modified_talend/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-ooxml-3.11-20141221_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
|
||||
REQUIRED="true" />
|
||||
REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_xmlUtil" MODULE="xmlUtil.jar" MVN="mvn:org.talend.libraries/xmlUtil/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xmlUtil.jar"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="dom4j-1_6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="dom4j-1_6" MODULE="dom4j-1.6.1.jar" MVN="mvn:org.talend.libraries/dom4j-1.6.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<IMPORT NAME="jboss_j2ee" MODULE="jboss-j2ee-4.0.2.jar" MVN="mvn:org.talend.libraries/jboss-j2ee-4.0.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jboss/lib/jboss-j2ee-4.0.2.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="jdom" MODULE="jdom-1.1.jar" MVN="mvn:org.talend.libraries/jdom-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdom/lib/jdom-1.1.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="log4j" MODULE="log4j-1.2.15.jar" MVN="mvn:org.talend.libraries/log4j-1.2.15/6.0.0" UrlPath="platform:/base/plugins/org.apache.log4j_1.2.15.v201012070815.jar" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="XercesImpl" MODULE="xercesImpl-2.4.0.jar" MVN="mvn:org.talend.libraries/xercesImpl-2.4.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xercesImpl-2.4.0.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="XercesImpl" MODULE="xercesImpl-2.4.0.jar" MVN="mvn:org.talend.libraries/xercesImpl-2.4.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xercesImpl-2.4.0.jar" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -1,53 +1,71 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String dataModule = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
String dataEntity = ElementParameterParser.getValue(node, "__DATACONCEPT__");
|
||||
String arraySize = ElementParameterParser.getValue(node,"__MASS_LEVEL__");
|
||||
|
||||
boolean validate = ("true").equals(ElementParameterParser.getValue(node,"__VALIDATE__"));
|
||||
boolean isGenerateId = ("true").equals(ElementParameterParser.getValue(node,"__GENERATE_ID__"));
|
||||
boolean insertOnly = ("true").equals(ElementParameterParser.getValue(node,"__INSERT_ONLY__"));
|
||||
|
||||
boolean useTransaction = ("true").equals(ElementParameterParser.getValue(node,"__USE_TRANSACTION__"));
|
||||
String transactionProvider = ElementParameterParser.getValue(node,"__TRANSACTION_PROVIDER__");
|
||||
String mdmTransaction = "mdmTransaction_" + transactionProvider;
|
||||
|
||||
%>
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
|
||||
String dataModule = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
String dataEntity = ElementParameterParser.getValue(node, "__DATACONCEPT__");
|
||||
String arraySize = ElementParameterParser.getValue(node,"__MASS_LEVEL__");
|
||||
|
||||
boolean validate = ("true").equals(ElementParameterParser.getValue(node,"__VALIDATE__"));
|
||||
boolean isGenerateId = ("true").equals(ElementParameterParser.getValue(node,"__GENERATE_ID__"));
|
||||
boolean insertOnly = ("true").equals(ElementParameterParser.getValue(node,"__INSERT_ONLY__"));
|
||||
|
||||
boolean useTransaction = ("true").equals(ElementParameterParser.getValue(node,"__USE_TRANSACTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__TRANSACTION_PROVIDER__");
|
||||
String trans = "mdmTrans_" + connection;
|
||||
%>
|
||||
|
||||
<% String passwordFieldName = "__PASSWORD__"; %>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
<% logUtil.info("\"Initializing bulkload client with URL: \"", mdmUrl,"\".\"");%>
|
||||
|
||||
org.talend.mdm.bulkload.client.BulkloadClient bulkloadClient_<%=cid %> = new org.talend.mdm.bulkload.client.BulkloadClient(<%=mdmUrl%>, <%=username %>, decryptedPassword_<%=cid%>, null, <%=dataCluster %> + "<%=isStaging?"#STAGING":""%>", <%=dataEntity %>, <%=dataModule%>);
|
||||
<% logUtil.info("\"Initializing bulkload client with URL: \"", mdmUrl);%>
|
||||
org.talend.mdm.bulkload.client.BulkloadClient bulkloadClient_<%=cid %> = new org.talend.mdm.bulkload.client.BulkloadClient(<%=mdmUrl %>, <%=username %>, decryptedPassword_<%=cid %>, null, <%=dataCluster %> + "<%=isStaging?"#STAGING":""%>", <%=dataEntity %>, <%=dataModule %>);
|
||||
|
||||
<%if(useTransaction) {%>
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid%> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get("<%=mdmTransaction%>");
|
||||
if(mdmTransaction_<%=cid%>!=null) {
|
||||
bulkloadClient_<%=cid %>.setTransactionId(mdmTransaction_<%=cid%>.getId());
|
||||
}
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> == null) {
|
||||
String murl_<%=cid %> = (String)globalMap.get("mdmUrl_<%=connection %>");
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
String turl_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.getMDMTransactionURL(murl_<%=cid %>, true);
|
||||
String username_<%=cid %> = (String)globalMap.get("username_<%=connection %>");
|
||||
String password_<%=cid %> = (String)globalMap.get("password_<%=connection %>");
|
||||
if((Boolean)globalMap.get("useClientTranId_<%=connection %>")) {
|
||||
String sessionID_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.getSessionID(turl_<%=cid %>,username_<%=cid %>,password_<%=cid %>);
|
||||
mdmTransaction_<%=cid %> = new com.talend.mdm.transaction.client.MDMTransaction();
|
||||
mdmTransaction_<%=cid %>.setUrl(turl_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setId("<%=cid %>_" + java.util.UUID.randomUUID());
|
||||
mdmTransaction_<%=cid %>.setUsername(username_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setPassword(password_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setSessionId(sessionID_<%=cid %>);
|
||||
} else {
|
||||
<% logUtil.debug("\"Attempt to get a remote transaction from url: \" + murl_" + cid);%>
|
||||
mdmTransaction_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.newTransaction(turl_<%=cid %>,username_<%=cid %>,password_<%=cid %>);
|
||||
}
|
||||
globalMap.put(transKey_<%=cid %>, mdmTransaction_<%=cid %>);
|
||||
<% logUtil.debug("\"Got transaction successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
bulkloadClient_<%=cid %>.setTransactionId(mdmTransaction_<%=cid %>.getId());
|
||||
bulkloadClient_<%=cid %>.setSessionId(mdmTransaction_<%=cid%>.getSessionId());
|
||||
<%}%>
|
||||
|
||||
bulkloadClient_<%=cid %>.startThreadCount();
|
||||
bulkloadClient_<%=cid %>.setOptions(new org.talend.mdm.bulkload.client.BulkloadOptions(<%=isGenerateId %>, <%=validate %>, <%=arraySize%>, <%=insertOnly%>));
|
||||
int count_<%=cid%> = 0;
|
||||
org.talend.mdm.bulkload.client.InputStreamMerger inputStreamMerger_<%=cid%> = null;
|
||||
bulkloadClient_<%=cid %>.setOptions(new org.talend.mdm.bulkload.client.BulkloadOptions(<%=isGenerateId %>, <%=validate %>, <%=arraySize %>, <%=insertOnly %>));
|
||||
int count_<%=cid %> = 0;
|
||||
org.talend.mdm.bulkload.client.InputStreamMerger inputStreamMerger_<%=cid %> = null;
|
||||
@@ -1,26 +1,24 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
//for bug TDI-22445
|
||||
%>
|
||||
if (inputStreamMerger_<%=cid%>!=null) {
|
||||
inputStreamMerger_<%=cid%>.close();
|
||||
inputStreamMerger_<%=cid%>.close();
|
||||
}
|
||||
bulkloadClient_<%=cid %>.waitForEndOfQueue();
|
||||
bulkloadClient_<%=cid %> = null;
|
||||
<%//TDI-26145%>
|
||||
if(inputStreamMerger_<%=cid%>!=null && inputStreamMerger_<%=cid%>.getLastReportedFailure()!=null){
|
||||
|
||||
if(inputStreamMerger_<%=cid%>!=null && inputStreamMerger_<%=cid%>.getLastReportedFailure()!=null) {
|
||||
<% logUtil.error("\"Call bulkload with error:\"+ inputStreamMerger_"+cid+".getLastReportedFailure().getMessage()");%>
|
||||
|
||||
throw new Exception(inputStreamMerger_<%=cid%>.getLastReportedFailure());
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
%>
|
||||
Object o<%=cid %> = resourceMap.get("mdmBulkStream<%=cid %>");
|
||||
if(o<%=cid %> != null){
|
||||
if(o<%=cid %> != null) {
|
||||
<% logUtil.info("\"Cleaning input stream.\"");%>
|
||||
|
||||
org.talend.mdm.bulkload.client.InputStreamMerger stream = (org.talend.mdm.bulkload.client.InputStreamMerger)o<%=cid %>;
|
||||
stream.clean();
|
||||
}
|
||||
org.talend.mdm.bulkload.client.InputStreamMerger stream = (org.talend.mdm.bulkload.client.InputStreamMerger)o<%=cid %>;
|
||||
stream.clean();
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
java.util.List
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
@@ -23,30 +23,30 @@ List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
if (metadata!=null) {//2
|
||||
List< ? extends IConnection> conns = node.getIncomingConnections();
|
||||
for (IConnection conn : conns) {//3
|
||||
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
|
||||
List< ? extends IConnection> conns = node.getIncomingConnections();
|
||||
for (IConnection conn : conns) {//3
|
||||
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
|
||||
%>
|
||||
if (count_<%=cid%> % <%=arraySize%> == 0) {
|
||||
if(inputStreamMerger_<%=cid%> != null) {
|
||||
<% logUtil.debug("\"Closing input stream.\"");%>
|
||||
inputStreamMerger_<%=cid%>.close();
|
||||
}
|
||||
|
||||
inputStreamMerger_<%=cid%> = bulkloadClient_<%=cid %>.load();
|
||||
if(inputStreamMerger_<%=cid%> != null) {
|
||||
<% logUtil.debug("\"Closing input stream.\"");%>
|
||||
inputStreamMerger_<%=cid%>.close();
|
||||
}
|
||||
|
||||
inputStreamMerger_<%=cid%> = bulkloadClient_<%=cid %>.load();
|
||||
resourceMap.put("mdmBulkStream<%=cid %>", inputStreamMerger_<%=cid%>);
|
||||
}
|
||||
|
||||
if(<%=conn.getName()%>.<%=xmlField %>!=null){
|
||||
<% logUtil.debug("\"Pushing input stream.\"");%>
|
||||
inputStreamMerger_<%=cid%>.push(new java.io.ByteArrayInputStream(<%=conn.getName()%>.<%=xmlField %>.toString().getBytes("UTF-8")));
|
||||
inputStreamMerger_<%=cid%>.push(new java.io.ByteArrayInputStream(<%=conn.getName()%>.<%=xmlField %>.toString().getBytes("UTF-8")));
|
||||
}else{
|
||||
inputStreamMerger_<%=cid%>.push(null);
|
||||
inputStreamMerger_<%=cid%>.push(null);
|
||||
}
|
||||
count_<%=cid%>++;
|
||||
count_<%=cid%>++;
|
||||
<%
|
||||
}//4
|
||||
}//3
|
||||
}//2
|
||||
}//4
|
||||
}//3
|
||||
}//2
|
||||
}//1
|
||||
%>
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
%>
|
||||
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
|
||||
<%String conn = "TMDMService_" + connection;%>
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
if(service_<%=cid %> != null)
|
||||
{
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
}
|
||||
<% logUtil.debug("\"Closing service to MDM server.\"");%>
|
||||
java.util.Iterator it_<%=cid %> = globalMap.keySet().iterator();
|
||||
while (it_<%=cid %>.hasNext()) {
|
||||
String key_<%=cid %> = it_<%=cid %>.next().toString();
|
||||
if (key_<%=cid %>.startsWith("<%=conn %>_")) {
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(key_<%=cid %>);
|
||||
if(service_<%=cid %> != null) {
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<% logUtil.debug("\"Close service successfully with key=\" + key_" + cid);%>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,40 +1,35 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
|
||||
boolean close = ("true").equals(ElementParameterParser.getValue(node,"__CLOSE__"));
|
||||
|
||||
String mdmTransaction = "mdmTransaction_" + connection;
|
||||
|
||||
String conn = "";
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
boolean close = ("true").equals(ElementParameterParser.getValue(node,"__CLOSE__"));
|
||||
String conn = "TMDMService_" + connection;
|
||||
String trans = "mdmTrans_" + connection;
|
||||
%>
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> != null) {
|
||||
<% logUtil.info("\"Committing transaction.\"");%>
|
||||
mdmTransaction_<%=cid %>.commit();
|
||||
<% logUtil.info("\"Transaction committed successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
|
||||
<%conn = "TMDMService_" + connection;%>
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
|
||||
|
||||
if(service_<%=cid%> != null)
|
||||
{
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid%> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get("<%=mdmTransaction%>");
|
||||
if(mdmTransaction_<%=cid%>!=null) {
|
||||
<% logUtil.info("\"Committing transaction.\"");%>
|
||||
mdmTransaction_<%=cid%>.commit();
|
||||
<% logUtil.info("\"Transaction committed successfully.\"");%>
|
||||
}
|
||||
<% if(close){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid%>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<% }%>
|
||||
}
|
||||
<% if(close) { %>
|
||||
String connKey_<%=cid %> = "<%=conn%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(connKey_<%=cid %>);
|
||||
if(service_<%=cid %> != null) {
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<% logUtil.debug("\"Close service successfully with key=\" + connKey_" + cid);%>
|
||||
}
|
||||
<% } %>
|
||||
Binary file not shown.
@@ -1,10 +1,10 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
|
||||
@@ -22,66 +22,13 @@ String version = ElementParameterParser.getValue(node, "__SERVERVERSION__");
|
||||
|
||||
boolean useTransaction = "false".equals(ElementParameterParser.getValue(node, "__AUTO_COMMIT__"));
|
||||
boolean useClientTranId = "true".equals(ElementParameterParser.getValue(node, "__GEN_TRANSACTION_ID__"));
|
||||
|
||||
%>
|
||||
<% logUtil.debug("\"Initializing web service from URL: \"", mdmUrl,"\".\"");%>
|
||||
|
||||
String murl = <%=mdmUrl %>;
|
||||
if(murl.endsWith("?wsdl")) {
|
||||
murl = murl.substring(0, murl.length() - 5);
|
||||
}
|
||||
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
stub_<%=cid %>.getRequestContext().put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, <%=username %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl);
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
<% String passwordFieldName = "__PASSWORD__"; %>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid%>);
|
||||
|
||||
<% logUtil.debug("\"Web service initialized successfully.\"");%>
|
||||
|
||||
<%if(useTransaction) {%>
|
||||
|
||||
String turl_<%=cid%> = com.talend.mdm.transaction.client.MDMTransactionClient.getMDMTransactionURL(<%=mdmUrl %>, true);
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid%> = null;
|
||||
<%
|
||||
if(useClientTranId){
|
||||
%>
|
||||
<% logUtil.debug("\"Generating a transaction id from client side.\"");%>
|
||||
mdmTransaction_<%=cid%> = new com.talend.mdm.transaction.client.MDMTransaction();
|
||||
mdmTransaction_<%=cid%>.setUrl(turl_<%=cid%>);
|
||||
String clientTranId_<%=cid%> = "<%=cid%>"+java.util.UUID.randomUUID()+Thread.currentThread().getId();
|
||||
mdmTransaction_<%=cid%>.setId(clientTranId_<%=cid%>);
|
||||
mdmTransaction_<%=cid%>.setUsername(<%=username %>);
|
||||
mdmTransaction_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<% logUtil.debug("\"Obtaining a transaction from MDM Server.\"");%>
|
||||
mdmTransaction_<%=cid%> = com.talend.mdm.transaction.client.MDMTransactionClient.newTransaction(turl_<%=cid%>,<%=username %>,decryptedPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
List<org.apache.cxf.headers.Header> headers = new java.util.ArrayList<org.apache.cxf.headers.Header>();
|
||||
org.apache.cxf.databinding.DataBinding dataBinding = new org.apache.cxf.jaxb.JAXBDataBinding(String.class);
|
||||
org.apache.cxf.headers.Header dummyHeader = new org.apache.cxf.headers.Header(new javax.xml.namespace.QName("http://www.talend.com/mdm", "transaction-id"), mdmTransaction_<%=cid%>.getId(), dataBinding);
|
||||
headers.add(dummyHeader);
|
||||
context_<%=cid %>.put(org.apache.cxf.headers.Header.HEADER_LIST, headers);
|
||||
|
||||
globalMap.put("mdmTransaction_<%=cid %>", mdmTransaction_<%=cid%>);
|
||||
<%}%>
|
||||
|
||||
service_<%=cid %>.ping(new org.talend.mdm.webservice.WSPing());<%//For TDI-26109%>
|
||||
|
||||
globalMap.put("TMDMService_<%=cid %>", service_<%=cid %>);
|
||||
globalMap.put("mdmUrl_<%=cid %>", <%=mdmUrl %>);
|
||||
globalMap.put("username_<%=cid %>", <%=username %>);
|
||||
globalMap.put("password_<%=cid %>", decryptedPassword_<%=cid %>);
|
||||
globalMap.put("useTransaction_<%=cid %>", <%=useTransaction %>);
|
||||
globalMap.put("useClientTranId_<%=cid %>", <%=useClientTranId %>);
|
||||
@@ -98,12 +98,13 @@
|
||||
<IMPORT NAME="SOAP-codec" MODULE="commons-codec-1.6.jar" MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED="true" />
|
||||
|
||||
<!-- Jars for cxf begin -->
|
||||
<IMPORT
|
||||
<IMPORT
|
||||
NAME="cxf-core-3.1.4"
|
||||
MODULE="cxf-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-core-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-soap-3.1.4"
|
||||
@@ -111,12 +112,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-soap-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-soap-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-xml-3.1.4"
|
||||
MODULE="cxf-rt-bindings-xml-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-xml-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-jaxb-3.1.4"
|
||||
@@ -124,6 +127,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-jaxb-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-jaxb-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="xmlschema-core-2.2.1"
|
||||
@@ -131,6 +135,7 @@
|
||||
MVN="mvn:org.talend.libraries/xmlschema-core-2.2.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlschema-core-2.2.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="woodstox-core-asl-4.4.1"
|
||||
@@ -138,6 +143,7 @@
|
||||
MVN="mvn:org.talend.libraries/woodstox-core-asl-4.4.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/woodstox-core-asl-4.4.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="stax2-api-3.1.4"
|
||||
@@ -145,6 +151,7 @@
|
||||
MVN="mvn:org.talend.libraries/stax2-api-3.1.4/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/stax2-api-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-transports-http-3.1.4"
|
||||
@@ -152,12 +159,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-transports-http-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-xmlbeans-3.1.4"
|
||||
MODULE="cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-xmlbeans-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-jaxws-3.1.4"
|
||||
@@ -165,6 +174,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxws-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxws-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-simple-3.1.4"
|
||||
@@ -172,36 +182,42 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-simple-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-simple-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-security-3.1.4"
|
||||
MODULE="cxf-rt-security-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-security-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-addr-3.1.4"
|
||||
MODULE="cxf-rt-ws-addr-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-addr-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-addr-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-mex-3.1.4"
|
||||
MODULE="cxf-rt-ws-mex-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-mex-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-mex-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-policy-3.1.4"
|
||||
MODULE="cxf-rt-ws-policy-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-policy-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-policy-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-rm-3.1.4"
|
||||
MODULE="cxf-rt-ws-rm-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-rm-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-rm-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-security-3.1.4"
|
||||
@@ -209,6 +225,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-security-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-wsdl-3.1.4"
|
||||
@@ -216,12 +233,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-wsdl-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-wsdl-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-services-sts-core-3.1.4"
|
||||
MODULE="cxf-services-sts-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-services-sts-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-services-sts-core-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-core-2.2.11"
|
||||
@@ -229,6 +248,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-core-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-core-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-impl-2.2.11"
|
||||
@@ -236,6 +256,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-impl-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-impl-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="neethi-3.0.3"
|
||||
@@ -243,42 +264,49 @@
|
||||
MVN="mvn:org.talend.libraries/neethi-3.0.3/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/neethi-3.0.3.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-bindings-2.1.1"
|
||||
MODULE="wss4j-bindings-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-bindings-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-bindings-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-policy-2.1.1"
|
||||
MODULE="wss4j-policy-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-policy-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-policy-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-common-2.1.1"
|
||||
MODULE="wss4j-ws-security-common-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-common-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-common-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-dom-2.1.1"
|
||||
MODULE="wss4j-ws-security-dom-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-dom-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-dom-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-policy-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-policy-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<!-- Jars for cxf end -->
|
||||
</IMPORTS>
|
||||
|
||||
@@ -1,59 +1,105 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String universe = ElementParameterParser.getValue(node, "__UNIVERSE__");
|
||||
String dataModule = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
String trans = "mdmTrans_" + connection;
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
|
||||
String universe = ElementParameterParser.getValue(node, "__UNIVERSE__");
|
||||
String dataModule = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
|
||||
<%String conn = "TMDMService_" + connection;%>
|
||||
int nb_line_<%=cid %> = 0;
|
||||
<%if(!useExistingConn){%>
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \"", mdmUrl,"\".\"");%>
|
||||
|
||||
String murl = <%=mdmUrl %>;
|
||||
if(murl.endsWith("?wsdl")) {
|
||||
murl = murl.substring(0, murl.length() - 5);
|
||||
String murl_<%=cid %> = <%=mdmUrl %>;
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
stub_<%=cid %>.getRequestContext().put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, <%=username %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl);
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
<% String passwordFieldName = "__PASSWORD__"; %>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid%>);
|
||||
|
||||
<% logUtil.debug("\"Web service initialized successfully.\"");%>
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid %>);
|
||||
<%}else{%>
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
String connKey_<%=cid %> = "<%=conn%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(connKey_<%=cid %>);
|
||||
if(service_<%=cid %> == null){
|
||||
String murl_<%=cid %> = (String)globalMap.get("mdmUrl_<%=connection %>");
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
String username_<%=cid%> = (String)globalMap.get("username_<%=connection %>");
|
||||
String password_<%=cid%> = (String)globalMap.get("password_<%=connection %>");
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, username_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, password_<%=cid %>);
|
||||
<% logUtil.debug("\"Got service successfully with key=\" + connKey_" + cid);%>
|
||||
|
||||
if((Boolean)globalMap.get("useTransaction_<%=connection %>")) {
|
||||
String turl_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.getMDMTransactionURL(murl_<%=cid %>, true);
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> == null){
|
||||
if((Boolean)globalMap.get("useClientTranId_<%=connection %>")){
|
||||
String sessionID_<%=cid%> = com.talend.mdm.transaction.client.MDMTransactionClient.getSessionID(turl_<%=cid%>,username_<%=cid%>,password_<%=cid%>);
|
||||
mdmTransaction_<%=cid %> = new com.talend.mdm.transaction.client.MDMTransaction();
|
||||
mdmTransaction_<%=cid %>.setUrl(turl_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setId("<%=cid %>_" + java.util.UUID.randomUUID());
|
||||
mdmTransaction_<%=cid %>.setUsername(username_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setPassword(password_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setSessionId(sessionID_<%=cid%>);
|
||||
}else{
|
||||
<% logUtil.debug("\"Attempt to get a remote transaction from url: \" + murl_" + cid);%>
|
||||
mdmTransaction_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.newTransaction(turl_<%=cid %>,username_<%=cid %>,password_<%=cid %>);
|
||||
}
|
||||
java.util.List<org.apache.cxf.headers.Header> soapHeaders_<%=cid %> = new java.util.ArrayList<org.apache.cxf.headers.Header>();
|
||||
javax.xml.namespace.QName qName_<%=cid %> = new javax.xml.namespace.QName("http://www.talend.com/mdm", "transaction-id");
|
||||
org.apache.cxf.databinding.DataBinding dataBinding_<%=cid %> = new org.apache.cxf.jaxb.JAXBDataBinding(String.class);
|
||||
soapHeaders_<%=cid %>.add(new org.apache.cxf.headers.Header(qName_<%=cid %>, mdmTransaction_<%=cid %>.getId(), dataBinding_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.headers.Header.HEADER_LIST, soapHeaders_<%=cid %>);
|
||||
|
||||
java.util.Map<String, java.util.List<String>> httpHeaders_<%=cid %> = new java.util.HashMap<String, java.util.List<String>>();
|
||||
String cookie_<%=cid %> = com.talend.mdm.transaction.client.MDMTransaction.getStickySession() + "=" + mdmTransaction_<%=cid%>.getSessionId();
|
||||
httpHeaders_<%=cid %>.put("Cookie", java.util.Arrays.asList(cookie_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, httpHeaders_<%=cid %>);
|
||||
|
||||
globalMap.put(transKey_<%=cid %>, mdmTransaction_<%=cid %>);
|
||||
<% logUtil.debug("\"Got transaction successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
}
|
||||
service_<%=cid %>.ping(new org.talend.mdm.webservice.WSPing());<%//For TDI-26109%>
|
||||
globalMap.put(connKey_<%=cid %>, service_<%=cid %>);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
org.talend.mdm.webservice.WSDataClusterPK dataCluster_<%=cid %> = new org.talend.mdm.webservice.WSDataClusterPK(<%=dataCluster %> + "<%=isStaging?"#STAGING":""%>");
|
||||
@@ -1,23 +1,22 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
%>
|
||||
<%if(!useExistingConn){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<%}%>
|
||||
|
||||
<% logUtil.info("\"Total records deleted: \"+ nb_line_"+cid);%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
|
||||
<%if(!useExistingConn){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<%}%>
|
||||
|
||||
<% logUtil.info("\"Total records deleted: \"+ nb_line_"+cid);%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
@@ -194,6 +194,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-core-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-soap-3.1.4"
|
||||
@@ -201,12 +202,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-soap-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-soap-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-xml-3.1.4"
|
||||
MODULE="cxf-rt-bindings-xml-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-xml-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-jaxb-3.1.4"
|
||||
@@ -214,6 +217,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-jaxb-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-jaxb-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="xmlschema-core-2.2.1"
|
||||
@@ -221,6 +225,7 @@
|
||||
MVN="mvn:org.talend.libraries/xmlschema-core-2.2.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlschema-core-2.2.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="woodstox-core-asl-4.4.1"
|
||||
@@ -228,6 +233,7 @@
|
||||
MVN="mvn:org.talend.libraries/woodstox-core-asl-4.4.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/woodstox-core-asl-4.4.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="stax2-api-3.1.4"
|
||||
@@ -235,6 +241,7 @@
|
||||
MVN="mvn:org.talend.libraries/stax2-api-3.1.4/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/stax2-api-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-transports-http-3.1.4"
|
||||
@@ -242,12 +249,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-transports-http-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-xmlbeans-3.1.4"
|
||||
MODULE="cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-xmlbeans-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-jaxws-3.1.4"
|
||||
@@ -255,6 +264,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxws-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxws-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-simple-3.1.4"
|
||||
@@ -262,36 +272,42 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-simple-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-simple-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-security-3.1.4"
|
||||
MODULE="cxf-rt-security-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-security-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-addr-3.1.4"
|
||||
MODULE="cxf-rt-ws-addr-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-addr-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-addr-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-mex-3.1.4"
|
||||
MODULE="cxf-rt-ws-mex-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-mex-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-mex-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-policy-3.1.4"
|
||||
MODULE="cxf-rt-ws-policy-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-policy-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-policy-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-rm-3.1.4"
|
||||
MODULE="cxf-rt-ws-rm-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-rm-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-rm-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-security-3.1.4"
|
||||
@@ -299,6 +315,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-security-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-wsdl-3.1.4"
|
||||
@@ -306,12 +323,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-wsdl-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-wsdl-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-services-sts-core-3.1.4"
|
||||
MODULE="cxf-services-sts-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-services-sts-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-services-sts-core-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-core-2.2.11"
|
||||
@@ -319,6 +338,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-core-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-core-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-impl-2.2.11"
|
||||
@@ -326,6 +346,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-impl-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-impl-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="neethi-3.0.3"
|
||||
@@ -333,42 +354,49 @@
|
||||
MVN="mvn:org.talend.libraries/neethi-3.0.3/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/neethi-3.0.3.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-bindings-2.1.1"
|
||||
MODULE="wss4j-bindings-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-bindings-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-bindings-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-policy-2.1.1"
|
||||
MODULE="wss4j-policy-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-policy-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-policy-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-common-2.1.1"
|
||||
MODULE="wss4j-ws-security-common-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-common-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-common-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-dom-2.1.1"
|
||||
MODULE="wss4j-ws-security-dom-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-dom-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-dom-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-policy-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-policy-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<!-- Jars for cxf end -->
|
||||
</IMPORTS>
|
||||
|
||||
@@ -1,97 +1,96 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
boolean isDropItem = ("true").equals(ElementParameterParser.getValue(node,"__USE_DROP_ITEM__"));
|
||||
String partPath = ElementParameterParser.getValue(node,"__PART_PATH__");
|
||||
|
||||
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
|
||||
|
||||
String dataModel = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
List<Map<String,String>> keyValues = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__KEYS__");
|
||||
|
||||
boolean useMultConditions = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
List<Map<String, String>> operations = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__OPERATIONS__");
|
||||
String spellThrehold = ElementParameterParser.getValue(node, "__SPELLTHREHOLD__");
|
||||
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
String sourceName = ElementParameterParser.getValue(node,"__SOURCE__");
|
||||
String needCheck = ElementParameterParser.getValue(node,"__ISINVOKE__");
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
if(spellThrehold==null || ("").equals(spellThrehold)){
|
||||
spellThrehold = "0";
|
||||
}
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
if (metadata!=null) {//2
|
||||
|
||||
List< ? extends IConnection> conns = node.getIncomingConnections();
|
||||
for (IConnection conn : conns) {//3
|
||||
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
|
||||
if(!useMultConditions){//5
|
||||
boolean isDropItem = ("true").equals(ElementParameterParser.getValue(node,"__USE_DROP_ITEM__"));
|
||||
String partPath = ElementParameterParser.getValue(node,"__PART_PATH__");
|
||||
|
||||
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
|
||||
|
||||
String dataModel = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
List<Map<String,String>> keyValues = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__KEYS__");
|
||||
|
||||
boolean useMultConditions = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
List<Map<String, String>> operations = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__OPERATIONS__");
|
||||
String spellThrehold = ElementParameterParser.getValue(node, "__SPELLTHREHOLD__");
|
||||
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
String sourceName = ElementParameterParser.getValue(node,"__SOURCE__");
|
||||
String needCheck = ElementParameterParser.getValue(node,"__ISINVOKE__");
|
||||
|
||||
if(spellThrehold==null || ("").equals(spellThrehold)){
|
||||
spellThrehold = "0";
|
||||
}
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
if (metadata!=null) {//2
|
||||
List< ? extends IConnection> conns = node.getIncomingConnections();
|
||||
for (IConnection conn : conns) {//3
|
||||
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
|
||||
if(!useMultConditions){//5
|
||||
%>
|
||||
List<String> wsIds_<%=cid %> = new java.util.ArrayList<String>();
|
||||
{
|
||||
<%
|
||||
for(int i=0;i<keyValues.size();i++){
|
||||
String columnName=keyValues.get(i).get("KEY");
|
||||
for(int i=0;i<keyValues.size();i++){
|
||||
String columnName=keyValues.get(i).get("KEY");
|
||||
%>
|
||||
wsIds_<%=cid %>.add(<%=conn.getName()%>.<%=columnName %>);
|
||||
<%
|
||||
}
|
||||
%>};
|
||||
org.talend.mdm.webservice.WSItemPK wsPK_<%=cid %> = new org.talend.mdm.webservice.WSItemPK(<%=dataModel %>, wsIds_<%=cid %>, dataCluster_<%=cid %>);
|
||||
///////////////////////
|
||||
///////////////////////
|
||||
|
||||
try{
|
||||
<%
|
||||
if(isDropItem){
|
||||
%>
|
||||
org.talend.mdm.webservice.WSDropItem item_<%=cid %> = new org.talend.mdm.webservice.WSDropItem();
|
||||
item_<%=cid %>.setPartPath(<%=partPath %>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
org.talend.mdm.webservice.WSDeleteItem item_<%=cid %> = new org.talend.mdm.webservice.WSDeleteItem();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
item_<%=cid %>.setWsItemPK(wsPK_<%=cid %>);
|
||||
item_<%=cid %>.setOverride(false);
|
||||
<%
|
||||
if (!isStaging && withReport) {
|
||||
%>
|
||||
item_<%=cid %>.setWithReport(true);
|
||||
item_<%=cid %>.setSource(<%=sourceName%>);
|
||||
item_<%=cid %>.setInvokeBeforeDeleting(<%=needCheck%>);
|
||||
<%
|
||||
}
|
||||
if(isDropItem){
|
||||
%>
|
||||
<% logUtil.debug("\"Dropping item: \"", logUtil.var("item"),"\".\"");%>
|
||||
service_<%=cid %> .dropItem(item_<%=cid %>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<% logUtil.debug("\"Deleting item: \"", logUtil.var("item"),"\".\"");%>
|
||||
service_<%=cid %> .deleteItem(item_<%=cid %>);
|
||||
<%
|
||||
if(isDropItem){
|
||||
%>
|
||||
org.talend.mdm.webservice.WSDropItem item_<%=cid %> = new org.talend.mdm.webservice.WSDropItem();
|
||||
item_<%=cid %>.setPartPath(<%=partPath %>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
org.talend.mdm.webservice.WSDeleteItem item_<%=cid %> = new org.talend.mdm.webservice.WSDeleteItem();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
item_<%=cid %>.setWsItemPK(wsPK_<%=cid %>);
|
||||
item_<%=cid %>.setOverride(false);
|
||||
<%
|
||||
if (!isStaging && withReport) {
|
||||
%>
|
||||
item_<%=cid %>.setWithReport(true);
|
||||
item_<%=cid %>.setSource(<%=sourceName%>);
|
||||
item_<%=cid %>.setInvokeBeforeDeleting(<%=needCheck%>);
|
||||
<%
|
||||
}
|
||||
if(isDropItem){
|
||||
%>
|
||||
<% logUtil.debug("\"Dropping item: \"", logUtil.var("item"),"\".\"");%>
|
||||
service_<%=cid %> .dropItem(item_<%=cid %>);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<% logUtil.debug("\"Deleting item: \"", logUtil.var("item"),"\".\"");%>
|
||||
service_<%=cid %> .deleteItem(item_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
@@ -99,85 +98,85 @@ try{
|
||||
<%
|
||||
if(dieOnError){
|
||||
%>
|
||||
<% logUtil.error("\"Die on error:\"+e.getMessage()");%>
|
||||
throw(e);
|
||||
<% logUtil.error("\"Die on error:\"+e.getMessage()");%>
|
||||
throw(e);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
System.err.println(e.getMessage());
|
||||
System.err.println(e.getMessage());
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
nb_line_<%=cid %>++;
|
||||
|
||||
///////////////////////
|
||||
///////////////////////
|
||||
<%
|
||||
}
|
||||
}//4
|
||||
}//3
|
||||
}
|
||||
}//4
|
||||
}//3
|
||||
}//2
|
||||
}//1
|
||||
%>
|
||||
<%
|
||||
if(useMultConditions){
|
||||
if(useMultConditions){
|
||||
%>
|
||||
<% logUtil.debug("\"Use multi condition to delete records.\"");%>
|
||||
org.talend.mdm.webservice.WSWhereCondition wc_<%=cid %> = null;
|
||||
java.util.List<org.talend.mdm.webservice.WSWhereItem> conditions_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSWhereItem>();
|
||||
<% logUtil.debug("\"Use multi condition to delete records.\"");%>
|
||||
org.talend.mdm.webservice.WSWhereCondition wc_<%=cid %> = null;
|
||||
java.util.List<org.talend.mdm.webservice.WSWhereItem> conditions_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSWhereItem>();
|
||||
<%
|
||||
boolean isOnlyOrPredicate=true;
|
||||
for(int i=0; i < operations.size(); i++){
|
||||
Map<String, String> map= operations.get(i);
|
||||
String xpath=map.get("XPATH");
|
||||
String operator=map.get("FUNCTION");
|
||||
String value = map.get("VALUE");
|
||||
String predicate = map.get("PREDICATE");
|
||||
if((i < operations.size()-1) && (!"OR".equals(predicate))){
|
||||
isOnlyOrPredicate = false;
|
||||
}
|
||||
boolean isOnlyOrPredicate=true;
|
||||
for(int i=0; i < operations.size(); i++){
|
||||
Map<String, String> map= operations.get(i);
|
||||
String xpath=map.get("XPATH");
|
||||
String operator=map.get("FUNCTION");
|
||||
String value = map.get("VALUE");
|
||||
String predicate = map.get("PREDICATE");
|
||||
if((i < operations.size()-1) && (!"OR".equals(predicate))){
|
||||
isOnlyOrPredicate = false;
|
||||
}
|
||||
%>
|
||||
wc_<%=cid %> =new org.talend.mdm.webservice.WSWhereCondition(<%=xpath %>,org.talend.mdm.webservice.WSWhereOperator.<%=operator %>, <%="EMPTY_NULL".equals(operator)? null:value %>, false, org.talend.mdm.webservice.WSStringPredicate.<%=predicate %>);
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=i %>_<%=cid %>=new org.talend.mdm.webservice.WSWhereItem(null,wc_<%=cid %>,null);
|
||||
conditions_<%=cid %>.add(wsItem_<%=i %>_<%=cid %>);
|
||||
wc_<%=cid %> =new org.talend.mdm.webservice.WSWhereCondition(<%=xpath %>,org.talend.mdm.webservice.WSWhereOperator.<%=operator %>, <%="EMPTY_NULL".equals(operator)? null:value %>, false, org.talend.mdm.webservice.WSStringPredicate.<%=predicate %>);
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=i %>_<%=cid %>=new org.talend.mdm.webservice.WSWhereItem(null,wc_<%=cid %>,null);
|
||||
conditions_<%=cid %>.add(wsItem_<%=i %>_<%=cid %>);
|
||||
<%
|
||||
}//for
|
||||
}//for
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=cid %> = null;
|
||||
if(conditions_<%=cid %>.size() > 0){
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=cid %> = null;
|
||||
if(conditions_<%=cid %>.size() > 0){
|
||||
<%
|
||||
if(!isOnlyOrPredicate){
|
||||
if(!isOnlyOrPredicate){
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereAnd whereAnd_<%=cid %> = new org.talend.mdm.webservice.WSWhereAnd(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(whereAnd_<%=cid %>,null,null);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(whereAnd_<%=cid %>,null,null);
|
||||
<%
|
||||
}else{
|
||||
}else{
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereOr whereOr_<%=cid %> = new org.talend.mdm.webservice.WSWhereOr(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(null,null,whereOr_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(null,null,whereOr_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
try{
|
||||
<% logUtil.debug("\"Deleting records.\"");%>
|
||||
org.talend.mdm.webservice.WSDeleteItems items_<%=cid %> = new org.talend.mdm.webservice.WSDeleteItems(<%=dataModel %>, false, <%=spellThrehold%>, dataCluster_<%=cid %>, wsItem_<%=cid %>);
|
||||
service_<%=cid %>.deleteItems(items_<%=cid %>);
|
||||
}catch(java.lang.Exception e){
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
}
|
||||
|
||||
try{
|
||||
<% logUtil.debug("\"Deleting records.\"");%>
|
||||
org.talend.mdm.webservice.WSDeleteItems items_<%=cid %> = new org.talend.mdm.webservice.WSDeleteItems(<%=dataModel %>, false, <%=spellThrehold%>, dataCluster_<%=cid %>, wsItem_<%=cid %>);
|
||||
service_<%=cid %>.deleteItems(items_<%=cid %>);
|
||||
}catch(java.lang.Exception e){
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%
|
||||
if(dieOnError){
|
||||
%>
|
||||
throw(e);
|
||||
if(dieOnError){
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
System.err.println(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
}
|
||||
System.err.println(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
@@ -1,109 +1,173 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
String trans = "mdmTrans_" + connection;
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
|
||||
String dataModel = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
boolean usePartialDelete = ("true").equals(ElementParameterParser.getValue(node,"__PARTIAL_DELETE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
|
||||
%>
|
||||
String dataModel = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean isProvisioning = "\"PROVISIONING\"".equalsIgnoreCase(dataCluster);
|
||||
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
boolean usePartialDelete = ("true").equals(ElementParameterParser.getValue(node,"__PARTIAL_DELETE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
int nb_line_<%=cid %> = 0;
|
||||
int nb_line_rejected_<%=cid%> = 0;
|
||||
<%if(!usePartialUpdate){%>
|
||||
int nb_line_rejected_<%=cid %> = 0;
|
||||
<%if(!usePartialUpdate){%>
|
||||
|
||||
<%if(addTaskID){%>
|
||||
class Util_<%=cid%>{
|
||||
public org.talend.mdm.webservice.WSUpdateMetadataItem makeUpdateMeteItm(String taskID,org.talend.mdm.webservice.WSItemPK wspk){
|
||||
org.talend.mdm.webservice.WSUpdateMetadataItem wsUpdateMetadataItem = new org.talend.mdm.webservice.WSUpdateMetadataItem();
|
||||
wsUpdateMetadataItem.setTaskId(taskID);
|
||||
wsUpdateMetadataItem.setWsItemPK(wspk);
|
||||
return wsUpdateMetadataItem;
|
||||
}
|
||||
public org.talend.mdm.webservice.WSUpdateMetadataItem[] makeUpdateMeteItms(java.util.List<String> taskIDs,org.talend.mdm.webservice.WSItemPK[] wspks){
|
||||
java.util.List<org.talend.mdm.webservice.WSUpdateMetadataItem> wsUpdateMetadataItems = new java.util.ArrayList<org.talend.mdm.webservice.WSUpdateMetadataItem>();
|
||||
int i = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk : wspks){
|
||||
wsUpdateMetadataItems.add(makeUpdateMeteItm(taskIDs.get(i),wspk));
|
||||
i++;
|
||||
}
|
||||
return wsUpdateMetadataItems.toArray(new org.talend.mdm.webservice.WSUpdateMetadataItem[wsUpdateMetadataItems.size()]);
|
||||
}
|
||||
}
|
||||
Util_<%=cid%> util_<%=cid%> = new Util_<%=cid%>();
|
||||
<%}%>
|
||||
<%if(isMassInsert){
|
||||
if(!isStaging && withReport){%>
|
||||
<% logUtil.debug("\"Put item with report to MDM server.\"");%>
|
||||
java.util.List <org.talend.mdm.webservice.WSPutItemWithReport> miList_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSPutItemWithReport>();
|
||||
<% }else{%>
|
||||
<% logUtil.debug("\"Put item to staging data.\"");%>
|
||||
java.util.List <org.talend.mdm.webservice.WSPutItem> miList_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSPutItem>();
|
||||
<%
|
||||
}
|
||||
if(addTaskID){
|
||||
%>
|
||||
java.util.List<String> taskIDs_<%=cid%> = new java.util.ArrayList<String>();
|
||||
<%
|
||||
}
|
||||
}
|
||||
<%if(addTaskID){%>
|
||||
class Util_<%=cid %>{
|
||||
public org.talend.mdm.webservice.WSUpdateMetadataItem makeUpdateMeteItm(String taskID,org.talend.mdm.webservice.WSItemPK wspk){
|
||||
org.talend.mdm.webservice.WSUpdateMetadataItem wsUpdateMetadataItem = new org.talend.mdm.webservice.WSUpdateMetadataItem();
|
||||
wsUpdateMetadataItem.setTaskId(taskID);
|
||||
wsUpdateMetadataItem.setWsItemPK(wspk);
|
||||
return wsUpdateMetadataItem;
|
||||
}
|
||||
public org.talend.mdm.webservice.WSUpdateMetadataItem[] makeUpdateMeteItms(java.util.List<String> taskIDs,org.talend.mdm.webservice.WSItemPK[] wspks){
|
||||
java.util.List<org.talend.mdm.webservice.WSUpdateMetadataItem> wsUpdateMetadataItems = new java.util.ArrayList<org.talend.mdm.webservice.WSUpdateMetadataItem>();
|
||||
int i = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk : wspks){
|
||||
wsUpdateMetadataItems.add(makeUpdateMeteItm(taskIDs.get(i),wspk));
|
||||
i++;
|
||||
}
|
||||
return wsUpdateMetadataItems.toArray(new org.talend.mdm.webservice.WSUpdateMetadataItem[wsUpdateMetadataItems.size()]);
|
||||
}
|
||||
}
|
||||
Util_<%=cid %> util_<%=cid %> = new Util_<%=cid %>();
|
||||
<%}%>
|
||||
<%if(isMassInsert){
|
||||
if(!isStaging && withReport){%>
|
||||
<% logUtil.debug("\"Put item with report to MDM server.\"");%>
|
||||
java.util.List <org.talend.mdm.webservice.WSPutItemWithReport> miList_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSPutItemWithReport>();
|
||||
<% }else{%>
|
||||
<% logUtil.debug("\"Put item to staging data.\"");%>
|
||||
java.util.List <org.talend.mdm.webservice.WSPutItem> miList_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSPutItem>();
|
||||
<%
|
||||
}
|
||||
if(addTaskID){
|
||||
%>
|
||||
java.util.List<String> taskIDs_<%=cid %> = new java.util.ArrayList<String>();
|
||||
<%
|
||||
}
|
||||
}
|
||||
}%>
|
||||
|
||||
<%if(!useExistingConn){%>
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \"", mdmUrl,"\".\"");%>
|
||||
|
||||
String murl = <%=mdmUrl %>;
|
||||
if(murl.endsWith("?wsdl")) {
|
||||
murl = murl.substring(0, murl.length() - 5);
|
||||
String murl_<%=cid %> = <%=mdmUrl %>;
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
stub_<%=cid %>.getRequestContext().put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, <%=username %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl);
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
<% String passwordFieldName = "__PASSWORD__"; %>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid %>);
|
||||
<%}else if(isProvisioning){%>
|
||||
String murl_<%=cid %> = (String)globalMap.get("mdmUrl_<%=connection %>");
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
String username_<%=cid%> = (String)globalMap.get("username_<%=connection %>");
|
||||
String password_<%=cid%> = (String)globalMap.get("password_<%=connection %>");
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid%>);
|
||||
|
||||
<% logUtil.debug("\"Web service initialized successfully.\"");%>
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, username_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, password_<%=cid %>);
|
||||
<%}else{%>
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
String connKey_<%=cid %> = "<%=conn%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(connKey_<%=cid %>);
|
||||
if(service_<%=cid %> == null){
|
||||
String murl_<%=cid %> = (String)globalMap.get("mdmUrl_<%=connection %>");
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
String username_<%=cid%> = (String)globalMap.get("username_<%=connection %>");
|
||||
String password_<%=cid%> = (String)globalMap.get("password_<%=connection %>");
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, username_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, password_<%=cid %>);
|
||||
<% logUtil.debug("\"Got service successfully with key=\" + connKey_" + cid);%>
|
||||
|
||||
if((Boolean)globalMap.get("useTransaction_<%=connection %>")) {
|
||||
String turl_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.getMDMTransactionURL(murl_<%=cid %>, true);
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> == null){
|
||||
if((Boolean)globalMap.get("useClientTranId_<%=connection %>")){
|
||||
String sessionID_<%=cid%> = com.talend.mdm.transaction.client.MDMTransactionClient.getSessionID(turl_<%=cid%>,username_<%=cid%>,password_<%=cid%>);
|
||||
mdmTransaction_<%=cid %> = new com.talend.mdm.transaction.client.MDMTransaction();
|
||||
mdmTransaction_<%=cid %>.setUrl(turl_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setId("<%=cid %>_" + java.util.UUID.randomUUID());
|
||||
mdmTransaction_<%=cid %>.setUsername(username_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setPassword(password_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setSessionId(sessionID_<%=cid%>);
|
||||
}else{
|
||||
<% logUtil.debug("\"Attempt to get a remote transaction from url: \" + murl_" + cid);%>
|
||||
mdmTransaction_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.newTransaction(turl_<%=cid %>,username_<%=cid %>,password_<%=cid %>);
|
||||
}
|
||||
java.util.List<org.apache.cxf.headers.Header> soapHeaders_<%=cid %> = new java.util.ArrayList<org.apache.cxf.headers.Header>();
|
||||
javax.xml.namespace.QName qName_<%=cid %> = new javax.xml.namespace.QName("http://www.talend.com/mdm", "transaction-id");
|
||||
org.apache.cxf.databinding.DataBinding dataBinding_<%=cid %> = new org.apache.cxf.jaxb.JAXBDataBinding(String.class);
|
||||
soapHeaders_<%=cid %>.add(new org.apache.cxf.headers.Header(qName_<%=cid %>, mdmTransaction_<%=cid %>.getId(), dataBinding_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.headers.Header.HEADER_LIST, soapHeaders_<%=cid %>);
|
||||
|
||||
java.util.Map<String, java.util.List<String>> httpHeaders_<%=cid %> = new java.util.HashMap<String, java.util.List<String>>();
|
||||
String cookie_<%=cid %> = com.talend.mdm.transaction.client.MDMTransaction.getStickySession() + "=" + mdmTransaction_<%=cid%>.getSessionId();
|
||||
httpHeaders_<%=cid %>.put("Cookie", java.util.Arrays.asList(cookie_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, httpHeaders_<%=cid %>);
|
||||
|
||||
globalMap.put(transKey_<%=cid %>, mdmTransaction_<%=cid %>);
|
||||
<% logUtil.debug("\"Got transaction successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
}
|
||||
service_<%=cid %>.ping(new org.talend.mdm.webservice.WSPing());<%//For TDI-26109%>
|
||||
globalMap.put(connKey_<%=cid %>, service_<%=cid %>);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
org.talend.mdm.webservice.WSDataClusterPK dataCluster_<%=cid %> = new org.talend.mdm.webservice.WSDataClusterPK(<%=dataCluster %> + "<%=isStaging?"#STAGING":""%>");
|
||||
|
||||
@@ -1,108 +1,106 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
String taskID = ElementParameterParser.getValue(node,"__TASKID__");
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
String taskID = ElementParameterParser.getValue(node,"__TASKID__");
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
%>
|
||||
|
||||
<%
|
||||
if(!usePartialUpdate){%>
|
||||
if(!usePartialUpdate){%>
|
||||
<%
|
||||
if(isMassInsert){
|
||||
if(!isStaging && withReport){
|
||||
%>
|
||||
if(isMassInsert){
|
||||
if(!isStaging && withReport){
|
||||
%>
|
||||
<% logUtil.debug("\"Put item with report to MDM server.\"");%>
|
||||
|
||||
if(miList_<%=cid %>.size() > 0){
|
||||
org.talend.mdm.webservice.WSPutItemWithReportArray putItemWithReportArray = new org.talend.mdm.webservice.WSPutItemWithReportArray(miList_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Put item with report array.\"");%>
|
||||
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemWithReportArray(putItemWithReportArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put item size:\"+wspks_"+cid+".size()");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
miList_<%=cid %> = null;
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
<% logUtil.debug("\"Add task ids successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%
|
||||
}else{%>
|
||||
if(miList_<%=cid %>.size() > 0){
|
||||
<% logUtil.debug("\"Try to put item array.\"");%>
|
||||
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemArray(miList_<%=cid %>).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put item size:\"+wspks_"+cid+".size()");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
miList_<%=cid %> = null;
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
|
||||
if(miList_<%=cid %>.size() > 0){
|
||||
org.talend.mdm.webservice.WSPutItemWithReportArray putItemWithReportArray = new org.talend.mdm.webservice.WSPutItemWithReportArray(miList_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Put item with report array.\"");%>
|
||||
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemWithReportArray(putItemWithReportArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put item size:\"+wspks_"+cid+".size()");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
miList_<%=cid %> = null;
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
<% logUtil.debug("\"Add task ids successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
<% logUtil.debug("\"Add task ids successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}else{%>
|
||||
if(miList_<%=cid %>.size() > 0){
|
||||
org.talend.mdm.webservice.WSPutItemArray putItemArray = new org.talend.mdm.webservice.WSPutItemArray(miList_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Try to put item array.\"");%>
|
||||
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemArray(putItemArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put item size:\"+wspks_"+cid+".size()");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
miList_<%=cid %> = null;
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
<% logUtil.debug("\"Add task ids successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}%>
|
||||
<%if(!useExistingConn){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<%}%>
|
||||
|
||||
<% logUtil.info("\"Total records saved: \"+nb_line_"+cid+"+\".\"");%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
globalMap.put("<%=cid %>_NB_LINE_REJECTED",nb_line_rejected_<%=cid%>);
|
||||
|
||||
<%if(!useExistingConn){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
<%}%>
|
||||
|
||||
<% logUtil.info("\"Total records saved: \"+nb_line_"+cid);%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
globalMap.put("<%=cid %>_NB_LINE_REJECTED",nb_line_rejected_<%=cid%>);
|
||||
@@ -406,12 +406,13 @@
|
||||
<IMPORT NAME="SOAP-discovery" MODULE="commons-discovery-0.2.jar" MVN="mvn:org.talend.libraries/commons-discovery-0.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-discovery-0.2.jar" REQUIRED_IF="IS_VIRTUAL_COMPONENT == 'false'" />
|
||||
<IMPORT NAME="SOAP-logging" MODULE="commons-logging-1.0.4.jar" MVN="mvn:org.talend.libraries/commons-logging-1.0.4/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar" REQUIRED_IF="IS_VIRTUAL_COMPONENT == 'false'" />
|
||||
<!-- Jars for cxf begin -->
|
||||
<IMPORT
|
||||
<IMPORT
|
||||
NAME="cxf-core-3.1.4"
|
||||
MODULE="cxf-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-core-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-soap-3.1.4"
|
||||
@@ -419,12 +420,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-soap-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-soap-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-xml-3.1.4"
|
||||
MODULE="cxf-rt-bindings-xml-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-xml-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-jaxb-3.1.4"
|
||||
@@ -432,6 +435,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-jaxb-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-jaxb-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="xmlschema-core-2.2.1"
|
||||
@@ -439,6 +443,7 @@
|
||||
MVN="mvn:org.talend.libraries/xmlschema-core-2.2.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlschema-core-2.2.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="woodstox-core-asl-4.4.1"
|
||||
@@ -446,6 +451,7 @@
|
||||
MVN="mvn:org.talend.libraries/woodstox-core-asl-4.4.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/woodstox-core-asl-4.4.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="stax2-api-3.1.4"
|
||||
@@ -453,6 +459,7 @@
|
||||
MVN="mvn:org.talend.libraries/stax2-api-3.1.4/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/stax2-api-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-transports-http-3.1.4"
|
||||
@@ -460,12 +467,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-transports-http-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-xmlbeans-3.1.4"
|
||||
MODULE="cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-xmlbeans-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-jaxws-3.1.4"
|
||||
@@ -473,6 +482,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxws-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxws-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-simple-3.1.4"
|
||||
@@ -480,36 +490,42 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-simple-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-simple-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-security-3.1.4"
|
||||
MODULE="cxf-rt-security-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-security-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-addr-3.1.4"
|
||||
MODULE="cxf-rt-ws-addr-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-addr-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-addr-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-mex-3.1.4"
|
||||
MODULE="cxf-rt-ws-mex-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-mex-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-mex-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-policy-3.1.4"
|
||||
MODULE="cxf-rt-ws-policy-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-policy-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-policy-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-rm-3.1.4"
|
||||
MODULE="cxf-rt-ws-rm-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-rm-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-rm-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-security-3.1.4"
|
||||
@@ -517,6 +533,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-security-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-wsdl-3.1.4"
|
||||
@@ -524,12 +541,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-wsdl-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-wsdl-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-services-sts-core-3.1.4"
|
||||
MODULE="cxf-services-sts-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-services-sts-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-services-sts-core-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-core-2.2.11"
|
||||
@@ -537,6 +556,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-core-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-core-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-impl-2.2.11"
|
||||
@@ -544,6 +564,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-impl-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-impl-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="neethi-3.0.3"
|
||||
@@ -551,42 +572,49 @@
|
||||
MVN="mvn:org.talend.libraries/neethi-3.0.3/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/neethi-3.0.3.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-bindings-2.1.1"
|
||||
MODULE="wss4j-bindings-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-bindings-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-bindings-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-policy-2.1.1"
|
||||
MODULE="wss4j-policy-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-policy-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-policy-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-common-2.1.1"
|
||||
MODULE="wss4j-ws-security-common-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-common-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-common-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-dom-2.1.1"
|
||||
MODULE="wss4j-ws-security-dom-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-dom-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-dom-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-policy-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-policy-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<!-- Jars for cxf end -->
|
||||
</IMPORTS>
|
||||
|
||||
@@ -1,309 +1,309 @@
|
||||
<%@ 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.process.EConnectionType
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
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.process.EConnectionType
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
String needCheck = ElementParameterParser.getValue(node,"__ISINVOKE__");
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
String numMassInsert = ElementParameterParser.getValue(node,"__COMMIT_LEVEL__");
|
||||
String sourceName = ElementParameterParser.getValue(node,"__SOURCE__");
|
||||
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
|
||||
String isUpdate = ElementParameterParser.getValue(node,"__ISUPDATE__");
|
||||
List<Map<String,String>> keysReturn = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__RETURN_IDS__");
|
||||
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
boolean isCustom = "true".equals(ElementParameterParser.getValue(node, "__CUSTOM__"));
|
||||
String taskID = ElementParameterParser.getValue(node,"__TASKID__");
|
||||
String prevColumn = ElementParameterParser.getValue(node, "__PREV_COLUMN_TASK_ID__");
|
||||
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
boolean usePartialDelete = ("true").equals(ElementParameterParser.getValue(node,"__PARTIAL_DELETE__"));
|
||||
String pivot = ElementParameterParser.getValue(node,"__PIVOT__");
|
||||
boolean overwrite = ("true").equals(ElementParameterParser.getValue(node,"__OVERWRITE__"));
|
||||
String key = ElementParameterParser.getValue(node,"__KEY__");
|
||||
String position = ElementParameterParser.getValue(node,"__POSITION__");
|
||||
String dataModel = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
|
||||
String doc = ElementParameterParser.getValue(node, "__DOCUMENT__");
|
||||
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
|
||||
if (destination != null && !"".equals(destination)) {
|
||||
cid = destination;
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
boolean withReport = ("true").equals(ElementParameterParser.getValue(node,"__WITHREPORT__"));
|
||||
String needCheck = ElementParameterParser.getValue(node,"__ISINVOKE__");
|
||||
boolean isMassInsert =("true").equals(ElementParameterParser.getValue(node,"__EXTENDINSERT__"));
|
||||
String numMassInsert = ElementParameterParser.getValue(node,"__COMMIT_LEVEL__");
|
||||
String sourceName = ElementParameterParser.getValue(node,"__SOURCE__");
|
||||
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node,"__DIE_ON_ERROR__"));
|
||||
String isUpdate = ElementParameterParser.getValue(node,"__ISUPDATE__");
|
||||
List<Map<String,String>> keysReturn = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__RETURN_IDS__");
|
||||
|
||||
boolean addTaskID = ("true").equals(ElementParameterParser.getValue(node,"__ADD_TASKID__"));
|
||||
boolean isCustom = "true".equals(ElementParameterParser.getValue(node, "__CUSTOM__"));
|
||||
String taskID = ElementParameterParser.getValue(node,"__TASKID__");
|
||||
String prevColumn = ElementParameterParser.getValue(node, "__PREV_COLUMN_TASK_ID__");
|
||||
|
||||
boolean usePartialUpdate = ("true").equals(ElementParameterParser.getValue(node,"__USE_PARTIAL_UPDATE__"));
|
||||
boolean usePartialDelete = ("true").equals(ElementParameterParser.getValue(node,"__PARTIAL_DELETE__"));
|
||||
String pivot = ElementParameterParser.getValue(node,"__PIVOT__");
|
||||
boolean overwrite = ("true").equals(ElementParameterParser.getValue(node,"__OVERWRITE__"));
|
||||
String key = ElementParameterParser.getValue(node,"__KEY__");
|
||||
String position = ElementParameterParser.getValue(node,"__POSITION__");
|
||||
String dataModel = ElementParameterParser.getValue(node, "__DATAMODEL__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
|
||||
String doc = ElementParameterParser.getValue(node, "__DOCUMENT__");
|
||||
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
|
||||
if (destination != null && !"".equals(destination)) {
|
||||
cid = destination;
|
||||
}
|
||||
|
||||
if (metadatas != null && metadatas.size()>0) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
if (metadata != null) {
|
||||
|
||||
List<? extends IConnection> outputConns = node.getOutgoingConnections(EConnectionType.FLOW_MAIN);
|
||||
List<IMetadataColumn> inputColumnList = null;
|
||||
List<IMetadataColumn> outputColumnList = null;
|
||||
List<IMetadataColumn> columnList =metadata.getListColumns();
|
||||
|
||||
String rejectConnName = null;
|
||||
List<? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
|
||||
List<IMetadataColumn> rejectColumnList = null;
|
||||
if (rejectConns != null && rejectConns.size() > 0) {
|
||||
IConnection rejectConn = rejectConns.get(0);
|
||||
if(rejectConn!=null){
|
||||
rejectConnName = rejectConn.getName();
|
||||
IMetadataTable metadataTable = rejectConn.getMetadataTable();
|
||||
if(metadataTable!=null){
|
||||
rejectColumnList = metadataTable.getListColumns();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (metadatas != null && metadatas.size()>0) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
if (metadata != null) {
|
||||
|
||||
List<? extends IConnection> outputConns = node.getOutgoingConnections(EConnectionType.FLOW_MAIN);
|
||||
List<IMetadataColumn> inputColumnList = null;
|
||||
List<IMetadataColumn> outputColumnList = null;
|
||||
List<IMetadataColumn> columnList =metadata.getListColumns();
|
||||
|
||||
String rejectConnName = null;
|
||||
List<? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
|
||||
List<IMetadataColumn> rejectColumnList = null;
|
||||
if (rejectConns != null && rejectConns.size() > 0) {
|
||||
IConnection rejectConn = rejectConns.get(0);
|
||||
if(rejectConn!=null){
|
||||
rejectConnName = rejectConn.getName();
|
||||
IMetadataTable metadataTable = rejectConn.getMetadataTable();
|
||||
if(metadataTable!=null){
|
||||
rejectColumnList = metadataTable.getListColumns();
|
||||
}
|
||||
|
||||
String outConnName = null;
|
||||
String inputConnName = null;
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
|
||||
for(IConnection tmpconn : outgoingConns) {
|
||||
if (tmpconn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||
if(rejectConnName==null || !rejectConnName.equals(tmpconn.getName())){
|
||||
outConnName=tmpconn.getName();
|
||||
IMetadataTable outputMetadata = tmpconn.getMetadataTable();
|
||||
if(outputMetadata!=null){
|
||||
outputColumnList = outputMetadata.getListColumns();
|
||||
}
|
||||
}
|
||||
|
||||
String outConnName = null;
|
||||
String inputConnName = null;
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
|
||||
for(IConnection tmpconn : outgoingConns) {
|
||||
if (tmpconn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||
if(rejectConnName==null || !rejectConnName.equals(tmpconn.getName())){
|
||||
outConnName=tmpconn.getName();
|
||||
IMetadataTable outputMetadata = tmpconn.getMetadataTable();
|
||||
if(outputMetadata!=null){
|
||||
outputColumnList = outputMetadata.getListColumns();
|
||||
}
|
||||
}%>
|
||||
<%=tmpconn.getName() %> = null;
|
||||
<%
|
||||
}%>
|
||||
<%=tmpconn.getName() %> = null;
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
List<? extends IConnection> inputConns = node.getIncomingConnections();
|
||||
if (inputConns != null && inputConns.size() > 0) {
|
||||
IConnection inputConn = inputConns.get(0);
|
||||
if(inputConn!=null){
|
||||
inputConnName = inputConn.getName();
|
||||
IMetadataTable inputMetadata = inputConn.getMetadataTable();
|
||||
if(inputMetadata!=null) {
|
||||
inputColumnList = inputMetadata.getListColumns();
|
||||
}
|
||||
}
|
||||
|
||||
List<? extends IConnection> inputConns = node.getIncomingConnections();
|
||||
if (inputConns != null && inputConns.size() > 0) {
|
||||
IConnection inputConn = inputConns.get(0);
|
||||
if(inputConn!=null){
|
||||
inputConnName = inputConn.getName();
|
||||
IMetadataTable inputMetadata = inputConn.getMetadataTable();
|
||||
if(inputMetadata!=null) {
|
||||
inputColumnList = inputMetadata.getListColumns();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (outConnName != null && inputConnName!=null) {
|
||||
%>
|
||||
<%=outConnName %> = new <%=outConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn outputColumn : outputColumnList) {
|
||||
for(IMetadataColumn inputColumn : inputColumnList) {
|
||||
if (outputColumn.getLabel().equals(inputColumn.getLabel())) {
|
||||
if(doc!=null && doc.equals(outputColumn.getLabel())) {
|
||||
if("id_Document".equals(outputColumn.getTalendType())) {
|
||||
}
|
||||
}
|
||||
|
||||
if (outConnName != null && inputConnName!=null) {
|
||||
%>
|
||||
<%=outConnName %> = new <%=outConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn outputColumn : outputColumnList) {
|
||||
for(IMetadataColumn inputColumn : inputColumnList) {
|
||||
if (outputColumn.getLabel().equals(inputColumn.getLabel())) {
|
||||
if(doc!=null && doc.equals(outputColumn.getLabel())) {
|
||||
if("id_Document".equals(outputColumn.getTalendType())) {
|
||||
%>
|
||||
<%=outConnName %>.<%=doc%> = <%=inputConnName%>.<%=doc%>;
|
||||
<%
|
||||
} else {
|
||||
} else {
|
||||
%>
|
||||
<%=outConnName %>.<%=doc%> = <%=inputConnName%>.<%=doc%>.toString();
|
||||
<%
|
||||
}
|
||||
} else { // to those which do not match doc columns
|
||||
}
|
||||
} else { // to those which do not match doc columns
|
||||
%>
|
||||
<%=outConnName %>.<%=outputColumn.getLabel()%> = <%=inputConnName%>.<%=inputColumn.getLabel()%>;
|
||||
<%=outConnName %>.<%=outputColumn.getLabel()%> = <%=inputConnName%>.<%=inputColumn.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
} // if input column matches output column
|
||||
} // for input column
|
||||
} // for output column
|
||||
}
|
||||
} // if input column matches output column
|
||||
} // for input column
|
||||
} // for output column
|
||||
}%>
|
||||
input_<%=cid %> = <%=inputConnName%>.<%=doc%>.toString();
|
||||
|
||||
try {
|
||||
<%if(usePartialUpdate){ // partial%>
|
||||
<% logUtil.debug("\"Try to use partial update.\"");%>
|
||||
<%if(usePartialUpdate){ // partial%>
|
||||
<% logUtil.debug("\"Try to use partial update.\"");%>
|
||||
<%
|
||||
String dataclusterString = "";
|
||||
if(isStaging){
|
||||
dataclusterString = dataCluster + " + \"#STAGING\"";
|
||||
} else {
|
||||
dataclusterString = dataCluster;
|
||||
}
|
||||
String dataclusterString = "";
|
||||
if(isStaging){
|
||||
dataclusterString = dataCluster + " + \"#STAGING\"";
|
||||
} else {
|
||||
dataclusterString = dataCluster;
|
||||
}
|
||||
%>
|
||||
Integer pos = null;
|
||||
if(!<%=usePartialDelete %>) {
|
||||
pos = <%=position.equals("")?null:position%>;
|
||||
}
|
||||
|
||||
org.talend.mdm.webservice.WSPartialPutItem wsPartialPutItem_<%=cid%> = new org.talend.mdm.webservice.WSPartialPutItem(<%=dataclusterString %>,<%=dataModel %>,<%=usePartialDelete %>,<%=key.equals("")?null:key%>, <%=overwrite%>, <%=pivot%>,<%= true==isStaging?false:withReport%>, <%=sourceName%>, pos, input_<%=cid %>);
|
||||
wspk_<%=cid %> = service_<%=cid %>.partialPutItem(wsPartialPutItem_<%=cid%>);
|
||||
|
||||
}
|
||||
|
||||
org.talend.mdm.webservice.WSPartialPutItem wsPartialPutItem_<%=cid%> = new org.talend.mdm.webservice.WSPartialPutItem(<%=dataclusterString %>,<%=dataModel %>,<%=usePartialDelete %>,<%=key.equals("")?null:key%>, <%=overwrite%>, <%=pivot%>,<%= true==isStaging?false:withReport%>, <%=sourceName%>, pos, input_<%=cid %>);
|
||||
wspk_<%=cid %> = service_<%=cid %>.partialPutItem(wsPartialPutItem_<%=cid%>);
|
||||
|
||||
<%
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%}else{// not partial %>
|
||||
|
||||
org.talend.mdm.webservice.WSPutItem item_<%=cid %> = new org.talend.mdm.webservice.WSPutItem(<%=isUpdate %>, dataCluster_<%=cid %>,dataModel_<%=cid %>,input_<%=cid %>);
|
||||
<%
|
||||
if (!isStaging && withReport) {%>
|
||||
<% logUtil.debug("\"Put item with report to MDM server.\"");%>
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemWithReport itemReport_<%=cid %> = new org.talend.mdm.webservice.WSPutItemWithReport(<%=needCheck %>, <%=sourceName %>, item_<%=cid %>);
|
||||
|
||||
<%if (isMassInsert) {%>
|
||||
<%if(addTaskID){%>
|
||||
taskIDs_<%=cid%>.add(<%=isCustom?taskID:inputConnName + "." + prevColumn%>);
|
||||
<%}%>
|
||||
miList_<%=cid %>.add(itemReport_<%=cid %>);
|
||||
|
||||
if (miList_<%=cid %>.size() >= <%=numMassInsert %>) {
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemWithReportArray putItemWithReportArray = new org.talend.mdm.webservice.WSPutItemWithReportArray(miList_<%=cid %>);
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemWithReportArray(putItemWithReportArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put items size:\"+wspks_"+cid+".size()");%>
|
||||
<% logUtil.debug("\"Successfully put item .\"");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%} else {%>
|
||||
<% logUtil.debug("\"Try to put items with report.\"");%>
|
||||
|
||||
wspk_<%=cid %> = service_<%=cid %>.putItemWithReport(itemReport_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Put items successfully.\"");%>
|
||||
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>. makeUpdateMeteItm(<%=isCustom?taskID:inputConnName + "." + prevColumn%>,wspk_<%=cid %>));
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
|
||||
<% logUtil.debug("\"Put item to MDM server.\"");%>
|
||||
|
||||
<%
|
||||
if (isMassInsert) {
|
||||
if(addTaskID){
|
||||
%>
|
||||
taskIDs_<%=cid%>.add(<%=isCustom?taskID:inputConnName + "." + prevColumn%>);
|
||||
<%}%>
|
||||
miList_<%=cid %>.add(item_<%=cid %>);
|
||||
|
||||
if (miList_<%=cid %>.size() >= <%=numMassInsert %>) {
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemArray putItemArray = new org.talend.mdm.webservice.WSPutItemArray(miList_<%=cid %>);
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemArray(putItemArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put items size:\"+wspks_"+cid+".size()");%>
|
||||
<% logUtil.debug("\"Put item successfully.\"");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds().get(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%}else{// not partial %>
|
||||
|
||||
org.talend.mdm.webservice.WSPutItem item_<%=cid %> = new org.talend.mdm.webservice.WSPutItem(<%=isUpdate %>, dataCluster_<%=cid %>,dataModel_<%=cid %>,input_<%=cid %>);
|
||||
<%
|
||||
if (!isStaging && withReport) {%>
|
||||
<% logUtil.debug("\"Put item with report to MDM server.\"");%>
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemWithReport itemReport_<%=cid %> = new org.talend.mdm.webservice.WSPutItemWithReport(<%=needCheck %>, <%=sourceName %>, item_<%=cid %>);
|
||||
|
||||
<%if (isMassInsert) {%>
|
||||
<%if(addTaskID){%>
|
||||
taskIDs_<%=cid%>.add(<%=isCustom?taskID:inputConnName + "." + prevColumn%>);
|
||||
<%}%>
|
||||
miList_<%=cid %>.add(itemReport_<%=cid %>);
|
||||
|
||||
if (miList_<%=cid %>.size() >= <%=numMassInsert %>) {
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemWithReportArray putItemWithReportArray = new org.talend.mdm.webservice.WSPutItemWithReportArray(miList_<%=cid %>);
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemWithReportArray(putItemWithReportArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put items size:\"+wspks_"+cid+".size()");%>
|
||||
<% logUtil.debug("\"Successfully put item .\"");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%
|
||||
} else {%>
|
||||
<% logUtil.debug("\"Attempt to put item .\"");%>
|
||||
|
||||
wspk_<%=cid %> = service_<%=cid %>.putItem(item_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Successfully put item .\"");%>
|
||||
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(<%=isCustom?taskID:inputConnName + "." + prevColumn%>,wspk_<%=cid %>));
|
||||
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
<%}%>
|
||||
<%
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%}//end partial%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%} else {%>
|
||||
<% logUtil.debug("\"Try to put items with report.\"");%>
|
||||
|
||||
wspk_<%=cid %> = service_<%=cid %>.putItemWithReport(itemReport_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Put items successfully.\"");%>
|
||||
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Try to add task id.\"");%>
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>. makeUpdateMeteItm(<%=isCustom?taskID:inputConnName + "." + prevColumn%>,wspk_<%=cid %>));
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds().get(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
|
||||
<% logUtil.debug("\"Put item to MDM server.\"");%>
|
||||
|
||||
<%
|
||||
if (isMassInsert) {
|
||||
if(addTaskID){
|
||||
%>
|
||||
taskIDs_<%=cid%>.add(<%=isCustom?taskID:inputConnName + "." + prevColumn%>);
|
||||
<%}%>
|
||||
miList_<%=cid %>.add(item_<%=cid %>);
|
||||
|
||||
if (miList_<%=cid %>.size() >= <%=numMassInsert %>) {
|
||||
|
||||
org.talend.mdm.webservice.WSPutItemArray putItemArray = new org.talend.mdm.webservice.WSPutItemArray(miList_<%=cid %>);
|
||||
wspks_<%=cid %> = service_<%=cid %>.putItemArray(putItemArray).getWsItemPK();
|
||||
|
||||
<% logUtil.debug("\"Put items size:\"+wspks_"+cid+".size()");%>
|
||||
<% logUtil.debug("\"Put item successfully.\"");%>
|
||||
|
||||
miList_<%=cid %>.clear();
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
int i2_<%=cid %> = 0;
|
||||
for(org.talend.mdm.webservice.WSItemPK wspk2_<%=cid %> : wspks_<%=cid %>){
|
||||
|
||||
String compositeId = "";
|
||||
for(String id:wspk2_<%=cid %>.getIds()) {
|
||||
compositeId += id;
|
||||
}
|
||||
|
||||
wspk2_<%=cid %>.setWsDataClusterPK(dataCluster_<%=cid %>);
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(taskIDs_<%=cid%>.get(i2_<%=cid %>), wspk2_<%=cid %>));
|
||||
i2_<%=cid %>++;
|
||||
}
|
||||
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
taskIDs_<%=cid%>.clear();
|
||||
<%}%>
|
||||
}
|
||||
<%
|
||||
} else {%>
|
||||
<% logUtil.debug("\"Attempt to put item .\"");%>
|
||||
|
||||
wspk_<%=cid %> = service_<%=cid %>.putItem(item_<%=cid %>);
|
||||
|
||||
<% logUtil.debug("\"Successfully put item .\"");%>
|
||||
|
||||
<%if(addTaskID){%>
|
||||
<% logUtil.debug("\"Attempt to add task id .\"");%>
|
||||
|
||||
service_<%=cid %>.updateItemMetadata(util_<%=cid%>.makeUpdateMeteItm(<%=isCustom?taskID:inputConnName + "." + prevColumn%>,wspk_<%=cid %>));
|
||||
|
||||
<% logUtil.debug("\"Add task id successfully.\"");%>
|
||||
<%}%>
|
||||
<%
|
||||
if (outConnName !=null && !isMassInsert && keysReturn.size() > 0) {
|
||||
for (int i = 0; i < keysReturn.size(); i++){
|
||||
Map<String,String> map = keysReturn.get(i);
|
||||
%>
|
||||
<%=outConnName %>.<%=map.get("OUTPUT_COLUMN")%>= wspk_<%=cid%>.getIds().get(<%=i %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%}//end partial%>
|
||||
} catch (java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if (dieOnError) {%>
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if (dieOnError) {%>
|
||||
throw(e);
|
||||
<%} else {
|
||||
|
||||
@@ -312,34 +312,34 @@
|
||||
<%=outConnName %> = null;
|
||||
<%}%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
|
||||
<%
|
||||
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
if (!"xml".equals(column.getLabel()) && !"errorCode".equals(column.getLabel()) && !"errorMessage".equals(column.getLabel())) {
|
||||
if(column.getLabel().equals(doc) && "id_String".equals(column.getTalendType())) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=inputConnName %>.<%=column.getLabel() %>.toString();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=inputConnName %>.<%=column.getLabel() %>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
if("xml".equals(column.getLabel())){
|
||||
if("id_String".equals(column.getTalendType())){
|
||||
%>
|
||||
<%=rejectConnName%>.xml = input_<%=cid %>;
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<%=rejectConnName%>.xml = <%=inputConnName %>.xml;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
nb_line_rejected_<%=cid%>++;
|
||||
if (!"xml".equals(column.getLabel()) && !"errorCode".equals(column.getLabel()) && !"errorMessage".equals(column.getLabel())) {
|
||||
if(column.getLabel().equals(doc) && "id_String".equals(column.getTalendType())) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=inputConnName %>.<%=column.getLabel() %>.toString();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=inputConnName %>.<%=column.getLabel() %>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
if("xml".equals(column.getLabel())){
|
||||
if("id_String".equals(column.getTalendType())){
|
||||
%>
|
||||
<%=rejectConnName%>.xml = input_<%=cid %>;
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<%=rejectConnName%>.xml = <%=inputConnName %>.xml;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
nb_line_rejected_<%=cid%>++;
|
||||
<%=rejectConnName %>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
<%} else {%>
|
||||
System.err.println(e.getMessage());
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
org.talend.core.model.metadata.IMetadataColumn
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
@@ -22,241 +22,280 @@ String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
String dieOnErrorStr = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
boolean dieOnError = (dieOnErrorStr!=null&&!("").equals(dieOnErrorStr))?("true").equals(dieOnErrorStr):false;
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
cid = destination;
|
||||
}
|
||||
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas != null) && (metadatas.size() > 0)) {//1
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
if (metadata != null) {//2
|
||||
|
||||
List<IMetadataColumn> columnList = metadata.getListColumns();
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
// if output columns are defined
|
||||
if (outgoingConns != null && outgoingConns.size() > 0){//3
|
||||
|
||||
IConnection outgoingConn = outgoingConns.get(0);
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { //4
|
||||
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
if (metadata != null) {//2
|
||||
List<IMetadataColumn> columnList = metadata.getListColumns();
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
|
||||
String concept = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
boolean isSingle = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
List<Map<String, String>> ids = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__IDS__");
|
||||
List<Map<String, String>> operations = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__OPERATIONS__");
|
||||
|
||||
String spellThrehold = ElementParameterParser.getValue(node, "__SPELLTHREHOLD__");
|
||||
String skip = ElementParameterParser.getValue(node, "__SKIP__");
|
||||
String bufferSize = ElementParameterParser.getValue(node, "__FETCHSIZE__");
|
||||
String limit = ElementParameterParser.getValue(node, "__MAXVALUE__");
|
||||
if(spellThrehold==null || ("").equals(spellThrehold)){
|
||||
spellThrehold = "0";
|
||||
}
|
||||
if(skip==null || ("").equals(skip)){
|
||||
skip = "0";
|
||||
}
|
||||
if(limit==null || ("").equals(limit)){
|
||||
limit = "0";
|
||||
}
|
||||
%>
|
||||
|
||||
int nb_line_<%=cid %> = 0;
|
||||
<%if(!useExistingConn){%>
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \"", mdmUrl,"\".\"");%>
|
||||
// if output columns are defined
|
||||
if (outgoingConns != null && outgoingConns.size() > 0){//3
|
||||
|
||||
String murl = <%=mdmUrl %>;
|
||||
if(murl.endsWith("?wsdl")) {
|
||||
murl = murl.substring(0, murl.length() - 5);
|
||||
IConnection outgoingConn = outgoingConns.get(0);
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { //4
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "TMDMService_" + connection;
|
||||
String trans = "mdmTrans_" + connection;
|
||||
String mdmUrl = ElementParameterParser.getValue(node, "__MDMURL__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
|
||||
String concept = ElementParameterParser.getValue(node, "__CONCEPT__");
|
||||
String dataCluster = ElementParameterParser.getValue(node, "__DATACLUSTER__");
|
||||
boolean isStaging = "STAGING".equalsIgnoreCase(ElementParameterParser.getValue(node, "__CONTAINER_TYPE__"));
|
||||
|
||||
boolean isSingle = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
List<Map<String, String>> ids = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__IDS__");
|
||||
List<Map<String, String>> operations = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__OPERATIONS__");
|
||||
|
||||
String spellThrehold = ElementParameterParser.getValue(node, "__SPELLTHREHOLD__");
|
||||
String skip = ElementParameterParser.getValue(node, "__SKIP__");
|
||||
String bufferSize = ElementParameterParser.getValue(node, "__FETCHSIZE__");
|
||||
String limit = ElementParameterParser.getValue(node, "__MAXVALUE__");
|
||||
if(spellThrehold==null || ("").equals(spellThrehold)){
|
||||
spellThrehold = "0";
|
||||
}
|
||||
if(skip==null || ("").equals(skip)){
|
||||
skip = "0";
|
||||
}
|
||||
if(limit==null || ("").equals(limit)){
|
||||
limit = "0";
|
||||
}
|
||||
%>
|
||||
|
||||
int nb_line_<%=cid %> = 0;
|
||||
<%if(!useExistingConn){%>
|
||||
String murl_<%=cid %> = <%=mdmUrl %>;
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
stub_<%=cid %>.getRequestContext().put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, false);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, <%=username %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl);
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
<% String passwordFieldName = "__PASSWORD__"; %>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid%>);
|
||||
|
||||
<% logUtil.debug("\"Web service initialized successfully.\"");%>
|
||||
<%}else{%>
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
<%}%>
|
||||
|
||||
String suffix = "";
|
||||
if(true ==<%=isStaging %>) {
|
||||
suffix = "#STAGING";
|
||||
}
|
||||
org.talend.mdm.webservice.WSDataClusterPK dataCluster_<%=cid %> = new org.talend.mdm.webservice.WSDataClusterPK(<%=dataCluster %> + suffix);
|
||||
|
||||
<%if(!isSingle){//item%>
|
||||
List<String> ids_<%=cid %> = new java.util.ArrayList<String>();
|
||||
|
||||
<%
|
||||
for(int i=0; i<ids.size(); i++){//for
|
||||
Map<String, String> map = ids.get(i);
|
||||
String idValue = map.get("IDVALUE");
|
||||
%>
|
||||
ids_<%=cid %>.add(<%=idValue %>);
|
||||
<%
|
||||
}//for
|
||||
%>
|
||||
|
||||
org.talend.mdm.webservice.WSGetItem wsitem_<%=cid %> =
|
||||
new org.talend.mdm.webservice.WSGetItem(new org.talend.mdm.webservice.WSItemPK(<%=concept %>,ids_<%=cid %>, dataCluster_<%=cid %>));
|
||||
String <%=outgoingConn.getName() %>_xml = "";
|
||||
try {
|
||||
|
||||
org.talend.mdm.webservice.WSItem item_<%=cid %>=service_<%=cid %>.getItem(wsitem_<%=cid %>);
|
||||
|
||||
<%=outgoingConn.getName() %>_xml = item_<%=cid %>.getContent();
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
nb_line_<%=cid %> ++;
|
||||
|
||||
<%
|
||||
}else{//items
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereCondition wc_<%=cid %> = null;
|
||||
java.util.List<org.talend.mdm.webservice.WSWhereItem> conditions_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSWhereItem>();
|
||||
<%
|
||||
boolean isOnlyOrPredicate=true;
|
||||
for(int i=0; i < operations.size(); i++){
|
||||
Map<String, String> map= operations.get(i);
|
||||
String xpath=map.get("XPATH");
|
||||
String operator=map.get("FUNCTION");
|
||||
String value = map.get("VALUE");
|
||||
String predicate = map.get("PREDICATE");
|
||||
if((i < operations.size()-1) && (!"OR".equals(predicate))){
|
||||
isOnlyOrPredicate = false;
|
||||
}
|
||||
%>
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, decryptedPassword_<%=cid %>);
|
||||
<%}else{%>
|
||||
String connKey_<%=cid %> = "<%=conn%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(connKey_<%=cid %>);
|
||||
if(service_<%=cid %> == null){
|
||||
String murl_<%=cid %> = (String)globalMap.get("mdmUrl_<%=connection %>");
|
||||
if(murl_<%=cid %>.endsWith("?wsdl")) {
|
||||
murl_<%=cid %> = murl_<%=cid %>.substring(0, murl_<%=cid %>.length() - 5);
|
||||
}
|
||||
String username_<%=cid%> = (String)globalMap.get("username_<%=connection %>");
|
||||
String password_<%=cid%> = (String)globalMap.get("password_<%=connection %>");
|
||||
|
||||
wc_<%=cid %> =new org.talend.mdm.webservice.WSWhereCondition(
|
||||
<%=xpath %>,
|
||||
org.talend.mdm.webservice.WSWhereOperator.<%=operator %>,
|
||||
<%="EMPTY_NULL".equals(operator)? null:value %>,
|
||||
false,
|
||||
org.talend.mdm.webservice.WSStringPredicate.<%=predicate %>);
|
||||
<% logUtil.debug("\"Initializing web service from URL: \" + murl_" + cid);%>
|
||||
org.talend.mdm.webservice.TMDMService_Service service_service_<%=cid %> = new org.talend.mdm.webservice.TMDMService_Service(null);
|
||||
service_<%=cid %> = service_service_<%=cid %>.getTMDMPort();
|
||||
javax.xml.ws.BindingProvider stub_<%=cid %> = (javax.xml.ws.BindingProvider) service_<%=cid %>;
|
||||
java.util.Map<String, Object> context_<%=cid %> = stub_<%=cid %>.getRequestContext();
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, murl_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.USERNAME_PROPERTY, username_<%=cid %>);
|
||||
context_<%=cid %>.put(javax.xml.ws.BindingProvider.PASSWORD_PROPERTY, password_<%=cid %>);
|
||||
<% logUtil.debug("\"Got service successfully with key=\" + connKey_" + cid);%>
|
||||
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=i %>_<%=cid %>=new org.talend.mdm.webservice.WSWhereItem(null,wc_<%=cid %>,null);
|
||||
conditions_<%=cid %>.add(wsItem_<%=i %>_<%=cid %>);
|
||||
<%
|
||||
}//for
|
||||
%>
|
||||
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=cid %> = null;
|
||||
if(conditions_<%=cid %>.size() > 0){
|
||||
<%
|
||||
if(!isOnlyOrPredicate){
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereAnd whereAnd_<%=cid %> = new org.talend.mdm.webservice.WSWhereAnd(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(whereAnd_<%=cid %>,null,null);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereOr whereOr_<%=cid %> = new org.talend.mdm.webservice.WSWhereOr(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(null,null,whereOr_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
int limit_<%=cid%> = <%=limit%>;
|
||||
int recordsPerPage_<%=cid%> = <%=bufferSize%>;
|
||||
int skip_<%=cid%> = <%=skip%>;
|
||||
|
||||
if (skip_<%=cid%> < 0)
|
||||
skip_<%=cid%> = 0;
|
||||
|
||||
if (recordsPerPage_<%=cid%> <= 0)
|
||||
recordsPerPage_<%=cid%> = -1;// read whole records in one time
|
||||
|
||||
if (limit_<%=cid%> <= 0)
|
||||
limit_<%=cid%> = -1;// no limit
|
||||
|
||||
int retrievedCount_<%=cid%> = 0;
|
||||
int readRecordsSize_<%=cid%> = limit_<%=cid%> == -1 ? recordsPerPage_<%=cid%> : (recordsPerPage_<%=cid%> == -1 ? limit_<%=cid%> : (recordsPerPage_<%=cid%> > limit_<%=cid%> ? limit_<%=cid%>
|
||||
: recordsPerPage_<%=cid%>));
|
||||
if((Boolean)globalMap.get("useTransaction_<%=connection %>")) {
|
||||
String turl_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.getMDMTransactionURL(murl_<%=cid %>, true);
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> == null){
|
||||
if((Boolean)globalMap.get("useClientTranId_<%=connection %>")){
|
||||
String sessionID_<%=cid%> = com.talend.mdm.transaction.client.MDMTransactionClient.getSessionID(turl_<%=cid%>,username_<%=cid%>,password_<%=cid%>);
|
||||
mdmTransaction_<%=cid %> = new com.talend.mdm.transaction.client.MDMTransaction();
|
||||
mdmTransaction_<%=cid %>.setUrl(turl_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setId("<%=cid %>_" + java.util.UUID.randomUUID());
|
||||
mdmTransaction_<%=cid %>.setUsername(username_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setPassword(password_<%=cid %>);
|
||||
mdmTransaction_<%=cid %>.setSessionId(sessionID_<%=cid%>);
|
||||
}else{
|
||||
<% logUtil.debug("\"Attempt to get a remote transaction from url: \" + murl_" + cid);%>
|
||||
mdmTransaction_<%=cid %> = com.talend.mdm.transaction.client.MDMTransactionClient.newTransaction(turl_<%=cid %>,username_<%=cid %>,password_<%=cid %>);
|
||||
}
|
||||
java.util.List<org.apache.cxf.headers.Header> soapHeaders_<%=cid %> = new java.util.ArrayList<org.apache.cxf.headers.Header>();
|
||||
javax.xml.namespace.QName qName_<%=cid %> = new javax.xml.namespace.QName("http://www.talend.com/mdm", "transaction-id");
|
||||
org.apache.cxf.databinding.DataBinding dataBinding_<%=cid %> = new org.apache.cxf.jaxb.JAXBDataBinding(String.class);
|
||||
soapHeaders_<%=cid %>.add(new org.apache.cxf.headers.Header(qName_<%=cid %>, mdmTransaction_<%=cid %>.getId(), dataBinding_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.headers.Header.HEADER_LIST, soapHeaders_<%=cid %>);
|
||||
|
||||
org.talend.mdm.webservice.WSGetItems getitems_<%=cid %>=null;
|
||||
|
||||
boolean continueFlag_<%=cid%> = true;
|
||||
int totalCount_<%=cid%> = -1;<%//For TDI-26039%>
|
||||
while (continueFlag_<%=cid%>) {
|
||||
java.util.Map<String, java.util.List<String>> httpHeaders_<%=cid %> = new java.util.HashMap<String, java.util.List<String>>();
|
||||
String cookie_<%=cid %> = com.talend.mdm.transaction.client.MDMTransaction.getStickySession() + "=" + mdmTransaction_<%=cid%>.getSessionId();
|
||||
httpHeaders_<%=cid %>.put("Cookie", java.util.Arrays.asList(cookie_<%=cid %>));
|
||||
context_<%=cid %>.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, httpHeaders_<%=cid %>);
|
||||
|
||||
getitems_<%=cid%>=new org.talend.mdm.webservice.WSGetItems(
|
||||
<%=concept%>,
|
||||
readRecordsSize_<%=cid%>,
|
||||
skip_<%=cid%> + retrievedCount_<%=cid%>,
|
||||
<%=spellThrehold%>, //spell Threshold
|
||||
true,
|
||||
wsItem_<%=cid%>,
|
||||
dataCluster_<%=cid%>);
|
||||
globalMap.put(transKey_<%=cid %>, mdmTransaction_<%=cid %>);
|
||||
<% logUtil.debug("\"Got transaction successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
}
|
||||
service_<%=cid %>.ping(new org.talend.mdm.webservice.WSPing());<%//For TDI-26109%>
|
||||
globalMap.put(connKey_<%=cid %>, service_<%=cid %>);
|
||||
}
|
||||
<%}%>
|
||||
|
||||
String suffix_<%=cid %> = "";
|
||||
if(true ==<%=isStaging %>) {
|
||||
suffix_<%=cid %> = "#STAGING";
|
||||
}
|
||||
org.talend.mdm.webservice.WSDataClusterPK dataCluster_<%=cid %> = new org.talend.mdm.webservice.WSDataClusterPK(<%=dataCluster %> + suffix_<%=cid %>);
|
||||
|
||||
<%if(!isSingle){//item%>
|
||||
List<String> ids_<%=cid %> = new java.util.ArrayList<String>();
|
||||
|
||||
<%
|
||||
for(int i=0; i<ids.size(); i++){//for
|
||||
Map<String, String> map = ids.get(i);
|
||||
String idValue = map.get("IDVALUE");
|
||||
%>
|
||||
ids_<%=cid %>.add(<%=idValue %>);
|
||||
<%
|
||||
}//for
|
||||
%>
|
||||
|
||||
org.talend.mdm.webservice.WSGetItem wsitem_<%=cid %> = new org.talend.mdm.webservice.WSGetItem(new org.talend.mdm.webservice.WSItemPK(<%=concept %>,ids_<%=cid %>, dataCluster_<%=cid %>));
|
||||
String <%=outgoingConn.getName() %>_xml = "";
|
||||
try {
|
||||
org.talend.mdm.webservice.WSItem item_<%=cid %>=service_<%=cid %>.getItem(wsitem_<%=cid %>);
|
||||
<%=outgoingConn.getName() %>_xml = item_<%=cid %>.getContent();
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
nb_line_<%=cid %> ++;
|
||||
<%
|
||||
}else{//items
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereCondition wc_<%=cid %> = null;
|
||||
java.util.List<org.talend.mdm.webservice.WSWhereItem> conditions_<%=cid %> = new java.util.ArrayList<org.talend.mdm.webservice.WSWhereItem>();
|
||||
<%
|
||||
boolean isOnlyOrPredicate=true;
|
||||
for(int i=0; i < operations.size(); i++){
|
||||
Map<String, String> map= operations.get(i);
|
||||
String xpath=map.get("XPATH");
|
||||
String operator=map.get("FUNCTION");
|
||||
String value = map.get("VALUE");
|
||||
String predicate = map.get("PREDICATE");
|
||||
if((i < operations.size()-1) && (!"OR".equals(predicate))){
|
||||
isOnlyOrPredicate = false;
|
||||
}
|
||||
%>
|
||||
|
||||
wc_<%=cid %> =new org.talend.mdm.webservice.WSWhereCondition(
|
||||
<%=xpath %>,
|
||||
org.talend.mdm.webservice.WSWhereOperator.<%=operator %>,
|
||||
<%="EMPTY_NULL".equals(operator)? null:value %>,
|
||||
false,
|
||||
org.talend.mdm.webservice.WSStringPredicate.<%=predicate %>);
|
||||
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=i %>_<%=cid %>=new org.talend.mdm.webservice.WSWhereItem(null,wc_<%=cid %>,null);
|
||||
conditions_<%=cid %>.add(wsItem_<%=i %>_<%=cid %>);
|
||||
<%
|
||||
}//for
|
||||
%>
|
||||
|
||||
org.talend.mdm.webservice.WSWhereItem wsItem_<%=cid %> = null;
|
||||
if(conditions_<%=cid %>.size() > 0){
|
||||
<%
|
||||
if(!isOnlyOrPredicate){
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereAnd whereAnd_<%=cid %> = new org.talend.mdm.webservice.WSWhereAnd(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(whereAnd_<%=cid %>,null,null);
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
org.talend.mdm.webservice.WSWhereOr whereOr_<%=cid %> = new org.talend.mdm.webservice.WSWhereOr(conditions_<%=cid %>);
|
||||
wsItem_<%=cid %> =new org.talend.mdm.webservice.WSWhereItem(null,null,whereOr_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
int limit_<%=cid %> = <%=limit%>;
|
||||
int recordsPerPage_<%=cid %> = <%=bufferSize%>;
|
||||
int skip_<%=cid %> = <%=skip%>;
|
||||
|
||||
if (skip_<%=cid %> < 0)
|
||||
skip_<%=cid %> = 0;
|
||||
|
||||
if (recordsPerPage_<%=cid %> <= 0)
|
||||
recordsPerPage_<%=cid %> = -1;// read whole records in one time
|
||||
|
||||
if (limit_<%=cid %> <= 0)
|
||||
limit_<%=cid %> = -1;// no limit
|
||||
|
||||
int retrievedCount_<%=cid %> = 0;
|
||||
int readRecordsSize_<%=cid %> = limit_<%=cid %> == -1 ? recordsPerPage_<%=cid %> : (recordsPerPage_<%=cid %> == -1 ? limit_<%=cid %> : (recordsPerPage_<%=cid %> > limit_<%=cid %> ? limit_<%=cid %>
|
||||
: recordsPerPage_<%=cid %>));
|
||||
|
||||
org.talend.mdm.webservice.WSGetItems getitems_<%=cid %>=null;
|
||||
|
||||
boolean continueFlag_<%=cid %> = true;
|
||||
int totalCount_<%=cid %> = -1;<%//For TDI-26039%>
|
||||
int totalPage_<%=cid %> = -1;
|
||||
int pageNumber_<%=cid %> = 0;
|
||||
while (continueFlag_<%=cid %>) {
|
||||
pageNumber_<%=cid %>++;
|
||||
getitems_<%=cid %>=new org.talend.mdm.webservice.WSGetItems(
|
||||
<%=concept%>,
|
||||
readRecordsSize_<%=cid %>,
|
||||
skip_<%=cid %> + recordsPerPage_<%=cid %>*(pageNumber_<%=cid %>-1),
|
||||
<%=spellThrehold%>, //spell Threshold
|
||||
true,
|
||||
wsItem_<%=cid %>,
|
||||
dataCluster_<%=cid %>);
|
||||
|
||||
|
||||
String[] items_<%=cid%> = {};
|
||||
try {
|
||||
<% logUtil.debug("\"Attempt to get items .\"");%>
|
||||
items_<%=cid%> = service_<%=cid %>.getItems(getitems_<%=cid%>).getStrings().toArray(new String[0]);
|
||||
|
||||
if(totalCount_<%=cid%> < 0){
|
||||
totalCount_<%=cid%> = Integer.valueOf(items_<%=cid%>[0].replaceAll("<totalCount>", "").replaceAll("</totalCount>", ""));
|
||||
<% logUtil.info("\"Total items retrieved:\"+totalCount_"+cid);%>
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
retrievedCount_<%=cid%> += (items_<%=cid%>.length - 1);
|
||||
if (totalCount_<%=cid%> == retrievedCount_<%=cid%> || recordsPerPage_<%=cid%> == -1 || (items_<%=cid%>.length - 1) < readRecordsSize_<%=cid%> || limit_<%=cid%> == retrievedCount_<%=cid%>) {
|
||||
continueFlag_<%=cid%> = false;
|
||||
} else if (limit_<%=cid%> != -1 && limit_<%=cid%> < retrievedCount_<%=cid%> + readRecordsSize_<%=cid%>) {
|
||||
readRecordsSize_<%=cid%> = limit_<%=cid%> - retrievedCount_<%=cid%>;
|
||||
}
|
||||
|
||||
for(int i_<%=cid%> = 1, itemsLength_<%=cid%> = items_<%=cid%>.length; i_<%=cid%> < itemsLength_<%=cid%>; i_<%=cid%>++){
|
||||
nb_line_<%=cid%> ++;
|
||||
String <%=outgoingConn.getName()%>_xml = items_<%=cid%>[i_<%=cid%>];
|
||||
|
||||
<%
|
||||
}//end items
|
||||
%>
|
||||
<%
|
||||
}//4
|
||||
}//3
|
||||
}//2
|
||||
String[] items_<%=cid %> = {};
|
||||
try {
|
||||
<% logUtil.debug("\"Attempt to get items .\"");%>
|
||||
items_<%=cid %> = service_<%=cid %>.getItems(getitems_<%=cid %>).getStrings().toArray(new String[0]);
|
||||
|
||||
if(totalCount_<%=cid %> < 0){
|
||||
totalCount_<%=cid %> = Integer.valueOf(items_<%=cid %>[0].replaceAll("<totalCount>", "").replaceAll("</totalCount>", ""));
|
||||
<% logUtil.info("\"Total items retrieved:\"+totalCount_"+cid);%>
|
||||
totalPage_<%=cid %> = totalCount_<%=cid %>/recordsPerPage_<%=cid %> +1;
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
retrievedCount_<%=cid %> += (items_<%=cid %>.length - 1);
|
||||
if (totalCount_<%=cid %> == retrievedCount_<%=cid %> || recordsPerPage_<%=cid %> == -1 || (items_<%=cid %>.length - 1) < 1 || pageNumber_<%=cid %> == totalPage_<%=cid %> || limit_<%=cid %> == retrievedCount_<%=cid %>) {
|
||||
continueFlag_<%=cid %> = false;
|
||||
} else if (limit_<%=cid %> != -1 && limit_<%=cid %> < retrievedCount_<%=cid %> + readRecordsSize_<%=cid %>) {
|
||||
readRecordsSize_<%=cid %> = limit_<%=cid %> - retrievedCount_<%=cid %>;
|
||||
}
|
||||
|
||||
for(int i_<%=cid %> = 1, itemsLength_<%=cid %> = items_<%=cid %>.length; i_<%=cid %> < itemsLength_<%=cid %>; i_<%=cid %>++){
|
||||
nb_line_<%=cid %> ++;
|
||||
String <%=outgoingConn.getName()%>_xml = items_<%=cid %>[i_<%=cid %>];
|
||||
|
||||
<%
|
||||
}//end items
|
||||
%>
|
||||
<%
|
||||
}//4
|
||||
}//3
|
||||
}//2
|
||||
}//1
|
||||
%>
|
||||
@@ -1,71 +1,69 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IConnectionCategory
|
||||
org.talend.core.model.metadata.IMetadataColumn
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
java.util.List
|
||||
"
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
String dieOnErrorStr = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
boolean dieOnError = (dieOnErrorStr!=null&&!("").equals(dieOnErrorStr))?("true").equals(dieOnErrorStr):false;
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
String cid = node.getUniqueName();
|
||||
String destination = ElementParameterParser.getValue(node, "__DESTINATION__");
|
||||
String dieOnErrorStr = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
boolean dieOnError = (dieOnErrorStr!=null&&!("").equals(dieOnErrorStr))?("true").equals(dieOnErrorStr):false;
|
||||
if(destination!=null && !"".equals(destination)){
|
||||
cid = destination;
|
||||
}
|
||||
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas != null) && (metadatas.size() > 0)) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
if (metadata != null) {
|
||||
|
||||
List<IMetadataColumn> columnList = metadata.getListColumns();
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
// if output columns are defined
|
||||
if (outgoingConns != null && outgoingConns.size() > 0){
|
||||
|
||||
IConnection outgoingConn = outgoingConns.get(0);
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { // start 1
|
||||
boolean useWhere = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
if(useWhere){
|
||||
%>
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
if (metadata != null) {
|
||||
|
||||
<%if(!useExistingConn){%>
|
||||
try {
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
<%}%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
List<IMetadataColumn> columnList = metadata.getListColumns();
|
||||
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();
|
||||
|
||||
// if output columns are defined
|
||||
if (outgoingConns != null && outgoingConns.size() > 0){
|
||||
|
||||
IConnection outgoingConn = outgoingConns.get(0);
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) { // start 1
|
||||
boolean useWhere = ("true").equals(ElementParameterParser.getValue(node, "__USE_ITEMS__"));
|
||||
if(useWhere){
|
||||
%>
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%if(!useExistingConn){%>
|
||||
try {
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
} catch(java.lang.Exception e) {
|
||||
<% logUtil.error("\"Unexpected error:\"+e.getMessage()");%>
|
||||
<%if(dieOnError) {%>
|
||||
throw e;
|
||||
<% } else { %>
|
||||
System.err.println(e.getMessage());
|
||||
<% } %>
|
||||
}
|
||||
<%}%>
|
||||
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
%>
|
||||
@@ -208,6 +208,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-core-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-soap-3.1.4"
|
||||
@@ -215,12 +216,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-soap-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-soap-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-bindings-xml-3.1.4"
|
||||
MODULE="cxf-rt-bindings-xml-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-bindings-xml-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-jaxb-3.1.4"
|
||||
@@ -228,6 +231,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-jaxb-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-jaxb-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="xmlschema-core-2.2.1"
|
||||
@@ -235,6 +239,7 @@
|
||||
MVN="mvn:org.talend.libraries/xmlschema-core-2.2.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlschema-core-2.2.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="woodstox-core-asl-4.4.1"
|
||||
@@ -242,6 +247,7 @@
|
||||
MVN="mvn:org.talend.libraries/woodstox-core-asl-4.4.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/woodstox-core-asl-4.4.1.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="stax2-api-3.1.4"
|
||||
@@ -249,6 +255,7 @@
|
||||
MVN="mvn:org.talend.libraries/stax2-api-3.1.4/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/stax2-api-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-transports-http-3.1.4"
|
||||
@@ -256,12 +263,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-transports-http-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-databinding-xmlbeans-3.1.4"
|
||||
MODULE="cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-databinding-xmlbeans-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-databinding-xmlbeans-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-jaxws-3.1.4"
|
||||
@@ -269,6 +278,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-jaxws-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxws-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-frontend-simple-3.1.4"
|
||||
@@ -276,36 +286,42 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-frontend-simple-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-simple-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-security-3.1.4"
|
||||
MODULE="cxf-rt-security-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-security-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-addr-3.1.4"
|
||||
MODULE="cxf-rt-ws-addr-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-addr-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-addr-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-mex-3.1.4"
|
||||
MODULE="cxf-rt-ws-mex-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-mex-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-mex-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-policy-3.1.4"
|
||||
MODULE="cxf-rt-ws-policy-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-policy-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-policy-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-rm-3.1.4"
|
||||
MODULE="cxf-rt-ws-rm-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-rm-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-rm-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-ws-security-3.1.4"
|
||||
@@ -313,6 +329,7 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-ws-security-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-ws-security-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-rt-wsdl-3.1.4"
|
||||
@@ -320,12 +337,14 @@
|
||||
MVN="mvn:org.talend.libraries/cxf-rt-wsdl-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-wsdl-3.1.4.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="cxf-services-sts-core-3.1.4"
|
||||
MODULE="cxf-services-sts-core-3.1.4.jar"
|
||||
MVN="mvn:org.talend.libraries/cxf-services-sts-core-3.1.4/6.1.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-services-sts-core-3.1.4.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-core-2.2.11"
|
||||
@@ -333,6 +352,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-core-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-core-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jaxb-impl-2.2.11"
|
||||
@@ -340,6 +360,7 @@
|
||||
MVN="mvn:org.talend.libraries/jaxb-impl-2.2.11/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/jaxb-impl-2.2.11.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="neethi-3.0.3"
|
||||
@@ -347,42 +368,49 @@
|
||||
MVN="mvn:org.talend.libraries/neethi-3.0.3/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/neethi-3.0.3.jar"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-bindings-2.1.1"
|
||||
MODULE="wss4j-bindings-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-bindings-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-bindings-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-policy-2.1.1"
|
||||
MODULE="wss4j-policy-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-policy-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-policy-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-common-2.1.1"
|
||||
MODULE="wss4j-ws-security-common-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-common-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-common-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-dom-2.1.1"
|
||||
MODULE="wss4j-ws-security-dom-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-dom-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-dom-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-policy-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-policy-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-policy-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="wss4j-ws-security-stax-2.1.1"
|
||||
MODULE="wss4j-ws-security-stax-2.1.1.jar"
|
||||
MVN="mvn:org.talend.libraries/wss4j-ws-security-stax-2.1.1/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/wss4j-ws-security-stax-2.1.1.jar"
|
||||
BundleID=""
|
||||
/>
|
||||
<!-- Jars for cxf end -->
|
||||
</IMPORTS>
|
||||
|
||||
@@ -1,46 +1,36 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
LogUtil logUtil = new LogUtil(node);
|
||||
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
|
||||
boolean close = ("true").equals(ElementParameterParser.getValue(node,"__CLOSE__"));
|
||||
|
||||
String mdmTransaction = "mdmTransaction_" + connection;
|
||||
|
||||
String conn = "";
|
||||
String cid = node.getUniqueName();
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
boolean close = ("true").equals(ElementParameterParser.getValue(node,"__CLOSE__"));
|
||||
String conn = "TMDMService_" + connection;
|
||||
String trans = "mdmTrans_" + connection;
|
||||
%>
|
||||
|
||||
<%conn = "TMDMService_" + connection;%>
|
||||
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get("<%=conn%>");
|
||||
String transKey_<%=cid %> = "<%=trans%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid %> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get(transKey_<%=cid %>);
|
||||
if(mdmTransaction_<%=cid %> != null) {
|
||||
<% logUtil.info("\"Attempt to rollback transaction .\"");%>
|
||||
mdmTransaction_<%=cid %>.rollback();
|
||||
<% logUtil.info("\"Transaction rollback successfully with key=\" + transKey_" + cid);%>
|
||||
}
|
||||
|
||||
if(service_<%=cid %> != null)
|
||||
{
|
||||
com.talend.mdm.transaction.client.MDMTransaction mdmTransaction_<%=cid%> = (com.talend.mdm.transaction.client.MDMTransaction)globalMap.get("<%=mdmTransaction%>");
|
||||
if(mdmTransaction_<%=cid%>!=null) {
|
||||
|
||||
<% logUtil.info("\"Attempt to rollback transaction .\"");%>
|
||||
|
||||
mdmTransaction_<%=cid%>.rollback();
|
||||
|
||||
<% logUtil.info("\"Transaction rollback successfully.\"");%>
|
||||
}
|
||||
<% if(close){%>
|
||||
<% logUtil.debug("\"Closing connection to MDM server.\"");%>
|
||||
|
||||
<% if(close) { %>
|
||||
String connKey_<%=cid %> = "<%=conn%>_" + Thread.currentThread().getThreadGroup().getName();
|
||||
org.talend.mdm.webservice.TMDMService service_<%=cid %> = (org.talend.mdm.webservice.TMDMService)globalMap.get(connKey_<%=cid %>);
|
||||
if(service_<%=cid %> != null) {
|
||||
service_<%=cid %>.logout(new org.talend.mdm.webservice.WSLogout());
|
||||
|
||||
<% }%>
|
||||
}
|
||||
<% logUtil.debug("\"Close service successfully with key=\" + connKey_" + cid);%>
|
||||
}
|
||||
<% } %>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user