Compare commits

...

87 Commits

Author SHA1 Message Date
zwxue
fa1de2e4b9 TDI-37120: Edit schema which used in job, will hang on "Progress
Information" long time.
2018-06-04 16:54:02 +08:00
iwangtalend
a085e2b83c Merge pull request #885 from Talend/feature/DEVOPS-1729/patch/6.1.1_nexus
DEVOPS-1729 Nexus migration: Update URLs [patch/6.1.1]
2017-03-02 16:40:33 +01:00
build-talend
9fe2e6368f DEVOPS-1729 Nexus migration: Update URLs 2017-03-02 16:20:11 +01:00
ycbai
b453cb4d44 TBD-4003: Hive:Hadoop cluster parameter is add double quotes when drag
below items to job
2017-02-08 15:12:07 +08:00
ycbai
1c1806223f TBD-3907: When hadoop cluster and hbase are all on context mode, drag
hbase schema to job don't add hadoop properties parameter to job
2017-02-07 15:37:48 +08:00
ycbai
539317d611 TBD-3755: Hadoop connection won't be contextualized when drag/drop a
hive connection

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/utils/ContextParameterUtils.java
	main/plugins/org.talend.metadata.managment.ui/src/main/java/org/talend/metadata/managment/ui/utils/DBConnectionContextUtils.java
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/hive/creator/HiveConnectionCreator.java
2017-02-07 15:01:40 +08:00
ycbai
6e3c741ac6 Revert "TBD-3755: Hadoop connection won't be contextualized when drag/drop a hive connection"
This reverts commit 2e301b7d9d.
2017-02-07 11:44:54 +08:00
ycbai
2e301b7d9d TBD-3755: Hadoop connection won't be contextualized when drag/drop a
hive connection

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/utils/ContextParameterUtils.java
	main/plugins/org.talend.metadata.managment.ui/src/main/java/org/talend/metadata/managment/ui/utils/DBConnectionContextUtils.java
	main/plugins/org.talend.metadata.managment/src/main/java/org/talend/metadata/managment/hive/creator/HiveConnectionCreator.java
