Compare commits

...

22 Commits

Author SHA1 Message Date
wwang-talend
ad2181551e add readme for patch 2020-05-28 15:13:28 +08:00
wang wei
25b4724de6 fix(TDI-43410): Enable AWS ECS role for tAmazonEMR component (#4247) 2020-05-28 15:04:20 +08:00
wang wei
f6d7c55c06 fix(TDI-43409): Enable AWS ECS role for tSQS component (#4248) 2020-05-28 15:04:12 +08:00
Dmytro Sylaiev
4fa889ddfd Dsylaiev/tdi 43810 add ignore service attr checkbox for xml (#4539)
* fix(TDI-43810): Fix for xml component

* fix(TDI-43810): Do not ignore service attr when checkbox is hidden

* fix(TDI-43810): Use hashset instead of arraylist

* fix(TDI-43810): Minor refactoring
2020-03-24 14:47:55 +02:00
Jane Ding
1b0b5b9c4b Jding/patch711/tps 3786 (#4497)
* fix(TUP-22620)java.lang.StackOverflowError exception when opening the (#3391) (#3399)

* fix(TUP-22620)java.lang.StackOverflowError exception when opening the
job in studio
https://jira.talendforge.org/browse/TUP-22620

* fix(TUP-22620)java.lang.StackOverflowError exception when opening the
job in studio
https://jira.talendforge.org/browse/TUP-22620

* fix(TUP-22620)java.lang.StackOverflowError exception when opening the (#3402) (#3406)

job in studio
https://jira.talendforge.org/browse/TUP-22620
Since my new added test testCheckCircle is the first one to execute, it
used common variable node broke other test balance. Modify to use it own
private variable.
2020-03-02 18:29:38 +08:00
hwang-talend
4fa291afa5 Hwang/tup 26059 (#4436)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"
2020-03-02 17:01:26 +08:00
Mike Yan
2410d7c81b fix(TESB-28166): [CI] Missig fieature.xml in esb consumer and service (#4494) 2020-03-02 14:21:45 +08:00
apoltavtsev
a6dac58827 fix(TESB-27583): Maven nature is added to child Job for OSGI build 2020-01-20 10:46:58 +01:00
Denis Sergent
d1ce25465c fix(TESB-27030): Exclude jms library when it is used from tRunJob (#4340)
Backport for patch 7.1.1 (#4045)
* fix(TESB-27030): Avoid to add activemq-all lib in OSGi bundle
* fix(TESB-27030): Exclude jms library when it is used from tRunJob

Conflicts:
	main/plugins/org.talend.repository/src/main/java/org/talend/repository/ui/wizards/exportjob/scriptsmanager/esb/JobJavaScriptOSGIForESBManager.java

Co-authored-by: Mike Yan <yyan@talend.com>
2020-01-17 10:44:32 +01:00
bhe-talendbj
1f31ea1c4f backport(TUP-25237) backport (#4218)
Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/java/TalendJavaProjectManager.java
2020-01-03 17:41:35 +08:00
hwang-talend
4a28c50b04 bugfix(TUP-23228):The order of schema changed when ticked "used column" (#3525) (#4234)
bugfix(TUP-23228):The order of schema changed when ticked "used column" again
2020-01-03 17:38:09 +08:00
Chao MENG
6beef70589 fix(TUP-24749): [7.2.1] issue to download component jar via https proxy (#4167) (#4184) (#4279)
fix(TUP-24749): [7.2.1] issue to download component jar via https proxy
https://jira.talendforge.org/browse/TUP-24749
2020-01-03 17:35:14 +08:00
hzhao-talendbj
06be524b5c bugfix(TUP-25035)Implicit tContextLoad feature (with selection from (#4268) (#4276)
file) uses a hardcoded encoding of ISO-8859-15
2020-01-03 17:31:18 +08:00
bhe-talendbj
139acb8b90 backport(TUP-25257) 2019-12-12 10:48:47 +08:00
hwang-talend
e1a8dfc24b bugfix(TUP-24355):Default Context environment appended after migrating (#4037) (#4041)
bugfix(TUP-24355):Default Context environment appended after migrating
2019-12-09 10:54:44 +08:00
hwang-talend
6782042783 bugfix(TUP-24355):Default Context environment appended after migrating (#3927)
* bugfix(TUP-24355):Default Context environment appended after migrating
to 7.2.1
2019-12-09 10:54:41 +08:00
hzhao-talendbj
c54af4b1e2 Hengzhao/bugfix/tup 25035 (#4157)
* feat(TUP-25035)Implicit tContextLoad feature (with selection from file)
uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15
2019-12-09 10:46:24 +08:00
Hanna Liashchuk
71e572da23 patch(TPS-3584): Header field is ignored in Service account mode tBigQueryBulkExec (TBD-8951) (#4210) 2019-12-06 16:43:13 +02:00
hwang
d46c202e6b bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
#1102
2019-11-11 13:06:27 +08:00
nrousseau
f536ed47ae Nrousseau/tup 24884 backport (#4110)
* bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4042)

bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job

* bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4101)

bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
2019-11-11 11:41:58 +08:00
hwang-talend
de82c16af4 bugfix(TUP-23322):context value doesn't update after publishing the job (#3555) (#3580)
bugfix(TUP-23322):context value doesn't update after publishing the job to release repository
2019-11-11 10:42:53 +08:00
apoltavtsev
c5eac4ef90 TESB-27081 SOAP Action missing while calling a SOAP WebService through tESBConsumer 2019-11-08 10:03:22 +01:00
36 changed files with 525 additions and 32 deletions

57
PATCH_RELEASE_NOTE.md Normal file
View File

@@ -0,0 +1,57 @@
---
version: 7.1.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-4052
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20200528\_TPS-4052\_v1-7.1.1 |
| Release Date | 2020-05-28 |
| Target Version | 20181026_1147-V7.1.1 |
| Product affected | Talend Studio |
## Introduction
This is a self-contained patch.
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
## Fixed issues
This patch contains the following fixes:
- TPS-4052 [7.1.1] S3/SQS Components Inherit Role Issue in AWS Fargate (TDI-43410, TDI-43409, TDI-42687)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 7.1.1 must be installed.
## Installation
### Installing the patch using Software update
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
### Installing the patch using Talend Studio
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
### Installing the patch using Commandline
Execute the following commands:
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}

View File

@@ -574,15 +574,16 @@
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
csvOptions_<%=cid%>.setSkipLeadingRows(<%=ElementParameterParser.getValue(node, "__GS_FILE_HEADER__")%>);
<%if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) {
%>
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>).build());
csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>);
<%
}
%>
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.build());
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build()));
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)));
if (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {

View File

@@ -54,7 +54,7 @@
<%
} else {
%>
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.auth.InstanceProfileCredentialsProvider();
com.amazonaws.auth.AWSCredentialsProvider credentialsProvider_<%=cid%> = new com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper();
<%
}
%>

View File

@@ -106,7 +106,12 @@
REQUIRED="false" NUM_ROW="11">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT>
@@ -173,6 +178,8 @@
TARGET="Out.CREATE" />
<TEMPLATE_PARAM SOURCE="self.CREATE_EMPTY_ELEMENT"
TARGET="Out.CREATE_EMPTY_ELEMENT" />
<TEMPLATE_PARAM SOURCE="self.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY"
TARGET="Out.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" />
<TEMPLATE_PARAM SOURCE="self.EXPAND_EMPTY_ELM"
TARGET="Out.EXPAND_EMPTY_ELM" />
<TEMPLATE_PARAM SOURCE="self.OUTPUT_AS_XSD"

View File

@@ -43,4 +43,5 @@ SCHEMA.NAME=Schema
THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column
XSD_FILE.NAME=XSD file path
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)

View File

@@ -45,6 +45,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
String removeHeader = ElementParameterParser.getValue(node, "__REMOVE_HEADER__"); // add for feature7788
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
boolean isAllowEmpty = ("true").equals(ElementParameterParser.getValue(node, "__CREATE_EMPTY_ELEMENT__"));
boolean ignoreServiceAttributes = ("true").equals(ElementParameterParser.getValue(node, "__IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY__"));
boolean expandEmptyElm = ("true").equals(ElementParameterParser.getValue(node, "__EXPAND_EMPTY_ELM__"));
String mode = ElementParameterParser.getValue(node, "__GENERATION_MODE__");
List<Map<String, String>> rootTable =
@@ -200,6 +201,18 @@ java.util.Map<String,String> arraysValueMap_<%=cid%> = new java.util.HashMap<Str
%>
class NestXMLTool_<%=cid%>{
<%
if (!isAllowEmpty && ignoreServiceAttributes) {
%>
private java.util.Set<String> serviceAttributeNames = new java.util.HashSet<>();
{
serviceAttributeNames.add("type");
serviceAttributeNames.add("class");
serviceAttributeNames.add("array");
}
<%
}
%>
public void parseAndAdd(org.dom4j.Element nestRoot, String value){
try {
org.dom4j.Document doc4Str = org.dom4j.DocumentHelper.parseText("<root>"+ value + "</root>");
@@ -235,16 +248,25 @@ class NestXMLTool_<%=cid%>{
for (org.dom4j.Element tmp: (java.util.List<org.dom4j.Element>) root.elements()) {
removeEmptyElement(tmp);
}
if (root.content().size() == 0
&& root.attributes().size() == 0
&& root.declaredNamespaces().size() == 0) {
if(root.getParent()!=null){
root.getParent().remove(root);
boolean noSignificantDataAnnotationsExist = root.attributes().isEmpty() <%if (!isAllowEmpty && ignoreServiceAttributes) {%>|| isOnlyServiceAttributesDeclared(root.attributes()) <% } %>;
if (root.content().isEmpty()
&& noSignificantDataAnnotationsExist && root.declaredNamespaces().isEmpty()) {
if(root.getParent()!=null){
root.getParent().remove(root);
}
}
}
}
}
}
<%
if (!isAllowEmpty && ignoreServiceAttributes) {
%>
private boolean isOnlyServiceAttributesDeclared(List<org.dom4j.Attribute> attributes) {
return attributes.stream().allMatch(a -> serviceAttributeNames.contains(a.getName().toLowerCase()));
}
<%
}
%>
public String objectToString(Object value){
if(value.getClass().isArray()){
StringBuilder sb = new StringBuilder();

View File

@@ -99,6 +99,11 @@
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT>

View File

@@ -44,5 +44,6 @@ THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column
XML_FIELD.NAME=XML Field
XSD_FILE.NAME=XSD file path
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)
COMPACT_FORMAT.NAME = Compact Format

View File

@@ -30,7 +30,7 @@
<%
if(inheritCredentials) {
%>
credentialsProvider_<%=cid%> = new com.amazonaws.auth.InstanceProfileCredentialsProvider();
credentialsProvider_<%=cid%> = new com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper();
<%} else {%>
com.amazonaws.auth.AWSCredentials credentials_<%=cid%> = new com.amazonaws.auth.BasicAWSCredentials(<%=accesskey%>,decryptedPassword_<%=cid%>);

View File

@@ -759,6 +759,15 @@
name="ChangeOracleVersionForProjectSetting"
version="5.2.1">
</projecttask>
<projecttask
beforeLogon="false"
breaks="7.1.0"
class="org.talend.designer.core.utils.FillTRunJobReferenceParametersMigrationTask"
description="Fix empty process id parameters for tRunjob node."
id="org.talend.designer.core.utils.FillTRunJobReferenceParametersMigrationTask"
name="Fix empty process id parameters for tRunjob node"
version="7.1.1">
</projecttask>
</extension>
<extension
point="org.talend.repository.projectsetting_page">

View File

@@ -272,6 +272,7 @@ EParameterName.FunName=Function name
EParameterName.IDocName=IDoc name
EParameterName.fromDatabaseFlag=From Database
EParameterName.fromFileFlag=From File
EParameterName.OverrideEncodingFlag=Override Encoding
EParameterName.generateCode=Generate Code
EParameterName.help=Help
EParameterName.host=Host
@@ -733,6 +734,7 @@ PerformancePreferencePage.generateCode=Generate code when opening the job
PerformancePreferencePage.checkVersion=Check only the last version when updating jobs or joblets
PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts
PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection.
PerformancePreferencePage.propagateContext=Propagate contexts added in repository context groups
PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds)
PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema)
PerformancePreferencePage.HBaseOrMaprDBScanLimitTip=If set it by zero, will be same as deactiving the limit.

View File

@@ -226,6 +226,9 @@ public enum EParameterName {
FIELDSEPARATOR(Messages.getString("EParameterName.FieldSeparator")), //$NON-NLS-1$
ROWSEPARATOR(Messages.getString("EParameterName.RowSeparator")), //$NON-NLS-1$
FROM_FILE_FLAG(Messages.getString("EParameterName.fromFileFlag")), //$NON-NLS-1$
OVERRIDE_ENCODING_FLAG(Messages.getString("EParameterName.OverrideEncodingFlag")), //$NON-NLS-1$
// for override encoding (name should be diff from the encoding of Stats&Logs)
OVERRIDE_ENCODING_IN_EXTRA("OVERRIDE_ENCODING_IN_EXTRA"), //$NON-NLS-1$
FROM_DATABASE_FLAG(Messages.getString("EParameterName.fromDatabaseFlag")), //$NON-NLS-1$
// implict tConextLoad parameters.
LOAD_NEW_VARIABLE(Messages.getString("EParameterName.LoadNewVariableLabel")), //$NON-NLS-1$

View File

@@ -2248,6 +2248,9 @@ public class EmfComponent extends AbstractBasicComponent {
readOnlyColumnPosition = EReadOnlyComlumnPosition.BOTTOM.toString();
}
defaultTable.setReadOnlyColumnPosition(readOnlyColumnPosition);
List<String> originalColumns = new ArrayList<>();
int nbCustom = 0;
for (int i = 0; i < xmlColumnList.size(); i++) {
xmlColumn = (COLUMNType) xmlColumnList.get(i);
@@ -2283,9 +2286,11 @@ public class EmfComponent extends AbstractBasicComponent {
talendColumn.setCustomId(-1);
}
talendColumnList.add(talendColumn);
originalColumns.add(talendColumn.getLabel());
}
defaultTable.setListColumns(talendColumnList);
defaultTable.setOriginalColumns(originalColumns);
// store the default table in default value
IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();

View File

@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.jface.resource.ImageDescriptor;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
@@ -31,6 +32,7 @@ import org.talend.core.model.process.IReplaceNodeInProcess;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryEditorInput;
import org.talend.core.model.update.UpdateResult;
import org.talend.designer.core.ui.editor.process.Process;
@@ -143,7 +145,7 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
}
}
}
/**
* DOC qzhang Comment method "canDeleteNode".
*
@@ -257,5 +259,10 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
public boolean canHandleNode(INode node) {
return false;
}
public IRepositoryEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
Boolean openedInJob) throws PersistenceException{
return null;
}
}

View File

@@ -808,6 +808,9 @@ public class ConnectionManager {
if (list.contains(newTarget)) {
return true;
}
if (source.equals(newTarget)) {
return true;
}
return false;
}

View File

@@ -256,6 +256,9 @@ public class JobContextLoadComponent implements IComponent {
source = self + "IGNORE_ERROR_MESSAGE"; //$NON-NLS-1$
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".IGNORE_ERROR_MESSAGE"); //$NON-NLS-1$
source = self + "ENCODING";
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".ENCODING"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".URL");

View File

@@ -96,6 +96,12 @@ public class JobSettingsManager {
private static final String CONNECTOR = TalendTextUtils.getStringConnect();
private static final String ENCODING_TYPE_UTF_8 = "UTF-8"; //$NON-NLS-1$
private static final String ENCODING_TYPE_ISO_8859_15 = "ISO-8859-15"; //$NON-NLS-1$
private static final String ENCODING_TYPE_CUSTOM = "CUSTOM"; //$NON-NLS-1$
private static List<IElementParameter> getHeaderFooterParameters(IProcess process) {
// for headerFooter Code
ElementParameter param;
@@ -384,6 +390,51 @@ public class JobSettingsManager {
param.setShowIf(condition);
paramList.add(param);
// begin Override encoding checkbox
param = new ElementParameter(process);
param.setName(EParameterName.OVERRIDE_ENCODING_FLAG.getName());
param.setDisplayName(EParameterName.OVERRIDE_ENCODING_FLAG.getDisplayName());
param.setFieldType(EParameterFieldType.CHECK);
param.setCategory(EComponentCategory.EXTRA);
param.setGroup(IMPLICIT_GROUP);
param.setNumRow(33);
param.setValue(false);
param.setShowIf(condition);
paramList.add(param);
// end Override encoding checkbox
// begin encoding select
ElementParameter encodingParam = new ElementParameter(process);
encodingParam.setName(EParameterName.OVERRIDE_ENCODING_IN_EXTRA.getName());
encodingParam.setDisplayName(EParameterName.OVERRIDE_ENCODING_IN_EXTRA.getDisplayName());
encodingParam.setCategory(EComponentCategory.EXTRA);
encodingParam.setGroup(IMPLICIT_GROUP);
encodingParam.setFieldType(EParameterFieldType.ENCODING_TYPE);
StringBuilder sb = new StringBuilder();
sb.append(JobSettingsConstants.getExtraParameterName(EParameterName.FROM_FILE_FLAG.getName())).append(" == 'true' and ")
.append(EParameterName.OVERRIDE_ENCODING_FLAG.getName()).append(" == 'true' and ").append(CONTEXTLOAD_CONDITION);
condition = JobSettingsConstants.addBrackets(sb.toString());
encodingParam.setShowIf(condition); // $NON-NLS-1$
encodingParam.setValue(ENCODING_TYPE_ISO_8859_15);
encodingParam.setNumRow(34);
paramList.add(encodingParam);
ElementParameter childParam = new ElementParameter(process);
childParam.setName(EParameterName.ENCODING_TYPE.getName());
childParam.setDisplayName(EParameterName.ENCODING_TYPE.getDisplayName());
childParam.setFieldType(EParameterFieldType.TECHNICAL);
childParam.setCategory(EComponentCategory.EXTRA);
childParam.setGroup(IMPLICIT_GROUP);
childParam.setListItemsDisplayName(new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setListItemsDisplayCodeName(
new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setListItemsValue(new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setValue(ENCODING_TYPE_ISO_8859_15);
childParam.setNumRow(34);
childParam.setShow(true);
childParam.setShowIf(condition); // $NON-NLS-1$
childParam.setParentParameter(encodingParam);
// end encoding select
return paramList;
}
@@ -952,6 +1003,25 @@ public class JobSettingsManager {
tContextLoadNode.getElementParameter(EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName()).setValue(inputFile);
String regex = FileSeparator.getSeparatorsRegexp(fileSparator);
tContextLoadNode.getElementParameter(JobSettingsConstants.IMPLICIT_TCONTEXTLOAD_REGEX).setValue(regex);
String encoding = (String) process.getElementParameter(EParameterName.OVERRIDE_ENCODING_IN_EXTRA.getName())
.getValue();
if (StringUtils.isNotEmpty(encoding) && !encoding.startsWith(TalendTextUtils.getQuoteChar())) {
encoding = TalendTextUtils.addQuotes(encoding);
}
// override encoding
paramName = EParameterName.OVERRIDE_ENCODING_FLAG.getName();
boolean overrideFlag = ((Boolean) process.getElementParameter(paramName).getValue())
&& process.getElementParameter(paramName).isShow(process.getElementParameters());
if (overrideFlag) {
IElementParameter encodingParam = new ElementParameter(tContextLoadNode);
encodingParam.setName(EParameterName.ENCODING.getName());
encodingParam.setDisplayName(EParameterName.ENCODING.getDisplayName());
encodingParam.setFieldType(EParameterFieldType.ENCODING_TYPE);
encodingParam.setValue(encoding);
tContextLoadNode.addElementParameter(encodingParam);
}
} else {
// is db
paramName = JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());

View File

@@ -634,6 +634,7 @@ public class Node extends Element implements IGraphicalNode {
if (param.getValue() instanceof IMetadataTable) {
IMetadataTable paramTable = (IMetadataTable) param.getValue();
table.getListColumns().addAll(paramTable.getListColumns());
table.setOriginalColumns(paramTable.getOriginalColumns());
table.setReadOnly(paramTable.isReadOnly());
} else if (param.getFieldType().equals(EParameterFieldType.SCHEMA_REFERENCE)) {
Schema schema = (Schema) componentProperties.getValuedProperty(param.getName()).getValue();

View File

@@ -2791,9 +2791,14 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
continue;
}
}
EConnectionType type = EConnectionType.getTypeFromId(lineStyleId);
connec = new Connection(source, target, type, source.getConnectorFromType(type).getName(), metaname,
cType.getLabel(), cType.getMetaname(), monitorConnection);
if (!ConnectionManager.checkCircle(source, target)) {
EConnectionType type = EConnectionType.getTypeFromId(lineStyleId);
connec = new Connection(source, target, type, source.getConnectorFromType(type).getName(), metaname,
cType.getLabel(), cType.getMetaname(), monitorConnection);
} else {
ExceptionHandler.process(new Exception(Messages.getString("Process.errorCircleConnectionDetected", //$NON-NLS-1$
cType.getLabel(), source.getLabel(), target.getLabel())));
}
}
if (connec == null) {
continue;
@@ -4547,6 +4552,9 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
}
private void saveJobletNode(AbstractJobletContainer jobletContainer) {
if (CommonsPlugin.isHeadless()) {
return;
}
INode jobletNode = jobletContainer.getNode();
IProcess jobletProcess = jobletNode.getComponent().getProcess();
if (jobletProcess == null) {

View File

@@ -115,6 +115,7 @@ import org.talend.core.ui.ICDCProviderService;
import org.talend.core.ui.IJobletProviderService;
import org.talend.core.ui.component.ComponentsFactoryProvider;
import org.talend.cwm.helper.SAPBWTableHelper;
import org.talend.designer.core.DesignerPlugin;
import org.talend.designer.core.i18n.Messages;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.model.components.ElementParameter;
@@ -125,6 +126,7 @@ import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.designer.core.ui.editor.nodes.Node;
import org.talend.designer.core.ui.editor.update.UpdateCheckResult;
import org.talend.designer.core.ui.editor.update.UpdateManagerUtils;
import org.talend.designer.core.ui.preferences.TalendDesignerPrefConstants;
import org.talend.designer.core.utils.ConnectionUtil;
import org.talend.designer.core.utils.SAPParametersUtils;
import org.talend.metadata.managment.ui.utils.ConnectionContextHelper;
@@ -307,6 +309,10 @@ public class ProcessUpdateManager extends AbstractUpdateManager {
}
}
} else {
Boolean propagate = DesignerPlugin.getDefault().getPreferenceStore().getBoolean(TalendDesignerPrefConstants.PROPAGATE_CONTEXT);
if(!propagate) {
return contextResults;
}
// only handle added groups
Set<String> contextSourceChecked = new HashSet<String>();
Set<String> processContextGroups = new HashSet<String>();

View File

@@ -1113,9 +1113,13 @@ public abstract class AbstractSchemaController extends AbstractRepositoryControl
for (IMetadataColumn column : metadataTable.getListColumns()) {
columnNames.add(column.getLabel());
}
metadataTable.setOriginalColumns(columnNames);
if(metadataTable.getOriginalColumns() == null || metadataTable.getOriginalColumns().isEmpty()){
metadataTable.setOriginalColumns(columnNames);
}
}
if(tableCopy.getOriginalColumns() == null || tableCopy.getOriginalColumns().isEmpty()){
tableCopy.setOriginalColumns(metadataTable.getOriginalColumns());
}
tableCopy.setOriginalColumns(metadataTable.getOriginalColumns());
}
}

View File

@@ -133,7 +133,7 @@ public class DesignerPreferencePage extends FieldEditorPreferencePage implements
Messages.getString("DesignerPreferencePage.duplicateTestCases"), getFieldEditorParent()); //$NON-NLS-1$
addField(duplicateTestCases);
}
DirectoryFieldEditor compDefaultFileDir = new DirectoryFieldEditor(TalendDesignerPrefConstants.COMP_DEFAULT_FILE_DIR,
Messages.getString("DesignerPreferencePage.defaultFilePathDirectory"), getFieldEditorParent()) {

View File

@@ -64,6 +64,9 @@ public class PerformancePreferencePage extends FieldEditorPreferencePage impleme
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,
Messages.getString("PerformancePreferencePage.checkVersion"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT,
Messages.getString("PerformancePreferencePage.propagateContext"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,
Messages.getString("PerformancePreferencePage.addOrDeleteVariable"), //$NON-NLS-1$
getFieldEditorParent()));
@@ -100,6 +103,9 @@ public class PerformancePreferencePage extends FieldEditorPreferencePage impleme
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,
Messages.getString("PerformancePreferencePage.checkVersion"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT,
Messages.getString("PerformancePreferencePage.propagateContext"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,
Messages.getString("PerformancePreferencePage.addOrDeleteVariable"), //$NON-NLS-1$
getFieldEditorParent()));

View File

@@ -67,6 +67,8 @@ public class TalendDesignerPrefConstants {
public static final String EDITOR_LINESTYLE = "editorLineStyle "; //$NON-NLS-1$
public static final String DUPLICATE_TESTCASE = "duplicateTestCases "; //$NON-NLS-1$
public static final String PROPAGATE_CONTEXT = "propagateContext"; //$NON-NLS-1$
public static final String SCHEMA_OPTIONS = "schemaOptions"; //$NON-NLS-1$

View File

@@ -85,6 +85,12 @@ public class ProjectSettingManager extends Utils {
private static String languagePrefix = LanguageManager.getCurrentLanguage().toString() + "_"; //$NON-NLS-1$
private static final String ENCODING_TYPE_UTF_8 = "UTF-8"; //$NON-NLS-1$
private static final String ENCODING_TYPE_ISO_8859_15 = "ISO-8859-15"; //$NON-NLS-1$
private static final String ENCODING_TYPE_CUSTOM = "CUSTOM"; //$NON-NLS-1$
public static void saveProject() {
RepositoryContext repositoryContext = (RepositoryContext) CorePlugin.getContext().getProperty(
Context.REPOSITORY_CONTEXT_KEY);
@@ -448,6 +454,51 @@ public class ProjectSettingManager extends Utils {
param.setShowIf(condition);
paramList.add(param);
// begin Override encoding checkbox
param = new ElementParameter(elem);
param.setName(EParameterName.OVERRIDE_ENCODING_FLAG.getName());
param.setDisplayName(EParameterName.OVERRIDE_ENCODING_FLAG.getDisplayName());
param.setFieldType(EParameterFieldType.CHECK);
param.setCategory(EComponentCategory.EXTRA);
param.setGroup(IMPLICIT_GROUP);
param.setNumRow(33);
param.setValue(false);
param.setShowIf(condition);
paramList.add(param);
// end Override encoding checkbox
// begin encoding select
ElementParameter encodingParam = new ElementParameter(elem);
encodingParam.setName(EParameterName.OVERRIDE_ENCODING_IN_EXTRA.getName());
encodingParam.setDisplayName(EParameterName.OVERRIDE_ENCODING_IN_EXTRA.getDisplayName());
encodingParam.setCategory(EComponentCategory.EXTRA);
encodingParam.setGroup(IMPLICIT_GROUP);
encodingParam.setFieldType(EParameterFieldType.ENCODING_TYPE);
StringBuilder sb = new StringBuilder();
sb.append(JobSettingsConstants.getExtraParameterName(EParameterName.FROM_FILE_FLAG.getName())).append(" == 'true' and ")
.append(EParameterName.OVERRIDE_ENCODING_FLAG.getName()).append(" == 'true' and ").append(CONTEXTLOAD_CONDITION);
condition = JobSettingsConstants.addBrackets(sb.toString());
encodingParam.setShowIf(condition); // $NON-NLS-1$
encodingParam.setValue(ENCODING_TYPE_ISO_8859_15);
encodingParam.setNumRow(34);
paramList.add(encodingParam);
ElementParameter childParam = new ElementParameter(elem);
childParam.setName(EParameterName.ENCODING_TYPE.getName());
childParam.setDisplayName(EParameterName.ENCODING_TYPE.getDisplayName());
childParam.setFieldType(EParameterFieldType.TECHNICAL);
childParam.setCategory(EComponentCategory.EXTRA);
childParam.setGroup(IMPLICIT_GROUP);
childParam.setListItemsDisplayName(new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setListItemsDisplayCodeName(
new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setListItemsValue(new String[] { ENCODING_TYPE_ISO_8859_15, ENCODING_TYPE_UTF_8, ENCODING_TYPE_CUSTOM });
childParam.setValue(ENCODING_TYPE_ISO_8859_15);
childParam.setNumRow(34);
childParam.setShow(true);
childParam.setShowIf(condition); // $NON-NLS-1$
childParam.setParentParameter(encodingParam);
// end encoding select
}
private static void createExtraOnDBParameters(Element elem) {

View File

@@ -587,6 +587,7 @@ public class MainComposite extends AbstractTabComposite {
|| property == null) {
return;
}
String oldVersion = repositoryObject.getVersion();
String originalName = nameText.getText();
String originalJobType = jobTypeCCombo.getText();
String originalFramework = ConvertJobsUtil.convertFrameworkByJobType(originalJobType,
@@ -779,6 +780,9 @@ public class MainComposite extends AbstractTabComposite {
public void run(final IProgressMonitor monitor) throws CoreException {
try {
if (repositoryObject.getProperty() != null) {
if (!originalversion.equals(StringUtils.trimToEmpty(oldVersion))) {
RelationshipItemBuilder.getInstance().addOrUpdateItem(repositoryObject.getProperty().getItem());
}
proxyRepositoryFactory.save(ProjectManager.getInstance().getCurrentProject(),
repositoryObject.getProperty().getItem(), false);
if (needjobletRelateUpdate && GlobalServiceRegister.getDefault()

View File

@@ -0,0 +1,120 @@
// ============================================================================
//
// Copyright (C) 2006-2019 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.utils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.components.ComponentUtilities;
import org.talend.core.model.components.ModifyComponentsAction;
import org.talend.core.model.components.conversions.IComponentConversion;
import org.talend.core.model.components.filters.IComponentFilter;
import org.talend.core.model.components.filters.NameComponentFilter;
import org.talend.core.model.migration.AbstractItemMigrationTask;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.designer.core.DesignerPlugin;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.repository.model.IProxyRepositoryFactory;
/**
* Created by bhe on Nov 22, 2019
*/
public class FillTRunJobReferenceParametersMigrationTask extends AbstractItemMigrationTask {
@Override
public List<ERepositoryObjectType> getTypes() {
List<ERepositoryObjectType> toReturn = new ArrayList<ERepositoryObjectType>();
toReturn.addAll(ERepositoryObjectType.getAllTypesOfProcess());
toReturn.addAll(ERepositoryObjectType.getAllTypesOfProcess2());
return toReturn;
}
@Override
public final ExecutionResult execute(Item item) {
ProcessType pt = null;
if (item instanceof ProcessItem) {
ProcessItem processItem = (ProcessItem) item;
pt = processItem.getProcess();
} else if (item instanceof JobletProcessItem) {
JobletProcessItem jobletItem = (JobletProcessItem) item;
pt = jobletItem.getJobletProcess();
}
if (pt == null) {
return ExecutionResult.NOTHING_TO_DO;
}
IComponentFilter filter = new NameComponentFilter("tRunJob"); //$NON-NLS-1$
try {
ModifyComponentsAction.searchAndModify(item, pt, filter,
Arrays.<IComponentConversion> asList(new IComponentConversion() {
@Override
public void transform(NodeType node) {
ElementParameterType jobId = ComponentUtilities.getNodeProperty(node,
EParameterName.PROCESS.getName() + ":" + EParameterName.PROCESS_TYPE_PROCESS.getName()); //$NON-NLS-1$
if (jobId.getValue() == null || jobId.getValue().isEmpty()) {
ElementParameterType jobLabel = ComponentUtilities.getNodeProperty(node,
EParameterName.PROCESS.getName()); // $NON-NLS-1$
String id = getIdFormLabel(jobLabel.getValue());
if (id != null && !id.isEmpty()) {
jobId.setValue(id);
}
}
}
}));
} catch (PersistenceException e) {
ExceptionHandler.process(e);
return ExecutionResult.FAILURE;
}
return ExecutionResult.SUCCESS_NO_ALERT;
}
private static String getIdFormLabel(final String label) {
if (label == null || label.isEmpty()) {
return null;
}
final IProxyRepositoryFactory proxyRepositoryFactory = DesignerPlugin.getDefault().getProxyRepositoryFactory();
try {
List<IRepositoryViewObject> allRepositoryObject = proxyRepositoryFactory.getAll(ERepositoryObjectType.PROCESS, true);
for (IRepositoryViewObject repObject : allRepositoryObject) {
Item item = repObject.getProperty().getItem();
if (item != null && label.equals(item.getProperty().getLabel())) {
return item.getProperty().getId();
}
}
} catch (PersistenceException e) {
//
}
return null;
}
public Date getOrder() {
GregorianCalendar gc = new GregorianCalendar(2019, 11, 22, 12, 0, 0);
return gc.getTime();
}
}

View File

@@ -45,6 +45,7 @@ import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.drawing.background.BackgroundRefresher;
import org.talend.commons.ui.swt.linking.BgDrawableComposite;
import org.talend.commons.utils.threading.ExecutionLimiter;
import org.talend.core.model.process.IConnection;
import org.talend.designer.abstractmap.model.table.IDataMapTable;
import org.talend.designer.abstractmap.ui.dnd.DraggingInfosPopup;
import org.talend.designer.abstractmap.ui.listener.DropTargetOperationListener;
@@ -230,6 +231,20 @@ public class MapperUI {
dbmsId = input.getMetadataTable().getDbms();
}
}
if(dbmsId == null && mapperModel.getOutputDataMapTables() != null && !mapperModel.getOutputDataMapTables().isEmpty()) {
OutputTable output = mapperModel.getOutputDataMapTables().get(0);
if (output.getMetadataTable() != null) {
dbmsId = output.getMetadataTable().getDbms();
}
}
if(dbmsId == null && mapperManager.getAbstractMapComponent() != null
&& !mapperManager.getAbstractMapComponent().getIncomingConnections().isEmpty()){
IConnection conn = mapperManager.getAbstractMapComponent().getIncomingConnections().get(0);
if(conn.getMetadataTable() != null) {
dbmsId = conn.getMetadataTable().getDbms();
}
}
tabFolderEditors = new TabFolderEditors(mainSashForm, SWT.BORDER, mapperManager, dbmsId);
createInputZoneWithTables(mapperModel, uiManager, display);

View File

@@ -14,6 +14,7 @@
<outputDirectory>${file.separator}</outputDirectory>
<includes>
<include>${talend.job.path}/**/*.class</include>
<include>${talend.job.path}/**/*.wsdl</include>
<include>__tdm/**</include>
</includes>
</fileSet>

View File

@@ -16,6 +16,7 @@
<outputDirectory>${file.separator}</outputDirectory>
<includes>
<include>${talend.job.path}/**/*.class</include>
<include>${talend.job.path}/**/*.wsdl</include>
<include>__tdm/**</include>
</includes>
</fileSet>

View File

@@ -568,6 +568,8 @@ public class TalendJavaProjectManager {
if (processor instanceof MavenJavaProcessor) {
LastGenerationInfo.getInstance().clearModulesNeededWithSubjobPerJob();
LastGenerationInfo.getInstance().getHighPriorityModuleNeeded().clear();
// Need to clear modules per job cache
LastGenerationInfo.getInstance().clearModulesNeededPerJob();
// Gen poms only
((MavenJavaProcessor) processor).generatePom(option);
}

View File

@@ -349,7 +349,8 @@ public class MavenJavaProcessor extends JavaProcessor {
if (!isMainJob && isGoalInstall) {
if (!buildCacheManager.isJobBuild(getProperty())) {
deleteExistedJobJarFile(talendJavaProject);
if ("ROUTE".equalsIgnoreCase(getBuildType(getProperty())) && project != null &&
String buildType = getBuildType(getProperty());
if (("ROUTE".equalsIgnoreCase(buildType) || "OSGI".equalsIgnoreCase(buildType)) && project != null &&
ERepositoryObjectType.PROCESS.equals(ERepositoryObjectType.getType(getProperty()))) {
// TESB-23870
// child routes job project must be compiled explicitly for

View File

@@ -81,6 +81,7 @@ import org.talend.commons.ui.runtime.exception.ExceptionMessageDialog;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.commons.utils.network.TalendProxySelector;
import org.talend.commons.utils.system.EclipseCommandLine;
import org.talend.commons.utils.system.EnvironmentUtils;
import org.talend.core.CorePlugin;
@@ -694,6 +695,8 @@ public class LoginProjectPage extends AbstractLoginActionPage {
CommonExceptionHandler.process(e);
} catch (JSONException e) {
CommonExceptionHandler.process(e);
} finally {
TalendProxySelector.getInstance();
}
}

View File

@@ -32,6 +32,7 @@ import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.repository.ui.wizards.exportjob.JavaJobScriptsExportWSWizardPage.JobExportType;
import org.talend.repository.ui.wizards.exportjob.handler.BuildJobHandler;
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice;
import org.talend.repository.utils.EmfModelUtils;
/**
* created by ycbai on 2015年5月15日 Detailled comment
@@ -40,6 +41,7 @@ import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManag
public class BuildJobFactory {
public static final Map<JobExportType, String> oldBuildTypeMap = new HashMap<JobExportType, String>();
private static final String T_REST_REQUEST = "tRESTRequest";
private static final List<String> esbComponents;
static {
// from the extension point
@@ -101,15 +103,22 @@ public class BuildJobFactory {
if (StringUtils.isEmpty(buildType)) {
final Object type = processItem.getProperty().getAdditionalProperties()
.get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
boolean esb = false;
boolean esb = false; //for esb consumer job and service
if (processItem instanceof ProcessItem) {
for (Object o : ((ProcessItem) processItem).getProcess().getNode()) {
if (o instanceof NodeType) {
NodeType currentNode = (NodeType) o;
if(esbComponents.contains(currentNode.getComponentName())) {
esb = true;
break;
if (null != EmfModelUtils.getComponentByName((ProcessItem) processItem, T_REST_REQUEST)) {
if (type == null) {
processItem.getProperty().getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE,
oldBuildTypeMap.get(JobExportType.OSGI));
}
esb = true;
} else {
for (Object o : ((ProcessItem) processItem).getProcess().getNode()) {
if (o instanceof NodeType) {
NodeType node = (NodeType) o;
if (esbComponents.contains(node.getComponentName())) {
esb = true;
break;
}
}
}
}

View File

@@ -823,7 +823,9 @@ public class JobJavaScriptOSGIForESBManager extends JobJavaScriptsManager {
Set<URL> resources = libResource.getResourcesByRelativePath(path);
for (URL url : resources) {
// TESB-21804:Fail to deploy cMessagingEndpoint with quartz component in runtime for ClassCastException
if (url.getPath().matches("(.*)camel-(.*)-alldep-(.*)$")) {
if (url.getPath().matches("(.*)camel-(.*)-alldep-(.*)$")
|| url.getPath().matches("(.*)activemq-all-[\\d\\.]*.jar$")
|| url.getPath().matches("(.*)jms[\\d\\.-]*.jar$")) {
continue;
}
File dependencyFile = new File(FilesUtils.getFileRealPath(url.getPath()));

View File

@@ -12,7 +12,11 @@
// ============================================================================
package org.talend.designer.core.model.process;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
import org.junit.After;
@@ -362,4 +366,61 @@ public class ConnectionManagerTest {
}
@Test
public void testCheckCircle() {
Process process = new Process(createProperty());
IComponent component = ComponentsFactoryProvider.getInstance().get("tJava", ComponentCategory.CATEGORY_4_DI.getName());
Node sourceNode = new Node(componentSource, process);
Node targetNode = new Node(componentTarget, process);
Node middleNode_1 = new Node(component, process);
Node middleNode_2 = new Node(component, process);
Node middleNode_3 = new Node(component, process);
// sourceNode -> middleNode_1 -> targetNode
resetNodeConnection(sourceNode);
resetNodeConnection(middleNode_1);
resetNodeConnection(targetNode);
((List<Connection>) middleNode_1.getIncomingConnections()).add(new Connection(sourceNode, middleNode_1,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
((List<Connection>) targetNode.getIncomingConnections()).add(new Connection(middleNode_1, targetNode,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
Assert.assertFalse(ConnectionManager.checkCircle(middleNode_1, targetNode));
// TUP-22620 source==target, no incomming connections
Assert.assertTrue(ConnectionManager.checkCircle(sourceNode, sourceNode));
// for circle connection, test checkCircle by canConnectToTrget
// sourceNode -> targetNode -> sourceNode
resetNodeConnection(sourceNode);
resetNodeConnection(middleNode_1);
resetNodeConnection(targetNode);
((List<Connection>) targetNode.getIncomingConnections()).add(new Connection(sourceNode, targetNode,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
Assert.assertFalse(ConnectionManager.canConnectToTarget(targetNode, null, sourceNode, EConnectionType.FLOW_MAIN,
EConnectionType.FLOW_MAIN.getName(), "testRow"));
// sourceNode -> middleNode_1 -> middleNode_2 -> middleNode_3 -> middleNode_1 -> targetNode
resetNodeConnection(sourceNode);
resetNodeConnection(targetNode);
((List<Connection>) middleNode_1.getIncomingConnections()).add(new Connection(sourceNode, middleNode_1,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
((List<Connection>) middleNode_2.getIncomingConnections()).add(new Connection(middleNode_1, middleNode_2,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
((List<Connection>) middleNode_1.getIncomingConnections()).add(new Connection(middleNode_3, middleNode_1,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
((List<Connection>) targetNode.getIncomingConnections()).add(new Connection(middleNode_1, targetNode,
EConnectionType.FLOW_MAIN, EConnectionType.FLOW_MAIN.getName(), "testRow", "testRow", "testRow", false));
Assert.assertFalse(ConnectionManager.canConnectToTarget(middleNode_2, null, middleNode_3, EConnectionType.FLOW_MAIN,
EConnectionType.FLOW_MAIN.getName(), "testRow"));
}
private static void resetNodeConnection(Node node) {
List<Connection> inconnections = new ArrayList<Connection>();
node.setIncomingConnections(inconnections);
List<Connection> outconnections = new ArrayList<Connection>();
node.setOutgoingConnections(outconnections);
}
}