Compare commits
40 Commits
hwang/TUP-
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3114f33fe | ||
|
|
24ef38e2da | ||
|
|
190acc37f8 | ||
|
|
c9dd09c733 | ||
|
|
263b021fca | ||
|
|
76fbb18558 | ||
|
|
d89f4d424f | ||
|
|
c8b397b4a6 | ||
|
|
bd0d7e0afd | ||
|
|
f36de6e55a | ||
|
|
a5a41af6cf | ||
|
|
c5b23dd28f | ||
|
|
fec8a84ca1 | ||
|
|
f77ff96de2 | ||
|
|
df4e255819 | ||
|
|
5cf8a97e87 | ||
|
|
792b1ccc01 | ||
|
|
6507179daa | ||
|
|
3627e9fc1f | ||
|
|
572f642911 | ||
|
|
e06da9671f | ||
|
|
dc1ec06b42 | ||
|
|
7dfac8dc4f | ||
|
|
f398c2d5f8 | ||
|
|
67a155faa3 | ||
|
|
8fe63a7afc | ||
|
|
52665b6347 | ||
|
|
1dfd7ea0ec | ||
|
|
7b35b37054 | ||
|
|
d99fd9c2e5 | ||
|
|
072795ea1b | ||
|
|
ceb555dc51 | ||
|
|
67fb0f4d12 | ||
|
|
47deaa8326 | ||
|
|
94128e4cbf | ||
|
|
935b6c3996 | ||
|
|
08b538ff57 | ||
|
|
033fd28354 | ||
|
|
00505282ac | ||
|
|
c33d8c379b |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</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>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -773,6 +773,25 @@ if(execStat) {
|
||||
|
||||
startTime = System.currentTimeMillis();
|
||||
<%
|
||||
|
||||
boolean isCustomProxySettingsUsed = false;
|
||||
List<? extends INode> proxyNodes = process.getNodesOfType("tSetProxy");
|
||||
for (int i = 0; i < proxyNodes.size(); i++) {
|
||||
INode proxyNode = proxyNodes.get(i);
|
||||
String useCustomProxyCheckboxValue = ElementParameterParser.getValue(proxyNode, "__PROXY_GLOBAL__");
|
||||
|
||||
if (useCustomProxyCheckboxValue != null && !"true".equals(useCustomProxyCheckboxValue)) {
|
||||
isCustomProxySettingsUsed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isCustomProxySettingsUsed) {
|
||||
%>
|
||||
java.net.ProxySelector proxySelectorOnStartJob = java.net.ProxySelector.getDefault();
|
||||
<%
|
||||
}
|
||||
|
||||
//1. send the begin msg
|
||||
|
||||
for (INode statCatcherNode : process.getNodesOfType("tStatCatcher")) {
|
||||
@@ -995,6 +1014,13 @@ this.globalResumeTicket = true;//to run tPostJob
|
||||
|
||||
<%= ElementParameterParser.getValue(process, "__FOOTER_CODE__")%>
|
||||
|
||||
<%
|
||||
if (isCustomProxySettingsUsed) {
|
||||
%>
|
||||
java.net.ProxySelector.setDefault(proxySelectorOnStartJob);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
end = System.currentTimeMillis();
|
||||
|
||||
if (watch) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -94,7 +94,7 @@ public class JavaRoutineSynchronizer extends AbstractRoutineSynchronizer {
|
||||
|
||||
private void syncRoutineItems(Collection<RoutineItem> routineObjects, boolean forceUpdate) throws SystemException {
|
||||
for (RoutineItem routineItem : routineObjects) {
|
||||
syncRoutine(routineItem, true, true, forceUpdate);
|
||||
syncRoutine(routineItem, true, forceUpdate);
|
||||
}
|
||||
syncSystemRoutine(ProjectManager.getInstance().getCurrentProject());
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -63,7 +63,6 @@ import org.talend.designer.components.exchange.model.ExchangePackage;
|
||||
import org.talend.designer.components.exchange.model.RevisionInfo;
|
||||
import org.talend.designer.components.exchange.model.VersionRevision;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.thread.TimeoutManager;
|
||||
|
||||
/**
|
||||
* DOC hcyi class global comment. Detailled comment
|
||||
@@ -150,16 +149,6 @@ public class ExchangeUtils {
|
||||
|
||||
public static String sendGetRequest(String urlAddress) throws Exception {
|
||||
HttpClient httpclient = new HttpClient();
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
GetMethod getMethod = new GetMethod(urlAddress);
|
||||
TransportClientProperties tcp = TransportClientPropertiesFactory.create("http");
|
||||
if (tcp.getProxyHost().length() != 0) {
|
||||
@@ -180,14 +169,6 @@ public class ExchangeUtils {
|
||||
|
||||
public static String sendPostRequest(String urlAddress, Map<String, String> parameters) throws Exception {
|
||||
HttpClient httpclient = new HttpClient();
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
PostMethod postMethod = new PostMethod(urlAddress);
|
||||
if (parameters != null) {
|
||||
NameValuePair[] postData = new NameValuePair[parameters.size()];
|
||||
|
||||
@@ -71,28 +71,12 @@ public class RestClient {
|
||||
public RestClient() {
|
||||
PoolingClientConnectionManager conMan = getConnectionManager();
|
||||
httpClient = new DefaultHttpClient(conMan);
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
this.bonitaURI = BONITA_URI;
|
||||
}
|
||||
|
||||
public RestClient(String bonitaURI) {
|
||||
PoolingClientConnectionManager conMan = getConnectionManager();
|
||||
httpClient = new DefaultHttpClient(conMan);
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
this.bonitaURI = bonitaURI;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,16 +26,6 @@ public class MDMTransaction {
|
||||
|
||||
public void commit() throws IOException {
|
||||
HttpClient client = new HttpClient();
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
|
||||
|
||||
HttpMethod method = new PostMethod(url + "/" + id);
|
||||
@@ -61,16 +51,6 @@ public class MDMTransaction {
|
||||
|
||||
public void rollback() throws IOException {
|
||||
HttpClient client = new HttpClient();
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
|
||||
|
||||
HttpMethod method = new DeleteMethod(url + "/" + id);
|
||||
|
||||
@@ -18,16 +18,6 @@ public class MDMTransactionClient {
|
||||
|
||||
public static MDMTransaction newTransaction(String url, String username, String password) throws IOException {
|
||||
HttpClient client = new HttpClient();
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
|
||||
client.getParams().setAuthenticationPreemptive(true);
|
||||
|
||||
@@ -88,15 +78,6 @@ public class MDMTransactionClient {
|
||||
HttpClient client = new HttpClient();
|
||||
client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
|
||||
client.getParams().setAuthenticationPreemptive(true);
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
GetMethod get = new GetMethod(url);
|
||||
get.setDoAuthentication(true);
|
||||
|
||||
@@ -142,14 +142,6 @@ public class paloconnection {
|
||||
|
||||
ClientConnectionManager connMgr = new ThreadSafeClientConnManager(params, supportedSchemes);
|
||||
paloHttpClient = new DefaultHttpClient(connMgr, params);
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
paloHttpClient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
paloHttpClient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
}
|
||||
|
||||
private void pingPaloServer() {
|
||||
|
||||
@@ -37,15 +37,6 @@ public class Util {
|
||||
new org.apache.http.auth.AuthScope(new org.apache.http.HttpHost("sandbox.service-now.com")), new org.apache.http.auth.UsernamePasswordCredentials("talend", "talend")
|
||||
);
|
||||
client = org.apache.http.impl.client.HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
|
||||
//get metadata
|
||||
Util util = new Util(client,"https://sandbox.service-now.com");
|
||||
|
||||
@@ -181,14 +181,7 @@ public final class DeviceIdManager {
|
||||
params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 180000);
|
||||
|
||||
HttpClient client = new SystemDefaultHttpClient(params);
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
client.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
|
||||
// Uncomment following lines to view the traffic in fiddler.
|
||||
// HttpHost proxy = new HttpHost("localhost", 8888);
|
||||
// client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend-proxy</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<releases><enabled>false</enabled></releases>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
public class ProxyCreds {
|
||||
private Pair<String, String> credPair;
|
||||
|
||||
public ProxyCreds(String userName, String pass) {
|
||||
this.credPair = new ImmutablePair<>(userName, pass);
|
||||
}
|
||||
|
||||
public String getUser() {
|
||||
return credPair.getKey();
|
||||
}
|
||||
|
||||
public String getPass() {
|
||||
return credPair.getValue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import java.net.Proxy;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* Use only inside of ThreadLocal
|
||||
*/
|
||||
public class ProxyHolder {
|
||||
private Map<String, Proxy> proxyMap;
|
||||
|
||||
public ProxyHolder() {
|
||||
proxyMap = new HashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param proxy HTTP or SOCKS proxy instance to use
|
||||
* @param host without protocol
|
||||
* @param port -1 to apply proxy for every port
|
||||
*/
|
||||
public void putNewHost(Proxy proxy, String host, int port) {
|
||||
if (port != -1) {
|
||||
proxyMap.put(host + ":" + port, proxy);
|
||||
} else {
|
||||
proxyMap.put(host, proxy);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Proxy> getProxyMap() {
|
||||
return proxyMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import java.net.Authenticator;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TalendProxyAuthenticator extends Authenticator {
|
||||
private static TalendProxyAuthenticator instance;
|
||||
|
||||
public static synchronized TalendProxyAuthenticator getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new TalendProxyAuthenticator();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private TalendProxyAuthenticator() {
|
||||
}
|
||||
|
||||
private Map<String, ProxyCreds> proxyCredsMap = new HashMap<>();
|
||||
|
||||
public synchronized void addAuthForProxy(String host, String port, String userName, String pass) {
|
||||
proxyCredsMap.put(host + ":" + port, new ProxyCreds(userName, pass));
|
||||
}
|
||||
|
||||
public synchronized ProxyCreds getCredsForProxyURI(String proxyURI) {
|
||||
return proxyCredsMap.get(proxyURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized PasswordAuthentication getPasswordAuthentication() {
|
||||
String requestURI = super.getRequestingHost() + ":" + super.getRequestingPort();
|
||||
if (proxyCredsMap.containsKey(requestURI)) {
|
||||
return new PasswordAuthentication(proxyCredsMap.get(requestURI).getUser(), proxyCredsMap.get(requestURI).getPass().toCharArray());
|
||||
} else {
|
||||
return super.getPasswordAuthentication(); //don't use authentication
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Proxy;
|
||||
import java.net.ProxySelector;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class TalendProxySelector extends ProxySelector {
|
||||
private static TalendProxySelector instance;
|
||||
|
||||
private static final Logger log = Logger.getLogger(TalendProxySelector.class);
|
||||
|
||||
private ThreadLocal<ProxyHolder> threadLocalProxyHolder;
|
||||
private ProxyHolder globalProxyHolder;
|
||||
|
||||
public static synchronized TalendProxySelector getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new TalendProxySelector();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private TalendProxySelector() {
|
||||
globalProxyHolder = new ProxyHolder();
|
||||
}
|
||||
|
||||
public synchronized void addProxySettings(Proxy proxy, boolean threadSpecific, String host, int port) {
|
||||
if (threadSpecific) {
|
||||
if (threadLocalProxyHolder == null) {
|
||||
threadLocalProxyHolder = new ThreadLocal<>();
|
||||
}
|
||||
if (threadLocalProxyHolder.get() == null) {
|
||||
ProxyHolder newProxyHolder = new ProxyHolder();
|
||||
threadLocalProxyHolder.set(newProxyHolder);
|
||||
}
|
||||
|
||||
threadLocalProxyHolder.get().putNewHost(proxy, host, port);
|
||||
} else {
|
||||
globalProxyHolder.putNewHost(proxy, host, port);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and return proxy was set for specific host
|
||||
* @param uriString host:port
|
||||
* @return Optional of Proxy if such proxy setting was set
|
||||
*/
|
||||
public synchronized Proxy getProxyForUriString(String uriString) {
|
||||
if (proxyHolderContainsHost(globalProxyHolder, uriString)) {
|
||||
log.debug("All threads proxy " + globalProxyHolder.getProxyMap().get(uriString) + " is using to connect to URI " + uriString);
|
||||
return globalProxyHolder.getProxyMap().containsKey(uriString) ? globalProxyHolder.getProxyMap().get(uriString) :
|
||||
globalProxyHolder.getProxyMap().get(uriString.substring(0, uriString.lastIndexOf(":")));
|
||||
} else if (threadLocalProxyHolder != null && proxyHolderContainsHost(threadLocalProxyHolder.get(), uriString)) {
|
||||
log.debug("Proxy " + threadLocalProxyHolder.get().getProxyMap().get(uriString) + " is using to connect to URI " + uriString);
|
||||
return threadLocalProxyHolder.get().getProxyMap().containsKey(uriString) ?
|
||||
threadLocalProxyHolder.get().getProxyMap().get(uriString) :
|
||||
threadLocalProxyHolder.get().getProxyMap().get(uriString.substring(0, uriString.lastIndexOf(":")));
|
||||
} else {
|
||||
log.debug("No proxy is using to connect to URI " + uriString);
|
||||
return Proxy.NO_PROXY;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(URI uri) {
|
||||
String uriString = uri.getHost();
|
||||
if (uri.getPort() != -1) {
|
||||
uriString += ":" + uri.getPort() ;
|
||||
}
|
||||
log.debug("Network request hadling from Talend proxy selector. Thread " + Thread.currentThread().getName() + ". URI to connect: " + uriString);
|
||||
return Collections.singletonList(getProxyForUriString(uriString));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
|
||||
if (ioe != null) {
|
||||
log.warn("Connect failed when use Talend ProxySelector to the URI:" + uri.toString(), ioe);
|
||||
} else {
|
||||
log.warn("Connect failed when use Talend ProxySelector to the " + uri);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean proxyHolderContainsHost(ProxyHolder holder, String uriString) {
|
||||
return holder != null &&
|
||||
(holder.getProxyMap().containsKey(uriString)
|
||||
|| (uriString.contains(":") && holder.getProxyMap().containsKey(uriString.substring(0, uriString.indexOf(":")))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,15 +140,6 @@ public class WSDLLocatorImpl implements WSDLLocator {
|
||||
httpClient.getState().setProxyCredentials(AuthScope.ANY, credentials);
|
||||
httpClient.getHostConfiguration().setProxy(configuration.getProxyServer(), configuration.getProxyPort());
|
||||
}
|
||||
|
||||
if(TimeoutManager.getSocketTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.SOCKET_TIMEOUT,
|
||||
TimeoutManager.getSocketTimeout());
|
||||
}
|
||||
if(TimeoutManager.getConnectionTimeout() != null) {
|
||||
httpclient.getParams().setIntParameter(TimeoutManager.CONNECTION_TIMEOUT,
|
||||
TimeoutManager.getConnectionTimeout());
|
||||
}
|
||||
return httpClient;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -45,8 +45,8 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
|
||||
java.lang.StringBuilder sb<%=cid %>=new java.lang.StringBuilder("");
|
||||
|
||||
try{
|
||||
br<%=cid %> = new java.io.BufferedReader(new java.io.InputStreamReader(url<%=cid %>.openStream()));
|
||||
|
||||
br<%=cid %> = new java.io.BufferedReader(new UnicodeReader(url<%=cid %>.openStream(), null));
|
||||
|
||||
char[] buffer<%=cid %> = new char[1024];
|
||||
int length<%=cid %> = -1;
|
||||
while ((length<%=cid %> = br<%=cid %>.read(buffer<%=cid %>)) != -1)
|
||||
@@ -66,7 +66,9 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
|
||||
dbf<%=cid %> = javax.xml.parsers.DocumentBuilderFactory.newInstance();
|
||||
dbf<%=cid %>.setValidating(false);
|
||||
db<%=cid %> = dbf<%=cid %>.newDocumentBuilder();
|
||||
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(new java.io.StringBufferInputStream(sb<%=cid%>.toString()));
|
||||
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(
|
||||
new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8")));
|
||||
|
||||
String rootnode<%=cid %>=doc<%=cid %>.getDocumentElement().getNodeName();
|
||||
|
||||
String encoding=null;
|
||||
@@ -89,8 +91,8 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
|
||||
|
||||
int offsetRoot<%=cid %>=sb<%=cid %>.indexOf("<"+rootnode<%=cid %>);
|
||||
sb<%=cid%>.replace(0, offsetRoot<%=cid %>, reference<%=cid %>);
|
||||
is<%=cid %>=new java.io.StringBufferInputStream(sb<%=cid %>.toString());
|
||||
|
||||
is<%=cid %> = new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8"));
|
||||
|
||||
class MyHandler<%=cid %> extends org.xml.sax.helpers.DefaultHandler{
|
||||
String errorMessage = null;
|
||||
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true')"/>
|
||||
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true')" />
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar" MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819" REQUIRED_IF="(FTPS == 'true')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -291,6 +291,7 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS />
|
||||
|
||||
@@ -310,6 +310,7 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -354,6 +354,7 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -272,6 +272,7 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -261,6 +261,7 @@ COMPATIBILITY="ALL"
|
||||
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
|
||||
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
|
||||
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((FTPS == 'true') OR (SFTP == 'true'))" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -35,7 +35,7 @@ TRIMSELECT.ITEM.TRIM=Trim
|
||||
TRIMSELECT.NAME=Check column to trim
|
||||
UNCOMPRESS.NAME=Uncompress as zip file
|
||||
SCHEMA_OPT_NUM.NAME=Min column number of optimize code
|
||||
ENABLE_DECODE.NAME=Decode String for long, int, short, byte Types
|
||||
ENABLE_DECODE.NAME=Permit hexadecimal (0xNNN) or octal (0NNNN) for numeric types - it will act the opposite for Byte
|
||||
DECODE_COLS.NAME=Decode table
|
||||
DECODE_COLS.ITEM.DECODE=Enable Decode
|
||||
TEMP_DIR.NAME=Temporary directory
|
||||
|
||||
@@ -44,7 +44,7 @@ List<Map<String, String>> spArgs =
|
||||
(List<Map<String, String>>) ElementParameterParser.getObjectValue(node, "__SP_ARGS__");
|
||||
|
||||
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
|
||||
// La TZ n'est compatible qu'avec ojdbc8, qui n'est reliee qu'avec ORACLE 18 (tOracle_SP.xml).
|
||||
// TimeZone is only compatible with ojdbc8 which is only link with ORACLE 18 (tOracle_SP.xml).
|
||||
boolean isTimeZoneCompatible = "ORACLE_18".equals(dbVersion);
|
||||
|
||||
// Functions have an additionnal output parameter
|
||||
@@ -167,7 +167,7 @@ if (canGenerate) {
|
||||
// Note: first argument in JDBC is arg #1, and for functions, arg #1 is return value
|
||||
int argIndex = i + 1;
|
||||
%>
|
||||
// traitement de l'argument <%= argIndex %> type '<%= dbType %>'
|
||||
// code for the argument <%= argIndex %> (<%=argName%>) of type '<%=argType%> <%= dbType %>'
|
||||
<%
|
||||
|
||||
// Input argument
|
||||
@@ -213,7 +213,7 @@ if (canGenerate) {
|
||||
statement_<%=cid%>.setTimestamp(<%=argIndex%>, new java.sql.Timestamp(<%=inConnectionName%>.<%=argName%>.getTime()));
|
||||
<%
|
||||
}
|
||||
else if ("DATE".equals(dbType)) { %>
|
||||
else if ("DATE".equals(dbType) || "AUTOMAPPING".equals(dbType)) { %>
|
||||
statement_<%=cid%>.setDate(<%=argIndex%>, new java.sql.Date(<%=inConnectionName%>.<%=argName%>.getTime()));
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.core.model.metadata.MetadataTalendType
|
||||
org.talend.core.model.metadata.MappingTypeRetriever
|
||||
org.talend.core.model.utils.NodeUtil
|
||||
java.util.List
|
||||
java.util.ArrayList
|
||||
java.util.Map
|
||||
@@ -29,6 +30,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
String jdbcUrl = ElementParameterParser.getValue(node, "__JDBC_URL__");
|
||||
|
||||
boolean useExistingConnection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean useExistingS3Connection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION_S3__"));
|
||||
String s3ConnectionCid = ElementParameterParser.getValue(node,"__CONNECTION_S3__");
|
||||
INode current_node = node;
|
||||
if(useExistingS3Connection){
|
||||
current_node = NodeUtil.getNodeByUniqueName(node.getProcess(),s3ConnectionCid,true);
|
||||
}
|
||||
List<IMetadataColumn> columnList = getColumnList(node);
|
||||
%>
|
||||
String dbschema_<%=cid%> = null;
|
||||
@@ -207,7 +215,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
.append(" FROM '");
|
||||
<%
|
||||
<%
|
||||
boolean assumeRole = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__ASSUME_ROLE__"));
|
||||
String access_key = ElementParameterParser.getValue(node, "__ACCESS_KEY__");
|
||||
String passwordFieldKey = "__SECRET_KEY__";
|
||||
if(emrMode) {
|
||||
@@ -220,14 +229,23 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
access_key = ElementParameterParser.getValue(node, "__ACCESS_KEY_SSH__");
|
||||
passwordFieldKey = "__SECRET_KEY_SSH__";
|
||||
}
|
||||
if(useExistingS3Connection && !assumeRole){
|
||||
access_key = ElementParameterParser.getValue(current_node, "__ACCESS_KEY__");
|
||||
passwordFieldKey = "__SECRET_KEY__";
|
||||
}
|
||||
%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, passwordFieldKey)) {%>
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldKey)%>);
|
||||
<%} else {%>
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldKey)%>;
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
if(!assumeRole) {
|
||||
if (ElementParameterParser.canEncrypt(current_node, passwordFieldKey)) {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, passwordFieldKey)%>);
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(current_node, passwordFieldKey)%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(avroMode) {
|
||||
String avro_mapping = ElementParameterParser.getValue(node, "__JSON_MAPPING__");
|
||||
%>
|
||||
@@ -271,7 +289,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
.append("' credentials '")
|
||||
<%
|
||||
boolean assumeRole = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__ASSUME_ROLE__"));
|
||||
if(assumeRole){
|
||||
List<Map<String,String>> roles = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__ROLE_TABLE__");
|
||||
int roleListSize=roles.size();
|
||||
@@ -298,19 +315,24 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
boolean encrypt = "true".equals(ElementParameterParser.getValue(node, "__ENCRYPT__"));
|
||||
encrypt = encrypt && s3Mode;
|
||||
String encryptionKeyPropertyName = "__ENCRYPTED_KEY__";
|
||||
if(useExistingS3Connection){
|
||||
encrypt = "true".equals(ElementParameterParser.getValue(current_node, "__ENCRYPT__"));
|
||||
encryptionKeyPropertyName = "__ENCRYPTED_KEY_BASE64__";
|
||||
}else{
|
||||
encrypt = encrypt && s3Mode;
|
||||
}
|
||||
if(encrypt) {
|
||||
String encryptionKeyPropertyName = "__ENCRYPTED_KEY__";
|
||||
%>
|
||||
.append(";master_symmetric_key=")
|
||||
<%
|
||||
if (ElementParameterParser.canEncrypt(node, encryptionKeyPropertyName)) {
|
||||
if (ElementParameterParser.canEncrypt(current_node, encryptionKeyPropertyName)) {
|
||||
%>
|
||||
.append(routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, encryptionKeyPropertyName)%>))
|
||||
.append(routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, encryptionKeyPropertyName)%>))
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
.append(<%=ElementParameterParser.getValue(node, encryptionKeyPropertyName)%>)
|
||||
.append(<%=ElementParameterParser.getValue(current_node, encryptionKeyPropertyName)%>)
|
||||
<%
|
||||
}
|
||||
}
|
||||
@@ -367,13 +389,33 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
|
||||
boolean regionAdded = false;
|
||||
if(useExistingS3Connection) {
|
||||
String regionS3 = ElementParameterParser.getValue(current_node, "__REGION__");
|
||||
boolean set_regionS3 = (regionS3!=null && !regionS3.isEmpty() && !"DEFAULT".equalsIgnoreCase(regionS3));
|
||||
if(set_regionS3) {
|
||||
regionAdded = true;
|
||||
%>
|
||||
command_<%=cid%>.append("REGION '").append(<%=regionS3%>).append("' ");
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
boolean isSetMaxError = false;
|
||||
final List<Map<String, String>> settings = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__OTHER_CONFIGURATION__");
|
||||
if(settings!=null && !settings.isEmpty()) {
|
||||
for(Map<String, String> parameter : settings) {
|
||||
String parameterKey = parameter.get("OTHER_PARAMETER");
|
||||
String value = parameter.get("DATA_VALUE");
|
||||
if("REGION,NULL".contains(parameterKey)) {
|
||||
if("REGION".equals(parameterKey) && !regionAdded || "NULL".equals(parameterKey)) {
|
||||
if(useExistingS3Connection) {
|
||||
String regionS3 = ElementParameterParser.getValue(current_node, "__REGION__");
|
||||
boolean set_regionS3 = (regionS3!=null && !regionS3.isEmpty() && !"DEFAULT".equalsIgnoreCase(regionS3));
|
||||
if(set_regionS3) {
|
||||
parameterKey = "REGION";
|
||||
value = regionS3;
|
||||
}
|
||||
}
|
||||
%>
|
||||
command_<%=cid%>.append("<%=parameterKey%> '").append(<%=value%>).append("' ");
|
||||
<%
|
||||
|
||||
@@ -133,13 +133,21 @@
|
||||
</PARAMETER>
|
||||
|
||||
<!-- S3 -->
|
||||
<PARAMETER NAME="USE_EXISTING_CONNECTION_S3" FIELD="CHECK"
|
||||
NUM_ROW="46" GROUP="S3_CONFIG" SHOW_IF="(DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION_S3" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tS3Connection"
|
||||
NUM_ROW="46" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'true') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')" GROUP="S3_CONFIG"/>
|
||||
|
||||
<PARAMETER NAME="ACCESS_KEY" FIELD="TEXT" NUM_ROW="50"
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SECRET_KEY" FIELD="PASSWORD" NUM_ROW="50"
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -223,6 +231,7 @@
|
||||
NUM_ROW="100"
|
||||
REQUIRED="true"
|
||||
GROUP="REDSHIFT_IAM_CONFIG"
|
||||
NOT_SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'true') AND (DATA_SOURCE_TYPE == 'S3')"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -287,7 +296,7 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPT" FIELD="CHECK" NUM_ROW="23"
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="DATA_SOURCE_TYPE == 'S3'">
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="(USE_EXISTING_CONNECTION_S3 =='false') AND (DATA_SOURCE_TYPE == 'S3')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
@@ -113,6 +113,8 @@ OTHER_CONFIGURATION.ITEM.DATA_VALUE=Value
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
BUCKET.NAME=Bucket
|
||||
|
||||
@@ -36,15 +36,21 @@
|
||||
conn_<%=cid%>.putObject(<%=bucket%>, <%=key%>, file_<%=cid%>);
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
%>
|
||||
log.info("<%=cid%> - Upload the object successfully.");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
} finally {
|
||||
if(conn_<%=cid%> !=null){
|
||||
conn_<%=cid%>.shutdown();
|
||||
<%
|
||||
if(("false").equals(useExistingConn)){
|
||||
%>
|
||||
if(conn_<%=cid%> !=null){
|
||||
conn_<%=cid%>.shutdown();
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
} else {
|
||||
<%
|
||||
|
||||
@@ -53,21 +53,29 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPT" FIELD="CHECK" NUM_ROW="45"
|
||||
REQUIRED="true" GROUP="DATA_FILE_CONFIG">
|
||||
REQUIRED="true" GROUP="DATA_FILE_CONFIG" SHOW_IF="USE_EXISTING_CONNECTION =='false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPTED_KEY" FIELD="PASSWORD" NUM_ROW="45"
|
||||
REQUIRED="true" GROUP="DATA_FILE_CONFIG" SHOW_IF="ENCRYPT=='true'">
|
||||
REQUIRED="true" GROUP="DATA_FILE_CONFIG" SHOW_IF="isShow[ENCRYPT] AND (ENCRYPT=='true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_EXISTING_CONNECTION" FIELD="CHECK"
|
||||
NUM_ROW="46" GROUP="S3_CONFIG">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tS3Connection"
|
||||
NUM_ROW="46" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" GROUP="S3_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -78,7 +86,7 @@
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -90,6 +98,7 @@
|
||||
NUM_ROW="55"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -100,6 +109,7 @@
|
||||
NUM_ROW="60"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -109,7 +119,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="65"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -120,7 +130,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="70"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -131,7 +141,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="75"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -143,7 +153,9 @@
|
||||
RAW="true"
|
||||
NUM_ROW="80"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG">
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
@@ -175,7 +187,7 @@
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="85"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -32,6 +32,8 @@ ENCODING.ITEM.UTF16BE=UTF16BE
|
||||
|
||||
SCHEMA.NAME=Schema
|
||||
|
||||
USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
||||
CONNECTION.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
BUCKET.NAME=Bucket
|
||||
|
||||
@@ -124,12 +124,20 @@
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_EXISTING_CONNECTION_S3" FIELD="CHECK"
|
||||
NUM_ROW="46" GROUP="S3_CONFIG">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION_S3" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tS3Connection"
|
||||
NUM_ROW="46" SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'true'" GROUP="S3_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -140,7 +148,7 @@
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="INHERIT_CREDENTIALS == 'false'"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (INHERIT_CREDENTIALS == 'false')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -152,6 +160,7 @@
|
||||
NUM_ROW="55"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'false'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -162,6 +171,7 @@
|
||||
NUM_ROW="60"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'false'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -171,7 +181,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="65"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE_S3 == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE_S3] AND (ASSUME_ROLE_S3 == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -182,7 +192,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="70"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE_S3 == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE_S3] AND (ASSUME_ROLE_S3 == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -193,7 +203,7 @@
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="75"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE_S3 == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE_S3] AND (ASSUME_ROLE_S3 == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -204,7 +214,7 @@
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="80"
|
||||
NB_LINES="5"
|
||||
SHOW_IF="ASSUME_ROLE_S3 == 'true'"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
</PARAMETER>
|
||||
@@ -225,7 +235,9 @@
|
||||
RAW="true"
|
||||
NUM_ROW="90"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG">
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'false'"
|
||||
>
|
||||
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
@@ -314,12 +326,12 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPT" FIELD="CHECK" NUM_ROW="21"
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS">
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPTED_KEY" FIELD="PASSWORD" NUM_ROW="21"
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="ENCRYPT=='true'">
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="isShow[ENCRYPT] AND (ENCRYPT=='true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -477,6 +489,10 @@
|
||||
<TEMPLATE_PARAM SOURCE="self.ASSUME_ROLE_REDSHIFT" TARGET="tRBE.ASSUME_ROLE" />
|
||||
<TEMPLATE_PARAM SOURCE="self.ROLE_TABLE" TARGET="tRBE.ROLE_TABLE" />
|
||||
|
||||
<TEMPLATE_PARAM SOURCE="self.USE_EXISTING_CONNECTION_S3" TARGET="tRBE.USE_EXISTING_CONNECTION_S3" />
|
||||
<TEMPLATE_PARAM SOURCE="self.CONNECTION_S3" TARGET="tRBE.CONNECTION_S3" />
|
||||
<TEMPLATE_PARAM SOURCE="self.USE_EXISTING_CONNECTION_S3" TARGET="tROB.USE_EXISTING_CONNECTION" />
|
||||
<TEMPLATE_PARAM SOURCE="self.CONNECTION_S3" TARGET="tROB.CONNECTION" />
|
||||
<TEMPLATE_PARAM SOURCE="self.ACCESS_KEY" TARGET="tROB.ACCESS_KEY" />
|
||||
<TEMPLATE_PARAM SOURCE="self.SECRET_KEY" TARGET="tROB.SECRET_KEY" />
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ OTHER_CONFIGURATION.ITEM.DATA_VALUE=Value
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
BUCKET.NAME=Bucket
|
||||
|
||||
@@ -32,6 +32,13 @@ imports="
|
||||
dbquery = org.talend.core.model.utils.NodeUtil.replaceCRLFInMEMO_SQL(dbquery);
|
||||
|
||||
boolean useExistingConnection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean useExistingS3Connection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION_S3__"));
|
||||
String s3ConnectionCid = ElementParameterParser.getValue(node,"__CONNECTION_S3__");
|
||||
INode current_node = node;
|
||||
if(useExistingS3Connection){
|
||||
current_node = NodeUtil.getNodeByUniqueName(node.getProcess(),s3ConnectionCid,true);
|
||||
}
|
||||
%>
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
<%
|
||||
@@ -120,18 +127,21 @@ imports="
|
||||
|
||||
boolean assumeRole = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__ASSUME_ROLE__"));
|
||||
String access_key = ElementParameterParser.getValue(node, "__ACCESS_KEY__");
|
||||
if(useExistingS3Connection){
|
||||
access_key = ElementParameterParser.getValue(current_node, "__ACCESS_KEY__");
|
||||
}
|
||||
if(!assumeRole){
|
||||
String passwordFieldKey = "__SECRET_KEY__";
|
||||
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldKey)) {
|
||||
if (ElementParameterParser.canEncrypt(current_node, passwordFieldKey)) {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldKey)%>);
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, passwordFieldKey)%>);
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldKey)%>;
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(current_node, passwordFieldKey)%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
command_<%=cid%>.append("'s3://").append(<%=bucket%>).append("/").append(<%=keyPrefix%>).append("' ")
|
||||
@@ -163,18 +173,22 @@ imports="
|
||||
<%
|
||||
}
|
||||
boolean encrypt = "true".equals(ElementParameterParser.getValue(node, "__ENCRYPT__"));
|
||||
String encryptionKeyPropertyName = "__ENCRYPTED_KEY__";
|
||||
if(useExistingS3Connection){
|
||||
encrypt = "true".equals(ElementParameterParser.getValue(current_node, "__ENCRYPT__"));
|
||||
encryptionKeyPropertyName = "__ENCRYPTED_KEY_BASE64__";
|
||||
}
|
||||
if(encrypt) {
|
||||
String encryptionKeyPropertyName = "__ENCRYPTED_KEY__";
|
||||
%>
|
||||
.append(";master_symmetric_key=")
|
||||
<%
|
||||
if (ElementParameterParser.canEncrypt(node, encryptionKeyPropertyName)) {
|
||||
if (ElementParameterParser.canEncrypt(current_node, encryptionKeyPropertyName)) {
|
||||
%>
|
||||
.append(routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, encryptionKeyPropertyName)%>))
|
||||
.append(routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, encryptionKeyPropertyName)%>))
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
.append(<%=ElementParameterParser.getValue(node, encryptionKeyPropertyName)%>)
|
||||
.append(<%=ElementParameterParser.getValue(current_node, encryptionKeyPropertyName)%>)
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,13 +114,21 @@
|
||||
SHOW="false">
|
||||
<DEFAULT>redshift_id</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER NAME="USE_EXISTING_CONNECTION_S3" FIELD="CHECK"
|
||||
NUM_ROW="46" GROUP="S3_CONFIG" SHOW_IF="ASSUME_ROLE == 'false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION_S3" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tS3Connection"
|
||||
NUM_ROW="46" SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'true'" GROUP="S3_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="ACCESS_KEY"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
NOT_SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
NOT_SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'true') OR isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -131,7 +139,7 @@
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="50"
|
||||
REQUIRED="true"
|
||||
NOT_SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
NOT_SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'true') OR isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
GROUP="S3_CONFIG"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -143,6 +151,7 @@
|
||||
NUM_ROW="60"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
NOT_SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'true'"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -221,12 +230,12 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPT" FIELD="CHECK" NUM_ROW="35"
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS">
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" NOT_SHOW_IF="USE_EXISTING_CONNECTION_S3 == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCRYPTED_KEY" FIELD="PASSWORD" NUM_ROW="38"
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="ENCRYPT=='true'">
|
||||
REQUIRED="true" GROUP="LOAD_DETAILS" SHOW_IF="isShow[ENCRYPT] AND ENCRYPT=='true'">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ ESCAPE.NAME=Escape
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
BUCKET.NAME=Bucket
|
||||
|
||||
@@ -24,27 +24,29 @@
|
||||
</CONNECTORS>
|
||||
|
||||
<PARAMETERS>
|
||||
|
||||
<PARAMETER
|
||||
NAME="PROXY_TYPE"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="10"
|
||||
>
|
||||
<ITEMS DEFAULT="HTTP_PROXY">
|
||||
<ITEM NAME="HTTP_PROXY" VALUE="HTTP_PROXY" />
|
||||
<ITEM NAME="HTTPS_PROXY" VALUE="HTTPS_PROXY" />
|
||||
<ITEM NAME="SOCKS_PROXY" VALUE="SOCKS_PROXY" />
|
||||
<ITEM NAME="FTP_PROXY" VALUE="FTP_PROXY" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PROXY_GLOBAL" FIELD="CHECK"
|
||||
NUM_ROW="5">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="PROXY_TYPE"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="10"
|
||||
>
|
||||
<ITEMS DEFAULT="HTTP_PROXY">
|
||||
<ITEM NAME="HTTP_PROXY" VALUE="HTTP_PROXY" />
|
||||
<ITEM NAME="HTTPS_PROXY" VALUE="HTTPS_PROXY" />
|
||||
<ITEM NAME="SOCKS_PROXY" VALUE="SOCKS_PROXY" />
|
||||
<ITEM NAME="FTP_PROXY" VALUE="FTP_PROXY" SHOW_IF="PROXY_GLOBAL == 'true'"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="PROXY_HOST" FIELD="TEXT" NUM_ROW="56">
|
||||
<DEFAULT>"61.163.92.4"</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="PROXY_PORT" FIELD="TEXT" NUM_ROW="57">
|
||||
<DEFAULT>"8080"</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="USE_AUTH" FIELD="CHECK" NUM_ROW="58" SHOW_IF="(PROXY_TYPE == 'HTTPS_PROXY')">
|
||||
<PARAMETER NAME="USE_AUTH" FIELD="CHECK" NUM_ROW="58" SHOW_IF="(PROXY_TYPE == 'HTTPS_PROXY')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="PROXY_USERNAME" FIELD="TEXT" NUM_ROW="59" SHOW_IF="(PROXY_TYPE == 'HTTP_PROXY') OR (PROXY_TYPE == 'SOCKS_PROXY') OR ((PROXY_TYPE == 'HTTPS_PROXY') AND (USE_AUTH == 'true'))">
|
||||
@@ -53,16 +55,32 @@
|
||||
<PARAMETER NAME="PROXY_PASSWORD" FIELD="PASSWORD" NUM_ROW="60" SHOW_IF="(PROXY_TYPE == 'HTTP_PROXY') OR (PROXY_TYPE == 'SOCKS_PROXY') OR ((PROXY_TYPE == 'HTTPS_PROXY') AND (USE_AUTH == 'true'))">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="NONPROXYHOSTS" FIELD="TEXT" NUM_ROW="61" SHOW_IF="(PROXY_TYPE == 'HTTP_PROXY') OR (PROXY_TYPE == 'FTP_PROXY')">
|
||||
|
||||
<PARAMETER NAME="NONPROXYHOSTS" FIELD="TEXT" NUM_ROW="61" SHOW_IF="((PROXY_TYPE == 'HTTP_PROXY') OR (PROXY_TYPE == 'FTP_PROXY')) AND (PROXY_GLOBAL == 'true')">
|
||||
<DEFAULT>"192.168.0.* | localhost"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
</PARAMETERS>
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="ENABLE_BASIC" FIELD="CHECK" NUM_ROW="10" SHOW_IF="(PROXY_TYPE == 'HTTPS_PROXY') AND (USE_AUTH == 'true')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
<CODEGENERATION/>
|
||||
<RETURNS/>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="HOSTS" FIELD="TABLE" REQUIRED="true" NUM_ROW="65" NB_LINES="5" SHOW_IF="PROXY_GLOBAL == 'false'">
|
||||
<ITEMS>
|
||||
<ITEM NAME="HOST" VALUE=""""/>
|
||||
<ITEM NAME="PORT" VALUE="-1"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="ENABLE_BASIC" FIELD="CHECK" NUM_ROW="10" SHOW_IF="(PROXY_TYPE == 'HTTPS_PROXY') AND (USE_AUTH == 'true')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="THREAD_ONLY" FIELD="CHECK" REQUIRED="true" NUM_ROW="11" SHOW_IF="PROXY_GLOBAL == 'false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="talend-proxy" MODULE="talend-proxy-1.0.0.jar" MVN="mvn:org.talend.components.lib/talend-proxy/1.0.0" REQUIRED_IF="(PROXY_GLOBAL == 'false')" />
|
||||
<IMPORT NAME="apache-commons-lang3" MODULE="apache-commons-lang3-3.9.jar" MVN="mvn:org.apache.commons/commons-lang3/3.9" REQUIRED_IF="(PROXY_GLOBAL == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS/>
|
||||
</COMPONENT>
|
||||
@@ -3,6 +3,8 @@ imports="
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
java.util.Map
|
||||
"
|
||||
%>
|
||||
|
||||
@@ -20,56 +22,62 @@ imports="
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
String nonProxyHosts = ElementParameterParser.getValue(node,"__NONPROXYHOSTS__");
|
||||
boolean setProxyGlobal = "true".equals(ElementParameterParser.getValue(node,"__PROXY_GLOBAL__"));
|
||||
boolean threadSpecificProxy = "true".equals(ElementParameterParser.getValue(node,"__THREAD_ONLY__"));
|
||||
List<Map<String, String>> proxyHostsList =
|
||||
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
|
||||
node,
|
||||
"__HOSTS__"
|
||||
);
|
||||
|
||||
if (setProxyGlobal) {
|
||||
%>
|
||||
java.util.Properties props_<%=cid %> = System.getProperties();
|
||||
<%
|
||||
String passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if ("HTTP_PROXY".equals(proxyType)) {
|
||||
|
||||
%>
|
||||
System.setProperty("http.proxySet","true");
|
||||
|
||||
System.setProperty("http.proxyHost", <%=proxyHost %>);
|
||||
System.setProperty("http.proxyPort", <%=proxyPort %>);
|
||||
System.setProperty("http.nonProxyHosts", <%=nonProxyHosts %>);
|
||||
|
||||
System.setProperty("http.proxyUser", <%=proxyUser %>);
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
System.setProperty("http.proxyPassword", decryptedPassword_<%=cid%>);
|
||||
|
||||
java.net.Authenticator.setDefault(
|
||||
new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(
|
||||
<%=proxyUser %>, decryptedPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
}
|
||||
);
|
||||
<%
|
||||
} else if ("SOCKS_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
System.setProperty("socksProxySet","true");
|
||||
|
||||
System.setProperty("socksProxyHost", <%=proxyHost %>);
|
||||
System.setProperty("socksProxyPort", <%=proxyPort %>);
|
||||
System.setProperty("java.net.socks.username", <%=proxyUser %>);
|
||||
|
||||
System.setProperty("http.proxySet","true");
|
||||
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
System.setProperty("java.net.socks.password", decryptedPassword_<%=cid%>);
|
||||
System.setProperty("http.proxyHost", <%=proxyHost %>);
|
||||
System.setProperty("http.proxyPort", <%=proxyPort %>);
|
||||
System.setProperty("http.nonProxyHosts", <%=nonProxyHosts %>);
|
||||
|
||||
System.setProperty("http.proxyUser", <%=proxyUser %>);
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
System.setProperty("http.proxyPassword", decryptedPassword_<%=cid%>);
|
||||
|
||||
java.net.Authenticator.setDefault(
|
||||
new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(
|
||||
<%=proxyUser %>, decryptedPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
}
|
||||
);
|
||||
<%
|
||||
}else if ("HTTPS_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
//System.setProperty("httpsProxySet", "true");
|
||||
|
||||
System.setProperty("https.proxyHost", <%=proxyHost %>);
|
||||
} else if ("SOCKS_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
System.setProperty("socksProxySet","true");
|
||||
|
||||
System.setProperty("socksProxyHost", <%=proxyHost %>);
|
||||
System.setProperty("socksProxyPort", <%=proxyPort %>);
|
||||
System.setProperty("java.net.socks.username", <%=proxyUser %>);
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
System.setProperty("java.net.socks.password", decryptedPassword_<%=cid%>);
|
||||
<%
|
||||
}else if ("HTTPS_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
//System.setProperty("httpsProxySet", "true");
|
||||
|
||||
System.setProperty("https.proxyHost", <%=proxyHost %>);
|
||||
System.setProperty("https.proxyPort", <%=proxyPort %>);
|
||||
<%if(useAuth){
|
||||
if(enableBasic) {%>
|
||||
if(enableBasic) {%>
|
||||
System.setProperty("jdk.http.auth.tunneling.disabledSchemes","");
|
||||
<%}%>
|
||||
|
||||
@@ -79,16 +87,59 @@ imports="
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
}else if ("FTP_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
//set it, though in some cases, it is not useful.
|
||||
System.setProperty("ftpProxySet", "true");
|
||||
|
||||
System.setProperty("ftp.proxyHost", <%=proxyHost %>);
|
||||
System.setProperty("ftp.proxyPort", <%=proxyPort %>);
|
||||
System.setProperty("ftp.nonProxyHosts", <%=nonProxyHosts %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
}else if ("FTP_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
//set it, though in some cases, it is not useful.
|
||||
System.setProperty("ftpProxySet", "true");
|
||||
|
||||
System.setProperty("ftp.proxyHost", <%=proxyHost %>);
|
||||
System.setProperty("ftp.proxyPort", <%=proxyPort %>);
|
||||
System.setProperty("ftp.nonProxyHosts", <%=nonProxyHosts %>);
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
org.talend.proxy.TalendProxySelector talendProxySelector_<%=cid %> = org.talend.proxy.TalendProxySelector.getInstance();
|
||||
java.net.ProxySelector.setDefault(talendProxySelector_<%=cid %>);
|
||||
java.net.Proxy proxy_<%=cid %> = null;
|
||||
|
||||
<%
|
||||
if ("HTTP_PROXY".equals(proxyType) || "HTTPS_PROXY".equals(proxyType)) {
|
||||
if ("HTTPS_PROXY".equals(proxyType) && useAuth && enableBasic) {
|
||||
%>
|
||||
System.setProperty("jdk.http.auth.tunneling.disabledSchemes","");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
System.setProperty("http.proxySet","local");
|
||||
proxy_<%=cid %> = new java.net.Proxy(java.net.Proxy.Type.HTTP, new java.net.InetSocketAddress(<%=proxyHost %>, Integer.valueOf(<%=proxyPort %>)));
|
||||
<%
|
||||
} else if ("SOCKS_PROXY".equals(proxyType)) {
|
||||
%>
|
||||
System.setProperty("socksProxySet","local");
|
||||
proxy_<%=cid %> = new java.net.Proxy(java.net.Proxy.Type.SOCKS, new java.net.InetSocketAddress(<%=proxyHost %>, Integer.valueOf(<%=proxyPort %>)));
|
||||
<%
|
||||
}
|
||||
|
||||
for (Map<String, String> hostURI : proxyHostsList) {
|
||||
String hostToUseProxy = hostURI.get("HOST");
|
||||
String portToUseProxy = hostURI.get("PORT");
|
||||
%>
|
||||
talendProxySelector_<%=cid %>.addProxySettings(proxy_<%=cid %>, <%=threadSpecificProxy %>, <%=hostToUseProxy %> , Integer.valueOf(<%=portToUseProxy %>));
|
||||
<%
|
||||
}
|
||||
if (("HTTP_PROXY".equals(proxyType) || "HTTPS_PROXY".equals(proxyType) || "SOCKS_PROXY".equals(proxyType)) && proxyUser != null && !proxyUser.isEmpty()) {
|
||||
String passwordFieldName = "__PROXY_PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
org.talend.proxy.TalendProxyAuthenticator customAuthenticator_<%=cid %> = org.talend.proxy.TalendProxyAuthenticator.getInstance();
|
||||
customAuthenticator_<%=cid %>.addAuthForProxy(<%=proxyHost %>, <%=proxyPort %>, <%=proxyUser %>, decryptedPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(customAuthenticator_<%=cid %>);
|
||||
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
@@ -1,6 +1,7 @@
|
||||
#Created by JInto - www.guh-software.de
|
||||
#Fri Mar 14 17:35:15 CST 2008
|
||||
|
||||
PROXY_GLOBAL.NAME=Use Java Virtual Machine Proxy Configuration
|
||||
PROXY_TYPE.NAME=Proxy type
|
||||
PROXY_TYPE.ITEM.HTTP_PROXY=Http Proxy
|
||||
PROXY_TYPE.ITEM.SOCKS_PROXY=Socks Proxy
|
||||
@@ -13,6 +14,12 @@ PROXY_PORT.NAME=Proxy port
|
||||
PROXY_USERNAME.NAME=Proxy user
|
||||
NONPROXYHOSTS.NAME=No Proxy for
|
||||
|
||||
HOSTS.ITEM.HOST=Host
|
||||
HOSTS.ITEM.PORT=Port
|
||||
HOSTS.NAME=URIs to use proxy
|
||||
|
||||
THREAD_ONLY.NAME=Thread isolated proxy
|
||||
|
||||
LONG_NAME=Configure proxy in JVM parameters
|
||||
USE_AUTH.NAME=Use authentication
|
||||
|
||||
|
||||
@@ -13,17 +13,42 @@
|
||||
trustManager_<%=cid %> = myTrust_<%=cid%>.getTrustManagers();
|
||||
sslContext_<%=cid %>.init(null, trustManager_<%=cid %>, new java.security.SecureRandom());
|
||||
sslSocketFactory_<%=cid %> = sslContext_<%=cid %>.getSocketFactory();
|
||||
boolean isHTTPProxyUsed = "true".equals(System.getProperty("http.proxySet"));
|
||||
if (isHTTPProxyUsed) {
|
||||
|
||||
if(("true").equals(System.getProperty("http.proxySet")) ){
|
||||
String httpProxyHost = System.getProperty("http.proxyHost");
|
||||
int httpProxyPort = Integer.getInteger("http.proxyPort");
|
||||
String httpProxyUser = System.getProperty("http.proxyUser");
|
||||
String httpProxyPass = System.getProperty("http.proxyPassword");
|
||||
|
||||
ftp_<%=cid %> = new org.talend.ftp.HTTPProxyFTPSClient(<%="IMPLICIT".equals(securityMode)%>, sslContext_<%=cid %>, httpProxyHost, httpProxyPort, httpProxyUser, httpProxyPass);
|
||||
|
||||
} else if ("local".equals(System.getProperty("http.proxySet"))) {
|
||||
String uriString = <%=host %> + ":" + <%=ftpsPort%>;
|
||||
java.net.Proxy proxyToUse = org.talend.proxy.TalendProxySelector.getInstance().getProxyForUriString(uriString);
|
||||
|
||||
if (!proxyToUse.equals(java.net.Proxy.NO_PROXY)) {
|
||||
java.net.InetSocketAddress proxyAddress = (java.net.InetSocketAddress) proxyToUse.address();
|
||||
|
||||
String httpProxyHost = proxyAddress.getAddress().getHostAddress();
|
||||
int httpProxyPort = proxyAddress.getPort();
|
||||
String httpProxyUser = "";
|
||||
String httpProxyPass = ""; //leave it empty if proxy creds weren't specified
|
||||
|
||||
org.talend.proxy.ProxyCreds proxyCreds = org.talend.proxy.TalendProxyAuthenticator.getInstance().getCredsForProxyURI(httpProxyHost + ":" + httpProxyPort);
|
||||
if (proxyCreds != null) {
|
||||
httpProxyUser = proxyCreds.getUser();
|
||||
httpProxyPass = proxyCreds.getPass();
|
||||
}
|
||||
|
||||
ftp_<%=cid %> = new org.talend.ftp.HTTPProxyFTPSClient(<%="IMPLICIT".equals(securityMode)%>, sslContext_<%=cid %>, httpProxyHost, httpProxyPort, httpProxyUser, httpProxyPass);
|
||||
|
||||
} else { //no http proxy for ftp host defined
|
||||
ftp_<%=cid %> = new org.talend.ftp.SSLSessionReuseFTPSClient(<%="IMPLICIT".equals(securityMode)%>, sslContext_<%=cid %>);
|
||||
}
|
||||
} else {
|
||||
ftp_<%=cid %> = new org.talend.ftp.SSLSessionReuseFTPSClient(<%="IMPLICIT".equals(securityMode)%>, sslContext_<%=cid %>);
|
||||
ftp_<%=cid %> = new org.talend.ftp.SSLSessionReuseFTPSClient(<%="IMPLICIT".equals(securityMode)%>, sslContext_<%=cid %>);
|
||||
}
|
||||
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding %>);
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
|
||||
@@ -35,12 +35,30 @@ do {
|
||||
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
if(("true").equals(System.getProperty("http.proxySet")) ){
|
||||
if(("true").equals(System.getProperty("http.proxySet"))) {
|
||||
com.jcraft.jsch.ProxyHTTP proxy_<%=cid%> = new com.jcraft.jsch.ProxyHTTP(System.getProperty("http.proxyHost"),Integer.parseInt(System.getProperty("http.proxyPort")));
|
||||
if(!"".equals(System.getProperty("http.proxyUser"))){
|
||||
proxy_<%=cid%>.setUserPasswd(System.getProperty("http.proxyUser"),System.getProperty("http.proxyPassword"));
|
||||
}
|
||||
session_<%=cid%>.setProxy(proxy_<%=cid%>);
|
||||
} else if ("local".equals(System.getProperty("http.proxySet"))) {
|
||||
String uriString = <%=host %> + ":" + <%=port%>;
|
||||
java.net.Proxy proxyToUse = org.talend.proxy.TalendProxySelector.getInstance().getProxyForUriString(uriString);
|
||||
|
||||
if (!proxyToUse.equals(java.net.Proxy.NO_PROXY)) {
|
||||
java.net.InetSocketAddress proxyAddress = (java.net.InetSocketAddress) proxyToUse.address();
|
||||
String proxyHost = proxyAddress.getAddress().getHostAddress();
|
||||
int proxyPort = proxyAddress.getPort();
|
||||
|
||||
com.jcraft.jsch.ProxyHTTP proxy_<%=cid%> = new com.jcraft.jsch.ProxyHTTP(proxyHost, proxyPort);
|
||||
|
||||
org.talend.proxy.ProxyCreds proxyCreds = org.talend.proxy.TalendProxyAuthenticator.getInstance().getCredsForProxyURI(proxyHost + ":" + proxyPort);
|
||||
if (proxyCreds != null) {
|
||||
proxy_<%=cid%>.setUserPasswd(proxyCreds.getUser(), proxyCreds.getPass());
|
||||
}
|
||||
|
||||
session_<%=cid%>.setProxy(proxy_<%=cid%>);
|
||||
}
|
||||
}
|
||||
<%}%>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.localprovider</artifactId>
|
||||
@@ -24,6 +24,8 @@
|
||||
<talendMQConnectionUtil.dir>${project.basedir}/components/tMomConnection</talendMQConnectionUtil.dir>
|
||||
<talendMQConnectionUtil.version>1.0.1-20190215</talendMQConnectionUtil.version>
|
||||
<tldapinput.dir>${project.basedir}/components/tLDAPInput</tldapinput.dir>
|
||||
<tproxy.dir>${project.basedir}/components/tSetProxy</tproxy.dir>
|
||||
<tproxy.version>1.0.0</tproxy.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -156,6 +158,14 @@
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${tldapinput.dir}</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend-proxy</artifactId>
|
||||
<version>${tproxy.version}</version>
|
||||
<type>jar</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${tproxy.dir}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.generic</artifactId>
|
||||
|
||||
@@ -100,15 +100,20 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
|
||||
for (int j = 0; j < param.getListItemsValue().length; j++) {
|
||||
if (((CCombo) ctrl).getText().equals(param.getListItemsDisplayName()[j])) {
|
||||
value = (String) param.getListItemsValue()[j];
|
||||
if (j == 0 && (boolean) ((ElementParameter) propertyParameter)
|
||||
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW)) {
|
||||
if (j == 0) {
|
||||
// The first item in the combo is
|
||||
// this component
|
||||
props.referenceType
|
||||
.setValue(ComponentReferenceProperties.ReferenceType.THIS_COMPONENT);
|
||||
props.componentInstanceId.setValue(null);
|
||||
props.setReference(null);
|
||||
propertyParameter.setShow(true);
|
||||
boolean isPropertyShow = true;
|
||||
Object isPropertyShowObj = ((ElementParameter) propertyParameter)
|
||||
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW);
|
||||
if (isPropertyShowObj != null) {
|
||||
isPropertyShow = Boolean.valueOf(isPropertyShowObj.toString());
|
||||
}
|
||||
propertyParameter.setShow(isPropertyShow);
|
||||
} else {
|
||||
props.referenceType
|
||||
.setValue(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE);
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.talend.daikon.properties.property.Property;
|
||||
import org.talend.designer.core.generic.constants.IGenericConstants;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.utils.security.CryptoMigrationUtil;
|
||||
|
||||
/**
|
||||
* DOC hwang class global comment. Detailled comment
|
||||
@@ -60,6 +61,7 @@ public class NewJDBCConnectionMigrationTask extends AbstractJobMigrationTask{
|
||||
ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
DatabaseConnectionItem connectionItem = (DatabaseConnectionItem) item;
|
||||
DatabaseConnection connection = (DatabaseConnection) connectionItem.getConnection();
|
||||
connection.setEncryptAndDecryptFuncPair(CryptoMigrationUtil.encryptFunc(), CryptoMigrationUtil.decryptFunc());
|
||||
if (connection instanceof DatabaseConnection) {
|
||||
DatabaseConnection dbConnection = connection;
|
||||
String dbType = dbConnection.getDatabaseType();
|
||||
@@ -103,8 +105,7 @@ public class NewJDBCConnectionMigrationTask extends AbstractJobMigrationTask{
|
||||
if(pass != null){
|
||||
pass.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE, isContextMode);
|
||||
pass.setTaggedValue(IGenericConstants.REPOSITORY_VALUE, pass.getName());
|
||||
String password = connection.getValue(connection.getRawPassword(), false);
|
||||
pass.setValue(password);
|
||||
pass.setValue(connection.getRawPassword());
|
||||
}
|
||||
if(mappingFile != null){
|
||||
mappingFile.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE, isContextMode);
|
||||
|
||||
@@ -15,7 +15,6 @@ package org.talend.designer.core.generic.utils;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.daikon.security.CryptoHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
@@ -100,11 +99,8 @@ public final class ParameterUtilTool {
|
||||
if (paramName != null && paramValue != null) {
|
||||
// Check param name
|
||||
if (EParameterFieldType.PASSWORD.getName().equals(paramType.getField())) {
|
||||
try{
|
||||
return CryptoHelper.getDefault().decrypt(paramValue);
|
||||
}catch(Exception e){
|
||||
return paramValue;
|
||||
}
|
||||
// we should always depend on getRawValue to get clear password
|
||||
return paramType.getRawValue();
|
||||
}
|
||||
|
||||
if ("ACTION".equalsIgnoreCase(paramName)) {//$NON-NLS-1$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core</artifactId>
|
||||
|
||||
@@ -738,7 +738,7 @@ PerformancePreferencePage.generateCode=Generate code when opening the job
|
||||
PerformancePreferencePage.checkVersion=Check only the last version when updating jobs or joblets
|
||||
PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts
|
||||
PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection.
|
||||
PerformancePreferencePage.propagateContext=Propagate add context groups in repository contexts
|
||||
PerformancePreferencePage.propagateContext=Propagate contexts added in repository context groups
|
||||
PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds)
|
||||
PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema)
|
||||
PerformancePreferencePage.HBaseOrMaprDBScanLimitTip=If set it by zero, will be same as deactiving the limit.
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.gef.palette.PaletteEntry;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
@@ -32,6 +33,7 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.core.ui.editor.JobEditorInput;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
|
||||
/**
|
||||
@@ -143,6 +145,23 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC hwang Comment method "loadComponentsFromProviders".
|
||||
*
|
||||
* @return
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public static JobEditorInput createEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
Boolean openedInJob) throws PersistenceException {
|
||||
for (AbstractProcessProvider processProvider : findAllProcessProviders()) {
|
||||
JobEditorInput editorInput= processProvider.createJobletEditorInput(processItem, load, lastVersion, readonly, openedInJob);
|
||||
if(editorInput != null) {
|
||||
return editorInput;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qzhang Comment method "canDeleteNode".
|
||||
@@ -257,5 +276,10 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
public boolean canHandleNode(INode node) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public JobEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
Boolean openedInJob) throws PersistenceException{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
@@ -185,7 +186,6 @@ import org.talend.designer.core.utils.DetectContextVarsUtils;
|
||||
import org.talend.designer.core.utils.JavaProcessUtil;
|
||||
import org.talend.designer.core.utils.JobSettingVersionUtil;
|
||||
import org.talend.designer.core.utils.UnifiedComponentUtil;
|
||||
import org.talend.designer.core.utils.UpdateParameterUtils;
|
||||
import org.talend.designer.core.utils.ValidationRulesUtil;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.designer.runprocess.ItemCacheManager;
|
||||
@@ -1425,11 +1425,6 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (IElementParameter param : elemParam.getElementParameters()) {
|
||||
UpdateParameterUtils.setDefaultValues(param, elemParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected boolean noNeedSetValue(IElementParameter param, String paraValue) {
|
||||
@@ -1845,23 +1840,36 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
||||
routinesDependencies = new ArrayList<RoutinesParameterType>();
|
||||
}
|
||||
try {
|
||||
Project targetProject = new Project(ProjectManager.getInstance().getProject(getProperty()));
|
||||
IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
Set<IRepositoryViewObject> routines = new HashSet<>();
|
||||
routines.addAll(factory.getAll(targetProject, ERepositoryObjectType.ROUTINES));
|
||||
List<Project> referenceProjects = ProjectManager.getInstance().getAllReferencedProjects(targetProject, false);
|
||||
referenceProjects.stream().forEach(p -> {
|
||||
try {
|
||||
routines.addAll(factory.getAll(p, ERepositoryObjectType.ROUTINES));
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
});
|
||||
Map<String, String> allRoutinesMap = routines.stream()
|
||||
.collect(Collectors.toMap(IRepositoryViewObject::getId, IRepositoryViewObject::getLabel));
|
||||
Iterator<RoutinesParameterType> iterator = routinesDependencies.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
RoutinesParameterType routine = iterator.next();
|
||||
if (!allRoutinesMap.containsKey(routine.getId())) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
List<String> possibleRoutines = new ArrayList<String>();
|
||||
List<String> routinesToAdd = new ArrayList<String>();
|
||||
String additionalString = LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA ? "." : "";
|
||||
|
||||
List<String> routinesAlreadySetup = new ArrayList<String>();
|
||||
|
||||
for (RoutinesParameterType routine : routinesDependencies) {
|
||||
routinesAlreadySetup.add(routine.getName());
|
||||
}
|
||||
|
||||
IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
List<IRepositoryViewObject> routines = factory.getAll(ProjectManager.getInstance().getCurrentProject(),
|
||||
ERepositoryObjectType.ROUTINES);
|
||||
routines.addAll(factory.getAll(ProjectManager.getInstance().getCurrentProject(), ERepositoryObjectType.PIG_UDF));
|
||||
for (Project project : ProjectManager.getInstance().getAllReferencedProjects()) {
|
||||
for (Project project : referenceProjects) {
|
||||
List<IRepositoryViewObject> refRoutines = factory.getAll(project, ERepositoryObjectType.ROUTINES);
|
||||
refRoutines.addAll(factory.getAll(project, ERepositoryObjectType.PIG_UDF));
|
||||
for (IRepositoryViewObject object : refRoutines) {
|
||||
if (!((RoutineItem) object.getProperty().getItem()).isBuiltIn()) {
|
||||
if (!possibleRoutines.contains(object.getLabel()) && !routinesAlreadySetup.contains(object.getLabel())) {
|
||||
@@ -1886,9 +1894,8 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
||||
possibleRoutines.add(object.getLabel());
|
||||
}
|
||||
}
|
||||
for (Project project : ProjectManager.getInstance().getAllReferencedProjects()) {
|
||||
for (Project project : referenceProjects) {
|
||||
List<IRepositoryViewObject> refRoutines = factory.getAll(project, ERepositoryObjectType.ROUTINES);
|
||||
refRoutines.addAll(factory.getAll(project, ERepositoryObjectType.PIG_UDF));
|
||||
for (IRepositoryViewObject object : refRoutines) {
|
||||
if (!((RoutineItem) object.getProperty().getItem()).isBuiltIn()) {
|
||||
if (!possibleRoutines.contains(object.getLabel()) && !routinesAlreadySetup.contains(object.getLabel())) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.eclipse.core.runtime.Path;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.process.IContext;
|
||||
@@ -223,7 +224,7 @@ public class JavaProcessUtil {
|
||||
|
||||
// for JDBC, user set the customize driver jars need the high Priority
|
||||
// but after tLibraryLoad
|
||||
if (node.getComponent().getName().equals("tJDBCConnection") && !isTestcaseProcess) {
|
||||
if (node.getComponent().getComponentType() == EComponentType.GENERIC && !isTestcaseProcess) {
|
||||
List<ModuleNeeded> jdbcNodeModuleNeededList = new ArrayList<ModuleNeeded>();
|
||||
for (IElementParameter curParam : node.getElementParameters()) {
|
||||
if (curParam.getFieldType() == EParameterFieldType.TABLE) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-M3</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap</artifactId>
|
||||
|
||||
@@ -962,7 +962,11 @@ public abstract class DbGenerationManager {
|
||||
query = query + " \""; //$NON-NLS-1$
|
||||
} else {
|
||||
if (query.trim().endsWith("+ \"")) { //$NON-NLS-1$
|
||||
query = query.substring(0, query.lastIndexOf("+ \"")); //$NON-NLS-1$
|
||||
if (DEFAULT_TAB_SPACE_STRING.equals(this.tabSpaceString)) {
|
||||
query = query.substring(0, query.lastIndexOf("+ \"")); //$NON-NLS-1$
|
||||
} else {
|
||||
query = query + "\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user