Compare commits

...

8 Commits

Author SHA1 Message Date
bhe-talendbj
95d96da1f4 fix(TUP-28066): remove lower version of jar based on gavct (#5410) 2020-10-22 14:17:33 +08:00
bhe-talendbj
6bdba6736b bugfix(TUP-29022) Fix detection warning popup (#5400)
* fix(TUP-29022): fix change warning popup

* fix(TUP-2902): show changes warning popup for implicit context and jobsettings
2020-10-21 12:02:28 +08:00
bhe-talendbj
2385fd236e fix(TUP-29022): fix jobsettings jdbc change detector (#5395) 2020-10-20 18:14:30 +08:00
Mike Yan
9a267bf269 fix(TESB-30713): Beans folder is missing in routines.jar for route (#5392) 2020-10-20 16:00:00 +08:00
Chao MENG
4e158865a4 fix(TUP-29012): If I open spark job before di job, on di job run tab I (#5388)
can see spark configuration tab

https://jira.talendforge.org/browse/TUP-29012
2020-10-20 11:31:21 +08:00
Jane Ding
faa9b09478 fix(TUP-28952):TOS: NPE when delete items to recycle bin (#5384)
https://jira.talendforge.org/browse/TUP-28952

Signed-off-by: jding-tlnd <jding@talend.com>
2020-10-20 10:15:46 +08:00
Dmytro Sylaiev
ac2dbc4aca fix(TDI-44896): Get nbline from stdout of gpload (#5304)
* fix(TDI-44896): Get nbline from stdout of gpload

* fix(TDI-44896): Fix the error message for failing get NBLine

* fix(TDI-44896): Fix codegen error

* fix(TDI-44896): Fix log printing 0 despite the real result

* fix(TDI-44897): Add exit code of GPLoad (#5307)
2020-10-20 09:47:19 +08:00
ypiel
bd10df43ca feat(TDI-44950) : Support oauth 2.0 in mscrm 2016 on-premise (#5300)
* feat(TDI-44950) : Support oauth 2.0 in mscrm 2016 on-premise

* feat(TDI-44950) : some adjustement after meeting + qa

* feat(TDI-44950) : update talend-mscrm version
2020-10-20 09:44:24 +08:00
20 changed files with 298 additions and 118 deletions

View File

@@ -567,6 +567,7 @@ skeleton="../templates/db_output_bulk.skeleton"
final StringBuilder gploadOutput_<%=cid%> = new StringBuilder(200);
Thread gploadThread_<%=cid%> = new Thread() {
public void run() {
int nbLine_<%=cid %> = 0;
try {
String[] cmds = new String[] {
<%if (!"".equals(pythonPathForCMD)){%>
@@ -581,12 +582,42 @@ skeleton="../templates/db_output_bulk.skeleton"
%>
};
final Process ps = Runtime.getRuntime().exec(cmds);
ps.waitFor();
globalMap.put("<%=cid%>_EXIT_CODE", ps.exitValue());
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(ps.getInputStream()));
java.io.BufferedReader errorReader = new java.io.BufferedReader(new java.io.InputStreamReader(ps.getErrorStream()));
String line = "";
while ((line = reader.readLine()) != null) {
gploadOutput_<%=cid%>.append(line);
System.out.println(line);
if (line.contains("rows Inserted")) {
nbLine_<%=cid %> = getNBLine(line);
}
if (line.contains("rows Updated")) {
<%
if ("UPDATE".equals(dataAction)) {
%>
nbLine_<%=cid %> = getNBLine(line);
<%
}
if ("MERGE".equals(dataAction)) {
%>
nbLine_<%=cid %> += getNBLine(line);
<%
}
%>
}
}
globalMap.put("<%=cid%>_NB_LINE", nbLine_<%=cid %>);
String errorLine = "";
while ((errorLine = errorReader.readLine()) != null) {
gploadOutput_<%=cid%>.append(errorLine);
System.err.println(errorLine);
}
}
catch (java.lang.Exception e) {
@@ -594,6 +625,21 @@ skeleton="../templates/db_output_bulk.skeleton"
throw new RuntimeException(e.getMessage(),e.getCause());
}
}
private int getNBLine(String logLine) {
try {
return Integer.parseInt(logLine.substring(logLine.lastIndexOf("=") + 1).trim());
} catch (Exception parseException) {
<%
if (isLog4jEnabled) {
%>
log.warn("Failed to get affected number of lines for <%=cid%>, assuming as 0: " + parseException.getMessage());
<%
}
%>
return 0;
}
}
};
<%
@@ -635,10 +681,9 @@ skeleton="../templates/db_output_bulk.skeleton"
gploadThread_<%=cid%>.start();
gploadThread_<%=cid%>.join(0);
globalMap.put("<%=cid%>_GPLOAD_OUTPUT", gploadOutput_<%=cid%>.toString());
globalMap.put("<%=cid%>_NB_LINE", insertedCount_<%=cid%>);
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Execute '"+command_<%=cid %>.toString()+"' has finished.");
log.info("<%=cid%> - Loaded records count:" + insertedCount_<%=cid%> + ".");
log.info("<%=cid%> - Loaded records count:" + globalMap.get("<%=cid%>_NB_LINE") + ".");
<%}%>
<%
}

View File

@@ -68,9 +68,10 @@ skeleton="../templates/db_output_bulk.skeleton"
if(isLog4jEnabled){%>
log.info("<%=cid%> - Execute '"+command_<%=cid %>.toString()+"' has finished.");
log.info("<%=cid%> - Loaded records count:"+insertedCount_<%=cid%> + ".");
<%}
<%}%>
globalMap.put("<%=cid%>_NB_LINE", insertedCount_<%=cid%>);
<%
}
%>
globalMap.put("<%=cid%>_GPLOAD_OUTPUT", gploadOutput_<%=cid%>.toString());
globalMap.put("<%=cid%>_NB_LINE", insertedCount_<%=cid%>);

View File

@@ -508,6 +508,7 @@
<RETURNS>
<RETURN AVAILABILITY="AFTER" NAME="NB_LINE" TYPE="id_Integer"/>
<RETURN AVAILABILITY="AFTER" NAME="EXIT_CODE" TYPE="id_Integer"/>
<RETURN AVAILABILITY="AFTER" NAME="GPLOAD_OUTPUT" TYPE="id_String"/>
</RETURNS>
</COMPONENT>

View File

@@ -2,6 +2,7 @@
#Thu Aug 05 16:40:47 PDT 2010
PROPERTYADVANCED.NAME=PROPERTYADVANCED
NB_LINE.NAME=NB_LINE
EXIT_CODE.NAME=Exit code
GPLOAD_OUTPUT.NAME=gpload's console output
PROPERTY.NAME=PROPERTY
HELP=org.talend.help.tGreenplumGPLoad

View File

@@ -37,6 +37,14 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
String authority = ElementParameterParser.getValue(node, "__AUTHORITY__");
String timeout = ElementParameterParser.getValue(node, "__TIMEOUT__");
boolean reuseHttpClient = ("true").equals(ElementParameterParser.getValue(node,"__REUSE_HTTP_CLIENT__"));
String redirectUrl = ElementParameterParser.getValue(node, "__REDIRECT_URL__");
String premiseAuth = ElementParameterParser.getValue(node, "__PREMISE_AUTH__");
boolean force_oauth_resource = ("true").equals(ElementParameterParser.getValue(node, "__FORCE_OAUTH_RESOURCE__"));
String oauth_resource = ElementParameterParser.getValue(node, "__OAUTH_RESOURCE__");
oauth_resource = force_oauth_resource ? oauth_resource : null;
// TODO Because of current retrieve would close httpclient automatically
// Need to recreated httpclient for every page query
reuseHttpClient =false;
@@ -78,10 +86,18 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
<%
if(isMsCrm2016OnPremise) {
if("NTLM".equals(premiseAuth)){
%>
org.talend.ms.crm.odata.ClientConfiguration clientConfig_<%=cid%> = org.talend.ms.crm.odata.ClientConfigurationFactory
.buildNtlmClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=host%>, <%=domain%>);
<%
}
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%>);
<%
}
} else {
if("NATIVE".equals(onlineRegisterApp)){
%>

View File

@@ -26,6 +26,10 @@
<PARAMETERS>
<PARAMETER NAME="HIDDEN_OAUTH_PREMISE" FIELD="CHECK" NUM_ROW="1" REQUIRED="true" SHOW_IF="AUTH_TYPE=='XXX'">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="AUTH_TYPE" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true">
<ITEMS DEFAULT="ON_PREMISE">
@@ -55,6 +59,14 @@
</ITEMS>
</PARAMETER>
<PARAMETER NAME="PREMISE_AUTH" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true" SHOW_IF="(HIDDEN_OAUTH_PREMISE=='true' AND (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016'))">
<ITEMS DEFAULT="NTLM">
<ITEM NAME="NTLM" VALUE="NTLM" />
<ITEM NAME="OAUTH" VALUE="OAUTH" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="ONLINE_REGISTERED_APP" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true" SHOW_IF="(AUTH_TYPE == 'ONLINE') AND (API_VERSION == 'API_2016_ODATA' OR API_VERSION == 'API_2018_ODATA')">
<ITEMS DEFAULT="NATIVE">
@@ -81,12 +93,12 @@
</PARAMETER>
<PARAMETER NAME="DOMAIN" FIELD="TEXT" NUM_ROW="20" REQUIRED="true"
SHOW_IF="(((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))">
SHOW_IF="(((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR ((AUTH_TYPE == 'ON_PREMISE') AND ((PREMISE_AUTH=='NTLM') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))))">
<DEFAULT>"192.168.0.22"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="HOST" FIELD="TEXT" NUM_ROW="20" REQUIRED="true"
SHOW_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007') OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))">
SHOW_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007') OR ((AUTH_TYPE == 'ON_PREMISE') AND ((PREMISE_AUTH=='NTLM') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))">
<DEFAULT>"192.168.0.22"</DEFAULT>
</PARAMETER>
@@ -121,7 +133,7 @@
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="APPLICATION_ID" FIELD="TEXT" NUM_ROW="30" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')">
<PARAMETER NAME="APPLICATION_ID" FIELD="TEXT" NUM_ROW="30" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -129,10 +141,14 @@
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="AUTHORITY" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')">
<PARAMETER NAME="AUTHORITY" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>"https://login.windows.net/common/oauth2/authorize"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="REDIRECT_URL" FIELD="TEXT" NUM_ROW="37" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>"https://localhost"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="TIMEOUT" FIELD="TEXT" NUM_ROW="45" REQUIRED="true">
<DEFAULT>60</DEFAULT>
</PARAMETER>
@@ -27493,6 +27509,12 @@
<PARAMETER NAME="ATTEMPS_INTERVAL_TIME" FIELD="TEXT" NUM_ROW="40" REQUIRED="true" SHOW="false" >
<DEFAULT>1000</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FORCE_OAUTH_RESOURCE" FIELD="CHECK" NUM_ROW="50" SHOW_IF="(AUTH_TYPE == 'ON_PREMISE' AND MS_CRM_VERSION == 'CRM_2016_ODATA' AND PREMISE_AUTH == 'OAUTH')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="OAUTH_RESOURCE" FIELD="TEXT" NUM_ROW="50" SHOW_IF="(AUTH_TYPE == 'ON_PREMISE' AND MS_CRM_VERSION == 'CRM_2016_ODATA' AND PREMISE_AUTH == 'OAUTH' AND FORCE_OAUTH_RESOURCE == 'true')">
<DEFAULT>"https://talend.api.crm.dynamics.com"</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
@@ -27523,7 +27545,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.4-20200923.jar" MVN="mvn:org.talend.components/talend-mscrm/3.4-20200923" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20200923.jar" 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.4-20201009.jar" MVN="mvn:org.talend.components/talend-mscrm/3.4-20201009" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20201009.jar" 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')" />

View File

@@ -864,4 +864,11 @@ ENTITYSETV2018.ITEM.webresourceset=webresourceset
ENTITYSETV2018.ITEM.webwizards=webwizards
ENTITYSETV2018.ITEM.workflowlogs=workflowlogs
ENTITYSETV2018.ITEM.workflows=workflows
ENTITYSETV2018.ITEM.CustomEntitySet=CustomEntitySet
ENTITYSETV2018.ITEM.CustomEntitySet=CustomEntitySet
PREMISE_AUTH.NAME=Mode
PREMISE_AUTH.ITEM.NTLM=NTLM
PREMISE_AUTH.ITEM.OAUTH=OAUTH 2.0
REDIRECT_URL.NAME=Redirect URL
FORCE_OAUTH_RESOURCE.NAME=Force OAuth resource
OAUTH_RESOURCE.NAME=Resource

View File

@@ -11,6 +11,14 @@
String timeout = ElementParameterParser.getValue(node, "__TIMEOUT__");
boolean reuseHttpClient = ("true").equals(ElementParameterParser.getValue(node,"__REUSE_HTTP_CLIENT__"));
String redirectUrl = ElementParameterParser.getValue(node, "__REDIRECT_URL__");
String premiseAuth = ElementParameterParser.getValue(node, "__PREMISE_AUTH__");
boolean force_oauth_resource = ("true").equals(ElementParameterParser.getValue(node, "__FORCE_OAUTH_RESOURCE__"));
String oauth_resource = ElementParameterParser.getValue(node, "__OAUTH_RESOURCE__");
oauth_resource = force_oauth_resource ? oauth_resource : null;
%>
int nb_line_<%=cid%> = 0;
<%
@@ -63,10 +71,18 @@
<%
if(isMsCrm2016OnPremise) {
if("NTLM".equals(premiseAuth)){
%>
org.talend.ms.crm.odata.ClientConfiguration clientConfig_<%=cid%> = org.talend.ms.crm.odata.ClientConfigurationFactory
.buildNtlmClientConfiguration(<%=userName%>, decryptedPassword_<%=cid%>, <%=host%>, <%=domain%>);
<%
}
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%>);
<%
}
} else {
if("NATIVE".equals(onlineRegisterApp)){
%>

View File

@@ -26,6 +26,10 @@
<PARAMETERS>
<PARAMETER NAME="HIDDEN_OAUTH_PREMISE" FIELD="CHECK" NUM_ROW="1" REQUIRED="true" SHOW_IF="AUTH_TYPE=='XXX'">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="AUTH_TYPE" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true" REPOSITORY_VALUE="ENTITYNAME">
<ITEMS DEFAULT="ON_PREMISE">
@@ -55,6 +59,14 @@
</ITEMS>
</PARAMETER>
<PARAMETER NAME="PREMISE_AUTH" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true" SHOW_IF="(HIDDEN_OAUTH_PREMISE=='true' AND (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016'))">
<ITEMS DEFAULT="NTLM">
<ITEM NAME="NTLM" VALUE="NTLM" />
<ITEM NAME="OAUTH" VALUE="OAUTH" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="ONLINE_REGISTERED_APP" FIELD="CLOSED_LIST" NUM_ROW="5"
REQUIRED="true" SHOW_IF="(AUTH_TYPE == 'ONLINE') AND (API_VERSION == 'API_2016_ODATA' OR API_VERSION == 'API_2018_ODATA')">
<ITEMS DEFAULT="NATIVE">
@@ -81,12 +93,12 @@
</PARAMETER>
<PARAMETER NAME="DOMAIN" FIELD="TEXT" NUM_ROW="30" REQUIRED="true"
SHOW_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))">
SHOW_IF="(((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR ((AUTH_TYPE == 'ON_PREMISE') AND ((PREMISE_AUTH=='NTLM') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))))">
<DEFAULT>"192.168.0.22"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="HOST" FIELD="TEXT" NUM_ROW="30" REQUIRED="true"
SHOW_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007') OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))">
SHOW_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007') OR ((AUTH_TYPE == 'ON_PREMISE') AND ((PREMISE_AUTH=='NTLM') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))">
<DEFAULT>"192.168.0.22"</DEFAULT>
</PARAMETER>
@@ -121,7 +133,7 @@
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="APPLICATION_ID" FIELD="TEXT" NUM_ROW="40" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA'))">
<PARAMETER NAME="APPLICATION_ID" FIELD="TEXT" NUM_ROW="40" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
@@ -129,10 +141,14 @@
<DEFAULT>""</DEFAULT>
</PARAMETER>
<PARAMETER NAME="AUTHORITY" FIELD="TEXT" NUM_ROW="42" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA'))">
<PARAMETER NAME="AUTHORITY" FIELD="TEXT" NUM_ROW="42" REQUIRED="true" SHOW_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR (AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>"https://login.windows.net/common/oauth2/authorize"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="REDIRECT_URL" FIELD="TEXT" NUM_ROW="43" REQUIRED="true" SHOW_IF="(AUTH_TYPE=='ON_PREMISE' AND MS_CRM_VERSION=='CRM_2016' AND PREMISE_AUTH=='OAUTH')">
<DEFAULT>"https://localhost"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="ACTION" FIELD="CLOSED_LIST" NUM_ROW="45" REQUIRED="true">
<ITEMS DEFAULT="insert">
<ITEM NAME="insert" VALUE="insert" />
@@ -38255,6 +38271,12 @@
<DEFAULT>1000</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FORCE_OAUTH_RESOURCE" FIELD="CHECK" NUM_ROW="50" SHOW_IF="(AUTH_TYPE == 'ON_PREMISE' AND MS_CRM_VERSION == 'CRM_2016_ODATA' AND PREMISE_AUTH == 'OAUTH')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="OAUTH_RESOURCE" FIELD="TEXT" NUM_ROW="50" SHOW_IF="(AUTH_TYPE == 'ON_PREMISE' AND MS_CRM_VERSION == 'CRM_2016_ODATA' AND PREMISE_AUTH == 'OAUTH' AND FORCE_OAUTH_RESOURCE == 'true')">
<DEFAULT>"https://talend.api.crm.dynamics.com"</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
@@ -38286,7 +38308,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.4-20200923.jar" MVN="mvn:org.talend.components/talend-mscrm/3.4-20200923" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20200923.jar" 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.4-20201009.jar" MVN="mvn:org.talend.components/talend-mscrm/3.4-20201009" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20201009.jar" 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')" />

View File

@@ -855,3 +855,10 @@ ENTITYSETV2018.ITEM.webwizards=webwizards
ENTITYSETV2018.ITEM.workflowlogs=workflowlogs
ENTITYSETV2018.ITEM.workflows=workflows
ENTITYSETV2018.ITEM.CustomEntitySet=CustomEntitySet
PREMISE_AUTH.NAME=Mode
PREMISE_AUTH.ITEM.NTLM=NTLM
PREMISE_AUTH.ITEM.OAUTH=OAUTH 2.0
REDIRECT_URL.NAME=Redirect URL
FORCE_OAUTH_RESOURCE.NAME=Force OAuth resource
OAUTH_RESOURCE.NAME=Resource

View File

@@ -116,6 +116,7 @@ import org.talend.core.service.IMetadataManagmentService;
import org.talend.core.ui.ICDCProviderService;
import org.talend.core.ui.IJobletProviderService;
import org.talend.core.ui.component.ComponentsFactoryProvider;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.cwm.helper.SAPBWTableHelper;
import org.talend.daikon.properties.Properties;
import org.talend.designer.core.DesignerPlugin;
@@ -912,9 +913,7 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
if (repValue == null) {
continue;
}
if (repositoryValue.equals("connection.driverTable")) {
ConnectionUtil.resetDriverValue(repValue);
}
if (repositoryValue.equals(UpdatesConstants.TYPE)) { // datebase type
boolean found = false;
String[] list = param.getListRepositoryItems();
@@ -961,9 +960,16 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
}
}
}
} else if ((param.getName().equals("DRIVER_JAR")
|| param.getName().equals("DRIVER_JAR_IMPLICIT_CONTEXT"))
&& param.getValue() != null) {
sameValues = isSameDriverList((List<Map<String, Object>>) param.getValue(),
(List<Map<String, Object>>) repValue);
} else if (!param.getValue().equals(repValue)) {
sameValues = false;
}
}
}
if (!sameValues) {
@@ -1010,6 +1016,97 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
return jobSettingsResults;
}
private static boolean isSameDriverList(List<Map<String, Object>> lst1, List<Map<String, Object>> lst2) {
if (lst1 == null) {
if (lst2 == null) {
return true;
} else {
return false;
}
} else {
if (lst2 == null) {
return false;
} else {
// compare
if (lst1.size() != lst2.size()) {
return false;
} else {
Set<String> driverSet1 = new HashSet<String>();
Set<String> driverSet2 = new HashSet<String>();
boolean isDriverUri1 = false;
boolean isDriverUri2 = false;
for (Map<String, Object> driverItem1 : lst1) {
Object driver1 = driverItem1.get("drivers");
if (driver1 != null) {
String val = TalendQuoteUtils.removeQuotes(String.valueOf(driver1));
driverSet1.add(val);
if (MavenUrlHelper.isMvnUrl(val)) {
isDriverUri1 = true;
}
}
}
for (Map<String, Object> driverItem2 : lst2) {
Object driver2 = driverItem2.get("drivers");
if (driver2 != null) {
String val = TalendQuoteUtils.removeQuotes(String.valueOf(driver2));
driverSet2.add(val);
if (MavenUrlHelper.isMvnUrl(val)) {
isDriverUri2 = true;
}
}
}
if (driverSet1.size() != driverSet2.size()) {
return false;
}
if (isDriverUri1 == isDriverUri2) {
return driverSet1.equals(driverSet2);
} else {
if (isDriverUri1) {
for (String item : driverSet1) {
MavenArtifact art = MavenUrlHelper.parseMvnUrl(item);
if (!driverSet2.contains(art.getFileName())) {
return false;
}
}
} else {
for (String item : driverSet2) {
MavenArtifact art = MavenUrlHelper.parseMvnUrl(item);
if (!driverSet1.contains(art.getFileName())) {
return false;
}
}
}
return true;
}
}
}
}
}
private static boolean isSameDriver(Object val1, Object val2) {
String driver1 = String.valueOf(val1);
String driver2 = String.valueOf(val2);
driver1 = TalendQuoteUtils.removeQuotes(driver1);
driver2 = TalendQuoteUtils.removeQuotes(driver2);
if (MavenUrlHelper.isMvnUrl(driver1)) {
if (!MavenUrlHelper.isMvnUrl(driver2)) {
MavenArtifact art = MavenUrlHelper.parseMvnUrl(driver1);
if (art != null) {
return art.getFileName().equals(driver2);
}
}
} else {
if (MavenUrlHelper.isMvnUrl(driver2)) {
MavenArtifact art = MavenUrlHelper.parseMvnUrl(driver2);
if (art != null) {
return art.getFileName().equals(driver1);
}
}
}
return true;
}
/*
* check node parameters.
*/
@@ -2379,19 +2476,8 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
Map<String, Object> objectMap = (Map<String, Object>) objectList.get(i);
String oldDriver = String.valueOf(oldMap.get(nodeParamDriverKey));
String driver = String.valueOf(objectMap.get("drivers"));
if (driver != null) {
driver = TalendTextUtils.removeQuotes(driver);
if (!oldDriver.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(driver);
if (artifact != null) {
driver = artifact.getFileName();
}
}
}
if (oldDriver.equals(driver)) {
sameValues = true;
} else {
sameValues = false;
sameValues = isSameDriver(oldDriver, driver);
if (!sameValues) {
break;
}
}

View File

@@ -174,9 +174,6 @@ public abstract class AbstractJobSettingsPage extends ProjectSettingPage {
if (repValue == null) {
continue;
}
if (repositoryValue.equals("connection.driverTable")) {// PASSWORD
ConnectionUtil.resetDriverValue(repValue);
}
if (repositoryValue.equals(UpdatesConstants.TYPE)) { // datebase type
boolean found = false;
String[] list = param.getListRepositoryItems();

View File

@@ -1,51 +0,0 @@
//============================================================================
//
// Talend Community Edition
//
// Copyright (C) 2006-2019 Talend www.talend.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//============================================================================
package org.talend.designer.runprocess;
public enum EDebugProcessType {
DI("DI"), //$NON-NLS-1$
CAMEL("CAMEL"); //$NON-NLS-1$
private String debugType;
private EDebugProcessType(String debugType) {
this.debugType = debugType;
}
public String getDebugType() {
return debugType;
}
public static EDebugProcessType findDebugType(String typeName) {
EDebugProcessType type = DI;
if (typeName != null) {
for (EDebugProcessType e : values()) {
if (typeName.equals(e.debugType)) {
type = e;
break;
}
}
}
return type;
}
}

View File

@@ -2427,6 +2427,12 @@ public class JavaProcessor extends AbstractJavaProcessor implements IJavaBreakpo
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(module.getMavenUri(), true);
if (artifact != null) {
String key = artifact.getGroupId() + ":" + artifact.getArtifactId();
if (artifact.getType() != null) {
key = key + ":" + artifact.getType();
}
if (artifact.getClassifier() != null) {
key = key + ":" + artifact.getClassifier();
}
ModuleNeeded checkedModule = keepModules.get(key);
if (checkedModule != null) {
MavenArtifact checkedArtifact = MavenUrlHelper.parseMvnUrl(checkedModule.getMavenUri(), true);

View File

@@ -407,7 +407,7 @@ public class ProcessChangeListener implements PropertyChangeListener {
}
if (newValue instanceof IRepositoryViewObject) {
IRepositoryViewObject object = (IRepositoryViewObject) newValue;
if (!ERepositoryObjectType.TEST_CONTAINER.equals(object.getRepositoryObjectType())) {
if (getAllProcessTypes().contains(object.getRepositoryObjectType())) {
try {
AggregatorPomsHelper.removeAllVersionsFromParentModules(object.getProperty());
} catch (Exception e) {
@@ -424,7 +424,7 @@ public class ProcessChangeListener implements PropertyChangeListener {
}
if (newValue instanceof IRepositoryViewObject) {
IRepositoryViewObject object = (IRepositoryViewObject) newValue;
if (!ERepositoryObjectType.TEST_CONTAINER.equals(object.getRepositoryObjectType())) {
if (getAllProcessTypes().contains(object.getRepositoryObjectType())) {
try {
AggregatorPomsHelper.restoreAllVersionsFromParentModules(object.getProperty());
} catch (Exception e) {

View File

@@ -14,7 +14,7 @@ package org.talend.designer.runprocess.ui.views;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.talend.designer.runprocess.EDebugProcessType;
import org.talend.core.model.components.ComponentCategory;
import org.talend.designer.runprocess.ui.DebugProcessTosComposite;
import org.talend.designer.runprocess.ui.TraceDebugProcessComposite;
@@ -35,8 +35,8 @@ public class DefaultDebugviewHelper implements IDebugViewHelper {
}
@Override
public EDebugProcessType getDebugType() {
return EDebugProcessType.DI;
public ComponentCategory getDebugType() {
return ComponentCategory.CATEGORY_4_DI;
}
}

View File

@@ -13,7 +13,7 @@
package org.talend.designer.runprocess.ui.views;
import org.eclipse.swt.widgets.Composite;
import org.talend.designer.runprocess.EDebugProcessType;
import org.talend.core.model.components.ComponentCategory;
import org.talend.designer.runprocess.ui.TraceDebugProcessComposite;
/**
@@ -22,6 +22,7 @@ import org.talend.designer.runprocess.ui.TraceDebugProcessComposite;
public interface IDebugViewHelper {
public TraceDebugProcessComposite getDebugComposite(final Composite container);
public EDebugProcessType getDebugType();
public ComponentCategory getDebugType();
}

View File

@@ -19,6 +19,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
@@ -75,7 +76,6 @@ import org.talend.core.ui.properties.tab.IDynamicProperty;
import org.talend.core.ui.properties.tab.TalendPropertyTabDescriptor;
import org.talend.designer.core.ui.views.properties.EElementType;
import org.talend.designer.core.ui.views.properties.MultipleThreadDynamicComposite;
import org.talend.designer.runprocess.EDebugProcessType;
import org.talend.designer.runprocess.RunProcessContext;
import org.talend.designer.runprocess.RunProcessContextManager;
import org.talend.designer.runprocess.RunProcessPlugin;
@@ -150,7 +150,7 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
private static RunProcessContext processContext;
private Map<EDebugProcessType, IDebugViewHelper> debugViewHelpers;
private Map<ComponentCategory, IDebugViewHelper> debugViewHelpers;
private boolean canRun = true;
@@ -188,7 +188,7 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
"org.talend.designer.runprocess.runprocess_view_helper", "runprocess_view_helper"); //$NON-NLS-1$ //$NON-NLS-2$
IExtensionPointLimiter debugextensionPointLimiter = new ExtensionPointLimiterImpl(
"org.talend.designer.runprocess.debugprocess_view_helper", "debugprocess_view_helper");
debugViewHelpers = new HashMap<EDebugProcessType, IDebugViewHelper>();
debugViewHelpers = new HashMap<>();
ExtensionImplementationProvider.getInstance(debugextensionPointLimiter, null).forEach(e -> {
if (e instanceof IDebugViewHelper) {
IDebugViewHelper helper = (IDebugViewHelper) e;
@@ -204,10 +204,10 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
tabFactory = new HorizontalTabFactory();
setProcessViewHelper(processViewHelperPrm);
if(!debugViewHelpers.containsKey(EDebugProcessType.DI)) {
if (!debugViewHelpers.containsKey(ComponentCategory.CATEGORY_4_DI)) {
// TOS Debug helper
DefaultDebugviewHelper defaultDebugViewHelper = new DefaultDebugviewHelper();
debugViewHelpers.put(EDebugProcessType.DI, defaultDebugViewHelper);
debugViewHelpers.put(ComponentCategory.CATEGORY_4_DI, defaultDebugViewHelper);
}
rubjobManager = ProcessManager.getInstance();
ProxyRepositoryFactory.getInstance().addPropertyChangeListener(this);
@@ -406,9 +406,9 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
debugViewHelpers.values().forEach(helper -> {
helper.getDebugComposite(parent).setVisible(false);
});
debugTisProcessComposite = lastDebugType != null && debugViewHelpers.get(lastDebugType) != null
? debugViewHelpers.get(lastDebugType).getDebugComposite(parent)
: debugViewHelpers.get(EDebugProcessType.DI).getDebugComposite(parent);
debugTisProcessComposite = oldJobType != null && debugViewHelpers.get(oldJobType) != null
? debugViewHelpers.get(oldJobType).getDebugComposite(parent)
: debugViewHelpers.get(ComponentCategory.CATEGORY_4_DI).getDebugComposite(parent);
debugTisProcessComposite.setVisible(true);
// CSS
CoreUIPlugin.setCSSClass(debugTisProcessComposite, TraceDebugProcessComposite.class.getSimpleName());
@@ -447,10 +447,9 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
}
public IDebugViewHelper getDebugViewHelper() {
return lastDebugType != null && debugViewHelpers.get(lastDebugType) != null
? debugViewHelpers.get(lastDebugType)
: debugViewHelpers.get(EDebugProcessType.DI);
return oldJobType != null && debugViewHelpers.get(oldJobType) != null
? debugViewHelpers.get(oldJobType)
: debugViewHelpers.get(ComponentCategory.CATEGORY_4_DI);
}
public ProcessComposite getProcessComposite() {
@@ -594,7 +593,7 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
}
}
EDebugProcessType lastDebugType = null;
ComponentCategory oldJobType = null;
public void refresh() {
refresh(false);
@@ -624,10 +623,12 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
if (contextComposite.isDisposed()) {
return;
}
if (activeContext != null
&& !EDebugProcessType.findDebugType(activeContext.getProcess().getComponentsType()).equals(lastDebugType)) {
lastDebugType = EDebugProcessType.findDebugType(activeContext.getProcess().getComponentsType());
ComponentCategory activedType = Optional.ofNullable(activeContext).map(c -> c.getProcess())
.map(p -> p.getComponentsType()).map(t -> ComponentCategory.getComponentCategoryFromName(t))
.orElse(ComponentCategory.CATEGORY_4_DI);
if (!activedType.equals(oldJobType)) {
oldJobType = activedType;
setElement();
}
contextComposite.setProcess(((activeContext != null) && !disableAll ? activeContext.getProcess() : null));
@@ -639,14 +640,16 @@ public class ProcessView extends ViewPart implements PropertyChangeListener {
if (dc != null && dc == processComposite) {
processComposite.setProcessContext(activeContext);
} else if (dc != null && dc instanceof TraceDebugProcessComposite) {
EDebugProcessType type = lastDebugType == null ? EDebugProcessType.DI : lastDebugType;
if (!debugViewHelpers.get(type).getDebugComposite(parent).isVisible()) {
ComponentCategory type = oldJobType == null ? ComponentCategory.CATEGORY_4_DI : oldJobType;
IDebugViewHelper debugViewHelper = Optional.ofNullable(debugViewHelpers.get(type))
.orElse(debugViewHelpers.get(ComponentCategory.CATEGORY_4_DI));
if (!debugViewHelper.getDebugComposite(parent).isVisible()) {
debugViewHelpers.values().forEach(helper -> {
if (!helper.getDebugType().equals(type)) {
helper.getDebugComposite(parent).setVisible(false);
}
});
debugViewHelpers.get(type).getDebugComposite(parent).setVisible(true);
debugViewHelper.getDebugComposite(parent).setVisible(true);
}
if (debugTisProcessComposite != null) {
debugTisProcessComposite.setProcessContext(activeContext);

View File

@@ -47,7 +47,7 @@
<artifactItem>
<groupId>org.talend.components</groupId>
<artifactId>talend-mscrm</artifactId>
<version>3.4-20200923</version>
<version>3.4-20201009</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${libs.dir}</outputDirectory>

View File

@@ -385,9 +385,9 @@ public class JobJavaScriptOSGIForESBManager extends JobJavaScriptsManager {
}
beanClassRootFolder = getCodeClassRootFileLocation(ERepositoryObjectType.BEANS);
RepositoryPlugin.getDefault().getRunProcessService().buildCodesJavaProject(new NullProgressMonitor());
if (beanClassRootFolder != null) {
FileCopyUtils.copyFolder(beanClassRootFolder, routineClassRootFolder);
}
}
if (beanClassRootFolder != null) {
FileCopyUtils.copyFolder(beanClassRootFolder, routineClassRootFolder);
}
// make a jar file of system routine classes