Compare commits
95 Commits
patch/5.4.
...
patch/5.5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5b6610abb | ||
|
|
9d4155314f | ||
|
|
d03f803d06 | ||
|
|
c92187aac1 | ||
|
|
b54878022c | ||
|
|
e15fae7537 | ||
|
|
3f0be852c5 | ||
|
|
c6aa41b4b1 | ||
|
|
00f7756d2a | ||
|
|
15942688cf | ||
|
|
1960c9fcec | ||
|
|
82e2af536b | ||
|
|
ec60f556f5 | ||
|
|
96aafbd48f | ||
|
|
85a1808676 | ||
|
|
985409e0d1 | ||
|
|
30b5fe0da7 | ||
|
|
e022cf20f6 | ||
|
|
a014635905 | ||
|
|
c3bd080912 | ||
|
|
3fa50a4f21 | ||
|
|
8bfdf93db1 | ||
|
|
fa2d16e5f9 | ||
|
|
97d5f1a66b | ||
|
|
f997fc0b13 | ||
|
|
4a1e31721a | ||
|
|
a405b95163 | ||
|
|
6b95007b83 | ||
|
|
74d58990a5 | ||
|
|
71389f4cbd | ||
|
|
37882c9af1 | ||
|
|
46dc807cf6 | ||
|
|
3e67b87329 | ||
|
|
52f682f8aa | ||
|
|
a09f80f820 | ||
|
|
1d00461a67 | ||
|
|
4371d5c4f1 | ||
|
|
f4d6933606 | ||
|
|
d161df4d9d | ||
|
|
cdc2f75fca | ||
|
|
157c155039 | ||
|
|
b7b9014a42 | ||
|
|
3c66220478 | ||
|
|
0b01ac0c77 | ||
|
|
30ca4fbd51 | ||
|
|
319732bb46 | ||
|
|
b4cbb3125f | ||
|
|
e209c27e5c | ||
|
|
203a98680e | ||
|
|
ab806681eb | ||
|
|
9893b043b2 | ||
|
|
10784e1c82 | ||
|
|
519c30eab0 | ||
|
|
9c5d659a90 | ||
|
|
8e809eb7fa | ||
|
|
18fdc72f91 | ||
|
|
1f0ad82dd6 | ||
|
|
23829db528 | ||
|
|
2d3ecf42c4 | ||
|
|
b4a2caceff | ||
|
|
acbd77a5ff | ||
|
|
34f3b5057a | ||
|
|
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 |
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*/target
|
||||
/*/bin
|
||||
/*/class
|
||||
/*/classes
|
||||
/*/.settings
|
||||
/**/dev_con
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -266,7 +266,6 @@
|
||||
|
||||
//Username and password, http://jira.talendforge.org/browse/TESB-4073
|
||||
String username = ElementParameterParser.getValue(node, "__WMQ_USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__WMQ_PASSWORD__");
|
||||
String useAuth = ElementParameterParser.getValue(node, "__WMQ_AUTH__");
|
||||
|
||||
if(wmqPort.startsWith("\"")){
|
||||
@@ -304,7 +303,12 @@
|
||||
org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter connectionFactoryAdapter<%=node.getUniqueName()%>
|
||||
= new org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter();
|
||||
connectionFactoryAdapter<%=node.getUniqueName()%>.setUsername(<%=username%>);
|
||||
connectionFactoryAdapter<%=node.getUniqueName()%>.setPassword(<%=password%>);
|
||||
<%
|
||||
String cid = node.getUniqueName();
|
||||
String passwordFieldName = "__WMQ_PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
connectionFactoryAdapter<%=node.getUniqueName()%>.setPassword(decryptedPassword_<%=cid%>);
|
||||
connectionFactoryAdapter<%=node.getUniqueName()%>.setTargetConnectionFactory(jmsConnectionFactory);
|
||||
|
||||
camelContext.addComponent(<%=name%>,
|
||||
|
||||
@@ -910,7 +910,6 @@ if (isProvider) {
|
||||
|
||||
String securityType = ElementParameterParser.getValue(node, "__SECURITY_TYPE__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
String roleName = "\"\"";
|
||||
String alias = ElementParameterParser.getValue(node, "__ALIASNAME__").trim();
|
||||
boolean isProvider = node.getIncomingConnections().size()>0?false:true;
|
||||
@@ -957,13 +956,21 @@ if (isProvider) {
|
||||
roleName = "\"\"";
|
||||
}
|
||||
}
|
||||
|
||||
if((useSecurity || useRegistry) && !isProvider) {
|
||||
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
// CXF endpoint for <%=cid%>
|
||||
org.apache.camel.component.cxf.CxfEndpoint <%=endpointVar%> = getCxfEndpoint(<%=uriRef%>, <%=isProvider%>, <%=isUseAuthorization%>, <%=isUsePropagateSamlAP%>, <%=securityToken%>
|
||||
<%
|
||||
if((useSecurity || useRegistry) && !isProvider){
|
||||
%>
|
||||
,<%=username%>,<%=password%>, <%=roleName%>, <%=alias%>
|
||||
,<%=username%>,decryptedPassword_<%=cid%>, <%=roleName%>, <%=alias%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
@@ -1057,8 +1064,10 @@ if (isProvider) {
|
||||
if("".trim().equals(directory)){
|
||||
directory = null;
|
||||
}
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
org.apache.camel.component.file.remote.RemoteFileEndpoint<?> <%=ftpEndpointVar%> = getFtpEndpoint(<%=uriRef%>, <%=ftpServer%>, <%=userName%>, <%=password%>, <%=directory%>);
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
org.apache.camel.component.file.remote.RemoteFileEndpoint<?> <%=ftpEndpointVar%> = getFtpEndpoint(<%=uriRef%>, <%=ftpServer%>, <%=userName%>, decryptedPassword_<%=cid%>, <%=directory%>);
|
||||
<%
|
||||
|
||||
}else if("cMail".equals(nodeComponentName)){
|
||||
@@ -1071,15 +1080,15 @@ if (isProvider) {
|
||||
String uriRef = "uriMap.get(\"" + cid + "\")";
|
||||
|
||||
String userName = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
String password = ElementParameterParser.getValue(node, "__PASSWORD__");
|
||||
String subject = ElementParameterParser.getValue(node, "__SUBJECT__");
|
||||
String from = ElementParameterParser.getValue(node, "__FROM__");
|
||||
String to = ElementParameterParser.getValue(node, "__TO__");
|
||||
String cc = ElementParameterParser.getValue(node, "__CC__");
|
||||
String bcc = ElementParameterParser.getValue(node, "__BCC__");
|
||||
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
%>
|
||||
org.apache.camel.component.mail.MailEndpoint <%=mailEndpointVar%> = getMailEndpoint(<%=uriRef%>, <%=userName%>, <%=password%>, <%=subject%>, <%=from%>, <%=to%>, <%=cc%>, <%=bcc%>);
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
org.apache.camel.component.mail.MailEndpoint <%=mailEndpointVar%> = getMailEndpoint(<%=uriRef%>, <%=userName%>, decryptedPassword_<%=cid%>, <%=subject%>, <%=from%>, <%=to%>, <%=cc%>, <%=bcc%>);
|
||||
<% }else if("cAggregate".equals(nodeComponentName)){
|
||||
boolean usePersistence = "true".equals(ElementParameterParser.getValue(node, "__USE_PERSISTENCE__"));
|
||||
String repository = ElementParameterParser.getValue(node, "__REPOSITORY__");
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
boolean containsTPartitioner = node.getProcess().getNodesOfType("tPartitioner").size() > 0 ? true : false;
|
||||
String startNodeCid=node.getDesignSubjobStartNode().getUniqueName();
|
||||
ECodePart codePart = codeGenArgument.getCodePart();
|
||||
boolean trace = codeGenArgument.isTrace();
|
||||
@@ -48,25 +49,15 @@
|
||||
boolean hasParallelIterate = false;
|
||||
for (IConnection iterateConn : iterateConnSet) {
|
||||
parallelIterate = "true".equals(ElementParameterParser.getValue(iterateConn, "__ENABLE_PARALLEL__"));
|
||||
String iterateNodeName = iterateConn.getTarget().getUniqueName();
|
||||
if (parallelIterate) {
|
||||
%>
|
||||
TalendThreadPool mtp_<%=iterateConn.getTarget().getUniqueName() %> = new TalendThreadPool(<%=ElementParameterParser.getValue(iterateConn,"__NUMBER_PARALLEL__") %>);
|
||||
|
||||
<%
|
||||
if(!hasParallelIterate){
|
||||
hasParallelIterate = true;
|
||||
%>
|
||||
|
||||
final Object[] lockWrite = new Object[0];
|
||||
int threadIdCounter =0;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
globalMap.put("lockWrite_<%=iterateNodeName%>", new Object[0]);
|
||||
int threadIdCounter_<%=iterateNodeName%> =0;
|
||||
<%
|
||||
}
|
||||
|
||||
String iterateNodeName = iterateConn.getTarget().getUniqueName();
|
||||
%>
|
||||
int NB_ITERATE_<%=iterateNodeName %> = 0; //for statistics
|
||||
<%
|
||||
@@ -150,10 +141,14 @@
|
||||
%>
|
||||
if (execStat) {
|
||||
if(resourceMap.get("inIterateVComp") == null){
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=con.getUniqueName() %> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=con.getUniqueName() %>.putIfAbsent("<%=con.getUniqueName() %>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=con.getUniqueName() %> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=con.getUniqueName() %>.get("<%=con.getUniqueName() %>" + iterateLoop);
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>" + iterateId, stats_<%=con.getUniqueName() %>.incrementAndGet()<=1?0:1, 0);
|
||||
<%if(containsTPartitioner){%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=con.getUniqueName() %> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=con.getUniqueName() %>.putIfAbsent("<%=con.getUniqueName() %>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=con.getUniqueName() %> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=con.getUniqueName() %>.get("<%=con.getUniqueName() %>" + iterateLoop);
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>" + iterateId, stats_<%=con.getUniqueName() %>.incrementAndGet()<=1?0:1, 0);
|
||||
<%}else{%>
|
||||
runStat.updateStatOnConnection("<%=con.getUniqueName() %>" + iterateId, 0, 0);
|
||||
<%}%>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,10 +199,14 @@
|
||||
<%
|
||||
for(String connName : needToStartConnNames){
|
||||
%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=connName%> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=connName%>.putIfAbsent("<%=connName%>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=connName%> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=connName%>.get("<%=connName%>" + iterateLoop);
|
||||
runStat.updateStatOnConnection("<%=connName%>" + iterateId, stats_<%=connName%>.incrementAndGet()<=1?0:1, 0);
|
||||
<%if(containsTPartitioner){%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=connName%> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
|
||||
concurrentHashMap_<%=connName%>.putIfAbsent("<%=connName%>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
|
||||
java.util.concurrent.atomic.AtomicInteger stats_<%=connName%> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=connName%>.get("<%=connName%>" + iterateLoop);
|
||||
runStat.updateStatOnConnection("<%=connName%>" + iterateId, stats_<%=connName%>.incrementAndGet()<=1?0:1, 0);
|
||||
<%}else{%>
|
||||
runStat.updateStatOnConnection("<%=connName%>" + iterateId, 0, 0);
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
Vector v = (Vector) codeGenArgument.getArgument();
|
||||
IProcess process = (IProcess)v.get(0);
|
||||
List<INode> rootNodes = (List<INode>)v.get(1);
|
||||
|
||||
boolean containsTPartitioner = process.getNodesOfType("tPartitioner").size() > 0 ? true : false;
|
||||
boolean stats = codeGenArgument.isStatistics();
|
||||
boolean trace = codeGenArgument.isTrace();
|
||||
boolean isRunInMultiThread = codeGenArgument.getIsRunInMultiThread();
|
||||
@@ -388,9 +388,10 @@ if(execStat) {
|
||||
%>
|
||||
|
||||
<%= ElementParameterParser.getValue(process, "__HEADER_CODE__")%>
|
||||
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap = new java.util.concurrent.ConcurrentHashMap<Object, Object>();
|
||||
globalMap.put("concurrentHashMap", concurrentHashMap);
|
||||
<%//if(containsTPartitioner){//as tMatchGroupIn and tFuzzyUniqRow use this concurrentHashMap, so generate always%>
|
||||
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap = new java.util.concurrent.ConcurrentHashMap<Object, Object>();
|
||||
globalMap.put("concurrentHashMap", concurrentHashMap);
|
||||
<%//}%>
|
||||
|
||||
long startUsedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
|
||||
long endUsedMemory = 0;
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<%=node.getUniqueName() %>Thread bt_<%=node.getUniqueName() %> = new <%=node.getUniqueName() %>Thread(globalMap<%=schemaInstanceDeclaration %>,threadIdCounter++);
|
||||
<%=node.getUniqueName() %>Thread bt_<%=node.getUniqueName() %> = new <%=node.getUniqueName() %>Thread(globalMap<%=schemaInstanceDeclaration %>,threadIdCounter_<%=node.getUniqueName()%>++);
|
||||
mtp_<%=node.getUniqueName() %>.execute(bt_<%=node.getUniqueName() %>);
|
||||
|
||||
<%
|
||||
@@ -134,4 +134,4 @@
|
||||
}//3
|
||||
}//2
|
||||
}//1
|
||||
%>
|
||||
%>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
boolean containsTPartitioner = node.getProcess().getNodesOfType("tPartitioner").size() > 0 ? true : false;
|
||||
boolean isRunJob = "tRunJob".equals(node.getComponent().getName());
|
||||
IProcess process = node.getProcess();
|
||||
|
||||
@@ -52,7 +53,9 @@ boolean parallelIterate = false;
|
||||
for (IConnection iterateConn : iterateConnSet) { //1
|
||||
%>
|
||||
NB_ITERATE_<%=iterateNodeName %>++;
|
||||
iterateLoop++;
|
||||
<%if(containsTPartitioner){%>
|
||||
iterateLoop++;
|
||||
<%}%>
|
||||
<%
|
||||
parallelIterate = "true".equals(ElementParameterParser.getValue(iterateConn, "__ENABLE_PARALLEL__"));
|
||||
if (parallelIterate) {//2
|
||||
@@ -64,7 +67,6 @@ for (IConnection iterateConn : iterateConnSet) { //1
|
||||
rowList = rowList.substring(0, rowList.length()-1);
|
||||
%>
|
||||
class <%=node.getUniqueName() %>Thread extends TalendThread {//implements routines.system.TalendThreadPool.PropertySettable
|
||||
|
||||
class ThreadedMap extends java.util.HashMap<String, Object> {
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@@ -91,7 +93,9 @@ for (IConnection iterateConn : iterateConnSet) { //1
|
||||
private java.util.Map<String, Object> globalMap = null;
|
||||
boolean isRunning = false;
|
||||
String iterateId = "";
|
||||
int iterateLoop = 0;
|
||||
<%if(containsTPartitioner){%>
|
||||
int iterateLoop = 0;
|
||||
<%}%>
|
||||
<%
|
||||
if(!subTree.isMergeSubTree()) {
|
||||
List< ? extends IConnection> rootConns = subTree.getRootNode().getOutgoingConnections();
|
||||
@@ -159,7 +163,9 @@ for (IConnection iterateConn : iterateConnSet) { //1
|
||||
<%}%>
|
||||
}
|
||||
iterateId = "." + threadID;
|
||||
iterateLoop++;
|
||||
<%if(containsTPartitioner){%>
|
||||
iterateLoop++;
|
||||
<%}%>
|
||||
<%if(isRunJob) {%>
|
||||
//bug21906 copy context to local for mutilthread
|
||||
context.synchronizeContext();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
NodesSubTree subTree = (NodesSubTree) codeGenArgument.getArgument();
|
||||
boolean isRunInMultiThread = codeGenArgument.getIsRunInMultiThread();
|
||||
boolean stat = codeGenArgument.isStatistics();
|
||||
boolean containsTPartitioner = subTree.getRootNode().getProcess().getNodesOfType("tPartitioner").size() > 0 ? true : false;
|
||||
%>
|
||||
|
||||
<%
|
||||
@@ -1032,7 +1033,9 @@ public void <%=subTree.getName() %>Process(final java.util.Map<String, Object> g
|
||||
}
|
||||
boolean isRunning = false;
|
||||
String iterateId = "";
|
||||
int iterateLoop = 0;
|
||||
<%if(containsTPartitioner){%>
|
||||
int iterateLoop = 0;
|
||||
<%}%>
|
||||
|
||||
public void run() {
|
||||
java.util.Map threadRunResultMap = new java.util.HashMap();
|
||||
@@ -1064,7 +1067,9 @@ public void <%=subTree.getName() %>Process(final java.util.Map<String, Object> g
|
||||
<%
|
||||
}
|
||||
%>
|
||||
int iterateLoop = 0;
|
||||
<%if(containsTPartitioner){%>
|
||||
int iterateLoop = 0;
|
||||
<%}%>
|
||||
String currentComponent = "";
|
||||
java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();
|
||||
|
||||
|
||||
@@ -868,7 +868,6 @@ public class CodeGenerator implements ICodeGenerator {
|
||||
CodeGeneratorArgument argument = new CodeGeneratorArgument();
|
||||
argument.setNode(node);
|
||||
argument.setAllMainSubTreeConnections(subProcess.getAllMainSubTreeConnections());
|
||||
argument.setSubTreeContainsParallelIterate(subProcess.subTreeContainsParallelIterate());
|
||||
argument.setCodePart(part);
|
||||
argument.setStatistics(statistics);
|
||||
argument.setTrace(trace);
|
||||
|
||||
@@ -70,6 +70,7 @@ import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.ui.IJobletProviderService;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
import org.talend.core.ui.images.CoreImageProvider;
|
||||
import org.talend.core.utils.TalendCacheUtils;
|
||||
@@ -800,14 +801,18 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
componentList = null;
|
||||
skeletonList = null;
|
||||
customComponentList = null;
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IJobletProviderService.class)) {
|
||||
IJobletProviderService jobletService = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(
|
||||
IJobletProviderService.class);
|
||||
if (jobletService != null) {
|
||||
jobletService.clearJobletComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetCache() {
|
||||
componentList = null;
|
||||
skeletonList = null;
|
||||
customComponentList = null;
|
||||
reset();
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
CoreImageProvider.clearComponentIconImages();
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ public class CodeGeneratorArgument {
|
||||
|
||||
private int pauseTime;
|
||||
|
||||
@Deprecated
|
||||
private boolean subTreeContainsParallelIterate;
|
||||
|
||||
/**
|
||||
@@ -277,10 +278,15 @@ public class CodeGeneratorArgument {
|
||||
this.subTree = subTree;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/*
|
||||
* use org.talend.core.model.process.AbstractNode.getParallelIterator()
|
||||
*/
|
||||
public boolean subTreeContainsParallelIterate() {
|
||||
return subTreeContainsParallelIterate;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setSubTreeContainsParallelIterate(boolean subTreeContainsParallelIterate) {
|
||||
this.subTreeContainsParallelIterate = subTreeContainsParallelIterate;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.Map;
|
||||
|
||||
import org.talend.core.model.process.AbstractNode;
|
||||
import org.talend.core.model.process.EConnectionType;
|
||||
import org.talend.core.model.process.ElementParameterParser;
|
||||
import org.talend.core.model.process.IConnection;
|
||||
import org.talend.core.model.process.IConnectionCategory;
|
||||
import org.talend.core.model.process.INode;
|
||||
@@ -61,6 +60,7 @@ public class NodesSubTree {
|
||||
|
||||
List<IConnection> allMainSubTreeConnections = null;
|
||||
|
||||
@Deprecated
|
||||
boolean subTreeContainsParallelIterate = false;
|
||||
|
||||
List<INode> mergeBranchStarts;
|
||||
@@ -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()) {
|
||||
@@ -246,11 +251,7 @@ public class NodesSubTree {
|
||||
if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.MAIN)) {
|
||||
if (!connection.getLineStyle().hasConnectionCategory(IConnectionCategory.USE_ITERATE)) {
|
||||
allMainSubTreeConnections.add(connection);
|
||||
} else {
|
||||
if (Boolean.TRUE.toString().equals(ElementParameterParser.getValue(connection, "__ENABLE_PARALLEL__"))) { //$NON-NLS-1$
|
||||
subTreeContainsParallelIterate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (DEBUG) {
|
||||
System.out.print(" -> "); //$NON-NLS-1$
|
||||
}
|
||||
@@ -500,6 +501,10 @@ public class NodesSubTree {
|
||||
this.allMainSubTreeConnections = allMainSubTreeConnections;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/*
|
||||
* use org.talend.core.model.process.AbstractNode.getParallelIterator()
|
||||
*/
|
||||
public boolean subTreeContainsParallelIterate() {
|
||||
return subTreeContainsParallelIterate;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10306,7 +10306,23 @@ public class SforceServiceStub extends org.apache.axis2.client.Stub implements
|
||||
"urn:partner.soap.sforce.com:Soap:describeGlobalRequest");
|
||||
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
||||
true);
|
||||
|
||||
{
|
||||
/*- ADD - START - BY cmeng - 20140901*/
|
||||
/**
|
||||
* https://jira.talendforge.org/browse/TDI-30366<br>
|
||||
* 1. Because this API seems not support this case: server use HTTP Protocol 1.0(not support CHUNKED) while client use HTTP Protocol 1.1<br>
|
||||
* , then client will throw exception(org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required)<br>
|
||||
* 2. If the new API can support this case, then this additional codes can be cancelled.
|
||||
*
|
||||
* Some information I searched on the net:<br>
|
||||
* https://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00309.html
|
||||
* http://axis.apache.org/axis2/java/core/docs/http-transport.html
|
||||
* http://en.wikipedia.org/wiki/Chunked_transfer_encoding
|
||||
*/
|
||||
_operationClient.getOptions().setProperty(
|
||||
org.apache.axis2.transport.http.HTTPConstants.CHUNKED, "false");
|
||||
/*- ADD - END - BY cmeng* - 20140901*/
|
||||
}
|
||||
addPropertyToOperationClient(
|
||||
_operationClient,
|
||||
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
||||
@@ -12816,7 +12832,23 @@ public class SforceServiceStub extends org.apache.axis2.client.Stub implements
|
||||
"urn:partner.soap.sforce.com:Soap:describeSObjectRequest");
|
||||
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
||||
true);
|
||||
|
||||
{
|
||||
/*- ADD - START - BY cmeng - 20140901*/
|
||||
/**
|
||||
* https://jira.talendforge.org/browse/TDI-30366<br>
|
||||
* 1. Because this API seems not support this case: server use HTTP Protocol 1.0(not support CHUNKED) while client use HTTP Protocol 1.1<br>
|
||||
* , then client will throw exception(org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required)<br>
|
||||
* 2. If the new API can support this case, then this additional codes can be cancelled.
|
||||
*
|
||||
* Some information I searched on the net:<br>
|
||||
* https://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00309.html
|
||||
* http://axis.apache.org/axis2/java/core/docs/http-transport.html
|
||||
* http://en.wikipedia.org/wiki/Chunked_transfer_encoding
|
||||
*/
|
||||
_operationClient.getOptions().setProperty(
|
||||
org.apache.axis2.transport.http.HTTPConstants.CHUNKED, "false");
|
||||
/*- ADD - END - BY cmeng - 20140901*/
|
||||
}
|
||||
addPropertyToOperationClient(
|
||||
_operationClient,
|
||||
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -764,39 +764,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
if (("true").equals(dieOnError)) {
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
} else {
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=incomingConnName%>.<%=column.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
rejectedCount_<%=cid%> = rejectedCount_<%=cid%> + 1;
|
||||
<%=rejectConnName%>.errorCode = ((java.sql.SQLException)e).getSQLState();
|
||||
<%=rejectConnName%>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
System.err.println(e.getMessage() + " SQLSTATE=[" + e.getSQLState() + "] " + "CODE[" + e.getErrorCode() + "]");
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
try {
|
||||
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
%>
|
||||
@@ -819,10 +789,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
if(isDynamic) {
|
||||
Column dynamicColumn = getColumn(getDynamicColumn());
|
||||
Column dynamicColumn = getColumn(talendDynCol);
|
||||
String typeToGenerate = JavaTypesManager.getTypeToGenerate(dynamicColumn.getColumn().getTalendType(), dynamicColumn.getColumn().isNullable());
|
||||
if("Dynamic".equals(typeToGenerate)) {
|
||||
%>
|
||||
if(isEnableDebug) {
|
||||
%>
|
||||
routines.system.DynamicUtils.debugDynamicSql(query_<%=cid%>,<%=incomingConnName%>.<%=dynamicColumn.getName()%>, <%=counter%>,insertSQLSplits_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
DynamicUtils.writeColumnsToDatabse(<%=incomingConnName%>.<%=dynamicColumn.getName()%>, pstmtInsert_<%=cid%>, <%=counter-1%>, "<%=dbmsId%>");
|
||||
<%
|
||||
}
|
||||
@@ -834,6 +809,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
}
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -864,7 +840,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
} else if (("DELETE").equals(dataAction)) {
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -1332,35 +1332,6 @@ if(columnList != null && columnList.size() > 0) {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
if (("true").equals(dieOnError)) {
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
} else {
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=incomingConnName%>.<%=column.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
rejectedCount_<%=cid%> = rejectedCount_<%=cid%>+ 1;
|
||||
<%=rejectConnName%>.errorCode = ((java.sql.SQLException)e).getSQLState();
|
||||
<%=rejectConnName%>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
System.err.print(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
<%
|
||||
@@ -1405,8 +1376,8 @@ if(columnList != null && columnList.size() > 0) {
|
||||
<%
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -1436,7 +1407,6 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -990,36 +990,6 @@ IMetadataColumn talendDynCol = null;
|
||||
try {
|
||||
updateFlag_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
if (("true").equals(dieOnError)) {
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
} else {
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=incomingConnName%>.<%=column.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
rejectedCount_<%=cid%> = rejectedCount_<%=cid%> + 1;
|
||||
<%=rejectConnName%>.errorCode = ((java.sql.SQLException)e).getSQLState();
|
||||
<%=rejectConnName%>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
System.err.print(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
<%
|
||||
@@ -1048,9 +1018,14 @@ IMetadataColumn talendDynCol = null;
|
||||
}
|
||||
}
|
||||
if(isDynamic) {
|
||||
Column dynamicColumn = getColumn(getDynamicColumn());
|
||||
Column dynamicColumn = getColumn(talendDynCol);
|
||||
String typeToGenerate = JavaTypesManager.getTypeToGenerate(dynamicColumn.getColumn().getTalendType(), dynamicColumn.getColumn().isNullable());
|
||||
if("Dynamic".equals(typeToGenerate)) {
|
||||
if(isEnableDebug) {
|
||||
%>
|
||||
routines.system.DynamicUtils.debugDynamicSql(query_<%=cid%>,<%=incomingConnName%>.<%=dynamicColumn.getName()%>, <%=counter%>,insertSQLSplits_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
DynamicUtils.writeColumnsToDatabse(<%=incomingConnName%>.<%=dynamicColumn.getName()%>, pstmtInsert_<%=cid%>, <%=counter-1%>, "<%=dbmsId%>");
|
||||
<%
|
||||
@@ -1062,9 +1037,8 @@ IMetadataColumn talendDynCol = null;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -1095,7 +1069,6 @@ IMetadataColumn talendDynCol = null;
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -227,13 +227,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
} else if (("DELETE").equals(dataAction)) {
|
||||
%>
|
||||
String delete_<%=cid%> = "DELETE FROM \"" + tableName_<%=cid%> + "\" WHERE <%=deleteWhereStmt.toString()%>";
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(delete_<%=cid%>);
|
||||
<%
|
||||
if(convertToUppercase){
|
||||
%>
|
||||
delete_<%=cid%> = delete_<%=cid%>.toUpperCase();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(delete_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
if(isEnableDebug) {
|
||||
%>
|
||||
@@ -799,36 +801,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
if (("true").equals(dieOnError)) {
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
} else {
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=incomingConnName%>.<%=column.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
rejectedCount_<%=cid%> = rejectedCount_<%=cid%> + 1;
|
||||
<%=rejectConnName%>.errorCode = ((java.sql.SQLException)e).getSQLState();
|
||||
<%=rejectConnName%>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
System.err.print(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -852,10 +824,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
if(isDynamic) {
|
||||
Column dynamicColumn = getColumn(getDynamicColumn());
|
||||
Column dynamicColumn = getColumn(talendDynCol);
|
||||
String typeToGenerate = JavaTypesManager.getTypeToGenerate(dynamicColumn.getColumn().getTalendType(), dynamicColumn.getColumn().isNullable());
|
||||
if("Dynamic".equals(typeToGenerate)) {
|
||||
%>
|
||||
if(isEnableDebug) {
|
||||
%>
|
||||
routines.system.DynamicUtils.debugDynamicSql(query_<%=cid%>,<%=incomingConnName%>.<%=dynamicColumn.getName()%>, <%=counter%>,insertSQLSplits_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
DynamicUtils.writeColumnsToDatabse(<%=incomingConnName%>.<%=dynamicColumn.getName()%>, pstmtInsert_<%=cid%>, <%=counter-1%>, "<%=dbmsId%>");
|
||||
<%
|
||||
}
|
||||
@@ -866,8 +843,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -898,7 +875,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -457,37 +457,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
<%}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
if (("true").equals(dieOnError)) {
|
||||
%>
|
||||
throw(e);
|
||||
<%
|
||||
} else {
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
<%=rejectConnName %> = new <%=rejectConnName %>Struct();
|
||||
<%
|
||||
for(IMetadataColumn column : columnList) {
|
||||
%>
|
||||
<%=rejectConnName%>.<%=column.getLabel()%> = <%=incomingConnName%>.<%=column.getLabel()%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
rejectedCount_<%=cid%> = rejectedCount_<%=cid%> + 1;
|
||||
<%=rejectConnName%>.errorCode = ((java.sql.SQLException)e).getSQLState();
|
||||
<%=rejectConnName%>.errorMessage = e.getMessage() + " - Line: " + tos_count_<%=node.getUniqueName() %>;
|
||||
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
System.err.print(e.getMessage());
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(useStatement || isEnableDebug) {
|
||||
@@ -517,12 +486,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
try {
|
||||
<%if(useStatement){%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate(query_<%=cid%>.toString().trim());
|
||||
<%}else{%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
<%}%>
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -554,7 +523,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
} else if (("DELETE").equals(dataAction)) {
|
||||
|
||||
@@ -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'"
|
||||
/>
|
||||
@@ -84,7 +84,7 @@
|
||||
NAME="PRIVATEKEY"
|
||||
FIELD="FILE"
|
||||
NUM_ROW="22"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY')"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
>
|
||||
<DEFAULT>"/.ssh/id_dsa"</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -93,7 +93,7 @@
|
||||
NAME="PASSPHRASE"
|
||||
FIELD="PASSWORD"
|
||||
NUM_ROW="23"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY')"
|
||||
SHOW_IF="(SFTP=='true') AND (AUTH_METHOD == 'PUBLICKEY') AND (USE_EXISTING_CONNECTION == 'false')"
|
||||
>
|
||||
<DEFAULT>"secret"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -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'"
|
||||
/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user