Compare commits
1 Commits
release/7.
...
hwang/TUP-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
950cb7e5f3 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.helpers.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.migrationTool.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.registration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.localprovider.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.mdm.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.metadata.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.resources.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -51,17 +51,16 @@
|
||||
fragment="true"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.libraries.apache.lucene8"
|
||||
id="org.talend.libraries.apache.lucene6"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="true"/>
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.libraries.apache.lucene4"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="true"/>
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.common.feature</artifactId>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="org.talend.help.di.feature"
|
||||
label="Talend DI help feature"
|
||||
version="7.3.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
</description>
|
||||
|
||||
<copyright url="http://www.example.com/copyright">
|
||||
[Enter Copyright Description here.]
|
||||
</copyright>
|
||||
|
||||
<license url="http://www.example.com/license">
|
||||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<url>
|
||||
<update label="CORE Talend update site for milestones" url="http://talendforge.org/core/updatesite/testing/"/>
|
||||
</url>
|
||||
|
||||
<includes
|
||||
id="org.talend.help.tos.components.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.help"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.help.nl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.di.feature</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="7.3.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#help-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#help-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
@@ -7,8 +8,9 @@
|
||||
<update label="CORE Talend update site for milestones" url="http://talendforge.org/core/updatesite/testing/"/>
|
||||
<discovery label="Talend web site" url="http://www.talend.com"/>
|
||||
</url>
|
||||
<includes id="org.talend.help.di.feature" version="0.0.0"/>
|
||||
<requires>
|
||||
<import feature="org.eclipse.help" version="0.0.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.help" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.help.nl" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.jdt.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.m2e.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.configuration" version="2.0.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
<plugin id="org.talend.daikon" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.exception" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.daikon.crypto.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
<plugin id="org.talend.utils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.tos</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -114,9 +114,6 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return Boolean.getBoolean("junit_test"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isTUJTest() {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
|
||||
@@ -58,6 +58,3 @@ AS400ResultSet.unknowCloumn=Invalid argument\: unknown column name
|
||||
AS400ResultSet.parameterIndex=Invalid argument\: parameter index
|
||||
AS400ResultSet.outofRange=\ is out of range.
|
||||
ITaCoKitService.exception.multipleInstance=More than one instance found: {0}
|
||||
TalendProxySelector.exception.badUriMap=Bad uri map: {0}
|
||||
TalendProxySelector.exception.proxySelectionError=Error occurs when selecting proxy for {0}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ package org.talend.commons.runtime.service;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.osgi.framework.BundleContext;
|
||||
@@ -40,7 +39,9 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isTaCoKitCar(File file, IProgressMonitor monitor) throws Exception;
|
||||
|
||||
boolean isNeedMigration(String componentName, Map<String, String> properties);
|
||||
boolean isNeedMigration(String projectLabel) throws Exception;
|
||||
|
||||
void checkMigration(final IProgressMonitor monitor) throws Exception;
|
||||
|
||||
public static ITaCoKitService getInstance() throws Exception {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
|
||||
@@ -21,23 +21,29 @@ import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
import org.talend.utils.security.AESEncryption;
|
||||
|
||||
/**
|
||||
* DOC chuang class global comment. Detailled comment
|
||||
*/
|
||||
public class PasswordEncryptUtil {
|
||||
|
||||
public static final String ENCRYPT_KEY = "Encrypt"; //$NON-NLS-1$
|
||||
public static String ENCRYPT_KEY = "Encrypt"; //$NON-NLS-1$
|
||||
|
||||
private static String rawKey = "Talend-Key"; //$NON-NLS-1$
|
||||
|
||||
public static String PREFIX_PASSWORD = "ENC:["; //$NON-NLS-1$
|
||||
|
||||
public static String POSTFIX_PASSWORD = "]"; //$NON-NLS-1$
|
||||
|
||||
private static SecretKey key = null;
|
||||
|
||||
private static final SecureRandom SECURERANDOM = new SecureRandom();
|
||||
private static SecureRandom secureRandom = new SecureRandom();
|
||||
|
||||
private static SecretKey getSecretKey() throws Exception {
|
||||
if (key == null) {
|
||||
byte rawKeyData[] = StudioEncryption.getKeySource(StudioEncryption.EncryptionKeyName.MIGRATION.toString(), false)
|
||||
.getKey();
|
||||
|
||||
byte rawKeyData[] = rawKey.getBytes();
|
||||
DESKeySpec dks = new DESKeySpec(rawKeyData);
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); //$NON-NLS-1$
|
||||
key = keyFactory.generateSecret(dks);
|
||||
@@ -59,7 +65,7 @@ public class PasswordEncryptUtil {
|
||||
|
||||
SecretKey key = getSecretKey();
|
||||
Cipher c = Cipher.getInstance("DES"); //$NON-NLS-1$
|
||||
c.init(Cipher.ENCRYPT_MODE, key, SECURERANDOM);
|
||||
c.init(Cipher.ENCRYPT_MODE, key, secureRandom);
|
||||
byte[] cipherByte = c.doFinal(input.getBytes());
|
||||
String dec = new String(Base64.encodeBase64(cipherByte));
|
||||
return dec;
|
||||
@@ -79,7 +85,7 @@ public class PasswordEncryptUtil {
|
||||
byte[] dec = Base64.decodeBase64(input.getBytes());
|
||||
SecretKey key = getSecretKey();
|
||||
Cipher c = Cipher.getInstance("DES"); //$NON-NLS-1$
|
||||
c.init(Cipher.DECRYPT_MODE, key, SECURERANDOM);
|
||||
c.init(Cipher.DECRYPT_MODE, key, secureRandom);
|
||||
byte[] clearByte = c.doFinal(dec);
|
||||
return new String(clearByte);
|
||||
}
|
||||
@@ -93,7 +99,7 @@ public class PasswordEncryptUtil {
|
||||
if (input == null) {
|
||||
return input;
|
||||
}
|
||||
return StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.ROUTINE).encrypt(input);
|
||||
return PREFIX_PASSWORD + AESEncryption.encryptPassword(input) + POSTFIX_PASSWORD;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -193,40 +192,6 @@ public class VersionUtils {
|
||||
return talendVersion;
|
||||
}
|
||||
|
||||
public static String getProductVersionWithoutBranding(String fullProductVersion) {
|
||||
String[] splitStr = fullProductVersion.split("-"); //$NON-NLS-1$
|
||||
Pattern pattern = Pattern.compile("((\\d+\\.){2}\\d.*)"); //$NON-NLS-1$
|
||||
StringBuffer versionStr = new StringBuffer();
|
||||
boolean find = false;
|
||||
for (String str : splitStr) {
|
||||
if (find) {
|
||||
versionStr.append("-").append(str); //$NON-NLS-1$
|
||||
}else {
|
||||
Matcher matcher = pattern.matcher(str);
|
||||
if (matcher.find()) {
|
||||
find = true;
|
||||
versionStr.append(str); // $NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return versionStr.toString();
|
||||
}
|
||||
|
||||
public static String getTalendPureVersion(String fullProductVersion) {
|
||||
return getTalendVersion(getProductVersionWithoutBranding(fullProductVersion));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if studio version < other studio version record in remote project.
|
||||
*/
|
||||
public static boolean isInvalidProductVersion(String remoteFullProductVersion) {
|
||||
if (remoteFullProductVersion == null) {
|
||||
return false;
|
||||
}
|
||||
return getInternalVersion().compareTo(getProductVersionWithoutBranding(remoteFullProductVersion)) < 0;
|
||||
}
|
||||
|
||||
public static String getTalendVersion(String productVersion) {
|
||||
try {
|
||||
org.osgi.framework.Version v = new org.osgi.framework.Version(productVersion);
|
||||
|
||||
@@ -342,7 +342,7 @@ public class CharsetToolkit {
|
||||
return (buffer[0] == -2 && buffer[1] == -1);
|
||||
}
|
||||
|
||||
public static String getCharset(File file) {
|
||||
public static String getCharset(File file){
|
||||
String charset = "UTF-8";
|
||||
byte[] fileContent = null;
|
||||
FileInputStream fin = null;
|
||||
@@ -350,18 +350,11 @@ public class CharsetToolkit {
|
||||
fin = new FileInputStream(file.getPath());
|
||||
fileContent = new byte[(int) file.length()];
|
||||
fin.read(fileContent);
|
||||
byte[] data = fileContent;
|
||||
|
||||
byte[] data = fileContent;
|
||||
charset = getCharset(data);
|
||||
} catch (IOException e) {
|
||||
charset = "UTF-8";
|
||||
} finally {
|
||||
if (fin != null) {
|
||||
try {
|
||||
fin.close();
|
||||
} catch (IOException e) {
|
||||
// Ignore here
|
||||
}
|
||||
}
|
||||
}
|
||||
return charset;
|
||||
}
|
||||
|
||||
@@ -49,14 +49,12 @@ public class NetworkUtil {
|
||||
if ("true".equals(disableInternet)) { //$NON-NLS-1$
|
||||
return false;
|
||||
}
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(HTTP_NETWORK_URL);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
String strMessage = conn.getResponseMessage();
|
||||
if (strMessage.compareTo("Not Found") == 0) { //$NON-NLS-1$
|
||||
@@ -65,38 +63,9 @@ public class NetworkUtil {
|
||||
if (strMessage.equals("OK")) { //$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
conn.disconnect();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(String url) {
|
||||
if (url == null) {
|
||||
return isNetworkValid();
|
||||
}
|
||||
return checkValidWithHttp(url);
|
||||
}
|
||||
|
||||
private static boolean checkValidWithHttp(String urlString) {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
|
||||
// invalid server
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -13,155 +13,37 @@
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.net.Proxy;
|
||||
import java.net.ProxySelector;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Priority;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.i18n.internal.Messages;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
public static final String PROP_PRINT_LOGS = "talend.studio.proxy.printLogs";
|
||||
|
||||
private static final String ECLIPSE_PROXY_SELECTOR = ".EclipseProxySelector"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROP_ALLOW_PROXY_REDIRECT = "talend.studio.proxy.allowProxyRedirect";
|
||||
|
||||
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE = "talend.studio.proxy.redirect.whiteList";
|
||||
|
||||
private static final String PROP_PROXY_HOST_MAP = "talend.studio.proxy.hostMap";
|
||||
|
||||
private static final String PROP_DISABLE_DEFAULT_SELECTOR = "talend.studio.proxy.disableDefaultSelector";
|
||||
|
||||
/**
|
||||
* Example: update.talend.com,socket:http,https:http;nexus.talend.com,socket,http;,socket:http
|
||||
*/
|
||||
private static final String PROP_PROXY_MAP_HOST_DEFAULT = "";
|
||||
|
||||
/**
|
||||
* Example: svn.company.com;nexus.company.com
|
||||
*/
|
||||
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE_DEFAULT = "";
|
||||
|
||||
private static final String KEY_DEFAULT = ":default:";
|
||||
|
||||
private ProxySelector defaultSelector;
|
||||
|
||||
final private Map<Object, Collection<IProxySelectorProvider>> selectorProviders;
|
||||
|
||||
private Map<String, Map<String, String>> hostMap;
|
||||
|
||||
private Set<String> redirectWhiteList;
|
||||
final private List<IProxySelectorProvider> selectorProviders;
|
||||
|
||||
private volatile static TalendProxySelector instance;
|
||||
|
||||
private static Object instanceLock = new Object();
|
||||
|
||||
private boolean printProxyLog = false;
|
||||
|
||||
private boolean allowProxyRedirect = false;
|
||||
|
||||
private boolean disableDefaultSelector = false;
|
||||
|
||||
private TalendProxySelector(final ProxySelector defaultSelector) {
|
||||
this.defaultSelector = defaultSelector;
|
||||
|
||||
selectorProviders = Collections.synchronizedMap(new HashMap<>());
|
||||
allowProxyRedirect = Boolean.valueOf(System.getProperty(PROP_ALLOW_PROXY_REDIRECT, Boolean.FALSE.toString()));
|
||||
disableDefaultSelector = Boolean.valueOf(System.getProperty(PROP_DISABLE_DEFAULT_SELECTOR, Boolean.FALSE.toString()));
|
||||
printProxyLog = Boolean.valueOf(System.getProperty(PROP_PRINT_LOGS, Boolean.FALSE.toString()));
|
||||
|
||||
initHostMap();
|
||||
initRedirectList();
|
||||
}
|
||||
|
||||
private void initHostMap() {
|
||||
try {
|
||||
hostMap = new HashMap<>();
|
||||
String property = System.getProperty(PROP_PROXY_HOST_MAP, PROP_PROXY_MAP_HOST_DEFAULT);
|
||||
if (StringUtils.isEmpty(property)) {
|
||||
return;
|
||||
}
|
||||
String[] splits = property.split(";");
|
||||
for (String split : splits) {
|
||||
try {
|
||||
int index = split.indexOf(',');
|
||||
String uri = split.substring(0, index);
|
||||
String key = StringUtils.strip(uri);
|
||||
if (StringUtils.isBlank(key)) {
|
||||
key = KEY_DEFAULT;
|
||||
}
|
||||
key = key.toLowerCase();
|
||||
Map<String, String> protocolMap = hostMap.get(key);
|
||||
if (protocolMap == null) {
|
||||
protocolMap = new HashMap<>();
|
||||
hostMap.put(key, protocolMap);
|
||||
}
|
||||
int protocolMapIndex = index + 1;
|
||||
String protocolMapStr = split.substring(protocolMapIndex);
|
||||
String[] entry = protocolMapStr.split(",");
|
||||
for (String pMap : entry) {
|
||||
try {
|
||||
String[] mapEntry = pMap.split(":");
|
||||
if (mapEntry.length != 2) {
|
||||
ExceptionHandler.process(
|
||||
new Exception(Messages.getString("TalendProxySelector.exception.badUriMap", pMap)));
|
||||
continue;
|
||||
}
|
||||
protocolMap.put(mapEntry[0].toLowerCase(), mapEntry[1].toLowerCase());
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void initRedirectList() {
|
||||
try {
|
||||
redirectWhiteList = new HashSet<>();
|
||||
String property = System.getProperty(PROP_ALLOW_PROXY_REDIRECT_EXCLUDE, PROP_ALLOW_PROXY_REDIRECT_EXCLUDE_DEFAULT);
|
||||
if (StringUtils.isEmpty(property)) {
|
||||
return;
|
||||
}
|
||||
String[] split = property.split(";");
|
||||
for (String host : split) {
|
||||
host = StringUtils.strip(host);
|
||||
if (StringUtils.isBlank(host)) {
|
||||
host = KEY_DEFAULT;
|
||||
}
|
||||
redirectWhiteList.add(host);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
selectorProviders = new ArrayList<>();
|
||||
}
|
||||
|
||||
public static TalendProxySelector getInstance() {
|
||||
@@ -199,109 +81,8 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(final URI uri) {
|
||||
Set<Proxy> results = new LinkedHashSet<>();
|
||||
|
||||
try {
|
||||
final Set<Proxy> resultFromProviders = getProxysFromProviders(uri);
|
||||
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
|
||||
results.addAll(resultFromProviders);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
URI newUri = getNewUri(uri);
|
||||
List<Proxy> defaultProxys = defaultProxySelector.select(newUri);
|
||||
try {
|
||||
results.addAll(filterProxys(uri, defaultProxys));
|
||||
} catch (Exception e) {
|
||||
results.addAll(defaultProxys);
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (printProxyLog) {
|
||||
String proxys = results.toString();
|
||||
ExceptionHandler.log("Selected proxys for " + uri + ", " + proxys);
|
||||
ExceptionHandler.process(new Exception("Proxy call stacks"), Priority.INFO);
|
||||
}
|
||||
return new LinkedList<Proxy>(results);
|
||||
}
|
||||
|
||||
private List<Proxy> filterProxys(final URI uri, List<Proxy> defaultProxys) {
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
if (defaultProxys != null && !defaultProxys.isEmpty()) {
|
||||
for (Proxy proxy : defaultProxys) {
|
||||
SocketAddress addr = null;
|
||||
Proxy.Type proxyType = null;
|
||||
if (proxy != null) {
|
||||
proxyType = proxy.type();
|
||||
addr = proxy.address();
|
||||
}
|
||||
|
||||
boolean redirect = true;
|
||||
if (!allowProxyRedirect) {
|
||||
String host = uri.getHost();
|
||||
if (host == null) {
|
||||
host = "";
|
||||
}
|
||||
host = StringUtils.strip(host).toLowerCase();
|
||||
if (this.redirectWhiteList.contains(host) || this.redirectWhiteList.contains(KEY_DEFAULT)) {
|
||||
redirect = true;
|
||||
} else if (Proxy.Type.DIRECT == proxyType
|
||||
|| (addr != null && StringUtils.equals(uri.getHost(), ((InetSocketAddress) addr).getHostString()))) {
|
||||
redirect = false;
|
||||
}
|
||||
}
|
||||
if (redirect) {
|
||||
result.add(proxy);
|
||||
} else {
|
||||
result.add(Proxy.NO_PROXY);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private URI getNewUri(URI uri) {
|
||||
URI newUri = uri;
|
||||
if (newUri != null) {
|
||||
String host = newUri.getHost();
|
||||
Map<String, String> protocolMap = null;
|
||||
if (StringUtils.isNotBlank(host)) {
|
||||
protocolMap = hostMap.get(host.toLowerCase());
|
||||
}
|
||||
if (protocolMap == null) {
|
||||
protocolMap = hostMap.get(KEY_DEFAULT);
|
||||
}
|
||||
|
||||
if (protocolMap != null) {
|
||||
String schema = newUri.getScheme();
|
||||
if (schema != null) {
|
||||
String lowercasedProtocol = schema.toLowerCase();
|
||||
String preferedProtocol = protocolMap.get(lowercasedProtocol);
|
||||
if (StringUtils.isNotBlank(preferedProtocol)) {
|
||||
try {
|
||||
newUri = new URI(preferedProtocol, newUri.getUserInfo(), newUri.getHost(), newUri.getPort(),
|
||||
newUri.getPath(), newUri.getQuery(), newUri.getFragment());
|
||||
} catch (URISyntaxException e) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.process(new Exception(
|
||||
Messages.getString("TalendProxySelector.exception.proxySelectionError", newUri), e),
|
||||
Priority.WARN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return newUri;
|
||||
}
|
||||
|
||||
private Set<Proxy> getProxysFromProviders(final URI uri) {
|
||||
final Set<Proxy> resultFromProviders = new LinkedHashSet<>();
|
||||
Collection<IProxySelectorProvider> providers = getCustomProviders(uri);
|
||||
final Set<Proxy> resultFromProviders = new HashSet<>();
|
||||
List<IProxySelectorProvider> providers = getProxySelectorProviders();
|
||||
if (providers != null) {
|
||||
providers.stream().forEach(p -> {
|
||||
if (instance == p) {
|
||||
@@ -319,79 +100,36 @@ public class TalendProxySelector extends ProxySelector {
|
||||
}
|
||||
});
|
||||
}
|
||||
return resultFromProviders;
|
||||
}
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
|
||||
private Collection<IProxySelectorProvider> getCustomProviders(final URI uri) {
|
||||
Collection<IProxySelectorProvider> providers = Collections.EMPTY_LIST;
|
||||
Collection<Object> possibleKeys = getPossibleKeys(uri);
|
||||
for (Object key : possibleKeys) {
|
||||
providers = this.selectorProviders.get(key);
|
||||
if (providers != null) {
|
||||
break;
|
||||
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
|
||||
result.addAll(resultFromProviders);
|
||||
}
|
||||
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
List<Proxy> defaultProxys = defaultProxySelector.select(uri);
|
||||
if (defaultProxys != null && !defaultProxys.isEmpty()) {
|
||||
result.addAll(defaultProxys);
|
||||
}
|
||||
}
|
||||
return providers;
|
||||
}
|
||||
|
||||
public PasswordAuthentication getHttpPasswordAuthentication() {
|
||||
String[] schemas = new String[] { "http", "https" };
|
||||
for (String schema : schemas) {
|
||||
String proxyUser = System.getProperty(schema + ".proxyUser");
|
||||
String proxyPassword = System.getProperty(schema + ".proxyPassword");
|
||||
|
||||
if (StringUtils.isNotBlank(proxyUser)) {
|
||||
char[] pwdChars = new char[0];
|
||||
if (proxyPassword != null && !proxyPassword.isEmpty()) {
|
||||
pwdChars = proxyPassword.toCharArray();
|
||||
}
|
||||
return new PasswordAuthentication(proxyUser, pwdChars);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean addProxySelectorProvider(IProxySelectorProvider provider) {
|
||||
try {
|
||||
Object key = provider.getKey();
|
||||
Collection<IProxySelectorProvider> collection = this.selectorProviders.get(key);
|
||||
if (collection == null) {
|
||||
synchronized (this.selectorProviders) {
|
||||
collection = this.selectorProviders.get(key);
|
||||
if (collection == null) {
|
||||
collection = Collections.synchronizedList(new LinkedList<>());
|
||||
this.selectorProviders.put(key, collection);
|
||||
}
|
||||
}
|
||||
}
|
||||
collection.add(provider);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
List<IProxySelectorProvider> proxySelectorProviders = getProxySelectorProviders();
|
||||
if (!proxySelectorProviders.contains(provider)) {
|
||||
return proxySelectorProviders.add(provider);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean removeProxySelectorProvider(IProxySelectorProvider provider) {
|
||||
try {
|
||||
Object key = provider.getKey();
|
||||
Collection<IProxySelectorProvider> collection = this.selectorProviders.get(key);
|
||||
if (collection != null) {
|
||||
synchronized (this.selectorProviders) {
|
||||
collection = this.selectorProviders.get(key);
|
||||
if (collection != null) {
|
||||
collection.remove(provider);
|
||||
if (collection.isEmpty()) {
|
||||
this.selectorProviders.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return false;
|
||||
return getProxySelectorProviders().remove(provider);
|
||||
}
|
||||
|
||||
private List<IProxySelectorProvider> getProxySelectorProviders() {
|
||||
return selectorProviders;
|
||||
}
|
||||
|
||||
public ProxySelector getDefaultProxySelector() {
|
||||
@@ -404,7 +142,7 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
@Override
|
||||
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
|
||||
Collection<IProxySelectorProvider> providers = getCustomProviders(uri);
|
||||
List<IProxySelectorProvider> providers = getProxySelectorProviders();
|
||||
if (providers != null) {
|
||||
providers.stream().forEach(p -> {
|
||||
if (p.canHandle(uri)) {
|
||||
@@ -419,110 +157,22 @@ public class TalendProxySelector extends ProxySelector {
|
||||
}
|
||||
}
|
||||
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider() {
|
||||
if (disableDefaultSelector) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(Thread.currentThread());
|
||||
}
|
||||
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider(String host) {
|
||||
if (disableDefaultSelector) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(host);
|
||||
}
|
||||
|
||||
public static Collection<Object> getPossibleKeys(URI uri) {
|
||||
Collection<Object> possibleKeys = new ArrayList<>();
|
||||
possibleKeys.add(Thread.currentThread());
|
||||
if (uri != null) {
|
||||
String uriHost = uri.getHost();
|
||||
if (StringUtils.isNotBlank(uriHost)) {
|
||||
possibleKeys.add(uriHost);
|
||||
}
|
||||
}
|
||||
return possibleKeys;
|
||||
}
|
||||
|
||||
private class DefaultProxySelectorProvider extends AbstractProxySelectorProvider {
|
||||
|
||||
private Thread currentThread = null;
|
||||
|
||||
private String host = null;
|
||||
|
||||
public DefaultProxySelectorProvider(Thread thread) {
|
||||
this.currentThread = thread;
|
||||
}
|
||||
|
||||
public DefaultProxySelectorProvider(String host) {
|
||||
this.host = host;
|
||||
if (StringUtils.isNotBlank(this.host)) {
|
||||
this.host = this.host.toLowerCase();
|
||||
}
|
||||
}
|
||||
public static abstract class AbstractProxySelectorProvider implements IProxySelectorProvider {
|
||||
|
||||
@Override
|
||||
public Object getKey() {
|
||||
if (this.currentThread != null) {
|
||||
return currentThread;
|
||||
}
|
||||
if (this.host != null) {
|
||||
return this.host;
|
||||
}
|
||||
return super.getKey();
|
||||
public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(URI uri) {
|
||||
if (disableDefaultSelector) {
|
||||
return false;
|
||||
}
|
||||
if (currentThread != null && Thread.currentThread() == currentThread) {
|
||||
return true;
|
||||
}
|
||||
if (host != null) {
|
||||
if (uri == null) {
|
||||
return false;
|
||||
}
|
||||
String uriHost = uri.getHost();
|
||||
if (StringUtils.isNotBlank(uriHost)) {
|
||||
return this.host.equals(uriHost.toLowerCase());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(URI uri) {
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
try {
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
List<Proxy> defaultProxys = defaultProxySelector.select(uri);
|
||||
if (defaultProxys != null && !defaultProxys.isEmpty()) {
|
||||
for (Proxy proxy : defaultProxys) {
|
||||
SocketAddress addr = null;
|
||||
Proxy.Type proxyType = null;
|
||||
if (proxy != null) {
|
||||
proxyType = proxy.type();
|
||||
addr = proxy.address();
|
||||
}
|
||||
if (Proxy.Type.DIRECT == proxyType || (addr != null
|
||||
&& StringUtils.equals(uri.getHost(), ((InetSocketAddress) addr).getHostString()))) {
|
||||
result.add(Proxy.NO_PROXY);
|
||||
} else {
|
||||
result.add(proxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static interface IProxySelectorProvider {
|
||||
|
||||
boolean canHandle(final URI uri);
|
||||
|
||||
List<Proxy> select(final URI uri);
|
||||
|
||||
void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -136,4 +136,3 @@ ArchiveDirectoryChooser.DataTransfer_browse=B&rowse...
|
||||
ArchiveDirectoryChooser.WizardProjectsImportPage_ArchiveSelectTitle=Select &archive file:
|
||||
ArchiveDirectoryChooser.FileExport_selectDestinationMessage=Select a directory to export to.
|
||||
ArchiveDirectoryChooser.ArchiveExport_description=Export resources to an archive file on the local file system.
|
||||
DisplayUtils.NotSupportedExceptionOnLinux=Linux/Unit doesn't support multiple display.
|
||||
|
||||
@@ -20,8 +20,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.i18n.Messages;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
|
||||
/**
|
||||
* Utility methods to work with Display object
|
||||
@@ -130,13 +128,6 @@ public class DisplayUtils {
|
||||
}
|
||||
|
||||
public static void syncExecInNewUIThread(Runnable runnable, DeviceData deviceData) throws Exception {
|
||||
/**
|
||||
* Linux doesn't allow creating a display instance in a new thread after upgrading eclipse platform 4.10, we can
|
||||
* remove this check if future eclipse version support it again
|
||||
*/
|
||||
if (EnvironmentUtils.isLinuxUnixSystem()) {
|
||||
throw new UnsupportedOperationException(Messages.getString("DisplayUtils.NotSupportedExceptionOnLinux"));//$NON-NLS-1$
|
||||
}
|
||||
final Semaphore semaphore = new Semaphore(1, true);
|
||||
semaphore.acquire();
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
|
||||
@@ -67,15 +67,11 @@ public abstract class ProgressDialog {
|
||||
if (parentShell != null) {
|
||||
display2 = parentShell.getDisplay();
|
||||
}
|
||||
if (display2 == null) {
|
||||
display2 = Display.getDefault();
|
||||
}
|
||||
final Display display = display2;
|
||||
final InvocationTargetException[] iteHolder = new InvocationTargetException[1];
|
||||
try {
|
||||
final IRunnableWithProgress op = new IRunnableWithProgress() {
|
||||
|
||||
@Override
|
||||
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||
final InvocationTargetException[] iteHolder1 = new InvocationTargetException[1];
|
||||
try {
|
||||
@@ -100,7 +96,6 @@ public abstract class ProgressDialog {
|
||||
if (useAsync) {
|
||||
display.asyncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
@@ -111,7 +106,6 @@ public abstract class ProgressDialog {
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
@@ -134,7 +128,6 @@ public abstract class ProgressDialog {
|
||||
} else {
|
||||
display.syncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
@@ -145,7 +138,6 @@ public abstract class ProgressDialog {
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.ScrollBar;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
@@ -112,7 +111,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
*/
|
||||
@Override
|
||||
protected void execute(final boolean isFinalExecution, Object data) {
|
||||
Display.getDefault().syncExec(new Runnable() {
|
||||
drawableComposite.getBgDrawableComposite().getDisplay().syncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
if (isFinalExecution) {
|
||||
@@ -340,7 +339,7 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
}
|
||||
if ((WindowSystem.isGTK() || EnvironmentUtils.isMacOsSytem()) && child instanceof Tree) {
|
||||
returnedPoint.y += ((Tree) child).getHeaderHeight();
|
||||
returnedPoint.y += ((Tree) child).getItemHeight();
|
||||
returnedPoint.y += ((Table) child).getItemHeight();
|
||||
}
|
||||
child = child.getParent();
|
||||
ScrollBar vScrollBar = child.getVerticalBar();
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.eclipse.swt.widgets.TreeItem;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.utils.TableUtils;
|
||||
import org.talend.commons.ui.runtime.ws.WindowSystem;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.AbstractDataTableEditorView;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBackgroundRefresher;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
|
||||
import org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink;
|
||||
@@ -465,19 +464,4 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
}
|
||||
}
|
||||
|
||||
protected <B> void loadItemDataForLazyLoad(AbstractDataTableEditorView<B> tableEditorView) {
|
||||
if (!tableEditorView.getTableViewerCreator().isLazyLoad()) {
|
||||
return;
|
||||
}
|
||||
List<B> beansList = tableEditorView.getExtendedTableModel().getBeansList();
|
||||
Table table = tableEditorView.getTable();
|
||||
for (TableItem tableItem : table.getItems()) {
|
||||
if (tableItem.getData() == null) {
|
||||
int index = table.indexOf(tableItem);
|
||||
B schemaTarget = beansList.get(index);
|
||||
tableItem.setData(schemaTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -29,6 +29,8 @@ public interface FileConstants {
|
||||
|
||||
String RELATIONSHIP_FILE_NAME = "relationship.index"; //$NON-NLS-1$
|
||||
|
||||
String COMPONENT_FILE_NAME = "component.index"; //$NON-NLS-1$
|
||||
|
||||
String TALEND_RECYCLE_BIN_INDEX = "recycle_bin.index"; //$NON-NLS-1$
|
||||
|
||||
String MIGRATION_TASK_FILE_NAME = "migration_task.index"; //$NON-NLS-1$
|
||||
|
||||
@@ -212,5 +212,4 @@ RenameFolderAction.warning.cannotFind.message=Cannot rename folder, it may have
|
||||
RenameFolderAction.warning.cannotFind.title=Action not available
|
||||
|
||||
ConvertJobsUtil.warning.title=Warning
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Create stats log and implicit parameters
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
@@ -2,25 +2,12 @@ package org.talend.core.repository.logintask;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.eclipse.core.resources.IResourceRuleFactory;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.ProjectDataJsonProvider;
|
||||
import org.talend.login.AbstractLoginTask;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
|
||||
public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnableWithProgress {
|
||||
|
||||
@@ -33,38 +20,7 @@ public class SyncLibrariesLoginTask extends AbstractLoginTask implements IRunnab
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||
try {
|
||||
if (ProjectDataJsonProvider.hasFilledProjectSettingFile(ProjectManager.getInstance().getCurrentProject())) {
|
||||
return;
|
||||
}
|
||||
} catch (PersistenceException e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
return;
|
||||
}
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(
|
||||
new RepositoryWorkUnit<Void>(Messages.getString("SyncLibrariesLoginTask.createStatsLogAndImplicitParamter")) {
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
try {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IResourceRuleFactory ruleFactory = workspace.getRuleFactory();
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
ISchedulingRule refreshRule = ruleFactory.refreshRule(
|
||||
projectManager.getResourceProject(projectManager.getCurrentProject().getEmfProject()));
|
||||
workspace.run(new IWorkspaceRunnable() {
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
coreService
|
||||
.createStatsLogAndImplicitParamter(ProjectManager.getInstance().getCurrentProject());
|
||||
}
|
||||
}, refreshRule, IWorkspace.AVOID_UPDATE, monitor);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
coreService.createStatsLogAndImplicitParamter(ProjectManager.getInstance().getCurrentProject());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -215,18 +215,8 @@ public interface IRepositoryFactory {
|
||||
public void deleteObjectPhysical(Project project, IRepositoryViewObject objToDelete, String version,
|
||||
boolean fromEmptyRecycleBin, boolean isDeleteOnRemote) throws PersistenceException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Batch delete the object of the given object list.
|
||||
*
|
||||
* @param project - The object's project.
|
||||
* @param objToDeleteList - The objects list.
|
||||
* @param isDeleteAllVersion - True: delete all version by object id; False: delete object by id and version.
|
||||
* @param isDeleteOnRemote
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public void batchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList,
|
||||
boolean isDeleteAllVersion, boolean isDeleteOnRemote) throws PersistenceException;
|
||||
public void batchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote)
|
||||
throws PersistenceException;
|
||||
|
||||
/**
|
||||
* Restore a logically deleted object. <code>isDeleted</code> on this object will now returned <code>false</code>.
|
||||
|
||||
@@ -774,20 +774,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.talend.repository.model.IProxyRepositoryFactory#forceBatchDeleteObjectPhysical(org.talend.core.model.general.
|
||||
* Project, java.util.List, boolean, boolean)
|
||||
*/
|
||||
@Override
|
||||
public void forceBatchDeleteObjectPhysical(Project project, List<IRepositoryViewObject> objToDeleteList,
|
||||
boolean isDeleteAllVersion, boolean isDeleteOnRemote) throws PersistenceException {
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, objToDeleteList, isDeleteAllVersion,
|
||||
isDeleteOnRemote);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -946,7 +932,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
.getService(IRunProcessService.class);
|
||||
service.batchDeleteAllVersionTalendJobProject(idList);
|
||||
}
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, repositoryObjectList, true, false);
|
||||
this.repositoryFactoryFromProvider.batchDeleteObjectPhysical(project, repositoryObjectList, false);
|
||||
|
||||
// save project will handle git/svn update
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
@@ -2078,9 +2064,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
try {
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.load.sdk.componnents"), 1); // $NON-NLS-1$
|
||||
if (ITaCoKitService.getInstance() != null) {
|
||||
ITaCoKitService.getInstance().start();
|
||||
}
|
||||
ITaCoKitService.getInstance().start();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -2230,6 +2214,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
tdqRepositoryService.initProxyRepository();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute TaCoKit migration before fullLogonFinished
|
||||
*/
|
||||
try {
|
||||
ITaCoKitService tacokitService = ITaCoKitService.getInstance();
|
||||
if (tacokitService != null && tacokitService.isNeedMigration(project.getTechnicalLabel())) {
|
||||
tacokitService.checkMigration(monitor);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
fullLogonFinished = true;
|
||||
this.repositoryFactoryFromProvider.afterLogon(monitor);
|
||||
} finally {
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.core.repository.utils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class ComponentsJsonModel {
|
||||
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("version")
|
||||
private String version;
|
||||
|
||||
@JsonProperty("parentId")
|
||||
private String parentId;
|
||||
|
||||
@JsonProperty("configurationType")
|
||||
private String configurationType;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("displayName")
|
||||
private String displayName;
|
||||
|
||||
@JsonProperty("edges")
|
||||
private Set edges;
|
||||
|
||||
@JsonProperty("properties")
|
||||
private List properties;
|
||||
|
||||
@JsonProperty("actions")
|
||||
private Object actions;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getConfigurationType() {
|
||||
return configurationType;
|
||||
}
|
||||
|
||||
public void setConfigurationType(String configurationType) {
|
||||
this.configurationType = configurationType;
|
||||
}
|
||||
|
||||
public Set getEdges() {
|
||||
return edges;
|
||||
}
|
||||
|
||||
public void setEdges(Set edges) {
|
||||
this.edges = edges;
|
||||
}
|
||||
|
||||
public List getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(List properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public Object getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Object actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,10 +18,13 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -103,6 +106,54 @@ public class ProjectDataJsonProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public static void saveConfigComponent(String projectLabel, List<ComponentsJsonModel> componentJsons)
|
||||
throws PersistenceException {
|
||||
Collections.sort(componentJsons, new Comparator<ComponentsJsonModel>() {
|
||||
|
||||
@Override
|
||||
public int compare(ComponentsJsonModel configTypeNode1, ComponentsJsonModel configTypeNode2) {
|
||||
return configTypeNode1.getId().compareTo(configTypeNode2.getId());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
File file = getSavingConfigurationFile(projectLabel, FileConstants.COMPONENT_FILE_NAME);
|
||||
try {
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.writerWithDefaultPrettyPrinter().writeValue(file, componentJsons);
|
||||
ResourceUtils.getProject(projectLabel).getFolder(FileConstants.SETTINGS_FOLDER_NAME).refreshLocal(1, null);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, String[]> getLastConfigComponent(String projectLabel) throws PersistenceException {
|
||||
Map<String, String[]> componentMap = new HashMap<>();
|
||||
File file = getSavingConfigurationFile(projectLabel, FileConstants.COMPONENT_FILE_NAME);
|
||||
TypeReference<List<ComponentsJsonModel>> typeReference = new TypeReference<List<ComponentsJsonModel>>() {
|
||||
};
|
||||
List<ComponentsJsonModel> componentsJsons = null;
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(file);
|
||||
componentsJsons = new ObjectMapper().readValue(input, typeReference);
|
||||
} catch (IOException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
if (componentsJsons != null && componentsJsons.size() > 0) {
|
||||
for (ComponentsJsonModel component : componentsJsons) {
|
||||
String[] content = new String[] { component.getName(), component.getVersion(), component.getDisplayName() };
|
||||
componentMap.put(component.getId(), content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return componentMap;
|
||||
}
|
||||
|
||||
public static void loadProjectData(Project project, IPath projectFolderPath, int loadContent) throws PersistenceException {
|
||||
if ((loadContent & CONTENT_PROJECTSETTING) > 0) {
|
||||
loadProjectSettings(project, projectFolderPath);
|
||||
@@ -115,8 +166,8 @@ public class ProjectDataJsonProvider {
|
||||
RecycleBinManager.getInstance().clearCache(project);
|
||||
RecycleBin recycleBin = RecycleBinManager.getInstance().getRecycleBin(project);
|
||||
project.getDeletedFolders().clear();
|
||||
for (String element : recycleBin.getDeletedFolders()) {
|
||||
project.getDeletedFolders().add(element);
|
||||
for (int i = 0; i < recycleBin.getDeletedFolders().size(); i++) {
|
||||
project.getDeletedFolders().add(recycleBin.getDeletedFolders().get(i));
|
||||
}
|
||||
}
|
||||
if ((loadContent & CONTENT_MIGRATIONTASK) > 0) {
|
||||
@@ -234,8 +285,8 @@ public class ProjectDataJsonProvider {
|
||||
if (migrationTaskSetting != null) {
|
||||
MigrationTask fakeTask = createFakeMigrationTask();
|
||||
MigrationTask existingFakeTask = null;
|
||||
for (Object element : project.getMigrationTask()) {
|
||||
MigrationTask task = (MigrationTask) element;
|
||||
for (int i = 0; i < project.getMigrationTask().size(); i++) {
|
||||
MigrationTask task = (MigrationTask) project.getMigrationTask().get(i);
|
||||
if (StringUtils.equals(fakeTask.getId(), task.getId())) {
|
||||
existingFakeTask = task;
|
||||
break;
|
||||
@@ -355,38 +406,6 @@ public class ProjectDataJsonProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean hasFilledProjectSettingFile(org.talend.core.model.general.Project project) throws PersistenceException {
|
||||
FileInputStream InputStream = null;
|
||||
boolean hasFilled = false;
|
||||
try {
|
||||
IProject physProject = ResourceUtils.getProject(project);
|
||||
IPath location = physProject.getLocation();
|
||||
File file = ProjectDataJsonProvider.getLoadingConfigurationFile(location, FileConstants.PROJECTSETTING_FILE_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
InputStream = new FileInputStream(file);
|
||||
ProjectSettings projectSetting = new ObjectMapper().readValue(new FileInputStream(file), ProjectSettings.class);
|
||||
if (projectSetting != null) {
|
||||
ImplicitContextSettingJson implicitContextSettingJson = projectSetting.getImplicitContextSettingJson();
|
||||
if (implicitContextSettingJson != null) {
|
||||
ParametersTypeJson parametersTypeJson = implicitContextSettingJson.getParametersTypeJson();
|
||||
if (parametersTypeJson != null) {
|
||||
List<ElementParameterTypeJson> elementParameters = parametersTypeJson.getElementParameters();
|
||||
if (elementParameters.size() > 0) {
|
||||
hasFilled = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
throw new PersistenceException(e1);
|
||||
} finally {
|
||||
closeInputStream(InputStream);
|
||||
}
|
||||
return hasFilled;
|
||||
}
|
||||
|
||||
protected static ImplicitContextSettingJson getImplicitContextSettingJson(ImplicitContextSettings implicitContextSettings) {
|
||||
if (implicitContextSettings != null) {
|
||||
ImplicitContextSettingJson implicitContextSettingJson = new ImplicitContextSettingJson(implicitContextSettings);
|
||||
@@ -420,8 +439,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<StatusJson> getTechnicalStatusJson(List technicalStatus) {
|
||||
if (technicalStatus != null && technicalStatus.size() > 0) {
|
||||
List<StatusJson> list = new ArrayList<StatusJson>(technicalStatus.size());
|
||||
for (Object technicalStatu : technicalStatus) {
|
||||
StatusJson json = new StatusJson((Status) technicalStatu);
|
||||
for (int i = 0; i < technicalStatus.size(); i++) {
|
||||
StatusJson json = new StatusJson((Status) technicalStatus.get(i));
|
||||
list.add(json);
|
||||
}
|
||||
return list;
|
||||
@@ -441,8 +460,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<StatusJson> getDocumentationJson(List documentationStatus) {
|
||||
if (documentationStatus != null && documentationStatus.size() > 0) {
|
||||
List<StatusJson> list = new ArrayList<StatusJson>(documentationStatus.size());
|
||||
for (Object documentationStatu : documentationStatus) {
|
||||
StatusJson json = new StatusJson((Status) documentationStatu);
|
||||
for (int i = 0; i < documentationStatus.size(); i++) {
|
||||
StatusJson json = new StatusJson((Status) documentationStatus.get(i));
|
||||
list.add(json);
|
||||
}
|
||||
return list;
|
||||
@@ -462,8 +481,8 @@ public class ProjectDataJsonProvider {
|
||||
protected static List<ItemRelationsJson> getItemRelationsJson(List itemsRelations) {
|
||||
if (itemsRelations.size() > 0) {
|
||||
List<ItemRelationsJson> list = new ArrayList<ItemRelationsJson>(itemsRelations.size());
|
||||
for (Object itemsRelation : itemsRelations) {
|
||||
ItemRelations relations = (ItemRelations) itemsRelation;
|
||||
for (int i = 0; i < itemsRelations.size(); i++) {
|
||||
ItemRelations relations = (ItemRelations) itemsRelations.get(i);
|
||||
ItemRelationsJson json = new ItemRelationsJson(relations);
|
||||
list.add(json);
|
||||
}
|
||||
@@ -588,16 +607,16 @@ class ParametersTypeJson {
|
||||
public ParametersTypeJson(ParametersType parametersType) {
|
||||
if (parametersType.getElementParameter().size() > 0) {
|
||||
elementParameters = new ArrayList<ElementParameterTypeJson>();
|
||||
for (Object element : parametersType.getElementParameter()) {
|
||||
ElementParameterType type = (ElementParameterType) element;
|
||||
for (int i = 0; i < parametersType.getElementParameter().size(); i++) {
|
||||
ElementParameterType type = (ElementParameterType) parametersType.getElementParameter().get(i);
|
||||
ElementParameterTypeJson typeJson = new ElementParameterTypeJson(type);
|
||||
elementParameters.add(typeJson);
|
||||
}
|
||||
}
|
||||
if (parametersType.getRoutinesParameter().size() > 0) {
|
||||
routinesParameters = new ArrayList<RoutinesParameterTypeJson>();
|
||||
for (Object element : parametersType.getRoutinesParameter()) {
|
||||
RoutinesParameterType type = (RoutinesParameterType) element;
|
||||
for (int i = 0; i < parametersType.getRoutinesParameter().size(); i++) {
|
||||
RoutinesParameterType type = (RoutinesParameterType) parametersType.getRoutinesParameter().get(i);
|
||||
RoutinesParameterTypeJson typeJson = new RoutinesParameterTypeJson(type);
|
||||
routinesParameters.add(typeJson);
|
||||
}
|
||||
@@ -671,8 +690,8 @@ class ElementParameterTypeJson {
|
||||
this.isShow = type.isShow();
|
||||
if (type.getElementValue().size() > 0) {
|
||||
elementValues = new ArrayList<ElementValueTypeJson>();
|
||||
for (Object element : type.getElementValue()) {
|
||||
ElementValueType value = (ElementValueType) element;
|
||||
for (int i = 0; i < type.getElementValue().size(); i++) {
|
||||
ElementValueType value = (ElementValueType) type.getElementValue().get(i);
|
||||
ElementValueTypeJson valueJson = new ElementValueTypeJson(value);
|
||||
elementValues.add(valueJson);
|
||||
}
|
||||
@@ -902,8 +921,8 @@ class ItemRelationsJson {
|
||||
}
|
||||
if (relations.getRelatedItems().size() > 0) {
|
||||
relatedItems = new ArrayList<ItemRelationJson>(relations.getRelatedItems().size());
|
||||
for (Object element : relations.getRelatedItems()) {
|
||||
relatedItems.add(new ItemRelationJson((ItemRelation) element));
|
||||
for (int i = 0; i < relations.getRelatedItems().size(); i++) {
|
||||
relatedItems.add(new ItemRelationJson((ItemRelation) relations.getRelatedItems().get(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1050,8 +1069,8 @@ class MigrationTaskSetting {
|
||||
if (project != null) {
|
||||
if (project.getMigrationTask().size() > 0) {
|
||||
migrationTaskList = new ArrayList<MigrationTaskJson>();
|
||||
for (Object element : project.getMigrationTask()) {
|
||||
MigrationTask task = (MigrationTask) element;
|
||||
for (int i = 0; i < project.getMigrationTask().size(); i++) {
|
||||
MigrationTask task = (MigrationTask) project.getMigrationTask().get(i);
|
||||
migrationTaskList.add(new MigrationTaskJson(task));
|
||||
}
|
||||
migrationTaskList.sort(new Comparator<MigrationTaskJson>() {
|
||||
@@ -1068,8 +1087,8 @@ class MigrationTaskSetting {
|
||||
}
|
||||
if (project.getMigrationTasks().size() > 0) {
|
||||
migrationTasksList = new ArrayList<String>();
|
||||
for (Object element : project.getMigrationTasks()) {
|
||||
String task = (String) element;
|
||||
for (int i = 0; i < project.getMigrationTasks().size(); i++) {
|
||||
String task = (String) project.getMigrationTasks().get(i);
|
||||
migrationTasksList.add(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,22 +131,4 @@ public class ProjectHelper {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* define the different value for the project types the string value in the licence files Matcht the java enum name
|
||||
* this is a copy of org.talend.commons.model.KeyConstants.ProjectType to avoid adding the all library
|
||||
*
|
||||
*/
|
||||
public static enum ProjectType {
|
||||
DI,
|
||||
DQ,
|
||||
MDM;
|
||||
}
|
||||
|
||||
public static int getProjectTypeOrdinal(org.talend.core.model.properties.Project project) {
|
||||
if (project != null && project.getType() != null) {
|
||||
return ProjectType.valueOf(project.getType()).ordinal();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ Export-Package: org.talend.commons.utils.generation,
|
||||
org.talend.core.prefs,
|
||||
org.talend.core.repository,
|
||||
org.talend.core.runtime,
|
||||
org.talend.core.runtime.constants,
|
||||
org.talend.core.runtime.dynamic,
|
||||
org.talend.core.runtime.evaluator,
|
||||
org.talend.core.runtime.hd,
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<dbType type="CHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="LONG"/>
|
||||
<dbType type="CLOB"/>
|
||||
<dbtype type="CLOB"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes><!-- Adviced mappings -->
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
<dbType type="xs:time" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="xs:decimal" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="xs:QName" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="xs:list" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="xs:union" ignoreLen="true" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
@@ -143,12 +141,6 @@
|
||||
<dbType type="xs:time">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="xs:list">
|
||||
<talendType type="id_List" default="true" />
|
||||
</dbType>
|
||||
<dbType type="xs:union">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-M6</version>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -12,14 +12,11 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.utils.IXSDPopulationUtil;
|
||||
@@ -50,8 +47,6 @@ public interface IESBService extends IService {
|
||||
|
||||
public StringBuffer getAllTheJObNames(IRepositoryNode jobList);
|
||||
|
||||
public List<String> getSerivceRelatedJobIds(Item serviceItem);
|
||||
|
||||
public void deleteOldRelation(String jobID);
|
||||
|
||||
// public void setSelectedItem(Item, )
|
||||
@@ -64,8 +59,6 @@ public interface IESBService extends IService {
|
||||
|
||||
public void copyDataServiceRelateJob(Item newItem);
|
||||
|
||||
public boolean isRESTService(ProcessItem processItem);
|
||||
|
||||
public IXSDPopulationUtil getXSDPopulationUtil();
|
||||
|
||||
public boolean isWSDLEditor(IWorkbenchPart part);
|
||||
|
||||
@@ -89,8 +89,6 @@ public interface ILibraryManagerService extends IService {
|
||||
* @return
|
||||
*/
|
||||
public boolean retrieve(String jarNeeded, String pathToStore, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(String jarNeeded, String jarURL, String pathToStore, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(String jarNeeded, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -208,12 +206,8 @@ public interface ILibraryManagerService extends IService {
|
||||
*/
|
||||
public boolean isJarNeedToBeDeployed(File jarFile);
|
||||
|
||||
public boolean isSameFile(File f1, File f2);
|
||||
|
||||
public void checkModuleStatus(ModuleNeeded module);
|
||||
|
||||
public String getJarNameFromMavenuri(String mavenURI);
|
||||
|
||||
public void guessMavenRUIFromIndex(File jarFile, Map<String, String> sourceAndMavenUri);
|
||||
|
||||
}
|
||||
|
||||
@@ -210,9 +210,4 @@ public interface ITDQRepositoryService extends IService {
|
||||
* @param ruManager: RepositoryUpdateManager
|
||||
*/
|
||||
void updateAllContextInAnalysisAndReport(RepositoryUpdateManager ruManager, Object parameter, boolean isUpdated);
|
||||
|
||||
/**
|
||||
* @param chooseContext the context name which want to swtich
|
||||
*/
|
||||
void popupSwitchContextFailedMessage(String chooseContext);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PluginChecker {
|
||||
|
||||
private static final String GIT_PROVIDER_PLUGIN_ID = "org.talend.repository.gitprovider"; //$NON-NLS-1$
|
||||
|
||||
public static final String CORE_TIS_PLUGIN_ID = "org.talend.core.tis"; //$NON-NLS-1$
|
||||
private static final String CORE_TIS_PLUGIN_ID = "org.talend.core.tis"; //$NON-NLS-1$
|
||||
|
||||
private static final String HL7_PLUGIN_ID = "org.talend.repository.hl7"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ public class ClassLoaderFactory {
|
||||
String jarsStr = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
|
||||
moduleList = jarsStr.split(";"); //$NON-NLS-1$
|
||||
} else {
|
||||
String index = getDistributionIndex(metadataConn);
|
||||
String index = getDistributionIndex(metadataConn); //$NON-NLS-1$
|
||||
moduleList = getDriverModuleList(index);
|
||||
}
|
||||
return moduleList;
|
||||
@@ -365,41 +365,39 @@ public class ClassLoaderFactory {
|
||||
return hdClassLoader;
|
||||
}
|
||||
|
||||
private static IConfigurationElement[] getConfigurationElements() {
|
||||
checkCache();
|
||||
private static synchronized IConfigurationElement[] getConfigurationElements() {
|
||||
if (isCacheChanged()) {
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
}
|
||||
return configurationElements;
|
||||
}
|
||||
|
||||
private synchronized static void checkCache() {
|
||||
boolean isCacheChanged = false;
|
||||
private static boolean isCacheChanged() {
|
||||
if (classLoadersMap == null) {
|
||||
return true;
|
||||
}
|
||||
if (configurationElements == null) {
|
||||
return true;
|
||||
}
|
||||
if (configurationElements != null) {
|
||||
for (IConfigurationElement configElement : configurationElements) {
|
||||
if (!configElement.isValid()) {
|
||||
isCacheChanged = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!StringUtils.equals(cacheVersion, BigDataBasicUtil.getDynamicDistributionCacheVersion())) {
|
||||
isCacheChanged = true;
|
||||
}
|
||||
if (isCacheChanged) {
|
||||
init();
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
cacheVersion = BigDataBasicUtil.getDynamicDistributionCacheVersion();
|
||||
} else {
|
||||
if (classLoadersMap == null) {
|
||||
init();
|
||||
}
|
||||
if (configurationElements == null) {
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
configurationElements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID);
|
||||
}
|
||||
if (cacheVersion != null && !cacheVersion.equals(BigDataBasicUtil.getDynamicDistributionCacheVersion())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Map<String, DynamicClassLoader> getClassLoaderMap() {
|
||||
checkCache();
|
||||
if (isCacheChanged()) {
|
||||
init();
|
||||
cacheVersion = BigDataBasicUtil.getDynamicDistributionCacheVersion();
|
||||
}
|
||||
return classLoadersMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,12 +98,6 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN = "CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_WEBHDFS_SSL = "CONN_PARA_KEY_USE_WEBHDFS_SSL";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PATH = "CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PATH"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PASSWORD = "CONN_PARA_KEY_WEBHDFS_SSL_TRUST_STORE_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Hive keys.
|
||||
*/
|
||||
|
||||
@@ -47,8 +47,6 @@ public class DatabaseConnStrUtil {
|
||||
// for match url has :<port> exist
|
||||
private static final String PATTERN_PORT = "(:\\d{1,5})";
|
||||
|
||||
private static final String DATABASE_STRING = "DATABASE=";
|
||||
|
||||
private static String getStringReplace(final String init, final String before, final String after,
|
||||
final boolean supportContext) {
|
||||
return getStringReplace(init, before, after, supportContext, false);
|
||||
@@ -129,13 +127,6 @@ public class DatabaseConnStrUtil {
|
||||
} else {
|
||||
s = getStringReplace(s, EDatabaseConnVar.PORT.getVariable(), port, supportContext);
|
||||
}
|
||||
if (EDatabaseConnTemplate.TERADATA.equals(connStr)) {
|
||||
if (StringUtils.isNotBlank(sid)) {
|
||||
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable(), DATABASE_STRING + sid, supportContext);
|
||||
} else {
|
||||
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable() + ",", sid, supportContext); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
s = getStringReplace(s, EDatabaseConnVar.SID.getVariable(), sid, supportContext);
|
||||
s = getStringReplace(s, EDatabaseConnVar.SERVICE_NAME.getVariable(), sid, supportContext);
|
||||
s = getStringReplace(s, EDatabaseConnVar.DATASOURCE.getVariable(), datasource, supportContext);
|
||||
@@ -574,7 +565,7 @@ public class DatabaseConnStrUtil {
|
||||
List<ERepositoryObjectType> extraTypes = new ArrayList<>();
|
||||
IGenericDBService dbService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericDBService.class)) {
|
||||
dbService = GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
|
||||
dbService = (IGenericDBService) GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
|
||||
}
|
||||
if (dbService != null) {
|
||||
extraTypes.addAll(dbService.getExtraTypes());
|
||||
|
||||
@@ -107,7 +107,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9.X", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -164,11 +164,11 @@ public enum EDatabaseVersion4Drivers {
|
||||
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.32.1056.jar")), //$NON-NLS-1$
|
||||
"redshift-jdbc42-no-awssdk-1.2.20.1043.jar")), //$NON-NLS-1$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.32.1056.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.9.9.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar", "commons-codec-1.6.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.20.1043.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.9.5.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.core.hadoop;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.classloader.DynamicClassLoader;
|
||||
/**
|
||||
* created by hcyi on Dec 3, 2019
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public class HadoopClassLoaderUtil {
|
||||
|
||||
public final static String[] webhdfsExtraJars = { "jersey-core-1.9.jar", "jersey-client-1.9.jar", "jetty-util-6.1.26.jar" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
private final static String[] webhdfsExtraJarNames = { "jersey-core", "jersey-client", "jetty-util" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
public static boolean isWebHDFS(String nameNodeURI) {
|
||||
if (nameNodeURI != null
|
||||
&& (nameNodeURI.toLowerCase().startsWith("swebhdfs://") || nameNodeURI.toLowerCase().startsWith("webhdfs://"))) {//$NON-NLS-1$ //$NON-NLS-2$
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ClassLoader addExtraJars(ClassLoader classLoader, EHadoopCategory category, String nameNodeURI) {
|
||||
if (isWebHDFS(nameNodeURI) && classLoader != null && classLoader instanceof DynamicClassLoader) {
|
||||
DynamicClassLoader loader = (DynamicClassLoader) classLoader;
|
||||
switch (category) {
|
||||
case HDFS:
|
||||
List<String> excludedJars = new ArrayList<String>();
|
||||
Set<String> libraries = loader.getLibraries();
|
||||
for (String lib : libraries) {
|
||||
for (int i = 0; i < webhdfsExtraJarNames.length; i++) {
|
||||
if (lib.contains(webhdfsExtraJarNames[i])) {
|
||||
excludedJars.add(webhdfsExtraJars[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (excludedJars.size() < 3) {
|
||||
List<String> addedJars = new ArrayList<String>();
|
||||
for (String webhdfsExtraJar : webhdfsExtraJars) {
|
||||
if (!excludedJars.contains(webhdfsExtraJar)) {
|
||||
addedJars.add(webhdfsExtraJar);
|
||||
}
|
||||
}
|
||||
try {
|
||||
classLoader = DynamicClassLoader.createNewOneBaseLoader(loader,
|
||||
addedJars.toArray(new String[addedJars.size()]), null);
|
||||
} catch (MalformedURLException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return classLoader;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,6 @@ import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryTypeProcessor;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.model.IRepositoryNode;
|
||||
|
||||
/**
|
||||
@@ -265,7 +264,4 @@ public interface IHadoopClusterService extends IService {
|
||||
|
||||
public boolean updateConfJarsByContextGroup(ContextItem contextItem, Map<String, String> contextGroupRanamedMap);
|
||||
|
||||
public ContextType getHadoopClusterContextType(String id);
|
||||
|
||||
public Map<String, String> getHadoopSSLParameters(String clusterId);
|
||||
}
|
||||
|
||||
@@ -22,18 +22,15 @@ import java.util.Map.Entry;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.hadoop.HadoopClassLoaderUtil;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.core.prefs.SSLPreferenceConstants;
|
||||
import org.talend.core.service.IMetadataManagmentUiService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* created by ycbai on 2013-10-24 Detailled comment
|
||||
@@ -178,7 +175,7 @@ public class HadoopRepositoryUtil {
|
||||
List<Map<String, Object>> properties = null;
|
||||
IMetadataManagmentUiService mmUIService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
|
||||
mmUIService = GlobalServiceRegister.getDefault().getService(
|
||||
mmUIService = (IMetadataManagmentUiService) GlobalServiceRegister.getDefault().getService(
|
||||
IMetadataManagmentUiService.class);
|
||||
}
|
||||
ContextType contextType = null;
|
||||
@@ -328,23 +325,10 @@ public class HadoopRepositoryUtil {
|
||||
public static IHadoopClusterService getHadoopClusterService() {
|
||||
IHadoopClusterService hadoopClusterService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
|
||||
hadoopClusterService = GlobalServiceRegister.getDefault().getService(
|
||||
hadoopClusterService = (IHadoopClusterService) GlobalServiceRegister.getDefault().getService(
|
||||
IHadoopClusterService.class);
|
||||
}
|
||||
return hadoopClusterService;
|
||||
}
|
||||
|
||||
public static void setSSLSystemProperty(boolean isUseSSL, String nameNodeURI, String trustStorePath,
|
||||
String trustStorePassword) {
|
||||
if (isUseSSL) {
|
||||
System.setProperty(SSLPreferenceConstants.TRUSTSTORE_FILE, trustStorePath);
|
||||
System.setProperty(SSLPreferenceConstants.TRUSTSTORE_PASSWORD,
|
||||
StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM).decrypt(trustStorePassword));
|
||||
} else {
|
||||
if (HadoopClassLoaderUtil.isWebHDFS(nameNodeURI)) {
|
||||
System.clearProperty(SSLPreferenceConstants.TRUSTSTORE_FILE);
|
||||
System.clearProperty(SSLPreferenceConstants.TRUSTSTORE_PASSWORD);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,15 +60,6 @@ public interface IComponent {
|
||||
|
||||
public String getOriginalName();
|
||||
|
||||
/**
|
||||
* Only for component display (palette,search)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default public String getDisplayName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
public String getLongName();
|
||||
|
||||
public String getOriginalFamilyName();
|
||||
|
||||
@@ -98,15 +98,6 @@ public class JobContext implements IContext, Cloneable {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean containsSameParameterIgnoreCase(String parameterName) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
if (contextParam.getName() != null && contextParam.getName().equalsIgnoreCase(parameterName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Commented by Marvin Wang on Mar.2, 2012, the user who invokes the method should notice that if the
|
||||
* <code>JobContext</code> has more than one <code>ContextParameter</code>s which names are same, this case will
|
||||
|
||||
@@ -29,4 +29,5 @@ public interface INexusService extends IService {
|
||||
|
||||
ArtifactRepositoryBean getPublishNexusServerBean(String repositoryId);
|
||||
|
||||
ArtifactRepositoryBean getArtifactRepositoryFromServer();
|
||||
}
|
||||
|
||||
@@ -167,9 +167,9 @@ public interface IMetadataConnection extends IMetadata {
|
||||
|
||||
public void setOtherParameter(String otherParameter);
|
||||
|
||||
public String getWarehouse();
|
||||
public String getDbName();
|
||||
|
||||
public void setWarehouse(String warehouse);
|
||||
public void setDbName(String dbName);
|
||||
|
||||
public String getUiSchema();
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ public interface IMetadataTable {
|
||||
public List<IMetadataColumn> getListColumns();
|
||||
|
||||
public List<IMetadataColumn> getListColumns(boolean withUnselected);
|
||||
|
||||
public List<IMetadataColumn> getListColumns(boolean withUnselected, boolean isCopyTable);
|
||||
|
||||
public void setListColumns(List<IMetadataColumn> listColumns);
|
||||
|
||||
|
||||
@@ -45,14 +45,6 @@ public interface ISAPConstant {
|
||||
|
||||
public static final String CHANGING = "CHANGING";//$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_TYPE = "PARAMETER_TYPE";//$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_TYPE_IMPORT = "IMPORT";//$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_TYPE_CHANGING = "CHANGING";//$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_TYPE_TABLES = "TABLES";//$NON-NLS-1$
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -130,9 +130,9 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
return getListColumns(false);
|
||||
// return this.listColumns;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected) {
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected, boolean isCopyTable) {
|
||||
Iterator<IMetadataColumn> it = this.listColumns.iterator();
|
||||
while (it.hasNext()) {
|
||||
IMetadataColumn column = it.next();
|
||||
@@ -153,7 +153,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();
|
||||
temp.addAll(this.listColumns);
|
||||
temp.addAll(this.unusedColumns);
|
||||
if (originalColumns != null && isRepository) {
|
||||
if (originalColumns != null && isRepository && !isCopyTable) {
|
||||
Collections.sort(temp, new Comparator<IMetadataColumn>() {
|
||||
|
||||
@Override
|
||||
@@ -169,6 +169,11 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
return this.listColumns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected) {
|
||||
return getListColumns(withUnselected, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDynamicSchema() {
|
||||
return getDynamicColumn() != null;
|
||||
@@ -252,8 +257,8 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
if (!(input instanceof IMetadataTable)) {
|
||||
return false;
|
||||
}
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true);
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true, true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true, true);
|
||||
if (thisColumnListWithUnselected == null) {
|
||||
if (inputColumnListWithUnselected != null) {
|
||||
return false;
|
||||
|
||||
@@ -585,12 +585,17 @@ public final class MetadataToolHelper {
|
||||
|
||||
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
|
||||
boolean avoidUsedColumnsFromInput) {
|
||||
copyTable(source, target, targetDbms, avoidUsedColumnsFromInput, false);
|
||||
}
|
||||
|
||||
public static void copyTable(IMetadataTable source, IMetadataTable target, String targetDbms,
|
||||
boolean avoidUsedColumnsFromInput, boolean withCustoms) {
|
||||
if (source == null || target == null) {
|
||||
return;
|
||||
}
|
||||
List<IMetadataColumn> columnsToRemove = new ArrayList<IMetadataColumn>();
|
||||
List<String> readOnlycolumns = new ArrayList<String>();
|
||||
for (IMetadataColumn column : target.getListColumns(true)) {
|
||||
for (IMetadataColumn column : target.getListColumns(true, true)) {
|
||||
if (!column.isCustom()) {
|
||||
columnsToRemove.add(column);
|
||||
}
|
||||
@@ -602,9 +607,9 @@ public final class MetadataToolHelper {
|
||||
target.getListUnusedColumns().removeAll(columnsToRemove);
|
||||
|
||||
List<IMetadataColumn> columnsTAdd = new ArrayList<IMetadataColumn>();
|
||||
for (IMetadataColumn column : source.getListColumns(!avoidUsedColumnsFromInput)) {
|
||||
for (IMetadataColumn column : source.getListColumns(!avoidUsedColumnsFromInput, true)) {
|
||||
IMetadataColumn targetColumn = target.getColumn(column.getLabel());
|
||||
IMetadataColumn newTargetColumn = column.clone();
|
||||
IMetadataColumn newTargetColumn = column.clone(withCustoms);
|
||||
if (targetColumn == null) {
|
||||
columnsTAdd.add(newTargetColumn);
|
||||
newTargetColumn
|
||||
@@ -669,7 +674,7 @@ public final class MetadataToolHelper {
|
||||
List<IMetadataColumn> targetColumns = target.getListColumns();
|
||||
List<String> temp = new ArrayList<String>(tColumns);
|
||||
if (targetColumns != null) {
|
||||
final List<String> columnNames = new ArrayList<String>();
|
||||
List<String> columnNames = new ArrayList<String>();
|
||||
for(IMetadataColumn column : targetColumns){
|
||||
columnNames.add(column.getLabel());
|
||||
}
|
||||
|
||||
@@ -100,10 +100,7 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
|
||||
private String otherParameter;
|
||||
|
||||
/**
|
||||
* TDQ-17294: used for support snowflake warehouse.
|
||||
*/
|
||||
private String warehouse;
|
||||
private String dbName;
|
||||
|
||||
private String uiSchema;
|
||||
|
||||
@@ -674,12 +671,12 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
this.otherParameter = otherParameter;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
public String getDbName() {
|
||||
return dbName;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
public void setDbName(String dbName) {
|
||||
this.dbName = dbName;
|
||||
}
|
||||
|
||||
public String getUiSchema() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user