Compare commits
42 Commits
trunk
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33723c7527 | ||
|
|
a3ea57c4ab | ||
|
|
31b88b878d | ||
|
|
c54cbda164 | ||
|
|
a603ac0caf | ||
|
|
c2b3d3c220 | ||
|
|
f685160907 | ||
|
|
104281a319 | ||
|
|
253b08b32e | ||
|
|
1e964f4173 | ||
|
|
5919426530 | ||
|
|
5063e7df1b | ||
|
|
cd0262101c | ||
|
|
49dde6afba | ||
|
|
3ce9b426c5 | ||
|
|
2dff789493 | ||
|
|
ec2b60683b | ||
|
|
25e9f5bdc0 | ||
|
|
39b678e9d9 | ||
|
|
4b9fccee6f | ||
|
|
c9fc53190c | ||
|
|
feb8155d87 | ||
|
|
3ee0b87ebe | ||
|
|
840932e614 | ||
|
|
509a3b1f78 | ||
|
|
f38e6c347b | ||
|
|
b365d03913 | ||
|
|
63d974bc7d | ||
|
|
c044385d5e | ||
|
|
dab5d7323c | ||
|
|
444ff96293 | ||
|
|
1a3cab5f19 | ||
|
|
70e8f2e5b6 | ||
|
|
bd1168854b | ||
|
|
bb7153020c | ||
|
|
74aa29e70f | ||
|
|
4d3366cfce | ||
|
|
51d02f5ffc | ||
|
|
9b0218f069 | ||
|
|
e41822f01b | ||
|
|
090c19a201 | ||
|
|
f28d075943 |
67
PATCH_RELEASE_NOTE.md
Normal file
67
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
version: 6.4.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-3162
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| Patch Name | Patch_20190628_TPS-3162_v1-6.4.1 |
|
||||
| Release Date | 2019-06-28 |
|
||||
| Target Version | Talend-Studio-20170623_1246-V6.4.1 |
|
||||
| Product affected | Talend Studio |
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a self-contained patch.
|
||||
|
||||
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
|
||||
|
||||
## Fixed issues
|
||||
|
||||
This patch contains the following fixes:
|
||||
|
||||
- TPS-3162 [6.4.1] tLDAPInput with Use field options(for binary setting) activated only return 1000 Rows (TDI-39879)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Talend Studio 6.4.1 must be installed.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing the patch using Software update
|
||||
|
||||
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
|
||||
|
||||
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
|
||||
|
||||
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
|
||||
|
||||
### Installing the patch using Talend Studio
|
||||
|
||||
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
|
||||
|
||||
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
|
||||
|
||||
### Installing the patch using Commandline
|
||||
|
||||
Execute the following commands:
|
||||
|
||||
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
|
||||
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
|
||||
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}
|
||||
|
||||
## Uninstallation
|
||||
Backup the Affected files list below. Uninstall the patch by restore the backup files.
|
||||
|
||||
## Affected files for this patch
|
||||
|
||||
The following files are installed by this patch:
|
||||
|
||||
- {Talend_Studio_path}/plugins/org.talend.designer.components.localprovider_6.4.1.20170623_1246/components/tLDAPInput/tLDAPInput_begin.javajet
|
||||
@@ -500,85 +500,107 @@
|
||||
|
||||
}
|
||||
}
|
||||
<% for (IContextParameter ctxParam :params)
|
||||
{
|
||||
%>
|
||||
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
|
||||
<%
|
||||
if (ctxParam.getType().equals("id_Password")) {
|
||||
%>
|
||||
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
context.<%=ctxParam.getName()%> = null;
|
||||
if(pwd_<%=ctxParam.getName()%>_value!=null) {
|
||||
if(context_param.containsKey("<%=ctxParam.getName()%>")) {//no need to decrypt if it come from program argument or parent job runtime
|
||||
context.<%=ctxParam.getName()%> = pwd_<%=ctxParam.getName()%>_value;
|
||||
} else if (!pwd_<%=ctxParam.getName()%>_value.isEmpty()) {
|
||||
try {
|
||||
context.<%=ctxParam.getName()%> = routines.system.PasswordEncryptUtil.decryptPassword(pwd_<%=ctxParam.getName()%>_value);
|
||||
context.put("<%=ctxParam.getName()%>",context.<%=ctxParam.getName()%>);
|
||||
} catch (java.lang.RuntimeException e) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value")))
|
||||
{
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
if(typeToGenerate.equals("java.util.Date"))
|
||||
{
|
||||
final int maxContextInOneMethodToProcess = 100;
|
||||
int lastMethodNumber = 0;
|
||||
%>
|
||||
class ContextProcessing {
|
||||
private void processContext_0() {
|
||||
<%
|
||||
for (int i = 1; i <= params.size(); i++) {
|
||||
IContextParameter ctxParam = params.get(i-1);
|
||||
if (i % maxContextInOneMethodToProcess == 0) {
|
||||
/* close previous method and declare new */
|
||||
lastMethodNumber++;
|
||||
%>
|
||||
}
|
||||
|
||||
%>
|
||||
try{
|
||||
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
if (context_<%=ctxParam.getName()%>_value == null){
|
||||
context_<%=ctxParam.getName()%>_value = "";
|
||||
}
|
||||
int context_<%=ctxParam.getName()%>_pos = context_<%=ctxParam.getName()%>_value.indexOf(";");
|
||||
String context_<%=ctxParam.getName()%>_pattern = "yyyy-MM-dd HH:mm:ss";
|
||||
if(context_<%=ctxParam.getName()%>_pos > -1){
|
||||
context_<%=ctxParam.getName()%>_pattern = context_<%=ctxParam.getName()%>_value.substring(0, context_<%=ctxParam.getName()%>_pos);
|
||||
context_<%=ctxParam.getName()%>_value = context_<%=ctxParam.getName()%>_value.substring(context_<%=ctxParam.getName()%>_pos + 1);
|
||||
}
|
||||
private void processContext_<%=lastMethodNumber%>() {
|
||||
<%
|
||||
} //endIf
|
||||
%>
|
||||
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
|
||||
<%
|
||||
if (ctxParam.getType().equals("id_Password")) {
|
||||
%>
|
||||
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
context.<%=ctxParam.getName()%> = null;
|
||||
if(pwd_<%=ctxParam.getName()%>_value!=null) {
|
||||
if(context_param.containsKey("<%=ctxParam.getName()%>")) {//no need to decrypt if it come from program argument or parent job runtime
|
||||
context.<%=ctxParam.getName()%> = pwd_<%=ctxParam.getName()%>_value;
|
||||
} else if (!pwd_<%=ctxParam.getName()%>_value.isEmpty()) {
|
||||
try {
|
||||
context.<%=ctxParam.getName()%> = routines.system.PasswordEncryptUtil.decryptPassword(pwd_<%=ctxParam.getName()%>_value);
|
||||
context.put("<%=ctxParam.getName()%>",context.<%=ctxParam.getName()%>);
|
||||
} catch (java.lang.RuntimeException e) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
if(typeToGenerate.equals("java.util.Date")) {
|
||||
%>
|
||||
try{
|
||||
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
if (context_<%=ctxParam.getName()%>_value == null){
|
||||
context_<%=ctxParam.getName()%>_value = "";
|
||||
}
|
||||
int context_<%=ctxParam.getName()%>_pos = context_<%=ctxParam.getName()%>_value.indexOf(";");
|
||||
String context_<%=ctxParam.getName()%>_pattern = "yyyy-MM-dd HH:mm:ss";
|
||||
if(context_<%=ctxParam.getName()%>_pos > -1){
|
||||
context_<%=ctxParam.getName()%>_pattern = context_<%=ctxParam.getName()%>_value.substring(0, context_<%=ctxParam.getName()%>_pos);
|
||||
context_<%=ctxParam.getName()%>_value = context_<%=ctxParam.getName()%>_value.substring(context_<%=ctxParam.getName()%>_pos + 1);
|
||||
}
|
||||
|
||||
context.<%=ctxParam.getName()%>=(java.util.Date)(new java.text.SimpleDateFormat(context_<%=ctxParam.getName()%>_pattern).parse(context_<%=ctxParam.getName()%>_value));
|
||||
context.<%=ctxParam.getName()%>=(java.util.Date)(new java.text.SimpleDateFormat(context_<%=ctxParam.getName()%>_pattern).parse(context_<%=ctxParam.getName()%>_value));
|
||||
|
||||
}catch(ParseException e)
|
||||
{
|
||||
context.<%=ctxParam.getName()%>=null;
|
||||
}
|
||||
<%
|
||||
}else if(typeToGenerate.equals("Object")||typeToGenerate.equals("String")||typeToGenerate.equals("java.lang.String") )
|
||||
{
|
||||
%>
|
||||
context.<%=ctxParam.getName()%>=(<%=typeToGenerate%>) context.getProperty("<%=ctxParam.getName()%>");
|
||||
<%
|
||||
}else if(typeToGenerate.equals("Character")&&ctxParam.getName()!=null)
|
||||
{
|
||||
%>
|
||||
context.<%=ctxParam.getName()%>= new java.text.StringCharacterIterator(context.getProperty("<%=ctxParam.getName()%>")).first();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
try{
|
||||
context.<%=ctxParam.getName()%>=routines.system.ParserUtils.parseTo_<%=typeToGenerate%> (context.getProperty("<%=ctxParam.getName()%>"));
|
||||
}catch(NumberFormatException e){
|
||||
context.<%=ctxParam.getName()%>=null;
|
||||
}
|
||||
<%
|
||||
} catch(ParseException e) {
|
||||
context.<%=ctxParam.getName()%>=null;
|
||||
}
|
||||
<%
|
||||
} else if(typeToGenerate.equals("Object")||typeToGenerate.equals("String")||typeToGenerate.equals("java.lang.String")) {
|
||||
%>
|
||||
context.<%=ctxParam.getName()%>=(<%=typeToGenerate%>) context.getProperty("<%=ctxParam.getName()%>");
|
||||
<%
|
||||
} else if(typeToGenerate.equals("Character")&&ctxParam.getName()!=null) {
|
||||
%>
|
||||
context.<%=ctxParam.getName()%>= new java.text.StringCharacterIterator(context.getProperty("<%=ctxParam.getName()%>")).first();
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
try{
|
||||
context.<%=ctxParam.getName()%>=routines.system.ParserUtils.parseTo_<%=typeToGenerate%> (context.getProperty("<%=ctxParam.getName()%>"));
|
||||
} catch(NumberFormatException e){
|
||||
context.<%=ctxParam.getName()%>=null;
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
} <%/*close last method*/%>
|
||||
public void processAllContext() {
|
||||
<%
|
||||
for (int i = 0; i <=lastMethodNumber; i++) {
|
||||
%>
|
||||
processContext_<%=i %>();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
new ContextProcessing().processAllContext();
|
||||
} catch (java.io.IOException ie) {
|
||||
System.err.println("Could not load context "+contextStr);
|
||||
ie.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
// get context value from parent directly
|
||||
if (parentContextMap != null && !parentContextMap.isEmpty()) {
|
||||
<% for (IContextParameter ctxParam :params){
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
// for tRecordMatching
|
||||
if(conn.getTarget().getUniqueName().startsWith("tRecordMatching")){
|
||||
if(conn.getTarget().getUniqueName().indexOf("tRecordMatching")>-1){
|
||||
List<Map<String, String>> joinKeys = (List<Map<String,String>>)ElementParameterParser.getObjectValue(conn.getTarget(), "__BLOCKING_DEFINITION__");
|
||||
for(Map<String, String> joinKeyLine : joinKeys){
|
||||
String lookupKey = joinKeyLine.get("LOOKUP_COLUMN");
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<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.libraries</groupId>
|
||||
<artifactId>checkArchive-1.1-20181130</artifactId>
|
||||
<version>6.0.0</version>
|
||||
<name>checkArchive</name>
|
||||
<description>Dependence for tFileArchive and tFileUnAchive</description>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
<java.source.version>1.7</java.source.version>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.10</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>${java.source.version}</source>
|
||||
<target>${java.source.version}</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<compilerArgument>-XDignore.symbol.file</compilerArgument>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,184 @@
|
||||
package org.talend.archive;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
import javax.crypto.spec.PBEParameterSpec;
|
||||
|
||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
|
||||
import org.apache.commons.compress.archivers.zip.ZipFile;
|
||||
|
||||
// import javax.crypto.Cipher;
|
||||
|
||||
public class IntegrityUtil {
|
||||
|
||||
/**
|
||||
* Is used to check if the zip file is corrupted/destroyed
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
public static boolean isZipValid(final File file) {
|
||||
ZipFile zipFile = null;
|
||||
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
} finally {
|
||||
try {
|
||||
if (zipFile != null) {
|
||||
zipFile.close();
|
||||
zipFile = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void validate(final File file) {
|
||||
ZipFile zipFile = null;
|
||||
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
|
||||
} catch (IOException e) {
|
||||
} finally {
|
||||
try {
|
||||
if (zipFile != null) {
|
||||
zipFile.close();
|
||||
zipFile = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To check if the encrpted zip file is corrupted or not
|
||||
*
|
||||
* @param file
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEncryptedZipValid(final File file, String password) {
|
||||
ZipArchiveInputStream input = null;
|
||||
InputStream target = null;
|
||||
try {
|
||||
target = new FileInputStream(file);
|
||||
target = new CipherInputStream(target, createCipher(Cipher.DECRYPT_MODE, password));
|
||||
input = new ZipArchiveInputStream(target);
|
||||
ArchiveEntry entry = input.getNextEntry();
|
||||
return true;
|
||||
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
} finally {
|
||||
try {
|
||||
if (input != null) {
|
||||
input.close();
|
||||
input = null;
|
||||
}
|
||||
if (target != null) {
|
||||
target.close();
|
||||
target = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to check tar.gz/.tgz/.gz file is corrupted/destroyed
|
||||
*
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
public static boolean isGZIPValid(final String fileName) {
|
||||
GZIPInputStream inputStream = null;
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = new FileInputStream(new File(fileName));
|
||||
inputStream = new GZIPInputStream(is);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}finally {
|
||||
try {
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
inputStream = null;
|
||||
} else if(is != null) {
|
||||
is.close();
|
||||
is = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to check tar.tar file is corrupted/destroyed
|
||||
*
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
public static boolean isTarValid(final String fileName) {
|
||||
TarArchiveInputStream inputStream = null;
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = new FileInputStream(new File(fileName));
|
||||
inputStream = new TarArchiveInputStream(is);
|
||||
return inputStream.canReadEntryData(inputStream.getNextEntry());
|
||||
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}finally {
|
||||
try {
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
inputStream = null;
|
||||
} else if(is != null) {
|
||||
is.close();
|
||||
is = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param mode
|
||||
* @param password
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Cipher createCipher(int mode, String password) throws Exception {
|
||||
String alg = "PBEWithSHA1AndDESede"; // BouncyCastle has better algorithms
|
||||
PBEKeySpec keySpec = new PBEKeySpec(password.toCharArray());
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(alg);
|
||||
SecretKey secretKey = keyFactory.generateSecret(keySpec);
|
||||
|
||||
Cipher cipher = Cipher.getInstance("PBEWithSHA1AndDESede");
|
||||
cipher.init(mode, secretKey, new PBEParameterSpec("saltsalt".getBytes(), 2000));
|
||||
|
||||
return cipher;
|
||||
}
|
||||
}
|
||||
@@ -115,10 +115,10 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-HSQLDb" MODULE="hsqldb.jar" MVN="mvn:org.talend.libraries/hsqldb/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.hsql/lib/hsqldb.jar" REQUIRED="true"/>
|
||||
<IMPORT NAME="Driver-ucanaccess" MODULE="ucanaccess-2.0.9.5.jar" MVN="mvn:org.talend.libraries/ucanaccess-2.0.9.5/6.0.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/jackcess-2.1.0.jar" REQUIRED="true"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.12.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess/2.1.12" REQUIRED="true"/>
|
||||
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.0" MODULE="jackcess-encrypt-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-encrypt-2.1.0/6.4.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.51" MODULE="bcprov-jdk15on-1.51.jar" MVN="mvn:org.talend.libraries/bcprov-jdk15on-1.51/6.0.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.4" MODULE="jackcess-encrypt-2.1.4.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess-encrypt/2.1.4" REQUIRED="true"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.60" MODULE="bcprov-jdk15on-1.60.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.60" REQUIRED="true"/>
|
||||
<IMPORT NAME="talend-ucanaccess-utils-1.0.0" MODULE="talend-ucanaccess-utils-1.0.0.jar" MVN="mvn:org.talend.libraries/talend-ucanaccess-utils-1.0.0/6.4.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/talend-ucanaccess-utils-1.0.0.jar" REQUIRED="true"/>
|
||||
|
||||
<IMPORT NAME="common2.6" MODULE="commons-lang-2.6.jar" MVN="mvn:org.talend.libraries/commons-lang-2.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED="true"/>
|
||||
|
||||
@@ -118,10 +118,10 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-HSQLDb" MODULE="hsqldb.jar" MVN="mvn:org.talend.libraries/hsqldb/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.hsql/lib/hsqldb.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-ucanaccess" MODULE="ucanaccess-2.0.9.5.jar" MVN="mvn:org.talend.libraries/ucanaccess-2.0.9.5/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/jackcess-2.1.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.12.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess/2.1.12" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.0" MODULE="jackcess-encrypt-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-encrypt-2.1.0/6.4.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.51" MODULE="bcprov-jdk15on-1.51.jar" MVN="mvn:org.talend.libraries/bcprov-jdk15on-1.51/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.4" MODULE="jackcess-encrypt-2.1.4.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess-encrypt/2.1.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.60" MODULE="bcprov-jdk15on-1.60.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.60" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="talend-ucanaccess-utils-1.0.0" MODULE="talend-ucanaccess-utils-1.0.0.jar" MVN="mvn:org.talend.libraries/talend-ucanaccess-utils-1.0.0/6.4.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/talend-ucanaccess-utils-1.0.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="common2.6" MODULE="commons-lang-2.6.jar" MVN="mvn:org.talend.libraries/commons-lang-2.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
@@ -204,10 +204,10 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-HSQLDb" MODULE="hsqldb.jar" MVN="mvn:org.talend.libraries/hsqldb/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.hsql/lib/hsqldb.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-ucanaccess" MODULE="ucanaccess-2.0.9.5.jar" MVN="mvn:org.talend.libraries/ucanaccess-2.0.9.5/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/jackcess-2.1.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.12.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess/2.1.12" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.0" MODULE="jackcess-encrypt-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-encrypt-2.1.0/6.4.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.51" MODULE="bcprov-jdk15on-1.51.jar" MVN="mvn:org.talend.libraries/bcprov-jdk15on-1.51/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.4" MODULE="jackcess-encrypt-2.1.4.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess-encrypt/2.1.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.60" MODULE="bcprov-jdk15on-1.60.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.60" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="talend-ucanaccess-utils-1.0.0" MODULE="talend-ucanaccess-utils-1.0.0.jar" MVN="mvn:org.talend.libraries/talend-ucanaccess-utils-1.0.0/6.4.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/talend-ucanaccess-utils-1.0.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="common2.6" MODULE="commons-lang-2.6.jar" MVN="mvn:org.talend.libraries/commons-lang-2.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
@@ -178,10 +178,10 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-HSQLDb" MODULE="hsqldb.jar" MVN="mvn:org.talend.libraries/hsqldb/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.hsql/lib/hsqldb.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-ucanaccess" MODULE="ucanaccess-2.0.9.5.jar" MVN="mvn:org.talend.libraries/ucanaccess-2.0.9.5/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/jackcess-2.1.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="Driver-JACKCESS" MODULE="jackcess-2.1.12.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess/2.1.12" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.0" MODULE="jackcess-encrypt-2.1.0.jar" MVN="mvn:org.talend.libraries/jackcess-encrypt-2.1.0/6.4.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.51" MODULE="bcprov-jdk15on-1.51.jar" MVN="mvn:org.talend.libraries/bcprov-jdk15on-1.51/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="jackcess-encrypt-2.1.4" MODULE="jackcess-encrypt-2.1.4.jar" MVN="mvn:com.healthmarketscience.jackcess/jackcess-encrypt/2.1.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="bcprov-jdk15on-1.60" MODULE="bcprov-jdk15on-1.60.jar" MVN="mvn:org.bouncycastle/bcprov-jdk15on/1.60" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
<IMPORT NAME="talend-ucanaccess-utils-1.0.0" MODULE="talend-ucanaccess-utils-1.0.0.jar" MVN="mvn:org.talend.libraries/talend-ucanaccess-utils-1.0.0/6.4.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.access/lib/talend-ucanaccess-utils-1.0.0.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
<IMPORT NAME="common2.6" MODULE="commons-lang-2.6.jar" MVN="mvn:org.talend.libraries/commons-lang-2.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false')"/>
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="xstream-1.4.10.jar" MODULE="xstream-1.4.10.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.10" REQUIRED_IF="(DB_VERSION=='BONITA_523') OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
<!-- Bonita 5.2.3 -->
|
||||
<IMPORT NAME="bonita_client_523" MODULE="bonita-client-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="bonita_server_523" MODULE="bonita-server-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-server-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
@@ -189,7 +190,6 @@
|
||||
|
||||
<IMPORT NAME="novabpmutil_10" MODULE="novaBpmUtil-1.0.jar" MVN="mvn:org.talend.libraries/novaBpmUtil-1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.novabpm/lib/novaBpmUtil-1.0.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="xpp3_min_1134O" MODULE="xpp3_min-1.1.3.4.O.jar" MVN="mvn:org.talend.libraries/xpp3_min-1.1.3.4.O/6.0.0" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="xstream_122" MODULE="xstream-1.2.2.jar" MVN="mvn:org.talend.libraries/xstream-1.2.2/6.0.0" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
|
||||
<!-- Bonita 5.3.1 -->
|
||||
<IMPORT NAME="bonita_client_53" MODULE="bonita-client-5.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_531'" />
|
||||
@@ -235,7 +235,6 @@
|
||||
<IMPORT NAME="bonita-client-6.5.2.jar" MODULE="bonita-client-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-client-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-common-6.5.2.jar" MODULE="bonita-common-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-common-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-server-6.5.2.jar" MODULE="bonita-server-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-server-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xstream-1.4.7.jar" MODULE="xstream-1.4.7.jar" MVN="mvn:org.talend.libraries/xstream-1.4.7/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xstream-1.4.7.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xpp3-1.1.6.jar" MODULE="xpp3-1.1.6.jar" MVN="mvn:org.talend.libraries/xpp3-1.1.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpp3-1.1.6.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
<IMPORT NAME="httpmime-4.2.5.jar" MODULE="httpmime-4.2.5.jar" MVN="mvn:org.talend.libraries/httpmime-4.2.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpmime-4.2.5.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
@@ -259,7 +258,6 @@
|
||||
<IMPORT NAME="bonita-client-7.2.4.jar" MODULE="bonita-client-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-client-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-common-7.2.4.jar" MODULE="bonita-common-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-common-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-server-7.2.4.jar" MODULE="bonita-server-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-server-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xstream-1.4.7.jar" MODULE="xstream-1.4.7.jar" MVN="mvn:org.talend.libraries/xstream-1.4.7/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xstream-1.4.7.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xpp3-1.1.6.jar" MODULE="xpp3-1.1.6.jar" MVN="mvn:org.talend.libraries/xpp3-1.1.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpp3-1.1.6.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
<IMPORT NAME="httpmime-4.2.5.jar" MODULE="httpmime-4.2.5.jar" MVN="mvn:org.talend.libraries/httpmime-4.2.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpmime-4.2.5.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
Binary file not shown.
@@ -214,7 +214,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="xstream_122" MODULE="xstream-1.2.2.jar" MVN="mvn:org.talend.libraries/xstream-1.2.2/6.0.0" REQUIRED_IF="(DB_VERSION!='BONITA_652') AND (DB_VERSION!='BONITA_724')" />
|
||||
<IMPORT NAME="xstream-1.4.10.jar" MODULE="xstream-1.4.10.jar" MVN="mvn:com.thoughtworks.xstream/xstream/1.4.10" REQUIRED_IF="((DB_VERSION!='BONITA_652') AND (DB_VERSION!='BONITA_724')) OR (((DB_VERSION=='BONITA_652')OR(DB_VERSION=='BONITA_724')) AND (CLIENT_MODE=='JAVA_CLIENT'))" />
|
||||
<!-- Bonita 5.2.3 -->
|
||||
<IMPORT NAME="bonita_client_523" MODULE="bonita-client-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-client-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-client-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
<IMPORT NAME="bonita_server_523" MODULE="bonita-server-5.2.3.jar" MVN="mvn:org.talend.libraries/bonita-server-5.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.bonita/lib/bonita-server-5.2.3.jar" REQUIRED_IF="DB_VERSION=='BONITA_523'" />
|
||||
@@ -284,7 +284,6 @@
|
||||
<IMPORT NAME="bonita-client-6.5.2.jar" MODULE="bonita-client-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-client-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-common-6.5.2.jar" MODULE="bonita-common-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-common-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-server-6.5.2.jar" MODULE="bonita-server-6.5.2.jar" MVN="mvn:org.talend.libraries/bonita-server-6.5.2/6.0.0" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xstream-1.4.7.jar" MODULE="xstream-1.4.7.jar" MVN="mvn:org.talend.libraries/xstream-1.4.7/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xstream-1.4.7.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xpp3-1.1.6.jar" MODULE="xpp3-1.1.6.jar" MVN="mvn:org.talend.libraries/xpp3-1.1.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpp3-1.1.6.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
<IMPORT NAME="httpmime-4.2.5.jar" MODULE="httpmime-4.2.5.jar" MVN="mvn:org.talend.libraries/httpmime-4.2.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpmime-4.2.5.jar" REQUIRED_IF="(DB_VERSION=='BONITA_652') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
@@ -309,7 +308,6 @@
|
||||
<IMPORT NAME="bonita-client-7.2.4.jar" MODULE="bonita-client-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-client-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-common-7.2.4.jar" MODULE="bonita-common-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-common-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="bonita-server-7.2.4.jar" MODULE="bonita-server-7.2.4.jar" MVN="mvn:org.talend.libraries/bonita-server-7.2.4/6.3.0" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xstream-1.4.7.jar" MODULE="xstream-1.4.7.jar" MVN="mvn:org.talend.libraries/xstream-1.4.7/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xstream-1.4.7.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
<IMPORT NAME="xpp3-1.1.6.jar" MODULE="xpp3-1.1.6.jar" MVN="mvn:org.talend.libraries/xpp3-1.1.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpp3-1.1.6.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
<IMPORT NAME="httpmime-4.2.5.jar" MODULE="httpmime-4.2.5.jar" MVN="mvn:org.talend.libraries/httpmime-4.2.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpmime-4.2.5.jar" REQUIRED_IF="(DB_VERSION=='BONITA_724') AND (CLIENT_MODE=='JAVA_CLIENT')" />
|
||||
|
||||
@@ -50,6 +50,11 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -219,6 +224,7 @@ if (!sftp && !ftps) { // *** ftp *** //
|
||||
ftp_<%=cid %> = new it.sauronsoftware.ftp4j.FTPClient();
|
||||
ftp_<%=cid %>.setSSLSocketFactory(sslSocketFactory);
|
||||
ftp_<%=cid %>.setCharset(<%=sEncoding%>);
|
||||
<%@ include file="../templates/FTP/ftpsProxy.javajet" %>
|
||||
<%
|
||||
if("IMPLICIT".equals(securityMode)){
|
||||
%>
|
||||
|
||||
@@ -71,7 +71,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
|
||||
@@ -71,7 +71,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -205,34 +210,60 @@ if (sftp) {// *** sftp *** //
|
||||
com.jcraft.jsch.ChannelSftp.LsEntry[] sftpFiles_<%=cid %> = vector_<%=cid %>.toArray(new com.jcraft.jsch.ChannelSftp.LsEntry[0]);
|
||||
int nb_file_<%=cid%> = 0;
|
||||
List<String> fileListTemp_<%=cid %> = new java.util.ArrayList<String>();
|
||||
<%
|
||||
if (dirFull) {
|
||||
%>
|
||||
List<String> fullFileInfoList_<%=cid %> = new java.util.ArrayList<String>();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
for (String filemask_<%=cid %> : maskList_<%=cid %>) {
|
||||
java.util.regex.Pattern fileNamePattern_<%=cid %> = java.util.regex.Pattern.compile(filemask_<%=cid %>.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*"));
|
||||
|
||||
for (com.jcraft.jsch.ChannelSftp.LsEntry filemaskTemp_<%=cid %> : sftpFiles_<%=cid %>) {
|
||||
if (fileNamePattern_<%=cid %>.matcher(filemaskTemp_<%=cid %>.getFilename()).matches()) {
|
||||
fileListTemp_<%=cid %>.add(filemaskTemp_<%=cid %>.getFilename());
|
||||
}
|
||||
}
|
||||
}
|
||||
String fileName_<%=cid %> = filemaskTemp_<%=cid %>.getFilename();
|
||||
if ((".").equals(fileName_<%=cid %>) || ("..").equals(fileName_<%=cid %>)) {
|
||||
continue;
|
||||
}
|
||||
if (fileNamePattern_<%=cid %>.matcher(fileName_<%=cid %>).matches()) {
|
||||
<%
|
||||
if (dirFull) {
|
||||
%>
|
||||
fullFileInfoList_<%=cid %>.add(filemaskTemp_<%=cid %>.getLongname());
|
||||
<%
|
||||
}
|
||||
%>
|
||||
fileListTemp_<%=cid %>.add(fileName_<%=cid %>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Listing files from server.");
|
||||
<%}%>
|
||||
for (String sftpFile_<%=cid %> : fileListTemp_<%=cid %>) {
|
||||
|
||||
if ((".").equals(sftpFile_<%=cid %>) || ("..").equals(sftpFile_<%=cid %>)) {
|
||||
continue;
|
||||
}
|
||||
String currentFileName_<%=cid%> = sftpFile_<%=cid %>;
|
||||
String currentFilePath_<%=cid%> = remotedir_<%=cid %> + "/" + sftpFile_<%=cid %>;
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.debug("<%=cid%> - List file : '" + currentFilePath_<%=cid%> + "' .");
|
||||
<%}%>
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE", currentFileName_<%=cid%>);
|
||||
globalMap.put("<%=cid %>_CURRENT_FILEPATH", currentFilePath_<%=cid%>);
|
||||
nb_file_<%=cid%>++;
|
||||
|
||||
for (int counter_<%=cid %> = 0; counter_<%=cid %> < fileListTemp_<%=cid %>.size(); counter_<%=cid %>++) {
|
||||
String currentFileName_<%=cid%> = fileListTemp_<%=cid %>.get(counter_<%=cid %>);
|
||||
String currentFilePath_<%=cid%> = remotedir_<%=cid %>;
|
||||
if(!remotedir_<%=cid%>.endsWith("/")&&!remotedir_<%=cid%>.endsWith("\\")){
|
||||
currentFilePath_<%=cid%> += "/";
|
||||
}
|
||||
currentFilePath_<%=cid%> += currentFileName_<%=cid%>;
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.debug("<%=cid%> - List file : '" + currentFilePath_<%=cid%> + "' .");
|
||||
<%}
|
||||
if (dirFull) {
|
||||
%>
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE", fullFileInfoList_<%=cid %>.get(counter_<%=cid %>));
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE", currentFileName_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
globalMap.put("<%=cid %>_CURRENT_FILEPATH", currentFilePath_<%=cid%>);
|
||||
nb_file_<%=cid%>++;
|
||||
<%
|
||||
} else {// *** ftp *** //
|
||||
%>
|
||||
|
||||
@@ -75,7 +75,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
String outputConnName = null;
|
||||
|
||||
@@ -84,7 +84,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -730,6 +735,7 @@ if (sftp) { // *** sftp *** //
|
||||
ftp_<%=cid %> = new it.sauronsoftware.ftp4j.FTPClient();
|
||||
ftp_<%=cid %>.setSSLSocketFactory(sslSocketFactory_<%=cid%>);
|
||||
ftp_<%=cid %>.setCharset(<%=encoding%>);
|
||||
<%@ include file="../templates/FTP/ftpsProxy.javajet" %>
|
||||
<%
|
||||
if("IMPLICIT".equals(securityMode)){
|
||||
%>
|
||||
|
||||
@@ -76,7 +76,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password",decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password",decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
@@ -205,6 +210,25 @@ int nb_file_<%=cid%> = 0;
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Putting file to the server.");
|
||||
<%}%>
|
||||
|
||||
class StatCheck_<%=cid%> {
|
||||
|
||||
boolean statOK(com.jcraft.jsch.ChannelSftp client, String path) {
|
||||
try {
|
||||
return client.stat(path).getAtimeString() != null;
|
||||
} catch (Exception e) {
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.warn("<%=cid%> - Directory or file permission denied for checking the status of the path : " + path);
|
||||
<%}%>
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
StatCheck_<%=cid%> sc_<%=cid%> = new StatCheck_<%=cid%>();
|
||||
|
||||
for (java.util.Map<String, String> map<%=cid %> : list<%=cid %>) {
|
||||
|
||||
<%} else if (!ftps) {%> // *** ftp *** //
|
||||
@@ -335,6 +359,7 @@ int nb_file_<%=cid%> = 0;
|
||||
ftp_<%=cid %> = new it.sauronsoftware.ftp4j.FTPClient();
|
||||
ftp_<%=cid %>.setSSLSocketFactory(sslSocketFactory_<%=cid%>);
|
||||
ftp_<%=cid %>.setCharset(<%=encoding%>);
|
||||
<%@ include file="../templates/FTP/ftpsProxy.javajet" %>
|
||||
<%
|
||||
if("IMPLICIT".equals(securityMode)){
|
||||
%>
|
||||
|
||||
@@ -93,9 +93,20 @@ try{
|
||||
<%}else if(("resume").equals(sftpoverwrite)){%>
|
||||
int mode<%=cid%> = com.jcraft.jsch.ChannelSftp.RESUME;
|
||||
<%}%>
|
||||
boolean putSuccess_<%=cid%> = false;
|
||||
|
||||
String remoteDir_<%=cid%> = <%=remotedir%>;
|
||||
if(remoteDir_<%=cid%>==null) {
|
||||
remoteDir_<%=cid%> = "";
|
||||
}
|
||||
remoteDir_<%=cid%> = remoteDir_<%=cid%>.trim();
|
||||
if(remoteDir_<%=cid%>.endsWith("/")) {
|
||||
remoteDir_<%=cid%> = remoteDir_<%=cid%>.substring(0, remoteDir_<%=cid%>.length()-1);
|
||||
}
|
||||
String dest_<%=cid%> = remoteDir_<%=cid%>+"/"+listings<%=cid %>[m<%=cid %>].getName();
|
||||
|
||||
try{
|
||||
c_<%=cid%>.put(listings<%=cid %>[m<%=cid %>].getAbsolutePath(), <%=remotedir%>, monitor<%=cid%>, mode<%=cid%>);
|
||||
|
||||
c_<%=cid%>.put(listings<%=cid %>[m<%=cid %>].getAbsolutePath(), dest_<%=cid%>, monitor<%=cid%>, mode<%=cid%>);
|
||||
// add info to list will return
|
||||
msg_<%=cid%>.add("file: " + listings<%=cid %>[m<%=cid %>].getAbsolutePath() + ", size: "
|
||||
+ listings<%=cid %>[m<%=cid %>].length() + " bytes upload successfully");
|
||||
@@ -103,7 +114,10 @@ try{
|
||||
log.debug("<%=cid%> - Uploaded file '" + listings<%=cid %>[m<%=cid %>].getName() + "' successfully.");
|
||||
<%}%>
|
||||
globalMap.put("<%=cid %>_CURRENT_STATUS", "File transfer OK.");
|
||||
if(c_<%=cid%>.stat(<%=remotedir%>+"/"+listings<%=cid %>[m<%=cid %>].getName()).getAtimeString() != null){
|
||||
|
||||
putSuccess_<%=cid%> = true;
|
||||
|
||||
if(sc_<%=cid%>.statOK(c_<%=cid%>, dest_<%=cid%>)){
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE_EXISTS",true);
|
||||
}
|
||||
}catch(com.jcraft.jsch.SftpException e_<%=cid%>) {
|
||||
@@ -111,8 +125,11 @@ try{
|
||||
log.error("<%=cid%> - File transfer fail."+e_<%= cid %>.getMessage());
|
||||
<%}%>
|
||||
globalMap.put("<%=cid %>_CURRENT_STATUS", "File transfer fail.");
|
||||
if(c_<%=cid%>.stat(<%=remotedir%>+"/"+listings<%=cid %>[m<%=cid %>].getName()).getAtimeString() != null){
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE_EXISTS",true);
|
||||
|
||||
if(!putSuccess_<%=cid%>) {
|
||||
if(sc_<%=cid%>.statOK(c_<%=cid%>, dest_<%=cid%>)){
|
||||
globalMap.put("<%=cid %>_CURRENT_FILE_EXISTS",true);
|
||||
}
|
||||
}
|
||||
<%
|
||||
if(("true").equals(dieOnError)){
|
||||
@@ -122,9 +139,9 @@ try{
|
||||
}else{
|
||||
%>
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.error("<%=cid%> - File permission denied: "+<%=remotedir%>+"/"+listings<%=cid %>[m<%=cid %>].getName());
|
||||
log.error("<%=cid%> - File permission denied: "+dest_<%=cid%>);
|
||||
<%}%>
|
||||
System.err.println("File permission denied: "+<%=remotedir%>+"/"+listings<%=cid %>[m<%=cid %>].getName());
|
||||
System.err.println("File permission denied: "+dest_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -71,7 +71,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
|
||||
@@ -71,7 +71,12 @@ if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
String decryptedProxyPassword_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
props_<%=cid%>.put("java.net.socks.password", decryptedProxyPassword_<%=cid%>);
|
||||
java.net.Authenticator.setDefault(new java.net.Authenticator() {
|
||||
public java.net.PasswordAuthentication getPasswordAuthentication() {
|
||||
return new java.net.PasswordAuthentication(<%=proxyUser %>, decryptedProxyPassword_<%=cid%>.toCharArray());
|
||||
}
|
||||
});
|
||||
<%}%>
|
||||
int nb_file_<%=cid%> = 0;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -132,7 +132,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="COMMONS-COMPRESS-1.10" MODULE="commons-compress-1.10.jar" MVN="mvn:org.talend.libraries/commons-compress-1.10/6.1.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-compress-1.10.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Encrypt-Zip" MODULE="checkArchive.jar" MVN="mvn:org.talend.libraries/checkArchive/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Encrypt-Zip" MODULE="checkArchive-1.1-20181130.jar" MVN="mvn:org.talend.libraries/checkArchive-1.1-20181130/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/checkArchive-1.1-20181130.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="zip4j_1.3.1.jar" MODULE="zip4j_1.3.1.jar" MVN="mvn:org.talend.libraries/zip4j_1.3.1/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="talendzip.jar" MODULE="talendzip.jar" MVN="mvn:org.talend.libraries/talendzip/6.1.0" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -54,14 +54,18 @@
|
||||
<%
|
||||
if(checkArchiveIntegrity){
|
||||
%>
|
||||
boolean isValidArchive_<%= cid %> = true;
|
||||
if(
|
||||
tmpFileURL_<%=cid %>.endsWith(".tar.gz")
|
||||
|| tmpFileURL_<%=cid %>.endsWith(".tgz")
|
||||
|| tmpFileURL_<%=cid %>.endsWith(".tar")
|
||||
|| tmpFileURL_<%=cid %>.endsWith(".gz")
|
||||
){
|
||||
boolean isValidArchive_<%= cid %> = org.talend.archive.IntegrityUtil.isGZIPValid(zipFileURL_<%=cid %>);
|
||||
<%
|
||||
isValidArchive_<%= cid %> = org.talend.archive.IntegrityUtil.isGZIPValid(zipFileURL_<%=cid %>);
|
||||
|
||||
}else if(tmpFileURL_<%=cid %>.endsWith(".tar")){
|
||||
isValidArchive_<%= cid %> = org.talend.archive.IntegrityUtil.isTarValid(zipFileURL_<%=cid %>);
|
||||
}
|
||||
<%
|
||||
if(dieWhenArchiveCorrupted){
|
||||
%>
|
||||
if(!isValidArchive_<%= cid %>){
|
||||
@@ -69,9 +73,6 @@
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="COMMONS-COMPRESS-1.10" MODULE="commons-compress-1.10.jar" MVN="mvn:org.talend.libraries/commons-compress-1.10/6.1.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-compress-1.10.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Ant-Zip" MODULE="ant.jar" MVN="mvn:org.talend.libraries/ant/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/ant.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Check-Archive" MODULE="checkArchive.jar" MVN="mvn:org.talend.libraries/checkArchive/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Check-Archive" MODULE="checkArchive-1.1-20181130.jar" MVN="mvn:org.talend.libraries/checkArchive-1.1-20181130/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/checkArchive-1.1-20181130.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="zip4j_1.3.1.jar" MODULE="zip4j_1.3.1.jar" MVN="mvn:org.talend.libraries/zip4j_1.3.1/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="talendzip.jar" MODULE="talendzip.jar" MVN="mvn:org.talend.libraries/talendzip/6.1.0" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -5,7 +5,7 @@ LONG_NAME=Unarchives a file of any format
|
||||
ZIPFILE.NAME=Archive file
|
||||
DIRECTORY.NAME=Extract directory
|
||||
ROOTNAME.NAME=Use archive file name as root directory
|
||||
INTEGRITY.NAME=Check the integrity before unzip
|
||||
INTEGRITY.NAME=Check the integrity before uncompress
|
||||
EXTRACTPATH.NAME=Extract file paths
|
||||
ARCHFILE.NAME=Archive file
|
||||
DIRECTORY.NAME=Extraction directory
|
||||
|
||||
@@ -13,25 +13,33 @@ String cid = node.getUniqueName();
|
||||
log = new LogUtil(node);
|
||||
String timeout=ElementParameterParser.getValue(node, "__TIMEOUT__");
|
||||
String maxMsg=ElementParameterParser.getValue(node, "__MAX_MSG__");
|
||||
|
||||
final boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
if(resourceMap.containsKey("consumer_<%=cid %>")) try {
|
||||
((javax.jms.MessageConsumer)resourceMap.get("consumer_<%=cid %>")).close();
|
||||
} catch (Exception e_<%=cid%>){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e_<%=cid%>.getMessage(), e_<%=cid%>);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("consumer_<%=cid %>");
|
||||
}
|
||||
if(resourceMap.containsKey("session_<%=cid %>")) try {
|
||||
((javax.jms.Session)resourceMap.get("session_<%=cid %>")).close();
|
||||
} catch (Exception e_<%=cid%>){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e_<%=cid%>.getMessage(), e_<%=cid%>);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("session_<%=cid %>");
|
||||
}
|
||||
if(resourceMap.containsKey("connection_<%=cid %>")) try {
|
||||
((javax.jms.Connection)resourceMap.get("connection_<%=cid %>")).close();
|
||||
} catch (Exception e_<%=cid%>){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e_<%=cid%>.getMessage(), e_<%=cid%>);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("connection_<%=cid %>");
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
|
||||
@@ -10,25 +11,33 @@ CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
log = new LogUtil(node);
|
||||
|
||||
final boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
if(resourceMap.containsKey("producer_<%=cid %>")) try {
|
||||
((javax.jms.MessageProducer)resourceMap.get("producer_<%=cid %>")).close();
|
||||
} catch (Exception e){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e.getMessage(), e);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("producer_<%=cid %>");
|
||||
}
|
||||
if(resourceMap.containsKey("session_<%=cid %>")) try {
|
||||
((javax.jms.Session)resourceMap.get("session_<%=cid %>")).close();
|
||||
} catch (Exception e_<%=cid%>){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e_<%=cid%>.getMessage(), e_<%=cid%>);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("session_<%=cid %>");
|
||||
}
|
||||
if(resourceMap.containsKey("connection_<%=cid %>")) try {
|
||||
((javax.jms.Connection)resourceMap.get("connection_<%=cid %>")).close();
|
||||
} catch (Exception e_<%=cid%>){
|
||||
<%if(isLog4jEnabled) {%>
|
||||
log.error(currentComponent + " " + e_<%=cid%>.getMessage(), e_<%=cid%>);
|
||||
<%}%>
|
||||
} finally {
|
||||
resourceMap.remove("connection_<%=cid %>");
|
||||
}
|
||||
|
||||
@@ -58,12 +58,13 @@ if(("false").equals(useExistingConn)){
|
||||
boolean alwaysTrust = ("true").equals(ElementParameterParser.getValue(node, "__ALWAYS_TRUST__"));
|
||||
String referrals=ElementParameterParser.getValue(node, "__REFERRALS__");
|
||||
String aliases=ElementParameterParser.getValue(node, "__ALIASES__");
|
||||
boolean useAuth = "true".equals(ElementParameterParser.getValue(node, "__AUTHENTIFICATION__"));
|
||||
String authen =ElementParameterParser.getValue(node, "__AUTHENTIFICATION__");
|
||||
String user =ElementParameterParser.getValue(node, "__USER__");
|
||||
|
||||
%>
|
||||
java.util.Hashtable env_<%=cid%> = new java.util.Hashtable();
|
||||
env_<%=cid%>.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
|
||||
env_<%=cid%>.put(javax.naming.Context.SECURITY_AUTHENTICATION, "simple");// "none","simple","strong"
|
||||
env_<%=cid%>.put(javax.naming.Context.REFERRAL, "<%=referrals%>");
|
||||
env_<%=cid%>.put("java.naming.ldap.derefAliases","<%=aliases%>");
|
||||
<%
|
||||
@@ -76,6 +77,19 @@ if(("false").equals(useExistingConn)){
|
||||
env_<%=cid%>.put(javax.naming.Context.PROVIDER_URL, "ldap://"+<%=host%>+":"+<%=port%>);
|
||||
<%
|
||||
}
|
||||
if(("true").equals(authen)){
|
||||
%>
|
||||
env_<%=cid%>.put(javax.naming.Context.SECURITY_PRINCIPAL, <%=user%>);
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
env_<%=cid%>.put(javax.naming.Context.SECURITY_CREDENTIALS, decryptedPassword_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
if(("LDAPS").equals(protocol)){
|
||||
%>
|
||||
env_<%=cid%>.put(javax.naming.Context.SECURITY_PROTOCOL, "ssl");
|
||||
@@ -121,8 +135,21 @@ if(("false").equals(useExistingConn)){
|
||||
|
||||
javax.naming.ldap.InitialLdapContext ctx_<%=cid%> = null;
|
||||
try{
|
||||
<%@ include file="../tLDAPConnection/ldapconnect.javajet"%>
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection attempt to '"+ <%=host%> + "'.");
|
||||
<%}%>
|
||||
ctx_<%=cid%> = new javax.naming.ldap.InitialLdapContext(env_<%=cid%>, null);
|
||||
<%
|
||||
if(("TLS").equals(protocol)){
|
||||
%>
|
||||
javax.naming.ldap.StartTlsRequest tldsReq_<%=cid%> = new javax.naming.ldap.StartTlsRequest();
|
||||
javax.naming.ldap.StartTlsResponse tls_<%=cid%> =(javax.naming.ldap.StartTlsResponse)ctx_<%=cid%>.extendedOperation(tldsReq_<%=cid%>);
|
||||
javax.net.ssl.SSLSession session_<%=cid%> = tls_<%=cid%>.negotiate((javax.net.ssl.SSLSocketFactory)talend.ssl.AdvancedSocketFactory.getDefault());
|
||||
<%
|
||||
}
|
||||
if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Connection to '"+<%=host%>+"' has succeeded.");
|
||||
<%}
|
||||
}else{
|
||||
%>
|
||||
try{
|
||||
|
||||
@@ -623,7 +623,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
}
|
||||
}
|
||||
dis.readFully(<%= currentTableName %>Struct.commonByteArray_<%=codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length);
|
||||
this.<%= connection.getName() %>__<%= column.getLabel() %> = new String(<%= currentTableName %>Struct.commonByteArray_<%=codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length);
|
||||
this.<%= connection.getName() %>__<%= column.getLabel() %> = new String(<%= currentTableName %>Struct.commonByteArray_<%= codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length, utf8Charset);
|
||||
}
|
||||
<%
|
||||
} else if(("java.util.Date").equals(typeToGenerate)) {
|
||||
@@ -706,7 +706,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
}
|
||||
}
|
||||
dis.readFully(<%= currentTableName %>Struct.commonByteArray_<%=codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length);
|
||||
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = new String(<%= currentTableName %>Struct.commonByteArray_<%=codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length);
|
||||
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = new String(<%= currentTableName %>Struct.commonByteArray_<%=codeGenArgument.getCurrentProjectName() %>_<%=codeGenArgument.getJobName() %>, 0, length, utf8Charset);
|
||||
}
|
||||
<%
|
||||
} else if(("byte[]").equals(typeToGenerate)) {
|
||||
@@ -797,7 +797,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
if(this.<%= connection.getName() %>__<%= column.getLabel() %> == null) {
|
||||
dos.writeInt(-1);
|
||||
} else {
|
||||
byte[] byteArray = this.<%= connection.getName() %>__<%= column.getLabel() %>.getBytes();
|
||||
byte[] byteArray = this.<%= connection.getName() %>__<%= column.getLabel() %>.getBytes(utf8Charset);
|
||||
dos.writeInt(byteArray.length);
|
||||
dos.write(byteArray);
|
||||
}
|
||||
@@ -858,7 +858,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
if(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> == null) {
|
||||
dos.writeInt(-1);
|
||||
} else {
|
||||
byte[] byteArray = this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>.getBytes();
|
||||
byte[] byteArray = this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>.getBytes(utf8Charset);
|
||||
dos.writeInt(byteArray.length);
|
||||
dos.write(byteArray);
|
||||
}
|
||||
|
||||
@@ -154,6 +154,7 @@ class="MomConnection"
|
||||
String customCipherSuite = ElementParameterParser.getValue(node, "__CUSTOM_CIPHER_SUITE__");
|
||||
String sslCipher = ElementParameterParser.getValue(node, "__MQ_SSL_CIPHER__");
|
||||
%>
|
||||
System.setProperty("com.ibm.mq.cfg.MessageProperties.PropctlToFORCE_RFH2","Yes");
|
||||
java.util.Hashtable properties<%=cid%>=new java.util.Hashtable();
|
||||
properties<%=cid%>.put("hostname", <%=host%>);
|
||||
properties<%=cid%>.put("port", Integer.valueOf(<%=port%>));
|
||||
|
||||
@@ -566,6 +566,7 @@ imports="
|
||||
boolean useCustomCipherSuite = ("true").equals(ElementParameterParser.getValue(node,"__CUSTOM_CIPHER__"));
|
||||
String customCipherSuite = ElementParameterParser.getValue(node, "__CUSTOM_CIPHER_SUITE__"); String sslCipher = ElementParameterParser.getValue(node, "__MQ_SSL_CIPHER__");
|
||||
%>
|
||||
System.setProperty("com.ibm.mq.cfg.MessageProperties.PropctlToFORCE_RFH2","Yes");
|
||||
java.util.Hashtable properties<%=cid%>=new java.util.Hashtable();
|
||||
properties<%=cid%>.put("hostname", <%=host%>);
|
||||
properties<%=cid%>.put("port", Integer.valueOf(<%=port%>));
|
||||
|
||||
@@ -393,10 +393,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
// added "print command" feature
|
||||
<% if (printCommand == true) { %>
|
||||
System.out.println("INFO: executing nzload command:");
|
||||
for( String cmd : cmds ) {
|
||||
System.out.print(cmd + " ");
|
||||
}
|
||||
System.out.println("INFO: executing nzload command:");
|
||||
for(int i = 0; i < cmds.length; i++) {
|
||||
if ("-pw".equals(cmds[i]) && decryptedPwd_<%=cid %>.equals(cmds[i+1])) {
|
||||
System.out.print(cmds[i] + " " + routines.system.PasswordEncryptUtil.PASSWORD_FOR_LOGS_VALUE + " ");
|
||||
i++;
|
||||
} else {
|
||||
System.out.print(cmds[i] + " ");
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
|
||||
@@ -311,16 +311,51 @@ String inputConnName = null;
|
||||
}
|
||||
%>
|
||||
<%=localContext%>.synchronizeContext();
|
||||
<%
|
||||
<%
|
||||
List<IContextParameter> params = currentProcess.getContextManager().getDefaultContext().getContextParameterList();
|
||||
for (IContextParameter ctxParam :params){
|
||||
String ctxParamName = ctxParam.getName();
|
||||
%>
|
||||
parentContextMap_<%=cid %>.put("<%=ctxParamName %>", <%=localContext%>.<%=ctxParamName %>);
|
||||
paraList_<%=cid %>.add("--context_type " + "<%=ctxParam.getName()%>" + "=" + "<%=ctxParam.getType()%>");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
/*Create local class to avoid 64kB method problem when huge amount of context variables declared*/
|
||||
if (!params.isEmpty()) {
|
||||
final int defaultInnerMethodLenght = 500;
|
||||
int lastMethodNumber = 0;
|
||||
%>
|
||||
class ContextProcessor_<%=cid %> {
|
||||
private void transmitContext_0() {
|
||||
<%
|
||||
for (int i = 1; i <= params.size(); i++) {
|
||||
IContextParameter ctxParam = params.get(i-1);
|
||||
String ctxParamName = ctxParam.getName();
|
||||
String ctxParameterType = ctxParam.getType();
|
||||
if (i % defaultInnerMethodLenght == 0) {
|
||||
/* close previous method and declare new */
|
||||
lastMethodNumber++;
|
||||
%>
|
||||
}
|
||||
|
||||
private void transmitContext_<%=lastMethodNumber%>() {
|
||||
<%
|
||||
} //endIf
|
||||
%>
|
||||
parentContextMap_<%=cid %>.put("<%=ctxParamName %>", <%=localContext%>.<%=ctxParamName %>);
|
||||
paraList_<%=cid %>.add("--context_type " + "<%=ctxParamName%>" + "=" + "<%=ctxParam.getType()%>");
|
||||
<%
|
||||
} //endFor
|
||||
%>
|
||||
<%/*close last method*/%>
|
||||
}
|
||||
public void transmitAllContext() {
|
||||
<%
|
||||
for (int i = 0; i <=lastMethodNumber; i++) {
|
||||
%>
|
||||
transmitContext_<%=i %>();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
new ContextProcessor_<%=cid %>().transmitAllContext();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
java.util.Enumeration<?> propertyNames_<%=cid %> = <%=localContext%>.propertyNames();
|
||||
while (propertyNames_<%=cid %>.hasMoreElements()) {
|
||||
String key_<%=cid %> = (String) propertyNames_<%=cid %>.nextElement();
|
||||
|
||||
@@ -19,6 +19,12 @@ imports="
|
||||
|
||||
boolean enableServerSideEncryption = "true".equals(ElementParameterParser.getValue(node, "__ENABLE-SERVER-SIDE-ENCRYPTION__"));
|
||||
|
||||
String partSizeMb = ElementParameterParser.getValue(node, "__PART_SIZE__");
|
||||
|
||||
if((partSizeMb == null) || "".equals(partSizeMb) || "\"\"".equals(partSizeMb)) {
|
||||
partSizeMb = "100";
|
||||
}
|
||||
|
||||
%>
|
||||
<%@ include file="../tS3Connection/S3Client.javajet" %>
|
||||
try{
|
||||
@@ -29,19 +35,93 @@ imports="
|
||||
<%
|
||||
}
|
||||
%>
|
||||
com.amazonaws.services.s3.model.CopyObjectRequest copyRequest_<%=cid%> = new com.amazonaws.services.s3.model.CopyObjectRequest(<%=from_bucket%>, <%=from_key%>, <%=to_bucket%>, <%=to_key%>);
|
||||
|
||||
long partSizeInBytes_<%=cid%> = <%=partSizeMb%> * 1024 * 1024;
|
||||
long maxBytes4SingleCopyCall_<%=cid%> = 5 * 1024 * 1024 * 1024;//5GB
|
||||
com.amazonaws.services.s3.model.ObjectMetadata objectMetadata_<%=cid%> = null;
|
||||
<%
|
||||
if(enableServerSideEncryption){
|
||||
%>
|
||||
com.amazonaws.services.s3.model.ObjectMetadata objectMetadata_<%=cid%> = new com.amazonaws.services.s3.model.ObjectMetadata();
|
||||
objectMetadata_<%=cid%> = new com.amazonaws.services.s3.model.ObjectMetadata();
|
||||
objectMetadata_<%=cid%>.setSSEAlgorithm(com.amazonaws.services.s3.model.ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
|
||||
copyRequest_<%=cid%>.setNewObjectMetadata(objectMetadata_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
conn_<%=cid%>.copyObject(copyRequest_<%=cid%>);
|
||||
final String from_bucket_<%=cid%> = <%=from_bucket%>;
|
||||
final String from_key_<%=cid%> = <%=from_key%>;
|
||||
final String to_bucket_<%=cid%> = <%=to_bucket%>;
|
||||
final String to_key_<%=cid%> = <%=to_key%>;
|
||||
|
||||
//get the source metadata information
|
||||
com.amazonaws.services.s3.model.GetObjectMetadataRequest metadataRequest_<%=cid%> = new com.amazonaws.services.s3.model.GetObjectMetadataRequest(from_bucket_<%=cid%>, from_key_<%=cid%>);
|
||||
com.amazonaws.services.s3.model.ObjectMetadata metadataResult_<%=cid%> = conn_<%=cid%>.getObjectMetadata(metadataRequest_<%=cid%>);
|
||||
long objectSize_<%=cid%> = metadataResult_<%=cid%>.getContentLength();
|
||||
|
||||
boolean multiUpload_<%=cid%> = objectSize_<%=cid%> > maxBytes4SingleCopyCall_<%=cid%>;
|
||||
|
||||
if(!multiUpload_<%=cid%>) {
|
||||
com.amazonaws.services.s3.model.CopyObjectRequest putRequest_<%=cid%> = new com.amazonaws.services.s3.model.CopyObjectRequest(from_bucket_<%=cid%>, from_key_<%=cid%>, to_bucket_<%=cid%>, to_key_<%=cid%>);
|
||||
if(objectMetadata_<%=cid%> != null) {
|
||||
putRequest_<%=cid%>.setNewObjectMetadata(objectMetadata_<%=cid%>);
|
||||
}
|
||||
|
||||
conn_<%=cid%>.copyObject(putRequest_<%=cid%>);
|
||||
} else {
|
||||
<%
|
||||
//as the s3 service limit, the multi upload copy may lose s3 object metadata information or changed, but some object metadata information is important like the "x-amz-iv" key for client encrypt with kms
|
||||
//which will make the decrypt not work with different key like expected, so fail asap here and there is very rare risk which use a large file than 5GB and also with client encrypt, so ignore it now.
|
||||
%>
|
||||
java.util.Map<String,String> userMetadata_<%=cid%> = metadataResult_<%=cid%>.getUserMetadata();
|
||||
if((userMetadata_<%=cid%>!=null) && userMetadata_<%=cid%>.get("x-amz-iv")!=null) {
|
||||
throw new RuntimeException("the metadata key : \"x-amz-iv\" exists in the current object metadata, its value is important for client encrypt with KMS, which can't be copied as s3 service limit it");
|
||||
}
|
||||
|
||||
com.amazonaws.services.s3.model.InitiateMultipartUploadRequest putRequest_<%=cid%> = null;
|
||||
if(objectMetadata_<%=cid%> != null) {
|
||||
putRequest_<%=cid%> = new com.amazonaws.services.s3.model.InitiateMultipartUploadRequest(to_bucket_<%=cid%>, to_key_<%=cid%>, objectMetadata_<%=cid%>);
|
||||
} else {
|
||||
//even pass the source object metadata, some metadata will change too like "x-amz-iv"
|
||||
putRequest_<%=cid%> = new com.amazonaws.services.s3.model.InitiateMultipartUploadRequest(to_bucket_<%=cid%>, to_key_<%=cid%>, metadataResult_<%=cid%>);
|
||||
}
|
||||
|
||||
|
||||
com.amazonaws.services.s3.model.InitiateMultipartUploadResult initResult_<%=cid%> = conn_<%=cid%>.initiateMultipartUpload(putRequest_<%=cid%>);
|
||||
|
||||
long bytePosition_<%=cid%> = 0;
|
||||
int partNum_<%=cid%> = 1;
|
||||
|
||||
java.util.List<com.amazonaws.services.s3.model.PartETag> partTags_<%=cid%> = new java.util.ArrayList<com.amazonaws.services.s3.model.PartETag>();
|
||||
|
||||
try {
|
||||
while (bytePosition_<%=cid%> < objectSize_<%=cid%>) {
|
||||
long lastByte_<%=cid%> = java.lang.Math.min(bytePosition_<%=cid%> + partSizeInBytes_<%=cid%> - 1, objectSize_<%=cid%> - 1);
|
||||
|
||||
com.amazonaws.services.s3.model.CopyPartRequest copyPartRequest_<%=cid%> = new com.amazonaws.services.s3.model.CopyPartRequest()
|
||||
.withSourceBucketName(from_bucket_<%=cid%>)
|
||||
.withSourceKey(from_key_<%=cid%>)
|
||||
.withDestinationBucketName(to_bucket_<%=cid%>)
|
||||
.withDestinationKey(to_key_<%=cid%>)
|
||||
.withUploadId(initResult_<%=cid%>.getUploadId())
|
||||
.withFirstByte(bytePosition_<%=cid%>)
|
||||
.withLastByte(lastByte_<%=cid%>)
|
||||
.withPartNumber(partNum_<%=cid%>++);
|
||||
partTags_<%=cid%>.add(conn_<%=cid%>.copyPart(copyPartRequest_<%=cid%>).getPartETag());
|
||||
bytePosition_<%=cid%> += partSizeInBytes_<%=cid%>;
|
||||
}
|
||||
|
||||
com.amazonaws.services.s3.model.CompleteMultipartUploadRequest completeRequest_<%=cid%> = new com.amazonaws.services.s3.model.CompleteMultipartUploadRequest(
|
||||
to_bucket_<%=cid%>,
|
||||
to_key_<%=cid%>,
|
||||
initResult_<%=cid%>.getUploadId(),
|
||||
partTags_<%=cid%>);
|
||||
conn_<%=cid%>.completeMultipartUpload(completeRequest_<%=cid%>);
|
||||
} catch (java.lang.Exception uploadException_<%=cid%>) {
|
||||
conn_<%=cid%>.abortMultipartUpload(new com.amazonaws.services.s3.model.AbortMultipartUploadRequest(to_bucket_<%=cid%>, to_key_<%=cid%>, initResult_<%=cid%>.getUploadId()));
|
||||
throw uploadException_<%=cid%>;
|
||||
}
|
||||
}
|
||||
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
|
||||
@@ -261,6 +261,15 @@
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="PART_SIZE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="40"
|
||||
REQUIRED="true"
|
||||
>
|
||||
<DEFAULT>100</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
|
||||
@@ -55,4 +55,6 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
|
||||
STS_ENDPOINT.NAME=
|
||||
PART_SIZE.NAME=Part size(Mb) for file larger than 5GB
|
||||
@@ -15,13 +15,33 @@ imports="
|
||||
%>
|
||||
|
||||
//initial the command
|
||||
StringBuilder command_<%=cid %> = new StringBuilder();
|
||||
command_<%=cid %>.append("ls \"").append(<%=remoteDir %>).append("/").append(<%=fileExists %>).append("\"");
|
||||
StringBuilder command_<%=cid%> = new StringBuilder();
|
||||
|
||||
final String dir_<%=cid%> = String.valueOf(<%=remoteDir %>);
|
||||
final String file_<%=cid%> = String.valueOf(<%=fileExists %>);
|
||||
|
||||
command_<%=cid%>.append("ls ");
|
||||
|
||||
if(dir_<%=cid%>.contains("*") || dir_<%=cid%>.contains("?") || dir_<%=cid%>.contains("[") || dir_<%=cid%>.contains("]")) {
|
||||
command_<%=cid%>.append(dir_<%=cid%>);
|
||||
} else {
|
||||
command_<%=cid%>.append("\"").append(dir_<%=cid%>).append("\"");
|
||||
}
|
||||
|
||||
command_<%=cid%>.append("/");
|
||||
|
||||
if(file_<%=cid%>.contains("*") || file_<%=cid%>.contains("?") || file_<%=cid%>.contains("[") || file_<%=cid%>.contains("]")) {
|
||||
command_<%=cid%>.append(file_<%=cid%>);
|
||||
} else {
|
||||
command_<%=cid%>.append("\"").append(file_<%=cid%>).append("\"");
|
||||
}
|
||||
|
||||
globalMap.put("<%=cid %>_FILENAME", <%=fileExists %>);
|
||||
/* Create a session */
|
||||
ch.ethz.ssh2.Session sess_<%=cid%> = conn_<%=cid%>.openSession();
|
||||
//execute the command
|
||||
sess_<%=cid%>.execCommand((command_<%=cid %>).toString());
|
||||
sess_<%=cid%>.execCommand((command_<%=cid%>).toString());
|
||||
|
||||
//get the return info
|
||||
java.io.InputStream stdout_<%=cid%> = sess_<%=cid%>.getStdout();
|
||||
java.io.BufferedReader brout_<%=cid%>= new java.io.BufferedReader(new java.io.InputStreamReader(stdout_<%=cid%>));
|
||||
|
||||
@@ -9,6 +9,7 @@ imports="
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.metadata.types.JavaTypesManager
|
||||
org.talend.core.model.metadata.types.JavaType
|
||||
org.talend.core.model.utils.TalendTextUtils
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
@@ -82,7 +83,7 @@ if (inputConnName != null){
|
||||
}
|
||||
if(column.getComment()!=null || column.getComment().length()>0){
|
||||
%>
|
||||
spVar_<%=i%>.setLabel("<%=column.getComment()%>");
|
||||
spVar_<%=i%>.setLabel("<%=TalendTextUtils.escapeJavaText(column.getComment())%>");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
org.talend.core.model.metadata.IMetadataColumn
|
||||
org.talend.core.model.process.IProcess
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.utils.TalendTextUtils
|
||||
java.io.File
|
||||
java.io.BufferedWriter
|
||||
java.io.FileOutputStream
|
||||
@@ -139,7 +140,7 @@ imports="
|
||||
}
|
||||
if(imetadataColumn.getComment() != null && !"".equals(imetadataColumn.getComment())){
|
||||
%>
|
||||
.comment("<%= imetadataColumn.getComment()%>")
|
||||
.comment("<%= TalendTextUtils.escapeJavaText(imetadataColumn.getComment())%>")
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,26 @@ java.util.List
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
}// responce loop
|
||||
try{
|
||||
String error_<%=cid%> = ((org.json.JSONObject)<%=cid%>_json.get("error")).getString("message");
|
||||
String detail_<%=cid%> = ((org.json.JSONObject)<%=cid%>_json.get("error")).getString("detail");
|
||||
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
%>
|
||||
log.error(error_<%=cid%>+" --Detail: "+detail_<%=cid%>);
|
||||
<%
|
||||
}else{%>
|
||||
System.err.println(error_<%=cid%>+" --Detail: "+detail_<%=cid%>);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}catch(org.json.JSONException je_<%=cid%>){
|
||||
//ignore
|
||||
}
|
||||
} else {
|
||||
String error_<%=cid%> = <%=cid%>_json.getJSONObject("error").getString("message");
|
||||
boolean no_record_<%=cid%> = (<%=cid%>_response.getStatusLine().getStatusCode() == 404) && ("No Record found".equals(error_<%=cid%>));
|
||||
|
||||
@@ -50,7 +50,11 @@ IConnection outgoingConn = outgoingConns.get(0);
|
||||
|
||||
|
||||
nb_line_<%=cid%>++;
|
||||
<%=cid%>_result = (org.json.JSONObject) <%=cid%>_resultArray.get(<%=cid%>_i);
|
||||
Object obj_<%=cid%> = <%=cid%>_resultArray.get(<%=cid%>_i);
|
||||
if(obj_<%=cid%> instanceof org.json.JSONObject){
|
||||
<%=cid%>_result = (org.json.JSONObject) <%=cid%>_resultArray.get(<%=cid%>_i);
|
||||
}
|
||||
|
||||
<%
|
||||
for (int i = 0; i < columnList.size(); i++) {
|
||||
IMetadataColumn column = columnList.get(i);
|
||||
|
||||
@@ -241,6 +241,9 @@
|
||||
<PARAMETER NAME="INCLUDEHEADER" FIELD="CHECK" NUM_ROW="40" SHOW_IF="IS_VIRTUAL_COMPONENT=='true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="FILE_EXIST_EXCEPTION" FIELD="CHECK" NUM_ROW="30" SHOW="false">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
<CODEGENERATION>
|
||||
<TEMPLATES INPUT="In" OUTPUT="Out">
|
||||
@@ -268,6 +271,7 @@
|
||||
<TEMPLATE_PARAM SOURCE="self.THOUSANDS_SEPARATOR" TARGET="Out.THOUSANDS_SEPARATOR" />
|
||||
<TEMPLATE_PARAM SOURCE="self.DECIMAL_SEPARATOR" TARGET="Out.DECIMAL_SEPARATOR" />
|
||||
<TEMPLATE_PARAM SOURCE="self.INCLUDEHEADER" TARGET="Out.INCLUDEHEADER" />
|
||||
<TEMPLATE_PARAM SOURCE="self.FILE_EXIST_EXCEPTION" TARGET="Out.FILE_EXIST_EXCEPTION" />
|
||||
</TEMPLATES>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Teradata" MODULE="terajdbc4-15.10.00.14.jar" MVN="mvn:org.talend.libraries/terajdbc4-15.10.00.14/6.0.0"
|
||||
|
||||
@@ -3,6 +3,7 @@ imports="
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.metadata.types.JavaTypesManager
|
||||
org.talend.core.model.metadata.IMetadataTable
|
||||
org.talend.core.model.metadata.IMetadataColumn
|
||||
java.util.List
|
||||
@@ -93,8 +94,16 @@ imports="
|
||||
if(count==(columnList.size()-1)) {
|
||||
suffix = "";
|
||||
}
|
||||
String insertValue = "?";
|
||||
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
|
||||
if ("java.util.Date".equals(typeToGenerate)) {
|
||||
String dbType = column.getType();
|
||||
if ("DATE".equals(dbType)||"TIME".equals(dbType)) {
|
||||
insertValue = "cast(cast(? as timestamp) as "+dbType+")";
|
||||
}
|
||||
}
|
||||
insertColName.append(column.getLabel()).append(suffix);
|
||||
insertValueStmt.append("?").append(suffix);
|
||||
insertValueStmt.append(insertValue).append(suffix);
|
||||
count++;
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -139,6 +139,14 @@
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="MAPPING"
|
||||
FIELD="MAPPING_TYPE"
|
||||
NUM_ROW="10"
|
||||
SHOW="false"
|
||||
>
|
||||
<DEFAULT>teradata_id</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
</PARAMETERS>
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ if(<%=incomingConnName%>.<%=column.getLabel()%>==null){
|
||||
isObject = true;
|
||||
%>
|
||||
if(<%=incomingConnName%>.<%=column.getLabel()%>==null){
|
||||
<%=prefix+cid%>.setNull(<%=counter%>,java.sql.Types.DATE);
|
||||
<%=prefix+cid%>.setNull(<%=counter%>,java.sql.Types.TIMESTAMP);
|
||||
<%
|
||||
}else if(("Timestamp").equals(typeToGenerate)){
|
||||
isObject = true;
|
||||
@@ -191,11 +191,11 @@ if(isObject){
|
||||
%>
|
||||
if(<%=incomingConnName%>.<%=column.getLabel()%>!=null){
|
||||
|
||||
<%=prefix+cid%>.setDate(<%=counter%>,new java.sql.Date(<%=incomingConnName%>.<%=column.getLabel()%>.getTime()));
|
||||
<%=prefix+cid%>.setTimestamp(<%=counter%>,new java.sql.Timestamp(<%=incomingConnName%>.<%=column.getLabel()%>.getTime()));
|
||||
|
||||
}else{
|
||||
|
||||
<%=prefix+cid%>.setNull(<%=counter%>,java.sql.Types.DATE);
|
||||
<%=prefix+cid%>.setNull(<%=counter%>,java.sql.Types.TIMESTAMP);
|
||||
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -128,7 +128,7 @@ if(columnList!=null){
|
||||
}
|
||||
insertValueSQL.append(":").append(columnName);
|
||||
if("id_Date".equals(talendType)){
|
||||
insertValueSQL.append(" (Date, Format '").append(column.getPattern().replace("\"","")).append("')");
|
||||
insertValueSQL.append(" (Format '").append(column.getPattern().replace("\"","")).append("')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<%@jet
|
||||
%>
|
||||
|
||||
if ("true".equals(System.getProperty("http.proxySet"))) { <% /* HTTP proxy used */ %>
|
||||
String httpProxyHost = System.getProperty("http.proxyHost");
|
||||
int httpProxyPort = Integer.valueOf(System.getProperty("http.proxyPort"));
|
||||
String proxyUser = System.getProperty("http.proxyUser");
|
||||
String proxyPassword = System.getProperty("http.proxyPassword");
|
||||
it.sauronsoftware.ftp4j.connectors.HTTPTunnelConnector proxyConnector = new it.sauronsoftware.ftp4j.connectors.HTTPTunnelConnector(httpProxyHost, httpProxyPort, proxyUser, proxyPassword);
|
||||
|
||||
ftp_<%=cid %>.setConnector(proxyConnector);
|
||||
}
|
||||
@@ -2955,6 +2955,10 @@ public class DataProcess implements IGeneratingProcess {
|
||||
return;
|
||||
}
|
||||
INode refNode = buildCheckMap.get(graphicalNode);
|
||||
// for joblet node not active => not included in buildCheckMap
|
||||
if (refNode == null) {
|
||||
return;
|
||||
}
|
||||
List<? extends IConnection> connections = refNode.getIncomingConnections(EConnectionType.FLOW_MAIN);
|
||||
if (connections.size() == 0) {
|
||||
return;
|
||||
|
||||
@@ -17,9 +17,11 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.process.IConnection;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.service.IMRProcessService;
|
||||
import org.talend.designer.core.i18n.Messages;
|
||||
import org.talend.designer.core.ui.editor.nodecontainer.NodeContainer;
|
||||
import org.talend.designer.core.ui.editor.nodes.Node;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
|
||||
@@ -90,8 +92,8 @@ public class ChangeActivateStatusSubjobCommand extends Command {
|
||||
private void refreshMRStatus() {
|
||||
Process process = (Process) node.getProcess();
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMRProcessService.class)) {
|
||||
IMRProcessService mrService = (IMRProcessService) GlobalServiceRegister.getDefault().getService(
|
||||
IMRProcessService.class);
|
||||
IMRProcessService mrService = (IMRProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IMRProcessService.class);
|
||||
if (mrService != null) {
|
||||
List<INode> mrNodeList = new ArrayList<INode>();
|
||||
for (INode node : process.getGraphicalNodes()) {
|
||||
@@ -109,6 +111,20 @@ public class ChangeActivateStatusSubjobCommand extends Command {
|
||||
Process process = (Process) node.getProcess();
|
||||
process.setActivateSubjob(node, value, oneComponent);
|
||||
|
||||
List<Node> nodeList = new ArrayList<Node>();
|
||||
List<NodeContainer> nodeContainers = node.getNodeContainer().getSubjobContainer().getNodeContainers();
|
||||
for (NodeContainer container : nodeContainers) {
|
||||
nodeList.add(container.getNode());
|
||||
}
|
||||
for (Node nodeInSubjob : nodeList) {
|
||||
for (IConnection connection : nodeInSubjob.getIncomingConnections()) {
|
||||
INode source = connection.getSource();
|
||||
if (!nodeList.contains(source)) {
|
||||
source.getOutgoingConnections().get(0).updateAllId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process.checkStartNodes();
|
||||
process.checkProcess();
|
||||
refreshPropertyView();
|
||||
@@ -120,6 +136,20 @@ public class ChangeActivateStatusSubjobCommand extends Command {
|
||||
Process process = (Process) node.getProcess();
|
||||
process.setActivateSubjob(node, !value, oneComponent);
|
||||
|
||||
List<Node> nodeList = new ArrayList<Node>();
|
||||
List<NodeContainer> nodeContainers = node.getNodeContainer().getSubjobContainer().getNodeContainers();
|
||||
for (NodeContainer container : nodeContainers) {
|
||||
nodeList.add(container.getNode());
|
||||
}
|
||||
for (Node nodeInSubjob : nodeList) {
|
||||
for (IConnection connection : nodeInSubjob.getIncomingConnections()) {
|
||||
INode source = connection.getSource();
|
||||
if (!nodeList.contains(source)) {
|
||||
source.getOutgoingConnections().get(0).updateAllId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process.checkStartNodes();
|
||||
process.checkProcess();
|
||||
refreshPropertyView();
|
||||
|
||||
@@ -1843,6 +1843,7 @@ public class Node extends Element implements IGraphicalNode {
|
||||
|
||||
if (id.equals(EParameterName.CONNECTION_FORMAT.getName())) {
|
||||
connectionToParse = (String) value;
|
||||
setConnectionName(ElementParameterParser.parse(this, connectionToParse));
|
||||
// to check
|
||||
// String newValue = ElementParameterParser.parse(this, connectionToParse);
|
||||
// setConnectionName(newValue);
|
||||
|
||||
@@ -298,22 +298,34 @@ public class TableEntriesManager {
|
||||
TableItem retrieveTableItem(ITableEntry dataMapTableEntry) {
|
||||
DataMapTableView dataMapTableView = this.mapperManager.retrieveIDataMapTableView(dataMapTableEntry.getParent());
|
||||
TableItem[] tableItems = new TableItem[0];
|
||||
List inputList = null;
|
||||
if (dataMapTableEntry instanceof IColumnEntry) {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForColumns().getInputList();
|
||||
} else if (dataMapTableEntry instanceof FilterTableEntry) {
|
||||
if (FilterTableEntry.OTHER_FILTER.equals(((FilterTableEntry) dataMapTableEntry).getFilterKind())) {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForOtherFilters().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForOtherFilters().getInputList();
|
||||
} else {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForWhereFilters().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForWhereFilters().getInputList();
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException(Messages.getString("TableEntriesManager.exceptionMessage.caseNotFound")); //$NON-NLS-1$
|
||||
}
|
||||
TableItem tableItem = null;
|
||||
for (TableItem tableItem2 : tableItems) {
|
||||
if (tableItem2.getData() == dataMapTableEntry) {
|
||||
tableItem = tableItem2;
|
||||
break;
|
||||
if (inputList != null) {
|
||||
int index = inputList.indexOf(dataMapTableEntry);
|
||||
if (0 <= index && index < tableItems.length) {
|
||||
tableItem = tableItems[index];
|
||||
}
|
||||
}
|
||||
if (tableItem == null) {
|
||||
for (TableItem tableItem2 : tableItems) {
|
||||
if (tableItem2.getData() == dataMapTableEntry) {
|
||||
tableItem = tableItem2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
|
||||
|
||||
@@ -211,22 +211,34 @@ public class TableEntriesManager {
|
||||
DataMapTableView dataMapTableView = this.mapperManager.retrieveAbstractDataMapTableView(dataMapTableEntry
|
||||
.getParent());
|
||||
TableItem[] tableItems = new TableItem[0];
|
||||
List inputList = null;
|
||||
if (dataMapTableEntry instanceof IColumnEntry) {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForColumns().getInputList();
|
||||
} else if (dataMapTableEntry instanceof FilterTableEntry) {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForFilters().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForFilters().getInputList();
|
||||
} else if (dataMapTableEntry instanceof GlobalMapEntry) {
|
||||
tableItems = dataMapTableView.getTableViewerCreatorForGlobalMap().getTable().getItems();
|
||||
inputList = dataMapTableView.getTableViewerCreatorForGlobalMap().getInputList();
|
||||
} else if (dataMapTableEntry instanceof ExpressionFilterEntry) {
|
||||
return null;
|
||||
} else {
|
||||
throw new IllegalArgumentException(Messages.getString("TableEntriesManager.exceptionMessage.caseNotFound")); //$NON-NLS-1$
|
||||
}
|
||||
TableItem tableItem = null;
|
||||
for (int i = 0; i < tableItems.length; i++) {
|
||||
if (tableItems[i].getData() == dataMapTableEntry) {
|
||||
tableItem = tableItems[i];
|
||||
break;
|
||||
if (inputList != null) {
|
||||
int index = inputList.indexOf(dataMapTableEntry);
|
||||
if (0 <= index && index < tableItems.length) {
|
||||
tableItem = tableItems[index];
|
||||
}
|
||||
}
|
||||
if (tableItem == null) {
|
||||
for (int i = 0; i < tableItems.length; i++) {
|
||||
if (tableItems[i].getData() == dataMapTableEntry) {
|
||||
tableItem = tableItems[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<id>bin</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
<format>${assembly.format}</format>
|
||||
</formats>
|
||||
|
||||
<files>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<name>@ProjectName@ @JobName@ (@JobType@)</name>
|
||||
|
||||
<properties>
|
||||
<maven.deploy.skip>false</maven.deploy.skip>
|
||||
<assembly.format>zip</assembly.format>
|
||||
<talend.job.path>@JobPath@</talend.job.path>
|
||||
<talend.job.package>@JobPackage@</talend.job.package>
|
||||
|
||||
@@ -22,7 +24,6 @@
|
||||
<talend.project.name>@ProjectName@</talend.project.name>
|
||||
<talend.project.name.lowercase>@ProjectName@</talend.project.name.lowercase>
|
||||
<talend.project.id>@ProjectId@</talend.project.id>
|
||||
<talend.project.branch>@ProjectBranch@</talend.project.branch>
|
||||
<talend.job.name>@JobName@</talend.job.name>
|
||||
<talend.job.version>@TalendJobVersion@</talend.job.version>
|
||||
<talend.job.date>@JobDate@</talend.job.date>
|
||||
@@ -142,8 +143,32 @@
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-deploy</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>deploy-file</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>deploy-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<file>${project.build.directory}/${talend.job.finalName}.${assembly.format}</file>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<packaging>${assembly.format}</packaging>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
@@ -169,6 +194,7 @@
|
||||
<tarLongFileMode>gnu</tarLongFileMode>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<finalName>${talend.job.finalName}</finalName>
|
||||
<attach>false</attach>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
@@ -324,17 +324,20 @@ public class JavaProcessor extends AbstractJavaProcessor implements IJavaBreakpo
|
||||
String jobClassPackageFolder = null;
|
||||
String jobClassFilePath = null;
|
||||
// only for "standard" job
|
||||
Item item = property.getItem();
|
||||
if (item != null && item.getParent() == null) {
|
||||
try {
|
||||
IRepositoryViewObject object = ProxyRepositoryFactory.getInstance().getSpecificVersion(property.getId(),
|
||||
property.getVersion(), false);
|
||||
if (object != null) {
|
||||
property = object.getProperty();
|
||||
item = property.getItem();
|
||||
Item item = null;
|
||||
if (property != null) {
|
||||
item = property.getItem();
|
||||
if (item != null && item.getParent() == null) {
|
||||
try {
|
||||
IRepositoryViewObject object = ProxyRepositoryFactory.getInstance().getSpecificVersion(property.getId(),
|
||||
property.getVersion(), false);
|
||||
if (object != null) {
|
||||
property = object.getProperty();
|
||||
item = property.getItem();
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
throw new ProcessorException(e);
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
throw new ProcessorException(e);
|
||||
}
|
||||
}
|
||||
if (isStandardJob()) {
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
<artifactId>talend_DB_mssqlUtil-1.2-20171017</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>checkArchive-1.1-20181130</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
Binary file not shown.
@@ -2941,13 +2941,30 @@
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="6.4.2"
|
||||
breaks="6.4.1"
|
||||
class="org.talend.repository.model.migration.AddSchemaDatePatternUseForImpalaTask"
|
||||
description="Change output Date pattern to 'yyyy-MM-dd'"
|
||||
id="org.talend.repository.model.migration.AddSchemaDatePatternUseForImpalaTask"
|
||||
name="AddSchemaDatePatternUseForImpalaTask"
|
||||
version="6.4.2">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="6.4.1"
|
||||
class="org.talend.repository.model.migration.AddDbMappingTTeradataFastLoadMigrationTask"
|
||||
id="org.talend.repository.model.migration.AddDbMappingTTeradataFastLoadMigrationTask"
|
||||
name="AddDbMappingTTeradataFastLoadMigrationTask"
|
||||
version="6.4.2">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="6.4.1"
|
||||
class="org.talend.repository.model.migration.spark.UseSqlDateTypeInDataframesTask"
|
||||
description="Keep Date type for component impacted by change from Date to Timestamp"
|
||||
id="org.talend.repository.model.migration.spark.UseSqlDateTypeInDataframesTask"
|
||||
name="UseSqlDateTypeInDataframesTask"
|
||||
version="6.4.2">
|
||||
</projecttask>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package org.talend.repository.model.migration;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.model.components.ModifyComponentsAction;
|
||||
import org.talend.core.model.components.conversions.IComponentConversion;
|
||||
import org.talend.core.model.components.filters.IComponentFilter;
|
||||
import org.talend.core.model.components.filters.NameComponentFilter;
|
||||
import org.talend.core.model.metadata.types.TypesManager;
|
||||
import org.talend.core.model.migration.AbstractJobMigrationTask;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ColumnType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
|
||||
public class AddDbMappingTTeradataFastLoadMigrationTask extends AbstractJobMigrationTask {
|
||||
|
||||
@Override
|
||||
public Date getOrder() {
|
||||
GregorianCalendar gc = new GregorianCalendar(2018, 6, 26, 0, 0, 0);
|
||||
return gc.getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Item item) {
|
||||
final String mappingType = "teradata_id";
|
||||
ProcessType processType = getProcessType(item);
|
||||
if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
try {
|
||||
|
||||
IComponentFilter filter = new NameComponentFilter("tTeradataFastLoad");
|
||||
ModifyComponentsAction.searchAndModify(item, processType, filter,
|
||||
Arrays.<IComponentConversion> asList(new IComponentConversion() {
|
||||
|
||||
@Override
|
||||
public void transform(NodeType node) {
|
||||
for (Object metadataObject : node.getMetadata()) {
|
||||
MetadataType metadataType = (MetadataType) metadataObject;
|
||||
for (Object columnObject : metadataType.getColumn()) {
|
||||
ColumnType columnType = (ColumnType) columnObject;
|
||||
if (columnType.getSourceType() == null || "".equals(columnType.getSourceType())) {
|
||||
String type = null;
|
||||
//Previously all date fields were sent as DATE to db.
|
||||
//We need to leave this as it was, not to break previous tasks.
|
||||
if(columnType.getType().equals("id_Date")) {
|
||||
type = "DATE";
|
||||
} else {
|
||||
type = TypesManager.getDBTypeFromTalendType(mappingType, columnType.getType());
|
||||
}
|
||||
columnType.setSourceType(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
return ExecutionResult.SUCCESS_NO_ALERT;
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
return ExecutionResult.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2017 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2018 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
|
||||
@@ -102,13 +103,13 @@ public class EncryptDbPasswordMigrationTask extends AbstractItemMigrationTask {
|
||||
}
|
||||
|
||||
private void encryptPassword(DatabaseConnection dbConn) throws Exception {
|
||||
String password = PasswordEncryptUtil.encryptPassword(dbConn.getPassword());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(dbConn.getPassword()));
|
||||
dbConn.setPassword(password);
|
||||
}
|
||||
|
||||
private void encryptPassword(ContextParameterType param) throws Exception {
|
||||
// before migration task, the value should be raw. so keep it.
|
||||
String password = PasswordEncryptUtil.encryptPassword(param.getValue());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(param.getValue()));
|
||||
param.setValue(password);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.talend.core.model.properties.DatabaseConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* DOC zli class global comment. Detailled comment For
|
||||
@@ -67,7 +68,7 @@ public class EncryptDbPasswordforItemFileMigrationTask extends AbstractItemMigra
|
||||
}
|
||||
|
||||
public void encryptPassword(DatabaseConnection dbConn) throws Exception {
|
||||
String password = PasswordEncryptUtil.encryptPassword(dbConn.getPassword());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(dbConn.getPassword()));
|
||||
dbConn.setPassword(password);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.talend.core.model.properties.FTPConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* created by hcyi on Jul 8, 2014 Detailled comment
|
||||
@@ -63,25 +64,26 @@ public class EncryptPassword4FTPItemFileMigrationTask extends AbstractItemMigrat
|
||||
public boolean encryptPassword(FTPConnection ftpConn) throws Exception {
|
||||
boolean modified = false;
|
||||
if (ftpConn.getPassword() != null) {
|
||||
String password = PasswordEncryptUtil.encryptPassword(ftpConn.getPassword());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(ftpConn.getPassword()));
|
||||
ftpConn.setPassword(password + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (ftpConn.getPassphrase() != null) {
|
||||
String password = PasswordEncryptUtil.encryptPassword(ftpConn.getPassphrase());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(ftpConn.getPassphrase()));
|
||||
ftpConn.setPassphrase(password + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (ftpConn.getKeystorePassword() != null) {
|
||||
String password = PasswordEncryptUtil.encryptPassword(ftpConn.getKeystorePassword());
|
||||
String password = PasswordEncryptUtil
|
||||
.encryptPassword(ConnectionHelper.getCleanPassword(ftpConn.getKeystorePassword()));
|
||||
ftpConn.setKeystorePassword(password + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (ftpConn.getProxypassword() != null) {
|
||||
String password = PasswordEncryptUtil.encryptPassword(ftpConn.getProxypassword());
|
||||
String password = PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(ftpConn.getProxypassword()));
|
||||
ftpConn.setProxypassword(password + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.ui.component.ComponentsFactoryProvider;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
@@ -125,7 +126,8 @@ public class EncryptPasswordInComponentsMigrationTask extends AbstractItemMigrat
|
||||
}
|
||||
|
||||
if (!encrypted) {
|
||||
param.setValue(PasswordEncryptUtil.encryptPassword(param.getValue())
|
||||
param.setValue(
|
||||
PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(param.getValue()))
|
||||
+ PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
|
||||
@@ -127,7 +128,8 @@ public class EncryptPasswordInJobSettingsMigrationTask extends AbstractItemMigra
|
||||
}
|
||||
|
||||
if (!encrypted) {
|
||||
param.setValue(PasswordEncryptUtil.encryptPassword(param.getValue()) + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
param.setValue(PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(param.getValue()))
|
||||
+ PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
return modified;
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.ImplicitContextSettings;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.StatAndLogsSettings;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ParametersType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.impl.ElementParameterTypeImpl;
|
||||
@@ -144,7 +145,8 @@ public class EncryptPasswordInProjectSettingsMigrationTask extends AbstractMigra
|
||||
}
|
||||
|
||||
if (!encrypted) {
|
||||
param.setValue(PasswordEncryptUtil.encryptPassword(param.getValue()) + PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
param.setValue(PasswordEncryptUtil.encryptPassword(ConnectionHelper.getCleanPassword(param.getValue()))
|
||||
+ PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
modified = true;
|
||||
}
|
||||
return modified;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class UnifyPasswordEncryption4ContextMigrationTask extends UnifyPasswordE
|
||||
for (ContextParameterType param : paramTypes) {
|
||||
String value = param.getValue();
|
||||
if (value != null && PasswordEncryptUtil.isPasswordType(param.getType())) {
|
||||
value = cleanPassword(value);
|
||||
String rawPassword;
|
||||
try {
|
||||
rawPassword = PasswordEncryptUtil.decryptPassword(value);
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
|
||||
import org.talend.core.model.properties.DatabaseConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* created by ggu on Aug 21, 2014 Detailled comment
|
||||
@@ -52,12 +51,11 @@ public class UnifyPasswordEncryption4DBConnectionMigrationTask extends UnifyPass
|
||||
if (!dbConn.isContextMode()) {
|
||||
String pass = dbConn.getPassword();
|
||||
String rawPass = null;
|
||||
pass = cleanPassword(pass);
|
||||
try {
|
||||
rawPass = PasswordEncryptUtil.decryptPassword(pass);
|
||||
} catch (Exception e) {
|
||||
// MOD xqliu 2010-07-07 bug 13826
|
||||
rawPass = ConnectionHelper.getDecryptPassword(pass);
|
||||
// ~ 13826
|
||||
rawPass = pass;
|
||||
}
|
||||
// decrypt the old password.
|
||||
dbConn.setRawPassword(rawPass);
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.GregorianCalendar;
|
||||
|
||||
import org.talend.core.model.migration.AbstractItemMigrationTask;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* created by ggu on Aug 21, 2014 Detailled comment
|
||||
@@ -37,4 +38,8 @@ public abstract class UnifyPasswordEncryption4ItemMigrationTask extends Abstract
|
||||
return gc.getTime();
|
||||
}
|
||||
|
||||
protected String cleanPassword(String password) {
|
||||
return ConnectionHelper.getCleanPassword(password);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ public class UnifyPasswordEncryption4ParametersInJobMigrationTask extends UnifyP
|
||||
if (value != null
|
||||
&& (PasswordEncryptUtil.isPasswordType(param.getType()) || PasswordEncryptUtil
|
||||
.isPasswordField(param.getName()))) {
|
||||
value = cleanPassword(value);
|
||||
try {
|
||||
String rawPassword = PasswordEncryptUtil.decryptPassword(value);
|
||||
param.setRawValue(rawPassword);
|
||||
@@ -207,6 +208,7 @@ public class UnifyPasswordEncryption4ParametersInJobMigrationTask extends UnifyP
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean reencryptValueIfNeeded(ElementParameterType param) throws Exception {
|
||||
String value = param.getValue();
|
||||
value = cleanPassword(value);
|
||||
int index = value.lastIndexOf(PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
if (index != -1) {
|
||||
value = new StringBuilder(value).replace(index, index + PasswordEncryptUtil.ENCRYPT_KEY.length(), "").toString(); //$NON-NLS-1$
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.talend.core.model.process.EParameterFieldType;
|
||||
import org.talend.core.model.properties.ImplicitContextSettings;
|
||||
import org.talend.core.model.properties.StatAndLogsSettings;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ParametersType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.impl.ElementParameterTypeImpl;
|
||||
@@ -109,6 +110,7 @@ public class UnifyPasswordEncryption4ProjectSettingsMigrationTask extends Abstra
|
||||
|
||||
private boolean reencryptValueIfNeeded(ElementParameterType param) throws Exception {
|
||||
String value = param.getValue();
|
||||
value = ConnectionHelper.getCleanPassword(value);
|
||||
int index = value.lastIndexOf(PasswordEncryptUtil.ENCRYPT_KEY);
|
||||
if (index != -1) {
|
||||
value = new StringBuilder(value).replace(index, index + PasswordEncryptUtil.ENCRYPT_KEY.length(), "").toString(); //$NON-NLS-1$
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2018 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.repository.model.migration.spark;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.ModifyComponentsAction;
|
||||
import org.talend.core.model.components.conversions.IComponentConversion;
|
||||
import org.talend.core.model.components.filters.NameComponentFilter;
|
||||
import org.talend.core.model.migration.AbstractJobMigrationTask;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kcoepeau
|
||||
*
|
||||
* Keep Date type for component impacted by change from Date to Timestamp
|
||||
*
|
||||
*/
|
||||
public class UseSqlDateTypeInDataframesTask extends AbstractJobMigrationTask {
|
||||
|
||||
@Override
|
||||
public List<ERepositoryObjectType> getTypes() {
|
||||
List<ERepositoryObjectType> toReturn = new ArrayList<ERepositoryObjectType>();
|
||||
toReturn.add(ERepositoryObjectType.PROCESS_SPARK);
|
||||
toReturn.add(ERepositoryObjectType.PROCESS_SPARKSTREAMING);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Item item) {
|
||||
ProcessType processType = getProcessType(item);
|
||||
if (processType == null) {
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
|
||||
List<String> impactedComponents =
|
||||
Arrays.asList("tFileOutputParquet", "tHiveOutput", "tRedshiftOutput", "tSqlRow", "tMatchPairing",
|
||||
"tMatchPredict", "tMatchModel", "tDataShuffling");
|
||||
|
||||
IComponentConversion addUseTimestampForDateType = new AddUseTimestampForDateType();
|
||||
|
||||
try {
|
||||
for (String componentName : impactedComponents) {
|
||||
ModifyComponentsAction.searchAndModify(item, processType, new NameComponentFilter(componentName),
|
||||
Arrays.<IComponentConversion> asList(addUseTimestampForDateType));
|
||||
}
|
||||
return ExecutionResult.SUCCESS_NO_ALERT;
|
||||
} catch (Exception e) {
|
||||
return ExecutionResult.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
private class AddUseTimestampForDateType implements IComponentConversion {
|
||||
|
||||
private String field = "CHECK"; //$NON-NLS-1$
|
||||
|
||||
private String name = "DATE_TO_TIMESTAMP_DF_TYPE_SUBSTITUTION"; //$NON-NLS-1$
|
||||
|
||||
public void transform(NodeType node) {
|
||||
|
||||
if (ComponentUtilities.getNodeProperty(node, name) == null) {
|
||||
ComponentUtilities.addNodeProperty(node, name, field);
|
||||
ComponentUtilities.setNodeValue(node, name, "true");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getOrder() {
|
||||
GregorianCalendar gc = new GregorianCalendar(2018, 8, 10, 18, 0, 0);
|
||||
return gc.getTime();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class JobJavaScriptOSGIForESBManager extends JobJavaScriptsManager {
|
||||
.getResourcesByRelativePath(JOB_SOURCE_FOLDER_NAME + PATH_SEPARATOR + JavaUtils.JAVA_XML_MAPPING);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(urls)) {
|
||||
xm.addResources(new ArrayList<URL>());
|
||||
xm.addResources(new ArrayList<URL>(urls));
|
||||
list.add(xm);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user