2017-01-25 11:50:33 +08:00
GuoLiang
a7c3d53443 TUP-16461 fix:Building the job is not generating zip file (#768) 2016-12-27 17:45:38 +08:00
cmeng-talend
2f348cce53 TDI-34944 bug: NPE when ticked "use dynamic job" on DND trunjob
component
https://jira.talendforge.org/browse/TDI-34944

Add some comments for ERepositoryObjectType
2016-12-27 15:28:54 +08:00
wchen-talend
e772a9fa0d TPS-1731:[6.1.1]Build Jobs and Job Hierarchy are broken for recursive
jobs(TUP-5993)
2016-12-23 14:26:44 +08:00
wchen-talend
2c1b9ff853 TPS-1655
[6.1.1]Slow job generation in Talend Data Integration (TUP-16206)
2016-12-19 20:06:05 +08:00
wchen-talend
0bbd6dc895 TPS-1655:[6.1.1]Slow job generation in Talend Data Integration
(TUP-16206)
2016-12-14 10:19:39 +08:00
zwxue
b3a4bba4a2 TUP-15856: Unable to create metadata from xsd file. 2016-10-11 10:51:15 +08:00
guol
528f0028ad for patch TPS-1549 2016-09-30 09:38:22 +08:00
nrousseau
3f5e21db42 TDI-36930: Improve performances during the build (#591) 2016-09-29 09:36:00 +08:00
GGu
0d10f780de TDI-36930: Only format main job and check compile error after build 2016-09-29 09:35:37 +08:00
wchen-talend
f5cb00ac80 TDI-36560:The order of schema changed when ticked "used column" again 2016-09-21 11:02:00 +08:00
hcyi
fa33b40652 TDI-37001:Create MDM MetaData Connection to SSL MDM server failed 2016-09-06 14:06:37 +08:00
hcyi
a24d751ce8 TDI-37001:Create MDM MetaData Connection to SSL MDM server failed 2016-09-06 14:05:47 +08:00
hcyi
586ce5d0e6 TDI-37100:Create a IMDMService class(TDI-37001) 2016-09-06 14:05:41 +08:00
cmeng-talend
f82c68cd0a TUP-5020 fix: Wrong commit in specified case
https://jira.talendforge.org/browse/TUP-5020

Refact GitHandler
2016-08-30 15:25:50 +08:00
cmeng-talend
2b7458c2ca TUP-5020 fix: Wrong commit in specified case
https://jira.talendforge.org/browse/TUP-5020

Refact GitHandler
2016-08-30 12:01:06 +08:00
cmeng-talend
e3d52ecc97 TUP-5020 fix: Wrong commit in specified case
https://jira.talendforge.org/browse/TUP-5020

Refact GitHandler

Conflicts:
	main/plugins/org.talend.core.repository/src/main/java/org/talend/core/repository/model/ProxyRepositoryFactory.java

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/repository/ProjectManager.java
2016-08-30 11:59:21 +08:00
hcyi
781ed521ff TBD-3869:Column family is missing when dragging hbase retrived table to
a job.
2016-08-23 15:18:43 +08:00
hwang
c4488f6e0f TBD-3644:tSqoopXX -> Selecting a JDBC metadata loses the DB_VERSION of
the same component
2016-08-22 14:14:44 +08:00
rdubois
0eadf601b7 TBD-3651 fixed - Do not use the auto-build feature during the job build time 2016-08-16 16:56:21 +08:00
hcyi
843ec7f738 TPS-1476:[6.1.1] Unable to connect to kerberized Impala on CDH 5.5 on db
connection metadata wizard.
2016-08-11 16:08:40 +08:00
hcyi
2480938238 TBD-3460: fix a problem about the Impala database url . 2016-08-11 14:20:33 +08:00
hcyi
e97053ee6d TPS-1476:[6.1.1] Unable to connect to kerberized Impala on CDH 5.5 on db
connection metadata wizard(TBD-3460)
2016-08-09 15:39:20 +08:00
wchen-talend
3aafe51581 TDI-35491:NPE happen when logon project and test from junit . 2016-08-05 15:23:35 +08:00
hwang
e4ff29bb45 TDI-36027:trunjob component throwing no class found error 2016-08-03 10:24:57 +08:00
GGu
2eb35bc5ac TPS-1467: fix one problem for import 2016-07-28 10:00:34 +08:00
GGu
fca8778d68 TPS-1467: CI-Builder to support Talend Reference Projects 2016-07-27 16:40:08 +08:00
zwxue
1d8bf58187 TBD-3776: Hadoop Cluster Connection & context variables: Hadoop
Properties not managed properly
2016-07-26 15:52:13 +08:00
ycbai
bc706fa046 TBD-3776: Hadoop Cluster Connection & context variables: Hadoop
Properties not managed properly
2016-07-26 10:48:50 +08:00
ycbai
131dcf4357 TUP-5071: revert
2932bb3374
and fix it in other way.
2016-07-22 18:00:55 +08:00
ycbai
6b229e9f80 TUP-5009: fix the quotes of context value problem. 2016-07-22 15:00:38 +08:00
zwxue
557e9ebf69 TDI-35502: "Workspace changed ... restart" on every startup of TOS. 2016-07-21 17:23:45 +08:00
ycbai
8bccb9df42 TUP-5009: fix the hadoop(hadoop cluster, hdfs, hive, hbase or such)
default values problem.
2016-07-21 10:12:07 +08:00
ycbai
48600aac3e TUP-5009: [6.1.1] Export Context on Metadata Hadoop Connection erroneous
behavior when HA properties
2016-07-21 10:11:43 +08:00
zwxue
a160acec3c Revert "TDI-35502: "Workspace changed ... restart" on every startup of TOS."
This reverts commit a4b4b90b26.
2016-07-21 09:59:55 +08:00
zwxue
a4b4b90b26 TDI-35502: "Workspace changed ... restart" on every startup of TOS. 2016-07-19 15:35:27 +08:00
wchen-talend
746cfb320a TPS-1463:[6.1.1]"Unable to install Studio Patch if maven config exists :
Java.io.FileNotFound" (TUP-4492)
2016-07-19 13:13:08 +08:00
xqliu-talend
e583e2d7f3 TDQ-12162 avoid to miss dependencies for multilevel dependency. 2016-07-11 14:44:28 +08:00
hwang
b6b807875e TUP-4085:Switching from the design view to the code one takes almost a
minute in 6.1.1
2016-07-01 15:18:23 +08:00
cmeng-talend
bc979ae9f4 TDI-36083 fix: Studio main window hides, but the process is still there.
https://jira.talendforge.org/browse/TDI-36083
2016-06-07 18:35:10 +08:00
hwang
aed56675c3 TDI-35569:zoom out within job designer does not work as expected in
Studio

Conflicts:
	main/plugins/org.talend.commons.ui/src/main/java/org/talend/commons/ui/gmf/draw2d/AnimatableZoomManager.java
2016-05-23 11:00:47 +08:00
wchen-talend
afe1b369e0 TPS-1379:[6.1.1] Unable to build, with CI Builder - Could not find
artifact
org.talend.libraries:tdm-camel-6.1.1-M20151210-1943:jar:jar:6.1.1-SNAPSHOT
in nexus ( TUP-4354 )
2016-05-18 17:02:37 +08:00
hcyi
ad2f7d1437 TPS-1338:[6.1.1] Import CDH config files with HDFS & RM HA information
not mapping correctly
2016-05-16 18:30:25 +08:00
hwang
cf05da6a2c TUP-4222:Change in context value does not get updated in the job and
test case and job stops building
2016-05-16 11:29:43 +08:00
hcyi
f200111fc0 TPS-1338:[6.1.1] Import CDH config files with HDFS & RM HA information
not mapping correctly
2016-05-04 17:28:42 +08:00
hwang
56c056a923 ITDI-35132:tAccessInput throws OOM when retrieve tables with big size
over 100MB
2016-03-29 14:04:44 +08:00
nrousseau
4c27bcf321 TUP-4215: apply the fix done on TUP-3782 on 6.1 branch 2016-03-29 10:51:50 +08:00
wchen-talend
c1a498dd40 TUP-4036:The Library synchronization between the Commandline and a local
Nexus does not appear to occur
# Conflicts:
#	main/plugins/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/service/LocalLibraryManager.java
2016-03-15 20:28:09 +08:00
nrousseau
9709ce698b TUP-4085: set snapshot version only for talend jar 2016-03-15 20:28:08 +08:00
nrousseau
ac18726b74 TUP-4085: fix pom for routines 2016-03-15 20:28:06 +08:00
nrousseau
a94bdb5d53 TUP-4085: fix problem of list of download of jars 2016-03-15 20:28:05 +08:00
ycbai
2fc2adae07 TDI-35462: db component in job can not use Repository type--Access db
failed
2016-03-15 14:38:44 +08:00
nrousseau
fa526452f3 TUP-4085: update junits 2016-03-14 19:34:30 +08:00
nrousseau
dcb595c785 TUP-4085: update junits and fix problem of deploy jar during build and
exception if the jar does not exists
2016-03-14 19:34:06 +08:00
wchen-talend
dbe073b799 TUP-4036 : add junit 2016-03-13 11:15:59 +08:00
wchen-talend
e5fd11011c TUP-4036:The Library synchronization between the Commandline and a local
Nexus does not appear to occur
2016-03-13 11:15:46 +08:00
nrousseau
c3702262ad TUP-4085: fix the problem of update of jars when retrieve 2016-03-13 11:03:50 +08:00
nrousseau
42c26692ae TUP-4085: set preferences to setup the update of artifacts from Nexus 2016-03-13 11:03:21 +08:00
nrousseau
87a6ada813 TDI-35139: avoid to have several popup for the same jar during the
build, and avoid to retrieve even from nexus several times
2016-03-13 10:52:25 +08:00
hwang
dc4cca9cab TDI-35146:No more handles happen when update after change context value 2016-03-13 10:45:39 +08:00
ycbai
afec9f09bd Fixed the bugs:
TBD-3202: [6.1.1] Hive properties dont get submitted correctly when
re-using context
TBD-3212: hadoop cluster:hadoop property is added double quotes when
drag hdfs schema to a standard job
2016-03-11 16:12:37 +08:00
ycbai
1e12a902e3 TBD-3088: fix the context problems of hadoop properties. 2016-03-02 10:26:04 +08:00
zwxue
4a8113b384 TDI-35052: build job with maven options occurs errors. 2016-02-16 16:57:35 +08:00
nrousseau
05b84e1f03 TUP-4102: add possibility to setup nexus server in local 2016-02-16 16:54:02 +08:00
nrousseau
b688d2592d TUP-4102: add possibility to setup nexus server in local 2016-02-16 16:53:29 +08:00
nrousseau
f593f0ec5f TUP-3979: Improve buildProject for CI plugin 2016-02-16 16:17:59 +08:00
hcyi
deb12779f5 TBD-2859:MapReduce job turns to Spark when opening 2015-12-10 23:07:56 +08:00
hwang
6e462d2b65 TDI-34885:git+svn: when convert a spark job with testcase to a mr job,
it can not be changed.
2015-12-10 23:07:35 +08:00
Sizhao Liu
c0f4ed20b6 TDQ-11358 fix tDqReportRun job error in local project 2015-12-09 12:57:05 +01:00
nrousseau
78f7f8c978 TDI-34864: fix problem of perspective, will reinitialize after any
successfull update
2015-12-09 19:24:54 +08:00
wchen-talend
e0c602e00d TDI-34897:Fail to run job if build path contain blank space 2015-12-09 19:16:00 +08:00
wchen-talend
3626efb85a TDI-34717:TAC Commandline has error when publish SVN job then publish a
GIT job
2015-12-08 20:38:46 +08:00
GGu
506a9730d1 TUP-3877: fix the NPE for e4 2015-12-08 20:38:25 +08:00
GGu
0168775718 TUP-3877: try to find the current perspective from e4 model 2015-12-08 20:36:50 +08:00
Sizhao Liu
647133cbc2 TDQ-11101 fix typo for Pattern Frequency Statistics 2015-12-07 17:15:10 +01:00
newbuild.talend.com
b17d8dfc3a Fix syntax error 2015-12-04 11:28:44 -08:00
iwangtalend
c9e476a536 Deploy org.talend.utils to Nexus 2015-12-04 20:23:09 +01:00
Irene Wang
04482fe7c1 Set versions for 6.1.1 2015-12-04 15:15:31 +01:00
nrousseau
1a6a41e65b fix possible NPE if there is no active page 2015-12-04 19:55:41 +08:00
hwang
541459a273 TUP-3859:NullPointerException when publish demo consumer job to Nexus
with context username and password values Null
2015-12-04 18:32:57 +08:00
257 changed files with 3978 additions and 2102 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime.nl</artifactId>

View File

@@ -559,7 +559,7 @@ repository.systemIndicators.businessRules=Business Rules
repository.systemIndicators.correlation=Correlation
repository.systemIndicators.functionalDependency=Functional Dependency
repository.systemIndicators.overview=Overview
repository.systemIndicators.patternFinder=Pattern Frequncey Statistics
repository.systemIndicators.patternFinder=Pattern Frequency Statistics
repository.systemIndicators.patternMatching=Pattern Matching
repository.systemIndicators.rowComparison=Row Comparison
repository.systemIndicators.simpleStatistics=Simple Statistics

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.helpers.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.migrationTool.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.registration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.localprovider.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.mdm.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.metadata.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.view.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.resources.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.jdt.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jdbc.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.m2e.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.update.p2.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.updates.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.utils.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui</artifactId>

View File

@@ -35,6 +35,7 @@ public class AnimatableZoomManager
private int zoomAnimationStyle = ANIMATE_NEVER;
private List animationListeners = new ArrayList();
public static double currentZoom = 1.0;
/**
* @return Returns the zoomAnimationStyle.
@@ -168,6 +169,7 @@ public class AnimatableZoomManager
double initialZoom = getZoom();
double finalZoom = zoom;
currentZoom = finalZoom;
Point finalCenterRel = finalCenter.getCopy();
Point originalViewLocation = getViewport().getViewLocation();

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository</artifactId>

View File

@@ -63,6 +63,8 @@ public abstract class AbstractRepositoryFactory implements IRepositoryFactory {
private List<IRepositoryWorkUnitListener> listeners = new ArrayList<IRepositoryWorkUnitListener>();
private String storage;
@Override
public List<DynamicButtonBean> getButtons() {
return buttons;
@@ -314,4 +316,14 @@ public abstract class AbstractRepositoryFactory implements IRepositoryFactory {
public void updateLockStatus() throws PersistenceException {
// nothing to do, by default
}
@Override
public String getStorage() {
return this.storage;
}
@Override
public void setStorage(String storage) {
this.storage = storage;
}
}

View File

@@ -410,4 +410,8 @@ public interface IRepositoryFactory {
public boolean isModified(Object property);
public void afterLogon();
public void setStorage(String storage);
public String getStorage();
}

View File

@@ -126,6 +126,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
private static ProjectRepositoryNode defaultProjRepoNode;
private static ProjectRepositoryNode dummyProjRepoNode = new ProjectRepositoryNode(null, null,
ENodeType.STABLE_SYSTEM_FOLDER);
private final IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
private org.talend.core.model.general.Project project;
@@ -169,6 +172,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
public static ProjectRepositoryNode getInstance() {
if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
return dummyProjRepoNode;
}
if (defaultProjRepoNode == null) {
defaultProjRepoNode = new ProjectRepositoryNode(null, null, ENodeType.STABLE_SYSTEM_FOLDER);
defaultProjRepoNode.initialize(null);
@@ -1245,10 +1251,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
if (parent.getType().equals(ENodeType.SYSTEM_FOLDER)) {
for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(project);
// if not a DB ref project, modified by nma, order 12519
if (refProject.getReferencedProject().getUrl() != null
&& refProject.getReferencedProject().getUrl().startsWith("teneo") //$NON-NLS-1$
|| (refProject.getBranch() != null && refProject.getBranch().equals(parentBranch))) {
if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
Project emfProject = refProject.getReferencedProject();
ProjectRepositoryNode referencedProjectNode = new ProjectRepositoryNode(
new org.talend.core.model.general.Project(emfProject), null, parent, this,

View File

@@ -270,6 +270,7 @@ public class DuplicateAction extends AContextualAction {
String sourceJobType = ConvertJobsUtil.getJobTypeFromFramework(newCreatedItem);
boolean isNeedConvert = ConvertJobsUtil.isNeedConvert(sourceJobType, sourceFramework, jobTypeValue,
frameworkNewValue);
boolean isNewItemCreated = false;
if (jobTypeValue != null && isNeedConvert) {
isAllowDuplicateTest = false;
try {
@@ -278,12 +279,15 @@ public class DuplicateAction extends AContextualAction {
.getProxyRepositoryFactory()
.getLastVersion(ProjectManager.getInstance().getCurrentProject(),
newCreatedItem.getProperty().getId());
ConvertJobsUtil.convert(jobNewName, jobTypeValue, frameworkNewValue, repositoryViewObject);
isNewItemCreated = ConvertJobsUtil.convert(jobNewName, jobTypeValue, frameworkNewValue,
repositoryViewObject);
} catch (Exception e) {
CommonExceptionHandler.process(e);
}
} else {
ConvertJobsUtil.updateFramework(newCreatedItem, frameworkNewValue);
}
if (!isNewItemCreated) {
// save the modifications
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
@@ -312,7 +316,6 @@ public class DuplicateAction extends AContextualAction {
MessageBoxExceptionHandler.process(e.getCause());
}
}
}
} else {
InputDialog jobNewNameDialog = new InputDialog(null, Messages.getString("DuplicateAction.input.title.v2"), //$NON-NLS-1$

View File

@@ -60,6 +60,7 @@ import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode.ENodeType;
import org.talend.repository.model.RepositoryNode;
import org.talend.repository.ui.views.IRepositoryView;
import org.talend.utils.string.MD5;
/**
* Label provider for the repository view. <code>DEBUG</code> boolean field specify if details (such as objects ids)
@@ -295,11 +296,12 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
ImageDescriptor imageDesc = ImageUtils.createImageFromData(item.getIcon().getInnerContent());
imageDesc = ImageUtils.scale(imageDesc, ICON_SIZE.ICON_32);
image = cachedImages.get(item.getIcon().getInnerContent());
String md5Desc = MD5.getMD5(item.getIcon().getInnerContent());
image = cachedImages.get(md5Desc);
if (image == null || image.isDisposed()) {
image = imageDesc.createImage();
cachedImages.put(item.getIcon().getInnerContent(), image);
cachedImages.put(md5Desc, image);
} else {
// image = imageDesc.createImage();
}
@@ -307,7 +309,7 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
return image;
}
private static Map<byte[], Image> cachedImages = new HashMap<byte[], Image>();
private static Map<String, Image> cachedImages = new HashMap<String, Image>();
@Override
public Image getImage(Object obj) {

View File

@@ -26,7 +26,6 @@ import org.talend.commons.exception.BusinessException;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.PluginChecker;
import org.talend.core.hadoop.HadoopConstants;
@@ -351,7 +350,7 @@ public class ConvertJobsUtil {
}
public static boolean convert(String newJobName, String jobTypeValue, String frameworkValue,
final IRepositoryViewObject sourceObject) {
final IRepositoryViewObject sourceObject) throws CoreException {
final Item newItem = ConvertJobsUtil.createOperation(newJobName, jobTypeValue, frameworkValue, sourceObject);
if (newItem == null) {
return false;
@@ -362,14 +361,14 @@ public class ConvertJobsUtil {
if (repositoryProperty != null) {
isNewItemCreated = (repositoryProperty.getItem() != newItem);
}
final IProxyRepositoryFactory proxyRepositoryFactory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
if (isNewItemCreated) {
// delete the old item
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
@Override
public void run(final IProgressMonitor monitor) throws CoreException {
IProxyRepositoryFactory proxyRepositoryFactory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
try {
proxyRepositoryFactory.unlock(sourceObject);
proxyRepositoryFactory.deleteObjectPhysical(sourceObject);
@@ -383,20 +382,31 @@ public class ConvertJobsUtil {
};
// unlockObject();
// alreadyEditedByUser = true; // to avoid 2 calls of unlock
IWorkspace workspace = ResourcesPlugin.getWorkspace();
ISchedulingRule schedulingRule = workspace.getRoot();
// the update the project files need to be done in the workspace runnable to avoid all notification
// of changes before the end of the modifications.
workspace.run(runnable, schedulingRule, IWorkspace.AVOID_UPDATE, null);
} else if (sourceObject.getProperty() != null) {
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
@Override
public void run(final IProgressMonitor monitor) throws CoreException {
try {
proxyRepositoryFactory.save(ProjectManager.getInstance().getCurrentProject(), sourceObject.getProperty()
.getItem(), false);
} catch (PersistenceException e1) {
CommonExceptionHandler.process(e1);
}
}
};
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
ISchedulingRule schedulingRule = workspace.getRoot();
// the update the project files need to be done in the workspace runnable to avoid all notification
// of changes before the end of the modifications.
workspace.run(runnable, schedulingRule, IWorkspace.AVOID_UPDATE, null);
return true;
} catch (CoreException e) {
MessageBoxExceptionHandler.process(e.getCause());
return false;
}
ISchedulingRule schedulingRule = workspace.getRoot();
workspace.run(runnable, schedulingRule, IWorkspace.AVOID_UPDATE, null);
}
return true;
return isNewItemCreated;
}
/**

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime</artifactId>

View File

@@ -215,8 +215,8 @@ public class FilesUtils {
copyFolder(current, newFolder, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter,
sourceFileFilter, copyFolder, synchronize);
} else {
copyFolder(current, target, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter,
sourceFileFilter, copyFolder, synchronize);
copyFolder(current, target, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter, sourceFileFilter,
copyFolder, synchronize);
}
}
}
@@ -339,7 +339,8 @@ public class FilesUtils {
return getFilesFromFolder(bundle, path, extension, true, false);
}
public static List<URL> getFilesFromFolder(Bundle bundle, String path, String extension, boolean absoluteURL, boolean nested) {
public static List<URL> getFilesFromFolder(Bundle bundle, String path, String extension, boolean absoluteURL,
boolean nested) {
List<URL> toReturn = new ArrayList<URL>();
Enumeration entryPaths = bundle.getEntryPaths(path);
@@ -484,7 +485,7 @@ public class FilesUtils {
}
public static List<File> getDllFilesFromFolder(File file, String fileName) throws MalformedURLException {
return getFilesFromFolderByName(file, fileName, new String[] { ".dll" }, null, true); //$NON-NLS-1$
return getFilesFromFolderByName(file, fileName, new String[] { ".dll" }, null, true); //$NON-NLS-1$
}
public static FileFilter getExcludeSystemFilesFilter() {
@@ -492,7 +493,7 @@ public class FilesUtils {
@Override
public boolean accept(File pathname) {
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$
}
};
@@ -1142,8 +1143,8 @@ public class FilesUtils {
return filePath;
}
public static BufferedReader isFilePathAvailable(String fileStr, FileConnection connection) throws IOException,
UnsupportedEncodingException, FileNotFoundException {
public static BufferedReader isFilePathAvailable(String fileStr, FileConnection connection)
throws IOException, UnsupportedEncodingException, FileNotFoundException {
BufferedReader in;
File file = new File(fileStr);
Charset guessedCharset = CharsetToolkit.guessEncoding(file, 4096);
@@ -1156,23 +1157,15 @@ public class FilesUtils {
return in;
}
protected static List<IResource> getExistedResources(IResource file, boolean ignoreFileNameCase) {
List<IResource> existedFiles = new ArrayList<IResource>();
protected static List<IResource> getExistedResources(IResource file, boolean ignoreFileNameCase) throws CoreException {
List<IResource> existedFiles = new ArrayList<>();
if (ignoreFileNameCase) {
final String currentFileName = file.getName();
File parentFile = file.getLocation().toFile().getParentFile();
IContainer parentFile = file.getParent();
if (parentFile.exists()) {
File[] listFiles = parentFile.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.equalsIgnoreCase(currentFileName);
}
});
if (listFiles != null) {
for (File f : listFiles) {
IFile sameFile = file.getParent().getFile(new Path(f.getName()));
existedFiles.add(sameFile);
for (IResource resource: parentFile.members()) {
if (resource.getName().equalsIgnoreCase(currentFileName)) {
existedFiles.add(resource);
}
}
}
@@ -1184,9 +1177,6 @@ public class FilesUtils {
public static void removeExistedResources(IProgressMonitor monitor, IResource currentResources, boolean ignoreFileNameCase,
boolean overwrite) throws Exception {
final IContainer parent = currentResources.getParent();
parent.refreshLocal(IResource.DEPTH_ONE, monitor);
List<IResource> existedSameFiles = getExistedResources(currentResources, ignoreFileNameCase);
// existed current one and not overwrite.
@@ -1195,17 +1185,8 @@ public class FilesUtils {
}
// delete all
for (IResource resource : existedSameFiles) {
File f = resource.getLocation().toFile();
if (f.exists()) {
if (f.isDirectory()) {
org.talend.utils.io.FilesUtils.deleteFolder(f, true);
} else {
f.delete();
}
}
resource.delete(true, monitor);
}
parent.refreshLocal(IResource.DEPTH_ONE, monitor);
}
}

View File

@@ -119,7 +119,7 @@ public final class ResourceUtils {
public static IFolder getFolder(IProject source, String folderName, boolean forceExists) throws PersistenceException {
IFolder processFolder = source.getFolder(folderName);
if (forceExists && !processFolder.getLocation().toFile().exists()) {
if (forceExists && !processFolder.exists()) {
String msg = Messages.getString("resources.folder.notGet", folderName, source.getName()); //$NON-NLS-1$
throw new ResourceNotFoundException(msg);
}

View File

@@ -288,7 +288,7 @@ public class DatabaseConnStrUtil {
}
} else {
if (Principal != null) {
standardURlString = standardURlString.concat(SEMICOLON).concat(principalSuffix).concat(Principal);
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
}
}

View File

@@ -81,7 +81,7 @@ public enum EDatabaseConnTemplate {
"jdbc:odbc:<datasource>")), //$NON-NLS-1$
ACCESS(new DbConnStr(EDatabaseTypeName.ACCESS, //
"jdbc:ucanaccess://<filename>")), //$NON-NLS-1$
"jdbc:ucanaccess://<filename>;<property>", null, "memory=false")), //$NON-NLS-1$
SYBASEASE(new DbConnStr(EDatabaseTypeName.SYBASEASE, //
"jdbc:sybase:Tds:<host>:<port>/<sid>?<property>", //$NON-NLS-1$
@@ -192,7 +192,7 @@ public enum EDatabaseConnTemplate {
//
// HIVE2_STANDALONE(new DbConnStr(EDatabaseTypeName.HIVE, "jdbc:hive2://<host>:<port>/<sid>")), //$NON-NLS-1$
IMPALA(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:hive2://<host>:<port>/<sid>;auth=noSasl", //
IMPALA(new DbConnStr(EDatabaseTypeName.IMPALA, "jdbc:hive2://<host>:<port>/<sid>;auth=noSasl", //$NON-NLS-1$
"21050")), //$NON-NLS-1$
HBASE(new DbConnStr(EDatabaseTypeName.HBASE, "127.0.0.1", //$NON-NLS-1$
@@ -357,6 +357,7 @@ public enum EDatabaseConnTemplate {
case TERADATA: // for feature 0013719
case VERTICA:
case EXASOL:
case ACCESS:
return true;
default:
}

View File

@@ -178,7 +178,8 @@ public enum EDatabaseVersion4Drivers {
"hadoop-yarn-api-2.6.0-cdh5.5.0.jar", "hadoop-yarn-client-2.6.0-cdh5.5.0.jar",
"hadoop-yarn-common-2.6.0-cdh5.5.0.jar", "hadoop-yarn-server-web-proxy-2.6.0-cdh5.5.0.jar", "commons-io-2.4.jar",
"commons-codec-1.9.jar", "htrace-core-3.2.0-incubating.jar", "jackson-mapper-asl-1.8.8.jar",
"jackson-core-asl-1.8.8.jar", "jackson-jaxrs-1.8.8.jar", "jackson-xc-1.8.8.jar", "jersey-client-1.9.jar" })),
"jackson-core-asl-1.8.8.jar", "jackson-jaxrs-1.8.8.jar", "jackson-xc-1.8.8.jar", "jersey-client-1.9.jar",
"hadoop-conf-kerberos.jar" })),
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "paraccel-jdbc.jar")), //$NON-NLS-1$

View File

@@ -23,7 +23,6 @@ import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryTypeProcessor;
@@ -129,14 +128,14 @@ public interface IHadoopClusterService extends IService {
/**
* DOC ycbai Comment method "isInContextMode".
* <p>
* Estimate whether or not the item is in context mode. <br>
* Estimate whether or not the connection is in context mode. <br>
* Hadoop subconnections are in context mode even though it is not context mode itself if the hadoop cluster is in
* context mode.
*
* @param connItem
* @param connection
* @return
*/
public boolean isInContextMode(ConnectionItem connItem);
public boolean isInContextMode(Connection connection);
/**
* DOC ycbai Comment method "getSubitemIdsOfHadoopCluster".
@@ -216,6 +215,8 @@ public interface IHadoopClusterService extends IService {
*/
public boolean hasDiffsFromClusterToProcess(Item item, IProcess process);
public Connection getHadoopClusterConnectionBySubConnection(Connection hadoopSubConnection);
public String getHadoopClusterProperties(Connection hadoopSubConnection);
/**

View File

@@ -32,6 +32,8 @@ public enum EHadoopConfProperties {
RESOURCEMANAGER_SCHEDULER("yarn.resourcemanager.scheduler.address", "localhost:8030"), //$NON-NLS-1$ //$NON-NLS-2$
RESOURCEMANAGER_SCHEDULER_ADDRESS_RM_ID("yarn.resourcemanager.scheduler.address.%s", ""), //$NON-NLS-1$ //$NON-NLS-2$
JOBHISTORY("mapreduce.jobhistory.address", "localhost:10020"), //$NON-NLS-1$ //$NON-NLS-2$
STAGING_DIR("yarn.app.mapreduce.am.staging-dir", "/user"), //$NON-NLS-1$ //$NON-NLS-2$
@@ -53,6 +55,10 @@ public enum EHadoopConfProperties {
YARN_RESOURCEMANAGER_HA_RM_IDS("yarn.resourcemanager.ha.rm-ids", ""), //$NON-NLS-1$ //$NON-NLS-2$
YARN_RESOURCEMANAGER_HOSTNAME_RM_ID("yarn.resourcemanager.hostname.%s", ""), //$NON-NLS-1$ //$NON-NLS-2$
YARN_RESOURCEMANAGER_ADDRESS_RM_ID("yarn.resourcemanager.address.%s", ""), //$NON-NLS-1$ //$NON-NLS-2$
YARN_RESOURCEMANAGER_ADMIN_ADDRESS_RM_ID("yarn.resourcemanager.admin.address.%s", ""), //$NON-NLS-1$ //$NON-NLS-2$
FS_HDFS_IMPL_DISABLE_CACHE("fs.hdfs.impl.disable.cache", "false"), //$NON-NLS-1$ //$NON-NLS-2$

View File

@@ -17,13 +17,17 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
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.IHadoopClusterService;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.utils.ContextParameterUtils;
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;
@@ -68,7 +72,7 @@ public class HadoopRepositoryUtil {
}
public static List<Map<String, Object>> getHadoopPropertiesList(String propertiesJsonStr) {
return getHadoopPropertiesList(propertiesJsonStr, false);
return getHadoopPropertiesList(propertiesJsonStr, false, false);
}
/**
@@ -83,7 +87,8 @@ public class HadoopRepositoryUtil {
* @return
* @throws JSONException
*/
public static List<Map<String, Object>> getHadoopPropertiesList(String propertiesJsonStr, boolean includeQuotes) {
public static List<Map<String, Object>> getHadoopPropertiesList(String propertiesJsonStr, boolean isContextMode,
boolean includeQuotes) {
List<Map<String, Object>> properties = new ArrayList<Map<String, Object>>();
try {
if (StringUtils.isNotEmpty(propertiesJsonStr)) {
@@ -96,7 +101,11 @@ public class HadoopRepositoryUtil {
String key = it.next();
String value = String.valueOf(object.get(key));
if (includeQuotes) {
value = TalendQuoteUtils.addQuotesIfNotExist(value);
if (isContextMode && "VALUE".equals(key)) { //$NON-NLS-1$
value = TalendQuoteUtils.removeQuotesIfExist(value);
} else {
value = TalendQuoteUtils.addQuotesIfNotExist(value);
}
} else {
value = TalendQuoteUtils.removeQuotesIfExist(value);
}
@@ -127,6 +136,11 @@ public class HadoopRepositoryUtil {
*/
public static List<Map<String, Object>> getHadoopPropertiesFullList(Connection connection, String propertiesJsonStr,
boolean includeQuotes) {
return getHadoopPropertiesFullList(connection, propertiesJsonStr, includeQuotes, false);
}
public static List<Map<String, Object>> getHadoopPropertiesFullList(Connection connection, String propertiesJsonStr,
boolean includeQuotes, boolean useOriginalValue) {
IHadoopClusterService hadoopClusterService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
hadoopClusterService = (IHadoopClusterService) GlobalServiceRegister.getDefault().getService(
@@ -134,9 +148,14 @@ public class HadoopRepositoryUtil {
}
List<Map<String, Object>> parentProperties = null;
if (hadoopClusterService != null) {
parentProperties = getHadoopPropertiesList(hadoopClusterService.getHadoopClusterProperties(connection), true);
Connection hadoopClusterConnection = hadoopClusterService.getHadoopClusterConnectionBySubConnection(connection);
if (hadoopClusterConnection != null) {
String hadoopClusterPropertiesStrs = hadoopClusterService.getHadoopClusterProperties(connection);
parentProperties = getHadoopProperties(hadoopClusterConnection, hadoopClusterPropertiesStrs, includeQuotes,
useOriginalValue);
}
}
List<Map<String, Object>> properties = getHadoopPropertiesList(propertiesJsonStr, true);
List<Map<String, Object>> properties = getHadoopProperties(connection, propertiesJsonStr, includeQuotes, useOriginalValue);
Map<String, Map<String, Object>> propertiesMap = new HashMap<String, Map<String, Object>>();
for (Map<String, Object> proMap : properties) {
String property = String.valueOf(proMap.get("PROPERTY")); //$NON-NLS-1$
@@ -155,4 +174,82 @@ public class HadoopRepositoryUtil {
return properties;
}
private static List<Map<String, Object>> getHadoopProperties(Connection connection, String propertiesJsonStr,
boolean includeQuotes, boolean useOriginalValue) {
List<Map<String, Object>> properties = null;
IMetadataManagmentUiService mmUIService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
mmUIService = (IMetadataManagmentUiService) GlobalServiceRegister.getDefault().getService(
IMetadataManagmentUiService.class);
}
ContextType contextType = null;
if (mmUIService != null) {
contextType = mmUIService.getContextTypeForContextMode(connection);
}
if (useOriginalValue && contextType != null) {
properties = getHadoopPropertiesWithOriginalValue(propertiesJsonStr, contextType, includeQuotes);
} else {
properties = getHadoopPropertiesList(propertiesJsonStr, contextType != null, includeQuotes);
}
return properties;
}
public static String getOriginalValueOfProperties(String propertiesStrings, ContextType contextType) {
return getOriginalValueOfProperties(propertiesStrings, contextType, false);
}
public static String getOriginalValueOfProperties(String propertiesStrings, ContextType contextType, boolean includeQuotes) {
String originalValueOfProperties = propertiesStrings;
if (propertiesStrings != null && !propertiesStrings.isEmpty()) {
List<Map<String, Object>> propertiesList = getHadoopPropertiesWithOriginalValue(propertiesStrings, contextType,
includeQuotes);
if (propertiesList != null && !propertiesList.isEmpty()) {
originalValueOfProperties = getHadoopPropertiesJsonStr(propertiesList);
}
}
return originalValueOfProperties;
}
/**
* DOC ycbai Comment method "getHadoopPropertiesWithOriginalValue".
*
* <p>
* Get hadoop properties list which convert conext value to original value if needed.
* </p>
*
* @param propertiesStrings
* @param contextType
* @param includeQuotes
* @return
*/
public static List<Map<String, Object>> getHadoopPropertiesWithOriginalValue(String propertiesStrings,
ContextType contextType, boolean includeQuotes) {
boolean isContextMode = contextType == null ? false : true;
List<Map<String, Object>> propertiesList = getHadoopPropertiesList(propertiesStrings, isContextMode,
includeQuotes);
if (!isContextMode) {
return propertiesList;
}
List<Map<String, Object>> newPropertiesList = new ArrayList<>();
for (Map<String, Object> propMap : propertiesList) {
Map<String, Object> newPropMap = new HashMap<>();
Iterator<Map.Entry<String, Object>> propMapEntryIter = propMap.entrySet().iterator();
while (propMapEntryIter.hasNext()) {
Entry<String, Object> propMapEntry = propMapEntryIter.next();
String propKey = propMapEntry.getKey();
Object propValue = propMapEntry.getValue();
if (propKey != null && propValue != null) {
String newValue = ContextParameterUtils.getOriginalValue(contextType, String.valueOf(propValue));
newPropMap.put(propKey, newValue);
}
}
if (!newPropMap.isEmpty()) {
newPropertiesList.add(newPropMap);
}
}
return newPropertiesList;
}
}

View File

@@ -122,10 +122,10 @@ public class ModuleNeeded {
*
*/
public enum ELibraryInstallStatus {
UNKNOWN,
INSTALLED,
UNUSED,
NOT_INSTALLED;
UNKNOWN,
INSTALLED,
UNUSED,
NOT_INSTALLED;
}
/**
@@ -275,14 +275,14 @@ public class ModuleNeeded {
}
public ELibraryInstallStatus getStatus() {
final ELibraryInstallStatus eLibraryInstallStatus = ModuleStatusProvider.getStatusMap().get(getMavenUri(true));
final ELibraryInstallStatus eLibraryInstallStatus = ModuleStatusProvider.getStatusMap().get(getMavenUriSnapshot());
if (eLibraryInstallStatus != null) {
return eLibraryInstallStatus;
} else {
// compute the status of the lib.
// first use the Library manager service
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
.getService(ILibraryManagerService.class);
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault().getService(
ILibraryManagerService.class);
Set<String> existLibraries = libManagerService.list();
if (existLibraries.contains(getModuleName())) {
status = ELibraryInstallStatus.INSTALLED;
@@ -295,7 +295,7 @@ public class ModuleNeeded {
status = ELibraryInstallStatus.NOT_INSTALLED;
}
}
ModuleStatusProvider.getStatusMap().put(getMavenUri(true), status);
ModuleStatusProvider.getStatusMap().put(getMavenUriSnapshot(), status);
}
return this.status;
}
@@ -496,7 +496,19 @@ public class ModuleNeeded {
}
public String getMavenUriSnapshot() {
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(getMavenUri());
MavenArtifact artifact = null;
if (getMavenUri() != null) {
if (getMavenUri().split(MavenUrlHelper.SEPERATOR).length < 4 && getModuleName().lastIndexOf(".") != -1) {
String extension = getModuleName().substring(getModuleName().lastIndexOf(".") + 1, getModuleName().length());
artifact = MavenUrlHelper.parseMvnUrl(getMavenUri());
if (artifact != null) {
artifact.setType(extension);
}
} else {
artifact = MavenUrlHelper.parseMvnUrl(getMavenUri());
}
}
// for non-talend libs.
if (artifact != null && !MavenConstants.DEFAULT_LIB_GROUP_ID.equals(artifact.getGroupId())) {
return getMavenUri(); // snapshot url same as maven url
@@ -504,11 +516,9 @@ public class ModuleNeeded {
// set an defaut maven uri if uri is null or empty, this could be done in the set
// but this would mean to sure the set is called after the name is set.
if (StringUtils.isEmpty(mavenUriSnapshot)) {
String configuredUri = getMavenUri();
if (!StringUtils.isEmpty(configuredUri)) {
mavenUriSnapshot = MavenUrlHelper.generateSnapshotMavenUri(configuredUri);
}
if (StringUtils.isEmpty(mavenUriSnapshot) && artifact != null) {
mavenUriSnapshot = MavenUrlHelper.generateMvnUrl(artifact.getGroupId(), artifact.getArtifactId(),
artifact.getVersion() + "-SNAPSHOT", artifact.getType(), artifact.getClassifier());
}
if (StringUtils.isEmpty(mavenUriSnapshot)) {
// get the latest snapshot maven uri from index as default

View File

@@ -43,6 +43,8 @@ public class ModuleToInstall {
private String distribution = "";
private boolean fromCustomNexus;
public String getName() {
return this.name;
}
@@ -176,4 +178,16 @@ public class ModuleToInstall {
return this.mavenUris;
}
/**
* Sets the fromCustomNexus.
*
* @param fromCustomNexus the fromCustomNexus to set
*/
public void setFromCustomNexus(boolean fromCustomNexus) {
this.fromCustomNexus = fromCustomNexus;
}
public boolean isFromCustomNexus() {
return this.fromCustomNexus;
}
}

View File

@@ -100,4 +100,10 @@ public interface IMetadataTable {
public String getTableType();
public void setTableType(String tableType);
public void setOriginalColumns(List<String> originalColumns);
public List<String> getOriginalColumns();
public boolean isRepository();
}

View File

@@ -35,6 +35,8 @@ public class MetadataTable implements IMetadataTable, Cloneable {
private List<IMetadataColumn> unusedColumns = new ArrayList<IMetadataColumn>();
private List<String> originalColumns;
private IMetadataConnection parent;
private boolean readOnly = false;
@@ -151,6 +153,17 @@ public class MetadataTable implements IMetadataTable, Cloneable {
List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();
temp.addAll(this.listColumns);
temp.addAll(this.unusedColumns);
if (isRepository && originalColumns != null) {
Collections.sort(temp, new Comparator<IMetadataColumn>() {
@Override
public int compare(IMetadataColumn o1, IMetadataColumn o2) {
int index1 = originalColumns.indexOf(o1.getLabel());
int index2 = originalColumns.indexOf(o2.getLabel());
return index1 - index2;
}
});
}
return temp;
}
return this.listColumns;
@@ -209,6 +222,11 @@ public class MetadataTable implements IMetadataTable, Cloneable {
for (int i = 0; i < unusedColumns.size(); i++) {
clonedMetaColumns.add(unusedColumns.get(i).clone(withCustoms));
}
if (originalColumns != null) {
List<String> clonedOriginalColumns = new ArrayList<String>(originalColumns);
clonedMetadata.setOriginalColumns(clonedOriginalColumns);
}
clonedMetadata.setTableName(this.getTableName());
clonedMetadata.setLabel(this.getLabel());
clonedMetadata.setAdditionalProperties(new HashMap<String, String>(additionalProperties));
@@ -334,8 +352,9 @@ public class MetadataTable implements IMetadataTable, Cloneable {
@Override
public IMetadataColumn getColumn(String columnName) {
for (int i = 0; i < getListColumns(true).size(); i++) {
IMetadataColumn column = getListColumns(true).get(i);
List<IMetadataColumn> withUnusedList = getListColumns(true);
for (int i = 0; i < withUnusedList.size(); i++) {
IMetadataColumn column = withUnusedList.get(i);
if (column.getLabel().equals(columnName)) {
return column;
}
@@ -457,6 +476,7 @@ public class MetadataTable implements IMetadataTable, Cloneable {
this.additionalProperties = additionalProperties;
}
@Override
public boolean isRepository() {
return this.isRepository;
}
@@ -484,4 +504,24 @@ public class MetadataTable implements IMetadataTable, Cloneable {
public void setTableType(String tableType) {
this.tableType = tableType;
}
/**
* Sets the originalColumns.
*
* @param originalColumns the originalColumns to set
*/
@Override
public void setOriginalColumns(List<String> originalColumns) {
this.originalColumns = originalColumns;
}
/**
* Getter for originalColumns.
*
* @return the originalColumns
*/
@Override
public List<String> getOriginalColumns() {
return this.originalColumns;
}
}

View File

@@ -604,6 +604,8 @@ public final class MetadataToolHelper {
target.getListColumns().addAll(columnsTAdd);
target.sortCustomColumns();
target.setLabel(source.getLabel());
target.setOriginalColumns(source.getOriginalColumns());
}
public static void copyTable(List<IMetadataColumn> sourceColumns, IMetadataTable target, List<IMetadataColumn> targetColumns) {

View File

@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
@@ -83,7 +82,6 @@ import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.repository.DragAndDropManager;
import org.talend.core.model.update.UpdatesConstants;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.model.utils.IDragAndDropServiceHandler;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.service.IMetadataManagmentService;
@@ -906,18 +904,10 @@ public class RepositoryToComponentProperty {
}
}
if (value.equals("SERVER_NAME")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getServerName())) {
return connection.getServerName();
} else {
return TalendQuoteUtils.addQuotes(connection.getServerName());
}
return getAppropriateValue(connection, connection.getServerName());
}
if (value.equals("PORT")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getPort())) {
return connection.getPort();
} else {
return TalendQuoteUtils.addQuotes(connection.getPort());
}
return getAppropriateValue(connection, connection.getPort());
}
if (value.equals("SID") || value.equals("DATABASE_ALIAS")) { //$NON-NLS-1$ //$NON-NLS-2$
if (("").equals(connection.getSID()) || connection.getSID() == null) { //$NON-NLS-1$
@@ -935,54 +925,25 @@ public class RepositoryToComponentProperty {
}
}
if (value.equals("DATASOURCE")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getDatasourceName())) {
return connection.getDatasourceName();
} else {
return TalendQuoteUtils.addQuotes(connection.getDatasourceName());
}
return getAppropriateValue(connection, connection.getDatasourceName());
}
if (value.equals("USERNAME")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getUsername())) {
return connection.getUsername();
} else {
return TalendQuoteUtils.addQuotes(connection.getUsername());
}
return getAppropriateValue(connection, connection.getUsername());
}
if (value.equals("PASSWORD")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getPassword())) {
return connection.getPassword();
} else {
String pwd = TalendQuoteUtils.checkAndAddBackslashes(connection.getRawPassword());
return TalendQuoteUtils.addQuotes(pwd);
}
return getAppropriateValue(connection, connection.getValue(connection.getPassword(), false));
}
if (value.equals("NULL_CHAR")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getNullChar())) {
return connection.getNullChar();
} else {
return TalendQuoteUtils.addQuotes(connection.getNullChar());
}
return getAppropriateValue(connection, connection.getNullChar());
}
if (value.equals("SCHEMA")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getUiSchema())) {
return connection.getUiSchema();
} else {
return TalendQuoteUtils.addQuotes(connection.getUiSchema());
}
return getAppropriateValue(connection, connection.getUiSchema());
}
if (value.equals("FILE")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getFileFieldName())) {
return connection.getFileFieldName();
} else {
return TalendQuoteUtils.addQuotes(connection.getFileFieldName());
}
return getAppropriateValue(connection, connection.getFileFieldName());
}
if (value.equals("PROPERTIES_STRING")) { //$NON-NLS-1$
if (isContextMode(connection, connection.getAdditionalParams())) {
return connection.getAdditionalParams();
} else {
return TalendQuoteUtils.addQuotes(connection.getAdditionalParams());
}
return getAppropriateValue(connection, connection.getAdditionalParams());
}
if (value.equals("CDC_MODE")) { //$NON-NLS-1$
@@ -1006,7 +967,9 @@ public class RepositoryToComponentProperty {
return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
} else if (EDatabaseTypeName.HBASE.getDisplayName().equals(databaseType)) {
return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_VERSION);
} else {
}else if(EDatabaseTypeName.GENERAL_JDBC.getDisplayName().equals(databaseType)){
return dbVersionString;
}else {
String driverValue = EDatabaseVersion4Drivers.getDriversStr(databaseType, dbVersionString);
if (EDatabaseConnTemplate.ORACLE_OCI.getDBDisplayName().equals(databaseType)
|| EDatabaseConnTemplate.ORACLE_CUSTOM.getDBDisplayName().equals(databaseType)
@@ -1159,12 +1122,7 @@ public class RepositoryToComponentProperty {
}
// add this for tJavaDB embeded "DB Root Path"
if (value.equals("DIRECTORY")) {//$NON-NLS-1$
if (isContextMode(connection, connection.getDBRootPath())) {
return connection.getDBRootPath();
} else {
return TalendQuoteUtils.addQuotes(connection.getDBRootPath());
}
return getAppropriateValue(connection, connection.getDBRootPath());
}
// add for feature 11674
if (value.equals("RUNNING_MODE")) {//$NON-NLS-1$
@@ -1179,25 +1137,13 @@ public class RepositoryToComponentProperty {
return runningMode;
}
if (value.equals("DBPATH")) {//$NON-NLS-1$
if (isContextMode(connection, connection.getDBRootPath())) {
return connection.getDBRootPath();
} else {
return TalendQuoteUtils.addQuotes(connection.getDBRootPath());
}
return getAppropriateValue(connection, connection.getDBRootPath());
}
if (value.equals("DBNAME")) {//$NON-NLS-1$
if (isContextMode(connection, connection.getDatasourceName())) {
return connection.getDatasourceName();
} else {
return TalendQuoteUtils.addQuotes(connection.getDatasourceName());
}
return getAppropriateValue(connection, connection.getDatasourceName());
}
if (value.equals("RAC_URL")) {
if (isContextMode(connection, connection.getServerName())) {
return connection.getServerName();
} else {
return TalendQuoteUtils.addQuotes(connection.getServerName());
}
return getAppropriateValue(connection, connection.getServerName());
}
if (value.equals("DISTRIBUTION")) {
@@ -1225,13 +1171,15 @@ public class RepositoryToComponentProperty {
}
if (value.equals("HBASE_MASTER_PRINCIPAL")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(
ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MASTERPRINCIPAL));
String hbaseMasterPrinc = connection.getParameters().get(
ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MASTERPRINCIPAL);
return getAppropriateValue(connection, hbaseMasterPrinc);
}
if (value.equals("HBASE_REGIONSERVER_PRINCIPAL")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(
ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_REGIONSERVERPRINCIPAL));
String hbaseRegPrinc = connection.getParameters().get(
ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_REGIONSERVERPRINCIPAL);
return getAppropriateValue(connection, hbaseRegPrinc);
}
if (value.equals("HIVE_SERVER")) {
@@ -1259,7 +1207,7 @@ public class RepositoryToComponentProperty {
if (value.equals("ADVANCED_PROPERTIES") && EDatabaseTypeName.HIVE.getDisplayName().equals(databaseType)) {
String message = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_JDBC_PROPERTIES);
return HadoopRepositoryUtil.getHadoopPropertiesList(message, true);
return HadoopRepositoryUtil.getHadoopPropertiesList(message, connection.isContextMode(), true);
}
if (value.equals("HADOOP_CUSTOM_JARS")) {
@@ -1296,11 +1244,7 @@ public class RepositoryToComponentProperty {
if (value.equals(EParameterNameForComponent.PARA_NAME_MAPRED_JT.getName())
|| value.equals(EParameterNameForComponent.PARA_NAME_RESOURCE_MANAGER.getName())) {
String jobTrackerURL = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOB_TRACKER_URL);
if (isContextMode(connection, jobTrackerURL)) {
return jobTrackerURL;
} else {
return TalendQuoteUtils.addQuotes(jobTrackerURL);
}
return getAppropriateValue(connection, jobTrackerURL);
}
if (value.equals(EParameterNameForComponent.PARA_NAME_USE_YARN.getName())) {
@@ -1339,20 +1283,12 @@ public class RepositoryToComponentProperty {
if (value.equals("MAPRED_JOB_TRACKER") || value.equals("MAPRED_RESOURCE_MANAGER")) {
String mapredJobTracker = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOB_TRACKER_URL);
if (mapredJobTracker == null) {
return mapredJobTracker;
} else {
return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(mapredJobTracker));
}
return getAppropriateValue(connection, mapredJobTracker);
}
if (value.equals("NAMENODE_PRINCIPAL")) {
String nameNodePrincipal = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_NAME_NODE_PRINCIPAL);
if (nameNodePrincipal == null) {
return nameNodePrincipal;
} else {
return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(nameNodePrincipal));
}
return getAppropriateValue(connection, nameNodePrincipal);
}
/**
@@ -1362,36 +1298,20 @@ public class RepositoryToComponentProperty {
*/
if (value.equals("JOBTRACKER_PRINCIPAL") || value.equals("RESOURCEMANAGER_PRINCIPAL")) {
String jtOrRmPrincipal = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOB_TRACKER_PRINCIPAL);
if (jtOrRmPrincipal == null) {
return jtOrRmPrincipal;
} else {
return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(jtOrRmPrincipal));
}
return getAppropriateValue(connection, jtOrRmPrincipal);
}
if (value.equals("JOBHISTORY_PRINCIPAL")) {
String jobHistoryPrincipal = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOB_HISTORY_PRINCIPAL);
if (jobHistoryPrincipal == null) {
return jobHistoryPrincipal;
} else {
return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(jobHistoryPrincipal));
}
return getAppropriateValue(connection, jobHistoryPrincipal);
}
if (value.equals("ZOOKEEPER_QUORUM")) {
if (isContextMode(connection, connection.getServerName())) {
return connection.getServerName();
} else {
return TalendQuoteUtils.addQuotes(connection.getServerName());
}
return getAppropriateValue(connection, connection.getServerName());
}
if (value.equals("ZOOKEEPER_CLIENT_PORT")) {
if (isContextMode(connection, connection.getPort())) {
return connection.getPort();
} else {
return TalendQuoteUtils.addQuotes(connection.getPort());
}
return getAppropriateValue(connection, connection.getPort());
}
if (value.equals("COLUMN_MAPPING")) { //$NON-NLS-1$
@@ -1399,24 +1319,28 @@ public class RepositoryToComponentProperty {
}
if (value.equals("HIVE_PRINCIPAL")) {
return TalendQuoteUtils
.addQuotes(connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_HIVEPRINCIPLA));
String hivePrincipal = connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_HIVEPRINCIPLA);
return getAppropriateValue(connection, hivePrincipal);
}
if (value.equals("METASTORE_JDBC_URL")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_METASTOREURL));
String metadataUrl = connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_METASTOREURL);
return getAppropriateValue(connection, metadataUrl);
}
if (value.equals("METASTORE_CLASSNAME")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_DRIVERCLASS));
String metastoreDC = connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_DRIVERCLASS);
return getAppropriateValue(connection, metastoreDC);
}
if (value.equals("METASTORE_USERNAME")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_USERNAME));
String metastoreUser = connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_USERNAME);
return getAppropriateValue(connection, metastoreUser);
}
if (value.equals("METASTORE_PASSWORD")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_PASSWORD));
String metastorePwd = connection.getParameters().get(ConnParameterKeys.HIVE_AUTHENTICATION_PASSWORD);
return getAppropriateValue(connection, metastorePwd);
}
if (value.equals("USE_KEYTAB")) {
@@ -1429,15 +1353,18 @@ public class RepositoryToComponentProperty {
}
if (value.equals("PRINCIPAL") || value.equals("KEYTAB_PRINCIPAL")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_KEYTAB_PRINCIPAL));
String principal = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_KEYTAB_PRINCIPAL);
return getAppropriateValue(connection, principal);
}
if (value.equals("KEYTAB_PATH")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_KEYTAB));
String keytab = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_KEYTAB);
return getAppropriateValue(connection, keytab);
}
if (value.equals("IMPALA_PRINCIPAL")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA));
String principal = connection.getParameters().get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA);
return getAppropriateValue(connection, principal);
}
if (value.equals("IMPALA_VERSION")) {
@@ -1457,8 +1384,8 @@ public class RepositoryToComponentProperty {
}
if (value.equals("RESOURCEMANAGER_SCHEDULER_ADDRESS")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(
ConnParameterKeys.CONN_PARA_KEY_RESOURCEMANAGER_SCHEDULER_ADDRESS));
String rmSchAdr = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_RESOURCEMANAGER_SCHEDULER_ADDRESS);
return getAppropriateValue(connection, rmSchAdr);
}
if (value.equals("SET_JOBHISTORY_ADDRESS")) {
@@ -1466,7 +1393,8 @@ public class RepositoryToComponentProperty {
}
if (value.equals("JOBHISTORY_ADDRESS")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOBHISTORY_ADDRESS));
String jhAddr = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_JOBHISTORY_ADDRESS);
return getAppropriateValue(connection, jhAddr);
}
if (value.equals("SET_STAGING_DIRECTORY")) {
@@ -1474,7 +1402,8 @@ public class RepositoryToComponentProperty {
}
if (value.equals("STAGING_DIRECTORY")) {
return TalendQuoteUtils.addQuotes(connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_STAGING_DIRECTORY));
String stageDir = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_STAGING_DIRECTORY);
return getAppropriateValue(connection, stageDir);
}
if (value.equals("USE_DATANODE_HOSTNAME")) {
@@ -1486,6 +1415,14 @@ public class RepositoryToComponentProperty {
}
private static String getAppropriateValue(Connection connection, String rawValue) {
if (isContextMode(connection, rawValue)) {
return rawValue;
} else {
return TalendQuoteUtils.addQuotesIfNotExist(rawValue);
}
}
/**
* DOC nrousseau Comment method "getDatabaseValue".
*
@@ -1498,12 +1435,13 @@ public class RepositoryToComponentProperty {
}
private static boolean isContextMode(Connection connection, String value) {
if (connection == null || value == null) {
return false;
IMetadataManagmentUiService mmService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
mmService = (IMetadataManagmentUiService) GlobalServiceRegister.getDefault()
.getService(IMetadataManagmentUiService.class);
}
if (connection.isContextMode() && ContextParameterUtils.isContainContextParam(value)) {
return true;
if (mmService != null) {
return mmService.isContextMode(connection, value);
}
return false;
}
@@ -2257,7 +2195,7 @@ public class RepositoryToComponentProperty {
}
}
private static List<Map<String, Object>> getColumnMappingValue(Connection connection, IMetadataTable metaTable) {
public static List<Map<String, Object>> getColumnMappingValue(Connection connection, IMetadataTable metaTable) {
if (connection == null || metaTable == null) {
return null;
}

View File

@@ -228,8 +228,11 @@ public final class ProcessUtils {
private static void updateRepositoryObjects(List<IRepositoryViewObject> repositoryObjects, IRepositoryViewObject obj) {
if (!repositoryObjects.contains(obj)) {
repositoryObjects.add(obj);
checkAllVerSionLatest(repositoryObjects, obj);
// TDQ-12162,should call 'checkItemDependencies(...)' first. for
// example,"sub job C->sub job B->main job A->Rule X", export script C,if call 'checkAllVerSionLatest(...)'
// first,the dependency X won't be added.
checkItemDependencies(obj.getProperty().getItem(), repositoryObjects);
checkAllVerSionLatest(repositoryObjects, obj);
}
}

View File

@@ -17,6 +17,7 @@ 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;
@@ -74,6 +75,8 @@ public class RelationshipItemBuilder {
public static final String JOBLET_RELATION = "joblet"; //$NON-NLS-1$
public static final String TEST_RELATION = "test_case"; //$NON-NLS-1$
public static final String SERVICES_RELATION = "services"; //$NON-NLS-1$
public static final String PROPERTY_RELATION = "property"; //$NON-NLS-1$
@@ -146,8 +149,8 @@ public class RelationshipItemBuilder {
}
/**
* Look for every linked items who use the selected id, no matter the version.
* Usefull when want to delete an item since it will delete every versions.
* Look for every linked items who use the selected id, no matter the version. Usefull when want to delete an item
* since it will delete every versions.
*
* @param itemId
* @param version
@@ -185,13 +188,13 @@ public class RelationshipItemBuilder {
}
return new ArrayList<Relation>(relations);
}
private Set<Relation> getItemsHaveRelationWith(Map<Relation, Set<Relation>> itemsRelations, String itemId) {
Set<Relation> relations = new HashSet<Relation>();
for (Relation baseItem : itemsRelations.keySet()) {
for (Relation relatedItem : itemsRelations.get(baseItem)) {
for (Relation relatedItem : itemsRelations.get(baseItem)) {
String id = relatedItem.getId();
if (id != null) {
Relation tmpRelatedItem = null;
@@ -301,6 +304,58 @@ public class RelationshipItemBuilder {
referencesItemsRelations = new HashMap<Relation, Set<Relation>>();
}
public void cleanTypeRelations(String baseType, String relationType, boolean save) {
if (!loaded) {
loadRelations();
}
// because only save for current project
modified = cleanTypeRelations(currentProjectItemsRelations, baseType, relationType);
cleanTypeRelations(referencesItemsRelations, baseType, relationType);
if (save) {
saveRelations();
}
}
private boolean cleanTypeRelations(Map<Relation, Set<Relation>> projectRelations, String baseType, String relationType) {
if (projectRelations == null) {
return false;
}
boolean modified = false;
// clean up base type first
if (baseType != null) {
List<Relation> cleanupItems = new ArrayList<Relation>();
for (Relation base : projectRelations.keySet()) {
if (baseType.equals(base.getType())) {
cleanupItems.add(base);
}
}
modified = !cleanupItems.isEmpty();
//
for (Relation r : cleanupItems) {
projectRelations.remove(r);
}
}
// deal with the left for relation type
if (relationType != null) {
for (Relation base : projectRelations.keySet()) {
Set<Relation> relation = projectRelations.get(base);
if (relation != null) {
Iterator<Relation> iterator = relation.iterator();
while (iterator.hasNext()) {
Relation r = iterator.next();
if (relationType.equals(r.getType())) {
iterator.remove();
modified = true;
}
}
}
}
}
return modified;
}
private void loadRelations() {
if (loading) {
return;

View File

@@ -130,20 +130,20 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
public final static ERepositoryObjectType METADATA_CON_CDC = new ERepositoryObjectType("repository.CDC", "METADATA_CON_CDC",
20, true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType METADATA_SAP_FUNCTION = new ERepositoryObjectType(
"repository.SAPFunction", "METADATA_SAP_FUNCTION", 21, true, true, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_SAP_FUNCTION = new ERepositoryObjectType("repository.SAPFunction", //$NON-NLS-1$
"METADATA_SAP_FUNCTION", 21, true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType METADATA_SAP_IDOC = new ERepositoryObjectType("repository.SAPIDoc",
"METADATA_SAP_IDOC", 22, true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType MDM_CONCEPT = new ERepositoryObjectType(
"repository.concept", "MDM_CONCEPT", 23, true, true, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType MDM_CONCEPT = new ERepositoryObjectType("repository.concept", "MDM_CONCEPT", 23, //$NON-NLS-1$
true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType MDM_SCHEMA = new ERepositoryObjectType(
"repository.xmlSchema", "MDM_SCHEMA", 24, true, true, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType MDM_SCHEMA = new ERepositoryObjectType("repository.xmlSchema", "MDM_SCHEMA", 24, //$NON-NLS-1$
true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType MDM_ELEMENT_TYPE = new ERepositoryObjectType(
"repository.xmlElementType", "MDM_ELEMENT_TYPE", 25, true, true, new String[] { PROD_DI }, new String[] {}, false);//$NON-NLS-1$
public final static ERepositoryObjectType MDM_ELEMENT_TYPE = new ERepositoryObjectType("repository.xmlElementType", //$NON-NLS-1$
"MDM_ELEMENT_TYPE", 25, true, true, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType RECYCLE_BIN = new ERepositoryObjectType("repository.recyclebin", "", "RECYCLE_BIN",
true, 26, new String[] { PROD_DI, PROD_CAMEL }, new String[] {}, false);
@@ -152,20 +152,27 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
"METADATA_COLUMN", true, 27, new String[] { PROD_DI }, new String[] {}, false);
// feature 0006484 add
public final static ERepositoryObjectType METADATA_FILE_RULES = new ERepositoryObjectType(
"repository.metadataFileRules", "metadata/rules", "METADATA_FILE_RULES", 28, true, "repository.metadataFileRules.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType METADATA_FILE_RULES = new ERepositoryObjectType("repository.metadataFileRules", //$NON-NLS-1$
"metadata/rules", "METADATA_FILE_RULES", 28, true, "repository.metadataFileRules.alias", new String[] { PROD_DI }, //$NON-NLS-1$
new String[] {});
public final static ERepositoryObjectType METADATA_FILE_LINKRULES = new ERepositoryObjectType(
"repository.metadataLinkFileRules", "metadata/rules", "METADATA_FILE_LINKRULES", 29, true, "repository.metadataLinkFileRules.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataLinkFileRules", "metadata/rules", "METADATA_FILE_LINKRULES", 29, true, //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataLinkFileRules.alias", new String[] { PROD_DI }, new String[] {});
public final static ERepositoryObjectType METADATA_RULES_MANAGEMENT = new ERepositoryObjectType(
"repository.metadataRulesManagement", "", "METADATA_RULES_MANAGEMENT", 30, true, "repository.metadataRulesManagement.alias", new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataRulesManagement", "", "METADATA_RULES_MANAGEMENT", 30, true, //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataRulesManagement.alias", new String[] { PROD_DI }, new String[] {}, false);
// public final static ERepositoryObjectType METADATA_CONNECTIONS = new ERepositoryObjectType(
// "repository.metadataConnections", "metadata/connections", "METADATA_CONNECTIONS", 31, true, "repository.metadataConnections.alias", new String[] { PROD_DI, PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataConnections", "metadata/connections", "METADATA_CONNECTIONS", 31, true,
// "repository.metadataConnections.alias", new String[] { PROD_DI, PROD_DQ }, new String[] {}); //$NON-NLS-1$
// //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_SAPCONNECTIONS = new ERepositoryObjectType(
// "repository.metadataSAPConnections", "metadata/sapconnections", "METADATA_SAPCONNECTIONS", 32, true, "repository.metadataSAPConnections.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataSAPConnections", "metadata/sapconnections", "METADATA_SAPCONNECTIONS", 32, true,
// "repository.metadataSAPConnections.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$
// //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_EDIFACT = new
// ERepositoryObjectType("repositorymetadataEDIFact",
@@ -173,176 +180,233 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
// new String[] {});
// public final static ERepositoryObjectType SQLPATTERNS = new ERepositoryObjectType(
// "repository.metadataSQLPatterns", "sqlPatterns", "SQLPATTERNS", 33, true, "repository.metadataSQLPatterns.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataSQLPatterns", "sqlPatterns", "SQLPATTERNS", 33, true, "repository.metadataSQLPatterns.alias",
// new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_FILE_EBCDIC = new ERepositoryObjectType(
// "repository.metadataFileEDCDIC", "metadata/fileEBCDIC", "METADATA_FILE_EBCDIC", 34, true, "repository.metadataFileEDCDIC.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataFileEDCDIC", "metadata/fileEBCDIC", "METADATA_FILE_EBCDIC", 34, true,
// "repository.metadataFileEDCDIC.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_FILE_HL7 = new ERepositoryObjectType(
// "repository.metadataFileHL7", "metadata/fileHL7", "METADATA_FILE_HL7", 35, true, "repository.metadataFileHL7.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataFileHL7", "metadata/fileHL7", "METADATA_FILE_HL7", 35, true,
// "repository.metadataFileHL7.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_FILE_FTP = new ERepositoryObjectType(
// "repository.metadataFileFTP", "metadata/FTPconnections", "METADATA_FILE_FTP", 36, true, "repository.metadataFileFTP.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataFileFTP", "metadata/FTPconnections", "METADATA_FILE_FTP", 36, true,
// "repository.metadataFileFTP.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// 0015169 added
public final static ERepositoryObjectType METADATA_FILE_BRMS = new ERepositoryObjectType(
"repository.metadataFileBRMS", "metadata/BRMSconnections", "METADATA_FILE_BRMS", 37, true, "repository.metadataFileBRMS.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType METADATA_FILE_BRMS = new ERepositoryObjectType("repository.metadataFileBRMS", //$NON-NLS-1$
"metadata/BRMSconnections", "METADATA_FILE_BRMS", 37, true, "repository.metadataFileBRMS.alias", //$NON-NLS-1$
new String[] { PROD_DI }, new String[] {});
// public final static ERepositoryObjectType METADATA_FILE_DELIMITED = new ERepositoryObjectType(
// "repository.metadataFileDelimited", "metadata/fileDelimited", "METADATA_FILE_DELIMITED", 39, true, "repository.metadataFileDelimited.alias", new String[] { PROD_DI, PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataFileDelimited", "metadata/fileDelimited", "METADATA_FILE_DELIMITED", 39, true,
// "repository.metadataFileDelimited.alias", new String[] { PROD_DI, PROD_DQ }, new String[] {}); //$NON-NLS-1$
// //$NON-NLS-2$
// public final static ERepositoryObjectType METADATA_VALIDATION_RULES = new ERepositoryObjectType(
// "repository.metadataValidationRules", "metadata/validationRules", "METADATA_VALIDATION_RULES", 48, true, "repository.metadataValidationRules.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
// "repository.metadataValidationRules", "metadata/validationRules", "METADATA_VALIDATION_RULES", 48, true,
// "repository.metadataValidationRules.alias", new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$
// //$NON-NLS-2$
public final static ERepositoryObjectType METADATA_VALIDATIONS_RULES_FOLDER = new ERepositoryObjectType(
"repository.metadataValidationRulesFolder", "", "METADATA_VALIDATIONS_RULES_FOLDER", 49, true, "repository.metadataValidationRulesFolder.alias", new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataValidationRulesFolder", "", "METADATA_VALIDATIONS_RULES_FOLDER", 49, true, //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataValidationRulesFolder.alias", new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType FOLDER = new ERepositoryObjectType(
"repository.folder", "", "FOLDER", true, 50, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType FOLDER = new ERepositoryObjectType("repository.folder", "", "FOLDER", true, 50, //$NON-NLS-1$
new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType REFERENCED_PROJECTS = new ERepositoryObjectType(
"repository.referencedProjects", "", "REFERENCED_PROJECTS", 51, true, "repository.referencedProjects.alias", new String[] { PROD_DI, PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType REFERENCED_PROJECTS = new ERepositoryObjectType("repository.referencedProjects", "", //$NON-NLS-1$ //$NON-NLS-2$
"REFERENCED_PROJECTS", 51, true, "repository.referencedProjects.alias", new String[] { PROD_DI, PROD_DQ },
new String[] {}, false);
public final static ERepositoryObjectType GENERATED = new ERepositoryObjectType(
"repository.generated", "documentations/generated", "GENERATED", true, 52, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType GENERATED = new ERepositoryObjectType("repository.generated", //$NON-NLS-1$
"documentations/generated", "GENERATED", true, 52, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType JOBS = new ERepositoryObjectType(
"repository.jobs", "documentations/generated/jobs", "JOBS", true, 53, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType JOBS = new ERepositoryObjectType("repository.jobs", "documentations/generated/jobs", //$NON-NLS-1$
"JOBS", true, 53, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType JOB_DOC = new ERepositoryObjectType(
"repository.jobdoc", "documentations/generated/jobs", "JOB_DOC", true, 54, new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$
public final static ERepositoryObjectType JOB_DOC = new ERepositoryObjectType("repository.jobdoc", //$NON-NLS-1$
"documentations/generated/jobs", "JOB_DOC", true, 54, new String[] { PROD_DI }, new String[] {});
public final static ERepositoryObjectType JOBLETS = new ERepositoryObjectType(
"repository.joblets", "documentations/generated/joblets", "JOBLETS", true, 58, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType JOBLETS = new ERepositoryObjectType("repository.joblets", //$NON-NLS-1$
"documentations/generated/joblets", "JOBLETS", true, 58, new String[] { PROD_DI }, new String[] {}, false);
public final static ERepositoryObjectType JOBLET_DOC = new ERepositoryObjectType(
"repository.jobletdoc", "documentations/generated/joblets", "JOBLET_DOC", true, 59, new String[] { PROD_DI }, new String[] {}); //$NON-NLS-1$
public final static ERepositoryObjectType JOBLET_DOC = new ERepositoryObjectType("repository.jobletdoc", //$NON-NLS-1$
"documentations/generated/joblets", "JOBLET_DOC", true, 59, new String[] { PROD_DI }, new String[] {});
public final static ERepositoryObjectType COMPONENTS = new ERepositoryObjectType(
"repository.components", "components", "COMPONENTS", true, 61, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType COMPONENTS = new ERepositoryObjectType("repository.components", "components", //$NON-NLS-1$
"COMPONENTS", true, 61, new String[] { PROD_DI }, new String[] {}, false);
// MOD mzhao feature 9207
public final static ERepositoryObjectType TDQ_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement", "", "TDQ_ELEMENT", 62, true, "repository.tdqelement.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_ELEMENT = new ERepositoryObjectType("repository.tdqelement", "", "TDQ_ELEMENT", //$NON-NLS-1$ //$NON-NLS-2$
62, true, "repository.tdqelement.alias", new String[] { PROD_DQ }, new String[] {}, false);
// MOD mzhao feature 13114, 2010-05-19
public final static ERepositoryObjectType TDQ_ANALYSIS_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.analysis", "TDQ_Data Profiling/Analyses", "TDQ_ANALYSIS_ELEMENT", 63, true, "repository.tdqelement.analysis.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_ANALYSIS_ELEMENT = new ERepositoryObjectType("repository.tdqelement.analysis", //$NON-NLS-1$
"TDQ_Data Profiling/Analyses", "TDQ_ANALYSIS_ELEMENT", 63, true, "repository.tdqelement.analysis.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_REPORT_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.report", "TDQ_Data Profiling/Reports", "TDQ_REPORT_ELEMENT", 64, true, "repository.tdqelement.report.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_REPORT_ELEMENT = new ERepositoryObjectType("repository.tdqelement.report", //$NON-NLS-1$
"TDQ_Data Profiling/Reports", "TDQ_REPORT_ELEMENT", 64, true, "repository.tdqelement.report.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_INDICATOR_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.indicator", "TDQ_Libraries/Indicators", "TDQ_INDICATOR_ELEMENT", 66, true, "repository.tdqelement.indicator.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_INDICATOR_ELEMENT = new ERepositoryObjectType("repository.tdqelement.indicator", //$NON-NLS-1$
"TDQ_Libraries/Indicators", "TDQ_INDICATOR_ELEMENT", 66, true, "repository.tdqelement.indicator.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_PATTERN_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.pattern", "TDQ_Libraries/Patterns", "TDQ_PATTERN_ELEMENT", 67, true, "repository.tdqelement.pattern.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_PATTERN_ELEMENT = new ERepositoryObjectType("repository.tdqelement.pattern", //$NON-NLS-1$
"TDQ_Libraries/Patterns", "TDQ_PATTERN_ELEMENT", 67, true, "repository.tdqelement.pattern.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_SOURCE_FILE_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.sourceFile", "TDQ_Libraries/Source Files", "TDQ_SOURCE_FILE_ELEMENT", 68, true, "repository.tdqelement.sourceFile.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
"repository.tdqelement.sourceFile", "TDQ_Libraries/Source Files", "TDQ_SOURCE_FILE_ELEMENT", 68, true, //$NON-NLS-1$ //$NON-NLS-2$
"repository.tdqelement.sourceFile.alias", new String[] { PROD_DQ }, new String[] {});
// MOD zqin feature 14507
public final static ERepositoryObjectType TDQ_JRAXML_ELEMENT = new ERepositoryObjectType(
"repository.tdqelement.jrxml", "TDQ_Libraries/JRXML Template", "TDQ_JRAXML_ELEMENT", 69, true, "repository.tdqelement.jrxml.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_JRAXML_ELEMENT = new ERepositoryObjectType("repository.tdqelement.jrxml", //$NON-NLS-1$
"TDQ_Libraries/JRXML Template", "TDQ_JRAXML_ELEMENT", 69, true, "repository.tdqelement.jrxml.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_FOLDER_NODE = new ERepositoryObjectType(
"repository.tdqelement.folderNode", "", "TDQ_FOLDER_NODE", 70, true, "repository.tdqelement.folderNode.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_FOLDER_NODE = new ERepositoryObjectType("repository.tdqelement.folderNode", "", //$NON-NLS-1$ //$NON-NLS-2$
"TDQ_FOLDER_NODE", 70, true, "repository.tdqelement.folderNode.alias", new String[] { PROD_DQ }, new String[] {},
false);
// MOD klliu feature 15750
public final static ERepositoryObjectType TDQ_DATA_PROFILING = new ERepositoryObjectType(
"repository.dataprofiling", "TDQ_Data Profiling", "TDQ_DATA_PROFILING", 71, true, "repository.dataprofiling.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_DATA_PROFILING = new ERepositoryObjectType("repository.dataprofiling", //$NON-NLS-1$
"TDQ_Data Profiling", "TDQ_DATA_PROFILING", 71, true, "repository.dataprofiling.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {}, false);
public final static ERepositoryObjectType TDQ_LIBRARIES = new ERepositoryObjectType(
"repository.libraries", "TDQ_Libraries", "TDQ_LIBRARIES", 74, true, "repository.libraries.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_LIBRARIES = new ERepositoryObjectType("repository.libraries", "TDQ_Libraries", //$NON-NLS-1$ //$NON-NLS-2$
"TDQ_LIBRARIES", 74, true, "repository.libraries.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType TDQ_PATTERN_REGEX = new ERepositoryObjectType(
"repository.patternRegex", "TDQ_Libraries/Patterns/Regex", "TDQ_PATTERN_REGEX", 76, true, "repository.patternRegex.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_PATTERN_REGEX = new ERepositoryObjectType("repository.patternRegex", //$NON-NLS-1$
"TDQ_Libraries/Patterns/Regex", "TDQ_PATTERN_REGEX", 76, true, "repository.patternRegex.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType TDQ_PATTERN_SQL = new ERepositoryObjectType(
"repository.patternSql", "TDQ_Libraries/Patterns/SQL", "TDQ_PATTERN_SQL", 77, true, "repository.patternSql.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_PATTERN_SQL = new ERepositoryObjectType("repository.patternSql", //$NON-NLS-1$
"TDQ_Libraries/Patterns/SQL", "TDQ_PATTERN_SQL", 77, true, "repository.patternSql.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {}, false);
public final static ERepositoryObjectType TDQ_RULES = new ERepositoryObjectType(
"repository.rules", "TDQ_Libraries/Rules", "TDQ_RULES", 79, true, "repository.rules.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_RULES = new ERepositoryObjectType("repository.rules", "TDQ_Libraries/Rules", //$NON-NLS-1$ //$NON-NLS-2$
"TDQ_RULES", 79, true, "repository.rules.alias", new String[] { PROD_DQ }, new String[] {});
public final static ERepositoryObjectType TDQ_RULES_SQL = new ERepositoryObjectType(
"repository.rulesSql", "TDQ_Libraries/Rules/SQL", "TDQ_RULES_SQL", 80, true, "repository.rulesSql.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_RULES_SQL = new ERepositoryObjectType("repository.rulesSql", //$NON-NLS-1$
"TDQ_Libraries/Rules/SQL", "TDQ_RULES_SQL", 80, true, "repository.rulesSql.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {}, false);
// MOD klliu feature 23109
public final static ERepositoryObjectType TDQ_RULES_PARSER = new ERepositoryObjectType(
"repository.rulesParser", "TDQ_Libraries/Rules/Parser", "TDQ_RULES_PARSER", 81, true, "repository.rulesParser.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_RULES_PARSER = new ERepositoryObjectType("repository.rulesParser", //$NON-NLS-1$
"TDQ_Libraries/Rules/Parser", "TDQ_RULES_PARSER", 81, true, "repository.rulesParser.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {}, false);
public final static ERepositoryObjectType TDQ_RULES_MATCHER = new ERepositoryObjectType(
"repository.rulesMatcher", "TDQ_Libraries/Rules/Match", "TDQ_RULES_MATCHER", 82, true, "repository.rulesMatcher.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_RULES_MATCHER = new ERepositoryObjectType("repository.rulesMatcher", //$NON-NLS-1$
"TDQ_Libraries/Rules/Match", "TDQ_RULES_MATCHER", 82, true, "repository.rulesMatcher.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {}, false);
// ~
// MOD klliu 2010-11-26 definition type
public final static ERepositoryObjectType TDQ_SYSTEM_INDICATORS = new ERepositoryObjectType(
"repository.systemIndicators", "TDQ_Libraries/Indicators/System Indicators", "TDQ_SYSTEM_INDICATORS", 83, true, "repository.systemIndicators.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_SYSTEM_INDICATORS = new ERepositoryObjectType("repository.systemIndicators", //$NON-NLS-1$
"TDQ_Libraries/Indicators/System Indicators", "TDQ_SYSTEM_INDICATORS", 83, true, "repository.systemIndicators.alias", //$NON-NLS-1$
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType TDQ_USERDEFINE_INDICATORS = new ERepositoryObjectType(
"repository.userDefineIndicators", "TDQ_Libraries/Indicators/User Defined Indicators", "TDQ_USERDEFINE_INDICATORS", 84, true, "repository.userDefineIndicators.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.userDefineIndicators", "TDQ_Libraries/Indicators/User Defined Indicators", "TDQ_USERDEFINE_INDICATORS", //$NON-NLS-1$ //$NON-NLS-2$
84, true, "repository.userDefineIndicators.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType TDQ_USERDEFINE_INDICATORS_LIB = new ERepositoryObjectType(
"repository.userDefineIndicators.lib", "", "TDQ_USERDEFINE_INDICATORS_LIB", 85, true, "repository.userDefineIndicators.lib.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.userDefineIndicators.lib", "", "TDQ_USERDEFINE_INDICATORS_LIB", 85, true, //$NON-NLS-1$ //$NON-NLS-2$
"repository.userDefineIndicators.lib.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_ADVANCED_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.advancedStatistics", "TDQ_Libraries/Indicators/System Indicators/Advanced Statistics", "SYSTEM_INDICATORS_ADVANCED_STATISTICS", 86, true, "repository.systemIndicators.advancedStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.advancedStatistics", "TDQ_Libraries/Indicators/System Indicators/Advanced Statistics", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_ADVANCED_STATISTICS", 86, true, "repository.systemIndicators.advancedStatistics.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_BUSINESS_RULES = new ERepositoryObjectType(
"repository.systemIndicators.businessRules", "TDQ_Libraries/Indicators/System Indicators/Business Rules", "SYSTEM_INDICATORS_BUSINESS_RULES", 87, true, "repository.systemIndicators.businessRules.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.businessRules", "TDQ_Libraries/Indicators/System Indicators/Business Rules", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_BUSINESS_RULES", 87, true, "repository.systemIndicators.businessRules.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_CORRELATION = new ERepositoryObjectType(
"repository.systemIndicators.correlation", "TDQ_Libraries/Indicators/System Indicators/Correlation", "SYSTEM_INDICATORS_CORRELATION", 88, true, "repository.systemIndicators.correlation.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.correlation", "TDQ_Libraries/Indicators/System Indicators/Correlation", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_CORRELATION", 88, true, "repository.systemIndicators.correlation.alias", new String[] { PROD_DQ },
new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_FUNCTIONAL_DEPENDENCY = new ERepositoryObjectType(
"repository.systemIndicators.functionalDependency", "TDQ_Libraries/Indicators/System Indicators/Functional Dependency", "SYSTEM_INDICATORS_FUNCTIONAL_DEPENDENCY", 89, true, "repository.systemIndicators.functionalDependency.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.functionalDependency", //$NON-NLS-1$
"TDQ_Libraries/Indicators/System Indicators/Functional Dependency", "SYSTEM_INDICATORS_FUNCTIONAL_DEPENDENCY", 89, //$NON-NLS-1$
true, "repository.systemIndicators.functionalDependency.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_OVERVIEW = new ERepositoryObjectType(
"repository.systemIndicators.overview", "TDQ_Libraries/Indicators/System Indicators/Overview", "SYSTEM_INDICATORS_OVERVIEW", 90, true, "repository.systemIndicators.overview.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"repository.systemIndicators.overview", "TDQ_Libraries/Indicators/System Indicators/Overview", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_OVERVIEW", 90, true, "repository.systemIndicators.overview.alias", new String[] { PROD_DQ }, //$NON-NLS-1$ //$NON-NLS-2$
new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_PATTERN_FREQUNCEY_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.patternFinder", "TDQ_Libraries/Indicators/System Indicators/Pattern Frequncey Statistics", "SYSTEM_INDICATORS_PATTERN_FINDER", 91, true, "repository.systemIndicators.patternFinder.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType SYSTEM_INDICATORS_PATTERN_FREQUENCY_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.patternFinder", //$NON-NLS-1$
"TDQ_Libraries/Indicators/System Indicators/Pattern Frequency Statistics", "SYSTEM_INDICATORS_PATTERN_FINDER", 91, //$NON-NLS-1$
true, "repository.systemIndicators.patternFinder.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_PATTERN_MATCHING = new ERepositoryObjectType(
"repository.systemIndicators.patternMatching", "TDQ_Libraries/Indicators/System Indicators/Pattern Matching", "SYSTEM_INDICATORS_PATTERN_MATCHING", 92, true, "repository.systemIndicators.patternMatching.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.patternMatching", "TDQ_Libraries/Indicators/System Indicators/Pattern Matching", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_PATTERN_MATCHING", 92, true, "repository.systemIndicators.patternMatching.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_ROW_COMPARISON = new ERepositoryObjectType(
"repository.systemIndicators.rowComparison", "TDQ_Libraries/Indicators/System Indicators/Row Comparison", "SYSTEM_INDICATORS_ROW_COMPARISON", 93, true, "repository.systemIndicators.rowComparison.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.rowComparison", "TDQ_Libraries/Indicators/System Indicators/Row Comparison", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_ROW_COMPARISON", 93, true, "repository.systemIndicators.rowComparison.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_SIMPLE_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.simpleStatistics", "TDQ_Libraries/Indicators/System Indicators/Simple Statistics", "SYSTEM_INDICATORS_SIMPLE_STATISTICS", 94, true, "repository.systemIndicators.simpleStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.simpleStatistics", "TDQ_Libraries/Indicators/System Indicators/Simple Statistics", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_SIMPLE_STATISTICS", 94, true, "repository.systemIndicators.simpleStatistics.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_SOUNDEX = new ERepositoryObjectType(
"repository.systemIndicators.soundex", "TDQ_Libraries/Indicators/System Indicators/Soundex", "SYSTEM_INDICATORS_SOUNDEX", 95, true, "repository.systemIndicators.soundex.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.soundex", "TDQ_Libraries/Indicators/System Indicators/Soundex", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_SOUNDEX", 95, true, "repository.systemIndicators.soundex.alias", new String[] { PROD_DQ },
new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_SUMMARY_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.summaryStatistics", "TDQ_Libraries/Indicators/System Indicators/Summary Statistics", "SYSTEM_INDICATORS_SUMMARY_STATISTICS", 96, true, "repository.systemIndicators.summaryStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.summaryStatistics", "TDQ_Libraries/Indicators/System Indicators/Summary Statistics", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_SUMMARY_STATISTICS", 96, true, "repository.systemIndicators.summaryStatistics.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_TEXT_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.textStatistics", "TDQ_Libraries/Indicators/System Indicators/Text Statistics", "SYSTEM_INDICATORS_TEXT_STATISTICS", 97, true, "repository.systemIndicators.textStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.textStatistics", "TDQ_Libraries/Indicators/System Indicators/Text Statistics", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_TEXT_STATISTICS", 97, true, "repository.systemIndicators.textStatistics.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType TDQ_EXCHANGE = new ERepositoryObjectType(
"repository.tdqExchange", "TDQ_Libraries/Exchange", "TDQ_EXCHANGE", 98, true, "repository.tdqExchange.alias", new String[] { PROD_DQ }, new String[] {}); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType TDQ_EXCHANGE = new ERepositoryObjectType("repository.tdqExchange", //$NON-NLS-1$
"TDQ_Libraries/Exchange", "TDQ_EXCHANGE", 98, true, "repository.tdqExchange.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
new String[] {});
public final static ERepositoryObjectType METADATA_SALESFORCE_MODULE = new ERepositoryObjectType(
"repository.metadataSalesforceModule", "METADATA_SALESFORCE_MODULE", 99, true, true, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.metadataSalesforceModule", "METADATA_SALESFORCE_MODULE", 99, true, true, new String[] { PROD_DI }, //$NON-NLS-1$ //$NON-NLS-2$
new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_PHONENUMBER_STATISTICS = new ERepositoryObjectType(
"repository.systemIndicators.phoneNumberStatistics", "TDQ_Libraries/Indicators/System Indicators/Phone Number Statistics", "SYSTEM_INDICATORS_PHONENUMBER_STATISTICS", 100, true, "repository.systemIndicators.phoneNumberStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.phoneNumberStatistics", //$NON-NLS-1$
"TDQ_Libraries/Indicators/System Indicators/Phone Number Statistics", "SYSTEM_INDICATORS_PHONENUMBER_STATISTICS", 100, //$NON-NLS-1$
true, "repository.systemIndicators.phoneNumberStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType SERVICESOPERATION = new ERepositoryObjectType(
"repository.servicesOperation", "SERVICESOPERATION", 101, true, true, new String[] { PROD_DI, PROD_CAMEL }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType SERVICESOPERATION = new ERepositoryObjectType("repository.servicesOperation", //$NON-NLS-1$
"SERVICESOPERATION", 101, true, true, new String[] { PROD_DI, PROD_CAMEL }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType SERVICESPORT = new ERepositoryObjectType(
"repository.servicesPort", "SERVICESPORT", 102, true, true, new String[] { PROD_DI, PROD_CAMEL }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
public final static ERepositoryObjectType SERVICESPORT = new ERepositoryObjectType("repository.servicesPort", "SERVICESPORT", //$NON-NLS-1$ //$NON-NLS-2$
102, true, true, new String[] { PROD_DI, PROD_CAMEL }, new String[] {}, false);
public final static ERepositoryObjectType SYSTEM_INDICATORS_FRAUDDETECTION = new ERepositoryObjectType(
"repository.systemIndicators.fraudDetection", "TDQ_Libraries/Indicators/System Indicators/Fraud Detection", "SYSTEM_INDICATORS_FRAUDDETECTION", 103, true, "repository.systemIndicators.fraudDetectionStatistics.alias", new String[] { PROD_DQ }, new String[] {}, false); //$NON-NLS-1$ //$NON-NLS-2$
"repository.systemIndicators.fraudDetection", "TDQ_Libraries/Indicators/System Indicators/Fraud Detection", //$NON-NLS-1$ //$NON-NLS-2$
"SYSTEM_INDICATORS_FRAUDDETECTION", 103, true, "repository.systemIndicators.fraudDetectionStatistics.alias",
new String[] { PROD_DQ }, new String[] {}, false);
public final static ERepositoryObjectType METADATA_SAP_TABLE = new ERepositoryObjectType(
"repository.SAPTable", "METADATA_SAP_TABLE", 104, true, true, new String[] { PROD_DI }, new String[] {}, false); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_SAP_TABLE = new ERepositoryObjectType("repository.SAPTable", //$NON-NLS-1$
"METADATA_SAP_TABLE", 104, true, true, new String[] { PROD_DI }, new String[] {}, false);
private String label;
@@ -375,6 +439,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
private List<ERepositoryObjectType> parentTypes = new ArrayList<ERepositoryObjectType>();
private List<ERepositoryObjectType> childrenTypes = new ArrayList<ERepositoryObjectType>();
static {
// init
RepositoryNodeProviderRegistryReader.getInstance().init();
@@ -384,6 +449,9 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
public final static ERepositoryObjectType PROCESS = ERepositoryObjectType.valueOf("PROCESS"); //$NON-NLS-1$
/**
* <font color="red">This value may be <b>null</b> in TOS, <b>should add NPE check</b></font>
*/
public final static ERepositoryObjectType JOBLET = ERepositoryObjectType.valueOf("JOBLET"); //$NON-NLS-1$
public final static ERepositoryObjectType TEST_CONTAINER = ERepositoryObjectType.valueOf("TEST_CONTAINER"); //$NON-NLS-1$
@@ -400,9 +468,9 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
public final static ERepositoryObjectType CONTEXT = ERepositoryObjectType.valueOf("CONTEXT"); //$NON-NLS-1$
public final static ERepositoryObjectType SQLPATTERNS = ERepositoryObjectType.valueOf("SQLPATTERNS"); //$NON-NLS-1$
public final static ERepositoryObjectType SQLPATTERNS = ERepositoryObjectType.valueOf("SQLPATTERNS"); //$NON-NLS-1$
public final static ERepositoryObjectType DOCUMENTATION = ERepositoryObjectType.valueOf("DOCUMENTATION"); //$NON-NLS-1$
public final static ERepositoryObjectType DOCUMENTATION = ERepositoryObjectType.valueOf("DOCUMENTATION"); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_FILE_POSITIONAL = ERepositoryObjectType
.valueOf("METADATA_FILE_POSITIONAL"); //$NON-NLS-1$
@@ -426,6 +494,9 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
public final static ERepositoryObjectType METADATA_MDMCONNECTION = ERepositoryObjectType.valueOf("METADATA_MDMCONNECTION"); //$NON-NLS-1$
/**
* <font color="red">This value may be <b>null</b> in some licenses, <b>should add NPE check</b></font>
*/
public final static ERepositoryObjectType PROCESS_MR = ERepositoryObjectType.valueOf("PROCESS_MR"); //$NON-NLS-1$
public final static ERepositoryObjectType METADATA_CONNECTIONS = ERepositoryObjectType.valueOf("METADATA_CONNECTIONS");
@@ -445,10 +516,19 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
public final static ERepositoryObjectType METADATA_EDIFACT = ERepositoryObjectType.valueOf("METADATA_EDIFACT");
/**
* <font color="red">This value may be <b>null</b> in some licenses, <b>should add NPE check</b></font>
*/
public final static ERepositoryObjectType PROCESS_STORM = ERepositoryObjectType.valueOf("PROCESS_STORM");
/**
* <font color="red">This value may be <b>null</b> in some licenses, <b>should add NPE check</b></font>
*/
public final static ERepositoryObjectType PROCESS_ROUTE = ERepositoryObjectType.valueOf("ROUTE"); //$NON-NLS-1$
/**
* <font color="red">This value may be <b>null</b> in some licenses, <b>should add NPE check</b></font>
*/
public final static ERepositoryObjectType PROCESS_ROUTELET = ERepositoryObjectType.valueOf("ROUTELET"); //$NON-NLS-1$
/**
@@ -758,8 +838,8 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
} else if (type.getType().equals("SERVICES")) {
return "Services";
} else if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
ICamelDesignerCoreService camelService = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault().getService(
ICamelDesignerCoreService.class);
ICamelDesignerCoreService camelService = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault()
.getService(ICamelDesignerCoreService.class);
String deleteFolderName = camelService.getDeleteFolderName(type);
if (deleteFolderName != null) {
return deleteFolderName;

View File

@@ -25,6 +25,10 @@ public interface SVNConstant {
public static final String NAME_TAGS = "tags"; //$NON-NLS-1$
public static final String NAME_MASTER = "master"; //$NON-NLS-1$
public static final String NAME_ORIGIN = "origin"; //$NON-NLS-1$
/*
*
*/

View File

@@ -42,9 +42,9 @@ import org.talend.repository.model.RepositoryConstants;
/**
* Utilities to work with IContextParamet objects. <br/>
*
*
* $Id: ContextParameterUtils.java 38013 2010-03-05 14:21:59Z mhirt $
*
*
*/
public final class ContextParameterUtils {
@@ -58,8 +58,12 @@ public final class ContextParameterUtils {
private static final String JAVA_ENDWITH = "\"))"; //$NON-NLS-1$
private static final String LINE = "_"; //$NON-NLS-1$
private static final String EMPTY = ""; //$NON-NLS-1$
private static final String NON_CONTEXT_PATTERN = "[^a-zA-Z0-9_]"; //$NON-NLS-1$
/**
* Constructs a new ContextParameterUtils.
*/
@@ -68,7 +72,7 @@ public final class ContextParameterUtils {
/**
* Script code used to invoque a context parameter in a given language.
*
*
* @param parameter Context parameter used in script.
* @param language Language of the script.
* @return Script code invoquing the context parameter.
@@ -201,7 +205,7 @@ public final class ContextParameterUtils {
/**
* DOC qzhang Comment method "containoldContext".
*
*
* @param code
* @return
*/
@@ -212,7 +216,7 @@ public final class ContextParameterUtils {
/**
* DOC qzhang Comment method "containoldContext".
*
*
* @param code
* @return
*/
@@ -225,9 +229,9 @@ public final class ContextParameterUtils {
}
/**
*
*
* ggu Comment method "getNewScriptCode".
*
*
* example: context.var1 for java, $_context{var1} for perl.
*/
public static String getNewScriptCode(final String name, ECodeLanguage language) {
@@ -238,9 +242,9 @@ public final class ContextParameterUtils {
}
/**
*
*
* ggu Comment method "getVariableFromCode".
*
*
* only for new script code and the first variables. and if there is no variable in code, return null.
*/
public static String getVariableFromCode(String code) {
@@ -294,9 +298,9 @@ public final class ContextParameterUtils {
}
/**
*
*
* ggu Comment method "containContextVariables".
*
*
* check the string contain context, or not.
*/
public static boolean containContextVariables(String str) {
@@ -309,9 +313,9 @@ public final class ContextParameterUtils {
}
/**
*
*
* ggu Comment method "checkAndHideParameter".
*
*
* hide the value. if the type is password
*/
public static String checkAndHideValue(IContextParameter parameter) {
@@ -327,10 +331,10 @@ public final class ContextParameterUtils {
}
/**
*
*
* ggu Comment method "isPasswordType".
*
*
*
*
*/
public static boolean isPasswordType(IContextParameter parameter) {
if (parameter == null) {
@@ -395,6 +399,35 @@ public final class ContextParameterUtils {
return value;
}
/**
* DOC ycbai Comment method "isContextParamOfContextType".
*
* <p>
* Estimate if the context parameter exists in the context type.
*
* @param contextType
* @param value
* @return
*/
public static boolean isContextParamOfContextType(ContextType contextType, String value) {
if (contextType == null || value == null) {
return false;
}
ContextParameterType param = null;
if (ContextParameterUtils.isContainContextParam(value)) {
String var = ContextParameterUtils.getVariableFromCode(value);
if (var != null) {
for (ContextParameterType paramType : (List<ContextParameterType>) contextType.getContextParameter()) {
if (var.equals(paramType.getName())) {
param = paramType;
break;
}
}
}
}
return param != null;
}
public static boolean isValidParameterName(String name) {
if (name != null) {
// for java, the var name not be named with java keywords.
@@ -420,4 +453,28 @@ public final class ContextParameterUtils {
return false;
}
/**
* DOC ycbai Comment method "getValidParameterName".
*
* <p>
* Get a valid context parameter name which revise the invalid characters.
* </p>
*
* @param name
* @return
*/
public static String getValidParameterName(String name) {
if (name == null || name.isEmpty()) {
return null;
}
if (isValidParameterName(name)) {
return name;
}
String newName = name.replaceAll(NON_CONTEXT_PATTERN, LINE);
if (ContextUtils.isJavaKeyWords(newName)) {
newName = LINE + name;
}
return newName;
}
}

View File

@@ -20,6 +20,8 @@ public class NexusConstants {
public static final String SERVICES_SEARCH = "service/local/lucene/search?";//$NON-NLS-1$
public static final String SERVICES_RESOLVE = "service/local/artifact/maven/resolve?";//$NON-NLS-1$
public static final String CONTENT_REPOSITORIES = "/content/repositories/";//$NON-NLS-1$
public static final String SLASH = "/";//$NON-NLS-1$

View File

@@ -12,6 +12,7 @@
// ============================================================================
package org.talend.core.nexus;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.Authenticator;
import java.net.HttpURLConnection;
@@ -25,15 +26,19 @@ import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import org.apache.commons.lang.StringUtils;
import org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.utils.network.NetworkUtil;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.runtime.maven.MavenArtifact;
import org.talend.core.service.IRemoteService;
import org.talend.utils.json.JSONException;
@@ -46,6 +51,11 @@ import org.talend.utils.ssl.SSLUtils;
*/
public class NexusServerUtils {
/**
*
*/
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
public static final String KEY_NEXUS_RUL = "nexusUrl";//$NON-NLS-1$
public static final String KEY_NEXUS_USER = "username";//$NON-NLS-1$
@@ -131,6 +141,9 @@ public class NexusServerUtils {
* @return
*/
public static boolean checkConnectionStatus(String nexusUrl, String repositoryId, final String userName, final String password) {
if (StringUtils.isEmpty(nexusUrl)) {
return false;
}
final Authenticator defaultAuthenticator = NetworkUtil.getDefaultAuthenticator();
if (userName != null && !"".equals(userName)) {
Authenticator.setDefault(new Authenticator() {
@@ -155,10 +168,6 @@ public class NexusServerUtils {
URL url = new URL(urlToCheck);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
// if (userName != null && !"".equals(userName)) {
// urlConnection.setRequestProperty(
// "Authorization", "Basic " + Base64.encodeBase64((userName + ":" + password).getBytes()));//$NON-NLS-1$ //$NON-NLS-2$
// }
if (urlConnection instanceof HttpsURLConnection) {
String userDir = Platform.getInstallLocation().getURL().getPath();
final SSLSocketFactory socketFactory = SSLUtils.getSSLContext(userDir).getSocketFactory();
@@ -173,14 +182,17 @@ public class NexusServerUtils {
});
}
urlConnection.setConnectTimeout(10000);
urlConnection.setReadTimeout(10000);
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
int timeout = node.getInt(ITalendCorePrefConstants.NEXUS_TIMEOUT, 10000);
urlConnection.setConnectTimeout(timeout);
urlConnection.setReadTimeout(timeout);
status = urlConnection.getResponseCode();
if (status == CONNECTION_OK) {
return true;
}
} catch (Exception e) {
// do nothing
ExceptionHandler.process(e);
} finally {
Authenticator.setDefault(defaultAuthenticator);
}
@@ -302,6 +314,47 @@ public class NexusServerUtils {
}
}
public static String resolveSha1(String nexusUrl, final String userName, final String password, String repositoryId,
String groupId, String artifactId, String version) throws Exception {
HttpURLConnection urlConnection = null;
final Authenticator defaultAuthenticator = NetworkUtil.getDefaultAuthenticator();
if (userName != null && !"".equals(userName)) {
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(userName, password.toCharArray());
}
});
}
try {
String service = NexusConstants.SERVICES_RESOLVE + "a=" + artifactId + "&g=" + groupId + "&r=" + repositoryId + "&v="
+ version;
urlConnection = getHttpURLConnection(nexusUrl, service, userName, password);
SAXReader saxReader = new SAXReader();
InputStream inputStream = urlConnection.getInputStream();
Document document = saxReader.read(inputStream);
Node sha1Node = document.selectSingleNode("/artifact-resolution/data/sha1");
String sha1 = null;
if (sha1Node != null) {
sha1 = sha1Node.getText();
}
return sha1;
} catch (FileNotFoundException e) {
// jar not existing on remote nexus
return null;
} finally {
Authenticator.setDefault(defaultAuthenticator);
if (null != urlConnection) {
urlConnection.disconnect();
}
}
}
private static String getSearchQuery(String repositoryId, String groupId, String artifactId, String version, int from,
int count) {
String query = "";//$NON-NLS-1$
@@ -352,7 +405,9 @@ public class NexusServerUtils {
});
}
urlConnection.setConnectTimeout(10000);
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
int timeout = node.getInt(ITalendCorePrefConstants.NEXUS_TIMEOUT, 10000);
urlConnection.setConnectTimeout(timeout);
return urlConnection;
}

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2015 Talend Inc. - www.talend.com
// Copyright (C) 2006-2016 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
@@ -149,7 +149,9 @@ public interface ITalendCorePrefConstants {
public static final String OOZIE_SCHEDULER_HADOOP_PROPERTIES = "oozie_scheduler_hadoop_properties"; //$NON-NLS-1$
public static final String OOZIE_SCHEDULER_PROPERTY_TYPE = "oozie_scheduler_property_type";
public static final String OOZIE_SCHEDULER_PROPERTY_TYPE = "oozie_scheduler_property_type"; //$NON-NLS-1$
public static final String OOZIE_SCHEDULER_RELATIVE_HADOOP_CLUSTER_ID = "oozie_scheduler_relative_hadoop_cluster_id"; //$NON-NLS-1$
public static final String CoreUIPlugin_ID = "org.talend.core.ui"; //$NON-NLS-1$
@@ -172,4 +174,15 @@ public interface ITalendCorePrefConstants {
* PlatformUI.getPreference().getBoolean("NOT_SHOW_ONBOARDING_AT_STARTUP")
*/
public static final String PREFERENCE_NOT_SHOW_ONBOARDING_AT_STARTUP = "NOT_SHOW_ONBOARDING_AT_STARTUP"; //$NON-NLS-1$
/**
* TAC connection timeout (seconds)
*/
public static final String PERFORMANCE_TAC_CONNECTION_TIMEOUT = "PERFORMANCE_TAC_CONNECTION_TIMEOUT"; //$NON-NLS-1$
public static final String PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT = "PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT"; //$NON-NLS-1$
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
public static final String NEXUS_REFRESH_FREQUENCY = "NEXUS_REFRESH_FREQUENCY"; //$NON-NLS-1$
}

View File

@@ -208,6 +208,9 @@ public class MavenUrlHelper {
if (parseMvnUrl == null) {
return null;
}
if (!MavenConstants.DEFAULT_LIB_GROUP_ID.equals(parseMvnUrl.getGroupId())) {
return mavenUri; // snapshot url same as maven url
}
return generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), parseMvnUrl.getVersion()
+ MavenConstants.SNAPSHOT, parseMvnUrl.getType(), parseMvnUrl.getClassifier());
@@ -219,6 +222,9 @@ public class MavenUrlHelper {
if (parseMvnUrl == null) {
return null;
}
if (!MavenConstants.DEFAULT_LIB_GROUP_ID.equals(parseMvnUrl.getGroupId())) {
return snapshotMvnuri; // snapshot url same as maven url
}
String snapshotVerstion = parseMvnUrl.getVersion();
String verstion = snapshotVerstion.substring(0, snapshotVerstion.indexOf(MavenConstants.SNAPSHOT));
return generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), verstion, parseMvnUrl.getType(),

View File

@@ -14,6 +14,7 @@ package org.talend.core.runtime.process;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.talend.designer.runprocess.IProcessor;
/**
* created by ycbai on 2015年5月13日 Detailled comment
@@ -21,7 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
*/
public interface IBuildJobHandler {
public void generateJobFiles(IProgressMonitor monitor) throws Exception;
public IProcessor generateJobFiles(IProgressMonitor monitor) throws Exception;
public void generateTestReports(IProgressMonitor monitor) throws Exception;

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2015 Talend Inc. - www.talend.com
// Copyright (C) 2006-2016 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
@@ -10,7 +10,7 @@
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.model.runprocess;
package org.talend.core.runtime.process;
import java.util.HashMap;
import java.util.HashSet;

View File

@@ -30,6 +30,8 @@ public interface TalendProcessOptionConstants {
public static final int GENERATE_WITHOUT_COMPILING = 1 << 5;
public static final int GENERATE_WITHOUT_FORMAT = 1 << 6;
/**
* clean options
*/

View File

@@ -12,6 +12,8 @@
// ============================================================================
package org.talend.core.runtime.services;
import java.util.Dictionary;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.preference.IPreferenceNode;
import org.talend.core.IService;
@@ -32,4 +34,6 @@ public interface IMavenUIService extends IService {
void addMavenConfigurationChangeListener();
Dictionary<String, String> getTalendMavenSetting();
}

View File

@@ -30,4 +30,7 @@ public interface IMetadataManagmentUiService extends IService {
public String getOriginalValue(ContextType contextType, final String value);
public void openRepositoryContextWizard(RepositoryNode repositoryNode);
public boolean isContextMode(Connection connection, String value);
}

View File

@@ -18,11 +18,8 @@ import java.util.Map;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.conn.DatabaseConnStrUtil;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.metadata.builder.connection.Query;
@@ -31,7 +28,6 @@ import org.talend.core.model.process.IElement;
import org.talend.core.model.properties.DatabaseConnectionItem;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.utils.TalendQuoteUtils;
import org.talend.repository.model.RepositoryNode;
@@ -589,10 +585,7 @@ public class ConnectionParameters {
}
public static boolean isJavaProject() {
RepositoryContext repositoryContext = (RepositoryContext) CoreRuntimePlugin.getInstance().getContext()
.getProperty(Context.REPOSITORY_CONTEXT_KEY);
ECodeLanguage codeLanguage = repositoryContext.getProject().getLanguage();
return (codeLanguage == ECodeLanguage.JAVA);
return true;
}
public IMetadataTable getMetadataTable() {

View File

@@ -51,6 +51,8 @@ public interface ITestContainerProviderService extends IService {
public boolean hasTestCase(Property property);
public ProcessType getTestContainerProcess(Item item);
public void setTestContainerProcess(ProcessType process,Item item);
public Item getParentJobItem(Item item) throws PersistenceException;

View File

@@ -140,7 +140,7 @@ public class RepositoryImageProvider {
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_CORRELATION
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_FUNCTIONAL_DEPENDENCY
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_OVERVIEW
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_PATTERN_FREQUNCEY_STATISTICS
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_PATTERN_FREQUENCY_STATISTICS
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_PATTERN_MATCHING
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_ROW_COMPARISON
|| type == ERepositoryObjectType.SYSTEM_INDICATORS_SIMPLE_STATISTICS

View File

@@ -0,0 +1,30 @@
// ============================================================================
//
// Copyright (C) 2006-2016 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.designer.core;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import org.talend.core.IService;
/**
* created by hcyi on Aug 17, 2016 Detailled comment
*
*/
public interface IMDMService extends IService {
public SSLContext getSSLContext();
public HostnameVerifier getDefaultHostnameVerifier();
}

View File

@@ -59,6 +59,8 @@ public interface IProcessor {
*/
public void generateCode(boolean statistics, boolean trace, boolean context) throws ProcessorException;
public void generateCode(boolean statistics, boolean trace, boolean context, int option) throws ProcessorException;
/**
*
* Only generate context code, not main code.

View File

@@ -118,6 +118,8 @@ public interface IRunProcessService extends IService {
public void setDelegateService(IRunProcessService delegateService);
public void updateLibraries(Set<ModuleNeeded> jobModuleList, IProcess process);
public void updateLibraries(Set<ModuleNeeded> jobModuleList, IProcess process, Set<ModuleNeeded> alreadyRetrievedModules);
public void refreshView();
@@ -138,6 +140,8 @@ public interface IRunProcessService extends IService {
public IProcess getActiveProcess();
public boolean checkExportProcess(IStructuredSelection selection, boolean isJob);
public void checkLastGenerationHasCompilationError(boolean updateProblemsView) throws ProcessorException;
/**
* DOC ycbai Comment method "getResourceFilePath".

View File

@@ -119,7 +119,7 @@ public final class ProjectManager {
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(p);
if (parentBranch != null) {
for (ProjectReference pr : (List<ProjectReference>) p.getReferencedProjects()) {
if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
resolveRefProject(pr.getReferencedProject()); // only to resolve all
}
}
@@ -133,7 +133,7 @@ public final class ProjectManager {
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(p);
if (parentBranch != null) {
for (ProjectReference pr : (List<ProjectReference>) p.getReferencedProjects()) {
if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
Project project = new Project(pr.getReferencedProject(), false);
allReferencedprojects.add(project);
resolveSubRefProject(pr.getReferencedProject(), allReferencedprojects); // only to resolve all
@@ -236,7 +236,7 @@ public final class ProjectManager {
List<Project> refProjects = new ArrayList<Project>();
for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {
if (refProject.getBranch() == null || parentBranch.equals(refProject.getBranch())) {
if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
refProjects.add(new Project(refProject.getReferencedProject(), false));
}
}
@@ -489,7 +489,8 @@ public final class ProjectManager {
}
public String getMainProjectBranch(org.talend.core.model.properties.Project project) {
return project != null ? getMainProjectBranch(project.getTechnicalLabel()) : null;
String branchForMainProject = (project != null ? getMainProjectBranch(project.getTechnicalLabel()) : null);
return branchForMainProject;
}
/**
@@ -500,16 +501,30 @@ public final class ProjectManager {
* @return
*/
public String getMainProjectBranch(String technicalLabel) {
String branchForMainProject = null;
Map<String, String> fields = getRepositoryContextFields();
if (fields == null || technicalLabel == null) {
return null;
return branchForMainProject;
}
String branchKey = IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
if (fields.containsKey(branchKey)) {
String branchForMainProject = fields.get(branchKey);
return branchForMainProject;
branchForMainProject = fields.get(branchKey);
}
return null;
if (branchForMainProject != null) {
branchForMainProject = getFormatedBranchName(branchForMainProject);
}
return branchForMainProject;
}
public String getFormatedBranchName(String branchName) {
String formatedBranchName = branchName;
if (!branchName.startsWith(SVNConstant.NAME_TAGS + SVNConstant.SEP_CHAR)
&& !branchName.startsWith(SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR)
&& !branchName.startsWith(SVNConstant.NAME_ORIGIN + SVNConstant.SEP_CHAR)
&& !branchName.equals(SVNConstant.NAME_TRUNK) && !branchName.equals(SVNConstant.NAME_MASTER)) {
formatedBranchName = SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchName;
}
return formatedBranchName;
}
/**

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui</artifactId>

View File

@@ -29,6 +29,7 @@ import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.ui.component.ComponentsFactoryProvider;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.utils.string.MD5;
/**
* amaumont class global comment. Detailled comment <br/>
@@ -80,17 +81,19 @@ public class CoreImageProvider {
return getIcon(itemType);
}
private static Map<ImageDescriptor, Image> componentCachedImages = new HashMap<ImageDescriptor, Image>();
private static Map<String, Image> componentCachedImages = new HashMap<String, Image>();
public static Image getComponentImageFromDesc(ImageDescriptor imageDescriptor) {
Image image = null;
image = componentCachedImages.get(imageDescriptor);
if (image == null || image.isDisposed()) {
image = imageDescriptor.createImage();
componentCachedImages.put(imageDescriptor, image);
}
return image;
}
public static Image getComponentImageFromDesc(
ImageDescriptor imageDescriptor) {
String md5Desc = MD5.getMD5(imageDescriptor.getImageData().data);
Image image = componentCachedImages.get(md5Desc);
if (image == null || image.isDisposed()) {
image = imageDescriptor.createImage();
componentCachedImages.put(md5Desc, image);
}
return image;
}
public static Image getComponentIcon(IComponent component, ICON_SIZE iconSize) {
if (component != null && iconSize != null) {
@@ -130,21 +133,24 @@ public class CoreImageProvider {
if (name != null && !name.equals("")) { //$NON-NLS-1$
for (IComponent component : ComponentsFactoryProvider.getInstance().getComponents()) {
if (name.equals(component.getName())) {
Image image = componentCachedImages.get(component.getIcon16());
String md5Desc16 = MD5.getMD5(component.getIcon16().getImageData().data);
Image image = componentCachedImages.get(md5Desc16);
if (image != null && !image.isDisposed()) {
image.dispose();
}
componentCachedImages.remove(component.getIcon16());
image = componentCachedImages.get(component.getIcon24());
componentCachedImages.remove(md5Desc16);
String md5Desc24 = MD5.getMD5(component.getIcon24().getImageData().data);
image = componentCachedImages.get(md5Desc24);
if (image != null && !image.isDisposed()) {
image.dispose();
}
componentCachedImages.remove(component.getIcon24());
image = componentCachedImages.get(component.getIcon32());
componentCachedImages.remove(md5Desc24);
String md5Desc32 = MD5.getMD5(component.getIcon32().getImageData().data);
image = componentCachedImages.get(md5Desc32);
if (image != null && !image.isDisposed()) {
image.dispose();
}
componentCachedImages.remove(component.getIcon32());
componentCachedImages.remove(md5Desc32);
}
}
}

View File

@@ -89,6 +89,9 @@ public class PerspectiveMenuManager extends MenuManager {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
if (page == null) {
return;
}
String activePersp = page.getPerspective().getId();
for (String perspId : perspectiveIds) {

View File

@@ -273,6 +273,9 @@ public class RestoreAllRegisteredPerspectivesProvider {
}
// create new
if (mPersp == null) { // copied some form method setPerspective of class WorkbenchPage
if (fWindow == null) {
return;
}
String perspId = perspDesc.getId();
WorkbenchPage workbenchPage = (WorkbenchPage) workbench.getActiveWorkbenchWindow().getActivePage();

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>6.1.1-SNAPSHOT</version>
<version>6.1.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core</artifactId>

View File

@@ -29,10 +29,17 @@ import java.util.Properties;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.i18n.Messages;
import org.talend.core.model.context.ContextUtils;
import org.talend.core.model.general.Project;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.repository.ProjectManager;
/**
* created by ldong on Aug 7, 2014 Detailled comment
@@ -108,30 +115,56 @@ public class ContextOrderProperties extends Properties {
private void initContextProperties() {
// group the context and set the comment
List<IRepositoryViewObject> repositoryContexts = Collections.emptyList();
try {
repositoryContexts = ProxyRepositoryFactory.getInstance().getAll(ProjectManager.getInstance().getCurrentProject(),
ERepositoryObjectType.CONTEXT);
for (Project project : ProjectManager.getInstance().getAllReferencedProjects()) {
repositoryContexts.addAll(ProxyRepositoryFactory.getInstance().getAll(project, ERepositoryObjectType.CONTEXT));
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
for (IContextParameter currentParameter : parameterList) {
int currentIndex = parameterList.indexOf(currentParameter);
if (currentIndex == 0) {
initFirstContextParameter(currentParameter);
initFirstContextParameter(currentParameter, repositoryContexts);
} else {
IContextParameter previousParameter = parameterList.get(currentIndex - 1);
initOtherContextParameters(currentParameter, previousParameter);
initOtherContextParameters(currentParameter, previousParameter, repositoryContexts);
}
}
}
private void initFirstContextParameter(IContextParameter firstParameter) {
private Item getRepositoryContextItemById(List<IRepositoryViewObject> repositoryContexts, String contextId) {
for (IRepositoryViewObject repositoryContext : repositoryContexts) {
if (contextId.equals(repositoryContext.getId())) {
return repositoryContext.getProperty().getItem();
}
}
return null;
}
private void initFirstContextParameter(IContextParameter firstParameter, List<IRepositoryViewObject> repositoryContexts) {
if (firstParameter.isBuiltIn()) {
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()), BUILT_IN_COMMENT);
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()),
BUILT_IN_COMMENT);
} else if (ContextParameterUtils.isEmptyParameter(firstParameter.getSource())) {
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()));
} else {
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()),
REPOSITORY_COMMENT
+ ContextUtils.getRepositoryContextItemById(firstParameter.getSource()).getProperty().getLabel());
Item contextItem = getRepositoryContextItemById(repositoryContexts, firstParameter.getSource());
if (contextItem != null) {
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()),
REPOSITORY_COMMENT + contextItem.getProperty().getLabel());
} else {
this.setProperty(firstParameter.getName(), TalendTextUtils.trimParameter(firstParameter.getValue()));
}
}
}
private void initOtherContextParameters(IContextParameter currentParameter, IContextParameter previousParameter) {
private void initOtherContextParameters(IContextParameter currentParameter, IContextParameter previousParameter,
List<IRepositoryViewObject> repositoryContexts) {
if (currentParameter.isBuiltIn()) {
if (previousParameter.isBuiltIn()) {
// same neighbor built-in in one group,no need to comment since the previous added comment
@@ -144,21 +177,24 @@ public class ContextOrderProperties extends Properties {
} else if (ContextParameterUtils.isEmptyParameter(currentParameter.getSource())) {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()));
} else {
Item contextItem = ContextUtils.getRepositoryContextItemById(currentParameter.getSource());
// TODO
String repositryContextName = contextItem.getProperty().getLabel();
if (previousParameter.isBuiltIn()) {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()),
REPOSITORY_COMMENT + repositryContextName);
} else {
// need to check if the same repository's context
if (previousParameter.getSource().equals(currentParameter.getSource())) {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()),
StringUtils.EMPTY);
} else {
Item contextItem = getRepositoryContextItemById(repositoryContexts, currentParameter.getSource());
if (contextItem != null) {
String repositryContextName = contextItem.getProperty().getLabel();
if (previousParameter.isBuiltIn()) {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()),
REPOSITORY_COMMENT + repositryContextName);
} else {
// need to check if the same repository's context
if (previousParameter.getSource().equals(currentParameter.getSource())) {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()),
StringUtils.EMPTY);
} else {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()),
REPOSITORY_COMMENT + repositryContextName);
}
}
} else {
this.setProperty(currentParameter.getName(), TalendTextUtils.trimParameter(currentParameter.getValue()));
}
}
}

View File

@@ -29,12 +29,16 @@ import org.apache.log4j.Logger;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.EList;
import org.eclipse.ui.IEditorPart;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.exception.CommonExceptionHandler;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
@@ -67,10 +71,10 @@ import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.model.repository.job.JobResource;
import org.talend.core.model.repository.job.JobResourceManager;
import org.talend.core.model.runprocess.LastGenerationInfo;
import org.talend.core.model.utils.JavaResourcesHelper;
import org.talend.core.model.utils.PerlResourcesHelper;
import org.talend.core.runtime.process.ITalendProcessJavaProject;
import org.talend.core.runtime.process.LastGenerationInfo;
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.core.services.ISVNProviderService;
@@ -128,6 +132,8 @@ public class ProcessorUtilities {
private static final String COMMA = ";"; //$NON-NLS-1$
private static final Set<ModuleNeeded> retrievedJarsForCurrentBuild = new HashSet<ModuleNeeded>();
public static void addOpenEditor(IEditorPart editor) {
openedEditors.add(editor);
}
@@ -362,12 +368,28 @@ public class ProcessorUtilities {
return null;
}
boolean isMainJob = false;
boolean isAutoBuild = false;
if (jobInfo.getFatherJobInfo() == null) {
// In order to avoid eclipse to compile the code at each change in the workspace, we deactivate the
// auto-build feature during the whole build time.
// It will be reactivated at the end if the auto-build is activated in the workspace preferences.
isAutoBuild = ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc = workspace.getDescription();
desc.setAutoBuilding(false);
try {
workspace.setDescription(desc);
} catch (CoreException e) {
CommonExceptionHandler.warn(e.getMessage());
}
isMainJob = true;
codeModified = false;
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
retrievedJarsForCurrentBuild.clear();
// if it's the father, reset the processMap to ensure to have a good
// code generation
@@ -458,7 +480,8 @@ public class ProcessorUtilities {
LastGenerationInfo.getInstance().setModulesNeededPerJob(jobInfo.getJobId(), jobInfo.getJobVersion(), neededLibraries);
// must install the needed libraries before generate codes with poms.
CorePlugin.getDefault().getRunProcessService().updateLibraries(neededLibraries, currentProcess);
CorePlugin.getDefault().getRunProcessService()
.updateLibraries(neededLibraries, currentProcess, retrievedJarsForCurrentBuild);
}
resetRunJobComponentParameterForContextApply(jobInfo, currentProcess, selectedContextName);
@@ -477,7 +500,7 @@ public class ProcessorUtilities {
// so the code won't have any error during the check, and it will help to check
// if the generation is really needed.
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor, currentProcess,
currentJobName, processor);
currentJobName, processor, isMainJob);
// for testContainer dataSet
generateDataSet(currentProcess, processor);
@@ -489,6 +512,20 @@ public class ProcessorUtilities {
* libraries.
*/
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
// If the auto-build is activated in the workspace preferences, we reactivate the feature since it's been
// deactivated at the beginning of the build time.
if (isAutoBuild) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc = workspace.getDescription();
desc.setAutoBuilding(true);
try {
workspace.setDescription(desc);
} catch (CoreException e) {
CommonExceptionHandler.warn(e.getMessage());
}
}
return processor;
}
@@ -580,6 +617,8 @@ public class ProcessorUtilities {
private static void generateBuildInfo(JobInfo jobInfo, IProgressMonitor progressMonitor, boolean isMainJob,
IProcess currentProcess, String currentJobName, IProcessor processor, int option) throws ProcessorException {
jobInfo.setProcess(null);
jobInfo.setProcessor(null);
if (isMainJob) {
progressMonitor.subTask(Messages.getString("ProcessorUtilities.finalizeBuild") + currentJobName); //$NON-NLS-1$
@@ -590,15 +629,20 @@ public class ProcessorUtilities {
throw new ProcessorException(e);
}
processor.syntaxCheck();
// TDI-36930, just after compile, need check the compile errors first.
CorePlugin.getDefault().getRunProcessService().checkLastGenerationHasCompilationError(true);
}
needContextInCurrentGeneration = true;
retrievedJarsForCurrentBuild.clear();
codeModified = false;
}
}
private static void generateContextInfo(JobInfo jobInfo, String selectedContextName, boolean statistics, boolean trace,
boolean needContext, IProgressMonitor progressMonitor, IProcess currentProcess, String currentJobName,
IProcessor processor) throws ProcessorException {
IProcessor processor, boolean isMain) throws ProcessorException {
if (isCodeGenerationNeeded(jobInfo, statistics, trace)) {
codeModified = true;
if ((currentProcess instanceof IProcess2) && exportConfig) {
@@ -636,7 +680,12 @@ public class ProcessorUtilities {
processor.setContext(currentContext);
// main job will use stats / traces
processor.generateCode(statistics, trace, true);
int option = TalendProcessOptionConstants.GENERATE_WITHOUT_FORMAT;
if (isMain) {
// only format for main job
option = 0;
}
processor.generateCode(statistics, trace, true, option);
if (currentProcess instanceof IProcess2 && ((IProcess2) currentProcess).getProperty() != null) {
designerCoreService.getLastGeneratedJobsDateMap().put(currentProcess.getId(),
((IProcess2) currentProcess).getProperty().getModificationDate());
@@ -702,7 +751,7 @@ public class ProcessorUtilities {
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
retrievedJarsForCurrentBuild.clear();
// if it's the father, reset the processMap to ensure to have a good
// code generation
ItemCacheManager.clearCache();
@@ -801,7 +850,8 @@ public class ProcessorUtilities {
neededLibraries);
// must install the needed libraries before generate codes with poms.
CorePlugin.getDefault().getRunProcessService().updateLibraries(neededLibraries, currentProcess);
CorePlugin.getDefault().getRunProcessService()
.updateLibraries(neededLibraries, currentProcess, retrievedJarsForCurrentBuild);
}
resetRunJobComponentParameterForContextApply(jobInfo, currentProcess, selectedContextName);
@@ -826,7 +876,7 @@ public class ProcessorUtilities {
processor.setArguments(argumentsMap);
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor, currentProcess,
currentJobName, processor);
currentJobName, processor, isMainJob);
// for testContainer dataSet
generateDataSet(currentProcess, processor);
@@ -866,9 +916,7 @@ public class ProcessorUtilities {
// set the last jobinfos to be able to set check the errors in the problems view (errors of compilations
// only)
// here we recreate a new JobInfo, to be sure to don't have link in memory to Emf or IProcess
JobInfo generatedJobInfo = new JobInfo(jobInfo.getJobId(), jobInfo.getContextName(), jobInfo.getJobVersion());
generatedJobInfo.setJobName(currentProcess.getName());
generatedJobInfo.setTestContainer(jobInfo.isTestContainer());
JobInfo generatedJobInfo = cloneJobInfo(jobInfo);
String projectFolderName;
if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
projectFolderName = JavaResourcesHelper.getProjectFolderName(selectedProcessItem);
@@ -882,6 +930,22 @@ public class ProcessorUtilities {
}
}
/**
* DOC nrousseau Comment method "cloneJobInfo".
* @param jobInfo
* @return
*/
private static JobInfo cloneJobInfo(JobInfo jobInfo) {
if (jobInfo == null) {
return null;
}
JobInfo generatedJobInfo = new JobInfo(jobInfo.getJobId(), jobInfo.getContextName(), jobInfo.getJobVersion());
generatedJobInfo.setJobName(jobInfo.getJobName());
generatedJobInfo.setTestContainer(jobInfo.isTestContainer());
generatedJobInfo.setFatherJobInfo(cloneJobInfo(jobInfo.getFatherJobInfo()));
return generatedJobInfo;
}
private static void generateNodeInfo(JobInfo jobInfo, String selectedContextName, boolean statistics, boolean properties,
int option, IProgressMonitor progressMonitor, IProcess currentProcess) throws ProcessorException {
if (BitwiseOptionUtils.containOption(option, GENERATE_TESTS) && jobInfo.getProcessItem() != null) {
@@ -943,28 +1007,30 @@ public class ProcessorUtilities {
}
subJobInfo.setJobVersion(processItem.getProperty().getVersion());
subJobInfo.setJobName(processItem.getProperty().getLabel());
if (!isNeedLoadmodules) {
LastGenerationInfo.getInstance().setModulesNeededWithSubjobPerJob(subJobInfo.getJobId(),
subJobInfo.getJobVersion(), Collections.<ModuleNeeded> emptySet());
}
if (jobInfo.isApplyContextToChildren()) {
subJobInfo.setApplyContextToChildren(jobInfo.isApplyContextToChildren());
// see bug 0003862: Export job with the flag "Apply to children" if the child don't have
// the
// same context fails.
if (checkIfContextExisted(processItem, selectedContextName)) {
subJobInfo.setContextName(selectedContextName);
} else {
// use the default context of subjob
String defaultContext = processItem.getProcess().getDefaultContext();
node.getElementParameter("PROCESS_TYPE_CONTEXT").setValue(defaultContext); //$NON-NLS-1$
subJobInfo.setContextName(defaultContext);
}
}
subJobInfo.setFatherJobInfo(jobInfo);
if (!jobList.contains(subJobInfo)) {
if (!isNeedLoadmodules) {
LastGenerationInfo.getInstance().setModulesNeededWithSubjobPerJob(subJobInfo.getJobId(),
subJobInfo.getJobVersion(), Collections.<ModuleNeeded> emptySet());
}
if (jobInfo.isApplyContextToChildren()) {
subJobInfo.setApplyContextToChildren(jobInfo.isApplyContextToChildren());
// see bug 0003862: Export job with the flag "Apply to children" if the child don't have
// the
// same context fails.
if (checkIfContextExisted(processItem, selectedContextName)) {
subJobInfo.setContextName(selectedContextName);
} else {
// use the default context of subjob
String defaultContext = processItem.getProcess().getDefaultContext();
node.getElementParameter("PROCESS_TYPE_CONTEXT").setValue(defaultContext); //$NON-NLS-1$
subJobInfo.setContextName(defaultContext);
}
}
int subJobOption = GENERATE_ALL_CHILDS;
if (BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
subJobOption = GENERATE_MAIN_ONLY;
@@ -980,37 +1046,37 @@ public class ProcessorUtilities {
if (!BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
currentProcess.setNeedRegenerateCode(true);
}
}
LastGenerationInfo
.getInstance()
.getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
LastGenerationInfo
.getInstance()
.getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
LastGenerationInfo
.getInstance()
.getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
LastGenerationInfo
.getInstance()
.getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
LastGenerationInfo
.getInstance()
.getRoutinesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
LastGenerationInfo
.getInstance()
.getRoutinesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion())
.addAll(LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(
subJobInfo.getJobId(), subJobInfo.getJobVersion()));
if (!LastGenerationInfo.getInstance().isUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion())) {
LastGenerationInfo.getInstance().setUseDynamic(
jobInfo.getJobId(),
jobInfo.getJobVersion(),
LastGenerationInfo.getInstance().isUseDynamic(subJobInfo.getJobId(),
subJobInfo.getJobVersion()));
}
if (!LastGenerationInfo.getInstance().isUsePigUDFs(jobInfo.getJobId(), jobInfo.getJobVersion())) {
LastGenerationInfo.getInstance().setUsePigUDFs(
jobInfo.getJobId(),
jobInfo.getJobVersion(),
LastGenerationInfo.getInstance().isUsePigUDFs(subJobInfo.getJobId(),
subJobInfo.getJobVersion()));
if (!LastGenerationInfo.getInstance().isUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion())) {
LastGenerationInfo.getInstance().setUseDynamic(
jobInfo.getJobId(),
jobInfo.getJobVersion(),
LastGenerationInfo.getInstance().isUseDynamic(subJobInfo.getJobId(),
subJobInfo.getJobVersion()));
}
if (!LastGenerationInfo.getInstance().isUsePigUDFs(jobInfo.getJobId(), jobInfo.getJobVersion())) {
LastGenerationInfo.getInstance().setUsePigUDFs(
jobInfo.getJobId(),
jobInfo.getJobVersion(),
LastGenerationInfo.getInstance().isUsePigUDFs(subJobInfo.getJobId(),
subJobInfo.getJobVersion()));
}
}
}
}
@@ -1578,6 +1644,9 @@ public class ProcessorUtilities {
List<ProcessItem> testsItems = testContainerService.getAllTestContainers(parentJobInfo.getProcessItem());
for (ProcessItem testItem : testsItems) {
ProcessType testProcess = testContainerService.getTestContainerProcess(testItem);
if (testItem.getProcess() == null) {
testItem.setProcess(testProcess);
}
if (testProcess == null) {
log.warn(Messages.getString("ProcessorUtilities.nullProcess")); //$NON-NLS-1$
continue;

Some files were not shown because too many files have changed in this diff Show More