Compare commits
34 Commits
release/7.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
268a6fdb25 | ||
|
|
06cca1319a | ||
|
|
75664ab5b6 | ||
|
|
83f862a29f | ||
|
|
a9227785c4 | ||
|
|
a61f2c6797 | ||
|
|
d5df42537d | ||
|
|
cd6b711595 | ||
|
|
4502ff4ae3 | ||
|
|
625aeaebf9 | ||
|
|
838d016f41 | ||
|
|
d2a1041993 | ||
|
|
cfbec28162 | ||
|
|
38c60c194f | ||
|
|
02d660edd5 | ||
|
|
e7cf31a2a1 | ||
|
|
6204d78546 | ||
|
|
f5d40d7898 | ||
|
|
5c3b8f54cb | ||
|
|
3943cfb8d1 | ||
|
|
87679ad3b1 | ||
|
|
a3b64152be | ||
|
|
2e8c6f3188 | ||
|
|
38e20f74fa | ||
|
|
93c6383ef7 | ||
|
|
4af633af53 | ||
|
|
e8bdf16525 | ||
|
|
a0d3dc47fb | ||
|
|
2d24b5d5fd | ||
|
|
946402c192 | ||
|
|
0e0749cfdf | ||
|
|
6265144309 | ||
|
|
f15a3e3e7c | ||
|
|
7d46024e9d |
@@ -884,7 +884,7 @@
|
||||
}
|
||||
%>
|
||||
//Resume: jobStart
|
||||
resumeUtil.addLog("JOB_STARTED", "JOB:" + jobName, parent_part_launcher, Thread.currentThread().getId() + "", "","","","",resumeUtil.convertToJsonText(context,parametersToEncrypt));
|
||||
resumeUtil.addLog("JOB_STARTED", "JOB:" + jobName, parent_part_launcher, Thread.currentThread().getId() + "", "","","","",resumeUtil.convertToJsonText(context,ContextProperties.class,parametersToEncrypt));
|
||||
|
||||
<%
|
||||
if (stats) {
|
||||
@@ -1157,9 +1157,15 @@ this.globalResumeTicket = false;//to run others jobs
|
||||
if (!componentName.equals("tJobStructureCatcher") && !componentName.equals("tLogCatcher") && !componentName.equals("tFlowMeterCatcher") && !componentName.equals("tAssertCatcher") && !componentName.equals("tStatCatcher") && !componentName.equals("tAsyncIn")) {
|
||||
%>
|
||||
<%=createCallProcess(rootNode, className, false) %>
|
||||
<% }
|
||||
}
|
||||
}// end if(isRunInMultiThread)
|
||||
<%
|
||||
if (process.getNodesOfType("tStatCatcher").size() > 0) {
|
||||
%>
|
||||
<%=statsErrorHandlingAfterMainCall(rootNode, process.getNodesOfType("tStatCatcher"))%>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}// end if(isRunInMultiThread)
|
||||
%>
|
||||
|
||||
this.globalResumeTicket = true;//to run tPostJob
|
||||
@@ -1293,7 +1299,7 @@ if (execStat) {
|
||||
returnCode = errorCode.intValue();
|
||||
}
|
||||
resumeUtil.addLog("JOB_ENDED", "JOB:" + jobName, parent_part_launcher, Thread.currentThread().getId() + "", "","" + returnCode,"","","");
|
||||
|
||||
resumeUtil.flush();
|
||||
return returnCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ public class CLASS
|
||||
|
||||
//List< ? extends IConnection> onSubJobErrorConns = rootNode.getOutgoingConnections(EConnectionType.ON_SUBJOB_ERROR);
|
||||
//if(onSubJobErrorConns!=null){
|
||||
// for(IConnection conn : onSubJobErrorConns) {
|
||||
// for(IConnection conn : onSubJobErrorConns) {
|
||||
// toReturn += createCallProcess(conn.getTarget(), className, isMultiThread);
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
if(isMultiThread){
|
||||
toReturn += "\n}catch (java.lang.Error e_" + rootNode.getUniqueName() + ") {\n";
|
||||
toReturn += "globalMap.put(\""+rootNode.getUniqueName()+ "_SUBPROCESS_STATE\", -1);\n";
|
||||
@@ -55,7 +55,20 @@ public class CLASS
|
||||
toReturn += "\n}";
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
public String statsErrorHandlingAfterMainCall(INode rootNode, List<? extends INode> statsNodes) {
|
||||
String catchErrorReturn = "catch (Error error_" + rootNode.getUniqueName() + " ) {\n";
|
||||
catchErrorReturn+="end = System.currentTimeMillis();\n";
|
||||
for (INode statCatcherNode : statsNodes) {
|
||||
catchErrorReturn += statCatcherNode.getUniqueName() + ".addMessage(\"failure\", (end-startTime));\n";
|
||||
catchErrorReturn += "try {\n " + statCatcherNode.getDesignSubjobStartNode().getUniqueName() + "Process(globalMap);\n";
|
||||
catchErrorReturn += "} catch (Exception e_" + statCatcherNode.getUniqueName() + ") {\n";
|
||||
catchErrorReturn += "e_" + statCatcherNode.getUniqueName() + ".printStackTrace();\n}\n";
|
||||
}
|
||||
catchErrorReturn+= "throw error_" + rootNode.getUniqueName() + ";\n}\n";
|
||||
return catchErrorReturn;
|
||||
}
|
||||
|
||||
public String generate(Object argument) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.2.4</version>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<!-- #################################################### -->
|
||||
|
||||
<!-- modification 1: config -->
|
||||
<property name="jar.name" value="MsmqTalend-1.0.0.jar" />
|
||||
<property name="jar.name" value="MsmqTalend-1.0.5.jar" />
|
||||
<property name="component.name" value="tMicrosoftMQInput" />
|
||||
<property name="author.name" value="ytao" />
|
||||
|
||||
|
||||
@@ -1,71 +1,110 @@
|
||||
<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>talend-mscrm</artifactId>
|
||||
<version>3.4-20191012</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>talend-mscrm</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<odata.version>4.3.0</odata.version>
|
||||
<slf4j.version>1.7.12</slf4j.version>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-xmlbeans</artifactId>
|
||||
<version>1.7.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-http</artifactId>
|
||||
<version>1.7.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.talend.components</groupId>
|
||||
<artifactId>talend-mscrm</artifactId>
|
||||
<version>3.10.2-20220831</version>
|
||||
<packaging>jar</packaging>
|
||||
<description>A forked Talend-MSCRM library, developed to use in Studio 7.3.1 only. It's main intention is to contain CVE fixes.</description>
|
||||
|
||||
<name>talend-mscrm</name>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>https://www.talendforge.org/modules/licenses/APACHE_v2.txt</url>
|
||||
<distribution>may be downloaded from the Maven repository</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
|
||||
<odata.version>4.7.1</odata.version>
|
||||
<slf4j.version>1.7.28</slf4j.version>
|
||||
<axis2.version>1.7.9</axis2.version>
|
||||
<httpclient.version>4.5.13</httpclient.version>
|
||||
<httpcore.version>4.4.13</httpcore.version>
|
||||
<junit.version>4.13.2</junit.version>
|
||||
<adal4j.version>1.6.5-20220701</adal4j.version>
|
||||
<jackson.version>2.13.2</jackson.version>
|
||||
<jackson-databind.version>2.13.2.2</jackson-databind.version>
|
||||
|
||||
<!-- plugin's versions -->
|
||||
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<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>
|
||||
</repositories>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-xmlbeans</artifactId>
|
||||
<version>${axis2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${httpclient.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>${httpcore.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-http</artifactId>
|
||||
<version>${axis2.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.olingo</groupId>
|
||||
<artifactId>odata-client-core</artifactId>
|
||||
<version>${odata.version}</version>
|
||||
@@ -97,53 +136,55 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.11</version>
|
||||
<version>${slf4j.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
<artifactId>adal4j</artifactId>
|
||||
<version>1.1.1-20191012</version>
|
||||
<version>${adal4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-jar</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>../../../org.talend.libraries.crm/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-databind.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package org.talend.ms.crm;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
import javax.naming.ServiceUnavailableException;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import org.apache.axiom.om.OMAbstractFactory;
|
||||
@@ -19,33 +22,37 @@ import org.apache.axis2.client.ServiceClient;
|
||||
import org.apache.axis2.context.ConfigurationContext;
|
||||
import org.apache.axis2.context.ConfigurationContextFactory;
|
||||
import org.apache.axis2.transport.http.HTTPConstants;
|
||||
import org.apache.axis2.transport.http.HTTPTransportConstants;
|
||||
import org.apache.axis2.transport.http.HttpTransportProperties;
|
||||
import org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.olingo.client.api.http.HttpClientException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.datacontract.schemas._2004._07.system_collections_generic.KeyValuePairOfEndpointTypestringztYlk6OT;
|
||||
import org.talend.ms.crm.odata.ClientConfiguration;
|
||||
import org.talend.ms.crm.odata.authentication.AuthStrategyFactory;
|
||||
import org.talend.ms.crm.odata.authentication.IAuthStrategy;
|
||||
import org.talend.ms.crm.sdk.Instance;
|
||||
import org.talend.ms.crm.sdk.OnlineAuthenticationPolicy;
|
||||
import org.talend.ms.crm.sdk.OrganizationServiceStubWrapper;
|
||||
import org.talend.ms.crm.sdk.RequestDateTimeData;
|
||||
import org.talend.ms.crm.sdk.SecurityData;
|
||||
import org.talend.ms.crm.sdk.WsdlTokenManager;
|
||||
|
||||
import com.microsoft.schemas.xrm._2011.contracts.DiscoveryServiceStub;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.IDiscoveryService_Execute_DiscoveryServiceFaultFault_FaultMessage;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.OrganizationServiceStub;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.EndpointType;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.ExecuteDocument;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.ExecuteDocument.Execute;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.ExecuteResponseDocument;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.ExecuteResponseDocument.ExecuteResponse;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.OrganizationDetail;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.RetrieveOrganizationRequest;
|
||||
import com.microsoft.schemas.xrm._2011.contracts.discovery.RetrieveOrganizationResponse;
|
||||
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -64,21 +71,15 @@ public class MSCRMClient {
|
||||
|
||||
static Logger logger = LoggerFactory.getLogger(MSCRMClient.class.getName());
|
||||
|
||||
/**
|
||||
* Microsoft account (e.g. youremail@live.com) or Microsoft Office 365 (Org ID e.g.
|
||||
* youremail@yourorg.onmicrosoft.com) User Name.
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* Microsoft account or Microsoft Office 365 (Org ID) Password.
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* Unique Name of the organization
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* Unique Name of the organization
|
||||
*/
|
||||
private ClientConfiguration clientConfiguration;
|
||||
|
||||
/**
|
||||
* Suffix for the Flat WSDL
|
||||
@@ -87,88 +88,84 @@ public class MSCRMClient {
|
||||
|
||||
private OrganizationServiceStub serviceStub;
|
||||
|
||||
private Integer timeout;
|
||||
private String discoveryServiceURL = "https://globaldisco.crm.dynamics.com/api/discovery/v2.0/Instances";
|
||||
|
||||
/**
|
||||
* This sample application registration values are available for all online instances
|
||||
* This is suggested to use for development and prototyping purposes.For production use, you should create an AppId or ClientId that is specific
|
||||
* to your tenant in the Azure Management portal.
|
||||
*
|
||||
*/
|
||||
private static final String DEFAULT_CLIENT_ID = "51f81489-12ee-4a9e-aaae-a2591f45987d";
|
||||
|
||||
private IAuthStrategy authStrategy;
|
||||
|
||||
private Boolean reuseHttpClient;
|
||||
public MSCRMClient(ClientConfiguration clientConfiguration, String orgName, String discoveryServiceURL) throws AuthenticationException {
|
||||
this.clientConfiguration = clientConfiguration;
|
||||
this.orgName = orgName;
|
||||
this.discoveryServiceURL = discoveryServiceURL;
|
||||
init();
|
||||
|
||||
private int maxConnectionRetries = 5;
|
||||
}
|
||||
|
||||
private void init() throws AuthenticationException {
|
||||
if (clientConfiguration != null && discoveryServiceURL != null && discoveryServiceURL.indexOf("/api/discovery/") > 0) {
|
||||
clientConfiguration.setResource(discoveryServiceURL.substring(0, discoveryServiceURL.indexOf("/api/discovery/")));
|
||||
}
|
||||
|
||||
if(clientConfiguration != null) {
|
||||
if (discoveryServiceURL != null && discoveryServiceURL.indexOf("/api/discovery/") > 0) {
|
||||
clientConfiguration.setResource(discoveryServiceURL.substring(0, discoveryServiceURL.indexOf("/api/discovery/")));
|
||||
}
|
||||
if (clientConfiguration.getClientId()==null || clientConfiguration.getClientId().isEmpty()) {
|
||||
clientConfiguration.setClientId(DEFAULT_CLIENT_ID);
|
||||
}
|
||||
}
|
||||
|
||||
private int attemptsInterval = 1000;
|
||||
|
||||
public MSCRMClient(String username, String password, String orgName) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.orgName = orgName;
|
||||
authStrategy = AuthStrategyFactory.createAuthStrategy(this.clientConfiguration);
|
||||
authStrategy.init();
|
||||
|
||||
}
|
||||
|
||||
public void setTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public void setReuseHttpClient(Boolean reuseHttpClient) {
|
||||
this.reuseHttpClient = reuseHttpClient;
|
||||
}
|
||||
|
||||
public void setMaxConnectionRetries(int maxConnectionRetries) {
|
||||
this.maxConnectionRetries = maxConnectionRetries;
|
||||
}
|
||||
|
||||
public void setAttemptsInterval(int attemptsInterval) {
|
||||
this.attemptsInterval = attemptsInterval;
|
||||
}
|
||||
|
||||
public OrganizationServiceStub getOnlineConnection(String discoveryServiceURL) throws Exception {
|
||||
return new OrganizationServiceStubWrapper(doGetOnlineConnection(discoveryServiceURL), this, discoveryServiceURL,
|
||||
maxConnectionRetries, attemptsInterval);
|
||||
public OrganizationServiceStub getOnlineConnection() throws Exception {
|
||||
return new OrganizationServiceStubWrapper(doGetOnlineConnection(), this, discoveryServiceURL,
|
||||
clientConfiguration.getMaxRetryTimes(), clientConfiguration.getIntervalTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the Discovery Service For North America Microsoft account, discovery service url is
|
||||
* https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc Microsoft office 365, discovery service url is
|
||||
* https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc To use appropriate discovery service url for other
|
||||
* Organization information is stored in the Instance table of the Discovery Service. To see the kind of information contained in that table,
|
||||
* send an HTTP GET request to the service for one of your instances.
|
||||
* environments refer http://technet.microsoft.com/en-us/library/gg309401.aspx
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public OrganizationServiceStub doGetOnlineConnection(String discoveryServiceURL) throws Exception {
|
||||
public OrganizationServiceStub doGetOnlineConnection() throws Exception {
|
||||
|
||||
try {
|
||||
// Retrieve the authentication policy for the discovery service.
|
||||
OnlineAuthenticationPolicy discoveryPolicy = new OnlineAuthenticationPolicy(discoveryServiceURL + FlatWSDLSuffix);
|
||||
WsdlTokenManager discoeryTokenManager = new WsdlTokenManager();
|
||||
// Authenticate the user using the discovery authentication policy.
|
||||
SecurityData discoverySecurityData = discoeryTokenManager.authenticate(discoveryServiceURL, username, password,
|
||||
discoveryPolicy.getAppliesTo(), discoveryPolicy.getPolicy(), discoveryPolicy.getIssuerUri());
|
||||
// Retrieve discovery stub using organization URL with the security data.
|
||||
DiscoveryServiceStub discoveryServiceStub = createDiscoveryServiceStub(discoveryServiceURL, discoverySecurityData);
|
||||
// Retrieve organization service url using discovery stub.
|
||||
String orgUrl = discoverOrganizationUrl(discoveryServiceStub, orgName);
|
||||
// The discovery service stub cannot be reused against the organization service
|
||||
// as the Issuer and AppliesTo may differ between the discovery and organization services.
|
||||
// Retrieve the authentication policy for the organization service.
|
||||
OnlineAuthenticationPolicy organizationPolicy = new OnlineAuthenticationPolicy(orgUrl + FlatWSDLSuffix);
|
||||
WsdlTokenManager orgTokenManager = new WsdlTokenManager();
|
||||
// Authenticate the user using the organization authentication policy.
|
||||
SecurityData securityData = orgTokenManager.authenticate(orgUrl, username, password,
|
||||
organizationPolicy.getAppliesTo(), organizationPolicy.getPolicy(), organizationPolicy.getIssuerUri());
|
||||
String serviceURL = discoveryServiceURL;
|
||||
if(!discoveryServiceURL.contains("(")) {
|
||||
serviceURL = discoveryServiceURL+"(UniqueName='"+orgName+"')";
|
||||
}
|
||||
|
||||
String orgUrl = getOrgURL( serviceURL);
|
||||
// The discovery service stub cannot be reused against the organization service
|
||||
// as the Issuer and AppliesTo may differ between the discovery and organization services.
|
||||
// Retrieve the authentication policy for the organization service.
|
||||
OnlineAuthenticationPolicy organizationPolicy = new OnlineAuthenticationPolicy(orgUrl + FlatWSDLSuffix);
|
||||
WsdlTokenManager orgTokenManager = new WsdlTokenManager();
|
||||
// Authenticate the user using the organization authentication policy.
|
||||
SecurityData securityData = orgTokenManager.authenticate(orgUrl, clientConfiguration.getUserName(), clientConfiguration.getPassword(),
|
||||
organizationPolicy.getAppliesTo(), organizationPolicy.getPolicy(), organizationPolicy.getIssuerUri());
|
||||
|
||||
// Retrieve organization stub using organization URL with the security data.
|
||||
serviceStub = createOrganizationServiceStub(orgUrl, securityData);
|
||||
// Retrieve organization stub using organization URL with the security data.
|
||||
serviceStub = createOrganizationServiceStub(orgUrl, securityData);
|
||||
|
||||
Options options = serviceStub._getServiceClient().getOptions();
|
||||
if (reuseHttpClient != null) {
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, reuseHttpClient);
|
||||
}
|
||||
if (timeout != null) {
|
||||
options.setTimeOutInMilliSeconds(Long.valueOf(timeout));
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT, timeout);
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, timeout);
|
||||
}
|
||||
|
||||
} catch (IDiscoveryService_Execute_DiscoveryServiceFaultFault_FaultMessage e) {
|
||||
throw new Exception(e.getFaultMessage().getDiscoveryServiceFault().getMessage());
|
||||
}
|
||||
Options options = serviceStub._getServiceClient().getOptions();
|
||||
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, clientConfiguration.isReuseHttpClient());
|
||||
options.setTimeOutInMilliSeconds(Long.valueOf(clientConfiguration.getTimeout()));
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT, clientConfiguration.getTimeout());
|
||||
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, clientConfiguration.getTimeout());
|
||||
return serviceStub;
|
||||
|
||||
}
|
||||
@@ -185,18 +182,6 @@ public class MSCRMClient {
|
||||
}
|
||||
}
|
||||
|
||||
private static DiscoveryServiceStub createDiscoveryServiceStub(String discoveryServiceURL, SecurityData securityData)
|
||||
throws RemoteException, XMLStreamException {
|
||||
try {
|
||||
DiscoveryServiceStub stub = new DiscoveryServiceStub(getConfigurationContext(), discoveryServiceURL);
|
||||
setServiceClientOptions(stub._getServiceClient(), securityData);
|
||||
return stub;
|
||||
} catch (RemoteException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private static void setServiceClientOptions(ServiceClient sc, SecurityData securityData) throws AxisFault, XMLStreamException {
|
||||
Options options = sc.getOptions();
|
||||
|
||||
@@ -306,45 +291,6 @@ public class MSCRMClient {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
private static String discoverOrganizationUrl(DiscoveryServiceStub serviceStub, String organizationUniqueName)
|
||||
throws RemoteException, IDiscoveryService_Execute_DiscoveryServiceFaultFault_FaultMessage {
|
||||
try {
|
||||
RetrieveOrganizationRequest request = RetrieveOrganizationRequest.Factory.newInstance();
|
||||
|
||||
request.setUniqueName(organizationUniqueName);
|
||||
|
||||
Execute exe = Execute.Factory.newInstance();
|
||||
exe.setRequest(request);
|
||||
|
||||
ExecuteDocument exeDoc = ExecuteDocument.Factory.newInstance();
|
||||
exeDoc.setExecute(exe);
|
||||
|
||||
ExecuteResponseDocument executeRespDoc = serviceStub.execute(exeDoc);
|
||||
ExecuteResponse executeResp = executeRespDoc.getExecuteResponse();
|
||||
|
||||
RetrieveOrganizationResponse result = (RetrieveOrganizationResponse) executeResp.getExecuteResult();
|
||||
|
||||
OrganizationDetail orgDetail = result.getDetail();
|
||||
|
||||
KeyValuePairOfEndpointTypestringztYlk6OT[] keyValuePairs = orgDetail.getEndpoints()
|
||||
.getKeyValuePairOfEndpointTypestringztYlk6OTArray();
|
||||
|
||||
for (KeyValuePairOfEndpointTypestringztYlk6OT keyValuePair : keyValuePairs) {
|
||||
|
||||
if (keyValuePair.getKey() == EndpointType.ORGANIZATION_SERVICE) {
|
||||
return keyValuePair.getValue();
|
||||
}
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw e;
|
||||
} catch (IDiscoveryService_Execute_DiscoveryServiceFaultFault_FaultMessage e) {
|
||||
logger.error(e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static HttpTransportProperties.ProxyProperties getProxyProperties() {
|
||||
String proxyHost = null;
|
||||
String proxyPort = null;
|
||||
@@ -370,5 +316,55 @@ public class MSCRMClient {
|
||||
}
|
||||
return proxyProps;
|
||||
}
|
||||
|
||||
private String getOrgURL(String discoveryServiceURL) throws ServiceUnavailableException {
|
||||
try {
|
||||
HttpGet request = new HttpGet(discoveryServiceURL);
|
||||
|
||||
// https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/discover-url-organization-web-api#authentication
|
||||
authStrategy.configureRequest(request);
|
||||
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
CloseableHttpResponse response = httpClient.execute(request)) {
|
||||
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if(statusCode != HttpStatus.SC_NO_CONTENT && statusCode != HttpStatus.SC_CREATED && statusCode != HttpStatus.SC_OK) {
|
||||
String message = null;
|
||||
if (statusCode == HttpStatus.SC_NOT_FOUND ) {
|
||||
message = "The organization '"+orgName+"' does not exist.";
|
||||
} else {
|
||||
message = response.getStatusLine().getReasonPhrase();
|
||||
}
|
||||
throw new HttpClientException(message);
|
||||
}
|
||||
|
||||
HttpEntity entity = response.getEntity();
|
||||
String orgUrl = null;
|
||||
if (entity != null) {
|
||||
String result = EntityUtils.toString(entity);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
JsonNode tree = mapper.readTree(result);
|
||||
Iterator<JsonNode> iter = tree.path("value").elements();
|
||||
while (iter.hasNext()){
|
||||
JsonNode node = iter.next();
|
||||
Instance instance = mapper.readValue(node.toString(), Instance.class);
|
||||
// Should only return one instance.
|
||||
if(orgName.equals(instance.getUniqueName())) {
|
||||
orgUrl = instance.getApiUrl() + "/XRMServices/2011/Organization.svc";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(orgUrl == null) {
|
||||
throw new HttpClientException("No organization available.");
|
||||
}
|
||||
return orgUrl;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new ServiceUnavailableException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -12,12 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.ms.crm.odata;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public final class ClientConfiguration {
|
||||
|
||||
/*
|
||||
* Implemented authentication strategies for OData/MS CRM.
|
||||
*/
|
||||
public static enum AuthStrategyEnum {NTLM, OAUTH};
|
||||
public static enum AuthStrategyEnum {NTLM, OAUTH, OAUTH_PREMISE};
|
||||
|
||||
/*
|
||||
* Kind of registered app on azure
|
||||
@@ -69,6 +71,16 @@ public final class ClientConfiguration {
|
||||
*/
|
||||
private String authoryEndpoint;
|
||||
|
||||
/*
|
||||
* The redirect URL
|
||||
*/
|
||||
private String redirectURL;
|
||||
|
||||
/*
|
||||
* The service API to retrieve the resource we ask for with oauth on-premise
|
||||
*/
|
||||
private String serviceAPI;
|
||||
|
||||
private int maxRetryTimes = 5;
|
||||
|
||||
/*
|
||||
@@ -87,6 +99,14 @@ public final class ClientConfiguration {
|
||||
private AppRegisteredType appRegisteredType = AppRegisteredType.NATIVE_APP;
|
||||
private WebAppPermission webAppPermission = WebAppPermission.DELEGATED;
|
||||
|
||||
/**
|
||||
* The oauth resource is deduced from the "Service root URL" if this value is null.
|
||||
*/
|
||||
private String forceResource;
|
||||
|
||||
private Map<String, String> headers;
|
||||
private boolean returnRepresentation = false;
|
||||
|
||||
|
||||
ClientConfiguration(AuthStrategyEnum authStrategy) {
|
||||
this.authStrategy = authStrategy;
|
||||
@@ -217,4 +237,44 @@ public final class ClientConfiguration {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
}
|
||||
public String getRedirectURL() {
|
||||
return redirectURL;
|
||||
}
|
||||
|
||||
public void setRedirectURL(String redirectURL) {
|
||||
this.redirectURL = redirectURL;
|
||||
}
|
||||
|
||||
public String getServiceAPI() {
|
||||
return serviceAPI;
|
||||
}
|
||||
|
||||
public void setServiceAPI(String serviceAPI) {
|
||||
this.serviceAPI = serviceAPI;
|
||||
}
|
||||
|
||||
public String getForceResource() {
|
||||
return forceResource;
|
||||
}
|
||||
|
||||
public void setForceResource(String forceResource) {
|
||||
this.forceResource = forceResource;
|
||||
}
|
||||
|
||||
public void setCustomHeaders(Map<String, String> headers){
|
||||
this.headers = headers;
|
||||
}
|
||||
|
||||
public Map<String, String> getCustomHeaders(){
|
||||
return this.headers;
|
||||
}
|
||||
|
||||
public boolean isReturnRepresentation() {
|
||||
return returnRepresentation;
|
||||
}
|
||||
|
||||
public void setReturnRepresentation(boolean returnRepresentation) {
|
||||
this.returnRepresentation = returnRepresentation;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -16,13 +16,13 @@ import org.talend.ms.crm.odata.ClientConfiguration.AuthStrategyEnum;
|
||||
|
||||
/**
|
||||
* Generate the ClientConfiguration according to wanted authentication.
|
||||
*
|
||||
* <p>
|
||||
* Different authentications need different information.
|
||||
*/
|
||||
public class ClientConfigurationFactory {
|
||||
|
||||
public final static ClientConfiguration buildOAuthNativeClientConfiguration(String clientId, String userName, String password,
|
||||
String authoryEndpoint) {
|
||||
String authoryEndpoint) {
|
||||
ClientConfiguration clientConfiguration = new ClientConfiguration(AuthStrategyEnum.OAUTH);
|
||||
clientConfiguration.setAppRegisteredType(ClientConfiguration.AppRegisteredType.NATIVE_APP);
|
||||
clientConfiguration.setClientId(clientId);
|
||||
@@ -34,7 +34,7 @@ public class ClientConfigurationFactory {
|
||||
}
|
||||
|
||||
public final static ClientConfiguration buildOAuthWebClientConfiguration(String clientId, String clientSecret, String userName, String password,
|
||||
String authoryEndpoint, ClientConfiguration.WebAppPermission permission) {
|
||||
String authoryEndpoint, ClientConfiguration.WebAppPermission permission) {
|
||||
ClientConfiguration clientConfiguration = new ClientConfiguration(AuthStrategyEnum.OAUTH);
|
||||
clientConfiguration.setAppRegisteredType(ClientConfiguration.AppRegisteredType.WEB_APP);
|
||||
clientConfiguration.setWebAppPermission(permission);
|
||||
@@ -49,7 +49,7 @@ public class ClientConfigurationFactory {
|
||||
}
|
||||
|
||||
public final static ClientConfiguration buildNtlmClientConfiguration(String userName, String password, String workstation,
|
||||
String domain) {
|
||||
String domain) {
|
||||
ClientConfiguration clientConfiguration = new ClientConfiguration(AuthStrategyEnum.NTLM);
|
||||
clientConfiguration.setUserName(userName);
|
||||
clientConfiguration.setPassword(password);
|
||||
@@ -59,4 +59,19 @@ public class ClientConfigurationFactory {
|
||||
return clientConfiguration;
|
||||
}
|
||||
|
||||
public final static ClientConfiguration buildOAuthPremiseClientConfiguration(String userName, String password, String authoryEndpoint,
|
||||
String serviceAPI, String clientId, String clientSecret, String redirectUrl, String forcedResource) {
|
||||
ClientConfiguration clientConfiguration = new ClientConfiguration(AuthStrategyEnum.OAUTH_PREMISE);
|
||||
clientConfiguration.setUserName(userName);
|
||||
clientConfiguration.setPassword(password);
|
||||
clientConfiguration.setAuthoryEndpoint(authoryEndpoint);
|
||||
clientConfiguration.setClientId(clientId);
|
||||
clientConfiguration.setClientSecret(clientSecret);
|
||||
clientConfiguration.setRedirectURL(redirectUrl);
|
||||
clientConfiguration.setServiceAPI(serviceAPI);
|
||||
clientConfiguration.setForceResource(forcedResource);
|
||||
|
||||
return clientConfiguration;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -12,21 +12,9 @@
|
||||
// ============================================================================
|
||||
package org.talend.ms.crm.odata;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
import javax.naming.ServiceUnavailableException;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.HttpResponse;
|
||||
@@ -44,6 +32,7 @@ import org.apache.http.params.HttpConnectionParams;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.olingo.client.api.ODataClient;
|
||||
import org.apache.olingo.client.api.communication.ODataClientErrorException;
|
||||
import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
|
||||
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
|
||||
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
|
||||
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
|
||||
@@ -69,16 +58,33 @@ import org.talend.ms.crm.odata.httpclientfactory.DefaultHttpClientState;
|
||||
import org.talend.ms.crm.odata.httpclientfactory.IHttpClientFactoryObserver;
|
||||
import org.talend.ms.crm.odata.httpclientfactory.IHttpclientFactoryObservable;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
import javax.naming.ServiceUnavailableException;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Client for accessing Dynamics CRM Online using the Web API
|
||||
*
|
||||
*/
|
||||
public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
|
||||
private static final String NAMESPAVE = "Microsoft.Dynamics.CRM";
|
||||
private static final String LOOKUP_NAME_PREFIX = "_";
|
||||
private static final String LOOKUP_NAME_SUFFIX = "_value";
|
||||
private static final int LOOKUP_NAME_MINSIZE = LOOKUP_NAME_PREFIX.length()+LOOKUP_NAME_SUFFIX.length();
|
||||
private static final String LOOKUP_NAME_PREFIX = "_";
|
||||
private static final String LOOKUP_NAME_SUFFIX = "_value";
|
||||
private static final int LOOKUP_NAME_MINSIZE = LOOKUP_NAME_PREFIX.length() + LOOKUP_NAME_SUFFIX.length();
|
||||
|
||||
private ClientConfiguration clientConfiguration;
|
||||
|
||||
@@ -101,7 +107,7 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
|
||||
/**
|
||||
* A list which contains all navigation links to set to null.
|
||||
*
|
||||
* <p>
|
||||
* A distinct delete command must be sent to set a navigation property to null. It can't be done in the same
|
||||
* time that the entity update.
|
||||
*/
|
||||
@@ -152,10 +158,26 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
return odataClient;
|
||||
}
|
||||
|
||||
private void addCustomHeaders(ODataEntitySetRequest<ClientEntitySet> request) {
|
||||
if (this.clientConfiguration.getCustomHeaders() == null) {
|
||||
return;
|
||||
}
|
||||
this.clientConfiguration.getCustomHeaders().entrySet().stream().forEach(e -> request.addCustomHeader(e.getKey(), e.getValue()));
|
||||
}
|
||||
|
||||
private void addCustomHeader(HttpRequestBase request) {
|
||||
if (this.clientConfiguration.getCustomHeaders() != null) {
|
||||
this.clientConfiguration.getCustomHeaders().entrySet().stream().forEach(e -> request.addHeader(e.getKey(), e.getValue()));
|
||||
}
|
||||
|
||||
if (this.clientConfiguration.isReturnRepresentation()) {
|
||||
request.addHeader("Prefer", "return=representation");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create EntitySet Iterator request
|
||||
*
|
||||
* @param entirySet entirySet the EntitySet name which you want to retrieve records
|
||||
* @param queryOption
|
||||
* @return EntitySet iterator request
|
||||
*/
|
||||
@@ -164,6 +186,7 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
if (queryOption.getReturnEntityProperties() != null) {
|
||||
uriBuilder.select(queryOption.getReturnEntityProperties());
|
||||
}
|
||||
|
||||
if (queryOption.getTop() > 0) {
|
||||
uriBuilder.top(queryOption.getTop());
|
||||
}
|
||||
@@ -173,21 +196,68 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
if (!StringUtils.isEmpty(queryOption.getFilter())) {
|
||||
uriBuilder.filter(queryOption.getFilter());
|
||||
}
|
||||
final List<String> expands = queryOption.getExpands();
|
||||
if (expands.size() > 0) {
|
||||
String[] expandArray = new String[expands.size()];
|
||||
uriBuilder.expand(expands.toArray(expandArray));
|
||||
}
|
||||
|
||||
ODataEntitySetRequest<ClientEntitySet> request = odataClient.getRetrieveRequestFactory()
|
||||
.getEntitySetRequest(uriBuilder.build());
|
||||
|
||||
this.authStrategy.configureRequest(request);
|
||||
|
||||
if (expands.size() > 0) {
|
||||
// odata-metadata=full set by olingo generates issue when expand entities
|
||||
request.addCustomHeader("Accept", "application/json;odata-metadata=minimal");
|
||||
}
|
||||
|
||||
addCustomHeaders(request);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
public EdmMetadataRequest createMetadataRetrieveRequest() {
|
||||
EdmMetadataRequest request = odataClient.getRetrieveRequestFactory()
|
||||
.getMetadataRequest(serviceRootURL);
|
||||
this.authStrategy.configureRequest(request);
|
||||
return request;
|
||||
}
|
||||
|
||||
public ODataEntitySetRequest<ClientEntitySet> createEntitySetRetrieveRequest() {
|
||||
URIBuilder uriBuilder = odataClient.newURIBuilder(serviceRootURL).appendEntitySetSegment("EntityDefinitions").select("EntitySetName,LogicalName");
|
||||
ODataEntitySetRequest<ClientEntitySet> entitySetRequest = odataClient.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
|
||||
this.authStrategy.configureRequest(entitySetRequest);
|
||||
|
||||
addCustomHeaders(entitySetRequest);
|
||||
|
||||
return entitySetRequest;
|
||||
}
|
||||
|
||||
public ODataEntitySetRequest<ClientEntitySet> createEndpointsNamesRequest() {
|
||||
URIBuilder uriBuilder = odataClient.newURIBuilder(serviceRootURL);
|
||||
ODataEntitySetRequest<ClientEntitySet> entitySetRequest = odataClient.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
|
||||
this.authStrategy.configureRequest(entitySetRequest);
|
||||
|
||||
addCustomHeaders(entitySetRequest);
|
||||
|
||||
return entitySetRequest;
|
||||
}
|
||||
|
||||
public ODataEntitySetRequest<ClientEntitySet> createRequest(URIBuilder uriBuilder) {
|
||||
ODataEntitySetRequest<ClientEntitySet> entitySetRequest = odataClient.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
|
||||
this.authStrategy.configureRequest(entitySetRequest);
|
||||
|
||||
addCustomHeaders(entitySetRequest);
|
||||
|
||||
return entitySetRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve records from EntitySet
|
||||
*
|
||||
* @param entitySet the EntitySet name which you want to retrieve records
|
||||
* @param queryOption
|
||||
* @return the entity set iterator object
|
||||
*
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
public ClientEntitySet retrieveEntities(QueryOptionConfig queryOption) throws AuthenticationException {
|
||||
@@ -218,12 +288,10 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
/**
|
||||
* Create entity
|
||||
*
|
||||
* @param entitySet entitySet the EntitySet name which you want to create record
|
||||
* @param entity provided content for create
|
||||
*
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
public HttpResponse insertEntity(ClientEntity entity) throws ServiceUnavailableException {
|
||||
public CreateUpdateResult insertEntity(ClientEntity entity) throws ServiceUnavailableException {
|
||||
URIBuilder insertURIBuilder = odataClient.newURIBuilder(serviceRootURL).appendEntitySetSegment(entitySet);
|
||||
HttpEntity httpEntity = convertToHttpEntity(entity);
|
||||
return createAndExecuteRequest(insertURIBuilder.build(), httpEntity, HttpMethod.POST);
|
||||
@@ -233,27 +301,49 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
* Update entity with provided content.
|
||||
* The PATCH method is used, so only given properties are updated.
|
||||
* Navigation link properties that must be set to null are updated by another DELETE calls.
|
||||
* Navigation link properties are saved during {@link #addEntityNavigationLink(ClientEntity, String, String, String, boolean, boolean)}
|
||||
* method call
|
||||
*
|
||||
* @param entity The payload containing properties to update
|
||||
* @param entity The payload containing properties to update
|
||||
* @param keySegment The id of the entity to update
|
||||
* @throws ServiceUnavailableException
|
||||
* @deprecated use {@link #updateEntity(ClientEntity, String, List)} instead with a list of navigation links list instead;
|
||||
*/
|
||||
@Deprecated
|
||||
public CreateUpdateResult updateEntity(ClientEntity entity, String keySegment) throws ServiceUnavailableException {
|
||||
CreateUpdateResult result = updateEntity(entity, keySegment, this.navigationLinksToNull);
|
||||
this.navigationLinksToNull.clear();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update entity with provided content.
|
||||
* The PATCH method is used, so only given properties are updated.
|
||||
* Navigation link properties that must be set to null are updated by another DELETE calls.
|
||||
*
|
||||
* @param entity The payload containing properties to update
|
||||
* @param keySegment The id of the entity to update
|
||||
* @param navigationLinksToDelete list of navigation link names to delete
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
public HttpResponse updateEntity(ClientEntity entity, String keySegment) throws ServiceUnavailableException {
|
||||
public CreateUpdateResult updateEntity(ClientEntity entity, String keySegment, List<String> navigationLinksToDelete) throws ServiceUnavailableException {
|
||||
URIBuilder updateURIBuilder = odataClient.newURIBuilder(serviceRootURL).appendEntitySetSegment(entitySet)
|
||||
.appendKeySegment(UUID.fromString(keySegment));
|
||||
HttpEntity httpEntity = convertToHttpEntity(entity);
|
||||
HttpResponse updateHttpResponse = createAndExecuteRequest(updateURIBuilder.build(), httpEntity, HttpMethod.PATCH);
|
||||
CreateUpdateResult result = createAndExecuteRequest(updateURIBuilder.build(), httpEntity, HttpMethod.PATCH);
|
||||
|
||||
// No need to test the updateHttpResponse code since it is returned only if it's a success.
|
||||
// The deletion of navigation links will be done only if the previous update doesn't throw an exception.
|
||||
this.deleteNavigationLinksToNull(keySegment);
|
||||
this.deleteNavigationLinksToNull(keySegment, navigationLinksToDelete);
|
||||
|
||||
return updateHttpResponse;
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void deleteNavigationLinksToNull(String keySegment) throws ServiceUnavailableException {
|
||||
for(String navigationLinkName : this.navigationLinksToNull){
|
||||
protected void deleteNavigationLinksToNull(String keySegment, List<String> navigationLinksToNull) throws ServiceUnavailableException {
|
||||
if (navigationLinksToNull == null || navigationLinksToNull.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (String navigationLinkName : navigationLinksToNull) {
|
||||
this.deleteNavigationLink(navigationLinkName, keySegment);
|
||||
}
|
||||
}
|
||||
@@ -261,16 +351,14 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
/**
|
||||
* Deleted entity by key
|
||||
*
|
||||
* @param entitySet entitySet the EntitySet name which you want to delete records
|
||||
* @param keySegment Entity key segment
|
||||
*
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
public HttpResponse deleteEntity(String keySegment) throws ServiceUnavailableException {
|
||||
URIBuilder deleteURIBuilder = odataClient.newURIBuilder(serviceRootURL).appendEntitySetSegment(entitySet)
|
||||
.appendKeySegment(UUID.fromString(keySegment));
|
||||
|
||||
return createAndExecuteRequest(deleteURIBuilder.build(), null, HttpMethod.DELETE);
|
||||
return createAndExecuteRequest(deleteURIBuilder.build(), null, HttpMethod.DELETE).getResponse();
|
||||
}
|
||||
|
||||
|
||||
@@ -279,17 +367,17 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
* Jira : TDI-39571
|
||||
*
|
||||
* @param navigationLinkName The navigation link name (not the _name_value generated lookup property)
|
||||
* @param keySegment The keysegment(id) of the main property
|
||||
* @param keySegment The keysegment(id) of the main property
|
||||
* @return The Http response.
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
public HttpResponse deleteNavigationLink(String navigationLinkName, String keySegment) throws ServiceUnavailableException {
|
||||
URIBuilder deleteNavLinkURIBuilder = odataClient.newURIBuilder(serviceRootURL)
|
||||
.appendEntitySetSegment(entitySet)
|
||||
.appendKeySegment(UUID.fromString(keySegment))
|
||||
.appendNavigationSegment(navigationLinkName).appendRefSegment();
|
||||
.appendEntitySetSegment(entitySet)
|
||||
.appendKeySegment(UUID.fromString(keySegment))
|
||||
.appendNavigationSegment(navigationLinkName).appendRefSegment();
|
||||
|
||||
return createAndExecuteRequest(deleteNavLinkURIBuilder.build(), null, HttpMethod.DELETE);
|
||||
return createAndExecuteRequest(deleteNavLinkURIBuilder.build(), null, HttpMethod.DELETE).getResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,24 +437,24 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
*
|
||||
* @param entityType
|
||||
*/
|
||||
public void setEntityType(String entityType){
|
||||
public void setEntityType(String entityType) {
|
||||
this.entityType = entityType;
|
||||
}
|
||||
|
||||
public void addEntityNavigationLink(ClientEntity entity, String lookupEntitySet, String lookupName,
|
||||
String linkedEntityId, boolean emptyLookupIntoNull, boolean ignoreNull) {
|
||||
String linkedEntityId, boolean emptyLookupIntoNull, boolean ignoreNull) {
|
||||
|
||||
// To help the final user since lookup names '_name_value' are available in the schema
|
||||
// But it's the navigation link that can be updated.
|
||||
String navigationLinkName = this.extractNavigationLinkName(lookupName);
|
||||
|
||||
// If value is empty and emptyLookupIntoNull, then set the value to null to unlink the navigation (set to null)
|
||||
if(emptyLookupIntoNull && linkedEntityId != null && linkedEntityId.isEmpty()){
|
||||
if (emptyLookupIntoNull && linkedEntityId != null && linkedEntityId.isEmpty()) {
|
||||
linkedEntityId = null;
|
||||
}
|
||||
|
||||
// If ignore null is set and the value is null, then don't update/delete this navigation link
|
||||
if(ignoreNull && linkedEntityId == null){
|
||||
if (ignoreNull && linkedEntityId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -377,14 +465,50 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
} catch (URISyntaxException e) {
|
||||
throw new HttpClientException(e);
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
// Retains all navigation links to delete (set to null)
|
||||
navigationLinksToNull.add(navigationLinkName);
|
||||
}
|
||||
}
|
||||
|
||||
public int getNbNavigationLinkToRemove(){
|
||||
/**
|
||||
* Try to add navigation link to entity.
|
||||
*
|
||||
* @param navigationLinkName extracted navigation link(see {@link #extractNavigationLinkName(String)})
|
||||
* @param entity to be updated
|
||||
* @param lookupEntitySet entity set referred by navigation link
|
||||
* @param linkedEntityId id of the referred entity
|
||||
* @param emptyLookupIntoNull if empty lookup values should be converted to null values
|
||||
* @param ignoreNull if null values should be skipped
|
||||
* @return true if the link was added or skipped, false if it should be deleted with a separate call.
|
||||
*/
|
||||
public boolean addOrSkipEntityNavigationLink(ClientEntity entity, String lookupEntitySet, String navigationLinkName,
|
||||
String linkedEntityId, boolean emptyLookupIntoNull, boolean ignoreNull) {
|
||||
// If value is empty and emptyLookupIntoNull, then set the value to null to unlink the navigation (set to null)
|
||||
if (emptyLookupIntoNull && linkedEntityId != null && linkedEntityId.isEmpty()) {
|
||||
linkedEntityId = null;
|
||||
}
|
||||
|
||||
// If ignore null is set and the value is null, then don't update/delete this navigation link
|
||||
if (ignoreNull && linkedEntityId == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (linkedEntityId != null) {
|
||||
try {
|
||||
entity.getNavigationLinks().add(odataClient.getObjectFactory().newEntityNavigationLink(navigationLinkName,
|
||||
new URI(lookupEntitySet + "(" + linkedEntityId + ")")));
|
||||
} catch (URISyntaxException e) {
|
||||
throw new HttpClientException(e);
|
||||
}
|
||||
} else {
|
||||
// Retains all navigation links to delete (set to null)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getNbNavigationLinkToRemove() {
|
||||
return navigationLinksToNull.size();
|
||||
}
|
||||
|
||||
@@ -397,20 +521,20 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
* @param lookupName The auto-generated lookup name
|
||||
* @return The extracted navigation link name or the lookup name if it can't be extracted.
|
||||
*/
|
||||
public String extractNavigationLinkName(String lookupName){
|
||||
public String extractNavigationLinkName(String lookupName) {
|
||||
final int nameSize = lookupName.length();
|
||||
if(nameSize <= LOOKUP_NAME_MINSIZE){
|
||||
if (nameSize <= LOOKUP_NAME_MINSIZE) {
|
||||
return lookupName;
|
||||
}
|
||||
|
||||
String pref = lookupName.substring(0, LOOKUP_NAME_PREFIX.length());
|
||||
if(!pref.equals(LOOKUP_NAME_PREFIX)){
|
||||
if (!pref.equals(LOOKUP_NAME_PREFIX)) {
|
||||
return lookupName;
|
||||
}
|
||||
|
||||
final int endName = nameSize - LOOKUP_NAME_SUFFIX.length();
|
||||
String suff = lookupName.substring(endName, nameSize);
|
||||
if(!suff.equals(LOOKUP_NAME_SUFFIX)){
|
||||
if (!suff.equals(LOOKUP_NAME_SUFFIX)) {
|
||||
return lookupName;
|
||||
}
|
||||
|
||||
@@ -421,7 +545,6 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
* Convert OData entity to HttpEntity type
|
||||
*
|
||||
* @param entity OData entity.
|
||||
*
|
||||
* @return An entity that can be sent or received with an HTTP message.
|
||||
* @throws
|
||||
*/
|
||||
@@ -446,15 +569,14 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
/**
|
||||
* Created and executes a request
|
||||
*
|
||||
* @param uri the request URI
|
||||
* @param uri the request URI
|
||||
* @param httpEntity the entity to send.
|
||||
* @param method HTTP method
|
||||
*
|
||||
* @param method HTTP method
|
||||
* @return the response to the request.
|
||||
* @throws ServiceUnavailableException
|
||||
*/
|
||||
|
||||
protected HttpResponse createAndExecuteRequest(URI uri, HttpEntity httpEntity, HttpMethod method)
|
||||
protected CreateUpdateResult createAndExecuteRequest(URI uri, HttpEntity httpEntity, HttpMethod method)
|
||||
throws ServiceUnavailableException {
|
||||
|
||||
boolean hasRetried = false;
|
||||
@@ -476,11 +598,31 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
if (request instanceof HttpEntityEnclosingRequestBase) {
|
||||
((HttpEntityEnclosingRequestBase) request).setEntity(httpEntity);
|
||||
}
|
||||
|
||||
addCustomHeader(request);
|
||||
|
||||
CreateUpdateResult result = new CreateUpdateResult();
|
||||
HttpResponse response = httpClientState.getHttpClient().execute(request);
|
||||
result.setResponse(response);
|
||||
|
||||
if (isResponseSuccess(response.getStatusLine().getStatusCode())) {
|
||||
if (this.clientConfiguration.isReturnRepresentation()) {
|
||||
final HttpEntity entity = response.getEntity();
|
||||
if (entity != null && entity.isStreaming()) {
|
||||
try(InputStream instream = entity.getContent()) {
|
||||
String e = new BufferedReader(new InputStreamReader(instream))
|
||||
.lines().collect(Collectors.joining("\n"));
|
||||
result.setEntity(e);
|
||||
if (instream != null) {
|
||||
instream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntityUtils.consume(response.getEntity());
|
||||
}
|
||||
request.releaseConnection();
|
||||
EntityUtils.consume(response.getEntity());
|
||||
return response;
|
||||
return result;
|
||||
} else {
|
||||
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED && !hasRetried) {
|
||||
this.authStrategy.refreshAuth();
|
||||
@@ -509,7 +651,6 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
* 201 create/update/delete entity success with return (not used in our component at present)
|
||||
*
|
||||
* @param statusCode HTTP status code
|
||||
*
|
||||
* @return success or not(true or false)
|
||||
*/
|
||||
public boolean isResponseSuccess(int statusCode) {
|
||||
@@ -542,4 +683,30 @@ public class DynamicsCRMClient implements IHttpClientFactoryObserver {
|
||||
|
||||
}
|
||||
|
||||
public final static class CreateUpdateResult {
|
||||
|
||||
private HttpResponse response;
|
||||
private String entity;
|
||||
|
||||
public HttpResponse getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
public void setResponse(HttpResponse response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public String getEntity() {
|
||||
return entity;
|
||||
}
|
||||
|
||||
public void setEntity(String entity) {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
public boolean hasEntity() {
|
||||
return this.entity != null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package org.talend.ms.crm.odata;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class QueryExpandUtil {
|
||||
|
||||
public static List<String> getExpandConfig(List<String> fields, List<String> params) {
|
||||
if (fields == null || params == null || fields.size() != params.size()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Please make sure list of expands fields and params are not null and their size are same.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(fields.size() <= 0){
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
List<String> expands = new ArrayList<>();
|
||||
for(int i=0; i< fields.size(); i++){
|
||||
String name = fields.get(i);
|
||||
if("".equals(name.trim())){
|
||||
continue;
|
||||
}
|
||||
|
||||
name = getSanitizedName(name);
|
||||
StringBuilder sb = new StringBuilder(name);
|
||||
final String param = params.get(i);
|
||||
if(!"".equals(param.trim())){
|
||||
sb.append('(');
|
||||
sb.append(param);
|
||||
sb.append(')');
|
||||
}
|
||||
expands.add(sb.toString());
|
||||
}
|
||||
|
||||
return expands;
|
||||
}
|
||||
|
||||
/**
|
||||
* expandable attrribute name are _entityid_value, should be transformed to entityid.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static String getSanitizedName(final String name){
|
||||
String sanitized = ('_' == name.charAt(0)) ? name.substring(1) : name;
|
||||
sanitized = (sanitized.endsWith("_value")) ? sanitized.substring(0, sanitized.length() - 6): sanitized;
|
||||
|
||||
return sanitized;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -12,6 +12,9 @@
|
||||
// ============================================================================
|
||||
package org.talend.ms.crm.odata;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class QueryOptionConfig {
|
||||
|
||||
private int top = -1;
|
||||
@@ -24,6 +27,9 @@ public class QueryOptionConfig {
|
||||
|
||||
private String filter;
|
||||
|
||||
private List<String> expand = new ArrayList<>();
|
||||
|
||||
|
||||
public int getTop() {
|
||||
return top;
|
||||
}
|
||||
@@ -64,4 +70,8 @@ public class QueryOptionConfig {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
public void setExpands(List<String> expand) { this.expand = expand;}
|
||||
|
||||
public List<String> getExpands() { return this.expand; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -12,13 +12,11 @@
|
||||
// ============================================================================
|
||||
package org.talend.ms.crm.odata.authentication;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
|
||||
import org.talend.ms.crm.odata.ClientConfiguration;
|
||||
|
||||
/**
|
||||
* Factory for OData authentication strategies.
|
||||
*
|
||||
* <p>
|
||||
* No need to use singleton pattern since no implementation/extends, static is enough.
|
||||
*/
|
||||
public final class AuthStrategyFactory {
|
||||
@@ -26,15 +24,18 @@ public final class AuthStrategyFactory {
|
||||
private AuthStrategyFactory() {
|
||||
}
|
||||
|
||||
public final static IAuthStrategy createAuthStrategy(ClientConfiguration conf) {
|
||||
public static IAuthStrategy createAuthStrategy(ClientConfiguration conf) {
|
||||
IAuthStrategy authStrategy = null;
|
||||
switch (conf.getAuthStrategy()) {
|
||||
case OAUTH:
|
||||
authStrategy = new OAuthStrategyImpl(conf);
|
||||
break;
|
||||
case NTLM:
|
||||
authStrategy = new NTLMStrategyImpl(conf);
|
||||
break;
|
||||
case OAUTH:
|
||||
authStrategy = new OAuthStrategyImpl(conf);
|
||||
break;
|
||||
case NTLM:
|
||||
authStrategy = new NTLMStrategyImpl(conf);
|
||||
break;
|
||||
case OAUTH_PREMISE:
|
||||
authStrategy = new OAuthPremiseStrategyImpl(conf);
|
||||
break;
|
||||
}
|
||||
|
||||
return authStrategy;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -31,7 +31,7 @@ public interface IAuthStrategy {
|
||||
* Called when DynamicsCRMClient is instanciated.
|
||||
*
|
||||
*/
|
||||
public void init() throws AuthenticationException;
|
||||
void init() throws AuthenticationException;
|
||||
|
||||
/**
|
||||
* Retrieve the HttpClientFactory.
|
||||
@@ -41,21 +41,21 @@ public interface IAuthStrategy {
|
||||
* Called when DynamicsCRMClient is instanciated.
|
||||
*
|
||||
*/
|
||||
public IHttpclientFactoryObservable getHttpClientFactory() throws AuthenticationException;
|
||||
IHttpclientFactoryObservable getHttpClientFactory() throws AuthenticationException;
|
||||
|
||||
/**
|
||||
* Refresh Authentication if needed.
|
||||
*/
|
||||
public void refreshAuth() throws AuthenticationException;
|
||||
void refreshAuth() throws AuthenticationException;
|
||||
|
||||
/**
|
||||
* Configure request generated by odataClient.getRetrieveRequestFactory().
|
||||
*/
|
||||
public void configureRequest(ODataRequest request);
|
||||
void configureRequest(ODataRequest request);
|
||||
|
||||
/**
|
||||
* Configure request HttpRequestBase with POST/PATCH/DELETE method.
|
||||
*/
|
||||
public void configureRequest(HttpRequestBase request);
|
||||
void configureRequest(HttpRequestBase request);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
package org.talend.ms.crm.odata.authentication;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonIOException;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
import org.apache.olingo.client.api.communication.request.ODataRequest;
|
||||
import org.apache.olingo.commons.api.http.HttpHeader;
|
||||
import org.talend.ms.crm.odata.ClientConfiguration;
|
||||
import org.talend.ms.crm.odata.authentication.httpclienthelper.HttpClient;
|
||||
import org.talend.ms.crm.odata.authentication.httpclienthelper.HttpResponse;
|
||||
import org.talend.ms.crm.odata.authentication.httpclienthelper.RequestHttpContext;
|
||||
import org.talend.ms.crm.odata.authentication.httpclienthelper.Token;
|
||||
import org.talend.ms.crm.odata.httpclientfactory.IHttpclientFactoryObservable;
|
||||
import org.talend.ms.crm.odata.httpclientfactory.OAuthHttpClientFactory;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class OAuthPremiseStrategyImpl implements IAuthStrategy {
|
||||
|
||||
private final static int MAX_REDIRECT_AUTH_CODE = 3;
|
||||
|
||||
private final ClientConfiguration conf;
|
||||
|
||||
private Token token;
|
||||
private OAuthHttpClientFactory httpClientFactory;
|
||||
|
||||
|
||||
OAuthPremiseStrategyImpl(ClientConfiguration conf) {
|
||||
this.conf = conf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws AuthenticationException {
|
||||
oauthFlow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHttpclientFactoryObservable getHttpClientFactory() throws AuthenticationException {
|
||||
oauthFlow();
|
||||
|
||||
if (httpClientFactory == null) {
|
||||
httpClientFactory = new OAuthHttpClientFactory(this.conf);
|
||||
}
|
||||
|
||||
return httpClientFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshAuth() throws AuthenticationException {
|
||||
oauthFlow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureRequest(ODataRequest request) {
|
||||
request.addCustomHeader(HttpHeader.AUTHORIZATION, "Bearer " + token.getAccess_token());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureRequest(HttpRequestBase request) {
|
||||
request.addHeader(HttpHeader.AUTHORIZATION, "Bearer " + token.getAccess_token());
|
||||
}
|
||||
|
||||
private void oauthFlow() throws AuthenticationException {
|
||||
int retry = 0;
|
||||
|
||||
while (true) {
|
||||
retry++;
|
||||
try {
|
||||
|
||||
final Optional<String> code = retrieveAuthorizationCode();
|
||||
if (code.isPresent()) {
|
||||
final String sCode = code.get();
|
||||
final Optional<Token> token = retrieveToken(sCode);
|
||||
if (token.isPresent()) {
|
||||
this.token = token.get();
|
||||
break;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Can't retrieve oauth token, but no exception has been raised.");
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("Can't retrieve authorization code, but no exception has been raised.");
|
||||
}
|
||||
|
||||
} catch (IOException | InterruptedException | IllegalArgumentException e) {
|
||||
if (retry < conf.getMaxRetryTimes()) {
|
||||
try {
|
||||
Thread.sleep(conf.getIntervalTime());
|
||||
} catch (InterruptedException e1) {
|
||||
// ignore
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
throw new AuthenticationException("Can't retrieve ms crm oauth token after '" + retry + "' retries : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Token json2Token(String json) throws JsonIOException, JsonSyntaxException {
|
||||
Gson gson = new Gson();
|
||||
JsonReader jsr = new JsonReader(new StringReader(json));
|
||||
return gson.fromJson(jsr, Token.class);
|
||||
}
|
||||
|
||||
private String getResource() throws MalformedURLException {
|
||||
if(conf.getForceResource() != null && !"".equals(conf.getForceResource().trim())){
|
||||
return conf.getForceResource();
|
||||
}
|
||||
|
||||
URL url = new URL(conf.getServiceAPI());
|
||||
final int port = url.getPort();
|
||||
StringBuilder sp = new StringBuilder();
|
||||
if (port > -1) {
|
||||
sp.append(":").append(port);
|
||||
}
|
||||
return url.getProtocol() + "://" + url.getHost() + sp.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* To compute token url, change last segment by token.
|
||||
* @return
|
||||
*/
|
||||
private String computeTokenUrl(String url){
|
||||
while(url.endsWith("/")) {
|
||||
url = url.substring(0, url.length() - 1);
|
||||
}
|
||||
String token = url.substring(0, url.lastIndexOf('/')) + "/token";
|
||||
return token;
|
||||
}
|
||||
|
||||
private Optional<Token> retrieveToken(String code) throws IOException, InterruptedException, IllegalArgumentException {
|
||||
Map<String, String> body = new HashMap<>();
|
||||
body.put("grant_type", "authorization_code");
|
||||
body.put("code", code);
|
||||
body.put("redirect_uri", conf.getRedirectURL());
|
||||
body.put("client_id", conf.getClientId());
|
||||
|
||||
if(conf.getClientSecret() != null && !"".equals(conf.getClientSecret().trim())){
|
||||
body.put("client_secret", conf.getClientSecret());
|
||||
}
|
||||
|
||||
RequestHttpContext queryContext = new RequestHttpContext("POST",
|
||||
computeTokenUrl(conf.getAuthoryEndpoint()),
|
||||
Collections.emptyMap(),
|
||||
new HashMap<>(),
|
||||
true,
|
||||
conf.getTimeout() * 1000,
|
||||
conf.getTimeout() * 1000);
|
||||
|
||||
queryContext.setBodyContent(body);
|
||||
|
||||
HttpClient client = new HttpClient(queryContext);
|
||||
|
||||
// Redirect are followed by the java http client
|
||||
final HttpResponse call = client.call(new AtomicInteger(-1), e -> true);
|
||||
|
||||
Token token = null;
|
||||
try {
|
||||
token = json2Token(call.getBody());
|
||||
}
|
||||
catch (JsonIOException | JsonSyntaxException e){
|
||||
throw new IllegalArgumentException("Can't parse retrieve ms crm oauth token : " + e.getMessage(), e);
|
||||
}
|
||||
return Optional.ofNullable(token);
|
||||
}
|
||||
|
||||
private Optional<String> retrieveAuthorizationCode() throws IOException, InterruptedException {
|
||||
Map<String, String> params = new HashMap();
|
||||
params.put("resource", getResource());
|
||||
params.put("response_type", "code");
|
||||
params.put("state", "");
|
||||
params.put("client_id", conf.getClientId());
|
||||
params.put("scope", "");
|
||||
params.put("redirect_uri", conf.getRedirectURL());
|
||||
|
||||
Map<String, String> form = new HashMap<>();
|
||||
form.put("UserName", conf.getUserName());
|
||||
form.put("Password", conf.getPassword());
|
||||
form.put("AuthMethod", "FormsAuthentication");
|
||||
|
||||
RequestHttpContext queryContext = new RequestHttpContext("POST",
|
||||
conf.getAuthoryEndpoint(),
|
||||
params,
|
||||
new HashMap<>(),
|
||||
false,
|
||||
conf.getTimeout() * 1000,
|
||||
conf.getTimeout() * 1000);
|
||||
|
||||
queryContext.setBodyContent(form);
|
||||
HttpClient client = new HttpClient(queryContext);
|
||||
|
||||
// We stop to follow redirect url once we have the code
|
||||
final HttpResponse call = client.call(new AtomicInteger(MAX_REDIRECT_AUTH_CODE), e -> !e.extractCode().isPresent());
|
||||
|
||||
return call.extractCode();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package org.talend.ms.crm.odata.authentication.httpclienthelper;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class HttpClient {
|
||||
|
||||
private final static int TEMPORARY_REDIRECT = 307;
|
||||
private final static int PERMANENT_REDIRECT = 308;
|
||||
|
||||
private final RequestHttpContext requestHttpContext;
|
||||
|
||||
public HttpClient(RequestHttpContext requestHttpContext) {
|
||||
this.requestHttpContext = requestHttpContext;
|
||||
}
|
||||
|
||||
public static String encodeValue(String value) throws UnsupportedEncodingException {
|
||||
return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());
|
||||
}
|
||||
|
||||
public HttpResponse call(AtomicInteger atomicInteger, Function<HttpResponse, Boolean> acceptRedirect) throws IOException, InterruptedException {
|
||||
final HttpURLConnection conn = buildUrl(requestHttpContext);
|
||||
|
||||
if ("POST".equals(conn.getRequestMethod())) {
|
||||
conn.setDoOutput(true);
|
||||
try (DataOutputStream dos = new DataOutputStream(conn.getOutputStream())) {
|
||||
final byte[] form = requestHttpContext.getBodyContent().getBytes(StandardCharsets.UTF_8);
|
||||
dos.write(form);
|
||||
dos.flush();
|
||||
}
|
||||
} else {
|
||||
conn.connect();
|
||||
}
|
||||
|
||||
final HttpResponse respContext = HttpResponse.fromHttpUrlConnection(conn);
|
||||
return followRedirect(requestHttpContext, respContext, atomicInteger, acceptRedirect);
|
||||
}
|
||||
|
||||
private HttpResponse followRedirect(RequestHttpContext queryContext, HttpResponse response, AtomicInteger nbRedirect, Function<HttpResponse, Boolean> acceptRedirect) throws IOException, InterruptedException {
|
||||
final int nbR = nbRedirect.decrementAndGet();
|
||||
final int status = response.getStatus();
|
||||
|
||||
boolean redirect = false;
|
||||
if (status != HttpURLConnection.HTTP_OK && ((status == HttpURLConnection.HTTP_MOVED_TEMP
|
||||
|| status == HttpURLConnection.HTTP_MOVED_PERM || status == HttpURLConnection.HTTP_SEE_OTHER
|
||||
|| status == TEMPORARY_REDIRECT || status == PERMANENT_REDIRECT))) {
|
||||
redirect = true;
|
||||
}
|
||||
|
||||
final Optional<String> location = response.getFirstValueHeader("location");
|
||||
|
||||
if (!redirect || !location.isPresent() || nbR <= 0) {
|
||||
return response;
|
||||
}
|
||||
|
||||
queryContext.setBase(location.get());
|
||||
queryContext.setParams(Collections.emptyMap());
|
||||
|
||||
final List<String> cookie = response.getAllValuesHeader("Set-Cookie").orElse(Collections.emptyList());
|
||||
if (cookie.size() > 0) {
|
||||
final String collect = String.join("; ", cookie); //cookie.stream().collect(Collectors.joining("; "));
|
||||
queryContext.getHeaders().put("Cookie", collect);
|
||||
}
|
||||
|
||||
Boolean continueRedirect = acceptRedirect.apply(response);
|
||||
if (!continueRedirect) {
|
||||
return response;
|
||||
}
|
||||
|
||||
HttpClient manager = new HttpClient(queryContext);
|
||||
final HttpResponse redirectResponseContext = manager.call(nbRedirect, acceptRedirect);
|
||||
|
||||
|
||||
return redirectResponseContext;
|
||||
}
|
||||
|
||||
private HttpURLConnection buildUrl(RequestHttpContext context) throws IOException {
|
||||
StringBuilder sb = new StringBuilder(context.getBase());
|
||||
|
||||
if (context.getParams().size() > 0) {
|
||||
sb.append("?");
|
||||
|
||||
boolean first = true;
|
||||
for (Map.Entry<String, String> e : context.getParams().entrySet()) {
|
||||
if (!first) {
|
||||
sb.append("&");
|
||||
}
|
||||
first = false;
|
||||
sb.append(e.getKey());
|
||||
sb.append("=");
|
||||
sb.append(encodeValue(e.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
URL url = new URL(sb.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
|
||||
if (context.getHeaders().size() > 0) {
|
||||
for (Map.Entry<String, String> e : context.getHeaders().entrySet()) {
|
||||
conn.setRequestProperty(e.getKey(), e.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
conn.setRequestMethod(context.getMethod());
|
||||
conn.setInstanceFollowRedirects(context.isFollowRedirects());
|
||||
conn.setConnectTimeout(context.getConnectionTimeout());
|
||||
conn.setReadTimeout(context.getReadTimeout());
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
||||
public RequestHttpContext getRequestHttpContext() {
|
||||
return requestHttpContext;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package org.talend.ms.crm.odata.authentication.httpclienthelper;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class HttpResponse {
|
||||
private int status;
|
||||
private Map<String, List<String>> headers;
|
||||
private String body;
|
||||
|
||||
private Optional<String> code = null;
|
||||
|
||||
public static HttpResponse fromHttpUrlConnection(HttpURLConnection conn) throws IOException {
|
||||
final int status = conn.getResponseCode();
|
||||
final Map<String, List<String>> respHeaders = conn.getHeaderFields();
|
||||
|
||||
HttpResponse context = new HttpResponse(status);
|
||||
context.setHeaders(respHeaders);
|
||||
|
||||
try(BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"))){
|
||||
final String body = in.lines().collect(Collectors.joining("\n"));
|
||||
context.setBody(body);
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
private HttpResponse(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public void setHeaders(Map<String, List<String>> headers) {
|
||||
this.headers = headers;
|
||||
}
|
||||
|
||||
private Optional<List<String>> _getAllValuesHeader(String key) {
|
||||
if (this.getHeaders() == null || this.getHeaders().size() <= 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (!this.getHeaders().containsKey(key)) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return Optional.ofNullable(this.getHeaders().get(key));
|
||||
}
|
||||
|
||||
public Optional<List<String>> getAllValuesHeader(String key) {
|
||||
String keyUpper = ("" + key.charAt(0)).toUpperCase() + key.substring(1);
|
||||
String keyLower = ("" + key.charAt(0)).toLowerCase() + key.substring(1);
|
||||
|
||||
Optional<List<String>> values = _getAllValuesHeader(keyUpper);
|
||||
if(!values.isPresent()){
|
||||
values = _getAllValuesHeader(keyLower);
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
public Optional<String> getFirstValueHeader(String key) {
|
||||
final Optional<List<String>> values = getAllValuesHeader(key);
|
||||
if(!values.isPresent()){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
final List<String> ss = values.get();
|
||||
if(ss.size() <= 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return Optional.ofNullable(ss.get(0));
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract 'Code' parameter from the redirect url if exist.
|
||||
* @return An Optional with the code if any.
|
||||
*/
|
||||
private Optional<String> _extractCode(){
|
||||
final Optional<String> optLocation = this.getFirstValueHeader("Location");
|
||||
if (!optLocation.isPresent()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
final String optLocationValue = optLocation.get();
|
||||
final String[] split = optLocationValue.split("&|\\?");
|
||||
|
||||
final Optional<String> optCode = Arrays.stream(split).filter(e -> e.startsWith("code=")).findFirst();
|
||||
if (optCode.isPresent()) {
|
||||
final String optCodeValue = optCode.get();
|
||||
String code = optCodeValue.substring(5);
|
||||
return Optional.ofNullable(code);
|
||||
}
|
||||
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public Optional<String> extractCode(){
|
||||
if(code != null){
|
||||
return code;
|
||||
}
|
||||
|
||||
code = _extractCode();
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.talend.ms.crm.odata.authentication.httpclienthelper;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
public final class RequestHttpContext {
|
||||
|
||||
private String method;
|
||||
private String base;
|
||||
private Map<String, String> params;
|
||||
private Map<String, String> headers;
|
||||
private boolean followRedirects;
|
||||
private int connectionTimeout;
|
||||
private int readTimeout;
|
||||
private String bodyContent = "";
|
||||
|
||||
public RequestHttpContext(String method, String base, Map<String, String> params, Map<String, String> headers, boolean followRedirects, int connectionTimeout, int readTimeout) {
|
||||
this.method = method;
|
||||
this.base = base;
|
||||
this.params = params;
|
||||
this.headers = headers;
|
||||
this.followRedirects = followRedirects;
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
this.readTimeout = readTimeout;
|
||||
}
|
||||
|
||||
public String getBodyContent() {
|
||||
return bodyContent;
|
||||
}
|
||||
|
||||
public void setBodyContent(Map<String, String> form) throws UnsupportedEncodingException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
boolean first = true;
|
||||
for (Map.Entry<String, String> e : form.entrySet()) {
|
||||
if(!first){
|
||||
sb.append("&");
|
||||
}
|
||||
first = false;
|
||||
|
||||
sb.append(e.getKey()).append("=").append(HttpClient.encodeValue(e.getValue()));
|
||||
}
|
||||
|
||||
this.setBodyContent(sb.toString());
|
||||
}
|
||||
|
||||
public void setBodyContent(String bodyContent) {
|
||||
this.bodyContent = bodyContent;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getBase() {
|
||||
return base;
|
||||
}
|
||||
|
||||
public void setBase(String base) {
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public Map<String, String> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public void setHeaders(Map<String, String> headers) {
|
||||
this.headers = headers;
|
||||
}
|
||||
|
||||
public boolean isFollowRedirects() {
|
||||
return followRedirects;
|
||||
}
|
||||
|
||||
public void setFollowRedirects(boolean followRedirects) {
|
||||
this.followRedirects = followRedirects;
|
||||
}
|
||||
|
||||
public int getConnectionTimeout() {
|
||||
return connectionTimeout;
|
||||
}
|
||||
|
||||
public void setConnectionTimeout(int connectionTimeout) {
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
public int getReadTimeout() {
|
||||
return readTimeout;
|
||||
}
|
||||
|
||||
public void setReadTimeout(int readTimeout) {
|
||||
this.readTimeout = readTimeout;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.talend.ms.crm.odata.authentication.httpclienthelper;
|
||||
|
||||
public final class Token {
|
||||
// Time to be sure to refresh the token at time
|
||||
private final static int EXPIRATION_SECURITY_GAP_SECOND = 60;
|
||||
|
||||
private String access_token;
|
||||
private String token_type;
|
||||
private Long expires_in;
|
||||
|
||||
public Token(){
|
||||
}
|
||||
|
||||
public String getAccess_token() {
|
||||
return access_token;
|
||||
}
|
||||
|
||||
public void setAccess_token(String access_token) {
|
||||
this.access_token = access_token;
|
||||
}
|
||||
|
||||
public String getToken_type() {
|
||||
return token_type;
|
||||
}
|
||||
|
||||
public void setToken_type(String token_type) {
|
||||
this.token_type = token_type;
|
||||
}
|
||||
|
||||
public Long getExpires_in() {
|
||||
return expires_in;
|
||||
}
|
||||
|
||||
public void setExpires_in(Long expires_in) {
|
||||
this.expires_in = expires_in;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package org.talend.ms.crm.sdk;
|
||||
|
||||
public class Instance {
|
||||
|
||||
public String id;
|
||||
|
||||
public String uniqueName;
|
||||
|
||||
public String urlName;
|
||||
|
||||
public String friendlyName;
|
||||
|
||||
public String state;
|
||||
|
||||
public String version;
|
||||
|
||||
public String url;
|
||||
|
||||
public String apiUrl;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUniqueName() {
|
||||
return uniqueName;
|
||||
}
|
||||
|
||||
public void setUniqueName(String uniqueName) {
|
||||
this.uniqueName = uniqueName;
|
||||
}
|
||||
|
||||
public String getUrlName() {
|
||||
return urlName;
|
||||
}
|
||||
|
||||
public void setUrlName(String urlName) {
|
||||
this.urlName = urlName;
|
||||
}
|
||||
|
||||
public String getFriendlyName() {
|
||||
return friendlyName;
|
||||
}
|
||||
|
||||
public void setFriendlyName(String friendlyName) {
|
||||
this.friendlyName = friendlyName;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getApiUrl() {
|
||||
return apiUrl;
|
||||
}
|
||||
|
||||
public void setApiUrl(String apiUrl) {
|
||||
this.apiUrl = apiUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.activity.InvalidActivityException;
|
||||
import java.security.InvalidParameterException;
|
||||
import javax.wsdl.WSDLException;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
@@ -107,7 +107,7 @@ public final class OnlineAuthenticationPolicy {
|
||||
this.initialize(flatWsdlUrl, targetDocument);
|
||||
}
|
||||
|
||||
private void initialize(String url, String wsdl) throws URISyntaxException, InvalidActivityException {
|
||||
private void initialize(String url, String wsdl) throws URISyntaxException, InvalidParameterException {
|
||||
final String PolicyNodeContentRegexPatern = "(?i)(<wsp:All.*?>)(.+?)(</wsp:All>)";
|
||||
final String LiveIdentityProviderTrustRegexPatern = "(?i)(<ms-xrm:LiveTrust.*?>)(.+?)(</ms-xrm:LiveTrust>)";
|
||||
final String OrgIdentityProviderTrustRegexPatern = "(?i)(<ms-xrm:OrgTrust.*?>)(.+?)(</ms-xrm:OrgTrust>)";
|
||||
@@ -166,7 +166,7 @@ public final class OnlineAuthenticationPolicy {
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidActivityException(
|
||||
throw new InvalidParameterException(
|
||||
String.format(Locale.getDefault(), "Unable to parse the authentication policy from the WSDL \"%s\".", url));
|
||||
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class OrganizationServiceStubWrapper extends OrganizationServiceStub {
|
||||
}
|
||||
|
||||
private void renewToken() throws Exception {
|
||||
orgStub = client.doGetOnlineConnection(discoveryServiceUrl);
|
||||
orgStub = client.doGetOnlineConnection();
|
||||
}
|
||||
|
||||
private void sleep() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
|
||||
@@ -384,11 +384,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -207,11 +207,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -267,11 +267,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -338,11 +338,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -323,11 +323,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
<IMPORT NAME="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MODULE="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-oauth2/v2-rev20200213-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MODULE="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-bigquery/v2-rev20201030-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-1.38.0.jar" MODULE="google-http-client-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-jackson2-1.38.0.jar" MODULE="google-http-client-jackson2-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client-jackson2/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="guava-20.0.jar" MODULE="guava-20.0.jar" MVN="mvn:com.google.guava/guava/20.0" REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.13.2.jar" MODULE="jackson-core-2.13.2.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.13.2" REQUIRED="true" />
|
||||
@@ -312,7 +312,7 @@
|
||||
<IMPORT NAME="google-cloud-storage-1.104.0" MODULE="google-cloud-storage-1.104.0.jar" MVN="mvn:com.google.cloud/google-cloud-storage/1.104.0" REQUIRED_IF="(AUTH_TYPE == 'GS_SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(AUTH_TYPE == 'GS_SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED="true" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED="true" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(AUTH_TYPE == 'GS_SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="protobuf-java-3.4.0" MODULE="protobuf-java-3.4.0.jar" MVN="mvn:com.google.protobuf/protobuf-java/3.4.0" REQUIRED_IF="(AUTH_TYPE == 'GS_SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="error_prone_annotation-2.1.3" MODULE="error_prone_annotation-2.1.3.jar" MVN="mvn:com.google.errorprone/error_prone_annotations/2.1.3" REQUIRED_IF="(AUTH_TYPE == 'GS_SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
<IMPORT NAME="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MODULE="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-oauth2/v2-rev20200213-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MODULE="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-bigquery/v2-rev20201030-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-1.38.0.jar" MODULE="google-http-client-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-jackson2-1.38.0.jar" MODULE="google-http-client-jackson2-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client-jackson2/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="guava-20.0.jar" MODULE="guava-20.0.jar" MVN="mvn:com.google.guava/guava/20.0" REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.13.2.jar" MODULE="jackson-core-2.13.2.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.13.2" REQUIRED="true" />
|
||||
@@ -227,7 +227,7 @@
|
||||
<IMPORT NAME="opencensus-api-0.24.0" MODULE="opencensus-api-0.24.0.jar" MVN="mvn:io.opencensus/opencensus-api/0.24.0" REQUIRED="true" />
|
||||
<IMPORT NAME="opencensus-contrib-http-util-0.24.0" MODULE="opencensus-contrib-http-util-0.24.0.jar" MVN="mvn:io.opencensus/opencensus-contrib-http-util/0.24.0" REQUIRED="true" />
|
||||
<IMPORT NAME="grpc-context-1.22.1" MODULE="grpc-context-1.22.1.jar" MVN="mvn:io.grpc/grpc-context/1.22.1" REQUIRED="true" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="AUTH_MODE == 'SERVICEACCOUNT'" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="AUTH_MODE == 'SERVICEACCOUNT'" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
<IMPORT NAME="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MODULE="google-api-services-oauth2-v2-rev20200213-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-oauth2/v2-rev20200213-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MODULE="google-api-services-bigquery-v2-rev20201030-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-bigquery/v2-rev20201030-1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-1.38.0.jar" MODULE="google-http-client-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED="true" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED="true" />
|
||||
<IMPORT NAME="google-http-client-jackson2-1.38.0.jar" MODULE="google-http-client-jackson2-1.38.0.jar" MVN="mvn:com.google.http-client/google-http-client-jackson2/1.38.0" REQUIRED="true" />
|
||||
<IMPORT NAME="guava-20.0.jar" MODULE="guava-20.0.jar" MVN="mvn:com.google.guava/guava/20.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="jackson-core-2.13.2.jar" MODULE="jackson-core-2.13.2.jar"
|
||||
@@ -232,7 +232,7 @@
|
||||
<IMPORT NAME="opencensus-api-0.24.0" MODULE="opencensus-api-0.24.0.jar" MVN="mvn:io.opencensus/opencensus-api/0.24.0" REQUIRED="true" />
|
||||
<IMPORT NAME="opencensus-contrib-http-util-0.24.0" MODULE="opencensus-contrib-http-util-0.24.0.jar" MVN="mvn:io.opencensus/opencensus-contrib-http-util/0.24.0" REQUIRED="true" />
|
||||
<IMPORT NAME="grpc-context-1.22.1" MODULE="grpc-context-1.22.1.jar" MVN="mvn:io.grpc/grpc-context/1.22.1" REQUIRED="true" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="AUTH_MODE == 'SERVICEACCOUNT'" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="AUTH_MODE == 'SERVICEACCOUNT'" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS>
|
||||
|
||||
@@ -163,28 +163,30 @@ COMPATIBILITY="ALL"
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aopalliance-1_0" MODULE="aopalliance-1.0.jar" MVN="mvn:aopalliance/aopalliance/1.0" UrlPath="platform:/plugin/org.talend.libraries.esb/lib/aopalliance-1.0.jar" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aws-ec2-2_0_2" MODULE="aws-ec2-2.0.2.jar" MVN="mvn:org.talend.libraries/aws-ec2-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="commons-io-2.8.0" MODULE="commons-io-2.8.0.jar" MVN="mvn:commons-io/commons-io/2.8.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="ec2-2_0_2" MODULE="ec2-2.0.2.jar" MVN="mvn:org.talend.libraries/ec2-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="gson-2_2" MODULE="gson-2.2.jar" MVN="mvn:org.talend.libraries/gson-2.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guava-16.0.1" MODULE="guava-16.0.1.jar" MVN="mvn:com.google.guava/guava/16.0.1" UrlPath="platform:/plugin/org.talend.libraries.guava/lib/guava-16.0.1.jar" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-3_0" MODULE="guice-3.0.jar" MVN="mvn:com.google.inject/guice/3.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-assistedinject-3_0" MODULE="guice-assistedinject-3.0.jar" MVN="mvn:org.talend.libraries/guice-assistedinject-3.0/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax_inject-1" MODULE="javax.inject-1.jar" MVN="mvn:javax.inject/javax.inject/1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-bouncycastle-2_0_2" MODULE="jclouds-bouncycastle-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-bouncycastle-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-compute-2_0_2" MODULE="jclouds-compute-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-compute-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-core-2_0_2" MODULE="jclouds-core-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-core-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-scriptbuilder-2_0_2" MODULE="jclouds-scriptbuilder-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-scriptbuilder-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-slf4j-2_0_2" MODULE="jclouds-slf4j-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-slf4j-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-sshj-2_0_2" MODULE="jclouds-sshj-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-sshj-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr250-api-1_0" MODULE="jsr250-api-1.0.jar" MVN="mvn:org.talend.libraries/jsr250-api-1.0/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr311-api-1_1_1" MODULE="jsr311-api-1.1.1.jar" MVN="mvn:org.talend.libraries/jsr311-api-1.1.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="rocoto-6_1" MODULE="rocoto-6.1.jar" MVN="mvn:org.talend.libraries/rocoto-6.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="slf4j-api-1_7_2" MODULE="slf4j-api-1.7.2.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="sshj-0_8_1" MODULE="sshj-0.8.1.jar" MVN="mvn:org.talend.libraries/sshj-0.8.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
|
||||
<IMPORT NAME="sts-2.0.2" MODULE="sts-2.0.2.jar" MVN="mvn:org.talend.libraries/sts-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aws-ec2" MODULE="aws-ec2-2.5.0.jar" MVN="mvn:org.apache.jclouds.provider/aws-ec2/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="ec2" MODULE="ec2-2.5.0.jar" MVN="mvn:org.apache.jclouds.api/ec2/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="sts" MODULE="sts-2.5.0.jar" MVN="mvn:org.apache.jclouds.api/sts/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-core" MODULE="jclouds-core-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-core/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guava" MODULE="guava-30.0-jre.jar" MVN="mvn:com.google.guava/guava/30.0-jre" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="failureaccess" MODULE="failureaccess-1.0.1.jar" MVN="mvn:com.google.guava/failureaccess/1.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="listenablefuture" MODULE="listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" MVN="mvn:com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr305" MODULE="jsr305-3.0.2.jar" MVN="mvn:com.google.code.findbugs/jsr305/3.0.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="checker-qual" MODULE="checker-qual-2.5.2.jar" MVN="mvn:org.checkerframework/checker-qual/2.5.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="error_prone_annotations" MODULE="error_prone_annotations-2.2.0.jar" MVN="mvn:com.google.errorprone/error_prone_annotations/2.2.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="j2objc-annotations" MODULE="j2objc-annotations-1.1.jar" MVN="mvn:com.google.j2objc/j2objc-annotations/1.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="animal-sniffer-annotations" MODULE="animal-sniffer-annotations-1.17.jar" MVN="mvn:org.codehaus.mojo/animal-sniffer-annotations/1.17" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice" MODULE="guice-5.0.1.jar" MVN="mvn:com.google.inject/guice/5.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.inject" MODULE="javax.inject-1.jar" MVN="mvn:javax.inject/javax.inject/1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aopalliance" MODULE="aopalliance-1.0.jar" MVN="mvn:aopalliance/aopalliance/1.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-assistedinject" MODULE="guice-assistedinject-5.0.1.jar" MVN="mvn:com.google.inject.extensions/guice-assistedinject/5.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.ws.rs-api" MODULE="javax.ws.rs-api-2.0.1.jar" MVN="mvn:javax.ws.rs/javax.ws.rs-api/2.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.2.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jaxb-impl" MODULE="jaxb-impl-2.3.3.jar" MVN="mvn:com.sun.xml.bind/jaxb-impl/2.3.3" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jakarta.xml.bind-api" MODULE="jakarta.xml.bind-api-2.3.3.jar" MVN="mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.3" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jakarta.activation" MODULE="jakarta.activation-1.2.2.jar" MVN="mvn:com.sun.activation/jakarta.activation/1.2.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-compute" MODULE="jclouds-compute-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-compute/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-scriptbuilder" MODULE="jclouds-scriptbuilder-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-scriptbuilder/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jaxb-api-2.3.1" MODULE="jaxb-api-2.3.1.jar" MVN="mvn:javax.xml.bind/jaxb-api/2.3.1" REQUIRED="true"/>
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -72,28 +72,30 @@ COMPATIBILITY="ALL"
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aopalliance-1_0" MODULE="aopalliance-1.0.jar" MVN="mvn:aopalliance/aopalliance/1.0" UrlPath="platform:/plugin/org.talend.libraries.esb/lib/aopalliance-1.0.jar" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aws-ec2-2_0_2" MODULE="aws-ec2-2.0.2.jar" MVN="mvn:org.talend.libraries/aws-ec2-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="commons-io-2.8.0" MODULE="commons-io-2.8.0.jar" MVN="mvn:commons-io/commons-io/2.8.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="ec2-2_0_2" MODULE="ec2-2.0.2.jar" MVN="mvn:org.talend.libraries/ec2-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="gson-2_2" MODULE="gson-2.2.jar" MVN="mvn:org.talend.libraries/gson-2.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guava-16.0.1" MODULE="guava-16.0.1.jar" MVN="mvn:com.google.guava/guava/16.0.1" UrlPath="platform:/plugin/org.talend.libraries.guava/lib/guava-16.0.1.jar" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-3_0" MODULE="guice-3.0.jar" MVN="mvn:com.google.inject/guice/3.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-assistedinject-3_0" MODULE="guice-assistedinject-3.0.jar" MVN="mvn:org.talend.libraries/guice-assistedinject-3.0/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax_inject-1" MODULE="javax.inject-1.jar" MVN="mvn:javax.inject/javax.inject/1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-bouncycastle-2_0_2" MODULE="jclouds-bouncycastle-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-bouncycastle-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-compute-2_0_2" MODULE="jclouds-compute-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-compute-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-core-2_0_2" MODULE="jclouds-core-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-core-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-scriptbuilder-2_0_2" MODULE="jclouds-scriptbuilder-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-scriptbuilder-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-slf4j-2_0_2" MODULE="jclouds-slf4j-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-slf4j-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-sshj-2_0_2" MODULE="jclouds-sshj-2.0.2.jar" MVN="mvn:org.talend.libraries/jclouds-sshj-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr250-api-1_0" MODULE="jsr250-api-1.0.jar" MVN="mvn:org.talend.libraries/jsr250-api-1.0/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr311-api-1_1_1" MODULE="jsr311-api-1.1.1.jar" MVN="mvn:org.talend.libraries/jsr311-api-1.1.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="rocoto-6_1" MODULE="rocoto-6.1.jar" MVN="mvn:org.talend.libraries/rocoto-6.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="slf4j-api-1_7_2" MODULE="slf4j-api-1.7.2.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="sshj-0_8_1" MODULE="sshj-0.8.1.jar" MVN="mvn:org.talend.libraries/sshj-0.8.1/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
|
||||
<IMPORT NAME="sts-2.0.2" MODULE="sts-2.0.2.jar" MVN="mvn:org.talend.libraries/sts-2.0.2/6.0.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aws-ec2" MODULE="aws-ec2-2.5.0.jar" MVN="mvn:org.apache.jclouds.provider/aws-ec2/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="ec2" MODULE="ec2-2.5.0.jar" MVN="mvn:org.apache.jclouds.api/ec2/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="sts" MODULE="sts-2.5.0.jar" MVN="mvn:org.apache.jclouds.api/sts/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-core" MODULE="jclouds-core-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-core/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guava" MODULE="guava-30.0-jre.jar" MVN="mvn:com.google.guava/guava/30.0-jre" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="failureaccess" MODULE="failureaccess-1.0.1.jar" MVN="mvn:com.google.guava/failureaccess/1.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="listenablefuture" MODULE="listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" MVN="mvn:com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jsr305" MODULE="jsr305-3.0.2.jar" MVN="mvn:com.google.code.findbugs/jsr305/3.0.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="checker-qual" MODULE="checker-qual-2.5.2.jar" MVN="mvn:org.checkerframework/checker-qual/2.5.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="error_prone_annotations" MODULE="error_prone_annotations-2.2.0.jar" MVN="mvn:com.google.errorprone/error_prone_annotations/2.2.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="j2objc-annotations" MODULE="j2objc-annotations-1.1.jar" MVN="mvn:com.google.j2objc/j2objc-annotations/1.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="animal-sniffer-annotations" MODULE="animal-sniffer-annotations-1.17.jar" MVN="mvn:org.codehaus.mojo/animal-sniffer-annotations/1.17" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice" MODULE="guice-5.0.1.jar" MVN="mvn:com.google.inject/guice/5.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.inject" MODULE="javax.inject-1.jar" MVN="mvn:javax.inject/javax.inject/1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="aopalliance" MODULE="aopalliance-1.0.jar" MVN="mvn:aopalliance/aopalliance/1.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="guice-assistedinject" MODULE="guice-assistedinject-5.0.1.jar" MVN="mvn:com.google.inject.extensions/guice-assistedinject/5.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.ws.rs-api" MODULE="javax.ws.rs-api-2.0.1.jar" MVN="mvn:javax.ws.rs/javax.ws.rs-api/2.0.1" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.2.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jaxb-impl" MODULE="jaxb-impl-2.3.3.jar" MVN="mvn:com.sun.xml.bind/jaxb-impl/2.3.3" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jakarta.xml.bind-api" MODULE="jakarta.xml.bind-api-2.3.3.jar" MVN="mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.3" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jakarta.activation" MODULE="jakarta.activation-1.2.2.jar" MVN="mvn:com.sun.activation/jakarta.activation/1.2.2" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-compute" MODULE="jclouds-compute-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-compute/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jclouds-scriptbuilder" MODULE="jclouds-scriptbuilder-2.5.0.jar" MVN="mvn:org.apache.jclouds/jclouds-scriptbuilder/2.5.0" REQUIRED_IF="PROVIDER=='AWS_EC2'"/>
|
||||
<IMPORT NAME="jaxb-api-2.3.1" MODULE="jaxb-api-2.3.1.jar" MVN="mvn:javax.xml.bind/jaxb-api/2.3.1" REQUIRED="true"/>
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
}
|
||||
%>
|
||||
|
||||
resumeUtil.addLog("NODE", "NODE:<%=cid %>", "", Thread.currentThread().getId() + "", "","","","",resumeUtil.convertToJsonText(context,parametersToEncrypt_<%=cid%>));
|
||||
resumeUtil.addLog("NODE", "NODE:<%=cid %>", "", Thread.currentThread().getId() + "", "","","","",resumeUtil.convertToJsonText(context,ContextProperties.class,parametersToEncrypt_<%=cid%>));
|
||||
<%if(isLog4jEnabled){%>
|
||||
log.info("<%=cid%> - Loaded contexts count: " + nb_line_<%=cid %> + ".");
|
||||
<%}%>
|
||||
|
||||
@@ -95,7 +95,8 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
for (IContextParameter ctxParam: params) {
|
||||
if ("id_Password".equals(ctxParam.getType()) ) {
|
||||
%>
|
||||
if ((key_<%=cid %> != null) && ("<%=ctxParam.getName()%>".equals(key_<%=cid %>)) ) currentValue_<%=cid %> = currentValue_<%=cid %>.replaceAll(".", "*");
|
||||
if ((key_<%=cid %> != null) && ("<%=ctxParam.getName()%>".equals(key_<%=cid %>)) && (currentValue_<%=cid %> != null))
|
||||
currentValue_<%=cid %> = currentValue_<%=cid %>.replaceAll(".", "*");
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -863,11 +863,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP') AND (MSSQL_ACTIVE_DIR_AUTH == 'true')" />
|
||||
<IMPORT NAME="Driver-MYSQL5" MODULE="mysql-connector-java-5.1.49.jar" MVN="mvn:mysql/mysql-connector-java/5.1.49" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') and (DBTYPE=='MYSQL') and (DB_MYSQL_VERSION=='MYSQL_5')"/>
|
||||
<IMPORT NAME="Driver-MYSQL8" MODULE="mysql-connector-java-8.0.18.jar" MVN="mvn:mysql/mysql-connector-java/8.0.18" REQUIRED_IF="(DB_MYSQL_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MYSQL')" />
|
||||
@@ -879,7 +879,7 @@
|
||||
<IMPORT NAME="Driver-Oracle12c" MODULE="ojdbc7.jar" MVN="mvn:org.talend.libraries/ojdbc7/6.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_12') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="ORACLE_18" MODULE="ojdbc8-19.3.0.0.jar" MVN="mvn:com.oracle.ojdbc/ojdbc8/19.3.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_18') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-POSTGRESQL" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='PRIOR_TO_V9')) or (DBTYPE=='GREENPLUM'))" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='V9_X'))" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='V9_X'))" />
|
||||
<IMPORT NAME="Driver-FIREBIRD" MODULE="jaybird-full-2.1.1.jar" MVN="mvn:org.talend.libraries/jaybird-full-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.firebird/lib/jaybird-full-2.1.1.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='FIREBIRD')" />
|
||||
<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="DBTYPE=='HSQLDB'"/>
|
||||
<IMPORT NAME="Driver-INFORMIX-JDBC" MODULE="ifxjdbc.jar" MVN="mvn:org.talend.libraries/ifxjdbc/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='INFORMIX')" />
|
||||
|
||||
@@ -175,8 +175,8 @@ while(<%=inputColumn%>_iterator_<%=cid %>.hasNext()){
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
denormalize_row_<%=cid %>.<%=inputColumn %> = sb_<%=cid %>.toString();
|
||||
if (sb_<%=cid %> != null)
|
||||
denormalize_row_<%=cid %>.<%=inputColumn %> = sb_<%=cid %>.toString();
|
||||
|
||||
sb_<%=cid %> = null;
|
||||
|
||||
|
||||
@@ -197,11 +197,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="DB_VERSION =='V9_X'" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="DB_VERSION =='V9_X'" />
|
||||
<IMPORT NAME="Driver-Postgres" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="DB_VERSION =='PRIOR_TO_V9'" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="JavaMail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(MAIL_TYPE == 'MIME')" />
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED_IF="(MAIL_TYPE == 'MIME')" />
|
||||
<IMPORT NAME="JAF" MODULE="activation.jar" MVN="mvn:org.talend.libraries/activation/6.0.0" REQUIRED_IF="(MAIL_TYPE == 'MIME')" />
|
||||
|
||||
<IMPORT NAME="poi" MODULE="poi-4.1.2-20200903124306_modified_talend.jar" MVN="mvn:org.apache.poi/poi/4.1.2-20200903124306_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-4.1.2-20200903124306_modified_talend.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
|
||||
@@ -82,7 +82,7 @@ class IgnoreDTDEntityResolver_<%=cid%> implements org.xml.sax.EntityResolver {
|
||||
// *** Xerces *** //
|
||||
if(("Xerces").equals(mode)){
|
||||
%>
|
||||
class TalendPrefixResolver_<%=cid%> implements org.apache.xml.utils.PrefixResolver {
|
||||
class TalendPrefixResolver_<%=cid%> {
|
||||
|
||||
private java.util.Map<String, String> map = new java.util.HashMap<String, String>();
|
||||
|
||||
@@ -92,26 +92,14 @@ class TalendPrefixResolver_<%=cid%> implements org.apache.xml.utils.PrefixResolv
|
||||
return defualtNSPath;
|
||||
}
|
||||
|
||||
public String getBaseIdentifier() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getNamespaceForPrefix(String prefix) {
|
||||
public String getNamespaceURI(String prefix) {
|
||||
if (("xml").equals(prefix)) {
|
||||
return org.apache.xml.utils.Constants.S_XMLNAMESPACEURI;
|
||||
return "http://www.w3.org/XML/1998/namespace";
|
||||
} else {
|
||||
return map.get(prefix);
|
||||
}
|
||||
}
|
||||
|
||||
public String getNamespaceForPrefix(String prefix, org.w3c.dom.Node context) {
|
||||
return getNamespaceForPrefix(prefix);
|
||||
}
|
||||
|
||||
public boolean handlesNullPrefixes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean countNSMap(org.w3c.dom.Node el) {
|
||||
boolean hasDefaultPrefix = false;
|
||||
if (el.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
|
||||
@@ -149,9 +137,10 @@ class TalendPrefixResolver_<%=cid%> implements org.apache.xml.utils.PrefixResolv
|
||||
|
||||
class XML_API_<%=cid%>{
|
||||
|
||||
javax.xml.xpath.XPath xpathEvaluator = new net.sf.saxon.xpath.XPathFactoryImpl().newXPath();
|
||||
|
||||
String loopPath = null;
|
||||
boolean hasDefaultNS = false;
|
||||
TalendPrefixResolver_<%=cid%> pr = null;
|
||||
|
||||
public boolean isDefNull(org.w3c.dom.Node node) throws javax.xml.transform.TransformerException {
|
||||
if (node != null && node.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
|
||||
@@ -171,40 +160,48 @@ class XML_API_<%=cid%>{
|
||||
return false;
|
||||
}
|
||||
|
||||
private final org.talend.xpath.XPathUtil util = new org.talend.xpath.XPathUtil();
|
||||
private final org.talend.xpath.XPathUtil util = new org.talend.xpath.XPathUtil();
|
||||
|
||||
public void initXPath(org.w3c.dom.Node root){
|
||||
pr= new TalendPrefixResolver_<%=cid%>();
|
||||
hasDefaultNS = pr.countNSMap(root);
|
||||
util.setDefaultNSPath(pr.getDefualtNSPath());
|
||||
}
|
||||
public void initXPath(org.w3c.dom.Node root){
|
||||
final TalendPrefixResolver_<%=cid%> pr = new TalendPrefixResolver_<%=cid%>();
|
||||
hasDefaultNS = pr.countNSMap(root);
|
||||
util.setDefaultNSPath(pr.getDefualtNSPath());
|
||||
|
||||
xpathEvaluator.setNamespaceContext(new javax.xml.namespace.NamespaceContext() {
|
||||
@Override
|
||||
public String getNamespaceURI(String prefix) {
|
||||
return pr.getNamespaceURI(prefix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix(String namespaceURI) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Iterator getPrefixes(String namespaceURI) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//==============add for feature 10753 start================================
|
||||
org.apache.xpath.objects.XObject obj = null;
|
||||
|
||||
public int getNodeType(org.w3c.dom.Node node, String xpath) throws javax.xml.transform.TransformerException{
|
||||
obj = org.apache.xpath.XPathAPI.eval(node, util.addDefaultNSPrefix(xpath,loopPath), pr);
|
||||
return obj.getType();
|
||||
}
|
||||
|
||||
public String getNodeString(org.w3c.dom.Node node, String xpath) throws javax.xml.transform.TransformerException{
|
||||
if(obj==null){
|
||||
obj = org.apache.xpath.XPathAPI.eval(node, util.addDefaultNSPrefix(xpath,loopPath), pr);
|
||||
}
|
||||
return obj.str();
|
||||
public String getNodeString(org.w3c.dom.Node node, String xpath) throws javax.xml.xpath.XPathExpressionException {
|
||||
javax.xml.xpath.XPathExpression expression = xpathEvaluator.compile(util.addDefaultNSPrefix(xpath,loopPath));
|
||||
return expression.evaluate(node);
|
||||
}
|
||||
|
||||
public org.w3c.dom.Node getSingleNode(org.w3c.dom.Node node, String xpath) throws javax.xml.transform.TransformerException {
|
||||
if(obj==null){
|
||||
obj = org.apache.xpath.XPathAPI.eval(node, util.addDefaultNSPrefix(xpath,loopPath), pr);
|
||||
}
|
||||
return obj.nodelist().item(0);
|
||||
public org.w3c.dom.Node getSingleNode(org.w3c.dom.Node node, String xpath) throws javax.xml.xpath.XPathExpressionException {
|
||||
javax.xml.xpath.XPathExpression expression = xpathEvaluator.compile(util.addDefaultNSPrefix(xpath,loopPath));
|
||||
Object result = expression.evaluate(node, javax.xml.xpath.XPathConstants.NODESET);
|
||||
return org.w3c.dom.NodeList.class.cast(result).item(0);
|
||||
}
|
||||
//=====================end=================================================
|
||||
|
||||
public org.w3c.dom.NodeList getNodeList(org.w3c.dom.Node node, String xpath) throws javax.xml.transform.TransformerException {
|
||||
org.apache.xpath.objects.XObject obj = org.apache.xpath.XPathAPI.eval(node, util.addDefaultNSPrefix(xpath), pr);
|
||||
return obj.nodelist();
|
||||
public org.w3c.dom.NodeList getNodeList(org.w3c.dom.Node node, String xpath) throws javax.xml.xpath.XPathExpressionException {
|
||||
javax.xml.xpath.XPathExpression expression = xpathEvaluator.compile(util.addDefaultNSPrefix(xpath));
|
||||
Object result = expression.evaluate(node, javax.xml.xpath.XPathConstants.NODESET);
|
||||
return org.w3c.dom.NodeList.class.cast(result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -813,7 +810,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
String nodeCheck = mapping.get(i).get("NODECHECK");
|
||||
if(("Xerces").equals(mode)){
|
||||
%>
|
||||
if(xml_api_<%=cid%>.getNodeType(tmp_<%=cid %>,<%=query%>)==org.apache.xpath.objects.XObject.CLASS_NODESET){
|
||||
try {
|
||||
node_<%=cid%> = xml_api_<%=cid%>.getSingleNode(tmp_<%=cid %>,<%=query%>);
|
||||
<%
|
||||
if("true".equals(useSeparator)){
|
||||
@@ -830,7 +827,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}else{
|
||||
} catch (javax.xml.xpath.XPathExpressionException xee) {
|
||||
node_<%=cid %> = tmp_<%=cid %>;
|
||||
str_<%=cid %> = xml_api_<%=cid%>.getNodeString(tmp_<%=cid %>,<%=query%>);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
REQUIRED_IF="(GENERATION_MODE == 'XERCES') OR (GENERATION_MODE == 'SAX')" BundleID="" />
|
||||
<IMPORT NAME="xml-apis-1.4.01" MODULE="xml-apis-1.4.01.jar" MVN="mvn:xml-apis/xml-apis/1.4.01"
|
||||
REQUIRED_IF="(GENERATION_MODE == 'XERCES') OR (GENERATION_MODE == 'SAX')" BundleID="" />
|
||||
<IMPORT NAME="Java_xalan" MODULE="xalan-2.7.2.jar" MVN="mvn:xalan/xalan/2.7.2" REQUIRED_IF="GENERATION_MODE == 'XERCES'" BundleID="" />
|
||||
<IMPORT NAME="SAXON-HE" MODULE="Saxon-HE-10.6.jar" MVN="mvn:net.sf.saxon/Saxon-HE/10.6" REQUIRED_IF="GENERATION_MODE == 'XERCES'" BundleID="" />
|
||||
<IMPORT NAME="Java_talendSAX" MODULE="TalendSAX-1.0.1-20190326.jar" MVN="mvn:org.talend.libraries/TalendSAX/1.0.1-20190326" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/TalendSAX-1.0.1-20190326.jar"
|
||||
REQUIRED_IF="GENERATION_MODE == 'SAX'" />
|
||||
<IMPORT NAME="xpathutil" MODULE="xpathutil-1.0.0.jar" MVN="mvn:org.talend.libraries/xpathutil-1.0.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xpathutil-1.0.0.jar"
|
||||
|
||||
@@ -250,9 +250,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -168,9 +168,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -169,9 +169,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -173,9 +173,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -120,9 +120,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN')" />
|
||||
|
||||
@@ -246,9 +246,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -239,9 +239,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -277,9 +277,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -239,9 +239,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -223,9 +223,9 @@
|
||||
<!-- Transitive dependencies of google-cloud-storage -->
|
||||
<IMPORT NAME="google-cloud-core-1.93.4.jar" MODULE="google-cloud-core-1.93.4.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.93.4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-client-1.31.1.jar" MODULE="google-api-client-1.31.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.31.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.31.0.jar" MODULE="google-oauth-client-1.31.0.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar" MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="google-api-services-storage-v1-rev20201112-1.31.0" MODULE="google-api-services-storage-v1-rev20201112-1.31.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20201112-1.31.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.6" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gson-2.8.9" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="api-common-1.6.0" MODULE="api-common-1.6.0.jar" MVN="mvn:com.google.api/api-common/1.6.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="javax.annotation-api" MODULE="javax.annotation-api-1.3.jar" MVN="mvn:javax.annotation/javax.annotation-api/1.3" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
<IMPORT NAME="gax-1.27.0" MODULE="gax-1.27.0.jar" MVN="mvn:com.google.api/gax/1.27.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((AUTH_TYPE == 'SERVICE_ACCOUNT') OR (AUTH_TYPE == 'TOKEN'))" />
|
||||
|
||||
@@ -391,20 +391,20 @@
|
||||
MODULE="google-http-client-jackson2-1.30.1.jar" MVN="mvn:com.google.http-client/google-http-client-jackson2/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-protobuf"
|
||||
MODULE="google-http-client-protobuf-1.30.2.jar" MVN="mvn:com.google.http-client/google-http-client-protobuf/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client"
|
||||
MODULE="google-oauth-client-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-1.33.3.jar"
|
||||
MODULE="google-oauth-client-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.33.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-appengine"
|
||||
MODULE="google-oauth-client-appengine-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-appengine/1.30.1" REQUIRED="true"/>
|
||||
MODULE="google-oauth-client-appengine-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-appengine/1.33.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-java6"
|
||||
MODULE="google-oauth-client-java6-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-java6/1.30.1" REQUIRED="true"/>
|
||||
MODULE="google-oauth-client-java6-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-java6/1.33.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-jetty"
|
||||
MODULE="google-oauth-client-jetty-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-jetty/1.30.1" REQUIRED="true"/>
|
||||
MODULE="google-oauth-client-jetty-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-jetty/1.33.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-servlet"
|
||||
MODULE="google-oauth-client-servlet-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-servlet/1.30.1" REQUIRED="true"/>
|
||||
MODULE="google-oauth-client-servlet-1.33.3.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-servlet/1.33.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="grpc-context"
|
||||
MODULE="grpc-context-1.19.0.jar" MVN="mvn:io.grpc/grpc-context/1.19.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="gson"
|
||||
MODULE="gson-2.8.5.jar" MVN="mvn:com.google.code.gson/gson/2.8.5" REQUIRED="true"/>
|
||||
MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED="true"/>
|
||||
<IMPORT NAME="json"
|
||||
MODULE="json-20170516.jar" MVN="mvn:org.json/json/20170516" REQUIRED="true"/>
|
||||
<IMPORT NAME="guava"
|
||||
|
||||
@@ -24,6 +24,7 @@ String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
boolean convertToUppercase = false; // not active this function
|
||||
String dbDriver = ElementParameterParser.getValue(node, "__DB_DRIVER__");
|
||||
boolean useExistingConnection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String dbproperties = ElementParameterParser.getValue(node, "__PROPERTIES__");
|
||||
%>
|
||||
String tableName_<%=cid%> = null;
|
||||
String dbschema_<%=cid%> = null;
|
||||
@@ -124,12 +125,22 @@ if(useExistingConnection) {
|
||||
log4jCodeGenerateUtil.useExistConnection(node);
|
||||
} else {
|
||||
%>
|
||||
String dbProperties_<%=cid%> = <%=dbproperties%>;
|
||||
|
||||
<%if (dbDriver.equals("POSTGRESQL")){%>
|
||||
String driverClass_<%=cid%> = "org.postgresql.Driver";
|
||||
String url_<%=cid %> = "jdbc:postgresql://" + <%=host%> + ":" + <%=port%> + "/" + <%=dbName%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + "?" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%} else {%>
|
||||
String driverClass_<%=cid%> = "com.pivotal.jdbc.GreenplumDriver";
|
||||
String url_<%=cid %> = "jdbc:pivotal:greenplum://"+<%=host%>+":"+<%=port%>+";DatabaseName="+<%=dbName%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + ";" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%}%>
|
||||
java.lang.Class.forName(driverClass_<%=cid%>).newInstance();
|
||||
String dbUser_<%=cid%> = <%=userName%>;
|
||||
|
||||
@@ -124,6 +124,16 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
|
||||
@@ -58,4 +58,5 @@ CONNECTION.NAME=Component List
|
||||
|
||||
DB_DRIVER.NAME=DB driver
|
||||
DB_DRIVER.ITEM.POSTGRESQL=PostgreSQL (Deprecated)
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -20,10 +20,21 @@ imports="
|
||||
|
||||
public void setURL(INode node) {
|
||||
dbDriver = ElementParameterParser.getValue(node, "__DB_DRIVER__");
|
||||
if (dbDriver.equals("POSTGRESQL")){%>
|
||||
%>
|
||||
String dbProperties_<%=cid%> = <%=dbproperties%>;
|
||||
|
||||
<%if (dbDriver.equals("POSTGRESQL")){%>
|
||||
String url_<%=cid %> = "jdbc:postgresql://" + <%=dbhost%> + ":" + <%=dbport%> + "/" + <%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + "?" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%} else {%>
|
||||
String url_<%=cid %> = "jdbc:pivotal:greenplum://"+<%=dbhost%>+":"+<%=dbport%>+";DatabaseName="+<%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + ";" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,16 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
|
||||
@@ -40,4 +40,5 @@ GUESS_SCHEMA.NAME=Guess Schema
|
||||
MAPPING.NAME=Mapping
|
||||
DB_DRIVER.NAME=DB driver
|
||||
DB_DRIVER.ITEM.POSTGRESQL=PostgreSQL (Deprecated)
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -62,6 +62,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
String batchSize = ElementParameterParser.getValue(node, "__BATCH_SIZE__");
|
||||
|
||||
String dbDriver = ElementParameterParser.getValue(node, "__DB_DRIVER__");
|
||||
|
||||
String dbproperties = ElementParameterParser.getValue(node, "__PROPERTIES__");
|
||||
|
||||
String rejectConnName = null;
|
||||
List<? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
|
||||
@@ -148,12 +150,23 @@ if(("true").equals(useExistingConn)) {
|
||||
<%dbLog.conn().useExistConn("conn_"+cid+".getMetaData().getURL()", "conn_"+cid+".getMetaData().getUserName()");%>
|
||||
<%
|
||||
} else {
|
||||
if (dbDriver.equals("POSTGRESQL")){%>
|
||||
%>
|
||||
String dbProperties_<%=cid%> = <%=dbproperties%>;
|
||||
|
||||
<%if (dbDriver.equals("POSTGRESQL")){%>
|
||||
String driverClass_<%=cid%> = "org.postgresql.Driver";
|
||||
String url_<%=cid %> = "jdbc:postgresql://" + <%=dbhost%> + ":" + <%=dbport%> + "/" + <%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + "?" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%} else {%>
|
||||
String driverClass_<%=cid%> = "com.pivotal.jdbc.GreenplumDriver";
|
||||
String url_<%=cid %> = "jdbc:pivotal:greenplum://"+<%=dbhost%>+":"+<%=dbport%>+";DatabaseName="+ <%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + ";" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%}
|
||||
|
||||
dbLog.conn().logJDBCDriver(dbLog.var("driverClass"));%>
|
||||
|
||||
@@ -219,6 +219,16 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="USE_ALTERNATE_SCHEMA"
|
||||
FIELD="CHECK"
|
||||
|
||||
@@ -89,4 +89,5 @@ DB_DRIVER.NAME=DB driver
|
||||
DB_DRIVER.ITEM.POSTGRESQL=PostgreSQL (Deprecated)
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
USE_ALTERNATE_SCHEMA.NAME=Use alternate schema
|
||||
ALTERNATE_SCHEMA.NAME=Schema
|
||||
ALTERNATE_SCHEMA.NAME=Schema
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -165,6 +165,15 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
@@ -328,6 +337,7 @@
|
||||
<TEMPLATE_PARAM SOURCE="self.SCHEMA" TARGET="tPOB.SCHEMA" />
|
||||
<TEMPLATE_PARAM SOURCE="self.MAPPING" TARGET="tPBE.MAPPING" />
|
||||
<TEMPLATE_PARAM SOURCE="self.DB_DRIVER" TARGET="tPBE.DRIVER_IF_GREENPLUM" />
|
||||
<TEMPLATE_PARAM SOURCE="self.PROPERTIES" TARGET="tPBE.PROPERTIES" />
|
||||
|
||||
</TEMPLATES>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -52,4 +52,5 @@ MAPPING.NAME=Mapping
|
||||
|
||||
DB_DRIVER.NAME=DB driver
|
||||
DB_DRIVER.ITEM.POSTGRESQL=PostgreSQL (Deprecated)
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -19,10 +19,21 @@ imports="
|
||||
|
||||
public void setURL(INode node) {
|
||||
dbDriver = ElementParameterParser.getValue(node, "__DB_DRIVER__");
|
||||
if (dbDriver.equals("POSTGRESQL")){%>
|
||||
%>
|
||||
String dbProperties_<%=cid%> = <%=dbproperties%>;
|
||||
|
||||
<%if (dbDriver.equals("POSTGRESQL")){%>
|
||||
String url_<%=cid %> = "jdbc:postgresql://" + <%=dbhost%> + ":" + <%=dbport%> + "/" + <%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + "?" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%} else {%>
|
||||
String url_<%=cid %> = "jdbc:pivotal:greenplum://"+<%=dbhost%>+":"+<%=dbport%>+";DatabaseName="+<%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
url_<%=cid %> = url_<%=cid%> + ";" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%}
|
||||
}
|
||||
|
||||
|
||||
@@ -194,6 +194,16 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
|
||||
@@ -62,4 +62,5 @@ SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Short=Short
|
||||
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.String=String
|
||||
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Time=Time
|
||||
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_TYPE.ITEM.Null=Null
|
||||
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=Parameter Value
|
||||
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_VALUE=Parameter Value
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -46,6 +46,7 @@ if(inputSchema != null && inputSchema.size() > 0 && outputSchema != null && outp
|
||||
boolean useExistingConnection = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
boolean isEnableSaveMemMode = ("true").equals(ElementParameterParser.getValue(node, "__USE_SAVE_MEM_MODE__"));
|
||||
boolean isSourceKeyIncNull = ("true").equals(ElementParameterParser.getValue(node, "__SOURCE_KEY_INC_NULL__"));
|
||||
String dbproperties = ElementParameterParser.getValue(node, "__PROPERTIES__");
|
||||
String dbType = POSTGRESQL;
|
||||
SCDConfiger scdConfiger = getSCDConfiger(node);
|
||||
SCDManager scdManager = getSCDManager(cid, dbType);
|
||||
@@ -72,13 +73,22 @@ if(inputSchema != null && inputSchema.size() > 0 && outputSchema != null && outp
|
||||
} else {
|
||||
%>
|
||||
String dbSchema_<%=cid%> = <%=ElementParameterParser.getValue(node, "__SCHEMA_DB__")%>;
|
||||
|
||||
String dbProperties_<%=cid%> = <%=dbproperties%>;
|
||||
|
||||
<%if (dbDriver.equals("POSTGRESQL")){%>
|
||||
String driverClass_<%=cid%> = "org.postgresql.Driver";
|
||||
String connectionString_<%=cid %> = "jdbc:postgresql://" + <%=dbhost%> + ":" + <%=dbport%> + "/" + <%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
connectionString_<%=cid %> = connectionString_<%=cid%> + "?" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%} else {%>
|
||||
String driverClass_<%=cid%> = "com.pivotal.jdbc.GreenplumDriver";
|
||||
String connectionString_<%=cid %> = "jdbc:pivotal:greenplum://"+<%=dbhost%>+":"+<%=dbport%>+";DatabaseName="+<%=dbname%>;
|
||||
|
||||
if(dbProperties_<%=cid%> != null && !"".equals(dbProperties_<%=cid%>.trim())) {
|
||||
connectionString_<%=cid %> = connectionString_<%=cid%> + ";" + dbProperties_<%=cid%>;
|
||||
}
|
||||
<%}
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
@@ -470,6 +470,16 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="PROPERTIES"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
REPOSITORY_VALUE="PROPERTIES_STRING"
|
||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="DB_DRIVER"
|
||||
FIELD="CLOSED_LIST"
|
||||
|
||||
@@ -70,4 +70,5 @@ REJECT.MENU=Rejects
|
||||
|
||||
DB_DRIVER.NAME=DB driver
|
||||
DB_DRIVER.ITEM.POSTGRESQL=PostgreSQL (Deprecated)
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
DB_DRIVER.ITEM.GREENPLUM=Greenplum
|
||||
PROPERTIES.NAME=Additional JDBC Parameters
|
||||
|
||||
@@ -409,11 +409,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -209,11 +209,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -283,11 +283,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -377,11 +377,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -341,11 +341,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -523,11 +523,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -263,11 +263,11 @@
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.7.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.9.jar" MVN="mvn:com.google.code.gson/gson/2.8.9" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.4.7.jar" MVN="mvn:net.minidev/json-smart/2.4.7" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (DRIVER=='MSSQL_PROP') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -95,7 +95,7 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
|
||||
else{
|
||||
%>
|
||||
org.talend.ms.crm.odata.ClientConfiguration clientConfig_<%=cid%> = org.talend.ms.crm.odata.ClientConfigurationFactory
|
||||
.buildOAuthPremiseClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=authority%>, <%=serviceURL%>,<%=applicationId%>, <%=redirectUrl%>, <%=oauth_resource%>);
|
||||
.buildOAuthPremiseClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=authority%>, <%=serviceURL%>,<%=applicationId%>, <%=clientSecret%>, <%=redirectUrl%>, <%=oauth_resource%>);
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<DEFAULT>"51f81489-12ee-4a9e-aaae-a2591f45987d"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CLIENT_SECRET" FIELD="TEXT" NUM_ROW="30" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA') AND (ONLINE_REGISTERED_APP != 'NATIVE')">
|
||||
<PARAMETER NAME="CLIENT_SECRET" FIELD="TEXT" NUM_ROW="30" REQUIRED="false" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA') AND (ONLINE_REGISTERED_APP != 'NATIVE')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -27541,7 +27541,7 @@
|
||||
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="httpcore" MODULE="httpcore-4.2.1.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.2.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
@@ -27558,7 +27558,7 @@
|
||||
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
|
||||
<!-- 2011 -->
|
||||
<!-- crm client -->
|
||||
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10-20211021.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10-20211021" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.2-20220831.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.2-20220831" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<!-- axis2 1.7.4 -->
|
||||
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
@@ -27779,9 +27779,9 @@
|
||||
MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.3"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="xmlsec-2.1.2"
|
||||
MODULE="xmlsec-2.1.2.jar"
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.1.2"
|
||||
NAME="xmlsec-2.3.1"
|
||||
MODULE="xmlsec-2.3.1.jar"
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.3.1"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="Java_DOM4J2"
|
||||
@@ -27824,9 +27824,9 @@
|
||||
MVN="mvn:org.apache.commons/commons-lang3/3.10"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="gson-2.8.6"
|
||||
MODULE="gson-2.8.6.jar"
|
||||
MVN="mvn:com.google.code.gson/gson/2.8.6"
|
||||
NAME="gson-2.8.9"
|
||||
MODULE="gson-2.8.9.jar"
|
||||
MVN="mvn:com.google.code.gson/gson/2.8.9"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="commons-logging"
|
||||
@@ -27869,15 +27869,12 @@
|
||||
MODULE="accessors-smart-2.4.7.jar"
|
||||
MVN="mvn:net.minidev/accessors-smart/2.4.7"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="javax.mail"
|
||||
MODULE="javax.mail-1.6.2.jar"
|
||||
MVN="mvn:com.sun.mail/javax.mail/1.6.2"
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="nimbus-jose-jwt"
|
||||
MODULE="nimbus-jose-jwt-8.11.jar"
|
||||
MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11"
|
||||
MODULE="nimbus-jose-jwt-9.22.jar"
|
||||
MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="oauth2-oidc-sdk"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
else {
|
||||
%>
|
||||
org.talend.ms.crm.odata.ClientConfiguration clientConfig_<%=cid%> = org.talend.ms.crm.odata.ClientConfigurationFactory
|
||||
.buildOAuthPremiseClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=authority%>, <%=serviceURL%>,<%=applicationId%>, <%=redirectUrl%>, <%=oauth_resource%>);
|
||||
.buildOAuthPremiseClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=authority%>, <%=serviceURL%>,<%=applicationId%>, <%=clientSecret%>, <%=redirectUrl%>, <%=oauth_resource%>);
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<DEFAULT>"51f81489-12ee-4a9e-aaae-a2591f45987d"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CLIENT_SECRET" FIELD="TEXT" NUM_ROW="40" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA') AND (ONLINE_REGISTERED_APP != 'NATIVE')">
|
||||
<PARAMETER NAME="CLIENT_SECRET" FIELD="TEXT" NUM_ROW="40" REQUIRED="false" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA') AND (ONLINE_REGISTERED_APP != 'NATIVE')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -38300,7 +38300,7 @@
|
||||
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="httpcore" MODULE="httpcore-4.2.1.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.2.1" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
|
||||
@@ -38317,7 +38317,7 @@
|
||||
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
|
||||
<!-- 2011 -->
|
||||
<!-- crm client -->
|
||||
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10-20211021.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10-20211021" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT NAME="talend-mscrm" MODULE="talend-mscrm-3.10.2-20220831.jar" MVN="mvn:org.talend.components/talend-mscrm/3.10.2-20220831" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<!-- axis2 1.7.4 -->
|
||||
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
@@ -38538,9 +38538,9 @@
|
||||
MVN="mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.3"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="xmlsec-2.1.2"
|
||||
MODULE="xmlsec-2.1.2.jar"
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.1.2"
|
||||
NAME="xmlsec-2.3.1"
|
||||
MODULE="xmlsec-2.3.1.jar"
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.3.1"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="Java_DOM4J2"
|
||||
@@ -38590,8 +38590,8 @@
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="gson"
|
||||
MODULE="gson-2.8.6.jar"
|
||||
MVN="mvn:com.google.code.gson/gson/2.8.6"
|
||||
MODULE="gson-2.8.9.jar"
|
||||
MVN="mvn:com.google.code.gson/gson/2.8.9"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="commons-logging"
|
||||
@@ -38634,15 +38634,12 @@
|
||||
MODULE="accessors-smart-2.4.7.jar"
|
||||
MVN="mvn:net.minidev/accessors-smart/2.4.7"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="javax.mail"
|
||||
MODULE="javax.mail-1.6.2.jar"
|
||||
MVN="mvn:com.sun.mail/javax.mail/1.6.2"
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="nimbus-jose-jwt"
|
||||
MODULE="nimbus-jose-jwt-8.11.jar"
|
||||
MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11"
|
||||
MODULE="nimbus-jose-jwt-9.22.jar"
|
||||
MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="oauth2-oidc-sdk"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<ADVANCED_PARAMETERS/>
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT MODULE="MsmqTalend-1.0.0.jar" MVN="mvn:org.talend.libraries/MsmqTalend-1.0.0/6.0.1" NAME="MsmqTalend" REQUIRED="true"/>
|
||||
<IMPORT MODULE="MsmqTalend-1.0.5.jar" MVN="mvn:org.talend.libraries/MsmqTalend-1.0.5/6.0.0" NAME="MsmqTalend" REQUIRED="true"/>
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS/>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<ADVANCED_PARAMETERS/>
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT MODULE="MsmqTalend-1.0.0.jar" MVN="mvn:org.talend.libraries/MsmqTalend-1.0.0/6.0.1" NAME="MsmqTalend" REQUIRED="true"/>
|
||||
<IMPORT MODULE="MsmqTalend-1.0.5.jar" MVN="mvn:org.talend.libraries/MsmqTalend-1.0.5/6.0.0" NAME="MsmqTalend" REQUIRED="true"/>
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS/>
|
||||
|
||||
@@ -159,10 +159,10 @@ if(("UPDATE").equals(dataAction)) {
|
||||
log.info("<%=cid%> - Create temp table " + tableName_<%=cid%> + " has succeeded.");
|
||||
log.info("<%=cid%> - Bulk inserting data into " + tableName_<%=cid%> + "." );
|
||||
<%}%>
|
||||
stmtTmpBulk_<%=cid %>.execute("SET character_set_database=" + charset_<%=cid %>);
|
||||
stmtTmpBulk_<%=cid %>.execute(
|
||||
"LOAD DATA LOCAL INFILE '" + file_<%=cid %> + "' "
|
||||
+ " INTO TABLE " + tableName_<%=cid %>
|
||||
+ " CHARACTER SET " + charset_<%=cid %>
|
||||
+ " FIELDS TERMINATED BY '" + field_separator_<%=cid %>.replaceAll("\\\\", "\\\\\\\\") + "'"
|
||||
+ " ENCLOSED BY '"+("'".equals(enclosed_str_<%=cid %>)?"\\":"")+ enclosed_str_<%=cid %>.replaceAll("\\\\", "\\\\\\\\") + "'"
|
||||
+ " ESCAPED BY '" +("'".equals(escaped_str_<%=cid %>)?"\\":"")+ escaped_str_<%=cid %>.replaceAll("\\\\", "\\\\\\\\")+ "'"
|
||||
@@ -237,6 +237,7 @@ if(("UPDATE").equals(dataAction)) {
|
||||
String bulkSQL_<%=cid%> = "LOAD DATA LOCAL INFILE '" + file_<%=cid %> + "' "
|
||||
+ replace_<%=cid%>
|
||||
+ " INTO TABLE " + tableName_<%=cid %>
|
||||
+ " CHARACTER SET " + charset_<%=cid %>
|
||||
+ " FIELDS TERMINATED BY '" + field_separator_<%=cid %>.replaceAll("\\\\", "\\\\\\\\") + "'"
|
||||
+ " ENCLOSED BY '"+("'".equals(enclosed_str_<%=cid %>)?"\\":"") + enclosed_str_<%=cid %>.replaceAll("\\\\", "\\\\\\\\") + "'"
|
||||
+ " ESCAPED BY '" + ("'".equals(escaped_str_<%=cid %>)?"\\":"")+ escaped_str_<%=cid %>.replaceAll("\\\\", "\\\\\\\\") + "'"
|
||||
@@ -261,7 +262,6 @@ if(("UPDATE").equals(dataAction)) {
|
||||
%>;
|
||||
<%log4jCodeGenerateUtil.logInfo(node,"debug",cid+" - Bulk SQL:\"+bulkSQL_"+cid+"+\".");%>
|
||||
java.sql.Statement stmt_<%=cid %>=conn_<%=cid %>.createStatement();
|
||||
stmt_<%=cid %>.execute("SET character_set_database=" + charset_<%=cid %>);
|
||||
|
||||
stmt_<%=cid %>.execute(bulkSQL_<%=cid%>);
|
||||
<%if(isLog4jEnabled){
|
||||
|
||||
@@ -14,7 +14,7 @@ INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
String host = ElementParameterParser.getValue(node, "__HOST__");
|
||||
String username = ElementParameterParser.getValue(node, "__USERNAME__");
|
||||
|
||||
String authMode = ElementParameterParser.getValue(node, "__AUTH_MODE__");
|
||||
String port = ElementParameterParser.getValue(node, "__PORT__");
|
||||
String outputDirectory = ElementParameterParser.getValue(node, "__OUTPUT_DIRECTORY__");
|
||||
String filenamePattern = ElementParameterParser.getValue(node, "__FILENAME_PATTERN__");
|
||||
@@ -27,13 +27,17 @@ String condition = ElementParameterParser.getValue(node, "__FILTER_RELATION__");
|
||||
boolean useSSL = "true".equals(ElementParameterParser.getValue(node, "__USE_SSL__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
boolean isNewerEmailFirst = ("true").equals(ElementParameterParser.getValue(node, "__NEWER_EMAILS__"));
|
||||
List<Map<String, String>> configs = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__CONFIGS__");
|
||||
boolean use2LineToken = "true".equals(ElementParameterParser.getValue(node, "__USE_TWO_LINE_TOKEN__"));
|
||||
String clientId = ElementParameterParser.getValue(node, "__CLIENT_ID__");
|
||||
String tenant = ElementParameterParser.getValue(node, "__TENANT__");
|
||||
%>
|
||||
String server_<%=cid %> = <%=host %>;
|
||||
String mbox_<%=cid%> = "INBOX";
|
||||
String user_<%=cid %> = <%=username %>;
|
||||
|
||||
<%
|
||||
String passwordFieldName = "__PASSWORD__";
|
||||
String passwordFieldName = "BASIC".equals(authMode)?"__PASSWORD__":("MSEXCHANGE".equals(authMode)?"__CLIENT_SECRET__":"__TOKEN__");
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
@@ -58,21 +62,49 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",sex.getMessage());
|
||||
}
|
||||
<%
|
||||
if (useSSL) {
|
||||
if ("pop3".equals(protocol)){
|
||||
%>
|
||||
props_<%=cid %>.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
||||
props_<%=cid %>.setProperty("mail.pop3.socketFactory.fallback", "false");
|
||||
props_<%=cid %>.setProperty("mail.pop3.socketFactory.port", port_<%=cid %> + "");
|
||||
props_<%=cid %>.setProperty("mail.<%=protocol%>.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
||||
props_<%=cid %>.setProperty("mail.<%=protocol%>.socketFactory.fallback", "false");
|
||||
props_<%=cid %>.setProperty("mail.<%=protocol%>.socketFactory.port", port_<%=cid %> + "");
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
props_<%=cid %>.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
||||
props_<%=cid %>.setProperty("mail.imap.socketFactory.fallback", "false");
|
||||
props_<%=cid %>.setProperty("mail.imap.socketFactory.port", port_<%=cid %> + "");
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if("OAUTH2".equals(authMode) || "MSEXCHANGE".equals(authMode) ) {
|
||||
%>
|
||||
props_<%=cid %>.put("mail.<%=protocol%>.auth.mechanisms", "XOAUTH2");
|
||||
<%
|
||||
}
|
||||
if(use2LineToken || "MSEXCHANGE".equals(authMode) ) {
|
||||
%>
|
||||
props_<%=cid %>.put("mail.<%=protocol%>.auth.xoauth2.two.line.authentication.format", "true");
|
||||
<%
|
||||
|
||||
}
|
||||
if("MSEXCHANGE".equals(authMode) ) {
|
||||
%>
|
||||
java.util.Set<String> SCOPE_<%=cid %> = new java.util.HashSet();
|
||||
SCOPE_<%=cid %>.add("https://outlook.office365.com/.default");
|
||||
com.microsoft.aad.msal4j.ConfidentialClientApplication app_<%=cid %> =
|
||||
com.microsoft.aad.msal4j.ConfidentialClientApplication
|
||||
.builder(<%=clientId %>, com.microsoft.aad.msal4j.ClientCredentialFactory.createFromSecret(password_<%=cid %>) )
|
||||
.authority("https://login.microsoftonline.com/"+<%=tenant%>+"/oauth2/v2.0/token")
|
||||
.build();
|
||||
com.microsoft.aad.msal4j.ClientCredentialParameters parameters_<%=cid %> =
|
||||
com.microsoft.aad.msal4j.ClientCredentialParameters
|
||||
.builder(SCOPE_<%=cid %>)
|
||||
.tenant(<%=tenant %>)
|
||||
.build();
|
||||
com.microsoft.aad.msal4j.IAuthenticationResult result_<%=cid %> = app_<%=cid %>.acquireToken(parameters_<%=cid %>).join();
|
||||
password_<%=cid %> = result_<%=cid %>.accessToken();
|
||||
<%
|
||||
}
|
||||
|
||||
for (int i = 0; i < configs.size(); i++) {
|
||||
Map<String, String> line = configs.get(i);
|
||||
%>
|
||||
props_<%=cid %>.put(<%=line.get("KEY")%>, <%=line.get("VALUE")%>);
|
||||
<%
|
||||
}
|
||||
if ("pop3".equals(protocol)){
|
||||
%>
|
||||
session_<%=cid %> = javax.mail.Session.getInstance(props_<%=cid %>, null);
|
||||
|
||||
@@ -51,12 +51,26 @@
|
||||
>
|
||||
<DEFAULT>110</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="AUTH_MODE"
|
||||
FIELD="CLOSED_LIST"
|
||||
NUM_ROW="5"
|
||||
GROUP="AUTHENTICATION"
|
||||
>
|
||||
<ITEMS DEFAULT="BASIC">
|
||||
<ITEM NAME="BASIC" VALUE="BASIC" />
|
||||
<ITEM NAME="OAUTH2" VALUE="OAUTH2" />
|
||||
<ITEM NAME="MSEXCHANGE" VALUE="MSEXCHANGE" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="USERNAME"
|
||||
FIELD="TEXT"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="2"
|
||||
NUM_ROW="6"
|
||||
GROUP="AUTHENTICATION"
|
||||
>
|
||||
<DEFAULT>"username"</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -65,15 +79,59 @@
|
||||
NAME="PASSWORD"
|
||||
FIELD="PASSWORD"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="2"
|
||||
NUM_ROW="6"
|
||||
GROUP="AUTHENTICATION"
|
||||
SHOW_IF="AUTH_MODE == 'BASIC'"
|
||||
>
|
||||
<DEFAULT>"password"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKEN"
|
||||
FIELD="PASSWORD"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="6"
|
||||
GROUP="AUTHENTICATION"
|
||||
SHOW_IF="AUTH_MODE == 'OAUTH2'"
|
||||
>
|
||||
<DEFAULT>"password"</DEFAULT>
|
||||
</PARAMETER>
|
||||
<!-- MS Exchange -->
|
||||
<PARAMETER
|
||||
NAME="TENANT"
|
||||
FIELD="TEXT"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="6"
|
||||
GROUP="AUTHENTICATION"
|
||||
SHOW_IF="AUTH_MODE == 'MSEXCHANGE'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="CLIENT_ID"
|
||||
FIELD="TEXT"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="7"
|
||||
GROUP="AUTHENTICATION"
|
||||
SHOW_IF="AUTH_MODE == 'MSEXCHANGE'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="CLIENT_SECRET"
|
||||
FIELD="PASSWORD"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="7"
|
||||
GROUP="AUTHENTICATION"
|
||||
SHOW_IF="AUTH_MODE == 'MSEXCHANGE'"
|
||||
>
|
||||
<DEFAULT>"password"</DEFAULT>
|
||||
</PARAMETER>
|
||||
<!-- MS Exchange -->
|
||||
<PARAMETER
|
||||
NAME="OUTPUT_DIRECTORY"
|
||||
FIELD="DIRECTORY"
|
||||
NUM_ROW="3"
|
||||
NUM_ROW="10"
|
||||
>
|
||||
<DEFAULT>"__COMP_DEFAULT_FILE_DIR__"</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -82,7 +140,7 @@
|
||||
NAME="FILENAME_PATTERN"
|
||||
FIELD="TEXT"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="4"
|
||||
NUM_ROW="15"
|
||||
>
|
||||
<DEFAULT>TalendDate.getDate("yyyyMMdd-hhmmss") + "_" + (counter_tPOP_1 + 1) + ".mail"</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -91,7 +149,7 @@
|
||||
NAME="ALL_EMAILS"
|
||||
FIELD="CHECK"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="6"
|
||||
NUM_ROW="20"
|
||||
>
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -100,7 +158,7 @@
|
||||
NAME="NEWER_EMAILS"
|
||||
FIELD="CHECK"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="7"
|
||||
NUM_ROW="25"
|
||||
SHOW_IF="ALL_EMAILS == 'false'"
|
||||
>
|
||||
<DEFAULT>true</DEFAULT>
|
||||
@@ -110,7 +168,7 @@
|
||||
NAME="MAX_EMAILS"
|
||||
FIELD="TEXT"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="6"
|
||||
NUM_ROW="20"
|
||||
SHOW_IF="ALL_EMAILS == 'false'"
|
||||
>
|
||||
<DEFAULT>10</DEFAULT>
|
||||
@@ -120,23 +178,23 @@
|
||||
NAME="DELETE_FROM_SERVER"
|
||||
FIELD="CHECK"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="7"
|
||||
NUM_ROW="25"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PROTOCOL" FIELD="CLOSED_LIST" NUM_ROW="8">
|
||||
<PARAMETER NAME="PROTOCOL" FIELD="CLOSED_LIST" NUM_ROW="30">
|
||||
<ITEMS DEFAULT="POP3">
|
||||
<ITEM NAME="POP3" VALUE="pop3" />
|
||||
<ITEM NAME="IMAP" VALUE="imap"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SPECIFY_MAIL_FOLDER" FIELD="CHECK" REQUIRED="true" NUM_ROW="8" SHOW_IF="PROTOCOL == 'IMAP'">
|
||||
<PARAMETER NAME="SPECIFY_MAIL_FOLDER" FIELD="CHECK" REQUIRED="true" NUM_ROW="30" SHOW_IF="PROTOCOL == 'IMAP'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="MAIL_FOLDER" FIELD="TEXT" REQUIRED="true" NUM_ROW="8" SHOW_IF="(SPECIFY_MAIL_FOLDER == 'true') AND (PROTOCOL == 'IMAP')">
|
||||
<PARAMETER NAME="MAIL_FOLDER" FIELD="TEXT" REQUIRED="true" NUM_ROW="30" SHOW_IF="(SPECIFY_MAIL_FOLDER == 'true') AND (PROTOCOL == 'IMAP')">
|
||||
<DEFAULT>"INBOX"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -144,7 +202,7 @@
|
||||
NAME="USE_SSL"
|
||||
FIELD="CHECK"
|
||||
REQUIRED="true"
|
||||
NUM_ROW="9"
|
||||
NUM_ROW="35"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -174,12 +232,37 @@
|
||||
<ITEM NAME="OR" VALUE="||"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="USE_TWO_LINE_TOKEN"
|
||||
FIELD="CHECK"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="AUTH_MODE == 'OAUTH2'"
|
||||
NUM_ROW="14">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONFIGS" FIELD="TABLE" REQUIRED="false" NUM_ROW="15" NB_LINES="3">
|
||||
<ITEMS>
|
||||
<ITEM NAME="KEY" />
|
||||
<ITEM NAME="VALUE" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="JavaMail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED="true" />
|
||||
<IMPORT NAME="jakartaMail" MODULE="jakarta.mail-1.6.7.jar" MVN="mvn:com.sun.mail/jakarta.mail/1.6.7" REQUIRED="true" />
|
||||
<IMPORT NAME="JAF" MODULE="activation.jar" MVN="mvn:org.talend.libraries/activation/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation.jar" REQUIRED="true" />
|
||||
|
||||
<IMPORT NAME="msal4j" MODULE="msal4j-1.11.0.jar" MVN="mvn:com.microsoft.azure/msal4j/1.11.0" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="jackson-core" MODULE="jackson-core-2.13.2.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.13.2" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="jackson-databind" MODULE="jackson-databind-2.13.2.2.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-databind/2.13.2.2" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="jackson-annotations" MODULE="jackson-annotations-2.13.2.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.13.2" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-9.7.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/9.7" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="content-type" MODULE="content-type-2.1.jar" MVN="mvn:com.nimbusds/content-type/2.1" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-9.22.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/9.22" REQUIRED_IF="(AUTH_MODE == 'MSEXCHANGE')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -34,5 +34,18 @@ ADVANCED_FILTER.ITEM.PATTERN=Pattern
|
||||
FILTER_RELATION.NAME=Filter condition relation
|
||||
FILTER_RELATION.ITEM.AND=and
|
||||
FILTER_RELATION.ITEM.OR=or
|
||||
USE_SSL.NAME=Use SSL
|
||||
|
||||
USE_SSL.NAME=Use SSL
|
||||
AUTH_MODE.NAME=Authentication mode
|
||||
AUTH_MODE.ITEM.BASIC=Basic
|
||||
AUTH_MODE.ITEM.OAUTH2=OAuth2
|
||||
AUTH_MODE.ITEM.MSEXCHANGE=Microsoft Exchange
|
||||
CLIENT_ID.NAME=Application (client) ID
|
||||
TENANT.NAME=Directory (tenant) ID
|
||||
CLIENT_SECRET.NAME=Secret Value
|
||||
TOKEN.NAME=OAuth Access Token
|
||||
CONFIGS.NAME=Custom properties
|
||||
CONFIGS.ITEM.KEY=Key
|
||||
CONFIGS.ITEM.VALUE=Value
|
||||
USE_TWO_LINE_TOKEN.NAME=Use two line authentication for OAuth2
|
||||
AUTHENTICATION.NAME=Authentication
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Postgres_Driver"
|
||||
MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="(DB_VERSION =='PRIOR_TO_V9') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="DB_VERSION =='V9_X'" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="DB_VERSION =='V9_X'" />
|
||||
<IMPORT NAME="Driver-Postgres" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="DB_VERSION =='PRIOR_TO_V9'" />
|
||||
<IMPORT NAME="slf4j-api-1.7.25.jar" MODULE="slf4j-api-1.7.25.jar" MVN="mvn:org.slf4j/slf4j-api/1.7.25" REQUIRED_IF="USE_SHARED_CONNECTION =='true'" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.25.jar" MODULE="slf4j-log4j12-1.7.25.jar" MVN="mvn:org.slf4j/slf4j-log4j12/1.7.25" REQUIRED_IF="USE_SHARED_CONNECTION =='true'" />
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Postgres" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="(DB_VERSION =='PRIOR_TO_V9') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.25.jar" MVN="mvn:org.postgresql/postgresql/42.2.25" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.26.jar" MVN="mvn:org.postgresql/postgresql/42.2.26" REQUIRED_IF="(DB_VERSION =='V9_X') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Postgres" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="(DB_VERSION =='PRIOR_TO_V9') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user