Compare commits
33 Commits
release/5.
...
release/5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b80994f14 | ||
|
|
4d7385d606 | ||
|
|
92e31f9dbb | ||
|
|
225cdd07dd | ||
|
|
d970bb9b20 | ||
|
|
566c976978 | ||
|
|
46ad7441da | ||
|
|
b39ed279ee | ||
|
|
552e6352a1 | ||
|
|
4dd5ee0680 | ||
|
|
f49f3067fe | ||
|
|
f7970c5345 | ||
|
|
864940ebdf | ||
|
|
fe61769d7b | ||
|
|
ae46a332cd | ||
|
|
f2a0312deb | ||
|
|
eb0c2d19e1 | ||
|
|
8754f04afa | ||
|
|
a7ac7c889b | ||
|
|
70107a6283 | ||
|
|
6dbf1a05d6 | ||
|
|
7b7c6f4148 | ||
|
|
3caa2d96e4 | ||
|
|
badb02ed2a | ||
|
|
32ed356961 | ||
|
|
a365aca38e | ||
|
|
d9ca34e31f | ||
|
|
6752c7ca12 | ||
|
|
7f31eca63e | ||
|
|
dc24cb4ba0 | ||
|
|
567b71233a | ||
|
|
bebf84a6ec | ||
|
|
2edfa867cb |
@@ -63,6 +63,7 @@ import org.talend.designer.business.model.business.diagram.edit.parts.BusinessPr
|
||||
import org.talend.designer.business.model.business.diagram.providers.BusinessDiagramActionProvider;
|
||||
import org.talend.designer.core.ui.ActiveProcessTracker;
|
||||
import org.talend.designer.core.ui.views.jobsettings.JobSettingsView;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
import org.talend.repository.editor.RepositoryEditorInput;
|
||||
import org.talend.repository.model.ERepositoryStatus;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
@@ -175,7 +176,7 @@ public class BusinessDiagramEditor extends FileDiagramEditor implements IGotoMar
|
||||
@Override
|
||||
public void doSave(IProgressMonitor progressMonitor) {
|
||||
if (repositoryEditorInput != null) {
|
||||
BusinessProcessItem businessProcessItem = (BusinessProcessItem) repositoryEditorInput.getItem();
|
||||
final BusinessProcessItem businessProcessItem = (BusinessProcessItem) repositoryEditorInput.getItem();
|
||||
IRepositoryService service = CorePlugin.getDefault().getRepositoryService();
|
||||
IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();
|
||||
try {
|
||||
@@ -198,14 +199,17 @@ public class BusinessDiagramEditor extends FileDiagramEditor implements IGotoMar
|
||||
super.doSave(progressMonitor);
|
||||
DiagramResourceManager diagramResourceManager = new DiagramResourceManager();
|
||||
diagramResourceManager.updateFromResource(businessProcessItem, repositoryEditorInput.getFile());
|
||||
// remove the function of sve SVG file because the imported business model can't save SVG file.
|
||||
// saveSVG(businessProcessItem);
|
||||
try {
|
||||
ProxyRepositoryFactory.getInstance().save(businessProcessItem);
|
||||
} catch (PersistenceException e) {
|
||||
// e.printStackTrace();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
final IProxyRepositoryFactory factory = service.getProxyRepositoryFactory();
|
||||
RepositoryWorkUnit rwu = new RepositoryWorkUnit("save Business") {
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
ProxyRepositoryFactory.getInstance().save(businessProcessItem);
|
||||
}
|
||||
};
|
||||
rwu.setAvoidUnloadResources(true);
|
||||
rwu.setAvoidSvnUpdate(true);
|
||||
factory.executeRepositoryWorkUnit(rwu);
|
||||
propertyIsDirty = false;
|
||||
firePropertyChange(IEditorPart.PROP_DIRTY);
|
||||
|
||||
|
||||
@@ -136,22 +136,22 @@ public class NodesSubTree {
|
||||
|
||||
buildMRSubTree(node);
|
||||
|
||||
if (refNodes != null) {
|
||||
for (INode refNode : refNodes) {
|
||||
this.nodes.add(refNode);
|
||||
for (IConnection connection : refNode.getOutgoingSortedConnections()) {
|
||||
if (connection.getTarget().isActivate()) {
|
||||
|
||||
if (connection.getLineStyle().equals(EConnectionType.RUN_AFTER)) {
|
||||
afterSubProcesses.add(connection.getTarget().getUniqueName());
|
||||
}
|
||||
if (connection.getLineStyle().equals(EConnectionType.ON_SUBJOB_OK)) {
|
||||
beforeSubProcesses.add(connection.getTarget().getUniqueName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (refNodes != null) {
|
||||
// for (INode refNode : refNodes) {
|
||||
// this.nodes.add(refNode);
|
||||
// for (IConnection connection : refNode.getOutgoingSortedConnections()) {
|
||||
// if (connection.getTarget().isActivate()) {
|
||||
//
|
||||
// if (connection.getLineStyle().equals(EConnectionType.RUN_AFTER)) {
|
||||
// afterSubProcesses.add(connection.getTarget().getUniqueName());
|
||||
// }
|
||||
// if (connection.getLineStyle().equals(EConnectionType.ON_SUBJOB_OK)) {
|
||||
// beforeSubProcesses.add(connection.getTarget().getUniqueName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,11 @@ public class NodesSubTree {
|
||||
if (((AbstractNode) node).isThereLinkWithRef()) {
|
||||
this.isRefSubTree = true;
|
||||
this.refNodes = ((AbstractNode) node).getRefNodes();
|
||||
if (refNodes != null) {
|
||||
for (INode refNode : refNodes) {
|
||||
buildMRSubTree(refNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (IConnection connection : node.getOutgoingSortedConnections()) {
|
||||
if (connection.getTarget().isActivate()) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.talend.core.model.process.EConnectionType;
|
||||
import org.talend.core.model.process.AbstractNode;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.temp.ETypeGen;
|
||||
@@ -101,13 +101,8 @@ public class NodesTree {
|
||||
private void buildMRSubTrees() {
|
||||
subTrees = new ArrayList<NodesSubTree>();
|
||||
for (INode node : nodes) {
|
||||
if (((node.isSubProcessStart()) && (node.isActivate())) || (rootNodes.contains(node))) {
|
||||
if (node.getOutgoingConnections(EConnectionType.FLOW_REF) != null
|
||||
&& node.getOutgoingConnections(EConnectionType.FLOW_REF).size() == 1) {
|
||||
// ignore the node when it output connection is flow_ref, because it has been added in
|
||||
// AbstractNode.setRefNodes
|
||||
continue;
|
||||
}
|
||||
if (((node.isSubProcessStart()) && (node.isActivate()) && !((AbstractNode) node).isRefNode())
|
||||
|| (rootNodes.contains(node))) {
|
||||
subTrees.add(new NodesSubTree(node, nodes, ETypeGen.MR));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<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</groupId>
|
||||
<artifactId>talend-azure-storage-utils</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>talend-azure-storage-utils</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.windowsazure</groupId>
|
||||
<artifactId>microsoft-windowsazure-api</artifactId>
|
||||
<version>0.4.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.talend.azurestorage.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class AzureStorageUtils {
|
||||
|
||||
public java.util.Map<String, String> genAzureObjectList(File file,
|
||||
String keyParent) {
|
||||
java.util.Map<String, String> map = new java.util.HashMap<String, String>();
|
||||
if (file.isDirectory()) {
|
||||
if (keyParent != null && !"".equals(keyParent)) {
|
||||
if (keyParent.trim().lastIndexOf("/") != keyParent.trim()
|
||||
.length() - 1) {
|
||||
keyParent = keyParent + "/";
|
||||
}
|
||||
}
|
||||
File[] files = file.listFiles();
|
||||
for (File f : files) {
|
||||
if (f.isDirectory()) {
|
||||
map.putAll(genAzureObjectList(f, keyParent + f.getName() + "/"));
|
||||
} else {
|
||||
map.put(f.getAbsolutePath(), keyParent + f.getName());
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
map.put(file.getAbsolutePath(), keyParent);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
public java.util.Map<String, String> genFileFilterList(
|
||||
java.util.List<java.util.Map<String, String>> list,
|
||||
String localdir, String remotedir) {
|
||||
if (remotedir != null && !"".equals(remotedir)) {
|
||||
if (remotedir.trim().lastIndexOf("/") != remotedir.trim().length() - 1) {
|
||||
remotedir = remotedir + "/";
|
||||
}
|
||||
}
|
||||
java.util.Map<String, String> fileMap = new HashMap<String, String>();
|
||||
for (java.util.Map<String, String> map : list) {
|
||||
java.util.Set<String> keySet = map.keySet();
|
||||
for (String key : keySet) {
|
||||
String tempdir = localdir;
|
||||
String filemask = key;
|
||||
String dir = null;
|
||||
String mask = filemask.replaceAll("\\\\", "/");
|
||||
int i = mask.lastIndexOf('/');
|
||||
if (i != -1) {
|
||||
dir = mask.substring(0, i);
|
||||
mask = mask.substring(i + 1);
|
||||
}
|
||||
if (dir != null && !"".equals(dir))
|
||||
tempdir = tempdir + "/" + dir;
|
||||
mask = mask.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*");
|
||||
final String finalMask = mask;
|
||||
java.io.File[] listings = null;
|
||||
java.io.File file = new java.io.File(tempdir);
|
||||
if (file.isDirectory()) {
|
||||
listings = file.listFiles(new java.io.FileFilter() {
|
||||
public boolean accept(java.io.File pathname) {
|
||||
boolean result = false;
|
||||
if (pathname != null && pathname.isFile()) {
|
||||
result = java.util.regex.Pattern
|
||||
.compile(finalMask)
|
||||
.matcher(pathname.getName()).find();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (listings == null || listings.length <= 0) {
|
||||
System.err.println("No match file(" + key + ") exist!");
|
||||
} else {
|
||||
String localFilePath = "";
|
||||
String newObjectKey = "";
|
||||
for (int m = 0; m < listings.length; m++) {
|
||||
if (listings[m].getName().matches(mask)) {
|
||||
localFilePath = listings[m].getAbsolutePath();
|
||||
if (map.get(key) != null
|
||||
&& map.get(key).length() > 0) {
|
||||
newObjectKey = remotedir + map.get(key);
|
||||
} else {
|
||||
newObjectKey = remotedir
|
||||
+ listings[m].getName();
|
||||
}
|
||||
fileMap.put(localFilePath, newObjectKey);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fileMap;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
</PARAMETERS>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="20"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true">
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
</PARAMETERS>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
NUM_ROW="2">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" FILTER="tAccessConnection"
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
<PARAMETER NAME="DB_VERSION" FIELD="CLOSED_LIST" NUM_ROW="10"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
NUM_ROW="2">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" FILTER="tAccessConnection"
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
<PARAMETER NAME="DB_VERSION" FIELD="CLOSED_LIST" NUM_ROW="10"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
NUM_ROW="2">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" FILTER="tAccessConnection"
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
<PARAMETER NAME="DB_VERSION" FIELD="CLOSED_LIST" NUM_ROW="10"
|
||||
|
||||
@@ -644,7 +644,7 @@ if(sizeOps>0){ // T_OutBegin_AggR_114
|
||||
&& !function.equals(MAX)
|
||||
&& !function.equals(FIRST)
|
||||
&& !function.equals(LAST)
|
||||
|| outputJavaType == JavaTypesManager.CHARACTER) {
|
||||
) {
|
||||
|
||||
%> = (<%=JavaTypesManager.getTypeToGenerate(outputColumn.getTalendType(), false) %>) <%= JavaTypesManager.getDefaultValueFromJavaIdType(outputColumn.getTalendType(), false) %><%
|
||||
|
||||
|
||||
@@ -445,15 +445,15 @@ if(inputConn != null) { // T_OutMain_AggR_501
|
||||
|
||||
if(checkTypeOverflow || checkUlp) {
|
||||
if(forceUseDoubleAvgSum) {
|
||||
%>utilClass_<%=cid %>.checkedIADD( operation_result_<%=cid %>.<%=outputColumnName %>_<%=function %>, (double)<%=inputConn.getName() %>.<%=inputColumnName %>, <%= checkTypeOverflow %>.doubleValue(), <%= checkUlp %>);
|
||||
%>utilClass_<%=cid %>.checkedIADD( operation_result_<%=cid %>.<%=outputColumnName %>_<%= SUM%>, <%=inputConn.getName() %>.<%=inputColumnName %>.doubleValue(), <%= checkTypeOverflow %>, <%= checkUlp %>);
|
||||
<%
|
||||
} else {
|
||||
%>utilClass_<%=cid %>.checkedIADD( (<%= primitiveTypeToGenerate%>) operation_result_<%=cid %>.<%=outputColumnName %>_<%=function %>, (<%= primitiveTypeToGenerate%>) <%=inputConn.getName() %>.<%=inputColumnName %>, <%= checkTypeOverflow %>.doubleValue(), <%= checkUlp %>);
|
||||
%>utilClass_<%=cid %>.checkedIADD( (<%= primitiveTypeToGenerate%>) operation_result_<%=cid %>.<%=outputColumnName %>_<%= SUM%>, <%=inputConn.getName() %>.<%=inputColumnName %>.<%=primitiveTypeToGenerate%>Value(), <%= checkTypeOverflow %>, <%= checkUlp %>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
operation_result_<%=cid %>.<%=outputColumnName %>_<%= SUM %> += <%=inputConn.getName() %>.<%=inputColumnName %>.doubleValue();
|
||||
operation_result_<%=cid %>.<%=outputColumnName %>_<%= SUM %> += <%=inputConn.getName() %>.<%=inputColumnName %>.<%=forceUseDoubleAvgSum?"double":primitiveTypeToGenerate%>Value();
|
||||
<%
|
||||
|
||||
} else {
|
||||
|
||||
@@ -29,7 +29,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
// getting useful parameters
|
||||
String alfrescoServerUrl = ElementParameterParser.getValue(node, "__ALFRESCO_SERVER_URL__");
|
||||
String alfrescoUserLogin = ElementParameterParser.getValue(node, "__ALFRESCO_USER_LOGIN__");
|
||||
String alfrescoUserPassword = ElementParameterParser.getValue(node, "__ALFRESCO_USER_PASSWORD__");
|
||||
|
||||
String restEncodingString = ElementParameterParser.getValue(node, "__REST_ENCODING__");
|
||||
|
||||
@@ -91,7 +90,11 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
alfrescoRestClient_<%=cid%> = new fr.openwide.talendalfresco.rest.client.AlfrescoRestClient(<%=alfrescoServerUrl%>, <%=restEncodingString%>);
|
||||
alfrescoRestClient_<%=cid%>.setTimeout(5000);
|
||||
// default server : localhost
|
||||
alfrescoRestClient_<%=cid%>.login(<%=alfrescoUserLogin%>, <%=alfrescoUserPassword%>);
|
||||
<%
|
||||
String passwordFieldName = "__ALFRESCO_USER_PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
alfrescoRestClient_<%=cid%>.login(<%=alfrescoUserLogin%>, decryptedPassword_<%=cid%>);
|
||||
} catch (fr.openwide.talendalfresco.rest.client.RestClientException e) {
|
||||
throw new fr.openwide.talendalfresco.rest.client.RestClientException("Error initing client", e);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonMysqlConnection"
|
||||
REQUIRED="true" FILTER="tAmazonMysqlConnection"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonOracleConnection"
|
||||
REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonOracleConnection"
|
||||
REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
NUM_ROW="2">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" FILTER="tAmazonOracleConnection"
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
<PARAMETER NAME="CONNECTION_TYPE" FIELD="CLOSED_LIST"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonOracleConnection"
|
||||
REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonOracleConnection"
|
||||
REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAmazonOracleConnection"
|
||||
REQUIRED="true" FILTER="tAmazonOracleConnection"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
|
||||
@@ -13,7 +13,6 @@ imports="
|
||||
|
||||
String businessArchive = ElementParameterParser.getValue(node, "__BUSINESS_ARCHIVE__");
|
||||
String userName = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
boolean dieOnError = ("true").equals(ElementParameterParser.getValue(node, "__DIE_ON_ERROR__"));
|
||||
|
||||
@@ -43,8 +42,12 @@ imports="
|
||||
|
||||
String processDefinitionUUID_<%=cid%> = null;
|
||||
try {
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
loginContext_<%=cid%> = new javax.security.auth.login.LoginContext(<%=loginModule%>, new org.ow2.bonita.util.SimpleCallbackHandler(<%=userName%>, <%=password%>));
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
loginContext_<%=cid%> = new javax.security.auth.login.LoginContext(<%=loginModule%>, new org.ow2.bonita.util.SimpleCallbackHandler(<%=userName%>, decryptedPassword_<%=cid%>));
|
||||
loginContext_<%=cid%>.login();
|
||||
process_<%=cid%> = managementAPI_<%=cid%>.deploy(org.ow2.bonita.util.BusinessArchiveFactory.getBusinessArchive(new java.io.File(<%=businessArchive%>).toURI().toURL()));
|
||||
processDefinitionUUID_<%=cid%> = process_<%=cid%>.getUUID().getValue();
|
||||
|
||||
@@ -15,7 +15,6 @@ imports="
|
||||
if ("HTTP_CLIENT".equals(clientMode)) {
|
||||
String url = ElementParameterParser.getValue(node, "__BONITA_URL__");
|
||||
String authUserName = ElementParameterParser.getValue(node, "__AUTH_USERNAME__");
|
||||
String authPasswd = ElementParameterParser.getValue(node, "__AUTH_PASSWD__");
|
||||
String process_name = ElementParameterParser.getValue(node, "__PROCESS_NAME__");
|
||||
String process_version = ElementParameterParser.getValue(node, "__PROCESS_VERSION__");
|
||||
String userName = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
@@ -34,13 +33,16 @@ imports="
|
||||
httpConn_<%=cid %>.setInstanceFollowRedirects(false);
|
||||
httpConn_<%=cid %>.setRequestMethod("POST");
|
||||
httpConn_<%=cid %>.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||
httpConn_<%=cid %>.setRequestProperty("Authorization", "Basic " + new String(org.apache.commons.codec.binary.Base64.encodeBase64((<%=authUserName%>+ ":"+ <%=authPasswd%>).getBytes(utf8Charset)),utf8Charset));
|
||||
<%
|
||||
String passwordFieldName = "__AUTH_PASSWD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
httpConn_<%=cid %>.setRequestProperty("Authorization", "Basic " + new String(org.apache.commons.codec.binary.Base64.encodeBase64((<%=authUserName%>+ ":"+ decryptedPassword_<%=cid%>).getBytes(utf8Charset)),utf8Charset));
|
||||
<%
|
||||
} else { // JAVA CLIENT
|
||||
|
||||
String processID = ElementParameterParser.getValue(node, "__PROCESS_ID__");
|
||||
String userName = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String use_process_id = ElementParameterParser.getValue(node, "__USE_PROCESS_ID__");
|
||||
|
||||
@@ -76,8 +78,12 @@ imports="
|
||||
|
||||
String processInstanceUUID_<%=cid%> = null;
|
||||
java.util.Map<String, Object> parameters_<%=cid%>=new java.util.HashMap<String, Object>();
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
|
||||
loginContext_<%=cid%> = new javax.security.auth.login.LoginContext(<%=loginModule%>, new org.ow2.bonita.util.SimpleCallbackHandler(<%=userName%>, <%=password%>));
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
loginContext_<%=cid%> = new javax.security.auth.login.LoginContext(<%=loginModule%>, new org.ow2.bonita.util.SimpleCallbackHandler(<%=userName%>, decryptedPassword_<%=cid%>));
|
||||
resourceMap.put("loginContext_<%=cid%>", loginContext_<%=cid%>);
|
||||
loginContext_<%=cid%>.login();
|
||||
<%
|
||||
|
||||
@@ -19,7 +19,6 @@ imports="
|
||||
String url = ElementParameterParser.getValue(node, "__CENTRIC-URL__");
|
||||
String modulename = ElementParameterParser.getValue(node, "__MODULENAME__");
|
||||
String userid = ElementParameterParser.getValue(node, "__CLIENT__");
|
||||
String password = ElementParameterParser.getValue(node, "__CODE__");
|
||||
String server = ElementParameterParser.getValue(node, "__SERVER-ID__");
|
||||
String classname=ElementParameterParser.getValue(node, "__CLASSNAME__");
|
||||
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
|
||||
@@ -36,7 +35,11 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
System.out.println(crm<%=cid%>.getDescription());
|
||||
crm<%=cid%>.setUrl(<%=url%>);
|
||||
crm<%=cid%>.setId(<%=server%>);
|
||||
crm<%=cid%>.setCode(<%=password%>);
|
||||
<%
|
||||
String passwordFieldName = "__CODE__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
crm<%=cid%>.setCode(decryptedPassword_<%=cid%>);
|
||||
crm<%=cid%>.setClientId(<%=userid%>);
|
||||
java.util.ArrayList meta<%=cid%> = new java.util.ArrayList();
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ imports="
|
||||
String url = ElementParameterParser.getValue(node, "__CENTRIC-URL__");
|
||||
String modulename = ElementParameterParser.getValue(node, "__MODULENAME__");
|
||||
String userid = ElementParameterParser.getValue(node, "__CLIENT__");
|
||||
String password = ElementParameterParser.getValue(node, "__CODE__");
|
||||
String server = ElementParameterParser.getValue(node, "__SERVER-ID__");
|
||||
String action=ElementParameterParser.getValue(node, "__ACTION__");
|
||||
%>
|
||||
@@ -29,7 +28,11 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
org.aspcfs.utils.CRMConnection crm<%=cid%> = new org.aspcfs.utils.CRMConnection();
|
||||
crm<%=cid%>.setUrl(<%=url%>);
|
||||
crm<%=cid%>.setId(<%=server%>);
|
||||
crm<%=cid%>.setCode(<%=password%>);
|
||||
<%
|
||||
String passwordFieldName = "__CODE__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
crm<%=cid%>.setCode(decryptedPassword_<%=cid%>);
|
||||
crm<%=cid%>.setClientId(<%=userid%>);
|
||||
crm<%=cid%>.setAutoCommit(false);
|
||||
org.aspcfs.apps.transfer.DataRecord <%=modulename%><%=cid%> = new org.aspcfs.apps.transfer.DataRecord();
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<PARAMETER
|
||||
NAME="STARTER"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tChronometerStart"
|
||||
REQUIRED="true" FILTER="tChronometerStart"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="SINCE_STARTER == 'true'"
|
||||
GROUP="SINCE"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String accesskey = ElementParameterParser.getValue(node, "__ACCESS_KEY__");
|
||||
String secretkey = ElementParameterParser.getValue(node, "__SECRET_KEY__");
|
||||
String provider = ElementParameterParser.getValue(node, "__PROVIDER__");
|
||||
String imageId = ElementParameterParser.getValue(node, "__IMAGE_ID__");
|
||||
String region = ElementParameterParser.getValue(node, "__REGION__");
|
||||
@@ -58,8 +57,11 @@
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
org.jclouds.compute.ComputeServiceContext context_<%=cid%> = new org.jclouds.compute.ComputeServiceContextFactory().createContext("<%=providerId%>", <%=accesskey%>, <%=secretkey%>);
|
||||
<%
|
||||
String passwordFieldName = "__SECRET_KEY__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
org.jclouds.compute.ComputeServiceContext context_<%=cid%> = new org.jclouds.compute.ComputeServiceContextFactory().createContext("<%=providerId%>", <%=accesskey%>, decryptedPassword_<%=cid%>);
|
||||
org.jclouds.compute.ComputeService client_<%=cid%> = context_<%=cid%>.getComputeService();
|
||||
|
||||
<%
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String accesskey = ElementParameterParser.getValue(node, "__ACCESS_KEY__");
|
||||
String secretkey = ElementParameterParser.getValue(node, "__SECRET_KEY__");
|
||||
String provider = ElementParameterParser.getValue(node, "__PROVIDER__");
|
||||
String predicates = ElementParameterParser.getValue(node, "__PREDICATES__");
|
||||
|
||||
@@ -27,7 +26,11 @@
|
||||
}
|
||||
|
||||
%>
|
||||
org.jclouds.compute.ComputeServiceContext context_<%=cid%> = new org.jclouds.compute.ComputeServiceContextFactory().createContext("<%=providerId%>", <%=accesskey%>, <%=secretkey%>);
|
||||
<%
|
||||
String passwordFieldName = "__SECRET_KEY__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
org.jclouds.compute.ComputeServiceContext context_<%=cid%> = new org.jclouds.compute.ComputeServiceContextFactory().createContext("<%=providerId%>", <%=accesskey%>, decryptedPassword_<%=cid%>);
|
||||
org.jclouds.compute.ComputeService client_<%=cid%> = context_<%=cid%>.getComputeService();
|
||||
|
||||
<%
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_AS400"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tAS400Connection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tAS400Connection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='AS400'"
|
||||
/>
|
||||
@@ -72,7 +72,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_DB2"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tDB2Connection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tDB2Connection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='DB2'"
|
||||
/>
|
||||
@@ -81,7 +81,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_FIREBIRD"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tFirebirdConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tFirebirdConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='FIREBIRD'"
|
||||
/>
|
||||
@@ -90,7 +90,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_GREENPLUM"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tGreenplumConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tGreenplumConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='GREENPLUM'"
|
||||
/>
|
||||
@@ -99,7 +99,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_HIVE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tHiveConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tHiveConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='HIVE'"
|
||||
/>
|
||||
@@ -108,7 +108,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_INGRES"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tIngresConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tIngresConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='INGRES'"
|
||||
/>
|
||||
@@ -117,7 +117,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_INTERBASE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tInterbaseConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tInterbaseConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='INTERBASE'"
|
||||
/>
|
||||
@@ -126,7 +126,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_MSSQL"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tMSSqlConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tMSSqlConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='MSSQL'"
|
||||
/>
|
||||
@@ -135,7 +135,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_MYSQL"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tMysqlConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tMysqlConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='MYSQL'"
|
||||
/>
|
||||
@@ -144,7 +144,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_DBORACLE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tOracleConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tOracleConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='DBORACLE'"
|
||||
/>
|
||||
@@ -153,7 +153,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_PARACCEL"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tParAccelConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tParAccelConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='PARACCEL'"
|
||||
/>
|
||||
@@ -162,7 +162,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_POSTGREPLUS"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tPostgresPlusConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tPostgresPlusConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='POSTGREPLUS'"
|
||||
/>
|
||||
@@ -171,7 +171,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_POSTGRE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tPostgresqlConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tPostgresqlConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='POSTGRE'"
|
||||
/>
|
||||
@@ -180,7 +180,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_SQLITE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tSQLiteConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tSQLiteConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='SQLITE'"
|
||||
/>
|
||||
@@ -189,7 +189,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_SYBASE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tSybaseConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tSybaseConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='SYBASE'"
|
||||
/>
|
||||
@@ -198,7 +198,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_TERADATA"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tTeradataConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tTeradataConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='TERADATA'"
|
||||
/>
|
||||
@@ -207,7 +207,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_VERTICA"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="REGEXP:^tVerticaConnection|tJDBCConnection$"
|
||||
REQUIRED="true" FILTER="REGEXP:^tVerticaConnection|tJDBCConnection$"
|
||||
NUM_ROW="3"
|
||||
SHOW_IF="DBTYPE=='VERTICA'"
|
||||
/>
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_ACCESS"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAccessConnection"
|
||||
REQUIRED="true" FILTER="tAccessConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='ACCESS') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -239,7 +239,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_AS400"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tAS400Connection"
|
||||
REQUIRED="true" FILTER="tAS400Connection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='AS400') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -249,7 +249,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_DB2"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='DB2') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -259,7 +259,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_FIREBIRD"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFirebirdConnection"
|
||||
REQUIRED="true" FILTER="tFirebirdConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='FIREBIRD') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -317,7 +317,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_INFORMIX"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tInformixConnection"
|
||||
REQUIRED="true" FILTER="tInformixConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='INFORMIX') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -337,7 +337,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_INGRES"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tIngresConnection"
|
||||
REQUIRED="true" FILTER="tIngresConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='INGRES') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -347,7 +347,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_INTERBASE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tInterbaseConnection"
|
||||
REQUIRED="true" FILTER="tInterbaseConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='INTERBASE') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -392,7 +392,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_MSSQL"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tMSSqlConnection"
|
||||
REQUIRED="true" FILTER="tMSSqlConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='MSSQL') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -411,7 +411,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_MYSQL"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tMysqlConnection"
|
||||
REQUIRED="true" FILTER="tMysqlConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='MYSQL') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
></PARAMETER>
|
||||
@@ -433,7 +433,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_NETEZZA"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tNetezzaConnection"
|
||||
REQUIRED="true" FILTER="tNetezzaConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='NETEZZA') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -443,7 +443,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_ORACLE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tOracleConnection"
|
||||
REQUIRED="true" FILTER="tOracleConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='DBORACLE') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -478,7 +478,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_POSTGRE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tPostgresqlConnection"
|
||||
REQUIRED="true" FILTER="tPostgresqlConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='POSTGRE') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -501,7 +501,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_POSTGREPLUS"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tPostgresPlusConnection"
|
||||
REQUIRED="true" FILTER="tPostgresPlusConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='POSTGREPLUS') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -511,7 +511,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_SQLITE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tSQLiteConnection"
|
||||
REQUIRED="true" FILTER="tSQLiteConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='SQLITE') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -525,7 +525,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_SYBASE"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tSybaseConnection"
|
||||
REQUIRED="true" FILTER="tSybaseConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='SYBASE') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -535,7 +535,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_TERADATA"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tTeradataConnection"
|
||||
REQUIRED="true" FILTER="tTeradataConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='TERADATA') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -552,7 +552,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_GREENPLUM"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tGreenplumConnection"
|
||||
REQUIRED="true" FILTER="tGreenplumConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='GREENPLUM') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -577,12 +577,13 @@
|
||||
<ITEM NAME="VERTICA_5_1" VALUE="VERTICA_5_1" />
|
||||
<ITEM NAME="VERTICA_6_0" VALUE="VERTICA_6_0" />
|
||||
<ITEM NAME="VERTICA_6_1_X" VALUE="VERTICA_6_1_X" />
|
||||
<ITEM NAME="VERTICA_7_0_X" VALUE="VERTICA_7_0_X" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="CONNECTION_VERTICA"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tVerticaConnection"
|
||||
REQUIRED="true" FILTER="tVerticaConnection"
|
||||
NUM_ROW="30"
|
||||
SHOW_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'true')"
|
||||
/>
|
||||
@@ -712,6 +713,7 @@
|
||||
<IMPORT NAME="Driver-VERTICA_5.1" MODULE="vertica_5.1.6_jdk_5.jar" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_5_1')" />
|
||||
<IMPORT NAME="Driver-VERTICA_6.0" MODULE="vertica-jdk5-6.0.2-0.jar" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_6_0')" />
|
||||
<IMPORT NAME="Driver-VERTICA_6.1.2" MODULE="vertica-jdk5-6.1.2-0.jar" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_6_1_X')" />
|
||||
<IMPORT NAME="Driver-VERTICA_7.0.1" MODULE="vertica-jdbc-7.0.1-0.jar" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_7_0_X')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -1635,7 +1635,7 @@ class VerticaManager extends Manager {
|
||||
this.connection = connection;
|
||||
}
|
||||
protected String getDriver() {
|
||||
if("VERTICA_6_1_X".equals(db_version) || "VERTICA_6_0".equals(db_version) || "VERTICA_5_1".equals(db_version)){
|
||||
if("VERTICA_7_0_X".equals(db_version) || "VERTICA_6_1_X".equals(db_version) || "VERTICA_6_0".equals(db_version) || "VERTICA_5_1".equals(db_version)){
|
||||
return "com.vertica.jdbc.Driver";
|
||||
}else{
|
||||
return "com.vertica.Driver";
|
||||
|
||||
@@ -101,6 +101,7 @@ DB_VERTICA_VERSION.ITEM.VERTICA_5.0=Vertica 5.0
|
||||
DB_VERTICA_VERSION.ITEM.VERTICA_5_1=Vertica 5.1
|
||||
DB_VERTICA_VERSION.ITEM.VERTICA_6_0=Vertica 6.0
|
||||
DB_VERTICA_VERSION.ITEM.VERTICA_6_1_X=Vertica 6.1.X
|
||||
DB_VERTICA_VERSION.ITEM.VERTICA_7_0_X=Vertica 7.0.X
|
||||
DB_POSTGRE_VERSION.NAME=DB Version
|
||||
DB_POSTGRE_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
|
||||
DB_POSTGRE_VERSION.ITEM.V9_X=v9.X
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="10"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
</PARAMETERS>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection" NUM_ROW="5"
|
||||
REQUIRED="true" FILTER="tDB2Connection" NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
<PARAMETER NAME="PROPERTY" FIELD="PROPERTY_TYPE" SHOW="true"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="11"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tDB2Connection"
|
||||
REQUIRED="true" FILTER="tDB2Connection"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
NUM_ROW="5" SHOW_IF="USE_STATIC_METHOD == 'false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="INSTANCE" FIELD="COMPONENT_LIST" FILTER="REGEXP:^tDotNET.*$"
|
||||
<PARAMETER NAME="INSTANCE" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="REGEXP:^tDotNET.*$"
|
||||
NUM_ROW="5"
|
||||
SHOW_IF="(USE_EXISTING_INSTANCE == 'true') AND (USE_STATIC_METHOD == 'false')" />
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tGreenplumConnection"
|
||||
REQUIRED="true" FILTER="tGreenplumConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tJDBCConnection"
|
||||
REQUIRED="true" FILTER="tJDBCConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tMSSqlConnection"
|
||||
REQUIRED="true" FILTER="tMSSqlConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tMysqlConnection"
|
||||
REQUIRED="true" FILTER="tMysqlConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tNetezzaConnection"
|
||||
REQUIRED="true" FILTER="tNetezzaConnection"
|
||||
NUM_ROW="10"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tOracleConnection"
|
||||
REQUIRED="true" FILTER="tOracleConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tPostgresqlConnection"
|
||||
REQUIRED="true" FILTER="tPostgresqlConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tSybaseConnection"
|
||||
REQUIRED="true" FILTER="tSybaseConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tTeradataConnection"
|
||||
REQUIRED="true" FILTER="tTeradataConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
@@ -45,7 +45,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -45,7 +45,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -44,7 +44,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -45,7 +45,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -44,7 +44,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -44,7 +44,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tEXistConnection"
|
||||
REQUIRED="true" FILTER="tEXistConnection"
|
||||
NUM_ROW="1"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -12,20 +12,17 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USER__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASS__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node, "__CONNECT_MODE__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node, "__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
boolean sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
String authMethod = ElementParameterParser.getValue(node, "__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node, "__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node, "__PASSPHRASE__");
|
||||
boolean ftps = ("true").equals(ElementParameterParser.getValue(node, "__FTPS__"));
|
||||
String keystoreFile = ElementParameterParser.getValue(node, "__KEYSTORE_FILE__");
|
||||
String keystorePass = ElementParameterParser.getValue(node, "__KEYSTORE_PASS__");
|
||||
String sEncoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String securityMode = ElementParameterParser.getValue(node, "__SECURITY_MODE__");
|
||||
|
||||
@@ -33,13 +30,22 @@ boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.ge
|
||||
if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Start to work.");
|
||||
<%}
|
||||
String passwordFieldName = "";
|
||||
if (useProxy) {
|
||||
%>
|
||||
java.util.Properties props_<%=cid%> = System.getProperties();
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -61,8 +67,14 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
log.info("<%=cid%> - Authentication using a password.");
|
||||
log.info("<%=cid%> - Connection attempt to '" + <%=host %> + "' as '" +<%=user %>+ "'.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
ftp_<%=cid %>.connect();
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host %> + "' has succeeded.");
|
||||
<%}%>
|
||||
@@ -71,8 +83,16 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
} else if (!ftps) { // *** sftp *** //
|
||||
%>
|
||||
class MyUserInfo implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
@@ -88,7 +108,11 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -108,7 +132,12 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - SFTP authentication using a password.");
|
||||
<%}%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
@@ -143,7 +172,15 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
java.security.cert.CertificateException, java.security.UnrecoverableKeyException,
|
||||
java.io.FileNotFoundException, java.io.IOException{
|
||||
java.security.KeyStore ks = java.security.KeyStore.getInstance("JKS");
|
||||
ks.load(new java.io.FileInputStream(<%=keystoreFile%>), <%=keystorePass%>.toCharArray());
|
||||
<%
|
||||
passwordFieldName = "__KEYSTORE_PASS__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedKeyStorePassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedKeyStorePassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
ks.load(new java.io.FileInputStream(<%=keystoreFile%>), decryptedKeyStorePassword_<%=cid%>.toCharArray());
|
||||
javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance(javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm());
|
||||
tmf.init(ks);
|
||||
return tmf.getTrustManagers();
|
||||
@@ -182,7 +219,12 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host %> + "' has succeeded.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
} catch (java.lang.IllegalStateException e) {
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.error("<%=cid%> - " + e.getMessage());
|
||||
|
||||
@@ -14,18 +14,17 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node,"__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node,"__PASSPHRASE__");
|
||||
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node,"__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node,"__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node,"__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node,"__CONNECT_MODE__");
|
||||
String fileOrDir = ElementParameterParser.getValue(node, "__FILE_OR_DIRECTORY__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
@@ -45,6 +44,7 @@ if (("true").equals(useExistingConn)) {
|
||||
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
}
|
||||
|
||||
String passwordFieldName = "";
|
||||
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
|
||||
//And it can not work with the FTP proxy directly, only support the socks proxy.
|
||||
if(useProxy){
|
||||
@@ -53,7 +53,15 @@ if(useProxy){
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
@@ -63,7 +71,15 @@ if (sftp) {
|
||||
if (("false").equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid %> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
@@ -73,7 +89,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -86,7 +106,11 @@ if (sftp) {
|
||||
com.jcraft.jsch.Session session_<%=cid%>=jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
|
||||
|
||||
<%if (("PASSWORD").equals(authMethod)){ %>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -141,7 +165,11 @@ if (sftp) {
|
||||
<%}%>
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
java.util.List<java.util.Map<String,String>> list<%=cid %> = new java.util.ArrayList<java.util.Map<String,String>>();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -13,20 +13,20 @@ String cid = node.getUniqueName();
|
||||
String host=ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port=ElementParameterParser.getValue(node, "__PORT__");
|
||||
String username=ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password=ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String remoteDir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String filename = ElementParameterParser.getValue(node, "__FILENAME__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node, "__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPass = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
String authMethod = ElementParameterParser.getValue(node, "__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node, "__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node, "__PASSPHRASE__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node, "__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
String conn= "conn_" + connection;
|
||||
@@ -50,6 +50,9 @@ if (("true").equals(useExistingConn)) {
|
||||
log.info("<%=cid%> - Start to work.");
|
||||
<%
|
||||
}
|
||||
|
||||
String passwordFieldName = "";
|
||||
|
||||
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
|
||||
//And it can not work with the FTP proxy directly, only support the socks proxy.
|
||||
if (useProxy) {
|
||||
@@ -58,7 +61,15 @@ if (useProxy) {
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPass %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -67,7 +78,15 @@ if (sftp) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid%> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
@@ -83,7 +102,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -103,7 +126,11 @@ if (sftp) {
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - SFTP authentication using a password.");
|
||||
<%}%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -170,7 +197,11 @@ if (sftp) {
|
||||
log.info("<%=cid%> - Connection attempt to '" + <%=host %> + "' as '" +<%=username %>+ "'.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=username %>, <%=password %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=username %>, decryptedPassword_<%=cid%>);
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host%> + "' has succeeded.");
|
||||
<%}%>
|
||||
|
||||
@@ -51,7 +51,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -13,19 +13,19 @@ INode node = (INode)codeGenArgument.getArgument();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
boolean dirFull = ("true").equals(ElementParameterParser.getValue(node, "__DIR_FULL__"));
|
||||
String cid = node.getUniqueName();
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String authMethod = ElementParameterParser.getValue(node, "__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node, "__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node, "__PASSPHRASE__");
|
||||
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node, "__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node, "__CONNECT_MODE__");
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
@@ -45,6 +45,7 @@ if (("true").equals(useExistingConn)) {
|
||||
} else {
|
||||
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
}
|
||||
String passwordFieldName = "";
|
||||
%>
|
||||
java.util.List<String> maskList_<%=cid %> = new java.util.ArrayList<String>();
|
||||
|
||||
@@ -70,7 +71,15 @@ if (useProxy) {
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -79,7 +88,15 @@ if (sftp) {
|
||||
if (("false").equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid%> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
@@ -95,7 +112,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -108,7 +129,11 @@ if (sftp) {
|
||||
com.jcraft.jsch.Session session_<%=cid%>=jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
|
||||
|
||||
<%if (("PASSWORD").equals(authMethod)) {%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -183,7 +208,11 @@ if (sftp) {
|
||||
<%}%>
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
String remotedir_<%=cid %> = <%=remotedir%>;
|
||||
ftp_<%=cid %>.chdir(remotedir_<%=cid %>);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -15,7 +15,7 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String filename = ElementParameterParser.getValue(node, "__FILENAME__");
|
||||
String remoteDir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
@@ -23,12 +23,12 @@ String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
String authMethod = ElementParameterParser.getValue(node, "__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node, "__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node, "__PASSPHRASE__");
|
||||
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node, "__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node, "__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
String conn= "conn_" + connection;
|
||||
@@ -49,13 +49,22 @@ if (("true").equals(useExistingConn)) {
|
||||
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
}
|
||||
|
||||
String passwordFieldName = "";
|
||||
if (useProxy) {
|
||||
%>
|
||||
java.util.Properties props_<%=cid%> = System.getProperties();
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
String outputConnName = null;
|
||||
@@ -84,7 +93,15 @@ if (sftp) {
|
||||
if (("false").equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid%> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
@@ -94,7 +111,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -107,7 +128,11 @@ if (sftp) {
|
||||
com.jcraft.jsch.Session session_<%=cid%>=jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
|
||||
|
||||
<%if (("PASSWORD").equals(authMethod)) {%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -176,7 +201,11 @@ if (sftp) {
|
||||
<%}%>
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=username %>, <%=password %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=username %>, decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
<%
|
||||
//add feature 19709,add the "Transfer mode" option,
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="11"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -14,7 +14,7 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String overwrite = ElementParameterParser.getValue(node, "__OVERWRITE__");
|
||||
String sftpoverwrite =ElementParameterParser.getValue(node, "__SFTPOVERWRITE__");
|
||||
String localdir = ElementParameterParser.getValue(node, "__LOCALDIR__");
|
||||
@@ -22,15 +22,15 @@ String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node,"__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node,"__PASSPHRASE__");
|
||||
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node,"__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node,"__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node,"__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
|
||||
String keystoreFile = ElementParameterParser.getValue(node,"__KEYSTORE_FILE__");
|
||||
String keystorePass = ElementParameterParser.getValue(node,"__KEYSTORE_PASS__");
|
||||
|
||||
boolean append = "true".equals(ElementParameterParser.getValue(node, "__APPEND__"));
|
||||
String connectMode = ElementParameterParser.getValue(node,"__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
@@ -42,6 +42,7 @@ boolean sftp = false;
|
||||
boolean ftps = false;
|
||||
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
String passwordFieldName = "";
|
||||
if ("true".equals(useExistingConn)) {
|
||||
List<? extends INode> nodeList = node.getProcess().getGeneratingNodes();
|
||||
|
||||
@@ -71,7 +72,15 @@ if (useProxy){
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -83,7 +92,15 @@ if (sftp) { // *** sftp *** //
|
||||
if ("false".equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid %> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
|
||||
@@ -99,7 +116,11 @@ if (sftp) { // *** sftp *** //
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -260,7 +281,11 @@ if (sftp) { // *** sftp *** //
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - SFTP authentication using a password.");
|
||||
<%}%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
@@ -539,7 +564,11 @@ if (sftp) { // *** sftp *** //
|
||||
log.info("<%=cid%> - Connection attempt to '" + <%=host %> + "' as '" +<%=user %>+ "'.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host %> + "' has succeeded.");
|
||||
<%}%>
|
||||
@@ -646,7 +675,15 @@ if (sftp) { // *** sftp *** //
|
||||
java.io.FileNotFoundException, java.io.IOException {
|
||||
|
||||
java.security.KeyStore ks = java.security.KeyStore.getInstance("JKS");
|
||||
ks.load(new java.io.FileInputStream(<%=keystoreFile%>), <%=keystorePass%>.toCharArray());
|
||||
<%
|
||||
passwordFieldName = "__KEYSTORE_PASS__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedKeyStorePassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedKeyStorePassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
ks.load(new java.io.FileInputStream(<%=keystoreFile%>), decryptedKeyStorePassword_<%=cid%>.toCharArray());
|
||||
javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance(javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm());
|
||||
tmf.init(ks);
|
||||
return tmf.getTrustManagers();
|
||||
@@ -690,7 +727,11 @@ if (sftp) { // *** sftp *** //
|
||||
log.info("<%=cid%> - Connection attempt to '" + <%=host %> + "' as '" + <%=user %>+ "'.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.connect(<%=host %>,<%=port %>);
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host %> + "' has succeeded.");
|
||||
<%}%>
|
||||
|
||||
@@ -52,7 +52,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -14,19 +14,19 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String localdir = ElementParameterParser.getValue(node, "__LOCALDIR__");
|
||||
String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String authMethod = ElementParameterParser.getValue(node, "__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node, "__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node, "__PASSPHRASE__");
|
||||
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node, "__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node, "__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
String useExistingConn = ElementParameterParser.getValue(node, "__USE_EXISTING_CONNECTION__");
|
||||
@@ -34,6 +34,7 @@ boolean moveToCurrentDir = ("true").equals(ElementParameterParser.getValue(node,
|
||||
boolean sftp = false;
|
||||
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
String passwordFieldName = "";
|
||||
if (("true").equals(useExistingConn)) {
|
||||
List<? extends INode> nodeList = node.getProcess().getGeneratingNodes();
|
||||
|
||||
@@ -59,7 +60,15 @@ if (useProxy) {
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password",decryptedProxyPassword_<%=cid%>);
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
@@ -85,7 +94,15 @@ int nb_file_<%=cid%> = 0;
|
||||
}
|
||||
<%} else {%>
|
||||
class MyUserInfo_<%=cid %> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
@@ -95,7 +112,11 @@ int nb_file_<%=cid%> = 0;
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -115,7 +136,11 @@ int nb_file_<%=cid%> = 0;
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - SFTP authentication using a password.");
|
||||
<%}%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -199,7 +224,11 @@ int nb_file_<%=cid%> = 0;
|
||||
log.info("<%=cid%> - Connection attempt to '" + <%=host %> + "' as '" +<%=user %>+ "'.");
|
||||
<%}%>
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '" + <%=host %> + "' has succeeded.");
|
||||
<%}%>
|
||||
|
||||
@@ -52,7 +52,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -14,18 +14,18 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node,"__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node,"__PASSPHRASE__");
|
||||
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node,"__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node,"__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node,"__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node,"__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
String conn= "conn_" + connection;
|
||||
@@ -45,6 +45,7 @@ if (("true").equals(useExistingConn)) {
|
||||
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
}
|
||||
|
||||
String passwordFieldName = "";
|
||||
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
|
||||
//And it can not work with the FTP proxy directly, only support the socks proxy.
|
||||
if (useProxy) {
|
||||
@@ -53,7 +54,15 @@ if (useProxy) {
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
@@ -63,7 +72,15 @@ if (sftp) {
|
||||
if (("false").equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid%> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
@@ -73,7 +90,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -86,7 +107,11 @@ if (sftp) {
|
||||
com.jcraft.jsch.Session session_<%=cid%>=jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
|
||||
|
||||
<%if (("PASSWORD").equals(authMethod)) {%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
@@ -149,7 +174,11 @@ if (sftp) {
|
||||
<%}%>
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
java.util.List<java.util.Map<String,String>> list<%=cid %> = new java.util.ArrayList<java.util.Map<String,String>>();
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -14,18 +14,18 @@ String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String user = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String pass = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
String remotedir = ElementParameterParser.getValue(node, "__REMOTEDIR__");
|
||||
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
String privateKey = ElementParameterParser.getValue(node,"__PRIVATEKEY__");
|
||||
String passPhrase = ElementParameterParser.getValue(node,"__PASSPHRASE__");
|
||||
|
||||
List<Map<String, String>> files = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__FILES__");
|
||||
boolean useProxy = ("true").equals(ElementParameterParser.getValue(node,"__USE_PROXY__"));
|
||||
String proxyHost = ElementParameterParser.getValue(node,"__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node,"__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
|
||||
String connectMode = ElementParameterParser.getValue(node,"__CONNECT_MODE__");
|
||||
String connection = ElementParameterParser.getValue(node, "__CONNECTION__");
|
||||
String conn= "conn_" + connection;
|
||||
@@ -45,6 +45,7 @@ if (("true").equals(useExistingConn)) {
|
||||
sftp = ("true").equals(ElementParameterParser.getValue(node, "__SFTP__"));
|
||||
}
|
||||
|
||||
String passwordFieldName = "";
|
||||
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
|
||||
//And it can not work with the FTP proxy directly, only support the socks proxy.
|
||||
if (useProxy) {
|
||||
@@ -53,7 +54,15 @@ if (useProxy) {
|
||||
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
|
||||
props_<%=cid%>.put("socksProxyHost", <%=proxyHost %>);
|
||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
passwordFieldName = "__PROXY_PASSWORD__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedProxyPassword_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
@@ -63,7 +72,15 @@ if (sftp) {
|
||||
if (("false").equals(useExistingConn)) {
|
||||
%>
|
||||
class MyUserInfo_<%=cid%> implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive {
|
||||
String passphrase_<%=cid %> = <%=passPhrase %>;
|
||||
<%
|
||||
passwordFieldName = "__PASSPHRASE__";
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
String decryptedPassphrase_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
String decryptedPassphrase_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String passphrase_<%=cid %> = decryptedPassphrase_<%=cid%>;
|
||||
public String getPassphrase() { return passphrase_<%=cid %>; }
|
||||
public String getPassword() { return null; }
|
||||
public boolean promptPassword(String arg0) { return true; }
|
||||
@@ -73,7 +90,11 @@ if (sftp) {
|
||||
|
||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||
boolean[] echo) {
|
||||
String[] password_<%=cid%> = {<%=pass%>};
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String[] password_<%=cid%> = {decryptedPassword_<%=cid%>};
|
||||
return password_<%=cid%>;
|
||||
}
|
||||
};
|
||||
@@ -86,7 +107,11 @@ if (sftp) {
|
||||
com.jcraft.jsch.Session session_<%=cid%>=jsch_<%=cid%>.getSession(<%=user%>, <%=host%>, <%=port%>);
|
||||
|
||||
<%if (("PASSWORD").equals(authMethod)) {%>
|
||||
session_<%=cid%>.setPassword(<%=pass%>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
session_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
session_<%=cid%>.setUserInfo(defaultUserInfo_<%=cid%>);
|
||||
<%if (!useProxy) {%>
|
||||
@@ -145,7 +170,11 @@ if (sftp) {
|
||||
<%}%>
|
||||
ftp_<%=cid %>.setControlEncoding(<%=encoding%>);
|
||||
ftp_<%=cid %>.connect();
|
||||
ftp_<%=cid %>.login(<%=user %>, <%=pass %>);
|
||||
<%
|
||||
passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
ftp_<%=cid %>.login(<%=user %>, decryptedPassword_<%=cid%>);
|
||||
<%}%>
|
||||
java.util.List<java.util.Map<String,String>> list<%=cid %> = new java.util.ArrayList<java.util.Map<String,String>>();
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ COMPATIBILITY="ALL"
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFTPConnection"
|
||||
REQUIRED="true" FILTER="tFTPConnection"
|
||||
NUM_ROW="2"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
/>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
boolean overwrite = ("true").equals(ElementParameterParser.getValue(node, "__OVERWRITE__"));
|
||||
String encoding = ElementParameterParser.getValue(node,"__ENCODING__");
|
||||
boolean isEncrypted = ("true").equals(ElementParameterParser.getValue(node, "__ENCRYPT_FILES__"));
|
||||
String password = ElementParameterParser.getValue(node,"__PASSWORD__");
|
||||
|
||||
List<Map<String, String>> masks = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__MASK__");
|
||||
|
||||
@@ -70,7 +69,11 @@
|
||||
zip_<%=cid%>.setEncoding(<%=encoding%>);
|
||||
zip_<%=cid%>.setZip64Mode("<%=zip64Mode%>");
|
||||
zip_<%=cid%>.setEncrypted(<%=isEncrypted%>);
|
||||
zip_<%=cid%>.setPassword(<%=password%>);
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
zip_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
|
||||
zip_<%=cid%>.doZip();
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ java.io.InputStream retIS_<%=cid%> = null;
|
||||
if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
String uri = ElementParameterParser.getValue(node, "__URI__");
|
||||
String username = ElementParameterParser.getValue(node, "__AUTH_USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__AUTH_PASSWORD__");
|
||||
String timeout = ElementParameterParser.getValue(node, "__TIMEOUT__");
|
||||
String cookieDir = ElementParameterParser.getValue(node, "__COOKIE_DIR__");
|
||||
String cookiePolicy = ElementParameterParser.getValue(node,"__COOKIE_POLICY__");
|
||||
@@ -33,7 +32,6 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
String proxyHost = ElementParameterParser.getValue(node, "__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node, "__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node, "__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node, "__PROXY_PASSWORD__");
|
||||
String proxyDomain = ElementParameterParser.getValue(node, "__PROXY_DOMAIN__");
|
||||
boolean post = "true".equals(ElementParameterParser.getValue(node, "__POST__"));
|
||||
boolean printResponse = "true".equals(ElementParameterParser.getValue(node, "__PRINT__"));
|
||||
@@ -170,25 +168,38 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
|
||||
if (useProxy) {%>
|
||||
client_<%=cid %>.getHostConfiguration().setProxy(<%=proxyHost %>, Integer.parseInt(<%=proxyPort%>));
|
||||
<%
|
||||
String passwordFieldName = "__PROXY_PASSWORD__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
<%if (useProxyNTLM) {%>
|
||||
client_<%=cid %>.getState().setProxyCredentials(
|
||||
new org.apache.commons.httpclient.auth.AuthScope( <%=proxyHost %>, Integer.parseInt(<%=proxyPort%>), null ),
|
||||
new org.apache.commons.httpclient.NTCredentials( <%=proxyUser %>,
|
||||
<%=proxyPassword %>, <%=proxyHost %>, <%=proxyDomain %> ));
|
||||
decryptedPassword_<%=cid%>, <%=proxyHost %>, <%=proxyDomain %> ));
|
||||
<%} else {%>
|
||||
client_<%=cid %>.getState().setProxyCredentials(
|
||||
new org.apache.commons.httpclient.auth.AuthScope(<%=proxyHost %>, Integer.parseInt(<%=proxyPort%>), null),
|
||||
new org.apache.commons.httpclient.UsernamePasswordCredentials(<%=proxyUser %>, <%=proxyPassword %>));
|
||||
new org.apache.commons.httpclient.UsernamePasswordCredentials(<%=proxyUser %>, decryptedPassword_<%=cid%>));
|
||||
<%}
|
||||
}
|
||||
|
||||
if (needAuth) {
|
||||
if (ElementParameterParser.canEncrypt(node, "__AUTH_PASSWORD__")) {
|
||||
%>
|
||||
String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, "__AUTH_PASSWORD__")%>);
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(node, "__AUTH_PASSWORD__")%>;
|
||||
<%
|
||||
}
|
||||
if ((!useProxy) && useProxyNTLM && (!"".equals(proxyDomain))) {
|
||||
%>
|
||||
client_<%=cid %>.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, new org.apache.commons.httpclient.NTCredentials(<%=username %>, <%=password %>, new java.net.URL(<%=uri%>).getHost(), <%=proxyDomain%>));
|
||||
client_<%=cid %>.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, new org.apache.commons.httpclient.NTCredentials(<%=username %>, decryptedPwd_<%=cid%>, new java.net.URL(<%=uri%>).getHost(), <%=proxyDomain%>));
|
||||
<%} else {%>
|
||||
client_<%=cid %>.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, new org.apache.commons.httpclient.UsernamePasswordCredentials(<%=username %>, <%=password %>));
|
||||
client_<%=cid %>.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, new org.apache.commons.httpclient.UsernamePasswordCredentials(<%=username %>, decryptedPwd_<%=cid%>));
|
||||
<%}
|
||||
}
|
||||
|
||||
@@ -389,7 +400,6 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
String proxyHost = ElementParameterParser.getValue(node,"__PROXY_HOST__");
|
||||
String proxyPort = ElementParameterParser.getValue(node,"__PROXY_PORT__");
|
||||
String proxyUser = ElementParameterParser.getValue(node,"__PROXY_USERNAME__");
|
||||
String proxyPassword = ElementParameterParser.getValue(node,"__PROXY_PASSWORD__");
|
||||
|
||||
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
|
||||
//And it can not work with the FTP proxy directly, only support the socks proxy.
|
||||
@@ -399,7 +409,11 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
props.put("socksProxyPort", <%=proxyPort %>);
|
||||
props.put("socksProxyHost", <%=proxyHost %>);
|
||||
props.put("java.net.socks.username", <%=proxyUser %>);
|
||||
props.put("java.net.socks.password", <%=proxyPassword %>);
|
||||
<%
|
||||
String passwordFieldName = "__PROXY_PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
props.put("java.net.socks.password", decryptedPassword_<%=cid%>);
|
||||
<% }%>
|
||||
//open url stream
|
||||
java.net.URL url_<%=cid %> = new java.net.URL(<%=uri %>);
|
||||
@@ -473,12 +487,15 @@ if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||
String srcurl = ElementParameterParser.getValue(node, "__SMB_URI__");
|
||||
String domain = ElementParameterParser.getValue(node,"__SMB_DOMAIN__");
|
||||
String username = ElementParameterParser.getValue(node,"__SMB_USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node,"__SMB_PASSWORD__");
|
||||
%>
|
||||
String srcurl_<%=cid %> = <%=srcurl %>;
|
||||
String fileName_<%=cid %> = <%=filename %>;
|
||||
String username_<%=cid %> = <%=username %>;
|
||||
String password_<%=cid %> = <%=password %>;
|
||||
<%
|
||||
String passwordFieldName = "__SMB_PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String password_<%=cid %> = decryptedPassword_<%=cid%>;
|
||||
|
||||
if (fileName_<%=cid %>.compareTo("") == 0) {
|
||||
fileName_<%=cid %> = srcurl_<%=cid %>.substring(srcurl_<%=cid %>.lastIndexOf("/"));
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
NUM_ROW="5">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="DYNAMIC" FIELD="COMPONENT_LIST" FILTER="tSetDynamicSchema"
|
||||
<PARAMETER NAME="DYNAMIC" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tSetDynamicSchema"
|
||||
NUM_ROW="5" SHOW_IF="USE_EXISTING_DYNAMIC == 'true'"/>
|
||||
<PARAMETER
|
||||
NAME="FILENAME"
|
||||
|
||||
@@ -21,22 +21,6 @@ CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
|
||||
List<? extends IConnection> listInConns = node.getIncomingConnections();
|
||||
String sInConnName = null;
|
||||
IConnection inConn = null;
|
||||
List<IMetadataColumn> listInColumns = null;
|
||||
|
||||
if (listInConns != null && listInConns.size() > 0) {
|
||||
IConnection inConnTemp = listInConns.get(0);
|
||||
sInConnName = inConnTemp.getName();
|
||||
if (inConnTemp.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)){
|
||||
inConn = inConnTemp;
|
||||
listInColumns = inConnTemp.getMetadataTable().getListColumns();
|
||||
}
|
||||
}
|
||||
|
||||
String inConnName = null;
|
||||
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
@@ -90,7 +74,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
}else{
|
||||
writerClass = "java.io.BufferedWriter";
|
||||
}
|
||||
boolean hasDynamic = metadata.isDynamicSchema();
|
||||
String dynamic = ElementParameterParser.getValue(node, "__DYNAMIC__");
|
||||
boolean useExistingDynamic = "true".equals(ElementParameterParser.getValue(node, "__USE_EXISTING_DYNAMIC__"));
|
||||
String dyn = dynamic+"_DYNAMIC";
|
||||
@@ -101,30 +84,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
dynamic_<%=cid %>.clearColumnValues();
|
||||
<%
|
||||
}
|
||||
class FindConnStartConn{
|
||||
IConnection findStartConn(IConnection conn){
|
||||
INode node = conn.getSource();
|
||||
if(node.isSubProcessStart() || !(NodeUtil.isDataAutoPropagated(node))){
|
||||
return conn;
|
||||
}
|
||||
List<? extends IConnection> listInConns = node.getIncomingConnections();
|
||||
IConnection inConnTemp = null;
|
||||
if (listInConns != null && listInConns.size() > 0) {
|
||||
inConnTemp = listInConns.get(0);
|
||||
if (inConnTemp.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)){
|
||||
return findStartConn(inConnTemp);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if(inConn != null){
|
||||
FindConnStartConn finder = new FindConnStartConn();
|
||||
IConnection startConn = finder.findStartConn(inConn);
|
||||
if(startConn!=null){
|
||||
inConnName = startConn.getName();
|
||||
}
|
||||
}
|
||||
%>
|
||||
int nb_line_<%=cid%> = 0;
|
||||
|
||||
@@ -371,7 +330,7 @@ Arrays_<%=cid %> arrays_<%=cid %> = new Arrays_<%=cid %>();
|
||||
String patternValue = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
|
||||
if(i%100==0){
|
||||
%>
|
||||
void setValue_<%=i/100%>(final <%=inConnName!=null?inConnName:conn.getName() %>Struct <%=conn.getName() %>,StringBuilder sb_<%=cid %>,String tempStringM<%=cid %>,int tempLengthM<%=cid %><% if(useByte){ %>,byte[] byteArray_<%=cid %>,Arrays_<%=cid %> arrays_<%=cid %><% } %>)throws IOException,java.io.UnsupportedEncodingException{
|
||||
void setValue_<%=i/100%>(final <%=NodeUtil.getPrivateConnClassName(conn) %>Struct <%=conn.getName() %>,StringBuilder sb_<%=cid %>,String tempStringM<%=cid %>,int tempLengthM<%=cid %><% if(useByte){ %>,byte[] byteArray_<%=cid %>,Arrays_<%=cid %> arrays_<%=cid %><% } %>)throws IOException,java.io.UnsupportedEncodingException{
|
||||
<%
|
||||
}
|
||||
if("id_Dynamic".equals(column.getTalendType())){
|
||||
@@ -711,8 +670,6 @@ Arrays_<%=cid %> arrays_<%=cid %> = new Arrays_<%=cid %>();
|
||||
int tempLengthB<%=cid %>=0;
|
||||
<%
|
||||
for (int i = 0; i < sizeColumns; i++) {
|
||||
IMetadataColumn column = columns.get(i);
|
||||
Map<String, String> format=formats.get(i);
|
||||
if(i%100==0){
|
||||
%>
|
||||
positionUtil_<%=cid%>.writeHeader_<%=i/100%>(tempStringB<%=cid %>,tempLengthB<%=cid %>,out<%=cid %><% if(useByte){ %>,byteArray_<%=cid %>,arrays_<%=cid %><% }%>);
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
boolean isDeleteEmptyFile = ("true").equals(ElementParameterParser.getValue(node, "__DELETE_EMPTYFILE__"));
|
||||
boolean isAppend = ("true").equals(ElementParameterParser.getValue(node,"__APPEND__"));
|
||||
|
||||
boolean useStream = ("true").equals(ElementParameterParser.getValue(node,"__USESTREAM__"));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
NUM_ROW="3">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="DYNAMIC" FIELD="COMPONENT_LIST" FILTER="tSetDynamicSchema"
|
||||
<PARAMETER NAME="DYNAMIC" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tSetDynamicSchema"
|
||||
NUM_ROW="3" SHOW_IF="USE_EXISTING_DYNAMIC == 'true'"/>
|
||||
<PARAMETER NAME="USESTREAM" FIELD="CHECK" NUM_ROW="5">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
java.util.Map
|
||||
org.talend.core.model.metadata.types.JavaTypesManager
|
||||
org.talend.core.model.metadata.types.JavaType
|
||||
"
|
||||
%>
|
||||
<%
|
||||
@@ -29,11 +27,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
"__ROWSEPARATOR__"
|
||||
);
|
||||
|
||||
String encoding = ElementParameterParser.getValue(
|
||||
node,
|
||||
"__ENCODING__"
|
||||
);
|
||||
|
||||
List<Map<String, String>> formats =
|
||||
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
|
||||
node,
|
||||
@@ -63,10 +56,6 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
List<IMetadataColumn> columns = metadata.getListColumns();
|
||||
int sizeColumns = columns.size();
|
||||
for (int i = 0; i < sizeColumns; i++) {
|
||||
IMetadataColumn column = columns.get(i);
|
||||
Map<String,String> format=formats.get(i);
|
||||
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
|
||||
String patternValue = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
|
||||
if(i%100==0){
|
||||
%>
|
||||
positionUtil_<%=cid%>.setValue_<%=i/100%>(<%=conn.getName() %>,sb_<%=cid %>,tempStringM<%=cid %>,tempLengthM<%=cid %><% if(useByte){ %>,byteArray_<%=cid %>,arrays_<%=cid %><% }%>);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
boolean isArchiveValid = ("true").equals(ElementParameterParser.getValue(node, "__INTEGRITY__"));
|
||||
boolean isPasswordNeeded = ("true").equals(ElementParameterParser.getValue(node, "__CHECKPASSWORD__"));
|
||||
boolean needPrintout = ("true").equals(ElementParameterParser.getValue(node, "__PRINTOUT__"));
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
|
||||
%>
|
||||
com.talend.compress.zip.Util util_<%=cid %> = new com.talend.compress.zip.Util(<%=extractPath%>);
|
||||
@@ -144,7 +143,11 @@
|
||||
//the others all use the ZIP to decompression
|
||||
com.talend.compress.zip.Unzip unzip_<%=cid%> = new com.talend.compress.zip.Unzip(zipFileURL_<%=cid %>, outputPath_<%=cid %>);
|
||||
unzip_<%=cid%>.setNeedPassword(<%=isPasswordNeeded%>);
|
||||
unzip_<%=cid%>.setPassword(<%=password%>);
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
unzip_<%=cid%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
unzip_<%=cid%>.setCheckArchive(<%=isArchiveValid%>);
|
||||
unzip_<%=cid%>.setVerbose(<%=needPrintout%>);
|
||||
unzip_<%=cid%>.setExtractPath(<%=extractPath%>);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFirebirdConnection"
|
||||
REQUIRED="true" FILTER="tFirebirdConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
</PARAMETERS>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFirebirdConnection"
|
||||
REQUIRED="true" FILTER="tFirebirdConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
<PARAMETER
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
FILTER="tFirebirdConnection"
|
||||
REQUIRED="true" FILTER="tFirebirdConnection"
|
||||
NUM_ROW="11"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'true'"
|
||||
DYNAMIC_SETTINGS="true"/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user