Compare commits
20 Commits
codegen_ba
...
patch/5.4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dfe58aab7 | ||
|
|
a6bd49a36d | ||
|
|
8de5f36ad1 | ||
|
|
ba91ce0970 | ||
|
|
2cbba78fc4 | ||
|
|
7588e0eb6f | ||
|
|
be4544d403 | ||
|
|
39cd9e073e | ||
|
|
227eba73c1 | ||
|
|
7d73437198 | ||
|
|
1d38839f7d | ||
|
|
ab1cf73d97 | ||
|
|
4765c0b7a4 | ||
|
|
d9e0eba817 | ||
|
|
6d9b77be9b | ||
|
|
3c4852a3bc | ||
|
|
4009192f85 | ||
|
|
991649b01f | ||
|
|
40328be34c | ||
|
|
5eed1e6ccb |
@@ -77,7 +77,12 @@ public class JavaRoutineSynchronizer extends AbstractRoutineSynchronizer {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void syncAllRoutines() throws SystemException {
|
public void syncAllRoutines() throws SystemException {
|
||||||
syncRoutineItems(getRoutines());
|
syncRoutineItems(getRoutines(),false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void syncAllRoutinesForLogOn() throws SystemException {
|
||||||
|
syncRoutineItems(getRoutines(),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -87,13 +92,18 @@ public class JavaRoutineSynchronizer extends AbstractRoutineSynchronizer {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void syncAllPigudf() throws SystemException {
|
public void syncAllPigudf() throws SystemException {
|
||||||
syncRoutineItems(getAllPigudf());
|
syncRoutineItems(getAllPigudf(),false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void syncRoutineItems(List<IRepositoryViewObject> routineObjects) throws SystemException {
|
@Override
|
||||||
|
public void syncAllPigudfForLogOn() throws SystemException {
|
||||||
|
syncRoutineItems(getAllPigudf(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncRoutineItems(List<IRepositoryViewObject> routineObjects, boolean forceUpdate) throws SystemException {
|
||||||
for (IRepositoryViewObject routine : routineObjects) {
|
for (IRepositoryViewObject routine : routineObjects) {
|
||||||
RoutineItem routineItem = (RoutineItem) routine.getProperty().getItem();
|
RoutineItem routineItem = (RoutineItem) routine.getProperty().getItem();
|
||||||
syncRoutine(routineItem, true);
|
syncRoutine(routineItem, true,forceUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
<project name="org.talend.designer.components.libs" default="process" basedir=".">
|
<project name="org.talend.designer.components.libs" default="process" basedir=".">
|
||||||
|
|
||||||
<property name="component.plugin.home" value="../../../org.talend.designer.components.localprovider/components" />
|
<property name="component.plugin.home" value="../../../org.talend.designer.components.localprovider/components" />
|
||||||
<property name="axis2.dir" value="../../../org.talend.libraries.apache.axis2/lib" />
|
<property name="axis2.dir" value="../../../../tcommon-studio-se/org.talend.libraries.apache.axis2/lib" />
|
||||||
<property name="targetplugin.dir" value="/home/bchen/Develope/yoxos/targets/target-530/plugins" />
|
<property name="http.dir" value="../../../../tcommon-studio-se/org.talend.libraries.apache.http/lib" />
|
||||||
<property name="http.dir" value="../../../org.talend.libraries.apache.http/lib" />
|
<property name="json.dir" value="../../../../tcommon-studio-se/org.talend.libraries.jackson/lib" />
|
||||||
|
<property name="cxf.dir" value="../../../../tcommon-studio-se/org.talend.libraries.apache.cxf/lib" />
|
||||||
|
<property name="salesforce.dir" value="../../../org.talend.libraries.salesforce/lib" />
|
||||||
|
|
||||||
<!-- #################################################### -->
|
<!-- #################################################### -->
|
||||||
|
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
<property name="jar.name" value="salesforceCRMManagement.jar" />
|
<property name="jar.name" value="salesforceCRMManagement.jar" />
|
||||||
<property name="component.name" value="tSalesforceInput" />
|
<property name="component.name" value="tSalesforceInput" />
|
||||||
<property name="author.name" value="wyang" />
|
<property name="author.name" value="wyang" />
|
||||||
<property name="lib.dir" value="../../../org.talend.libraries.salesforce/lib" />
|
<property name="lib.dir" value="${salesforce.dir}" />
|
||||||
|
|
||||||
<!-- modification 2: compile classpath -->
|
<!-- modification 2: compile classpath -->
|
||||||
<path id="compile.classpath">
|
<path id="compile.classpath">
|
||||||
@@ -21,18 +23,18 @@
|
|||||||
<pathelement location="${axis2.dir}/axis2-kernel-1.6.2.jar" />
|
<pathelement location="${axis2.dir}/axis2-kernel-1.6.2.jar" />
|
||||||
<pathelement location="${axis2.dir}/axis2-transport-http-1.6.2.jar" />
|
<pathelement location="${axis2.dir}/axis2-transport-http-1.6.2.jar" />
|
||||||
<pathelement location="${axis2.dir}/axis2-transport-local-1.6.2.jar" />
|
<pathelement location="${axis2.dir}/axis2-transport-local-1.6.2.jar" />
|
||||||
<pathelement location="${targetplugin.dir}/org.apache.commons.codec_1.3.0.v201101211617.jar" />
|
|
||||||
<pathelement location="${http.dir}/commons-httpclient-3.1.jar" />
|
|
||||||
<pathelement location="${targetplugin.dir}/org.apache.commons.logging_1.1.1.v201101211721.jar" />
|
|
||||||
<pathelement location="${http.dir}/httpcore-4.0.jar" />
|
|
||||||
<pathelement location="${axis2.dir}/mail-1.4.jar" />
|
<pathelement location="${axis2.dir}/mail-1.4.jar" />
|
||||||
<pathelement location="${axis2.dir}/neethi-3.0.1.jar" />
|
<pathelement location="${axis2.dir}/neethi-3.0.1.jar" />
|
||||||
<pathelement location="${axis2.dir}/wsdl4j-1.6.2.jar" />
|
<pathelement location="${axis2.dir}/wsdl4j-1.6.3.jar" />
|
||||||
<pathelement location="${axis2.dir}/xmlschema-core-2.0.1.jar" />
|
<pathelement location="${axis2.dir}/xmlschema-core-2.0.1.jar" />
|
||||||
<pathelement location="${axis2.dir}/axis2-adb-1.6.2.jar" />
|
<pathelement location="${axis2.dir}/axis2-adb-1.6.2.jar" />
|
||||||
<pathelement location="${axis2.dir}/geronimo-stax-api_1.0_spec-1.0.1.jar" />
|
<pathelement location="${axis2.dir}/geronimo-stax-api_1.0_spec-1.0.1.jar" />
|
||||||
<pathelement location="${axis2.dir}/activation-1.1.jar" />
|
<pathelement location="${axis2.dir}/activation-1.1.jar" />
|
||||||
<pathelement location="${axis2.dir}/wstx-asl-3.2.9.jar" />
|
<pathelement location="${cxf.dir}/woodstox-core-asl-4.2.0.jar" />
|
||||||
|
<pathelement location="${http.dir}/httpcore-4.0.jar" />
|
||||||
|
<pathelement location="${http.dir}/commons-httpclient-3.1.jar" />
|
||||||
|
<pathelement location="${json.dir}/json_simple-1.1.jar" />
|
||||||
|
<pathelement location="${salesforce.dir}/salesforceOAuth.jar" />
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<!-- #################################################### -->
|
<!-- #################################################### -->
|
||||||
|
|||||||
@@ -10306,7 +10306,23 @@ public class SforceServiceStub extends org.apache.axis2.client.Stub implements
|
|||||||
"urn:partner.soap.sforce.com:Soap:describeGlobalRequest");
|
"urn:partner.soap.sforce.com:Soap:describeGlobalRequest");
|
||||||
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
||||||
true);
|
true);
|
||||||
|
{
|
||||||
|
/*- ADD - START - BY cmeng - 20140901*/
|
||||||
|
/**
|
||||||
|
* https://jira.talendforge.org/browse/TDI-30366<br>
|
||||||
|
* 1. Because this API seems not support this case: server use HTTP Protocol 1.0(not support CHUNKED) while client use HTTP Protocol 1.1<br>
|
||||||
|
* , then client will throw exception(org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required)<br>
|
||||||
|
* 2. If the new API can support this case, then this additional codes can be cancelled.
|
||||||
|
*
|
||||||
|
* Some information I searched on the net:<br>
|
||||||
|
* https://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00309.html
|
||||||
|
* http://axis.apache.org/axis2/java/core/docs/http-transport.html
|
||||||
|
* http://en.wikipedia.org/wiki/Chunked_transfer_encoding
|
||||||
|
*/
|
||||||
|
_operationClient.getOptions().setProperty(
|
||||||
|
org.apache.axis2.transport.http.HTTPConstants.CHUNKED, "false");
|
||||||
|
/*- ADD - END - BY cmeng* - 20140901*/
|
||||||
|
}
|
||||||
addPropertyToOperationClient(
|
addPropertyToOperationClient(
|
||||||
_operationClient,
|
_operationClient,
|
||||||
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
||||||
@@ -12816,7 +12832,23 @@ public class SforceServiceStub extends org.apache.axis2.client.Stub implements
|
|||||||
"urn:partner.soap.sforce.com:Soap:describeSObjectRequest");
|
"urn:partner.soap.sforce.com:Soap:describeSObjectRequest");
|
||||||
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
|
||||||
true);
|
true);
|
||||||
|
{
|
||||||
|
/*- ADD - START - BY cmeng - 20140901*/
|
||||||
|
/**
|
||||||
|
* https://jira.talendforge.org/browse/TDI-30366<br>
|
||||||
|
* 1. Because this API seems not support this case: server use HTTP Protocol 1.0(not support CHUNKED) while client use HTTP Protocol 1.1<br>
|
||||||
|
* , then client will throw exception(org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required)<br>
|
||||||
|
* 2. If the new API can support this case, then this additional codes can be cancelled.
|
||||||
|
*
|
||||||
|
* Some information I searched on the net:<br>
|
||||||
|
* https://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00309.html
|
||||||
|
* http://axis.apache.org/axis2/java/core/docs/http-transport.html
|
||||||
|
* http://en.wikipedia.org/wiki/Chunked_transfer_encoding
|
||||||
|
*/
|
||||||
|
_operationClient.getOptions().setProperty(
|
||||||
|
org.apache.axis2.transport.http.HTTPConstants.CHUNKED, "false");
|
||||||
|
/*- ADD - END - BY cmeng - 20140901*/
|
||||||
|
}
|
||||||
addPropertyToOperationClient(
|
addPropertyToOperationClient(
|
||||||
_operationClient,
|
_operationClient,
|
||||||
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
|
||||||
|
|||||||
@@ -193,6 +193,23 @@ public class SforceManagementImpl implements SforceManagement {
|
|||||||
this.upsertKeyColumn = "";
|
this.upsertKeyColumn = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean chunked = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a special method in impl class for customer's patch
|
||||||
|
*/
|
||||||
|
public void setHttpChunked(boolean chunked){
|
||||||
|
this.chunked = chunked;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a special method in impl class for customer's patch
|
||||||
|
*/
|
||||||
|
private void applyHttpChunked(Options options){
|
||||||
|
options.setProperty(HTTPConstants.CHUNKED, chunked);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean _login(String endpoint, String username, String password, int timeout, boolean needCompression)
|
private boolean _login(String endpoint, String username, String password, int timeout, boolean needCompression)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
if (endpoint == null || endpoint.trim().length() == 0) {
|
if (endpoint == null || endpoint.trim().length() == 0) {
|
||||||
@@ -211,6 +228,7 @@ public class SforceManagementImpl implements SforceManagement {
|
|||||||
needCompression(options);
|
needCompression(options);
|
||||||
}
|
}
|
||||||
setTimeout(options, timeout);
|
setTimeout(options, timeout);
|
||||||
|
applyHttpChunked(options);
|
||||||
setHttpProxy(options);
|
setHttpProxy(options);
|
||||||
|
|
||||||
Login login = new Login();
|
Login login = new Login();
|
||||||
@@ -250,6 +268,7 @@ public class SforceManagementImpl implements SforceManagement {
|
|||||||
needCompression(options);
|
needCompression(options);
|
||||||
}
|
}
|
||||||
setTimeout(options, timeout);
|
setTimeout(options, timeout);
|
||||||
|
applyHttpChunked(options);
|
||||||
setHttpProxy(options);
|
setHttpProxy(options);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -154,6 +154,13 @@ if(bulkConnection){
|
|||||||
globalMap.put("callOptions_<%=cid%>", sfMgr_<%=cid%>.getCallOptions());
|
globalMap.put("callOptions_<%=cid%>", sfMgr_<%=cid%>.getCallOptions());
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sfMgr_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
||||||
|
|||||||
@@ -239,6 +239,14 @@
|
|||||||
SHOW_IF="BULK_CONNECTION=='false'">
|
SHOW_IF="BULK_CONNECTION=='false'">
|
||||||
<DEFAULT>""</DEFAULT>
|
<DEFAULT>""</DEFAULT>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="50">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
|
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
|
|||||||
@@ -27,4 +27,6 @@ NEED_COMPRESSION.NAME=Use Soap Compression
|
|||||||
TIMEOUT.NAME=Timeout(milliseconds)
|
TIMEOUT.NAME=Timeout(milliseconds)
|
||||||
CLIENT_ID.NAME=Client ID
|
CLIENT_ID.NAME=Client ID
|
||||||
|
|
||||||
HTTP_TRACEMESSAGE.NAME=Output Http Trace Message
|
HTTP_TRACEMESSAGE.NAME=Output Http Trace Message
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -153,33 +153,40 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
|
|||||||
<%if(clientID!=null && !"".equals(clientID) && !"\"\"".equals(clientID)){%>
|
<%if(clientID!=null && !"".equals(clientID) && !"\"\"".equals(clientID)){%>
|
||||||
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
||||||
<%}
|
<%}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sfMgr_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
|
%>
|
||||||
|
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
||||||
|
if(!result_<%=cid%>){
|
||||||
|
throw new RuntimeException("Login failed!");
|
||||||
|
}
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
if(useProxy){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
java.util.Properties props_<%=cid%> = System.getProperties();
|
||||||
if(!result_<%=cid%>){
|
props_<%=cid%>.put("socksProxyHost",<%=proxyHost %>);
|
||||||
throw new RuntimeException("Login failed!");
|
props_<%=cid%>.put("socksProxyPort",<%=proxyPort %>);
|
||||||
}
|
props_<%=cid%>.put("java.net.socks.username", <%=proxyUsername %>);
|
||||||
|
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
||||||
|
|
||||||
<%
|
<%
|
||||||
}else{
|
}
|
||||||
if(useProxy){
|
%>
|
||||||
%>
|
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(<%=endpoint%>,<%=username%>, <%=password%>,<%=timeout%>,<%=needCompression%>);
|
||||||
java.util.Properties props_<%=cid%> = System.getProperties();
|
if(!result_<%=cid%>){
|
||||||
props_<%=cid%>.put("socksProxyHost",<%=proxyHost %>);
|
throw new RuntimeException("Login failed! Please check the username,password and endpoint");
|
||||||
props_<%=cid%>.put("socksProxyPort",<%=proxyPort %>);
|
}
|
||||||
props_<%=cid%>.put("java.net.socks.username", <%=proxyUsername %>);
|
<%
|
||||||
props_<%=cid%>.put("java.net.socks.password", <%=proxyPassword %>);
|
}
|
||||||
|
}
|
||||||
<%
|
%>
|
||||||
}
|
|
||||||
%>
|
|
||||||
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(<%=endpoint%>,<%=username%>, <%=password%>,<%=timeout%>,<%=needCompression%>);
|
|
||||||
if(!result_<%=cid%>){
|
|
||||||
throw new RuntimeException("Login failed! Please check the username,password and endpoint");
|
|
||||||
}
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
java.lang.StringBuilder sb = new java.lang.StringBuilder();
|
java.lang.StringBuilder sb = new java.lang.StringBuilder();
|
||||||
|
|||||||
@@ -2507,6 +2507,14 @@
|
|||||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
|
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
|
||||||
<DEFAULT>""</DEFAULT>
|
<DEFAULT>""</DEFAULT>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="50">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
<IMPORTS>
|
<IMPORTS>
|
||||||
|
|||||||
@@ -180,3 +180,5 @@ USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
|||||||
CONNECTION.NAME=Component List
|
CONNECTION.NAME=Component List
|
||||||
TIMEOUT.NAME=Timeout(milliseconds)
|
TIMEOUT.NAME=Timeout(milliseconds)
|
||||||
CLIENT_ID.NAME=Client ID
|
CLIENT_ID.NAME=Client ID
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -133,6 +133,13 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
|
|||||||
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sfMgr_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
||||||
|
|||||||
@@ -241,6 +241,13 @@
|
|||||||
<DEFAULT>""</DEFAULT>
|
<DEFAULT>""</DEFAULT>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="80">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
|
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
|
|||||||
@@ -32,4 +32,6 @@ OAUTH_CLIENT_ID.NAME=Consumer Key
|
|||||||
OAUTH_CLIENT_SECRET.NAME=Consumer Secret
|
OAUTH_CLIENT_SECRET.NAME=Consumer Secret
|
||||||
OAUTH_CALLBACK_HOST.NAME=CallBack Host
|
OAUTH_CALLBACK_HOST.NAME=CallBack Host
|
||||||
OAUTH_CALLBACK_PORT.NAME=CallBack Port
|
OAUTH_CALLBACK_PORT.NAME=CallBack Port
|
||||||
OAUTH_TOKEN_FILE.NAME=Token File
|
OAUTH_TOKEN_FILE.NAME=Token File
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -155,6 +155,13 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
|
|||||||
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sfMgr_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
boolean result_<%=cid%> = sfMgr_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
||||||
|
|||||||
@@ -2503,6 +2503,14 @@
|
|||||||
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
|
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
|
||||||
<DEFAULT>""</DEFAULT>
|
<DEFAULT>""</DEFAULT>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="50">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
<IMPORTS>
|
<IMPORTS>
|
||||||
|
|||||||
@@ -181,4 +181,6 @@ NEED_COMPRESSION.NAME=Use Soap Compression
|
|||||||
USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
||||||
CONNECTION.NAME=Component List
|
CONNECTION.NAME=Component List
|
||||||
TIMEOUT.NAME=Timeout(milliseconds)
|
TIMEOUT.NAME=Timeout(milliseconds)
|
||||||
CLIENT_ID.NAME=Client ID
|
CLIENT_ID.NAME=Client ID
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -181,6 +181,13 @@ if ((metadatas != null) && (metadatas.size() > 0)) {
|
|||||||
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
sfMgr_<%=cid%>.setClientID(<%=clientID%>);
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sfMgr_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = false;
|
boolean result_<%=cid%> = false;
|
||||||
|
|||||||
@@ -2624,6 +2624,14 @@
|
|||||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (API == 'soap')">
|
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (API == 'soap')">
|
||||||
<DEFAULT>""</DEFAULT>
|
<DEFAULT>""</DEFAULT>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="120">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
|
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
|
|||||||
@@ -200,4 +200,6 @@ CONNECTION.NAME=Component List
|
|||||||
TIMEOUT.NAME=Timeout(milliseconds)
|
TIMEOUT.NAME=Timeout(milliseconds)
|
||||||
|
|
||||||
QUERY_ALL.NAME=Query all records(include deleted records)
|
QUERY_ALL.NAME=Query all records(include deleted records)
|
||||||
CLIENT_ID.NAME=Client ID
|
CLIENT_ID.NAME=Client ID
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -126,6 +126,13 @@ imports="
|
|||||||
sforceManagement_<%=cid%>.setClientID(<%=clientID%>);
|
sforceManagement_<%=cid%>.setClientID(<%=clientID%>);
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useHttpChunked = "true".equals(ElementParameterParser.getValue(node,"__USE_HTTP_CHUNKED__"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
((org.talend.salesforce.SforceManagementImpl)sforceManagement_<%=cid%>).setHttpChunked(<%=useHttpChunked%>);
|
||||||
|
|
||||||
|
<%
|
||||||
if(useOAuth){
|
if(useOAuth){
|
||||||
%>
|
%>
|
||||||
boolean result_<%=cid%> = sforceManagement_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
boolean result_<%=cid%> = sforceManagement_<%=cid%>.login(accessToken_<%=cid%>, endpointURL_<%=cid%>,<%=timeout%>,<%=needCompression%>);
|
||||||
|
|||||||
@@ -3468,6 +3468,14 @@
|
|||||||
<ITEM NAME="LOOKUP_FIELD_EXTERNAL_ID_NAME" />
|
<ITEM NAME="LOOKUP_FIELD_EXTERNAL_ID_NAME" />
|
||||||
</ITEMS>
|
</ITEMS>
|
||||||
</PARAMETER>
|
</PARAMETER>
|
||||||
|
|
||||||
|
<PARAMETER
|
||||||
|
NAME="USE_HTTP_CHUNKED"
|
||||||
|
FIELD="CHECK"
|
||||||
|
SHOW="false"
|
||||||
|
NUM_ROW="90">
|
||||||
|
<DEFAULT>false</DEFAULT>
|
||||||
|
</PARAMETER>
|
||||||
</ADVANCED_PARAMETERS>
|
</ADVANCED_PARAMETERS>
|
||||||
|
|
||||||
<CODEGENERATION>
|
<CODEGENERATION>
|
||||||
|
|||||||
@@ -193,4 +193,6 @@ OAUTH_CLIENT_ID.NAME=Consumer Key
|
|||||||
OAUTH_CLIENT_SECRET.NAME=Consumer Secret
|
OAUTH_CLIENT_SECRET.NAME=Consumer Secret
|
||||||
OAUTH_CALLBACK_HOST.NAME=CallBack Host
|
OAUTH_CALLBACK_HOST.NAME=CallBack Host
|
||||||
OAUTH_CALLBACK_PORT.NAME=CallBack Port
|
OAUTH_CALLBACK_PORT.NAME=CallBack Port
|
||||||
OAUTH_TOKEN_FILE.NAME=Token File
|
OAUTH_TOKEN_FILE.NAME=Token File
|
||||||
|
|
||||||
|
USE_HTTP_CHUNKED.NAME=Use Http Chunked
|
||||||
@@ -835,7 +835,7 @@ if (bCreateDir){
|
|||||||
org.talend.designer.components.tsort.io.sortimpl.FlowSorterIterator<<%=rowName %>StructILightSerializable> iterator_<%=cid %> = new org.talend.designer.components.tsort.io.sortimpl.FlowSorterIterator<<%=rowName %>StructILightSerializable>();
|
org.talend.designer.components.tsort.io.sortimpl.FlowSorterIterator<<%=rowName %>StructILightSerializable> iterator_<%=cid %> = new org.talend.designer.components.tsort.io.sortimpl.FlowSorterIterator<<%=rowName %>StructILightSerializable>();
|
||||||
iterator_<%=cid %>.setBufferSize(<%=bufferSize %>);
|
iterator_<%=cid %>.setBufferSize(<%=bufferSize %>);
|
||||||
iterator_<%=cid %>.setILightSerializable(new <%=rowName %>StructILightSerializable());
|
iterator_<%=cid %>.setILightSerializable(new <%=rowName %>StructILightSerializable());
|
||||||
iterator_<%=cid %>.workDirectory = <%=tempDirectory %> + "/" + jobName + "<%=cid %> _" + pid;
|
iterator_<%=cid %>.workDirectory = <%=tempDirectory %> + "/" + jobName + "<%=cid %> _" + Thread.currentThread().getId() + "_" + pid;
|
||||||
iterator_<%=cid %>.initPut("");
|
iterator_<%=cid %>.initPut("");
|
||||||
|
|
||||||
<%
|
<%
|
||||||
|
|||||||
@@ -25,6 +25,18 @@
|
|||||||
id="org.talend.designer.core.ui.editor.StandAloneTalendJavaEditor"
|
id="org.talend.designer.core.ui.editor.StandAloneTalendJavaEditor"
|
||||||
name="Java Editor">
|
name="Java Editor">
|
||||||
</editor>
|
</editor>
|
||||||
|
<editor
|
||||||
|
class="org.talend.designer.core.ui.editor.TalendDefaultJavaEditor"
|
||||||
|
contributorClass="org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditorActionContributor"
|
||||||
|
default="true"
|
||||||
|
icon="icons/java.gif"
|
||||||
|
id="org.talend.designer.core.ui.editor.TalendDefaultJavaEditor"
|
||||||
|
name="Talend Default Java Editor"
|
||||||
|
symbolicFontName="org.eclipse.jdt.ui.editors.textfont">
|
||||||
|
<contentTypeBinding
|
||||||
|
contentTypeId="org.eclipse.jdt.core.javaSource">
|
||||||
|
</contentTypeBinding>
|
||||||
|
</editor>
|
||||||
</extension>
|
</extension>
|
||||||
<extension point="org.eclipse.ui.startup">
|
<extension point="org.eclipse.ui.startup">
|
||||||
<startup class="org.eclipse.update.internal.scheduler.SchedulerStartup"/>
|
<startup class="org.eclipse.update.internal.scheduler.SchedulerStartup"/>
|
||||||
|
|||||||
@@ -481,6 +481,7 @@ Node.lostPartitioner=there should have a partitioner row before the departitione
|
|||||||
Node.lostDepartitioner=there should have a departitioner row after the partitioner row.
|
Node.lostDepartitioner=there should have a departitioner row after the partitioner row.
|
||||||
Node.setPartitioning=Set Parallelization.
|
Node.setPartitioning=Set Parallelization.
|
||||||
Node.nothingDoForPartitioning=Nothing to do for this job.
|
Node.nothingDoForPartitioning=Nothing to do for this job.
|
||||||
|
Node.repeatMergeSort={0} already set merge sort,please remove the merge sort in {1}
|
||||||
Node.hasInexistentColumn=Columns ({0}) of Parameter ({1}) are not existing in the schema and \nstudio will take the first column instead of the original one. Please correct them manually.
|
Node.hasInexistentColumn=Columns ({0}) of Parameter ({1}) are not existing in the schema and \nstudio will take the first column instead of the original one. Please correct them manually.
|
||||||
NodeBreakpointAction.addBreakPoint=Add breakpoint
|
NodeBreakpointAction.addBreakPoint=Add breakpoint
|
||||||
NodeBreakpointAction.removeBreakpoint=Remove breakpoint
|
NodeBreakpointAction.removeBreakpoint=Remove breakpoint
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ public class MetadataEmfFactory {
|
|||||||
colType.setComment(metaCol.getComment());
|
colType.setComment(metaCol.getComment());
|
||||||
colType.setKey(metaCol.isKey());
|
colType.setKey(metaCol.isKey());
|
||||||
colType.setNullable(metaCol.isNullable());
|
colType.setNullable(metaCol.isNullable());
|
||||||
if (metaCol.getLength() == null) {
|
if (metaCol.getLength() == null || metaCol.getLength().intValue() < 0) {
|
||||||
// colType.setLength(-1);
|
colType.setLength(-1);
|
||||||
colType.unsetLength();
|
// colType.unsetLength();
|
||||||
} else {
|
} else {
|
||||||
colType.setLength(metaCol.getLength());
|
colType.setLength(metaCol.getLength());
|
||||||
}
|
}
|
||||||
@@ -87,9 +87,9 @@ public class MetadataEmfFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
colType.setName(metaCol.getLabel());
|
colType.setName(metaCol.getLabel());
|
||||||
if (metaCol.getPrecision() == null) {
|
if (metaCol.getPrecision() == null || metaCol.getPrecision().intValue() < 0) {
|
||||||
// colType.setPrecision(-1);
|
colType.setPrecision(-1);
|
||||||
colType.unsetPrecision();
|
// colType.unsetPrecision();
|
||||||
} else {
|
} else {
|
||||||
colType.setPrecision(metaCol.getPrecision());
|
colType.setPrecision(metaCol.getPrecision());
|
||||||
}
|
}
|
||||||
@@ -137,12 +137,8 @@ public class MetadataEmfFactory {
|
|||||||
metaCol.setComment(colType.getComment());
|
metaCol.setComment(colType.getComment());
|
||||||
metaCol.setKey(colType.isKey());
|
metaCol.setKey(colType.isKey());
|
||||||
metaCol.setNullable(colType.isNullable());
|
metaCol.setNullable(colType.isNullable());
|
||||||
if (colType.isSetLength()) {
|
if (colType.getLength() >= 0) {
|
||||||
if (colType.getLength() >= 0) {
|
metaCol.setLength(new Integer(colType.getLength()));
|
||||||
metaCol.setLength(new Integer(colType.getLength()));
|
|
||||||
} else {
|
|
||||||
metaCol.setLength(null);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
metaCol.setLength(null);
|
metaCol.setLength(null);
|
||||||
}
|
}
|
||||||
@@ -161,12 +157,8 @@ public class MetadataEmfFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
metaCol.setLabel(colType.getName());
|
metaCol.setLabel(colType.getName());
|
||||||
if (colType.isSetPrecision()) {
|
if (colType.getPrecision() >= 0) {
|
||||||
if (colType.getPrecision() >= 0) {
|
metaCol.setPrecision(new Integer(colType.getPrecision()));
|
||||||
metaCol.setPrecision(new Integer(colType.getPrecision()));
|
|
||||||
} else {
|
|
||||||
metaCol.setPrecision(null);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
metaCol.setPrecision(null);
|
metaCol.setPrecision(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,6 +344,7 @@ public class StandAloneTalendJavaEditor extends CompilationUnitEditor implements
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
repFactory.executeRepositoryWorkUnit(repositoryWorkUnit);
|
repFactory.executeRepositoryWorkUnit(repositoryWorkUnit);
|
||||||
|
repositoryWorkUnit.throwPersistenceExceptionIfAny();
|
||||||
|
|
||||||
// for bug 11930: Unable to save Routines.* in db project
|
// for bug 11930: Unable to save Routines.* in db project
|
||||||
|
|
||||||
@@ -357,12 +358,12 @@ public class StandAloneTalendJavaEditor extends CompilationUnitEditor implements
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshJobAndSave(final IProxyRepositoryFactory repFactory) {
|
private void refreshJobAndSave(final IProxyRepositoryFactory repFactory) throws PersistenceException {
|
||||||
try {
|
// try {
|
||||||
// cause it to update MaxInformationLevel
|
// cause it to update MaxInformationLevel
|
||||||
repFactory.save(item);
|
repFactory.save(item);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
}
|
// }
|
||||||
// update editor image
|
// update editor image
|
||||||
setTitleImage(getTitleImage());
|
setTitleImage(getTitleImage());
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
// ============================================================================
|
||||||
|
//
|
||||||
|
// Copyright (C) 2006-2015 Talend Inc. - www.talend.com
|
||||||
|
//
|
||||||
|
// This source code is available under agreement available at
|
||||||
|
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||||
|
//
|
||||||
|
// You should have received a copy of the agreement
|
||||||
|
// along with this program; if not, write to Talend SA
|
||||||
|
// 9 rue Pages 92150 Suresnes, France
|
||||||
|
//
|
||||||
|
// ============================================================================
|
||||||
|
package org.talend.designer.core.ui.editor;
|
||||||
|
|
||||||
|
import org.apache.log4j.Priority;
|
||||||
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.jdt.core.IJavaProject;
|
||||||
|
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
|
||||||
|
import org.eclipse.ui.IEditorInput;
|
||||||
|
import org.eclipse.ui.part.FileEditorInput;
|
||||||
|
import org.talend.commons.exception.CommonExceptionHandler;
|
||||||
|
import org.talend.core.GlobalServiceRegister;
|
||||||
|
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||||
|
import org.talend.designer.runprocess.IRunProcessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC cmeng class global comment. Detailled comment
|
||||||
|
*/
|
||||||
|
public class TalendDefaultJavaEditor extends CompilationUnitEditor {
|
||||||
|
|
||||||
|
protected String fileType = FILE_TYPE_OTHERS;
|
||||||
|
|
||||||
|
protected static final String FILE_TYPE_TALEND_GENERATED_READONLY = "READONLY_GENERATED_BY_TALEND"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
protected static final String FILE_TYPE_TALEND_GENERATED_WRITEABLE = "WRITEABLE_GENERATED_BY_TALEND"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
protected static final String FILE_TYPE_OTHERS = "OTHERS_NOT_BY_TALEND"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doSetInput(IEditorInput input) throws CoreException {
|
||||||
|
|
||||||
|
if (input instanceof FileEditorInput) {
|
||||||
|
try {
|
||||||
|
// IRepositoryService repositoryService = DesignerPlugin.getDefault().getRepositoryService();
|
||||||
|
// IProxyRepositoryFactory repFactory = repositoryService.getProxyRepositoryFactory();
|
||||||
|
IRunProcessService runProcessService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(
|
||||||
|
IRunProcessService.class);
|
||||||
|
// I think runProcessService can't be null, and should throw exception if it is null
|
||||||
|
IJavaProject talendJavaProject = runProcessService.getJavaProject();
|
||||||
|
final String pathSeperator = "/"; //$NON-NLS-1$
|
||||||
|
String routinesFolderName = ERepositoryObjectType.ROUTINES.getFolder().split(pathSeperator)[1];
|
||||||
|
String talendSrcFolderPath = talendJavaProject.getProject().getLocation().toString() + pathSeperator
|
||||||
|
+ "src" + pathSeperator; //$NON-NLS-1$
|
||||||
|
String routineFolderPath = talendSrcFolderPath + routinesFolderName + pathSeperator;
|
||||||
|
IFile openedFile = ((FileEditorInput) input).getFile();
|
||||||
|
String openedFilePath = openedFile.getLocation().toString();
|
||||||
|
boolean isRoutine = openedFilePath.startsWith(routineFolderPath);
|
||||||
|
boolean isTalendGeneratedFile = openedFilePath.startsWith(talendSrcFolderPath);
|
||||||
|
String systemRoutineFolderName = "system"; //$NON-NLS-1$
|
||||||
|
String systemRoutineFolderPath = routineFolderPath + systemRoutineFolderName + pathSeperator;
|
||||||
|
boolean isSystemRoutine = openedFilePath.startsWith(systemRoutineFolderPath);
|
||||||
|
|
||||||
|
if (isSystemRoutine) {
|
||||||
|
fileType = FILE_TYPE_TALEND_GENERATED_READONLY;
|
||||||
|
} else if (isRoutine) {
|
||||||
|
fileType = FILE_TYPE_TALEND_GENERATED_READONLY;
|
||||||
|
} else if (isTalendGeneratedFile) {
|
||||||
|
fileType = FILE_TYPE_TALEND_GENERATED_READONLY;
|
||||||
|
} else {
|
||||||
|
fileType = FILE_TYPE_OTHERS;
|
||||||
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
|
CommonExceptionHandler.process(e, Priority.WARN);
|
||||||
|
fileType = FILE_TYPE_OTHERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
super.doSetInput(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEditable() {
|
||||||
|
boolean isEditable = false;
|
||||||
|
|
||||||
|
if (FILE_TYPE_TALEND_GENERATED_READONLY.equals(fileType)) {
|
||||||
|
isEditable = false;
|
||||||
|
} else if (FILE_TYPE_TALEND_GENERATED_WRITEABLE.equals(fileType)) {
|
||||||
|
isEditable = true;
|
||||||
|
} else if (FILE_TYPE_OTHERS.equals(fileType)) {
|
||||||
|
isEditable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isEditable;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -430,6 +430,13 @@ public class PropertyChangeCommand extends Command {
|
|||||||
((IGraphicalNode) elem).checkAndRefreshNode();
|
((IGraphicalNode) elem).checkAndRefreshNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (elem instanceof IConnection) {
|
||||||
|
IProcess process = ((IConnection) elem).getSource().getProcess();
|
||||||
|
if (process instanceof IProcess2) {
|
||||||
|
((IProcess2) process).checkProcess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// See feature 3902
|
// See feature 3902
|
||||||
if (needUpdateMonitorConnection()) {
|
if (needUpdateMonitorConnection()) {
|
||||||
((Connection) elem).setMonitorConnection((Boolean) currentParam.getValue());
|
((Connection) elem).setMonitorConnection((Boolean) currentParam.getValue());
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
|||||||
import org.talend.core.model.utils.ContextParameterUtils;
|
import org.talend.core.model.utils.ContextParameterUtils;
|
||||||
import org.talend.core.model.utils.IDragAndDropServiceHandler;
|
import org.talend.core.model.utils.IDragAndDropServiceHandler;
|
||||||
import org.talend.core.utils.TalendQuoteUtils;
|
import org.talend.core.utils.TalendQuoteUtils;
|
||||||
|
import org.talend.cwm.helper.TaggedValueHelper;
|
||||||
import org.talend.designer.core.model.components.EParameterName;
|
import org.talend.designer.core.model.components.EParameterName;
|
||||||
import org.talend.designer.core.model.components.EmfComponent;
|
import org.talend.designer.core.model.components.EmfComponent;
|
||||||
import org.talend.designer.core.ui.editor.nodes.Node;
|
import org.talend.designer.core.ui.editor.nodes.Node;
|
||||||
@@ -122,7 +123,12 @@ public class RepositoryChangeMetadataCommand extends ChangeMetadataCommand {
|
|||||||
|
|
||||||
node.getElementParameter(EParameterName.UPDATE_COMPONENTS.getName()).setValue(true);
|
node.getElementParameter(EParameterName.UPDATE_COMPONENTS.getName()).setValue(true);
|
||||||
if (newOutputMetadata != null) {
|
if (newOutputMetadata != null) {
|
||||||
setDBTableFieldValue(node, newOutputMetadata.getTableName(), oldOutputMetadata.getTableName());
|
Map<String, String> addMap = newOutputMetadata.getAdditionalProperties();
|
||||||
|
if (addMap.get(TaggedValueHelper.SYSTEMTABLENAME) != null && node.getComponent().getName().equals("tAS400CDC")) {
|
||||||
|
setDBTableFieldValue(node, addMap.get(TaggedValueHelper.SYSTEMTABLENAME), oldOutputMetadata.getTableName());
|
||||||
|
} else {
|
||||||
|
setDBTableFieldValue(node, newOutputMetadata.getTableName(), oldOutputMetadata.getTableName());
|
||||||
|
}
|
||||||
IElementParameter parameter = node.getElementParameter("SAP_FUNCTION");
|
IElementParameter parameter = node.getElementParameter("SAP_FUNCTION");
|
||||||
if (parameter != null)
|
if (parameter != null)
|
||||||
setSAPFunctionName(node, parameter.getValue() == null ? null : (String) parameter.getValue());
|
setSAPFunctionName(node, parameter.getValue() == null ? null : (String) parameter.getValue());
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
package org.talend.designer.core.ui.editor.cmd;
|
package org.talend.designer.core.ui.editor.cmd;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ public class SetParallelizationCommand extends Command {
|
|||||||
|
|
||||||
private static final String HASH_KEYS = "HASH_KEYS";
|
private static final String HASH_KEYS = "HASH_KEYS";
|
||||||
|
|
||||||
private boolean isExistParallel = false;
|
private Map<INode, Boolean> existParallelMap = new HashMap<INode, Boolean>();
|
||||||
|
|
||||||
public SetParallelizationCommand(INode node) {
|
public SetParallelizationCommand(INode node) {
|
||||||
this.node = node;
|
this.node = node;
|
||||||
@@ -49,13 +50,34 @@ public class SetParallelizationCommand extends Command {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
existParallelMap.clear();
|
||||||
|
initParallelNodeMap();
|
||||||
setParallelization(this.node);
|
setParallelization(this.node);
|
||||||
if (!isExistParallel) {
|
setParallelParametersForConn();
|
||||||
|
if (!isExistParalInSubjob(existParallelMap, node.getProcessStartNode(false))) {
|
||||||
MessageDialog.openInformation(new Shell(), Messages.getString("Node.setPartitioning"),
|
MessageDialog.openInformation(new Shell(), Messages.getString("Node.setPartitioning"),
|
||||||
Messages.getString("Node.nothingDoForPartitioning"));
|
Messages.getString("Node.nothingDoForPartitioning"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initParallelNodeMap() {
|
||||||
|
List<? extends INode> nodes = this.node.getProcess().getGraphicalNodes();
|
||||||
|
for (INode node : nodes) {
|
||||||
|
if (node.isSubProcessStart()) {
|
||||||
|
// by default for subjob the parallel does not exist
|
||||||
|
existParallelMap.put(node, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isExistParalInSubjob(Map<INode, Boolean> existParallelMap, INode node) {
|
||||||
|
INode subJobStartNode = node.getSubProcessStartNode(false);
|
||||||
|
if (existParallelMap.containsKey(subJobStartNode)) {
|
||||||
|
return existParallelMap.get(subJobStartNode);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isComponentCanParlization(IConnection parConnection, Node needToPar) {
|
private boolean isComponentCanParlization(IConnection parConnection, Node needToPar) {
|
||||||
if (needToPar.getComponent().getPartitioning().equals("NONE")) {
|
if (needToPar.getComponent().getPartitioning().equals("NONE")) {
|
||||||
return false;
|
return false;
|
||||||
@@ -111,7 +133,7 @@ public class SetParallelizationCommand extends Command {
|
|||||||
} else if (value instanceof Integer) {
|
} else if (value instanceof Integer) {
|
||||||
Integer index = (Integer) value;
|
Integer index = (Integer) value;
|
||||||
if (nodeElemForList.getListItemsDisplayName().length > index) {
|
if (nodeElemForList.getListItemsDisplayName().length > index) {
|
||||||
columnKeyValues.add((String) nodeElemForList.getListItemsDisplayName()[index]);
|
columnKeyValues.add(nodeElemForList.getListItemsDisplayName()[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,91 +157,41 @@ public class SetParallelizationCommand extends Command {
|
|||||||
for (IConnection con : node.getOutgoingConnections()) {
|
for (IConnection con : node.getOutgoingConnections()) {
|
||||||
EConnectionType lineStyle = con.getLineStyle();
|
EConnectionType lineStyle = con.getLineStyle();
|
||||||
if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
|
if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||||
// if (con.isActivate()) {
|
if (!lineStyle.equals(EConnectionType.FLOW_MERGE)) {
|
||||||
boolean isEndRow = con.getTarget().getOutgoingConnections().size() == 0;
|
boolean isEndRow = con.getTarget().getOutgoingConnections().size() == 0;
|
||||||
boolean isStartRow = node.isStart();
|
boolean isStartRow = node.isStart();
|
||||||
if (ParallelExecutionUtils.isPartitionKeysExist(con)) {
|
|
||||||
ParallelExecutionUtils.reSetParKeyValuesForCon(con);
|
|
||||||
}
|
|
||||||
if (!isEndRow && isComponentCanParlization(con, (Node) con.getTarget())) {
|
|
||||||
// For those component support tPartitioner,but its keys not same as previous
|
|
||||||
// tPartitioner,need do Repartitioner automatic
|
|
||||||
if (isExistParallel && !isStartRow && isComponentNeedRepartion(con, (Node) con.getTarget())) {
|
|
||||||
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.setPropertyValue(EParameterName.REPARTITIONER.getName(), Boolean.TRUE);
|
|
||||||
|
|
||||||
// set the keys for hash keys
|
if (ParallelExecutionUtils.isPartitionKeysExist(con)) {
|
||||||
ParallelExecutionUtils.setHashKeysFromTarget(con, (Node) con.getTarget());
|
ParallelExecutionUtils.reSetParKeyValuesForCon(con);
|
||||||
setParallelization(con.getTarget());
|
}
|
||||||
|
if (!isEndRow && isComponentCanParlization(con, (Node) con.getTarget())) {
|
||||||
} else {
|
// For those component support tPartitioner,but its keys not same as previous
|
||||||
// when pervious con is par/repar/none,keep current is none
|
// tPartitioner,need do Repartitioner automatic
|
||||||
if (isExistParallel
|
if (isExistParalInSubjob(existParallelMap, node) && !isStartRow
|
||||||
&& (ParallelExecutionUtils.existPreviousPar((Node) con.getSource())
|
&& isComponentNeedRepartion(con, (Node) con.getTarget())) {
|
||||||
|| ParallelExecutionUtils.existPreviousNone((Node) con.getSource()) || ParallelExecutionUtils
|
setRepartioner(con);
|
||||||
.existPreviousRepar((Node) con.getSource()))) {
|
|
||||||
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.setPropertyValue(EParameterName.NONE.getName(), Boolean.TRUE);
|
|
||||||
setParallelization(con.getTarget());
|
|
||||||
} else {
|
} else {
|
||||||
// add flag here is judge for if has did parallelization
|
// when pervious con is par/repar/none,keep current is none
|
||||||
isExistParallel = true;
|
if (isExistParalInSubjob(existParallelMap, node)
|
||||||
INode nextPartionerNode = null;
|
&& (ParallelExecutionUtils.existPreviousPar((Node) con.getSource())
|
||||||
IElementParameter deparElem = con.getElementParameter(EParameterName.DEPARTITIONER.getName());
|
|| ParallelExecutionUtils.existPreviousNone((Node) con.getSource()) || ParallelExecutionUtils
|
||||||
deparElem.setValue(Boolean.FALSE);
|
.existPreviousRepar((Node) con.getSource()))) {
|
||||||
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
setNone(con);
|
||||||
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
|
||||||
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.TRUE);
|
|
||||||
|
|
||||||
if (isStartRow && lineStyle.equals(EConnectionType.FLOW_MERGE)) {
|
|
||||||
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.TRUE);
|
|
||||||
isExistParallel = false;
|
|
||||||
} else {
|
} else {
|
||||||
nextPartionerNode = ParallelExecutionUtils.getNextPartionerTargetNode(con);
|
setPartioner(con, lineStyle, isStartRow);
|
||||||
|
|
||||||
// set the keys from target node keys
|
|
||||||
if (nextPartionerNode != null) {
|
|
||||||
// TDI-26555:in case the target partitioner key not in the main flow.such as
|
|
||||||
// in lookup row,need to go next connection for partitioning
|
|
||||||
if (ParallelExecutionUtils.isConClumnsContainsPartionKey(con,
|
|
||||||
(Node) nextPartionerNode)) {
|
|
||||||
if (ParallelExecutionUtils.getColumnListFromTargetNode((Node) nextPartionerNode)
|
|
||||||
.size() > 0) {
|
|
||||||
ParallelExecutionUtils.setHashKeysFromTarget(con, (Node) nextPartionerNode);
|
|
||||||
} else {
|
|
||||||
ParallelExecutionUtils.setHashKeysForCon(con);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (isStartRow) {
|
|
||||||
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.FALSE);
|
|
||||||
isExistParallel = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ParallelExecutionUtils.setHashKeysForCon(con);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (con.getTarget() != null) {
|
|
||||||
setParallelization(con.getTarget());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!con.getSource().isStart()) {
|
||||||
|
setDepartioner(con);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!con.getSource().isStart()) {
|
setParallelization(con.getTarget());
|
||||||
if (isExistParallel && !ParallelExecutionUtils.existPreviousDepar((Node) con.getSource())) {
|
|
||||||
setDeparallelization(con.getTarget());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
node = con.getTarget();
|
// in case the con here is not data flow,such as onSubjobOk,we skip to next target
|
||||||
setParallelization(node);
|
setParallelization(con.getTarget());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -230,13 +202,87 @@ public class SetParallelizationCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setPartioner(IConnection con, EConnectionType lineStyle, boolean isStartRow) {
|
||||||
|
// add flag here is judge for did parallelization or not
|
||||||
|
INode subjobStartNode = con.getTarget().getSubProcessStartNode(false);
|
||||||
|
if (existParallelMap.containsKey(subjobStartNode)) {
|
||||||
|
existParallelMap.put(subjobStartNode, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
INode nextPartionerNode = null;
|
||||||
|
con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.TRUE);
|
||||||
|
|
||||||
|
if (isStartRow && lineStyle.equals(EConnectionType.FLOW_MERGE)) {
|
||||||
|
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.TRUE);
|
||||||
|
existParallelMap.put(subjobStartNode, false);
|
||||||
|
} else {
|
||||||
|
nextPartionerNode = ParallelExecutionUtils.getNextPartionerTargetNode(con);
|
||||||
|
|
||||||
|
// set the keys from target node keys
|
||||||
|
if (nextPartionerNode != null) {
|
||||||
|
// TDI-26555:in case the target partitioner key not in the main flow.such as
|
||||||
|
// in lookup row,need to go next connection for partitioning
|
||||||
|
if (ParallelExecutionUtils.isConClumnsContainsPartionKey(con, (Node) nextPartionerNode)) {
|
||||||
|
if (ParallelExecutionUtils.getColumnListFromTargetNode((Node) nextPartionerNode).size() > 0) {
|
||||||
|
ParallelExecutionUtils.setHashKeysFromTarget(con, (Node) nextPartionerNode);
|
||||||
|
} else {
|
||||||
|
ParallelExecutionUtils.setHashKeysForCon(con);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isStartRow) {
|
||||||
|
con.setPropertyValue(EParameterName.PARTITIONER.getName(), Boolean.FALSE);
|
||||||
|
existParallelMap.put(subjobStartNode, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ParallelExecutionUtils.setHashKeysForCon(con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (con.getTarget() != null) {
|
||||||
|
setParallelization(con.getTarget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setDepartioner(IConnection con) {
|
||||||
|
// TDI-29137: Need consider the other subjobs when do parallelization
|
||||||
|
INode subJobStart = con.getSource().getSubProcessStartNode(false);
|
||||||
|
boolean existNextPar = ParallelExecutionUtils.isExistParallelCon((Node) subJobStart);
|
||||||
|
boolean existPreDepar = ParallelExecutionUtils.existPreviousDepar((Node) con.getSource());
|
||||||
|
boolean canSetDepar = isExistParalInSubjob(existParallelMap, subJobStart) && existNextPar && !existPreDepar;
|
||||||
|
if (canSetDepar) {
|
||||||
|
setDeparallelization(con.getTarget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setRepartioner(IConnection con) {
|
||||||
|
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.setPropertyValue(EParameterName.REPARTITIONER.getName(), Boolean.TRUE);
|
||||||
|
|
||||||
|
// set the keys for hash keys
|
||||||
|
ParallelExecutionUtils.setHashKeysFromTarget(con, (Node) con.getTarget());
|
||||||
|
setParallelization(con.getTarget());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setNone(IConnection con) {
|
||||||
|
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.getElementParameter(EParameterName.DEPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
|
con.setPropertyValue(EParameterName.NONE.getName(), Boolean.TRUE);
|
||||||
|
setParallelization(con.getTarget());
|
||||||
|
}
|
||||||
|
|
||||||
private void setDeparallelization(INode node) {
|
private void setDeparallelization(INode node) {
|
||||||
if (node.isActivate()) {
|
if (node.isActivate()) {
|
||||||
for (IConnection con : node.getIncomingConnections()) {
|
for (IConnection con : node.getIncomingConnections()) {
|
||||||
EConnectionType lineStyle = con.getLineStyle();
|
EConnectionType lineStyle = con.getLineStyle();
|
||||||
if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
|
if (lineStyle.hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||||
IElementParameter parElem = con.getElementParameter(EParameterName.PARTITIONER.getName());
|
con.getElementParameter(EParameterName.PARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
parElem.setValue(Boolean.FALSE);
|
|
||||||
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
con.getElementParameter(EParameterName.REPARTITIONER.getName()).setValue(Boolean.FALSE);
|
||||||
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
con.getElementParameter(EParameterName.NONE.getName()).setValue(Boolean.FALSE);
|
||||||
con.setPropertyValue(EParameterName.DEPARTITIONER.getName(), Boolean.TRUE);
|
con.setPropertyValue(EParameterName.DEPARTITIONER.getName(), Boolean.TRUE);
|
||||||
@@ -247,4 +293,14 @@ public class SetParallelizationCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setParallelParametersForConn() {
|
||||||
|
for (IConnection conn : node.getProcess().getAllConnections(null)) {
|
||||||
|
boolean isRepar = (Boolean) conn.getPropertyValue(EParameterName.REPARTITIONER.getName());
|
||||||
|
if (isRepar) {
|
||||||
|
// set sort parameter for repartioner
|
||||||
|
ParallelExecutionUtils.setMergeSortByConditions(conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1818,7 +1818,7 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
|||||||
note.setText(noteType.getText());
|
note.setText(noteType.getText());
|
||||||
note.setProcess(this);
|
note.setProcess(this);
|
||||||
loadElementParameters(note, noteType.getElementParameter());
|
loadElementParameters(note, noteType.getElementParameter());
|
||||||
addNote(note);
|
addNote(note, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2269,18 +2269,27 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
|||||||
// here force a rename without call the ChangeConnTextCommand
|
// here force a rename without call the ChangeConnTextCommand
|
||||||
// if goes here, it means simply there is a problem since the name is not the same as the unique
|
// if goes here, it means simply there is a problem since the name is not the same as the unique
|
||||||
// name.
|
// name.
|
||||||
// we just force the name here since in all case the job was wrong first !
|
// we just force the unique name here since in all case the job was wrong first !
|
||||||
connec.setName(connec.getUniqueName());
|
|
||||||
|
connec.setPropertyValue(EParameterName.UNIQUE_NAME.getName(), connec.getName());
|
||||||
|
uniqueName = connec.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// at this point we should have the uniquename set correctly in the connection.
|
// at this point we should have the uniquename set correctly in the connection.
|
||||||
if (!connectionUniqueNames.contains(uniqueName) && checkValidConnectionName(uniqueName, false)) {
|
boolean isValidName = checkValidConnectionName(uniqueName, false);
|
||||||
|
if (!connectionUniqueNames.contains(uniqueName) && isValidName) {
|
||||||
try {
|
try {
|
||||||
source.getProcess().addUniqueConnectionName(uniqueName);
|
source.getProcess().addUniqueConnectionName(uniqueName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// nothing, since it should be added already in fact.
|
// nothing, since it should be added already in fact.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!isValidName) {
|
||||||
|
// fix for TDI-28468 ,some connection uniquename are not valid from some old
|
||||||
|
// version like uniquename = OnSubjobOk (OnSubjobOK(TRIGGER_OUTPUT_1))
|
||||||
|
// if base name is not valid ,generate a new one based on the default link name
|
||||||
|
uniqueName = connec.getLineStyle().getDefaultLinkName();
|
||||||
|
}
|
||||||
uniqueName = source.getProcess().generateUniqueConnectionName(uniqueName);
|
uniqueName = source.getProcess().generateUniqueConnectionName(uniqueName);
|
||||||
if (connec.getLineStyle().hasConnectionCategory(IConnectionCategory.FLOW)) {
|
if (connec.getLineStyle().hasConnectionCategory(IConnectionCategory.FLOW)) {
|
||||||
ChangeConnTextCommand cctc = new ChangeConnTextCommand(connec, uniqueName);
|
ChangeConnTextCommand cctc = new ChangeConnTextCommand(connec, uniqueName);
|
||||||
@@ -3237,10 +3246,16 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
|||||||
this.repositoryId = repositoryId;
|
this.repositoryId = repositoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addNote(Note note) {
|
public void addNote(Note note, boolean fireUpdate) {
|
||||||
elem.add(note);
|
elem.add(note);
|
||||||
notes.add(note);
|
notes.add(note);
|
||||||
fireStructureChange(NEED_UPDATE_JOB, elem);
|
if (fireUpdate) {
|
||||||
|
fireStructureChange(NEED_UPDATE_JOB, elem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addNote(Note note) {
|
||||||
|
addNote(note, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeNote(Note note) {
|
public void removeNote(Note note) {
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ public class ParallelExecutionUtils {
|
|||||||
|
|
||||||
private static final String HASH_KEYS = "HASH_KEYS";
|
private static final String HASH_KEYS = "HASH_KEYS";
|
||||||
|
|
||||||
|
private static final String HASH_PARTION = "HASH_PARTITION";
|
||||||
|
|
||||||
|
private static final String MERGE_SORT = "IS_SORTING";
|
||||||
|
|
||||||
|
private static final String SPECIAL_SORT_COMPONENT = "tSortRow";
|
||||||
|
|
||||||
public static boolean compareKeyPartions(IConnection parConnection, Node needToPar) {
|
public static boolean compareKeyPartions(IConnection parConnection, Node needToPar) {
|
||||||
String partitioning = needToPar.getComponent().getPartitioning();
|
String partitioning = needToPar.getComponent().getPartitioning();
|
||||||
boolean isSame = false;
|
boolean isSame = false;
|
||||||
@@ -63,7 +69,7 @@ public class ParallelExecutionUtils {
|
|||||||
} else if (value instanceof Integer) {
|
} else if (value instanceof Integer) {
|
||||||
Integer index = (Integer) value;
|
Integer index = (Integer) value;
|
||||||
if (nodeElemForList.getListItemsDisplayName().length > index) {
|
if (nodeElemForList.getListItemsDisplayName().length > index) {
|
||||||
columnKeyValues.add((String) nodeElemForList.getListItemsDisplayName()[index]);
|
columnKeyValues.add(nodeElemForList.getListItemsDisplayName()[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,7 +111,7 @@ public class ParallelExecutionUtils {
|
|||||||
if (parTableCon != null) {
|
if (parTableCon != null) {
|
||||||
((List) parTableCon.getValue()).clear();
|
((List) parTableCon.getValue()).clear();
|
||||||
if (targetKeyColumnList.size() > 0) {
|
if (targetKeyColumnList.size() > 0) {
|
||||||
con.getElementParameter("HASH_PARTITION").setValue(true);
|
con.getElementParameter(HASH_PARTION).setValue(true);
|
||||||
|
|
||||||
Object[] itemCon = parTableCon.getListItemsValue();
|
Object[] itemCon = parTableCon.getListItemsValue();
|
||||||
String clumnKeyListName = "";
|
String clumnKeyListName = "";
|
||||||
@@ -155,7 +161,7 @@ public class ParallelExecutionUtils {
|
|||||||
} else if (value instanceof Integer) {
|
} else if (value instanceof Integer) {
|
||||||
Integer index = (Integer) value;
|
Integer index = (Integer) value;
|
||||||
if (clumnNodeList.getListItemsDisplayName().length > index) {
|
if (clumnNodeList.getListItemsDisplayName().length > index) {
|
||||||
columnKeyValues.add((String) clumnNodeList.getListItemsDisplayName()[index]);
|
columnKeyValues.add(clumnNodeList.getListItemsDisplayName()[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,7 +233,7 @@ public class ParallelExecutionUtils {
|
|||||||
if (parTableCon != null) {
|
if (parTableCon != null) {
|
||||||
if (conKeyColumnList.size() > 0) {
|
if (conKeyColumnList.size() > 0) {
|
||||||
((List) parTableCon.getValue()).clear();
|
((List) parTableCon.getValue()).clear();
|
||||||
con.getElementParameter("HASH_PARTITION").setValue(true);
|
con.getElementParameter(HASH_PARTION).setValue(true);
|
||||||
|
|
||||||
Object[] itemCon = parTableCon.getListItemsValue();
|
Object[] itemCon = parTableCon.getListItemsValue();
|
||||||
String clumnKeyListName = "";
|
String clumnKeyListName = "";
|
||||||
@@ -253,7 +259,7 @@ public class ParallelExecutionUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
con.getElementParameter("HASH_PARTITION").setValue(false);
|
con.getElementParameter(HASH_PARTION).setValue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -431,6 +437,23 @@ public class ParallelExecutionUtils {
|
|||||||
return hasDeparInPreviousCon;
|
return hasDeparInPreviousCon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isExistParallelCon(Node startNode) {
|
||||||
|
boolean existPartitioningCon = false;
|
||||||
|
for (IConnection con : startNode.getOutgoingConnections()) {
|
||||||
|
if ((con.getElementParameter(EParameterName.PARTITIONER.getName()) != null && con
|
||||||
|
.getElementParameter(EParameterName.PARTITIONER.getName()).getValue().equals(true))) {
|
||||||
|
existPartitioningCon = true;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
existPartitioningCon = isExistParallelCon((Node) con.getTarget());
|
||||||
|
if (existPartitioningCon) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return existPartitioningCon;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isExistPartitioningCon(Node startNode) {
|
public static boolean isExistPartitioningCon(Node startNode) {
|
||||||
boolean existPartitioningCon = false;
|
boolean existPartitioningCon = false;
|
||||||
for (IConnection con : startNode.getOutgoingConnections()) {
|
for (IConnection con : startNode.getOutgoingConnections()) {
|
||||||
@@ -504,4 +527,71 @@ public class ParallelExecutionUtils {
|
|||||||
target.sortCustomColumns();
|
target.sortCustomColumns();
|
||||||
target.setLabel(source.getLabel());
|
target.setLabel(source.getLabel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setMergeSortByConditions(IConnection currentReparCon) {
|
||||||
|
if (currentReparCon.getSource().getComponent().getName().equals(SPECIAL_SORT_COMPONENT)) {
|
||||||
|
currentReparCon.getElementParameter(MERGE_SORT).setValue(true);
|
||||||
|
} else {
|
||||||
|
Node previousSortNode = ParallelExecutionUtils.getFirstPreviousSortNode(currentReparCon.getSource());
|
||||||
|
for (IConnection outConOfSort : previousSortNode.getOutgoingConnections()) {
|
||||||
|
if ((Boolean) outConOfSort.getPropertyValue(EParameterName.PARTITIONER.getName())
|
||||||
|
|| (Boolean) outConOfSort.getPropertyValue(EParameterName.REPARTITIONER.getName())) {
|
||||||
|
if ((Boolean) outConOfSort.getElementParameter(MERGE_SORT).getValue()) {
|
||||||
|
currentReparCon.getElementParameter(MERGE_SORT).setValue(false);
|
||||||
|
} else {
|
||||||
|
currentReparCon.getElementParameter(MERGE_SORT).setValue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IConnection getPreviousMainCon(Node previousNode) {
|
||||||
|
for (IConnection con : previousNode.getIncomingConnections()) {
|
||||||
|
if (con.getLineStyle().equals(EConnectionType.FLOW_MAIN)) {
|
||||||
|
return con;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IConnection getFirstPreviousParCon(Node previousNode) {
|
||||||
|
for (IConnection con : previousNode.getIncomingConnections()) {
|
||||||
|
if ((con.getElementParameter(EParameterName.PARTITIONER.getName()) != null && con
|
||||||
|
.getElementParameter(EParameterName.PARTITIONER.getName()).getValue().equals(true))
|
||||||
|
|| (con.getElementParameter(EParameterName.REPARTITIONER.getName()) != null && con
|
||||||
|
.getElementParameter(EParameterName.REPARTITIONER.getName()).getValue().equals(true))) {
|
||||||
|
return con;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Node getFirstPreviousSortNode(INode previousNode) {
|
||||||
|
for (IConnection con : previousNode.getIncomingConnections()) {
|
||||||
|
if (con.getSource().getComponent().getName().equals(SPECIAL_SORT_COMPONENT)) {
|
||||||
|
if (con.getLineStyle().equals(EConnectionType.FLOW_MAIN)) {
|
||||||
|
return (Node) con.getSource();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return getFirstPreviousSortNode(con.getSource());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IConnection getRepeatMergeSortCon(IConnection currentConn) {
|
||||||
|
Node previousSortNode = ParallelExecutionUtils.getFirstPreviousSortNode(currentConn.getSource());
|
||||||
|
if (previousSortNode != null) {
|
||||||
|
for (IConnection outConOfSort : previousSortNode.getOutgoingConnections()) {
|
||||||
|
if (outConOfSort.getElementParameter(EParameterName.PARTITIONER.getName()).getValue().equals(true)
|
||||||
|
|| outConOfSort.getElementParameter(EParameterName.REPARTITIONER.getName()).getValue().equals(true)) {
|
||||||
|
if ((Boolean) outConOfSort.getElementParameter(MERGE_SORT).getValue()) {
|
||||||
|
return outConOfSort;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1058,6 +1058,9 @@ public class RunProcessContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void processPerformances(final String data, final PerformanceData perfData, final IConnection conn) {
|
private void processPerformances(final String data, final PerformanceData perfData, final IConnection conn) {
|
||||||
|
if (conn == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
processPerformanceForConnection(data, perfData, conn);
|
processPerformanceForConnection(data, perfData, conn);
|
||||||
String uniqueName = ConnectionUtil.getConnectionUnifiedName(conn);
|
String uniqueName = ConnectionUtil.getConnectionUnifiedName(conn);
|
||||||
IConnection[] shadowConnections = traceConnectionsManager.getShadowConnenctions(uniqueName);
|
IConnection[] shadowConnections = traceConnectionsManager.getShadowConnenctions(uniqueName);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class XmlMapExpressionManager {
|
|||||||
|
|
||||||
private final static String EXPRESSION_PATTERN = "(\\[)\\s*(\\w+)\\s*\\.(\\w+\\s*:\\s*(/.+?)+(/@.+?)*)\\s*(\\])|((?!\\[)\\s*\\w+)\\s*\\.\\s*(\\w+(?!\\]))";
|
private final static String EXPRESSION_PATTERN = "(\\[)\\s*(\\w+)\\s*\\.(\\w+\\s*:\\s*(/.+?)+(/@.+?)*)\\s*(\\])|((?!\\[)\\s*\\w+)\\s*\\.\\s*(\\w+(?!\\]))";
|
||||||
|
|
||||||
private final String SUBS_PATTERN_FOR_REPLACE_LOCATION = "{0}(\\s*){1}(\\s*)\\.(\\s*){2}(\\s*){3}";
|
private final String SUBS_PATTERN_FOR_REPLACE_LOCATION = "{0}(\\s*\\b){1}(\\s*)\\.(\\s*){2}(\\b\\s*){3}";
|
||||||
|
|
||||||
private Perl5Matcher matcher = new Perl5Matcher();
|
private Perl5Matcher matcher = new Perl5Matcher();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
source.. = src/
|
|
||||||
output.. = bin/
|
output.. = bin/
|
||||||
bin.includes = META-INF/,\
|
bin.includes = META-INF/,\
|
||||||
.,\
|
.,\
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
source.. = src/
|
|
||||||
output.. = bin/
|
output.. = bin/
|
||||||
bin.includes = META-INF/,\
|
bin.includes = META-INF/,\
|
||||||
.,\
|
.,\
|
||||||
|
|||||||
Binary file not shown.
@@ -495,6 +495,10 @@ LoginComposite.buttons.changeButton=Change
|
|||||||
LoginComposite.label.workspace=Workspace
|
LoginComposite.label.workspace=Workspace
|
||||||
LoginComposite.NewCreate=Create...
|
LoginComposite.NewCreate=Create...
|
||||||
LoginComposite.NewImport=Import...
|
LoginComposite.NewImport=Import...
|
||||||
|
LoginComposite.updateArchiva=Update is required,please click the button to update.
|
||||||
|
LoginComposite.archivaFailed=Update site does not work.
|
||||||
|
LoginComposite.archivaFinish=Update finished,need to restart.
|
||||||
|
LoginComposite.archivaJarLost=The javax.ws.rs-api-2.0-m10.jar is required to use the Update Site functionality.
|
||||||
TOSLoginComposite.welcomeTitle=Welcome to {0}.Please select an existing \nproject to start work,or create a new one.
|
TOSLoginComposite.welcomeTitle=Welcome to {0}.Please select an existing \nproject to start work,or create a new one.
|
||||||
TOSLoginComposite.projectLabel=Project:
|
TOSLoginComposite.projectLabel=Project:
|
||||||
TOSLoginComposite.openButton=Open
|
TOSLoginComposite.openButton=Open
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.eclipse.core.runtime.Platform;
|
|||||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
||||||
|
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
@@ -80,6 +81,7 @@ import org.osgi.service.prefs.BackingStoreException;
|
|||||||
import org.talend.commons.exception.BusinessException;
|
import org.talend.commons.exception.BusinessException;
|
||||||
import org.talend.commons.exception.LoginException;
|
import org.talend.commons.exception.LoginException;
|
||||||
import org.talend.commons.exception.PersistenceException;
|
import org.talend.commons.exception.PersistenceException;
|
||||||
|
import org.talend.commons.exception.SystemException;
|
||||||
import org.talend.commons.exception.WarningException;
|
import org.talend.commons.exception.WarningException;
|
||||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||||
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||||
@@ -295,6 +297,8 @@ public class LoginComposite extends Composite {
|
|||||||
|
|
||||||
private static Logger log = Logger.getLogger(LoginComposite.class);
|
private static Logger log = Logger.getLogger(LoginComposite.class);
|
||||||
|
|
||||||
|
private String archivaErrorMsg = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new LoginComposite.
|
* Constructs a new LoginComposite.
|
||||||
*
|
*
|
||||||
@@ -374,6 +378,40 @@ public class LoginComposite extends Composite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateArchivaErrorButton() {
|
||||||
|
iconLabel.setImage(LOGIN_WARNING_IMAGE);
|
||||||
|
onIconLabel.setImage(LOGIN_WARNING_IMAGE);
|
||||||
|
colorComposite.setBackground(YELLOW_COLOR);
|
||||||
|
onIconLabel.setBackground(colorComposite.getBackground());
|
||||||
|
statusLabel.setText(Messages.getString("LoginComposite.archivaFailed")); //$NON-NLS-1$ //, the third party jar is required,please install it.
|
||||||
|
statusLabel.setBackground(YELLOW_COLOR);
|
||||||
|
statusLabel.setForeground(WHITE_COLOR);
|
||||||
|
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);// Arial courier
|
||||||
|
statusLabel.setFont(font);
|
||||||
|
openProjectBtn.setEnabled(true);
|
||||||
|
updateBtn.setVisible(true);
|
||||||
|
updateBtn.setEnabled(true);
|
||||||
|
updateBtn.setText("Details");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for archivaErrorMsg.
|
||||||
|
*
|
||||||
|
* @return the archivaErrorMsg
|
||||||
|
*/
|
||||||
|
public String getArchivaErrorMsg() {
|
||||||
|
return this.archivaErrorMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the archivaErrorMsg.
|
||||||
|
*
|
||||||
|
* @param archivaErrorMsg the archivaErrorMsg to set
|
||||||
|
*/
|
||||||
|
public void setArchivaErrorMsg(String archivaErrorMsg) {
|
||||||
|
this.archivaErrorMsg = archivaErrorMsg;
|
||||||
|
}
|
||||||
|
|
||||||
private void initConnection() {
|
private void initConnection() {
|
||||||
if (storedConnections == null || storedConnections.size() == 0) {
|
if (storedConnections == null || storedConnections.size() == 0) {
|
||||||
getConnection();
|
getConnection();
|
||||||
@@ -1061,7 +1099,6 @@ public class LoginComposite extends Composite {
|
|||||||
updateBtnformData.right = new FormAttachment(restartBut, -5);
|
updateBtnformData.right = new FormAttachment(restartBut, -5);
|
||||||
updateBtnformData.bottom = new FormAttachment(100, 0);
|
updateBtnformData.bottom = new FormAttachment(100, 0);
|
||||||
updateBtn.setLayoutData(updateBtnformData);// new GridData(GridData.FILL_HORIZONTAL)
|
updateBtn.setLayoutData(updateBtnformData);// new GridData(GridData.FILL_HORIZONTAL)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createTisRepositoryArea(Composite parent) {
|
private void createTisRepositoryArea(Composite parent) {
|
||||||
@@ -1714,36 +1751,57 @@ public class LoginComposite extends Composite {
|
|||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
// install and update all patches;
|
// install and update all patches;
|
||||||
try {
|
try {
|
||||||
ICoreTisService tisService = (ICoreTisService) GlobalServiceRegister.getDefault().getService(
|
if (updateBtn.getText().equals("update")) {
|
||||||
ICoreTisService.class);
|
ICoreTisService tisService = (ICoreTisService) GlobalServiceRegister.getDefault().getService(
|
||||||
afterUpdate = false;
|
ICoreTisService.class);
|
||||||
if (tisService != null) {
|
afterUpdate = false;
|
||||||
JSONObject archivaProperties = getArchivaServicesProperties(getAdminURL());
|
if (tisService != null) {
|
||||||
String archivaServicesURL = archivaProperties.getString(ARCHIVA_SERVICES_URL_KEY)
|
JSONObject archivaProperties = getArchivaServicesProperties(getAdminURL());
|
||||||
+ ARCHIVA_SERVICES_SEGMENT;
|
String archivaServicesURL = archivaProperties.getString(ARCHIVA_SERVICES_URL_KEY)
|
||||||
String repository = archivaProperties.getString(ARCHIVA_REPOSITORY_KEY);
|
+ ARCHIVA_SERVICES_SEGMENT;
|
||||||
String username = archivaProperties.getString(ARCHIVA_USER);
|
String repository = archivaProperties.getString(ARCHIVA_REPOSITORY_KEY);
|
||||||
String password = archivaProperties.getString(ARCHIVA_USER_PWD);
|
String username = archivaProperties.getString(ARCHIVA_USER);
|
||||||
List<String> repositories = new ArrayList<String>();
|
String password = archivaProperties.getString(ARCHIVA_USER_PWD);
|
||||||
// if no repository return,just use a empty repositories array
|
List<String> repositories = new ArrayList<String>();
|
||||||
if (repository != null) {
|
// if no repository return,just use a empty repositories array
|
||||||
repositories.add(repository);
|
if (repository != null) {
|
||||||
|
repositories.add(repository);
|
||||||
|
}
|
||||||
|
tisService.downLoadAndInstallUpdateSites(archivaServicesURL, username, password, updateSiteToInstall,
|
||||||
|
repositories);
|
||||||
|
afterUpdate = true;
|
||||||
|
tisService.setNeedResartAfterUpdate(afterUpdate);
|
||||||
|
updateSiteToInstall.clear();
|
||||||
}
|
}
|
||||||
tisService.downLoadAndInstallUpdateSites(archivaServicesURL, username, password, updateSiteToInstall,
|
// need to relauch the studio automaticlly after updating
|
||||||
repositories);
|
isRestart = true;
|
||||||
afterUpdate = true;
|
perReader.saveLastConnectionBean(getConnection());
|
||||||
tisService.setNeedResartAfterUpdate(afterUpdate);
|
dialog.okPressed();
|
||||||
updateSiteToInstall.clear();
|
} else {
|
||||||
|
String[] buttons = new String[] { IDialogConstants.OK_LABEL };
|
||||||
|
String message = Messages.getString("LoginComposite.archivaJarLost");
|
||||||
|
ArchivaErrorDialog archivaDialog = new ArchivaErrorDialog(getShell(), "Warning", null, message,
|
||||||
|
MessageDialog.WARNING, buttons, 0);
|
||||||
|
archivaDialog.open();
|
||||||
}
|
}
|
||||||
// need to relauch the studio automaticlly after updating
|
|
||||||
isRestart = true;
|
|
||||||
perReader.saveLastConnectionBean(getConnection());
|
|
||||||
dialog.okPressed();
|
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
ExceptionHandler.process(e1);
|
ExceptionHandler.process(e1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// archivaErrorButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void widgetSelected(SelectionEvent e) {
|
||||||
|
// String[] buttons = new String[] { IDialogConstants.OK_LABEL };
|
||||||
|
// String message = "The javax.ws.rs-api-2.0-m10.jar is required to use the Update Site functionality.";
|
||||||
|
// ArchivaErrorDialog archivaDialog = new ArchivaErrorDialog(getShell(), "Warning", LOGIN_CORRECT_IMAGE,
|
||||||
|
// message,
|
||||||
|
// HORIZONTAL_SPACE, buttons, HORIZONTAL_FOUR_SPACE);
|
||||||
|
//
|
||||||
|
// archivaDialog.open();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateUpdate() throws JSONException {
|
private void validateUpdate() throws JSONException {
|
||||||
@@ -1785,7 +1843,7 @@ public class LoginComposite extends Composite {
|
|||||||
onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);
|
onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);
|
||||||
colorComposite.setBackground(RED_COLOR);
|
colorComposite.setBackground(RED_COLOR);
|
||||||
onIconLabel.setBackground(colorComposite.getBackground());
|
onIconLabel.setBackground(colorComposite.getBackground());
|
||||||
statusLabel.setText("Update finished,need to restart"); //$NON-NLS-1$
|
statusLabel.setText(Messages.getString("LoginComposite.archivaFinish")); //$NON-NLS-1$
|
||||||
statusLabel.setBackground(RED_COLOR);
|
statusLabel.setBackground(RED_COLOR);
|
||||||
statusLabel.setForeground(WHITE_COLOR);
|
statusLabel.setForeground(WHITE_COLOR);
|
||||||
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);// Arial courier
|
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);// Arial courier
|
||||||
@@ -1800,7 +1858,7 @@ public class LoginComposite extends Composite {
|
|||||||
onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);
|
onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);
|
||||||
colorComposite.setBackground(RED_COLOR);
|
colorComposite.setBackground(RED_COLOR);
|
||||||
onIconLabel.setBackground(colorComposite.getBackground());
|
onIconLabel.setBackground(colorComposite.getBackground());
|
||||||
statusLabel.setText("Update is required,please click the button to update"); //$NON-NLS-1$
|
statusLabel.setText(Messages.getString("LoginComposite.updateArchiva")); //$NON-NLS-1$
|
||||||
statusLabel.setBackground(RED_COLOR);
|
statusLabel.setBackground(RED_COLOR);
|
||||||
statusLabel.setForeground(WHITE_COLOR);
|
statusLabel.setForeground(WHITE_COLOR);
|
||||||
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);// Arial courier
|
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);// Arial courier
|
||||||
@@ -1808,18 +1866,21 @@ public class LoginComposite extends Composite {
|
|||||||
openProjectBtn.setEnabled(!needUpdate);
|
openProjectBtn.setEnabled(!needUpdate);
|
||||||
updateBtn.setVisible(needUpdate);
|
updateBtn.setVisible(needUpdate);
|
||||||
updateBtn.setEnabled(needUpdate);
|
updateBtn.setEnabled(needUpdate);
|
||||||
|
updateBtn.setText("update");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
updateBtn.setVisible(false);
|
updateBtn.setVisible(false);
|
||||||
updateBtn.setEnabled(false);
|
updateBtn.setEnabled(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (PersistenceException e) {
|
} catch (PersistenceException e) {
|
||||||
ExceptionHandler.process(e);
|
ExceptionHandler.process(e);
|
||||||
} catch (LoginException e) {
|
} catch (LoginException e) {
|
||||||
ExceptionHandler.process(e);
|
ExceptionHandler.process(e);
|
||||||
|
} catch (SystemException e) {
|
||||||
|
updateArchivaErrorButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getAdminURL() {
|
private String getAdminURL() {
|
||||||
@@ -1847,7 +1908,8 @@ public class LoginComposite extends Composite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// method need update is used to control the status of updateBtn
|
// method need update is used to control the status of updateBtn
|
||||||
private boolean needUpdate(String username, String password, String archivaURL, List<String> repositories) {
|
private boolean needUpdate(String username, String password, String archivaURL, List<String> repositories)
|
||||||
|
throws SystemException {
|
||||||
|
|
||||||
ICoreTisService tisService = (ICoreTisService) GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
|
ICoreTisService tisService = (ICoreTisService) GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
|
||||||
if (tisService != null) {
|
if (tisService != null) {
|
||||||
@@ -2703,4 +2765,44 @@ public class LoginComposite extends Composite {
|
|||||||
}
|
}
|
||||||
return fontsize;
|
return fontsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class ArchivaErrorDialog extends MessageDialog {
|
||||||
|
|
||||||
|
public ArchivaErrorDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
|
||||||
|
int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
|
||||||
|
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Composite createCustomArea(Composite parent) {
|
||||||
|
Composite helpComposite = new Composite(parent, SWT.NONE);
|
||||||
|
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
|
gridData.minimumHeight = 45;
|
||||||
|
helpComposite.setLayoutData(gridData);
|
||||||
|
GC gc = new GC(helpComposite);
|
||||||
|
String linkLabel = "How to install a jar"; //$NON-NLS-1$
|
||||||
|
Point linkSize = gc.stringExtent(linkLabel);
|
||||||
|
Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.NORMAL);
|
||||||
|
Hyperlink link = new Hyperlink(helpComposite, SWT.NONE);
|
||||||
|
link.setText(linkLabel);
|
||||||
|
link.setSize(linkSize.x + 15, 30);
|
||||||
|
link.setBackground(helpComposite.getBackground());
|
||||||
|
link.setUnderlined(true);
|
||||||
|
link.setFont(font);
|
||||||
|
|
||||||
|
GridData gridData1 = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
||||||
|
gridData1.widthHint = this.getMinimumMessageWidth();
|
||||||
|
link.setLayoutData(gridData1);
|
||||||
|
gc.dispose();
|
||||||
|
link.addHyperlinkListener(new HyperlinkAdapter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void linkActivated(HyperlinkEvent e) {
|
||||||
|
String url = "https://help.talend.com/pages/viewpage.action?pageId=14230347";
|
||||||
|
TalendBrowserLaunchHelper.openURL(url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return helpComposite;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,10 +33,12 @@ import org.talend.sqlbuilder.sessiontree.model.SessionTreeNode;
|
|||||||
*/
|
*/
|
||||||
public class ColumnInfoTab extends AbstractDataSetTab {
|
public class ColumnInfoTab extends AbstractDataSetTab {
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getLabelText() {
|
public String getLabelText() {
|
||||||
return Messages.getString("DatabaseDetailView.Tab.ColumnInfo"); //$NON-NLS-1$
|
return Messages.getString("DatabaseDetailView.Tab.ColumnInfo"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public DataSet getDataSet() throws Exception {
|
public DataSet getDataSet() throws Exception {
|
||||||
|
|
||||||
INode node = getNode();
|
INode node = getNode();
|
||||||
@@ -67,8 +69,14 @@ public class ColumnInfoTab extends AbstractDataSetTab {
|
|||||||
.getColumns(ti.getCatalogName(), ti.getSchemaName(), realTableName, "%"); //$NON-NLS-1$
|
.getColumns(ti.getCatalogName(), ti.getSchemaName(), realTableName, "%"); //$NON-NLS-1$
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// https://jira.talendforge.org/browse/TDI-28578
|
||||||
resultSet = node.getSession().getMetaData().getColumns(tableNode.getTableInfo());
|
String tableName = ti.getSimpleName();
|
||||||
|
if (tableName.contains("/")) {
|
||||||
|
tableName = tableName.replaceAll("/", "//");
|
||||||
|
}
|
||||||
|
resultSet = node.getSession().getMetaData().getJDBCMetaData()
|
||||||
|
.getColumns(ti.getCatalogName(), ti.getSchemaName(), tableName, "%");
|
||||||
|
// resultSet = node.getSession().getMetaData().getColumns(tableNode.getTableInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
DataSet dataSet = new DataSet(null, resultSet, new int[] { 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 });
|
DataSet dataSet = new DataSet(null, resultSet, new int[] { 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 });
|
||||||
@@ -79,6 +87,7 @@ public class ColumnInfoTab extends AbstractDataSetTab {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getStatusMessage() {
|
public String getStatusMessage() {
|
||||||
return Messages.getString("DatabaseDetailView.Tab.ColumnInfo.status", getNode().getQualifiedName()); //$NON-NLS-1$
|
return Messages.getString("DatabaseDetailView.Tab.ColumnInfo.status", getNode().getQualifiedName()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
@@ -107,4 +116,4 @@ public class ColumnInfoTab extends AbstractDataSetTab {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user