Compare commits
183 Commits
mbasiuk/bu
...
undx/TDI-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
279222c22f | ||
|
|
9616a5028c | ||
|
|
bbc21acd80 | ||
|
|
cfcd57c65f | ||
|
|
cf9201c9d7 | ||
|
|
00b496bfba | ||
|
|
ad39bcc1f1 | ||
|
|
cbe87f5167 | ||
|
|
9bcafa150f | ||
|
|
cc400a4d22 | ||
|
|
1b1064ff73 | ||
|
|
8ea829ee81 | ||
|
|
feb4bce9b4 | ||
|
|
2c5e127de1 | ||
|
|
dfb82eb5a7 | ||
|
|
cda76045af | ||
|
|
cae9f32122 | ||
|
|
c91dd79086 | ||
|
|
f59119005e | ||
|
|
b6ca94c99c | ||
|
|
5ed5767f6a | ||
|
|
616f84c03f | ||
|
|
4bc6c7e482 | ||
|
|
53e17d9001 | ||
|
|
c36560570b | ||
|
|
7d093c2ff1 | ||
|
|
ea88e43485 | ||
|
|
9c526715b1 | ||
|
|
16c0283679 | ||
|
|
41033edd3b | ||
|
|
f77b21c2e0 | ||
|
|
f79e24d155 | ||
|
|
9859ecffab | ||
|
|
453fd4ba1d | ||
|
|
d152eb7b74 | ||
|
|
8ae03ccad0 | ||
|
|
0b79f42125 | ||
|
|
1e3453478e | ||
|
|
9cd3dea7f4 | ||
|
|
4214bc8d1e | ||
|
|
4a96843c74 | ||
|
|
65585cc5ca | ||
|
|
85da3cc1b8 | ||
|
|
fd17078a1a | ||
|
|
d5ac143b91 | ||
|
|
2b6f770fbb | ||
|
|
636bfa82a7 | ||
|
|
a2a60f163a | ||
|
|
2d13aeb955 | ||
|
|
8027f078ce | ||
|
|
31bac18a71 | ||
|
|
43ac06ee47 | ||
|
|
2ea8bdb18d | ||
|
|
3581d54bb5 | ||
|
|
8dd4052b1c | ||
|
|
895c37df7d | ||
|
|
fb4e90f5d0 | ||
|
|
2a4b027d35 | ||
|
|
59768ee766 | ||
|
|
4a49ce3774 | ||
|
|
a869bf9d97 | ||
|
|
0051ee2d70 | ||
|
|
17e6ecbee6 | ||
|
|
1e6d4bbb15 | ||
|
|
5f474c0238 | ||
|
|
f22d442cbd | ||
|
|
1d6e5d46fc | ||
|
|
56f900f470 | ||
|
|
4bbe901c00 | ||
|
|
d73e91b947 | ||
|
|
3db0fa1fbe | ||
|
|
8acb76e420 | ||
|
|
df7c9d2d4d | ||
|
|
e53716ba54 | ||
|
|
7ff2675b86 | ||
|
|
46471c878e | ||
|
|
42120c6db3 | ||
|
|
768c0247ca | ||
|
|
8bffe9239a | ||
|
|
d9a9934e2c | ||
|
|
25ae09285a | ||
|
|
38f0cdb4a8 | ||
|
|
8d31e21051 | ||
|
|
68b84b1590 | ||
|
|
be546937be | ||
|
|
a3359f65c5 | ||
|
|
8b3798a5cd | ||
|
|
ff6e1466ef | ||
|
|
7c23b55695 | ||
|
|
908016db95 | ||
|
|
b66a48d0e8 | ||
|
|
4263d6c113 | ||
|
|
568b699a66 | ||
|
|
c4939b8d17 | ||
|
|
cf37143e88 | ||
|
|
5025e1313e | ||
|
|
b4ff690dd4 | ||
|
|
8178c0ed6c | ||
|
|
e411bf27e9 | ||
|
|
bac868243d | ||
|
|
11759c0e39 | ||
|
|
4c5f8d2c6a | ||
|
|
6377917727 | ||
|
|
6470a49143 | ||
|
|
c4ed60ffe4 | ||
|
|
0a495661ec | ||
|
|
ac55c8a332 | ||
|
|
94137658bd | ||
|
|
fabaf19e9b | ||
|
|
5ab9f488ac | ||
|
|
ebd37ef57a | ||
|
|
890f446373 | ||
|
|
af6a19aed6 | ||
|
|
13ae1d14f3 | ||
|
|
3332b8a299 | ||
|
|
6d6737ea18 | ||
|
|
120a8e859f | ||
|
|
d0e8130b62 | ||
|
|
7b21a63ff4 | ||
|
|
71a93464d3 | ||
|
|
1ccaf1f6d9 | ||
|
|
a8aa387a65 | ||
|
|
a694ceed1d | ||
|
|
737d27ccf9 | ||
|
|
1d5b06b8a1 | ||
|
|
2c08ac31b4 | ||
|
|
9639ec0558 | ||
|
|
dfe7bb15a8 | ||
|
|
dc1271edf7 | ||
|
|
4a2b7ce4e4 | ||
|
|
672fd5a07a | ||
|
|
e8fac3c594 | ||
|
|
0219c5969a | ||
|
|
957d8c1f6c | ||
|
|
531bc57abe | ||
|
|
2a6d43a4ae | ||
|
|
6457d13194 | ||
|
|
07d8ae9f2c | ||
|
|
6451d4ad31 | ||
|
|
9f24403500 | ||
|
|
22268a78ab | ||
|
|
abce18903a | ||
|
|
b8c42ab1ad | ||
|
|
5c7475a539 | ||
|
|
624ce26305 | ||
|
|
f4461e8391 | ||
|
|
f948b4d21f | ||
|
|
2debf1290f | ||
|
|
b624491dc7 | ||
|
|
576d6ec306 | ||
|
|
93625fc8ec | ||
|
|
3b856bac0a | ||
|
|
ca0e1c65ca | ||
|
|
2f7f2d89b0 | ||
|
|
16f2ac13e5 | ||
|
|
f1dca4d5de | ||
|
|
d1bd790ed0 | ||
|
|
ccd917fcd6 | ||
|
|
f873a9d93d | ||
|
|
f5c93f23bd | ||
|
|
977418afa9 | ||
|
|
c85d4aa628 | ||
|
|
0c43eb3338 | ||
|
|
3e8a006cd1 | ||
|
|
35f7a5380c | ||
|
|
3e9f5a0d85 | ||
|
|
a9eded8d26 | ||
|
|
80f72d303f | ||
|
|
a4b67cbd38 | ||
|
|
b44a73294b | ||
|
|
be7885c0b7 | ||
|
|
51d33dabd5 | ||
|
|
7e38a78193 | ||
|
|
5055ecf35c | ||
|
|
daf57203d5 | ||
|
|
778256d4e7 | ||
|
|
39ff5146c9 | ||
|
|
c705ee2999 | ||
|
|
22b3d1cc1b | ||
|
|
3d355098c5 | ||
|
|
8814e2b50c | ||
|
|
9113cece30 | ||
|
|
1d92374cce |
@@ -16,8 +16,8 @@ ContentProposalAdapterExtended.close=\u9589\u3058\u308B
|
||||
ContentProposalAdapterExtended.closeFocusout=Focusout\u3092\u9589\u3058\u308B
|
||||
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0}) \u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3001\u5FC5\u8981\u3067\u3042\u308C\u3070\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u306E\u30B3\u30D4\u30FC
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u6570\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
DateDialog.textContent=\u65E5\u4ED8\u3068\u6642\u9593\u306E\u9078\u629E
|
||||
DefaultCellModifier.tableItemDispose=\u7834\u68C4\u3055\u308C\u305F\u30C6\u30FC\u30D6\u30EB\u9805\u76EE
|
||||
DialogErrorForCellEditorListener.Error.MsgDialogTitle=\u30A8\u30E9\u30FC
|
||||
|
||||
@@ -45,3 +45,5 @@ VersionUtils.readPropertyFileError=Erreur de lecture de propri\u00E9t\u00E9 dans
|
||||
AS400ResultSet.unknowCloumn=Argument invalide\: nom de colonne inconnu
|
||||
AS400ResultSet.parameterIndex=Argument invalide\: index du param\u00E8tre
|
||||
AS400ResultSet.outofRange=\ est hors de la plage.
|
||||
TalendProxySelector.exception.badUriMap=URI du mapping invalide\u00A0: {0}
|
||||
TalendProxySelector.exception.proxySelectionError=Erreur lors de la s\u00E9lection du proxy pour {0}
|
||||
|
||||
@@ -12,7 +12,7 @@ ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard
|
||||
SelectContextVariablesPushButton.Label=Select context variables
|
||||
ExtendedTableModel.ModifiedObject.Error=ModifiedBeanListenable object must be set before use this method
|
||||
ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file
|
||||
LabelledFileField.FileDialog.Text=Select a
|
||||
LabelledFileField.FileDialog.Text=Select a
|
||||
ModelSelectionDialog.Option=option
|
||||
ModelSelectionDialog.Update=Update repository connection.
|
||||
TableViewerCreator.Table.BeNull=table is null
|
||||
@@ -33,10 +33,10 @@ ModelSelectionDialog.ViewSchema=View schema (read only).
|
||||
LabelledFileField.BrowseButton.Text=Browse...
|
||||
ModelSelectionDialog.ViewQuery=View query (read only).
|
||||
MoveUpPushButton.MoveUpButton.Tip=Move up selected items
|
||||
AccessorUtils.Assert1=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly or the value set has not the correct type.
|
||||
AccessorUtils.Assert1=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly or the value set has not the correct type.
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ColorStyledText.CopyItem.Text=Copy
|
||||
AccessorUtils.Assert0=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly. {2} is required for bean <B>
|
||||
AccessorUtils.Assert0=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly. {2} is required for bean <B>
|
||||
ExtendedTableMoveCommand.MoveLabel=Move up or down, one or more table entries
|
||||
CopyPushButton.CopyButton.Tip=Copy selected items
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults
|
||||
@@ -55,7 +55,7 @@ DialogErrorForCellEditorListener.Error.MsgDialogTitle=Error
|
||||
ExportPushButton.ExportButton.Tip=Export all rows into XML file
|
||||
TableViewerCreator.CellModifier.ExError=The current CellModifier does'nt support this operation. \n Use '{0}' or a class which extends it to use this feature
|
||||
Curve2D.MinNum.Be0=minimumSegments be must positive or 0
|
||||
ModeReader.IgnoreElement=Ignore unknown element
|
||||
ModeReader.IgnoreElement=Ignore unknown element
|
||||
Curve2D.MaxNum.Be0=maximumSegments must be positive or 0
|
||||
CellEditorDialogBehavior.textContent=...
|
||||
CellEditorValueAdapterFactory.valueNotStringType=Bean value should be a class of String type \!
|
||||
|
||||
@@ -34,7 +34,7 @@ EConnectionType.onSubjobOkMenu=On Subjob Ok
|
||||
CorePreferencePage.groupBySource="Group by source" in context
|
||||
EConnectionType.onSubjobErrorMenu=On Subjob Error
|
||||
RepositoryUpdateManager.ItemsToUpdate=Check items to update
|
||||
SelectRepositoryContextDialog.Label=Select variables from repository contexts.
|
||||
SelectRepositoryContextDialog.Label=Select variables from repository contexts.
|
||||
EMetadataEncoding.Greek=Greek
|
||||
EMetadataEncoding.UTF16BE=Unicode BigEndian (16 bit)
|
||||
EConnectionType.synchronize=Synchronize
|
||||
@@ -46,13 +46,13 @@ EUpdateItemType.Components=Components
|
||||
EConnectionType.mergeMenu=Merge
|
||||
RepositoryUpdateManager.RenameContextTitle=Rename Question
|
||||
EUpdateItemType.Schema=Schema
|
||||
ContextValueErrorChecker.ErrorTitile=Context value error:
|
||||
ContextValueErrorChecker.ErrorTitile=Context value error:
|
||||
EMetadataEncoding.UTF8=Unicode 2.0 UTF-8
|
||||
EMetadataEncoding.UTF7=Unicode 2.0 UTF-7
|
||||
RepositoryUpdateManager.RenameContextMessages=Do you really want to propagate the rename variable to all jobs now? \n\n If yes, it might be quite long time to update.\n\n If no, the old variables will be change to built-in in the job.
|
||||
EUpdateItemType.Query=Query
|
||||
ExtractMetaDataFromDataBase.SchemaNoPresent=Schema not present in Database
|
||||
SelectRepositoryContextDialog.DuplicationMessage=You have selected the variable "{0}" in the Context "{1}".
|
||||
SelectRepositoryContextDialog.DuplicationMessage=You have selected the variable "{0}" in the Context "{1}".
|
||||
UpdatesConstants.Component=Component
|
||||
CorePreferencePage.perlInterpreter=Perl interpreter
|
||||
EMetadataEncoding.GB18030=Chinese National Standard
|
||||
@@ -82,7 +82,7 @@ EMetadataEncoding.Latin1=Latin1 (West European)
|
||||
ContextProcessSection.51=ContextProcessSection.15
|
||||
EMetadataEncoding.UTF16=Unicode 2.0 (16 bit)
|
||||
ContextProcessSection.50=ContextProcessSection.14
|
||||
CorePreferencePage.temporaryFiles=&Temporary files
|
||||
CorePreferencePage.temporaryFiles=&Temporary files
|
||||
EUpdateResult.Reload=Reload components
|
||||
RepositoryUpdateManager.Title=Modification
|
||||
ContextProcessSection.49=Default Context
|
||||
@@ -227,7 +227,7 @@ UpdatesConstants.JobVersion=JobVersion
|
||||
ProposalUtils.CellProposal.Error=Proposal of this type of CellEditor is unsupported \:
|
||||
ProposalUtils.CtrlProposal.ErrorMsg=Proposal for this type of Control is unsupported \:
|
||||
HTMLDocGenerator_generate_document=Generated documentation
|
||||
HTMLDocGenerator.author=AUTHOR
|
||||
HTMLDocGenerator.author=Author
|
||||
HTMLDocGenerator.author1=Author
|
||||
HTMLDocGenerator.column=Column
|
||||
HTMLDocGenerator.comment=Comment
|
||||
|
||||
@@ -49,7 +49,7 @@ EUpdateItemType.Schema=\u30B9\u30AD\u30FC\u30DE
|
||||
ContextValueErrorChecker.ErrorTitile=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5024\u30A8\u30E9\u30FC:
|
||||
EMetadataEncoding.UTF8=Unicode 2.0 UTF-8
|
||||
EMetadataEncoding.UTF7=Unicode 2.0 UTF-7
|
||||
RepositoryUpdateManager.RenameContextMessages=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u5168\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \\n\\n [\u306F\u3044]\u3092\u9078\u629E\u3057\u305F\u5834\u5408\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\\n\\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
|
||||
RepositoryUpdateManager.RenameContextMessages=\u540D\u524D\u5909\u66F4\u306E\u5909\u6570\u3092\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u4ECA\u3059\u3050\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B? \\n\\n [\u306F\u3044]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\\n\\n [\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
|
||||
EUpdateItemType.Query=\u30AF\u30A8\u30EA
|
||||
ExtractMetaDataFromDataBase.SchemaNoPresent=\u30B9\u30AD\u30FC\u30DE\u304C\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306B\u5B58\u5728\u3057\u307E\u305B\u3093
|
||||
SelectRepositoryContextDialog.DuplicationMessage=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8"{1}"\u3067\u5909\u6570"{0}"\u3092\u9078\u629E\u3057\u307E\u3057\u305F\u3002
|
||||
|
||||
@@ -164,7 +164,7 @@ FunctionManager.PurePerl.ParaName=customize parameter
|
||||
GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been registered.
|
||||
GroupByContextAction.groupContext=Group by Context
|
||||
GroupByVariableAction.groupVariable=Group by Variable
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\\" parse failed. please check your the Method.
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\" parse failed. please check your the Method.
|
||||
JavaGlobalVariableProposal.Description=Description\: {0}
|
||||
JavaGlobalVariableProposal.VariableName=\n\nVariable Name\: {1}
|
||||
JavaSimpleDateFormatProposalProvider.displaySingleQuote=\ ' : Display a single quote
|
||||
@@ -243,10 +243,10 @@ NodeReturnProposal.VariableName=\n\nVariable Name\: {5}
|
||||
PaletteContentDialog.connection=Format connection default:
|
||||
PaletteContentDialog.hint=Format hint default:
|
||||
PaletteContentDialog.lable=Format label default:
|
||||
Parameter.Comment=\ comment \:
|
||||
Parameter.Comment= comment :
|
||||
Parameter.Name=Parameter name
|
||||
Parameter.Type=\ type \:
|
||||
Parameter.Value=\ value \:
|
||||
Parameter.Type= type :
|
||||
Parameter.Value= value :
|
||||
PatternCalendar.dateFormat="yyyy-MM-dd HH:mm:ss"
|
||||
PatternCalendar.example=Example:
|
||||
PatternCalendar.pattern=Pattern:
|
||||
@@ -292,7 +292,6 @@ RepositoryUpdateManager.NoModificationTitle=No modification needed
|
||||
RepositoryUpdateManager.NoModificationMessages=There is no modification needed for update.
|
||||
RepositoryUpdateManager.NotFoundMessages=There is no relationship to find.
|
||||
RepositoryUpdateManager.NotFoundTitle=Not Found
|
||||
RepositoryUpdateManager.RenameContextMessages=Do you really want to propagate the rename variable to all jobs now? \n\n If yes, it might be quite long time to update.\n\n If no, the old variables will be change to built-in in the job.
|
||||
RepositoryUpdateManager.RenameContextTitle=Rename Question
|
||||
RepositoryUpdateManager.ItemsToUpdate=Check items to update
|
||||
RoutinesFunctionProposal.CreatedBy=Created By\:
|
||||
@@ -332,7 +331,7 @@ SelectRepositoryContextDialog.ExpandAll=Expand All
|
||||
SelectRepositoryContextDialog.Title=Select Context Variables
|
||||
SelectRepositoryContextDialog.View=View...
|
||||
SelectRepositoryContextGroupDialog.Default=default
|
||||
SelectRepositoryContextGroupDialog.Messages=\ In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Messages= In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Title=Add Context Group
|
||||
TalendDataCollectorPreferencePage_EnableCapture=Enable capture
|
||||
TalendDataCollectorPreferencePage_Description=The Usage Data Collector collects information about how individuals are using the Talend products. The intent is to use this data to help Talend better understand how users and organizations are using Talend products.
|
||||
@@ -519,7 +518,7 @@ HadoopVersionDialog.zipLocation=Zip:
|
||||
HadoopVersionDialog.importFromZip=Import from zip
|
||||
HadoopVersionDialog.title=Import custom definition
|
||||
HadoopVersionDialog.distribution=Distribution:
|
||||
HadoopVersionDialog.distribution.tooltip=Set the hadoop distribution
|
||||
HadoopVersionDialog.distribution.tooltip=Set the Hadoop distribution
|
||||
HadoopVersionDialog.version=Version:
|
||||
HadoopVersionDialog.version.tooltip=Set the distribution version
|
||||
HadoopVersionDialog.browseBtn=B&rowse...
|
||||
@@ -635,3 +634,5 @@ RepositoryUpdateManager.job.title=Updating items...
|
||||
BigDataBasicUtil.loadDynamicDistribution.IDynamicDistributionManager.notFound=Instance of {0} not found
|
||||
ComponentToRepositoryProperty.ImpossibleUseWALLET=Impossible to use WALLET type in the repository\!
|
||||
TalendLibsServerManager.connectUserLibraryFailureMessage=The user libraries artifact repository set in administrator cannot connect: Connection to {0} refused
|
||||
TalendLibsServerManager.cannotGetUserLibraryServer=Cannot get the user library server from remote administrator
|
||||
RepositoryUpdateManager.RenameContextMessagesNoBuiltIn=Do you really want to propagate the rename variable to all jobs now? \n\n If yes, it might be quite long time to update.
|
||||
|
||||
@@ -269,7 +269,6 @@ RepositoryUpdateManager.NoModificationTitle=Aucune modification n\u00E9cessaire
|
||||
RepositoryUpdateManager.NoModificationMessages=Aucune modification n\u00E9cessaire pour effectuer la mise \u00E0 jour.
|
||||
RepositoryUpdateManager.NotFoundMessages=Aucune relation \u00E0 trouver.
|
||||
RepositoryUpdateManager.NotFoundTitle=Introuvable
|
||||
RepositoryUpdateManager.RenameContextMessages=Voulez-vous vraiment propager la variable renomm\u00E9e \u00E0 tous les Jobs ? \n\nSi oui, la mise \u00E0 jour peut prendre un moment. \n\n Si non, les anciennes variables seront pass\u00E9es en Built-In dans les Jobs.
|
||||
RepositoryUpdateManager.RenameContextTitle=Renommer la question
|
||||
RepositoryUpdateManager.ItemsToUpdate=V\u00E9rification des \u00E9l\u00E9ments \u00E0 mettre \u00E0 jour
|
||||
RoutinesFunctionProposal.CreatedBy=Cr\u00E9\u00E9 par\n:
|
||||
@@ -565,3 +564,4 @@ EUpdateItemType.StructurePath=Chemin de la structure
|
||||
EComponentCategory_deployment=D\u00E9ploiement
|
||||
DynamicElement.incorrectInstance=L'objet JSON n'est pas une instance de {0} : {1}
|
||||
EComponentCategory_advanceSetting=Param\u00E8tres avanc\u00E9s
|
||||
TalendLibsServerManager.connectUserLibraryFailureMessage=\u00C9chec de la connexion au r\u00E9f\u00E9rentiel d\'artefacts des bilioth\u00E8ques utilisateurs configur\u00E9 en tant qu\'administrateur\u00A0: Connexion \u00E0 {0} refus\u00E9e.
|
||||
|
||||
@@ -292,7 +292,6 @@ RepositoryUpdateManager.NoModificationTitle=\u5909\u66F4\u306E\u5FC5\u8981\u306F
|
||||
RepositoryUpdateManager.NoModificationMessages=\u66F4\u65B0\u304C\u5FC5\u8981\u306A\u5BFE\u8C61\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
RepositoryUpdateManager.NotFoundMessages=\u30EA\u30EC\u30FC\u30B7\u30E7\u30F3\u30B7\u30C3\u30D7\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
|
||||
RepositoryUpdateManager.NotFoundTitle=\u898B\u3064\u304B\u308A\u307E\u305B\u3093
|
||||
RepositoryUpdateManager.RenameContextMessages=\u540D\u524D\u5909\u66F4\u5909\u6570\u3092\u4ECA\u3059\u3050\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B?[\u306F\u3044]\u3092\u9078\u629E\u3057\u305F\u5834\u5408\u3001\u66F4\u65B0\u306B\u975E\u5E38\u306B\u9577\u3044\u6642\u9593\u304C\u304B\u304B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002[\u3044\u3044\u3048]\u3092\u9078\u629E\u3059\u308B\u3068\u3001\u53E4\u3044\u5909\u6570\u304C\u30B8\u30E7\u30D6\u5185\u3067\u7D44\u307F\u8FBC\u307F\u306B\u5909\u308F\u308A\u307E\u3059\u3002
|
||||
RepositoryUpdateManager.RenameContextTitle=\u8CEA\u554F\u306E\u540D\u79F0\u5909\u66F4
|
||||
RepositoryUpdateManager.ItemsToUpdate=\u66F4\u65B0\u3059\u308B\u9805\u76EE\u3092\u30C1\u30A7\u30C3\u30AF
|
||||
RoutinesFunctionProposal.CreatedBy=\u4F5C\u6210:
|
||||
|
||||
@@ -292,7 +292,6 @@ RepositoryUpdateManager.NoModificationTitle=\u6CA1\u6709\u9700\u8981\u7684\u4FEE
|
||||
RepositoryUpdateManager.NoModificationMessages=\u6CA1\u6709\u66F4\u65B0\u6240\u9700\u7684\u4FEE\u6539\u3002
|
||||
RepositoryUpdateManager.NotFoundMessages=\u6CA1\u6709\u53EF\u5BFB\u627E\u7684\u5173\u7CFB\u3002
|
||||
RepositoryUpdateManager.NotFoundTitle=\u627E\u4E0D\u5230
|
||||
RepositoryUpdateManager.RenameContextMessages=\u662F\u5426\u786E\u5B9A\u8981\u7ACB\u5373\u5C06\u91CD\u547D\u540D\u7684\u53D8\u91CF\u4F20\u64AD\u5230\u6240\u6709\u7684\u4F5C\u4E1A\uFF1F\\n\\n \u5982\u679C\u662F\uFF0C\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\u8FDB\u884C\u66F4\u65B0\u3002\\n\\n \u5982\u679C\u4E0D\u662F\uFF0C\u65E7\u7684\u53D8\u91CF\u5C06\u6539\u4E3A\u5185\u7F6E\u4E8E\u4F5C\u4E1A\u4E2D\u3002
|
||||
RepositoryUpdateManager.RenameContextTitle=\u91CD\u547D\u540D\u95EE\u9898
|
||||
RepositoryUpdateManager.ItemsToUpdate=\u68C0\u67E5\u8981\u66F4\u65B0\u7684\u9879\u76EE
|
||||
RoutinesFunctionProposal.CreatedBy=\u521B\u5EFA\u4EBA:
|
||||
|
||||
@@ -21,8 +21,8 @@ ContextParameterProposal.ContextVariable=\n\nContext variable.
|
||||
ContextParameterProposal.Description=Description: {0}
|
||||
ContextValueErrorChecker.ErrorTitile=Context value error:
|
||||
ContextParameterProposal.NoCommentAvaiable=no comment available.
|
||||
ContextParameterProposal.Type=\nType\: {1}
|
||||
ContextParameterProposal.VariableName=\n\nVariable Name\: {2}
|
||||
ContextParameterProposal.Type=\nType: {1}
|
||||
ContextParameterProposal.VariableName=\n\nVariable Name: {2}
|
||||
ContextProcessSection.1=menuTable
|
||||
ContextProcessSection.12=Rename Context
|
||||
ContextProcessSection.13=Give a new name for the context {0}
|
||||
@@ -81,7 +81,7 @@ EComponentCategory_technical=Technical
|
||||
EComponentCategory_version=Version
|
||||
EComponentCategory_headerFooter=Header/Footer
|
||||
EComponentCategory_view=View
|
||||
EComponentCategory.advancedSettings=Advanced settings
|
||||
EComponentCategory.advancedSettings=Advanced Settings
|
||||
EComponentCategory.basicRun=Basic Run
|
||||
EComponentCategory.breakpoint=Breakpoint
|
||||
EComponentCategory.debugRun=Debug Run
|
||||
@@ -132,9 +132,9 @@ FunctionManager.PurePerl.ParaName=customize parameter
|
||||
GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been registered.
|
||||
GroupByContextAction.groupContext=Group by Context
|
||||
GroupByVariableAction.groupVariable=Group by Variable
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\\" parse failed. please check your the Method.
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\" parse failed. please check your the Method.
|
||||
JavaGlobalVariableProposal.Description=Description\: {0}
|
||||
JavaGlobalVariableProposal.VariableName=\n\nVariable Name\: {1}
|
||||
JavaGlobalVariableProposal.VariableName=\n\nVariable Name: {1}
|
||||
JavaSimpleDateFormatProposalProvider.displaySingleQuote=\ ' : Display a single quote
|
||||
JavaSimpleDateFormatProposalProvider.quoteDisplayError=Two single quotes display only one single quote
|
||||
JavaTypesManager.bigDecimal=BIGDECIMAL is number:
|
||||
@@ -201,11 +201,11 @@ MetadataTool.schemaExist=The schema name aready exists.
|
||||
MetadataTool.schemaIn=The schema name is invalid.
|
||||
MetadataTool.schemaInvalid=Schema name is invalid.
|
||||
MetadataTool.schemaNull=Schema name is null.
|
||||
NodeReturnProposal.Availability=\nAvailability\: {4}
|
||||
NodeReturnProposal.Description=Description\: {0}
|
||||
NodeReturnProposal.Availability=\nAvailability: {4}
|
||||
NodeReturnProposal.Description=Description: {0}
|
||||
NodeReturnProposal.GlobalVariable=\n\nGlobal variable, property of component {1} [{2}].
|
||||
NodeReturnProposal.Type=\nType\: {3}
|
||||
NodeReturnProposal.VariableName=\n\nVariable Name\: {5}
|
||||
NodeReturnProposal.Type=\nType: {3}
|
||||
NodeReturnProposal.VariableName=\n\nVariable Name: {5}
|
||||
PaletteContentDialog.connection=Format connection default:
|
||||
PaletteContentDialog.hint=Format hint default:
|
||||
PaletteContentDialog.lable=Format label default:
|
||||
@@ -260,12 +260,12 @@ RepositoryUpdateManager.NotFoundTitle=Not Found
|
||||
RepositoryUpdateManager.RenameContextMessages=Do you really want to propagate the renamed variable to all jobs now? \n\n If yes, it might take a long time to update.\n\n If no, the old variables will be changed to built-in in the job.
|
||||
RepositoryUpdateManager.RenameContextTitle=Rename Question
|
||||
RepositoryUpdateManager.ItemsToUpdate=Check items to update
|
||||
RoutinesFunctionProposal.CreatedBy=Created By\:
|
||||
RoutinesFunctionProposal.Description=Description\:
|
||||
RoutinesFunctionProposal.ReturnType=Return Type\:
|
||||
RoutinesFunctionProposal.CreatedBy=Created By:
|
||||
RoutinesFunctionProposal.Description=Description:
|
||||
RoutinesFunctionProposal.ReturnType=Return Type:
|
||||
RoutinesFunctionProposal.System=System
|
||||
RoutinesFunctionProposal.User=User
|
||||
RoutinesFunctionProposal.VariableName=\n\nVariable Name\: {2}
|
||||
RoutinesFunctionProposal.VariableName=\n\nVariable Name: {2}
|
||||
RuleOperationChoiceDialog.editRules=Edit Rules
|
||||
RuleOperationChoiceDialog.rule=Rule:
|
||||
RuleOperationChoiceDialog.selectRulesFile=Select a rule from file
|
||||
@@ -296,7 +296,7 @@ SelectRepositoryContextDialog.ExpandAll=Expand All
|
||||
SelectRepositoryContextDialog.Title=Select Context Variables
|
||||
SelectRepositoryContextDialog.View=View...
|
||||
SelectRepositoryContextGroupDialog.Default=default
|
||||
SelectRepositoryContextGroupDialog.Messages=\ In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Messages= In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Title=Add Context Group
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=compact view
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=table view
|
||||
|
||||
@@ -541,4 +541,5 @@ EComponentCategory_advanceSetting=Param\u00E8tres avanc\u00E9s
|
||||
I18nPreferencePage.needRestart=Langage local (red\u00E9marrage requis)
|
||||
I18nPreferencePage.restart=Red\u00E9marrer
|
||||
I18nPreferencePage.wait_process=Le processus va prendre plusieurs minutes, patientez...
|
||||
MetadataPreferencePage.EnableBasic.name=Autorise l\'en-t\u00EAte d\'authentification simple
|
||||
MetadataPreferencePage.MessageDialog.Restart=Le Studio doit red\u00E9marrer pour que ce param\u00E8tre soit pris en compte.\\n\u00CAtes-vous s\u00FBr(e)\u00A0?
|
||||
|
||||
@@ -502,7 +502,7 @@ TalendDataCollectorUploadingPreferencePage_UploadPeriod=\u30A2\u30C3\u30D7\u30ED
|
||||
TalendDataCollectorUploadingPreferencePage_Days=\u65E5\u6570
|
||||
repository.servicesOperation=\u6F14\u7B97\u5B50
|
||||
repository.servicesPort=\u30DD\u30FC\u30C8
|
||||
RepositoryUpdateManager.MessagesForTDQ=\u5909\u66F4\u3092\u5168\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B?\\n\u4E00\u90E8\u306E\u5206\u6790\u4F9D\u5B58\u6027\u306E\u60C5\u5831\u304C\u5931\u308F\u308C\u307E\u3059\u3002\\n\u3053\u306E\u51E6\u7406\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
RepositoryUpdateManager.MessagesForTDQ=\u5909\u66F4\u3092\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u306B\u30D7\u30ED\u30D1\u30B2\u30FC\u30C8\u3057\u307E\u3059\u304B?\\n\u4E00\u90E8\u306E\u5206\u6790\u4F9D\u5B58\u6027\u306E\u60C5\u5831\u304C\u5931\u308F\u308C\u307E\u3059\u3002\\n\u3053\u306E\u51E6\u7406\u306B\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
EComponentCategory.executeJob=\u30B8\u30E7\u30D6\u5B9F\u884C
|
||||
EComponentCategory.monitoring=\u30E2\u30CB\u30BF\u30FC
|
||||
BinRepositoryNode.label=\u3054\u307F\u7BB1
|
||||
|
||||
@@ -9,7 +9,9 @@ ProjectPomProjectSettingPage_ConfirmTitle=Confirm
|
||||
ProjectPomProjectSettingPage_ConfirmMessage=Will apply and update for project POM with modifications immediately.
|
||||
ProjectPomProjectSettingPage_FilterPomLabel=Filter to use to generate poms:
|
||||
ProjectPomProjectSettingPage_FilterErrorMessage=Filter is invalid.
|
||||
ProjectPomProjectSettingPage.syncAllPomsButtonText=Force full re-synchronize poms
|
||||
ProjectPomProjectSettingPage.syncAllPomsButtonText=Force full re-synchronize POMs
|
||||
AbstractPersistentProjectSettingPage.syncAllPoms=Do you want to update all poms? \n This operation might take long time depends on your project size.
|
||||
MavenProjectSettingPage.filterExampleMessage=Filter examples:\nlabel=myJob \t\t\t\t=> Generate only the job named "myJob"\n!(label=myJob) \t\t\t\t=> Generate any job except the one named "myJob"\n(path=folder1/folder2) \t\t\t=> Generate any job in the folder "folder1/folder2"\n(path=folder1/folder2)or(label=myJob)\t=> Generate any job in the folder "folder1/folder2" or named "myJob"\n(label=myJob)and(version=0.2)\t\t=> Generate only the job named "myJob" with version 0.2\n!((label=myJob)and(version=0.1))\t\t=> Generate every jobs except the "myJob" version 0.1
|
||||
MavenProjectSettingPage.refModuleText=Set reference project modules in profile
|
||||
MavenProjectSettingPage.excludeDeletedItems=Exclude deleted items
|
||||
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize POMs button to apply the new settings.
|
||||
|
||||
@@ -4,4 +4,7 @@ FolderMavenSettingPage_CreatingMavenSettingPath=Chemin :
|
||||
FolderMavenSettingPage_CreatingMavenSettingErrorTitle=Erreur
|
||||
ProjectPomProjectSettingPage_Titile=NOTE\: Les modules et les d\u00E9pendances seront conserv\u00E9s.
|
||||
ProjectPomProjectSettingPage_ConfirmTitle=Confirmer
|
||||
ProjectPomProjectSettingPage.syncAllPomsButtonText=Forcer la resynchronisation des POM
|
||||
AbstractPersistentProjectSettingPage.syncAllPoms=Mettre \u00E0 jour tous les fichiers pom ? \n Cette op\u00E9ration peut prendre du temps selon la taille de votre projet.
|
||||
MavenProjectSettingPage.refModuleText=Configurer les modules du projet de r\u00E9f\u00E9rence dans le profil
|
||||
MavenProjectSettingPage.syncAllPomsWarning=Cliquez sur le bouton Forcer la resynchronisation des POM pour appliquer les nouveaux param\u00E8tres.
|
||||
|
||||
@@ -13,3 +13,4 @@ ProjectPomProjectSettingPage.syncAllPomsButtonText=POM\u306E\u5168\u518D\u540C\u
|
||||
AbstractPersistentProjectSettingPage.syncAllPoms=\u3059\u3079\u3066\u306EPOM\u3092\u66F4\u65B0\u3057\u307E\u3059\u304B? \\n \u3053\u306E\u64CD\u4F5C\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30B5\u30A4\u30BA\u306B\u3088\u3063\u3066\u306F\u6642\u9593\u304C\u304B\u304B\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
MavenProjectSettingPage.filterExampleMessage=\u30D5\u30A3\u30EB\u30BF\u30FC\u306E\u4F8B:\\nlabel=myJob \\t\\t\\t\\t=> \"myJob\"\u3068\u3044\u3046\u540D\u524D\u306E\u30B8\u30E7\u30D6\u306E\u307F\u3092\u751F\u6210\\n!(label=myJob) \\t\\t\\t\\t=> \"myJob\"\u3068\u3044\u3046\u540D\u524D\u306E\u30B8\u30E7\u30D6\u3092\u9664\u304D\u3001\u3042\u3089\u3086\u308B\u30B8\u30E7\u30D6\u3092\u751F\u6210\\n(path=folder1/folder2) \\t\\t\\t=> \u30D5\u30A9\u30EB\u30C0\u30FC\"folder1/folder2\"\u5185\u306B\u4EFB\u610F\u306E\u30B8\u30E7\u30D6\u3092\u751F\u6210\\n(path=folder1/folder2)or(label=myJob)\\t=> \u30D5\u30A9\u30EB\u30C0\u30FC\"folder1/folder2\"\u5185\u306B\u4EFB\u610F\u306E\u30B8\u30E7\u30D6\u3092\u3001\u307E\u305F\u306F\"myJob\"\u3068\u3044\u3046\u540D\u524D\u306E\u30B8\u30E7\u30D6\u3092\u751F\u6210\\n(label=myJob)and(version=0.2)\\t\\t=> \u30D0\u30FC\u30B8\u30E7\u30F30.2\u3067\"myJob\"\u3068\u3044\u3046\u540D\u524D\u306E\u30B8\u30E7\u30D6\u306E\u307F\u3092\u751F\u6210\\n!((label=myJob)and(version=0.1))\\t\\t=> \"myJob\"\u30D0\u30FC\u30B8\u30E7\u30F30.1\u3092\u9664\u304D\u3001\u3059\u3079\u3066\u306E\u30B8\u30E7\u30D6\u3092\u751F\u6210
|
||||
MavenProjectSettingPage.refModuleText=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u53C2\u7167\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8A2D\u5B9A
|
||||
MavenProjectSettingPage.syncAllPomsWarning=[POM\u306E\u5168\u518D\u540C\u671F\u3092\u5F37\u5236]\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3001\u65B0\u3057\u3044\u8A2D\u5B9A\u3092\u9069\u7528\u3057\u307E\u3059\u3002
|
||||
|
||||
@@ -23,3 +23,6 @@ modules.required=Requis pour utiliser ce composant.
|
||||
ShareLibsJob.message=Partager les biblioth\u00E8ques de Maven vers le serveur {0}
|
||||
ShareLibsJob.sharingLibraries=Partage des biblioth\u00E8ques : {0}
|
||||
ExtensionModuleManager.moduleGroup.cycleReference=Module group {0} was cycle referenced!
|
||||
NexusRepository.checkConnection.successMsg=Connexion \u00E9tablie.
|
||||
NexusRepository.checkConnection.invalidParam=Param\u00E8tre Nexus invalide.
|
||||
ShareLibsJob.monitor.cancelled=Annulation utilisateur.
|
||||
|
||||
@@ -25,3 +25,4 @@ ShareLibsJob.sharingLibraries=\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u5171\u6709:
|
||||
ExtensionModuleManager.moduleGroup.cycleReference=\u30E2\u30B8\u30E5\u30FC\u30EB\u30B0\u30EB\u30FC\u30D7{0}\u306F\u5FAA\u74B0\u53C2\u7167\u3055\u308C\u307E\u3057\u305F!
|
||||
NexusRepository.checkConnection.successMsg=\u63A5\u7D9A\u6210\u529F\u3002
|
||||
NexusRepository.checkConnection.invalidParam=Nexus\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u304C\u7121\u52B9\u3067\u3059\u3002
|
||||
ShareLibsJob.monitor.cancelled=\u30E6\u30FC\u30B6\u30FC\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002
|
||||
|
||||
@@ -25,3 +25,4 @@ ShareLibsJob.sharingLibraries=\u6B63\u5728\u5171\u4EAB\u5E93\uFF1A{0}
|
||||
ExtensionModuleManager.moduleGroup.cycleReference=\u6A21\u5757\u7EC4 {0} \u662F\u5FAA\u73AF\u5F15\u7528\u7684\uFF01
|
||||
NexusRepository.checkConnection.successMsg=\u8FDE\u63A5\u6210\u529F\u3002
|
||||
NexusRepository.checkConnection.invalidParam=\u65E0\u6548\u7684 Nexus \u53C2\u6570\u3002
|
||||
ShareLibsJob.monitor.cancelled=\u7528\u6237\u5DF2\u53D6\u6D88\u3002
|
||||
|
||||
@@ -118,3 +118,4 @@ ConfigModuleDialog.install.message=Install a module : {0}
|
||||
download.external.dialog.warning=Warning
|
||||
download.external.dialog.message=Select at least one module not installed.
|
||||
DownloadModuleRunnable.jar.download.failed=The Download failed for the following jars {0}
|
||||
InstallModuleDialog.error.invalidDefaultMvnURI=Can't generate default MVN URI.
|
||||
|
||||
@@ -150,7 +150,7 @@ FunctionManager.PurePerl.ParaName=customize parameter
|
||||
GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been registered.
|
||||
GroupByContextAction.groupContext=Group by Context
|
||||
GroupByVariableAction.groupVariable=Group by Variable
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\\" parse failed. please check your the Method.
|
||||
JavaFunctionParser.checkMethod=Routines : "{0}.{1}\" parse failed. please check your the Method.
|
||||
JavaGlobalVariableProposal.Description=Description\: {0}
|
||||
JavaGlobalVariableProposal.VariableName=\n\nVariable Name\: {1}
|
||||
JavaSimpleDateFormatProposalProvider.displaySingleQuote=\ ' : Display a single quote
|
||||
@@ -320,7 +320,7 @@ SelectRepositoryContextDialog.ExpandAll=Expand All
|
||||
SelectRepositoryContextDialog.Title=Select Context Variables
|
||||
SelectRepositoryContextDialog.View=View...
|
||||
SelectRepositoryContextGroupDialog.Default=default
|
||||
SelectRepositoryContextGroupDialog.Messages=\ In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Messages= In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Title=Add Context Group
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=compact view
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=table view
|
||||
|
||||
@@ -325,7 +325,6 @@ SelectorTableForm.TableType=\u03A4\u03CD\u03C0\u03BF\u03C2
|
||||
SelectorTableForm.groupTableSettings=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03A3\u03C7\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03B4\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1
|
||||
SelectorTableForm.selectAllTables=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u038C\u03BB\u03C9\u03BD
|
||||
SelectorTableForm.selectNoneTables=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u039A\u03B1\u03BD\u03B5\u03BD\u03CC\u03C2
|
||||
ShowAddedContextdialog.Title=\u03A0\u03C1\u03BF\u03C3\u03C4\u03B9\u03B8\u03AD\u03BD \u03C0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF
|
||||
ShowAddedContextdialog.Variables=\u039C\u03B5\u03C4\u03B1\u03B2\u03BB\u03B7\u03C4\u03AD\u03C2
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=\u0394\u03B9\u03B1\u03BA\u03BF\u03C0\u03AE \u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7\u03C2
|
||||
TableWizard.windowTitle=\u03A3\u03C7\u03AE\u03BC\u03B1
|
||||
|
||||
@@ -105,7 +105,7 @@ DatabaseTableFilterForm.view=VIEW
|
||||
DatabaseTableForm.AddTable=Add Schema
|
||||
DatabaseTableForm.checkConnection=Check Connection
|
||||
DatabaseTableForm.comment=Comment
|
||||
DatabaseTableForm.connectionFailure=Database connection failure \: "Retrieve Shema" is disable. Press "Check Connection" to restore the situation.
|
||||
DatabaseTableForm.connectionFailure=Database connection failure : "Retrieve Shema" is disable. Press "Check Connection" to restore the situation.
|
||||
DatabaseTableForm.connectionFailureTip=Connection failure, check the database settings or contact your database administrator.
|
||||
DatabaseTableForm.connectionIsDone=Connection successful.
|
||||
DatabaseTableForm.getDetailedSchema=Push this button to get a detailed schema.
|
||||
@@ -126,7 +126,7 @@ DatabaseTableForm.guessSchema=Guess Schema
|
||||
DatabaseTableForm.streamDetach=Stream Detach
|
||||
DatabaseTableForm.table=Based on table
|
||||
DatabaseTableForm.tableColumnText.talbe=Table
|
||||
DatabaseTableForm.tableNoExist=Database connection successful but no table exist \: "Retrieve Shema" is disabled.\nUse a SGBD to create tables and click on "Check Connection" to restore the situation.
|
||||
DatabaseTableForm.tableNoExist=Database connection successful but no table exist : "Retrieve Shema" is disabled.\nUse a SGBD to create tables and click on "Check Connection" to restore the situation.
|
||||
DatabaseTableForm.tableTip=Choose a table and use the Retrieve Button or define the Schema manually.
|
||||
DatabaseTableForm.type=Type \: {0}
|
||||
DatabaseTableForm.typeTable=Type \: TABLE
|
||||
@@ -404,8 +404,6 @@ SelectorTableForm.selectAllTables=Select All
|
||||
SelectorTableForm.selectNoneTables=Select None
|
||||
ShadowProcessHelper.logError.previewIsNull01=\nThe ShadowProcess use to extract data or metadata on a File don't run.
|
||||
ShadowProcessHelper.logError.previewIsNull02=\nConfigurationElementsFor("org.talend.repository.filepreview_provider").length \=\= 0 ??
|
||||
ShowAddedContextdialog.Messages=Should add the following context parameters to the jobs or not?
|
||||
ShowAddedContextdialog.Title=Added context
|
||||
ShowAddedContextdialog.Variables=Variables
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=Preview interrupted
|
||||
TableWizard.windowTitle=Schema
|
||||
@@ -546,3 +544,5 @@ DatabaseForm.DataBase=DataBase
|
||||
FileStep2.stop=Stop
|
||||
PropertiesWizard.VersionTitle=Change the parent version
|
||||
PropertiesWizard.PreviousVersion=The TestCases of {0} will point to the previous version. Please use "Edit TestCase Properties" to change the parent version.
|
||||
ShowAddedContextdialog.dialogMessages=Add the following context parameters to Jobs using this connection?
|
||||
ShowAddedContextdialog.dialogTitle=Add context parameters
|
||||
|
||||
@@ -396,8 +396,6 @@ SelectorTableForm.groupTableSettings=S\u00E9lectionnez le sch\u00E9ma \u00E0 cr\
|
||||
SelectorTableForm.nameFilter=Filtre sur nom\:
|
||||
SelectorTableForm.selectAllTables=S\u00E9lectionner tout
|
||||
SelectorTableForm.selectNoneTables=S\u00E9lectionner aucun(e)
|
||||
ShowAddedContextdialog.Messages=Ajouter les param\u00E8tres de contexte suivants aux Jobs ?
|
||||
ShowAddedContextdialog.Title=Contexte ajout\u00E9
|
||||
ShowAddedContextdialog.Variables=Variables
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=Aper\u00E7u interrompu
|
||||
TableWizard.windowTitle=Sch\u00E9ma
|
||||
@@ -534,4 +532,5 @@ SparkPropertiesDialog.desc=Configurations des propri\u00E9t\u00E9s Spark
|
||||
SparkPropertiesDialog.parentProperties.title=Propri\u00E9t\u00E9s Spark parent
|
||||
DatabaseForm.DataBase=Base de donn\u00E9es
|
||||
FileStep2.stop=Arr\u00EAter
|
||||
PropertiesWizard.VersionTitle=Modifier la version parente
|
||||
PropertiesWizard.PreviousVersion=Les TestCases de {0} vont pointer vers la version pr\u00E9c\u00E9dente. Utilisez \"Modifier les propri\u00E9t\u00E9s du TestCase\" pour modifier la version parente.
|
||||
|
||||
@@ -401,8 +401,6 @@ SelectorTableForm.nameFilter=Nome filtro\:
|
||||
SelectorTableForm.selectAllTables=Seleziona tutto
|
||||
SelectorTableForm.selectNoneTables=Seleziona nulla
|
||||
ShadowProcessHelper.logError.previewIsNull01=\nIl processo ombra utilizzato per estrarre dati o metadati su un file non \u00E8 stato eseguito.
|
||||
ShowAddedContextdialog.Messages=\u00C8 il caso di aggiungere i seguente parametri contesto al job oppure no?
|
||||
ShowAddedContextdialog.Title=Contesto aggiunto
|
||||
ShowAddedContextdialog.Variables=Variabili
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=Anteprima interrotta
|
||||
TableWizard.windowTitle=Schema
|
||||
|
||||
@@ -118,7 +118,7 @@ DatabaseTableForm.navigatorTree=\u30B9\u30AD\u30FC\u30DE
|
||||
DatabaseTableForm.retreiveButtonAlert=\u201D\u30B9\u30AD\u30FC\u30DE\u306E\u53D6\u5F97\u201D\u3092\u4F7F\u7528\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u6700\u521D\u306B\u30C6\u30FC\u30D6\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
DatabaseTableForm.retreiveButtonConfirmation=\u5909\u66F4\u3092\u78BA\u8A8D\u3057\u307E\u3059\u304B\uFF1F
|
||||
DatabaseTableForm.retreiveButtonConfirmationMessage=\u30B9\u30AD\u30FC\u30DE\u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u3068\u3001\u73FE\u5728\u306E\u30B9\u30AD\u30FC\u30DE\u30D7\u30EC\u30D3\u30E5\u30FC\u3068\u7570\u306A\u308A\u307E\u3059\u3002\u30B9\u30AD\u30FC\u30DE\u306E\u66F4\u65B0\u306F\u5168\u3066\u306E\u30AB\u30EC\u30F3\u30C8\u30C7\u30FC\u30BF\u306B\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002\u7D99\u7D9A\u3057\u307E\u3059\u304B\uFF1F
|
||||
DatabaseTableForm.retreiveButtonIsAccessible=\"\u53D6\u5F97\u30DC\u30BF\u30F3\"\u304C\u4F7F\u7528\u53EF\u80FD\u306B\u306A\u308A\u307E\u3057\u305F\u3002
|
||||
DatabaseTableForm.retreiveButtonIsAccessible=\"\u53D6\u5F97\"\u30DC\u30BF\u30F3\u304C\u4F7F\u7528\u53EF\u80FD\u306B\u306A\u308A\u307E\u3057\u305F\u3002
|
||||
DatabaseTableForm.retreiveButtonTip=\u30B9\u30AD\u30FC\u30DE\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u300C\u30B9\u30AD\u30FC\u30DE\u60C5\u5831\u3092\u53D6\u5F97\u300D\u304C\u4F7F\u7528\u3067\u304D\u307E\u3059!
|
||||
DatabaseTableForm.retreiveButtonUse=\u300C\u30B9\u30AD\u30FC\u30DE\u60C5\u5831\u3092\u53D6\u5F97\u300D\u3067\u73FE\u5728\u306E\u30B9\u30AD\u30FC\u30DE\u60C5\u5831\u3092\u66F4\u65B0\u3067\u304D\u307E\u3059
|
||||
DatabaseTableForm.retreiveSchema=\u30B9\u30AD\u30FC\u30DE\u306E\u53D6\u5F97
|
||||
@@ -404,8 +404,6 @@ SelectorTableForm.selectAllTables=\u3059\u3079\u3066\u9078\u629E
|
||||
SelectorTableForm.selectNoneTables=\u4F55\u3082\u9078\u629E\u3057\u306A\u3044
|
||||
ShadowProcessHelper.logError.previewIsNull01=\n\u30D5\u30A1\u30A4\u30EB\u4E0A\u306E\u30C7\u30FC\u30BF\u307E\u305F\u306F\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u62BD\u51FA\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u308BShadowProcess\u304C\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
ShadowProcessHelper.logError.previewIsNull02=\nConfigurationElementsFor('org.talend.repository.filepreview_provider').length == 0 ??
|
||||
ShowAddedContextdialog.Messages=\u30B8\u30E7\u30D6\u306B\u6B21\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u52A0\u3048\u308B\u3079\u304D\u3067\u3042\u308B?
|
||||
ShowAddedContextdialog.Title=\u8FFD\u52A0\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
ShowAddedContextdialog.Variables=\u5909\u6570
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=\u30D7\u30EC\u30D3\u30E5\u30FC\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F
|
||||
TableWizard.windowTitle=\u30B9\u30AD\u30FC\u30DE
|
||||
|
||||
@@ -209,8 +209,6 @@ SelectorTableForm.Success=\u0423\u0441\u043F\u0435\u0448\u043D\u043E
|
||||
SelectorTableForm.TableName=\u0418\u043C\u044F
|
||||
SelectorTableForm.TableType=\u0422\u0438\u043F
|
||||
SelectorTableForm.selectAllTables=\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435
|
||||
ShowAddedContextdialog.Messages=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u043B\u0443\u0434\u0443\u044E\u0449\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0437\u0430\u0434\u0430\u0447\u0443?
|
||||
ShowAddedContextdialog.Title=\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442
|
||||
ShowAddedContextdialog.Variables=\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
|
||||
TableWizard.windowTitle=\u0421\u0445\u0435\u043C\u0430
|
||||
TableWizardPage.titleUpdate=\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0445\u0435\u043C\u0443
|
||||
|
||||
@@ -404,8 +404,6 @@ SelectorTableForm.selectAllTables=\u5168\u9009
|
||||
SelectorTableForm.selectNoneTables=\u53D6\u6D88\u5168\u9009
|
||||
ShadowProcessHelper.logError.previewIsNull01=\\n\u7528\u4E8E\u63D0\u53D6\u6587\u4EF6\u4E2D\u6570\u636E\u6216\u5143\u6570\u636E\u7684 ShadowProcess \u4E0D\u8FD0\u884C\u3002
|
||||
ShadowProcessHelper.logError.previewIsNull02=\\nConfigurationElementsFor(\"org.talend.repository.filepreview_provider\").length == 0 ??
|
||||
ShowAddedContextdialog.Messages=\u662F\u5426\u5E94\u5F53\u5C06\u4EE5\u4E0B\u4E0A\u4E0B\u6587\u53C2\u6570\u6DFB\u52A0\u5230\u4F5C\u4E1A\u4E2D\uFF1F
|
||||
ShowAddedContextdialog.Title=\u5DF2\u6DFB\u52A0\u7684\u4E0A\u4E0B\u6587
|
||||
ShowAddedContextdialog.Variables=\u53D8\u91CF
|
||||
StoppablePreviewLoader.inforLabelText.previewInterrupted=\u9884\u89C8\u4E2D\u65AD
|
||||
TableWizard.windowTitle=Schema
|
||||
|
||||
@@ -26,6 +26,7 @@ _UI_BusinessAssignment_type=Assignment
|
||||
_UI_BaseBusinessItemRelationship_source_feature=Source
|
||||
_UI_TalendItem_id_feature=Id
|
||||
_UI_BusinessItem_businessProcess_feature=Business Model
|
||||
_UI_BidirectionalBusinessItemRelationship_type=Bidirectional Business Item Relationship
|
||||
_UI_TalendItem_version_feature=Version
|
||||
_UI_BaseBusinessItemRelationship_target_feature=Target
|
||||
_UI_Documentation_type=Documentation
|
||||
|
||||
@@ -114,3 +114,4 @@ LinksToolbarItem_cloud=Link to Talend cloud
|
||||
WelcomePageDynamicContentProvider.LatestItemsServices.Title=Services
|
||||
ComponentsManager.form.install.dialog.restart.title=Restarting Studio
|
||||
ComponentsManager.form.install.dialog.restart.message=We need to restart studio to finish the installation.\n\nDo you want to restart studio right now?
|
||||
JavaVersion.CheckError=Java upgrade required, minimal required java version is {0}, current version is {1}.
|
||||
|
||||
@@ -10,3 +10,4 @@ ImportExportHandlersManager_importingItemsMessage=Import des \u00E9l\u00E9ments.
|
||||
ImportExportHandlersManager_importingItemsError=Erreurs lors de l'import
|
||||
ImportExportHandlersManager_deletingItemsMessage=Supprimer des \u00E9l\u00E9ments...
|
||||
AbstractImportHandler_nameUsed.differentRepositoryType=Un \u00E9l\u00E9ment du m\u00EAme nom existe d\u00E9j\u00E0. V\u00E9rifiez la Corbeille et videz-la si n\u00E9cessaire.
|
||||
ImportExportHandlersManager_overrideDelete=Suppression des \u00E9l\u00E9ments existants \u00E0 \u00E9craser...
|
||||
|
||||
@@ -27,4 +27,6 @@ ShowErrorsDuringImportItemsDialog_exportLogEntry=Exporter l'entr\u00E9e du log
|
||||
ShowErrorsDuringImportItemsDialog_confirmOverwrite_message=Le fichier "{0}" existe. L'\u00E9craser ?
|
||||
ImportItemsWizardPage_ErrorsMessage=L'\u00E9l\u00E9ment '{0}' existe dans une version diff\u00E9rente {1}. V\u00E9rifiez la Corbeille et videz-la si n\u00E9cessaire.
|
||||
ImportItemsWizardPage_ProgressDialog_ExecutingMessage=Pr\u00E9paration...
|
||||
ImportItemsWizardPage_internalIdGroup=ID interne
|
||||
ImportItemsWizardPage_internalIdGroup_alwaysRegenId=Toujours reg\u00E9n\u00E9rer l\'ID \u00E0 l\'import
|
||||
ImportItemsWizardPage_internalIdGroup_keepOrigId=Conserver l\'ID interne original
|
||||
|
||||
@@ -2,6 +2,6 @@ LocalRepositoryFactory.logRetrievingFiles=Retrieving {0} files in {1} sec
|
||||
LocalRepositoryFactory.illegalArgumentException03=Label cannot be null nor empty
|
||||
LocalRepositoryFactory.illegalArgumentException02=Path cannot be null
|
||||
LocalRepositoryFactory.illegalArgumentException01=Type cannot be null
|
||||
LocalRepositoryFactory.CannotLoadProperty=The Repository local provider was unable to load
|
||||
LocalRepositoryFactory.CannotLoadProperty=The Repository local provider was unable to load
|
||||
LocalRepositoryFactory.UserLoginCannotBeNull=User login cannot be null
|
||||
LocalRepositoryFactory.Property_File_Broken=The property file {0} is broken.
|
||||
|
||||
@@ -10,7 +10,7 @@ MdmConceptWizardPage1_select_model=Select one model to create MDM metadata
|
||||
MdmConceptWizardPage2_mdm_entity=MDM Entity
|
||||
MdmConceptWizardPage3_mdm_entity=MDM Entity
|
||||
MDMForm_check=Check
|
||||
MDMForm_connect_successful=MDM connected successfully\!
|
||||
MDMForm_connect_successful=MDM connected successfully!
|
||||
MDMForm_link_para=Link Parameter
|
||||
MDMForm_pass=Password
|
||||
MDMForm_pass_null=Password can not be null\!
|
||||
|
||||
@@ -2,7 +2,7 @@ repository.metadataFilePositional=File positional
|
||||
repository.metadataFilePositional.alias=POS
|
||||
repository.metadataFileRegexp=File regex
|
||||
repository.metadataFileRegexp.alias=REGX
|
||||
repository.metadataFileXml=File xml
|
||||
repository.metadataFileXml=File XML
|
||||
repository.metadataFileXml.alias=XML
|
||||
repository.metadataFileLdif=File ldif
|
||||
repository.metadataFileLdif.alias=LDIF
|
||||
|
||||
@@ -60,9 +60,9 @@ CreateFilePositionalAction.action.openTitle=Open file positional
|
||||
CreateFileRegexpAction.action.createTitle=Create file regex
|
||||
CreateFileRegexpAction.action.editTitle=Edit file regex
|
||||
CreateFileRegexpAction.action.openTitle=Open file regex
|
||||
CreateFileXmlAction.action.createTitle=Create file xml
|
||||
CreateFileXmlAction.action.editTitle=Edit file xml
|
||||
CreateFileXmlAction.action.openTitle=Open file xml
|
||||
CreateFileXmlAction.action.createTitle=Create file XML
|
||||
CreateFileXmlAction.action.editTitle=Edit file XML
|
||||
CreateFileXmlAction.action.openTitle=Open file XML
|
||||
CreateFolderAction.action.title=Create folder
|
||||
CreateFolderAction.action.toolTipText=Create folder
|
||||
CreateGenericSchemaAction.createGeneric=Create generic schema
|
||||
@@ -256,7 +256,7 @@ FileStep2.noresultDetailMessage=Please check right XPathExpression or XML source
|
||||
FileStep2.previewFailure=Preview error. Some settings must be changed.\nNote\: Preview errors are generally due to a wrong encoding setting.
|
||||
FileStep2.previewIsDone=Preview successful...
|
||||
FileStep2.previewProgress=Preview in progress...
|
||||
FileStep2.quoteDelimitedTip=You cannot use the character " without an escape character. Use \\"
|
||||
FileStep2.quoteDelimitedTip=You cannot use the character " without an escape character. Use \"
|
||||
FileStep2.refreshPreview=Refresh Preview
|
||||
FileStep2.removeEmptyRow=Skip empty row
|
||||
FileStep2.rowSeparator=Row Separator
|
||||
@@ -384,7 +384,7 @@ JobScriptsExportWizardPage.extractZipFile=Extract the zip file
|
||||
JobScriptsExportWizardPage.generatePerlFiles=Generate Perl Files
|
||||
JobScriptsExportWizardPage.jobPerlScripts=Perl scripts
|
||||
JobScriptsExportWizardPage.jobJavaScripts=Java classes
|
||||
JobScriptsExportWizardPage.requiredTalendPerlModules=Required talend modules
|
||||
JobScriptsExportWizardPage.requiredTalendPerlModules=Required Talend modules
|
||||
JobScriptsExportWizardPage.shellLauncher=Shell launcher
|
||||
JobScriptsExportWizardPage.sourceFiles=Source files
|
||||
JobScriptsExportWizardPage.systemRoutines=System routines
|
||||
@@ -461,8 +461,8 @@ LoginComposite.Workspace_inuse=Workspace in use, please choose another one.
|
||||
LoginComposite.TisWorkspace_welcome=Welcome to {0}!
|
||||
LoginComposite.welcomeTitle=Welcome to Talend Open Studio
|
||||
LoginComposite.detailMessage=Before you can begin working with Talend, you need to create a project. \nYou can start with a demo project that contains useful examples, or \ncreate an empty project of your own.
|
||||
LoginComposite.selectADemoProject=Select A Demo Project
|
||||
LoginComposite.projectTitleTemp=Create A New Project
|
||||
LoginComposite.selectADemoProject=Select a Demo Project
|
||||
LoginComposite.projectTitleTemp=Create a New Project
|
||||
LoginComposite.buttons.advanced=Advanced...
|
||||
LoginComposite.buttons.changeButton=Change
|
||||
LoginComposite.label.workspace=Workspace
|
||||
@@ -707,7 +707,7 @@ ImportItemUtil.message=Cannot import item {0} -> unknown task(s) {1}
|
||||
ImportItemUtil.persistenceException=A newer version of {0} already exist.
|
||||
ImportItemUtil.taskLogWarn=Task {0} found in project doesn't exist anymore \!
|
||||
ImportItemUtil.taskMonitor=apply migration task {0} on item {1}
|
||||
ImportItemUtil.tdqErrorInfor=Can't import tdq item {0}
|
||||
ImportItemUtil.tdqErrorInfor=Can't import TDQ item {0}
|
||||
ImportItemUtil.unknowException=Unknow language: {0}
|
||||
ImportItemWizardPage.0=The 2 following items haves the same ID, please unselect one of them : \n [{0}] [{1}]
|
||||
ImportItemWizardPage.ItemsList=Items List
|
||||
@@ -1116,7 +1116,7 @@ DatabaseForm.hiveEmbedded.metastore.connDriverJar=Connection Driver Jar
|
||||
DatabaseForm.hiveEmbedded.metastore.connDriverName=Connection Driver Name
|
||||
DatabaseForm.hbase.settings=Version
|
||||
DatabaseForm.hbase.distribution=Distribution
|
||||
DatabaseForm.hbase.distribution.tooltip=Set the hadoop distribution
|
||||
DatabaseForm.hbase.distribution.tooltip=Set the Hadoop distribution
|
||||
DatabaseForm.hbase.version=HBase version
|
||||
DatabaseForm.hbase.version.tooltip=Set the HBase version
|
||||
DatabaseForm.hbase.distributionAlert=Distribution must be specified
|
||||
@@ -1203,7 +1203,7 @@ DatabaseForm.hiveExecution.engine=Execution engine
|
||||
SelectorTableForm.Failed=Failed
|
||||
DatabaseForm.maprdb.settings=Version
|
||||
DatabaseForm.maprdb.distribution=Distribution
|
||||
DatabaseForm.maprdb.distribution.tooltip=Set the hadoop distribution
|
||||
DatabaseForm.maprdb.distribution.tooltip=Set the Hadoop distribution
|
||||
DatabaseForm.maprdb.version=MapR-DB version
|
||||
DatabaseForm.maprdb.version.tooltip=Set the MapR-DB version
|
||||
DatabaseForm.maprdb.distributionAlert=Distribution must be specified
|
||||
@@ -1253,3 +1253,6 @@ DatabaseForm.canNotUsableInDataProfiler=some database types are not usable in th
|
||||
XmlFileStep1Form.ImportSchemaNotExistError=Required reference schema files are missing.
|
||||
ImportTreeFromXMLAction.ImportSchemaNotExistError=Required reference schema files are missing.
|
||||
ImportTreeFromXMLAction.schemaFileNotExistDetailTitle=The following files do not exist:
|
||||
DatabaseForm.impala.driverVersion=Impala Driver
|
||||
DatabaseForm.impala.driverVersion.tip=Select a hive impala driver
|
||||
DatabaseForm.checkSchema=The Schema field must be filled when using context mode.\n Click Cancel to complete your connection parameters, click OK to go to the next step.
|
||||
|
||||
@@ -1186,6 +1186,7 @@ DatabaseForm.hbaseMaprTPasswordTxt.label=Mot de passe
|
||||
DatabaseForm.hbaseMaprTClusterTxt.label=Nom du cluster
|
||||
DatabaseForm.hbaseMaprTDurationTxt.label=Dur\u00E9e du ticket (en s)
|
||||
DatabaseForm.ZnodeParent.group=Znode parent
|
||||
DatabaseForm.ZnodeParent.checkBtn=Configurer le znode Zookeeper parent
|
||||
XmlFileStep1Form.limitToolTip=Limiter la profondeur de la hi\u00E9rarchie \u00E0 {0} niveaux.
|
||||
DatabaseForm.test=Tester la connexion
|
||||
DatabaseForm.encryption=Chiffrement
|
||||
|
||||
@@ -377,7 +377,7 @@ ParametersValuesDialog_Desc=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3059\u308B\u30
|
||||
JobScriptsExportWizardPage.newExportJob0=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 {0}: {1}_{2}
|
||||
JobScriptsExportWizardPage.newExportJob1=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 {0}: {1}_{2}
|
||||
JobScriptsExportWizardPage.newExportJobScript={0}\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u4E2D
|
||||
JobScriptsExportWizardPage.newExportJobSucessful=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8{0}: {1}_{2}\u304C\u6210\u529F\u3057\u307E\u3057\u305F!
|
||||
JobScriptsExportWizardPage.newExportJobSucessful=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 {0}: {1}_{2}\u304C\u6210\u529F\u3057\u307E\u3057\u305F!
|
||||
JobScriptsExportWizardPage.exportResourceError=\u30EA\u30BD\u30FC\u30B9\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E\u30A8\u30E9\u30FC
|
||||
JobScriptsExportWizardPage.newExportSuccess={0} \u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306B\u6210\u529F\u3057\u307E\u3057\u305F\uFF01
|
||||
JobScriptsExportWizardPage.extractZipFile=ZIP\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u51CD
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<plugin id="org.talend.libraries.jdbc.access" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.as400" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.derby" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.exasol" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.h2" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.hsql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.ingres" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.mysql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.paraccel" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.postgresql" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.sqlite3" download-size="0" install-size="0" version="0.0.0"/>
|
||||
<plugin id="org.talend.libraries.jdbc.teradata" download-size="0" install-size="0" version="0.0.0"/>
|
||||
</feature>
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
@@ -38,6 +39,8 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
|
||||
private String exceptionString = null;
|
||||
|
||||
private int[] diabledButtonIndex = new int[] {};
|
||||
|
||||
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
|
||||
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
|
||||
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
|
||||
@@ -147,4 +150,21 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
this.exceptionString = exceptionString;
|
||||
}
|
||||
|
||||
public void setDisabledButtons(int[] index) {
|
||||
this.diabledButtonIndex = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
super.createButtonsForButtonBar(parent);
|
||||
if (diabledButtonIndex == null) {
|
||||
return;
|
||||
}
|
||||
for (int index : diabledButtonIndex) {
|
||||
Button button = super.getButton(index);
|
||||
button.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: Common Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.commons.runtime;singleton:=true
|
||||
Bundle-Version: 7.4.1.qualifier
|
||||
Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
org.apache.commons.beanutils,
|
||||
org.apache.commons.commons-beanutils,
|
||||
org.apache.commons.collections,
|
||||
org.apache.commons.httpclient,
|
||||
org.apache.commons.lang;visibility:=reexport,
|
||||
@@ -13,7 +13,10 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
org.talend.libraries.apache,
|
||||
com.ibm.icu,
|
||||
org.apache.commons.io,
|
||||
org.talend.utils
|
||||
org.talend.utils,
|
||||
org.eclipse.core.net,
|
||||
org.eclipse.m2e.core,
|
||||
org.eclipse.m2e.maven.runtime
|
||||
Export-Package: org.talend.commons,
|
||||
org.talend.commons.exception,
|
||||
org.talend.commons.i18n,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!--
|
||||
Copyright (C) 2010 Talend Inc. - www.talend.com
|
||||
<!--
|
||||
Copyright (C) 2010 Talend Inc. - www.talend.com
|
||||
-->
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.2</version>
|
||||
<version>1.9.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
@@ -92,7 +92,7 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.net.proxy.IProxyService;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
@@ -24,6 +25,7 @@ import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
import org.talend.commons.exception.ExceptionService;
|
||||
import org.talend.commons.runtime.debug.TalendDebugHandler;
|
||||
import org.talend.commons.utils.system.EclipseCommandLine;
|
||||
@@ -55,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
return isWorkbenchCreated;
|
||||
}
|
||||
@@ -107,7 +111,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
}
|
||||
|
||||
public static boolean isDebugMode() {
|
||||
return ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
return Boolean.getBoolean("talendDebug") //$NON-NLS-1$
|
||||
|| ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
}
|
||||
|
||||
public static boolean isJUnitTest() {
|
||||
@@ -179,4 +184,13 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return FileLocator.toFileURL(entry);
|
||||
}
|
||||
|
||||
public static IProxyService getProxyService() {
|
||||
if (proxyTracker == null) {
|
||||
proxyTracker = new ServiceTracker(Platform.getBundle(PLUGIN_ID).getBundleContext(), IProxyService.class.getName(),
|
||||
null);
|
||||
proxyTracker.open();
|
||||
}
|
||||
return (IProxyService) proxyTracker.getService();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 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.commons.exception;
|
||||
|
||||
public class ClientException extends PersistenceException {
|
||||
|
||||
private Integer httpCode;
|
||||
|
||||
public ClientException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ClientException(Integer httpCode, String message) {
|
||||
super(message);
|
||||
this.httpCode = httpCode;
|
||||
}
|
||||
|
||||
public ClientException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public ClientException(Integer httpCode, String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
this.httpCode = httpCode;
|
||||
}
|
||||
|
||||
public ClientException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public ClientException(Integer httpCode, Throwable cause) {
|
||||
super(cause);
|
||||
this.httpCode = httpCode;
|
||||
}
|
||||
|
||||
public Integer getHttpCode() {
|
||||
return httpCode;
|
||||
}
|
||||
|
||||
public void setHttpCode(Integer httpCode) {
|
||||
this.httpCode = httpCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getLocalizedMessage();
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,8 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isNeedMigration(String componentName, Map<String, String> properties);
|
||||
|
||||
boolean isTaCoKitType(Object repoType);
|
||||
|
||||
public static ITaCoKitService getInstance() throws Exception {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
Collection<ServiceReference<ITaCoKitService>> tacokitServices = Collections.emptyList();
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 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.commons.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import org.eclipse.m2e.core.MavenPlugin;
|
||||
|
||||
public enum MojoType {
|
||||
|
||||
CI_BUILDER("org.talend.ci", "builder-maven-plugin", "ci.builder.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
CLOUD_PUBLISHER("org.talend.ci", "cloudpublisher-maven-plugin", "cloud.publisher.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SIGNER("org.talend.ci", "signer-maven-plugin", "signer.version"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
OSGI_HELPER("org.talend.ci", "osgihelper-maven-plugin", "osgihelper.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
private String groupId;
|
||||
|
||||
private String artifactId;
|
||||
|
||||
private String versionKey;
|
||||
|
||||
private MojoType(String groupId, String artifactId, String versionKey) {
|
||||
this.groupId = groupId;
|
||||
this.artifactId = artifactId;
|
||||
this.versionKey = versionKey;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public String getArtifactId() {
|
||||
return artifactId;
|
||||
}
|
||||
|
||||
public String getVersionKey() {
|
||||
return versionKey;
|
||||
}
|
||||
|
||||
public String getMojoArtifactIdFolder() {
|
||||
Path basePath = new File(MavenPlugin.getMaven().getLocalRepositoryPath()).toPath();
|
||||
return basePath.resolve(getGroupId().replaceAll("\\.", "/")).resolve(getArtifactId()).toString(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
public String getMojoGAV() {
|
||||
return getGroupId() + ":" + getArtifactId() + ":" + getVersionKey(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,7 +36,8 @@ public class PasswordEncryptUtil {
|
||||
|
||||
private static SecretKey getSecretKey() throws Exception {
|
||||
if (key == null) {
|
||||
byte rawKeyData[] = StudioEncryption.getKeySource(StudioEncryption.EncryptionKeyName.MIGRATION.toString(), false)
|
||||
byte rawKeyData[] = StudioEncryption
|
||||
.getKeySource(StudioEncryption.EncryptionKeyName.MIGRATION.toString(), false)
|
||||
.getKey();
|
||||
DESKeySpec dks = new DESKeySpec(rawKeyData);
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); //$NON-NLS-1$
|
||||
@@ -106,7 +107,8 @@ public class PasswordEncryptUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isPasswordType(String type) {
|
||||
return "Password".equals(type) || "id_Password".equals(type); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return "Password".equals(type) || "id_Password".equals(type) || "LicenseKey".equals(type) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|| "id_LicenseKey".equals(type); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,7 +121,7 @@ public class PasswordEncryptUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isPasswordField(String field) {
|
||||
return "PASSWORD".equals(field); //$NON-NLS-1$
|
||||
return "PASSWORD".equals(field) || "LICENSEKEY".equals(field); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,15 +15,17 @@ package org.talend.commons.utils;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
@@ -283,24 +285,28 @@ public class VersionUtils {
|
||||
return version;
|
||||
}
|
||||
|
||||
public static String getMojoVersion(String mojoKey) {
|
||||
String version = null;
|
||||
public static String getMojoVersion(MojoType mojoType) {
|
||||
String mojoKey = mojoType.getVersionKey();
|
||||
String version = System.getProperty(mojoKey);
|
||||
if (StringUtils.isNotBlank(version)) {
|
||||
return version;
|
||||
}
|
||||
String talendVersion = getTalendVersion();
|
||||
Properties properties = new Properties();
|
||||
File file = new Path(Platform.getConfigurationLocation().getURL().getPath()).append("mojo_version.properties").toFile(); //$NON-NLS-1$
|
||||
if (file.exists()) {
|
||||
try (InputStream inStream = new FileInputStream(file)) {
|
||||
properties.load(inStream);
|
||||
version = properties.getProperty(mojoKey);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (version != null && !version.startsWith(talendVersion)) {
|
||||
ExceptionHandler
|
||||
.process(new Exception(
|
||||
"Incompatible Mojo version:" + mojoKey + "[" + version + "], use default version.")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
version = null;
|
||||
String majorVersion = StringUtils.substringBeforeLast(talendVersion, "."); //$NON-NLS-1$
|
||||
String artifactIdFolder = mojoType.getMojoArtifactIdFolder();
|
||||
Optional<File> optional = Stream.of(new File(artifactIdFolder).listFiles())
|
||||
.filter(f -> f.isDirectory() && f.getName().startsWith(majorVersion))
|
||||
.sorted((f1, f2) -> new DefaultArtifactVersion(f2.getName()).compareTo(new DefaultArtifactVersion(f1.getName())))
|
||||
.findFirst();
|
||||
if (optional.isPresent()) {
|
||||
File latestArtifact = optional.get();
|
||||
String fileName = mojoType.getArtifactId() + "-" + latestArtifact.getName(); //$NON-NLS-1$
|
||||
if (Stream.of(latestArtifact.listFiles())
|
||||
.filter(f -> f.getName().equals(fileName + ".jar") || f.getName().equals(fileName + ".pom")) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
.count() != 2) {
|
||||
ExceptionHandler.process(new Exception("Can't find plugin artifact " + mojoType.getMojoGAV())); //$NON-NLS-1$
|
||||
}
|
||||
version = latestArtifact.getName();
|
||||
}
|
||||
// default version
|
||||
if (StringUtils.isBlank(version)) {
|
||||
@@ -314,6 +320,7 @@ public class VersionUtils {
|
||||
version += "-" + revision; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
System.setProperty(mojoKey, version);
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -323,4 +330,5 @@ public class VersionUtils {
|
||||
talendVersion = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 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.commons.utils.database;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* created by qiongli on 2013-11-13 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class Sybase16SADatabaseMetaData extends SybaseDatabaseMetaData {
|
||||
|
||||
private static Logger log = Logger.getLogger(Sybase16SADatabaseMetaData.class);
|
||||
|
||||
/**
|
||||
* DOC qiongli SybaseIQDatabaseMetaData constructor comment.
|
||||
*
|
||||
* @param connection
|
||||
* @throws SQLException
|
||||
*/
|
||||
public Sybase16SADatabaseMetaData(Connection connection) throws SQLException {
|
||||
super(connection);
|
||||
}
|
||||
|
||||
public ResultSet getCatalogs(String login, String database) throws SQLException {
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
|
||||
List<String> catList = new ArrayList<String>();
|
||||
if (!StringUtils.isEmpty(database)) {
|
||||
catList.add(database);
|
||||
}
|
||||
|
||||
for (String catalogName : catList) {
|
||||
String sql = createSqlByLoginAndCatalog(login, catalogName);
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
|
||||
while (rs.next()) {
|
||||
int temp = rs.getInt(1);
|
||||
if (temp > 0) {
|
||||
String[] r = new String[] { catalogName };
|
||||
list.add(r);
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.error(e);
|
||||
} finally {
|
||||
try {
|
||||
if (rs != null) {
|
||||
rs.close();
|
||||
}
|
||||
if (stmt != null) {
|
||||
stmt.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SybaseResultSet tableResultSet = new SybaseResultSet();
|
||||
tableResultSet.setMetadata(new String[] { "TABLE_CAT" }); //$NON-NLS-1$
|
||||
tableResultSet.setData(list);
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
|
||||
throws SQLException {
|
||||
return super.getColumns(null, schemaPattern, tableNamePattern, columnNamePattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
|
||||
return super.getPrimaryKeys(null, schema, table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
|
||||
throws SQLException {
|
||||
return super.getTables(null, schemaPattern, tableNamePattern, types);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get a sql query by login name and catalog name.
|
||||
*
|
||||
* @param loginName
|
||||
* @param catalogName
|
||||
* @return
|
||||
*/
|
||||
protected String createSqlByLoginAndCatalog(String loginName, String catalogName) {
|
||||
String sql = "select count(*) from " + catalogName
|
||||
+ ".dbo.sysusers where suid in (select suid from "+catalogName+".dbo.syslogins where name = '" + loginName
|
||||
+ "')";
|
||||
return sql;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 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.commons.utils.network;
|
||||
|
||||
public interface ITalendNexusPrefConstants {
|
||||
|
||||
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
|
||||
}
|
||||
@@ -26,6 +26,9 @@ import java.util.Enumeration;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
/**
|
||||
@@ -44,7 +47,17 @@ public class NetworkUtil {
|
||||
|
||||
private static final String HTTP_NETWORK_URL = "https://talend-update.talend.com";
|
||||
|
||||
private static final int DEFAULT_TIMEOUT = 4000;
|
||||
|
||||
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
|
||||
|
||||
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
|
||||
|
||||
public static boolean isNetworkValid() {
|
||||
return isNetworkValid(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(Integer timeout) {
|
||||
String disableInternet = System.getProperty(TALEND_DISABLE_INTERNET);
|
||||
if ("true".equals(disableInternet)) { //$NON-NLS-1$
|
||||
return false;
|
||||
@@ -55,8 +68,9 @@ public class NetworkUtil {
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
|
||||
conn.setConnectTimeout(conntimeout);
|
||||
conn.setReadTimeout(conntimeout);
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
String strMessage = conn.getResponseMessage();
|
||||
if (strMessage.compareTo("Not Found") == 0) { //$NON-NLS-1$
|
||||
@@ -73,22 +87,23 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(String url) {
|
||||
public static boolean isNetworkValid(String url, Integer timeout) {
|
||||
if (url == null) {
|
||||
return isNetworkValid();
|
||||
return isNetworkValid(timeout);
|
||||
}
|
||||
return checkValidWithHttp(url);
|
||||
return checkValidWithHttp(url, timeout);
|
||||
}
|
||||
|
||||
private static boolean checkValidWithHttp(String urlString) {
|
||||
private static boolean checkValidWithHttp(String urlString, Integer timeout) {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
conn.setConnectTimeout(4000);
|
||||
conn.setReadTimeout(4000);
|
||||
int conntimeout = timeout != null ? timeout.intValue() : DEFAULT_TIMEOUT;
|
||||
conn.setConnectTimeout(conntimeout);
|
||||
conn.setReadTimeout(conntimeout);
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
@@ -101,6 +116,18 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int getNexusTimeout() {
|
||||
int timeout = DEFAULT_NEXUS_TIMEOUT;
|
||||
try {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
|
||||
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public static Authenticator getDefaultAuthenticator() {
|
||||
try {
|
||||
Field theAuthenticatorField = Authenticator.class.getDeclaredField("theAuthenticator");
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.net.Proxy;
|
||||
@@ -35,8 +37,14 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Priority;
|
||||
import org.eclipse.core.internal.net.ProxyManager;
|
||||
import org.eclipse.core.net.proxy.IProxyService;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.i18n.internal.Messages;
|
||||
import org.talend.daikon.sandbox.properties.ClassLoaderIsolatedSystemProperties;
|
||||
|
||||
import sun.net.spi.DefaultProxySelector;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
@@ -51,9 +59,23 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private static final String PROP_ALLOW_PROXY_REDIRECT_EXCLUDE = "talend.studio.proxy.redirect.whiteList";
|
||||
|
||||
private static final String PROP_EXECUTE_CONNECTION_FAILED = "talend.studio.proxy.executeConnectionFailed";
|
||||
|
||||
private static final String PROP_UPDATE_SYSTEM_PROPERTIES_FOR_JRE = "talend.studio.proxy.jre.updateSystemProperties";
|
||||
|
||||
private static final String PROP_CHECK_PROXY = "talend.studio.proxy.checkProxy";
|
||||
|
||||
private static final String PROP_VALIDATE_URI = "talend.studio.proxy.validateUri";
|
||||
|
||||
private static final String PROP_PROXY_SELECTOR = "talend.studio.proxy.selector";
|
||||
|
||||
private static final String PROP_PROXY_SELECTOR_DEFAULT = "default";
|
||||
|
||||
private static final String PROP_PROXY_SELECTOR_JRE = "jre";
|
||||
|
||||
private static final String PROP_PROXY_HOST_MAP = "talend.studio.proxy.hostMap";
|
||||
|
||||
private static final String PROP_DISABLE_DEFAULT_SELECTOR = "talend.studio.proxy.disableDefaultSelector";
|
||||
private static final String PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER = "talend.studio.proxy.disableDefaultSelectorProvider";
|
||||
|
||||
/**
|
||||
* Example: update.talend.com,socket:http,https:http;nexus.talend.com,socket,http;,socket:http
|
||||
@@ -67,7 +89,20 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private static final String KEY_DEFAULT = ":default:";
|
||||
|
||||
private ProxySelector defaultSelector;
|
||||
private static Field uriHostField;
|
||||
|
||||
private static Method proxyManagerUpdateSystemPropertiesFunc;
|
||||
|
||||
private static boolean checkProxy = Boolean.valueOf(System.getProperty(PROP_CHECK_PROXY, Boolean.TRUE.toString()));
|
||||
|
||||
/**
|
||||
* Note: eclipse default selector may be different between TOS and TIS, TOS may use jre one, TIS may use egit one
|
||||
*/
|
||||
private ProxySelector eclipseDefaultSelector;
|
||||
|
||||
private ProxySelector jreDefaultSelector;
|
||||
|
||||
private EProxySelector eProxySelector;
|
||||
|
||||
final private Map<Object, Collection<IProxySelectorProvider>> selectorProviders;
|
||||
|
||||
@@ -83,15 +118,36 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
private boolean allowProxyRedirect = false;
|
||||
|
||||
private boolean disableDefaultSelector = false;
|
||||
private boolean disableDefaultSelectorProvider = false;
|
||||
|
||||
private TalendProxySelector(final ProxySelector defaultSelector) {
|
||||
this.defaultSelector = defaultSelector;
|
||||
private boolean validateUri = true;
|
||||
|
||||
private boolean executeConnectionFailed = true;
|
||||
|
||||
private boolean updateSystemPropertiesForJre = true;
|
||||
|
||||
private TalendProxySelector(final ProxySelector eclipseDefaultSelector) {
|
||||
this.eclipseDefaultSelector = eclipseDefaultSelector;
|
||||
this.jreDefaultSelector = new DefaultProxySelector();
|
||||
|
||||
selectorProviders = Collections.synchronizedMap(new HashMap<>());
|
||||
allowProxyRedirect = Boolean.valueOf(System.getProperty(PROP_ALLOW_PROXY_REDIRECT, Boolean.FALSE.toString()));
|
||||
disableDefaultSelector = Boolean.valueOf(System.getProperty(PROP_DISABLE_DEFAULT_SELECTOR, Boolean.FALSE.toString()));
|
||||
disableDefaultSelectorProvider = Boolean
|
||||
.valueOf(System.getProperty(PROP_DISABLE_DEFAULT_SELECTOR_PROVIDER, Boolean.FALSE.toString()));
|
||||
printProxyLog = Boolean.valueOf(System.getProperty(PROP_PRINT_LOGS, Boolean.FALSE.toString()));
|
||||
validateUri = Boolean.valueOf(System.getProperty(PROP_VALIDATE_URI, Boolean.TRUE.toString()));
|
||||
executeConnectionFailed = Boolean.valueOf(System.getProperty(PROP_EXECUTE_CONNECTION_FAILED, Boolean.TRUE.toString()));
|
||||
updateSystemPropertiesForJre = Boolean
|
||||
.valueOf(System.getProperty(PROP_UPDATE_SYSTEM_PROPERTIES_FOR_JRE, Boolean.TRUE.toString()));
|
||||
|
||||
switch (System.getProperty(PROP_PROXY_SELECTOR, PROP_PROXY_SELECTOR_DEFAULT).toLowerCase()) {
|
||||
case PROP_PROXY_SELECTOR_JRE:
|
||||
this.eProxySelector = EProxySelector.jre;
|
||||
break;
|
||||
default:
|
||||
this.eProxySelector = EProxySelector.eclipse_default;
|
||||
break;
|
||||
}
|
||||
|
||||
initHostMap();
|
||||
initRedirectList();
|
||||
@@ -176,6 +232,18 @@ public class TalendProxySelector extends ProxySelector {
|
||||
synchronized (instanceLock) {
|
||||
if (instance == null) {
|
||||
instance = new TalendProxySelector(proxySelector);
|
||||
try {
|
||||
uriHostField = URI.class.getDeclaredField("host");
|
||||
uriHostField.setAccessible(true);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
try {
|
||||
proxyManagerUpdateSystemPropertiesFunc = ProxyManager.class.getDeclaredMethod("updateSystemProperties");
|
||||
proxyManagerUpdateSystemPropertiesFunc.setAccessible(true);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,34 +256,72 @@ public class TalendProxySelector extends ProxySelector {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
if (instance.getDefaultProxySelector() == null
|
||||
if (instance.getEclipseDefaultSelector() == null
|
||||
|| (proxySelector != null && proxySelector.getClass().getName().endsWith(ECLIPSE_PROXY_SELECTOR))) {
|
||||
instance.setDefaultProxySelector(proxySelector);
|
||||
instance.setEclipseDefaultSelector(proxySelector);
|
||||
}
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static void checkProxy() {
|
||||
if (!checkProxy) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
TalendProxySelector.getInstance();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Proxy> select(final URI uri) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("TalendProxySelector.select " + uri);
|
||||
}
|
||||
if (uri == null) {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
URI validatedUri = validateUri(uri);
|
||||
Set<Proxy> results = new LinkedHashSet<>();
|
||||
|
||||
try {
|
||||
final Set<Proxy> resultFromProviders = getProxysFromProviders(uri);
|
||||
final Set<Proxy> resultFromProviders = getProxysFromProviders(validatedUri);
|
||||
if (resultFromProviders != null && !resultFromProviders.isEmpty()) {
|
||||
results.addAll(resultFromProviders);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("TalendProxySelector.resultFromProviders " + results);
|
||||
}
|
||||
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("TalendProxySelector.defaultProxySelector " + defaultProxySelector);
|
||||
}
|
||||
if (defaultProxySelector != null) {
|
||||
URI newUri = getNewUri(uri);
|
||||
List<Proxy> defaultProxys = defaultProxySelector.select(newUri);
|
||||
/**
|
||||
* don't validate uri here, so that we can know whether it is an issue uri
|
||||
*/
|
||||
URI newUri = getNewUri(validatedUri, false);
|
||||
List<Proxy> defaultProxys = null;
|
||||
if (validateUri && StringUtils.isBlank(newUri.getHost())) {
|
||||
/**
|
||||
* If host is blank, force to use jre proxy selector to avoid the eclipse proxy selector bug
|
||||
*/
|
||||
defaultProxys = getJreProxySelector().select(newUri);
|
||||
} else {
|
||||
defaultProxys = defaultProxySelector.select(newUri);
|
||||
}
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("TalendProxySelector.defaultProxys " + defaultProxys);
|
||||
}
|
||||
try {
|
||||
results.addAll(filterProxys(uri, defaultProxys));
|
||||
results.addAll(filterProxys(validatedUri, defaultProxys));
|
||||
} catch (Exception e) {
|
||||
results.addAll(defaultProxys);
|
||||
ExceptionHandler.process(e);
|
||||
@@ -229,6 +335,54 @@ public class TalendProxySelector extends ProxySelector {
|
||||
return new LinkedList<Proxy>(results);
|
||||
}
|
||||
|
||||
private URI validateUri(URI uri) {
|
||||
if (!validateUri) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
URI validatedUri = null;
|
||||
try {
|
||||
/**
|
||||
* DON'T use URI.create(), MUST use the conductor which requires authority
|
||||
*/
|
||||
validatedUri = new URI(uri.getScheme(), uri.getAuthority(), uri.getPath(), uri.getQuery(), uri.getFragment());
|
||||
|
||||
/**
|
||||
* Validate the host, if the host is empty, it will cause the eclipse selector to return dirrect
|
||||
*/
|
||||
if (StringUtils.isBlank(validatedUri.getHost())) {
|
||||
String authority = validatedUri.getAuthority();
|
||||
if (StringUtils.isNotBlank(authority)) {
|
||||
// example: https://u:p@www.company.com:8081/path/a?param=b
|
||||
String host = null;
|
||||
int userInfoIndex = authority.indexOf('@');
|
||||
if (0 <= userInfoIndex) {
|
||||
authority = authority.substring(userInfoIndex + 1);
|
||||
}
|
||||
int portIndex = authority.lastIndexOf(':');
|
||||
if (0 <= portIndex) {
|
||||
host = authority.substring(0, portIndex);
|
||||
}
|
||||
try {
|
||||
uriHostField.set(validatedUri, host);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
if (validatedUri == null) {
|
||||
validatedUri = uri;
|
||||
}
|
||||
}
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("After validate: " + uri + " -> " + validatedUri);
|
||||
}
|
||||
return validatedUri;
|
||||
}
|
||||
|
||||
private List<Proxy> filterProxys(final URI uri, List<Proxy> defaultProxys) {
|
||||
List<Proxy> result = new ArrayList<>();
|
||||
if (defaultProxys != null && !defaultProxys.isEmpty()) {
|
||||
@@ -264,38 +418,48 @@ public class TalendProxySelector extends ProxySelector {
|
||||
return result;
|
||||
}
|
||||
|
||||
private URI getNewUri(URI uri) {
|
||||
private URI getNewUri(URI uri, boolean validateUri) {
|
||||
URI newUri = uri;
|
||||
if (newUri != null) {
|
||||
String host = newUri.getHost();
|
||||
Map<String, String> protocolMap = null;
|
||||
if (StringUtils.isNotBlank(host)) {
|
||||
protocolMap = hostMap.get(host.toLowerCase());
|
||||
}
|
||||
if (protocolMap == null) {
|
||||
protocolMap = hostMap.get(KEY_DEFAULT);
|
||||
}
|
||||
try {
|
||||
// get host before new URI, because the host may be set manually due to URI issue
|
||||
String host = newUri.getHost();
|
||||
newUri = new URI(newUri.getScheme(), newUri.getAuthority(), newUri.getPath(), newUri.getQuery(),
|
||||
newUri.getFragment());
|
||||
Map<String, String> protocolMap = null;
|
||||
if (StringUtils.isNotBlank(host)) {
|
||||
protocolMap = hostMap.get(host.toLowerCase());
|
||||
}
|
||||
if (protocolMap == null) {
|
||||
protocolMap = hostMap.get(KEY_DEFAULT);
|
||||
}
|
||||
|
||||
if (protocolMap != null) {
|
||||
String schema = newUri.getScheme();
|
||||
if (schema != null) {
|
||||
String lowercasedProtocol = schema.toLowerCase();
|
||||
String preferedProtocol = protocolMap.get(lowercasedProtocol);
|
||||
if (StringUtils.isNotBlank(preferedProtocol)) {
|
||||
try {
|
||||
newUri = new URI(preferedProtocol, newUri.getUserInfo(), newUri.getHost(), newUri.getPort(),
|
||||
newUri.getPath(), newUri.getQuery(), newUri.getFragment());
|
||||
} catch (URISyntaxException e) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.process(new Exception(
|
||||
Messages.getString("TalendProxySelector.exception.proxySelectionError", newUri), e),
|
||||
Priority.WARN);
|
||||
}
|
||||
if (protocolMap != null) {
|
||||
String schema = newUri.getScheme();
|
||||
if (schema != null) {
|
||||
String lowercasedProtocol = schema.toLowerCase();
|
||||
String preferedProtocol = protocolMap.get(lowercasedProtocol);
|
||||
if (StringUtils.isNotBlank(preferedProtocol)) {
|
||||
/**
|
||||
* Note: MUST use the constructor which requires authority, because some uri may be illegal,
|
||||
* then host info will be stored in authority field instead of host filed
|
||||
*/
|
||||
newUri = new URI(preferedProtocol, newUri.getAuthority(), newUri.getPath(), newUri.getQuery(),
|
||||
newUri.getFragment());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (URISyntaxException e) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.process(
|
||||
new Exception(Messages.getString("TalendProxySelector.exception.proxySelectionError", uri), e),
|
||||
Priority.WARN);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (validateUri) {
|
||||
newUri = validateUri(newUri);
|
||||
}
|
||||
return newUri;
|
||||
}
|
||||
|
||||
@@ -395,11 +559,45 @@ public class TalendProxySelector extends ProxySelector {
|
||||
}
|
||||
|
||||
public ProxySelector getDefaultProxySelector() {
|
||||
return defaultSelector;
|
||||
switch (eProxySelector) {
|
||||
case jre:
|
||||
return getJreProxySelector();
|
||||
default:
|
||||
return eclipseDefaultSelector;
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefaultProxySelector(final ProxySelector selector) {
|
||||
defaultSelector = selector;
|
||||
private ProxySelector getJreProxySelector() {
|
||||
try {
|
||||
/**
|
||||
* for tcompv0, daikon may create an isolated system properties for it, so proxies may be ignored in the new
|
||||
* system properties; here we try to call the method to add proxies into the isolated system properties
|
||||
*/
|
||||
if (updateSystemPropertiesForJre && ClassLoaderIsolatedSystemProperties.getInstance()
|
||||
.isIsolated(Thread.currentThread().getContextClassLoader())) {
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("Before update jre proxy system properties for the isolated classloader, http.proxyHost="
|
||||
+ System.getProperty("http.proxyHost"));
|
||||
}
|
||||
IProxyService proxyService = CommonsPlugin.getProxyService();
|
||||
proxyManagerUpdateSystemPropertiesFunc.invoke(proxyService);
|
||||
if (printProxyLog) {
|
||||
ExceptionHandler.log("After updated jre proxy system properties for the isolated classloader, http.proxyHost="
|
||||
+ System.getProperty("http.proxyHost"));
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return this.jreDefaultSelector;
|
||||
}
|
||||
|
||||
public ProxySelector getEclipseDefaultSelector() {
|
||||
return eclipseDefaultSelector;
|
||||
}
|
||||
|
||||
public void setEclipseDefaultSelector(ProxySelector eclipseDefaultSelector) {
|
||||
this.eclipseDefaultSelector = eclipseDefaultSelector;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -413,21 +611,26 @@ public class TalendProxySelector extends ProxySelector {
|
||||
});
|
||||
}
|
||||
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
defaultProxySelector.connectFailed(uri, sa, ioe);
|
||||
if (executeConnectionFailed) {
|
||||
/**
|
||||
* Just try to make the behavior of jre proxy selector same like eclipse proxy selector
|
||||
*/
|
||||
ProxySelector defaultProxySelector = getDefaultProxySelector();
|
||||
if (defaultProxySelector != null) {
|
||||
defaultProxySelector.connectFailed(uri, sa, ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider() {
|
||||
if (disableDefaultSelector) {
|
||||
if (disableDefaultSelectorProvider) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(Thread.currentThread());
|
||||
}
|
||||
|
||||
public IProxySelectorProvider createDefaultProxySelectorProvider(String host) {
|
||||
if (disableDefaultSelector) {
|
||||
if (disableDefaultSelectorProvider) {
|
||||
return null;
|
||||
}
|
||||
return new DefaultProxySelectorProvider(host);
|
||||
@@ -445,6 +648,11 @@ public class TalendProxySelector extends ProxySelector {
|
||||
return possibleKeys;
|
||||
}
|
||||
|
||||
private enum EProxySelector {
|
||||
eclipse_default,
|
||||
jre
|
||||
}
|
||||
|
||||
private class DefaultProxySelectorProvider extends AbstractProxySelectorProvider {
|
||||
|
||||
private Thread currentThread = null;
|
||||
@@ -475,7 +683,7 @@ public class TalendProxySelector extends ProxySelector {
|
||||
|
||||
@Override
|
||||
public boolean canHandle(URI uri) {
|
||||
if (disableDefaultSelector) {
|
||||
if (disableDefaultSelectorProvider) {
|
||||
return false;
|
||||
}
|
||||
if (currentThread != null && Thread.currentThread() == currentThread) {
|
||||
|
||||
@@ -19,15 +19,18 @@ import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
|
||||
@@ -58,8 +61,14 @@ public class UpdatesHelper {
|
||||
|
||||
public static final String COMPONENT_SUFFIX = "_java.xml";
|
||||
|
||||
public static final String COMPONENT_TEMPLATES = "templates";
|
||||
|
||||
public static final String NEW_COMPONENT_PREFIX = "installer$$";
|
||||
|
||||
public static final String PRE_TALEND_PATCH = "talend.patch";
|
||||
|
||||
public static final String RECORD_SEPERATOR = ",";
|
||||
|
||||
public static boolean existArtifacts(File base) {
|
||||
return new File(base, FILE_ARTIFACTS).exists() || new File(base, FILE_JAR_ARTIFACTS).exists()
|
||||
|| new File(base, FILE_XZ_ARTIFACTS).exists();
|
||||
@@ -83,6 +92,9 @@ public class UpdatesHelper {
|
||||
* will check that existed the plugins folder only.
|
||||
*/
|
||||
public static boolean isPlainUpdate(File file) {
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
ZipFileStatus status = new ZipFileStatus(file);
|
||||
@@ -110,6 +122,9 @@ public class UpdatesHelper {
|
||||
* need check that contain "artifacts.xml", "content.xml" and "plugins" folder in same place.
|
||||
*/
|
||||
public static boolean isUpdateSite(File file) {
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
|
||||
@@ -171,7 +186,7 @@ public class UpdatesHelper {
|
||||
}
|
||||
|
||||
private static void findUpdateBaseFile(Set<File> foundUpdateFiles, File baseFile) {
|
||||
if (isPlainUpdate(baseFile) || isUpdateSite(baseFile) && !isComponentUpdateSite(baseFile)) {
|
||||
if (isPlainUpdate(baseFile) || isUpdateSite(baseFile)) {
|
||||
foundUpdateFiles.add(baseFile);
|
||||
} else if (baseFile.isDirectory()) {
|
||||
final File[] listFiles = baseFile.listFiles();
|
||||
@@ -184,6 +199,9 @@ public class UpdatesHelper {
|
||||
}
|
||||
|
||||
public static boolean isComponentUpdateSite(File file) {
|
||||
if (skipPatchFile(file)) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isFile() && file.getName().endsWith(FileExtensions.ZIP_FILE_SUFFIX)) {
|
||||
ZipFileStatus status = new ZipFileStatus(file) {
|
||||
@@ -296,6 +314,9 @@ public class UpdatesHelper {
|
||||
|
||||
public static boolean isOldComponent(File f) {
|
||||
if (f != null && f.exists() && f.isDirectory()) {
|
||||
if (f.getName().equals(COMPONENT_TEMPLATES)) {
|
||||
return true;
|
||||
}
|
||||
File[] listFiles = f.listFiles();
|
||||
if (listFiles != null) {
|
||||
for (File subFile : listFiles) {
|
||||
@@ -307,4 +328,53 @@ public class UpdatesHelper {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static File getProductFile() {
|
||||
try {
|
||||
return new File(Platform.getInstallLocation().getDataArea(FILE_ECLIPSE_PRODUCT).getPath());
|
||||
} catch (IOException e) {
|
||||
//
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Properties loadProductProperties(File productFile) {
|
||||
Properties prop = new Properties();
|
||||
if (productFile != null && productFile.exists()) {
|
||||
try (FileInputStream fis = new FileInputStream(productFile)) {
|
||||
prop.load(fis);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
public static Set<String> getPatchesInstalled() {
|
||||
Set<String> installed = new HashSet<String>();
|
||||
File productFile = getProductFile();
|
||||
Properties props = loadProductProperties(productFile);
|
||||
props.forEach((k, v) -> {
|
||||
String key = String.valueOf(k);
|
||||
if (key.startsWith(PRE_TALEND_PATCH)) {
|
||||
String val = String.valueOf(v);
|
||||
String[] vals = val.split(RECORD_SEPERATOR);
|
||||
if (vals.length > 1) {
|
||||
installed.add(vals[1]);
|
||||
} else {
|
||||
installed.add(val);
|
||||
}
|
||||
}
|
||||
});
|
||||
return installed;
|
||||
}
|
||||
|
||||
public static boolean skipPatchFile(File patchFile) {
|
||||
Set<String> installedPathNames = getPatchesInstalled();
|
||||
if (patchFile != null && patchFile.isFile()) {
|
||||
String patchName = FilenameUtils.getBaseName(patchFile.getName());
|
||||
return installedPathNames.contains(patchName);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
talend.version=7.3.1
|
||||
talend.version=7.4.1
|
||||
|
||||
@@ -225,7 +225,7 @@ public abstract class ExtendedPushButton implements IExtendedPushButton {
|
||||
if (extendedControlModel == null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
return !extendedControlModel.isReadonly();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,5 +94,9 @@ public abstract class AbstractExtendedControlModel {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isReadonly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -398,4 +398,9 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
|
||||
this.tableViewer = tableViewer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadonly() {
|
||||
return super.isReadonly();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,9 +25,7 @@ import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Item;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
@@ -106,15 +104,6 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
this.source = sourceTable;
|
||||
|
||||
dataToTableItemCache = new DataToTableItemCache(sourceTable);
|
||||
if (Platform.OS_LINUX.equals(Platform.getOS())) {
|
||||
this.source.addListener(SWT.EraseItem, new Listener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
drawBackground(event.gc);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected IStyleLink getDefaultStyleLink() {
|
||||
@@ -242,7 +231,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
|
||||
int yStraight = sourceToCommonPoint.y + treeItemHeight / 2 + tableItemBounds.y;
|
||||
pointEndStraight.x = sourceToCommonPoint.x + xStartBezierLink;
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS()) || Platform.OS_LINUX.equals(Platform.getOS())) {
|
||||
pointStartStraight.x = sourceToCommonPoint.x + tableItem.getParent().getBounds().width;
|
||||
pointEndStraight.x = pointStartStraight.x;
|
||||
} else {
|
||||
@@ -323,6 +312,9 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
|
||||
if (Platform.OS_LINUX.equals(Platform.getOS())) {
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height - treeItemHeight / 2;
|
||||
}
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
|
||||
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
|
||||
}
|
||||
drawableLink.setPoint1(pointEndStraight);
|
||||
drawableLink.setPoint2(pointEndCentralCurve);
|
||||
|
||||
|
||||
@@ -212,4 +212,8 @@ public class CommonTextCellEditorWithProposal {
|
||||
return this.contentProposalAdapter;
|
||||
}
|
||||
|
||||
public int getPreviousActivatedIndex() {
|
||||
return previousActivatedIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,4 +97,7 @@ public class ExtendedTextCellEditorWithProposal extends ExtendedTextCellEditor i
|
||||
super.fireCancelEditor();
|
||||
}
|
||||
|
||||
public CommonTextCellEditorWithProposal getCommonTextEditor() {
|
||||
return commonTextEditor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ public class JobAndNodesParametersRelationshipHandler implements IItemRelationsh
|
||||
}
|
||||
}
|
||||
}
|
||||
relationsMap.values().removeIf(value -> value.isEmpty());
|
||||
return relationsMap;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.repository.handlers;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.model.properties.Item;
|
||||
@@ -43,8 +44,13 @@ public class JobRoutinesItemRelationshipHandler extends AbstractJobItemRelations
|
||||
Set<Relation> relationSet = new HashSet<Relation>();
|
||||
|
||||
if (processType.getParameters() != null && processType.getParameters().getRoutinesParameter() != null) {
|
||||
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
|
||||
for (Object o : processType.getParameters().getRoutinesParameter()) {
|
||||
RoutinesParameterType itemInfor = (RoutinesParameterType) o;
|
||||
if (currentSystemRoutinesMap.containsValue(itemInfor.getName())) {
|
||||
// exclude system routines relation
|
||||
continue;
|
||||
}
|
||||
|
||||
Relation addedRelation = new Relation();
|
||||
addedRelation.setId(itemInfor.getName());
|
||||
|
||||
@@ -22,6 +22,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.PredicateUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.ISafeRunnable;
|
||||
|
||||
@@ -70,6 +70,7 @@ import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
|
||||
import org.talend.commons.utils.data.container.RootContainer;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
import org.talend.commons.utils.time.TimeMeasure;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.AbstractDQModelService;
|
||||
@@ -107,6 +108,7 @@ import org.talend.core.model.properties.SpagoBiServer;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.model.properties.impl.FolderItemImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.Folder;
|
||||
import org.talend.core.model.repository.IRepositoryContentHandler;
|
||||
@@ -122,6 +124,7 @@ import org.talend.core.repository.constants.Constant;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.core.repository.utils.ProjectDataJsonProvider;
|
||||
import org.talend.core.repository.utils.RepositoryPathProvider;
|
||||
import org.talend.core.repository.utils.XmiResourceManager;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -872,6 +875,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
|
||||
this.repositoryFactoryFromProvider.deleteObjectPhysical(project, object, version, fromEmptyRecycleBin);
|
||||
if (isFullLogonFinished()) {
|
||||
fireRepositoryPropertyChange(ERepositoryActionName.AFTER_DELETE.getName(), null, object);
|
||||
}
|
||||
// i18n
|
||||
// log.info("Physical deletion [" + objToDelete + "] by " + getRepositoryContext().getUser() + ".");
|
||||
String str[] = new String[] { object.toString(), getRepositoryContext().getUser().toString() };
|
||||
@@ -2034,6 +2040,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
TimeMeasure.begin("logOnProject"); //$NON-NLS-1$
|
||||
try {
|
||||
/**
|
||||
* init/check proxy selector, in case default proxy selector is not registed yet
|
||||
*/
|
||||
TalendProxySelector.checkProxy();
|
||||
|
||||
System.getProperties().put("ReadOnlyUser", Boolean.FALSE.toString()); //$NON-NLS-1$
|
||||
|
||||
// remove the auto-build to enhance the build speed and application's use
|
||||
@@ -2053,6 +2064,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
SubMonitor subMonitor = SubMonitor.convert(monitor, MAX_TASKS);
|
||||
SubMonitor currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
|
||||
|
||||
project.setReferenceProjectProvider(null);
|
||||
getRepositoryContext().setProject(null);
|
||||
initEmfProjectContent();
|
||||
@@ -2071,6 +2083,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ProjectManager.getInstance().getBeforeLogonRecords().clear();
|
||||
ProjectManager.getInstance().getUpdatedRemoteHandlerRecords().clear();
|
||||
|
||||
ProjectDataJsonProvider.checkAndRectifyRelationShipSetting(project.getEmfProject());
|
||||
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
@@ -2230,6 +2244,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
tdqRepositoryService.initProxyRepository();
|
||||
}
|
||||
}
|
||||
// regenerate relationship index
|
||||
if (project.getEmfProject().getItemsRelations().isEmpty()) {
|
||||
RelationshipItemBuilder.getInstance().buildAndSaveIndex();
|
||||
}
|
||||
|
||||
fullLogonFinished = true;
|
||||
this.repositoryFactoryFromProvider.afterLogon(monitor);
|
||||
} finally {
|
||||
@@ -2409,9 +2428,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void executeRepositoryWorkUnit(RepositoryWorkUnit workUnit) {
|
||||
checkProxySettings();
|
||||
this.repositoryFactoryFromProvider.executeRepositoryWorkUnit(workUnit);
|
||||
}
|
||||
|
||||
private void checkProxySettings() {
|
||||
TalendProxySelector.checkProxy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unloadResources(Property property) throws PersistenceException {
|
||||
repositoryFactoryFromProvider.unloadResources(property);
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model.dnd;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsService;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.SalesforceSchemaConnectionItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
@@ -28,6 +32,8 @@ import org.talend.repository.model.RepositoryNode;
|
||||
*/
|
||||
public class SalesforceComponentDndFilter extends DefaultRepositoryComponentDndFilter {
|
||||
|
||||
public static final String SALSEFORCE = "salesforce"; //$NON-NLS-1$
|
||||
|
||||
public static final String COMPONENT_T_SALSEFORCE_CONNECTION = "tSalesforceConnection"; //$NON-NLS-1$
|
||||
|
||||
public static final String COMPONENT_T_SALSEFORCE_WAVE_BULK_EXEC = "tSalesforceWaveBulkExec"; //$NON-NLS-1$
|
||||
@@ -98,7 +104,16 @@ public class SalesforceComponentDndFilter extends DefaultRepositoryComponentDndF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (item instanceof ConnectionItem && SALSEFORCE.equalsIgnoreCase(((ConnectionItem) item).getTypeName())) {
|
||||
// Special for Javajet components: tSalesforceEinsteinBulkExec/tSalesforceEinsteinOutputBulkExec
|
||||
IComponentsService service = GlobalServiceRegister.getDefault().getService(IComponentsService.class);
|
||||
Collection<IComponent> componentAll = service.getComponentsFactory().readComponents();
|
||||
for (IComponent component : componentAll) {
|
||||
if (component.getName().startsWith("tSalesforceEinstein") && !components.contains(component)) { //$NON-NLS-1$
|
||||
components.add(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
return components;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.PredicateUtils;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
@@ -75,7 +77,9 @@ public class RecycleBinManager {
|
||||
}
|
||||
|
||||
public List<String> getDeletedFolders(Project project) {
|
||||
return new ArrayList<String>(project.getEmfProject().getDeletedFolders());
|
||||
List<String> folders = new ArrayList<String>(project.getEmfProject().getDeletedFolders());
|
||||
CollectionUtils.filter(folders, PredicateUtils.notNullPredicate());
|
||||
return folders;
|
||||
}
|
||||
|
||||
public void clearCache() {
|
||||
@@ -106,7 +110,8 @@ public class RecycleBinManager {
|
||||
List<IRepositoryViewObject> deletedObjects = new ArrayList<IRepositoryViewObject>();
|
||||
final EList<TalendItem> deletedItems = projectRecyclebins.get(project.getTechnicalLabel()).getDeletedItems();
|
||||
List<TalendItem> notDeletedItems = new ArrayList<TalendItem>();
|
||||
for (TalendItem deletedItem : deletedItems) {
|
||||
List<TalendItem> dup_deletedItems = new ArrayList<>(deletedItems);
|
||||
for (TalendItem deletedItem : dup_deletedItems) {
|
||||
try {
|
||||
final ERepositoryObjectType type = ERepositoryObjectType.getType(deletedItem.getType());
|
||||
// ignore the generated doc in recycle bin
|
||||
@@ -230,7 +235,9 @@ public class RecycleBinManager {
|
||||
if (isSynchronizeToProject) {
|
||||
project.getDeletedFolders().clear();
|
||||
for (String deletedFolder : recycleBin.getDeletedFolders()) {
|
||||
project.getDeletedFolders().add(deletedFolder);
|
||||
if (deletedFolder != null) {
|
||||
project.getDeletedFolders().add(deletedFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -274,7 +281,8 @@ public class RecycleBinManager {
|
||||
resource = createRecycleBinResource(project);
|
||||
}
|
||||
resource.getContents().clear();
|
||||
recycleBin.setLastUpdate(new Date());
|
||||
// set date to null to avoid timezone conflict
|
||||
recycleBin.setLastUpdate(null);
|
||||
resource.getContents().add(recycleBin);
|
||||
EmfHelper.saveResource(resource);
|
||||
lastSavedRecycleBinMap.put(recycleBin, EcoreUtil.copy(recycleBin));
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
package org.talend.core.repository.ui.dialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -30,12 +32,14 @@ import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.IRepositoryObject;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.repository.utils.RepositoryNodeSortUtil;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
import org.talend.repository.model.RepositoryNode;
|
||||
import org.talend.repository.model.IRepositoryNode.EProperties;
|
||||
@@ -107,7 +111,8 @@ public class PastSelectorDialog extends Dialog {
|
||||
modificationTime.setWidth(200);
|
||||
modificationTime.setText("Modification Time");
|
||||
|
||||
for (IRepositoryViewObject object : versions) {
|
||||
RepositoryNodeSortUtil util = new RepositoryNodeSortUtil();
|
||||
for (IRepositoryViewObject object : util.getSortVersion(versions)) {
|
||||
TableItem item = new TableItem(table, SWT.NONE);
|
||||
item.setData(object);
|
||||
item.setText(0, object.getVersion());
|
||||
@@ -187,7 +192,7 @@ public class PastSelectorDialog extends Dialog {
|
||||
});
|
||||
return composite;
|
||||
}
|
||||
|
||||
|
||||
public Set<IRepositoryViewObject> getSelectedVersionItems() {
|
||||
return this.selectedVersionItems;
|
||||
}
|
||||
|
||||
@@ -292,13 +292,13 @@ public class ConvertJobsUtil {
|
||||
String[] items = JobBatchFramework.getFrameworkToDispaly();
|
||||
frameworkCombo.setItems(items);
|
||||
if (items.length > 0) {
|
||||
frameworkCombo.select(0);
|
||||
frameworkCombo.setText(JobBatchFramework.SPARKFRAMEWORK.getDisplayName());
|
||||
}
|
||||
} else if (JobType.BIGDATASTREAMING.getDisplayName().equals(jobTypeValue)) {
|
||||
String[] items = JobStreamingFramework.getFrameworkToDispaly();
|
||||
frameworkCombo.setItems(items);
|
||||
if (items.length > 0) {
|
||||
frameworkCombo.select(0);
|
||||
frameworkCombo.setText(JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -32,6 +33,7 @@ import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.model.properties.ImplicitContextSettings;
|
||||
@@ -43,6 +45,7 @@ import org.talend.core.model.properties.Project;
|
||||
import org.talend.core.model.properties.StatAndLogsSettings;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.impl.PropertiesFactoryImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.repository.constants.FileConstants;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
@@ -116,7 +119,9 @@ public class ProjectDataJsonProvider {
|
||||
RecycleBin recycleBin = RecycleBinManager.getInstance().getRecycleBin(project);
|
||||
project.getDeletedFolders().clear();
|
||||
for (String element : recycleBin.getDeletedFolders()) {
|
||||
project.getDeletedFolders().add(element);
|
||||
if (element != null) {
|
||||
project.getDeletedFolders().add(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((loadContent & CONTENT_MIGRATIONTASK) > 0) {
|
||||
@@ -140,9 +145,10 @@ public class ProjectDataJsonProvider {
|
||||
ProjectDataJsonProvider.loadProjectSettings(project, input);
|
||||
}
|
||||
IPath relationShipPath = settingFolderPath.append(FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
input = inputStreamProvider.getStream(relationShipPath);
|
||||
if (input != null) {
|
||||
ProjectDataJsonProvider.loadRelationShips(project, input);
|
||||
try (InputStream is = inputStreamProvider.getStream(relationShipPath)) {
|
||||
if (is != null) {
|
||||
ProjectDataJsonProvider.loadRelationShips(project, is);
|
||||
}
|
||||
}
|
||||
IPath migrationTaskPath = settingFolderPath.append(FileConstants.MIGRATION_TASK_FILE_NAME);
|
||||
input = inputStreamProvider.getStream(migrationTaskPath);
|
||||
@@ -184,10 +190,11 @@ public class ProjectDataJsonProvider {
|
||||
private static void loadRelationShips(Project project, IPath projectFolderPath) throws PersistenceException {
|
||||
File file = getLoadingConfigurationFile(projectFolderPath, FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
loadRelationShips(project, new FileInputStream(file));
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new PersistenceException(e);
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
loadRelationShips(project, fis);
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,11 +213,72 @@ public class ProjectDataJsonProvider {
|
||||
project.getItemsRelations().add(json.toEmfObject());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkAndRectifyRelationShipSetting(Project project) throws PersistenceException {
|
||||
File file = getSavingConfigurationFile(project.getTechnicalLabel(), FileConstants.RELATIONSHIP_FILE_NAME);
|
||||
if (file == null || !file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<ItemRelationsJson> itemRelationsJsonsList = null;
|
||||
TypeReference<List<ItemRelationsJson>> typeReference = new TypeReference<List<ItemRelationsJson>>() {
|
||||
};
|
||||
FileInputStream input = null;
|
||||
try {
|
||||
input = new FileInputStream(file);
|
||||
itemRelationsJsonsList = new ObjectMapper().readValue(new FileInputStream(file), typeReference);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
} finally {
|
||||
closeInputStream(input);
|
||||
}
|
||||
|
||||
if (itemRelationsJsonsList == null || itemRelationsJsonsList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<String> idVersionSet = new HashSet<String>();
|
||||
List<ItemRelationsJson> relationJsonList = new ArrayList<ItemRelationsJson>();
|
||||
Map<String, String> currentSystemRoutinesMap = RelationshipItemBuilder.getInstance().getCurrentSystemRoutinesMap();
|
||||
boolean needModify = false;
|
||||
for (ItemRelationsJson relationJson : itemRelationsJsonsList) {
|
||||
ItemRelationJson baseItem = relationJson.getBaseItem();
|
||||
String idversion = baseItem.getId() + ";" + baseItem.getVersion();
|
||||
if (idVersionSet.contains(idversion)) {
|
||||
// in case duplicate
|
||||
needModify = true;
|
||||
continue;
|
||||
}
|
||||
// remove system routines relation
|
||||
int originalSize = relationJson.getRelatedItems().size();
|
||||
relationJson.getRelatedItems()
|
||||
.removeIf(relatedItem -> RelationshipItemBuilder.ROUTINE_RELATION.equals(relatedItem.getType())
|
||||
&& currentSystemRoutinesMap.containsValue(relatedItem.getId()));
|
||||
if (relationJson.getRelatedItems().size() != originalSize) {
|
||||
needModify = true;
|
||||
}
|
||||
if (!relationJson.getRelatedItems().isEmpty()) {
|
||||
relationJsonList.add(relationJson);
|
||||
}
|
||||
idVersionSet.add(idversion);
|
||||
}
|
||||
|
||||
if (needModify) {
|
||||
// re-load to project
|
||||
if (relationJsonList != null && !relationJsonList.isEmpty()) {
|
||||
project.getItemsRelations().clear();
|
||||
for (ItemRelationsJson json : relationJsonList) {
|
||||
project.getItemsRelations().add(json.toEmfObject());
|
||||
}
|
||||
}
|
||||
// re-save relationship setting json file
|
||||
saveRelationShips(project);
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMigrationTaskSetting(Project project, IPath projectFolderPath) throws PersistenceException {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.commons.utils.Version;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
|
||||
/**
|
||||
* @author hwang
|
||||
*
|
||||
*/
|
||||
public class RepositoryNodeSortUtil {
|
||||
|
||||
public List<IRepositoryViewObject> getSortVersion(List<IRepositoryViewObject> versions) {
|
||||
List<IRepositoryViewObject> temp = new ArrayList<IRepositoryViewObject>();
|
||||
temp.addAll(versions);
|
||||
|
||||
Collections.sort(temp, new Comparator<IRepositoryViewObject>() {
|
||||
|
||||
@Override
|
||||
public int compare(IRepositoryViewObject o1, IRepositoryViewObject o2) {
|
||||
String version1 = o1.getVersion();
|
||||
String version2 = o2.getVersion();
|
||||
if(version1 != null && version2 != null) {
|
||||
return new Version(version1).compareTo(new Version(version2));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ Export-Package: org.talend.commons.utils.generation,
|
||||
org.talend.core.model.business,
|
||||
org.talend.core.model.components,
|
||||
org.talend.core.model.context,
|
||||
org.talend.core.model.context.link,
|
||||
org.talend.core.model.general,
|
||||
org.talend.core.model.genhtml,
|
||||
org.talend.core.model.metadata,
|
||||
@@ -121,7 +122,8 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
|
||||
@@ -9,13 +9,14 @@
|
||||
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
|
||||
<dbType type="CHARACTER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHARACTER VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" defaultPattern="dd-MM-yyyy" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DOUBLE PRECISION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="UNSIGNED INT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" defaultLength="10" ignorePre="false" />
|
||||
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="REAL" />
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
|
||||
@@ -175,6 +176,11 @@
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Short" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="NUMERIC">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_Float"/>
|
||||
|
||||
@@ -100,6 +100,11 @@
|
||||
<xs:restriction base="xs:short"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="defaultPattern">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string"/>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="default" type="xs:boolean"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<extension-point id="hadoopConnectionCreator" name="Hadoop Connection Creator" schema="schema/hadoopConnectionCreator.exsd"/>
|
||||
<extension-point id="artifact_handler" name="Artifact Repository Handler" schema="schema/artifact_handler.exsd"/>
|
||||
<extension-point id="actionFilterDelegate" name="Action Filter delegate" schema="schema/actionFilterDelegate.exsd"/>
|
||||
<extension-point id="saveItemContextLinkService" name="Save Item Context Link Service" schema="schema/saveItemContextLinkService.exsd"/>
|
||||
|
||||
<extension
|
||||
point="org.talend.core.runtime.repositoryComponent_provider">
|
||||
@@ -53,4 +54,28 @@
|
||||
name="Talend">
|
||||
</category>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
point="org.talend.core.runtime.service">
|
||||
<Service
|
||||
class="org.talend.core.model.update.RepositoryContextUpdateService"
|
||||
serviceId="IRepositoryContextUpdateService">
|
||||
</Service>
|
||||
<Service
|
||||
class="org.talend.core.model.update.GenericDbContextUpdateService"
|
||||
serviceId="IRepositoryContextUpdateService">
|
||||
</Service>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.runtime.saveItemContextLinkService">
|
||||
<creator
|
||||
class="org.talend.core.model.context.link.ProcessItemContextLinkService">
|
||||
</creator>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.runtime.saveItemContextLinkService">
|
||||
<creator
|
||||
class="org.talend.core.model.context.link.ConnectionItemContextLinkService">
|
||||
</creator>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Schema file written by PDE -->
|
||||
<schema targetNamespace="org.talend.core.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.schema plugin="org.talend.core.runtime" id="saveItemContextLinkService" name="Save Item Context Link Service"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
Save the context link data for item which contain ContextType object
|
||||
The extension point must implements interface : org.talend.core.model.context.link.IItemContextLinkService
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.element />
|
||||
</appinfo>
|
||||
</annotation>
|
||||
<complexType>
|
||||
<sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<element ref="creator" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
<attribute name="point" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appinfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="creator">
|
||||
<complexType>
|
||||
<attribute name="class" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appinfo>
|
||||
<meta.attribute kind="java" basedOn=":org.talend.core.model.context.link.IItemContextLinkService"/>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.section type="since"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
7.4.1
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.section type="examples"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
[Enter extension point usage example here.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.section type="apiinfo"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
boolean accept(Item item);
|
||||
|
||||
boolean saveItemLink(Item item);
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.section type="implementation"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
[Enter information about supplied implementation of this extension point.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
|
||||
</schema>
|
||||
@@ -254,6 +254,34 @@ public final class ResourceUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Comment method "setFileContent".
|
||||
*
|
||||
* @param stream
|
||||
* @param file
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public static void setFileContent(InputStream stream, IFile file) throws PersistenceException {
|
||||
try {
|
||||
if (stream == null) {
|
||||
String msg = Messages.getString("resources.file.notCreated", file.getName(), //$NON-NLS-1$
|
||||
Messages.getString("ResourceUtils.streamNull")); //$NON-NLS-1$
|
||||
throw new PersistenceException(msg);
|
||||
}
|
||||
file.setContents(stream, true, false, null);
|
||||
} catch (CoreException e) {
|
||||
String msg = Messages.getString("resources.file.notCreated", file.getName(), e.getMessage()); //$NON-NLS-1$
|
||||
throw new PersistenceException(msg, e);
|
||||
} finally {
|
||||
try {
|
||||
if (stream != null) {
|
||||
stream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
CommonExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Convenience method to delete a file.<br/>
|
||||
*
|
||||
|
||||
@@ -12,35 +12,49 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.runtime.services.IGenericDBService;
|
||||
|
||||
/**
|
||||
* created by ldong on Mar 23, 2015 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class AbstractRepositoryContextUpdateService implements IRepositoryContextUpdateService {
|
||||
|
||||
@Override
|
||||
public void updateRelatedContextVariable(Connection con, String oldValue, String newValue) {
|
||||
|
||||
}
|
||||
|
||||
public abstract class AbstractRepositoryContextUpdateService implements IRepositoryContextUpdateService {
|
||||
protected IGenericDBService service = GlobalServiceRegister.getDefault().getService(IGenericDBService.class);
|
||||
protected String updateHadoopProperties(List<Map<String, Object>> hadoopProperties, String oldValue, String newValue) {
|
||||
String finalProperties = "";
|
||||
String finalProperties = null;
|
||||
boolean isModified = false;
|
||||
if (!hadoopProperties.isEmpty()) {
|
||||
for (Map<String, Object> propertyMap : hadoopProperties) {
|
||||
String propertyValue = (String) propertyMap.get("VALUE");
|
||||
if (propertyValue.equals(oldValue)) {
|
||||
propertyMap.put("VALUE", newValue);
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
finalProperties = HadoopRepositoryUtil.getHadoopPropertiesJsonStr(hadoopProperties);
|
||||
if (isModified) {
|
||||
finalProperties = HadoopRepositoryUtil.getHadoopPropertiesJsonStr(hadoopProperties);
|
||||
}
|
||||
}
|
||||
return finalProperties;
|
||||
}
|
||||
|
||||
protected boolean updateCompPropertiesContextParameter(Connection conn, String oldValue, String newValue) {
|
||||
boolean isModified = false;
|
||||
Map<String, String> oldToNewHM = new HashMap<String, String>();
|
||||
oldToNewHM.put(oldValue, newValue);
|
||||
String compProperties = conn.getCompProperties();
|
||||
if (service != null && StringUtils.isNotBlank(compProperties)) {
|
||||
service.updateCompPropertiesForContextMode(conn, oldToNewHM);
|
||||
isModified = true;
|
||||
}
|
||||
return isModified;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@@ -247,4 +249,29 @@ public class GlobalServiceRegister {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List findAllService(Class klass) {
|
||||
List serviceList = new ArrayList();
|
||||
String key = klass.getName();
|
||||
IConfigurationElement[] configElements = getConfigurationElements();
|
||||
if (configElements != null) {
|
||||
for (IConfigurationElement element : configElements) {
|
||||
if (element.isValid()) {
|
||||
String id = element.getAttribute("serviceId"); //$NON-NLS-1$
|
||||
if (!key.endsWith(id)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
Object service = element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
if (klass.isInstance(service)) {
|
||||
serviceList.add(service);
|
||||
};
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return serviceList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,5 +20,7 @@ import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
*/
|
||||
public interface IRepositoryContextUpdateService extends IService {
|
||||
|
||||
public void updateRelatedContextVariable(Connection con, String oldValue, String newValue);
|
||||
public boolean accept(Connection connection);
|
||||
|
||||
public boolean updateContextParameter(Connection conn, String oldValue, String newValue);
|
||||
}
|
||||
|
||||
@@ -20,9 +20,23 @@ import org.talend.core.model.process.INode;
|
||||
public interface ITDQCryptoFileService extends IService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param node
|
||||
* Get Original value if it is context variable
|
||||
*/
|
||||
public void generateCryptoFile(INode node);
|
||||
public String getOriginalValue(INode node, String input);
|
||||
|
||||
/**
|
||||
* Check whether all the parameter is validation
|
||||
*/
|
||||
public boolean checkParameterValidation(String cryptoFilePath, String passwordM1);
|
||||
|
||||
/**
|
||||
* Get the name of encrypty method
|
||||
*/
|
||||
public String getCryptoMethod();
|
||||
|
||||
/**
|
||||
* Generate Encrypty file
|
||||
*/
|
||||
public void generateCryptoFile(String passwordM1, String cryptoMethod, String cryptoFilePath);
|
||||
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ public enum EDatabaseTypeName {
|
||||
"IBM DB2 ZOS", "IBM DB2 ZOS", Boolean.TRUE, "IBM_DB2", "DB2", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Schema), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
SYBASEASE(
|
||||
"SybaseASE", "Sybase (ASE and IQ)", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SYBASEASE_SA(
|
||||
"SybaseASE", "SQL Anywhere", Boolean.TRUE, "SYBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
// this Sybase IQ not used.
|
||||
SYBASEIQ(
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.database;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
|
||||
|
||||
/**
|
||||
* DOC hzhao class global comment. Detailled comment
|
||||
*/
|
||||
public enum EImpalaDriver {
|
||||
|
||||
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver"),
|
||||
IMPALA40("IMPALA40", "IMPALA40", "com.cloudera.impala.jdbc4.Driver"),
|
||||
IMPALA41("IMPALA41", "IMPALA41", "com.cloudera.impala.jdbc41.Driver");
|
||||
|
||||
EImpalaDriver(String displayName, String name, String driver) {
|
||||
this.displayName = displayName;
|
||||
this.name = name;
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
private String displayName;
|
||||
|
||||
private String name;
|
||||
|
||||
private String driver;
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) {
|
||||
return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName);
|
||||
}
|
||||
|
||||
public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) {
|
||||
List<String> list = new ArrayList<>(0);
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (isSupport(distribution, version, byDisplay, "doSupportImpalaConnector")) {
|
||||
list.add(driver.getDisplayName());
|
||||
}
|
||||
}
|
||||
return list.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByDisplay(String display) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getDisplayName().equals(display)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByName(String name) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getName().equals(name)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -186,6 +186,10 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_HDI_PASSWORD = "CONN_PARA_KEY_HDI_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE = "CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE_USE_TLS = "CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE_USE_TLS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_HOSTNAME = "CONN_PARA_KEY_AZURE_HOSTNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_AZURE_CONTAINER = "CONN_PARA_KEY_AZURE_CONTAINER"; //$NON-NLS-1$
|
||||
@@ -263,6 +267,8 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String IMPALA_AUTHENTICATION_PRINCIPLA = "IMPALA_AUTHENTICATION_PRINCIPLA";//$NON-NLS-1$
|
||||
|
||||
public static final String IMPALA_DRIVER = "IMPALA_DRIVER";
|
||||
|
||||
/**
|
||||
* Google Dataproc keys.
|
||||
*/
|
||||
@@ -302,6 +308,8 @@ public class ConnParameterKeys {
|
||||
/**DataBricks*/
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
|
||||
|
||||
@@ -107,14 +107,14 @@ public enum EDatabaseVersion4Drivers {
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-9.4-1201.jdbc41.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
SYBASEASE(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 12/15", "SYBSEIQ_12_15", "jconn3.jar")), //$NON-NLS-1$
|
||||
SYBASEIQ_16(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16", "SYBSEIQ_16", "jconn4.jar")), //$NON-NLS-1$
|
||||
SYBASEIQ_16_SA(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16 (SQL Anywhere)", "SYBSEIQ_16_SA", "sajdbc4.jar")),
|
||||
SYBASEIQ_16_SA(new DbVersion4Drivers(EDatabaseTypeName.SYBASEASE, "Sybase 16 (SQL Anywhere)", "SYBSEIQ_16_SA", "sajdbc4-17.0.0.jar")),
|
||||
SYBASEIQ(new DbVersion4Drivers(EDatabaseTypeName.SYBASEIQ, "jconn3.jar")), //$NON-NLS-1$
|
||||
|
||||
// for bug 0013127
|
||||
@@ -166,9 +166,9 @@ public enum EDatabaseVersion4Drivers {
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.37.1061.jar", "aws-java-sdk-1.11.406.jar", "jackson-core-2.9.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.9.9.jar", "jackson-annotations-2.9.0.jar", "httpcore-4.4.9.jar", "httpclient-4.5.5.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.1.3.jar", "commons-codec-1.6.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.37.1061.jar", "aws-java-sdk-1.11.729.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.10.1.jar", "jackson-annotations-2.10.1.jar", "httpcore-4.4.11.jar", "httpclient-4.5.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ public enum EHadoopProperties {
|
||||
QUBOLE_S3_REGION,
|
||||
|
||||
DATABRICKS_ENDPOINT,
|
||||
DATABRICKS_CLOUD_PROVIDER,
|
||||
DATABRICKS_CLUSTER_ID,
|
||||
DATABRICKS_TOKEN,
|
||||
DATABRICKS_DBFS_DEP_FOLDER;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.hadoop.version;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* created by hcyi on May 27, 2020
|
||||
* Detailled comment
|
||||
*
|
||||
*/
|
||||
public enum EHdinsightStorage {
|
||||
|
||||
ADLS_GEN2("ADLS Gen2"), //$NON-NLS-1$
|
||||
|
||||
AZURE_STORAGE("Azure storage"); //$NON-NLS-1$
|
||||
|
||||
private String displayName;
|
||||
|
||||
EHdinsightStorage(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static List<String> getAllHdinsightStorageDisplayNames() {
|
||||
return getAllHdinsightStorageNames(true);
|
||||
}
|
||||
|
||||
public static List<String> getAllHdinsightStorageNames(boolean display) {
|
||||
List<String> names = new ArrayList<String>();
|
||||
EHdinsightStorage[] values = values();
|
||||
for (EHdinsightStorage storage : values) {
|
||||
if (display) {
|
||||
names.add(storage.getDisplayName());
|
||||
} else {
|
||||
names.add(storage.getName());
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static EHdinsightStorage getHdinsightStoragenByDisplayName(String name) {
|
||||
return getHdinsightStorageByName(name, true);
|
||||
}
|
||||
|
||||
public static EHdinsightStorage getHdinsightStorageByName(String name, boolean display) {
|
||||
if (name != null) {
|
||||
for (EHdinsightStorage storage : values()) {
|
||||
if (display) {
|
||||
if (name.equalsIgnoreCase(storage.getDisplayName())) {
|
||||
return storage;
|
||||
}
|
||||
} else {
|
||||
if (name.equalsIgnoreCase(storage.getName())) {
|
||||
return storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,12 @@ public final class ComponentUtilities {
|
||||
if (value != null) {
|
||||
String replaceAll = value.replaceAll(oldName2, newName);
|
||||
t.setValue(replaceAll);
|
||||
if (!"UNIQUE_NAME".equals(t.getName())) {
|
||||
if (replaceAll.contains(oldName)) {
|
||||
replaceAll = replaceAll.replaceAll(oldName, newName);
|
||||
t.setValue(replaceAll);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ public interface IMultipleComponentConnection {
|
||||
|
||||
public String getConnectionType();
|
||||
|
||||
public String getConnectorName();
|
||||
|
||||
public void setConnectionType(String connectionType);
|
||||
|
||||
public String getNameTarget();
|
||||
|
||||
@@ -14,6 +14,8 @@ package org.talend.core.model.components;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.model.process.INode;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
*
|
||||
@@ -33,4 +35,7 @@ public interface IMultipleComponentItem {
|
||||
public String getComponent();
|
||||
|
||||
public void setComponent(String component);
|
||||
|
||||
public void updateNode(INode newNode, INode oldNode);
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,6 @@ public interface IMultipleComponentManager {
|
||||
|
||||
public boolean isLookupMode();
|
||||
|
||||
public String getParamSeperator();
|
||||
|
||||
}
|
||||
|
||||
@@ -21,8 +21,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.jdt.core.JavaConventions;
|
||||
import org.eclipse.jdt.core.JavaCore;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
@@ -30,6 +33,9 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.platform.PluginChecker;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
import org.talend.core.model.context.link.ContextLinkService;
|
||||
import org.talend.core.model.context.link.ContextParamLink;
|
||||
import org.talend.core.model.context.link.ItemContextLink;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.MetadataToolHelper;
|
||||
import org.talend.core.model.metadata.types.ContextParameterJavaTypeManager;
|
||||
@@ -43,6 +49,7 @@ import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
@@ -53,6 +60,8 @@ import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
*/
|
||||
public class ContextUtils {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ContextUtils.class);
|
||||
|
||||
private static final Set<String> JAVA_KEYWORDS = new HashSet<String>(Arrays.asList("abstract", "continue", "for", "new", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"switch", "assert", "default", "goto", "package", "synchronized", "boolean", "do", "if", "private", "this", "break", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
|
||||
"double", "implements", "protected", "throw", "byte", "else", "import", "public", "throws", "case", "enum", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
|
||||
@@ -82,15 +91,25 @@ public class ContextUtils {
|
||||
* update the JobContextParameter form repository ContextItem by context name.
|
||||
*
|
||||
*/
|
||||
public static boolean updateParameterFromRepository(ContextItem sourceItem, IContextParameter contextParam, String contextName) {
|
||||
public static boolean updateParameterFromRepository(Item sourceItem, IContextParameter contextParam, String contextName) {
|
||||
return updateParameterFromRepository(sourceItem, contextParam, contextName, null);
|
||||
}
|
||||
|
||||
public static boolean updateParameterFromRepository(Item sourceItem, IContextParameter contextParam, String contextName,
|
||||
Map<String, String> renameMap) {
|
||||
if (sourceItem == null || contextParam == null) {
|
||||
return false;
|
||||
}
|
||||
// not found, use default.
|
||||
ContextType contextType = getContextTypeByName(sourceItem, contextName, true);
|
||||
ContextType contextType = getContextTypeByName(sourceItem, contextName);
|
||||
|
||||
if (contextType != null) {
|
||||
ContextParameterType parameterType = getContextParameterTypeByName(contextType, contextParam.getName());
|
||||
String paramName = contextParam.getName();
|
||||
String newName = ContextUtils.getNewNameFromRenameMap(renameMap, paramName);
|
||||
if (newName != null) {
|
||||
paramName = newName;
|
||||
}
|
||||
ContextParameterType parameterType = getContextParameterTypeByName(contextType, paramName);
|
||||
// found parameter, update it.
|
||||
if (parameterType != null) {
|
||||
contextParam.setComment(parameterType.getComment());
|
||||
@@ -98,6 +117,9 @@ public class ContextUtils {
|
||||
contextParam.setPromptNeeded(parameterType.isPromptNeeded());
|
||||
contextParam.setType(parameterType.getType());
|
||||
contextParam.setValue(parameterType.getRawValue());
|
||||
if (!StringUtils.equals(contextParam.getName(), parameterType.getName())) {
|
||||
contextParam.setName(parameterType.getName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -178,6 +200,28 @@ public class ContextUtils {
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
|
||||
boolean isFromContextItem) {
|
||||
if (contextType == null || uuId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ContextParameterType parameterType = null;
|
||||
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
|
||||
String paramId = null;
|
||||
if (isFromContextItem) {
|
||||
paramId = ResourceHelper.getUUID(param);
|
||||
} else {
|
||||
paramId = param.getInternalId();
|
||||
}
|
||||
if (uuId.equals(paramId)) {
|
||||
parameterType = param;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return parameterType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static boolean checkObject(Object obj) {
|
||||
if (obj == null) {
|
||||
@@ -372,6 +416,7 @@ public class ContextUtils {
|
||||
targetParam.setValue(sourceParam.getValue());
|
||||
targetParam.setPromptNeeded(sourceParam.isPromptNeeded());
|
||||
targetParam.setComment(sourceParam.getComment());
|
||||
targetParam.setInternalId(sourceParam.getInternalId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -411,7 +456,7 @@ public class ContextUtils {
|
||||
targetParam.setValue(sourceParam.getRawValue());
|
||||
targetParam.setPromptNeeded(sourceParam.isPromptNeeded());
|
||||
targetParam.setComment(sourceParam.getComment());
|
||||
|
||||
targetParam.setInternalId(sourceParam.getInternalId());
|
||||
}
|
||||
|
||||
public static Map<String, Item> getRepositoryContextItemIdMapping() {
|
||||
@@ -495,9 +540,9 @@ public class ContextUtils {
|
||||
return true;
|
||||
}
|
||||
if (targetParamType != null && sourceParam != null) {
|
||||
// if (!sourceParam.getName().equals(targetParamType.getName())) {
|
||||
// return false;
|
||||
// }
|
||||
if (!StringUtils.equals(sourceParam.getName(), targetParamType.getName())) {
|
||||
return false;
|
||||
}
|
||||
if (sourceParam.getComment() == null) {
|
||||
sourceParam.setComment(""); //$NON-NLS-1$
|
||||
}
|
||||
@@ -538,8 +583,8 @@ public class ContextUtils {
|
||||
}
|
||||
|
||||
// preference name must match TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE
|
||||
return Boolean.parseBoolean(CoreRuntimePlugin.getInstance().getDesignerCoreService()
|
||||
.getPreferenceStore("propagateContextVariable")); //$NON-NLS-1$
|
||||
return Boolean.parseBoolean(
|
||||
CoreRuntimePlugin.getInstance().getDesignerCoreService().getPreferenceStore("propagateContextVariable")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -573,17 +618,17 @@ public class ContextUtils {
|
||||
|
||||
boolean modified = false;
|
||||
for (String varName : set) {
|
||||
ContextParameterType contextParameterType = ContextUtils.getContextParameterTypeByName(
|
||||
contextType, varName);
|
||||
IContextParameter contextParameter = processJobManager.getDefaultContext().getContextParameter(
|
||||
varName);
|
||||
ContextParameterType contextParameterType = ContextUtils
|
||||
.getContextParameterTypeByName(contextType, varName);
|
||||
IContextParameter contextParameter = processJobManager.getDefaultContext()
|
||||
.getContextParameter(varName);
|
||||
if (contextParameter == null) { // added
|
||||
addContextParameterType(processJobManager, contextItem, contextParameterType);
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
if (modified) {
|
||||
processJobManager.saveToEmf(processType.getContext());
|
||||
processJobManager.saveToEmf(processType.getContext(), true);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
@@ -672,8 +717,324 @@ public class ContextUtils {
|
||||
|
||||
contextParam.setPromptNeeded(contextParamType.isPromptNeeded());
|
||||
contextParam.setComment(contextParamType.getComment());
|
||||
contextParam.setInternalId(contextParamType.getInternalId());
|
||||
contextParam.setSource(contextItem.getProperty().getId());
|
||||
return contextParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the context type from item (ContextItem/JobletProcessItem/ProcessItem), If the name is null will use default
|
||||
* context
|
||||
*
|
||||
* @param item
|
||||
* @param contextName
|
||||
* @return
|
||||
*/
|
||||
public static ContextType getContextTypeByName(Item item, String contextName) {
|
||||
if (item instanceof ContextItem) {
|
||||
ContextItem contextItem = (ContextItem) item;
|
||||
if (contextName == null) {
|
||||
contextName = contextItem.getDefaultContext();
|
||||
}
|
||||
return ContextUtils.getContextTypeByName(contextItem, contextName, true);
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
|
||||
return ContextUtils.getContextTypeByName((List<ContextType>) jobletProcessItem.getJobletProcess().getContext(),
|
||||
contextName, jobletProcessItem.getJobletProcess().getDefaultContext());
|
||||
} else if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return ContextUtils.getContextTypeByName((List<ContextType>) processItem.getProcess().getContext(), contextName,
|
||||
processItem.getProcess().getDefaultContext());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDefaultContextName(Item item) {
|
||||
if (item instanceof ContextItem) {
|
||||
ContextItem contextItem = (ContextItem) item;
|
||||
return contextItem.getDefaultContext();
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
|
||||
return jobletProcessItem.getJobletProcess().getDefaultContext();
|
||||
} else if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return processItem.getProcess().getDefaultContext();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EList getAllContextType(Item item) {
|
||||
if (item instanceof ContextItem) {
|
||||
ContextItem contextItem = (ContextItem) item;
|
||||
return contextItem.getContext();
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
JobletProcessItem jobletProcessItem = (JobletProcessItem) item;
|
||||
return jobletProcessItem.getJobletProcess().getContext();
|
||||
} else if (item instanceof ProcessItem) {
|
||||
ProcessItem processItem = (ProcessItem) item;
|
||||
return processItem.getProcess().getContext();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Map<String, String> getContextParamterRenamedMap(Item item) {
|
||||
ItemContextLink itemContextLink = null;
|
||||
try {
|
||||
itemContextLink = ContextLinkService.getInstance().loadContextLinkFromJson(item);
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (itemContextLink != null) {
|
||||
if (item instanceof ConnectionItem) {
|
||||
return compareConnectionContextParamName((ConnectionItem) item, itemContextLink);
|
||||
} else {
|
||||
return compareContextParamName(item, itemContextLink);
|
||||
}
|
||||
}
|
||||
|
||||
return Collections.EMPTY_MAP;
|
||||
}
|
||||
|
||||
private static Map<String, String> compareContextParamName(Item processItem, ItemContextLink itemContextLink) {
|
||||
List<ContextType> contextTypeList = getAllContextType(processItem);
|
||||
return compareContextParamName(contextTypeList, itemContextLink);
|
||||
}
|
||||
|
||||
public static Map<String, String> compareContextParamName(List<ContextType> contextTypeList,
|
||||
ItemContextLink itemContextLink) {
|
||||
Map<String, String> renamedMap = new HashMap<String, String>();
|
||||
Map<String, Item> tempItemMap = new HashMap<String, Item>();
|
||||
for (ContextType contextType : contextTypeList) {
|
||||
for (Object obj : contextType.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) obj;
|
||||
ContextParamLink paramLink = itemContextLink.findContextParamLinkByName(
|
||||
contextParameterType.getRepositoryContextId(), contextType.getName(), contextParameterType.getName());
|
||||
if (paramLink != null) {
|
||||
Item item = tempItemMap.get(contextParameterType.getRepositoryContextId());
|
||||
if (item == null) {
|
||||
item = ContextUtils.getRepositoryContextItemById(contextParameterType.getRepositoryContextId());
|
||||
tempItemMap.put(contextParameterType.getRepositoryContextId(), item);
|
||||
}
|
||||
if (item != null) {
|
||||
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
|
||||
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
|
||||
paramLink.getId(), item instanceof ContextItem);
|
||||
if (repoContextParam != null
|
||||
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
|
||||
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return renamedMap;
|
||||
}
|
||||
|
||||
private static Map<String, String> compareConnectionContextParamName(ConnectionItem connectionItem,
|
||||
ItemContextLink itemContextLink) {
|
||||
Map<String, String> renamedMap = new HashMap<String, String>();
|
||||
if (connectionItem.getConnection().isContextMode()) {
|
||||
ContextItem contextItem = ContextUtils.getContextItemById2(connectionItem.getConnection().getContextId());
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem,
|
||||
connectionItem.getConnection().getContextName(), false);
|
||||
if (contextType != null) {
|
||||
for (Object obj : contextType.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType paramType = (ContextParameterType) obj;
|
||||
ContextParamLink paramLink = itemContextLink.findContextParamLinkById(
|
||||
connectionItem.getConnection().getContextId(),
|
||||
connectionItem.getConnection().getContextName(), ResourceHelper.getUUID(paramType));
|
||||
if (paramLink != null && !StringUtils.equals(paramType.getName(), paramLink.getName())) {
|
||||
renamedMap.put(paramType.getName(), paramLink.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return renamedMap;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemId
|
||||
* @param contextType
|
||||
* @return rename map. Key is new name and value is old name.
|
||||
*/
|
||||
public static Map<String, String> calculateRenamedMapFromLinkFile(String projectLabel, String itemId,
|
||||
List<IContext> contextList) {
|
||||
Map<String, String> renamedMap = new HashMap<String, String>();
|
||||
Map<String, Item> idToItemMap = new HashMap<String, Item>();
|
||||
try {
|
||||
if (contextList != null && contextList.size() > 0) {
|
||||
ItemContextLink itemContextLink = ContextLinkService.getInstance().doLoadContextLinkFromJson(projectLabel,
|
||||
itemId);
|
||||
if (itemContextLink != null) {
|
||||
IContext context = contextList.get(0);
|
||||
for (Object obj : context.getContextParameterList()) {
|
||||
if (obj instanceof IContextParameter) {
|
||||
IContextParameter parameterType = (IContextParameter) obj;
|
||||
ContextParamLink parameterLink = itemContextLink.findContextParamLinkByName(parameterType.getSource(),
|
||||
context.getName(), parameterType.getName());
|
||||
if (parameterLink != null) {
|
||||
Item item = idToItemMap.get(parameterType.getSource());
|
||||
if (item == null) {
|
||||
item = getRepositoryContextItemById(parameterType.getSource());
|
||||
idToItemMap.put(parameterType.getSource(), item);
|
||||
}
|
||||
if (item != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
|
||||
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
|
||||
parameterLink.getId(), item instanceof ContextItem);
|
||||
if (repoParameterType != null
|
||||
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
|
||||
renamedMap.put(repoParameterType.getName(), parameterType.getName());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return renamedMap;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC hcw ProcessUpdateManager class global comment. Detailled comment
|
||||
*/
|
||||
public static class ContextItemParamMap {
|
||||
|
||||
private Map<Item, Set<String>> map = new HashMap<Item, Set<String>>();
|
||||
|
||||
public void add(Item item, String param) {
|
||||
Set<String> params = map.get(item);
|
||||
if (params == null) {
|
||||
params = new HashSet<String>();
|
||||
map.put(item, params);
|
||||
}
|
||||
params.add(param);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set<String> get(Item item) {
|
||||
Set<String> params = map.get(item);
|
||||
return (params == null) ? Collections.EMPTY_SET : params;
|
||||
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return map.isEmpty();
|
||||
}
|
||||
|
||||
public Set<Item> getContexts() {
|
||||
return map.keySet();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean compareContextParameter(Item contextItem, ContextType contextType, IContextParameter param,
|
||||
ContextParamLink paramLink, Map<Item, Map<String, String>> repositoryRenamedMap, Map<Item, Set<String>> existedParams,
|
||||
ContextItemParamMap unsameMap, ContextItemParamMap deleteParams, boolean onlySimpleShow, boolean isDefaultContext) {
|
||||
boolean builtin = true;
|
||||
String paramName = param.getName();
|
||||
ContextParameterType contextParameterType = null;
|
||||
if (paramLink != null && paramLink.getId() != null && contextType != null) {
|
||||
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
|
||||
contextItem instanceof ContextItem);
|
||||
}
|
||||
if (contextParameterType != null) {// Compare use UUID
|
||||
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {
|
||||
if (isDefaultContext) {
|
||||
Map<String, String> renameMap = repositoryRenamedMap.get(contextItem);
|
||||
if (renameMap == null) {
|
||||
renameMap = new HashMap<String, String>();
|
||||
repositoryRenamedMap.put(contextItem, renameMap);
|
||||
}
|
||||
renameMap.put(contextParameterType.getName(), paramName);
|
||||
}
|
||||
} else {
|
||||
if (isDefaultContext) {
|
||||
if (existedParams.get(contextItem) == null) {
|
||||
existedParams.put(contextItem, new HashSet<String>());
|
||||
}
|
||||
existedParams.get(contextItem).add(paramName);
|
||||
}
|
||||
if (onlySimpleShow || !samePropertiesForContextParameter(param, contextParameterType)) {
|
||||
unsameMap.add(contextItem, paramName);
|
||||
}
|
||||
}
|
||||
builtin = false;
|
||||
} else { // Compare use Name
|
||||
contextParameterType = ContextUtils.getContextParameterTypeByName(contextType, paramName);
|
||||
if (contextParameterType != null) {
|
||||
Item repositoryContext = contextItem;
|
||||
if (isDefaultContext) {
|
||||
if (existedParams.get(contextItem) == null) {
|
||||
existedParams.put(repositoryContext, new HashSet<String>());
|
||||
}
|
||||
existedParams.get(repositoryContext).add(paramName);
|
||||
}
|
||||
if (onlySimpleShow || !ContextUtils.samePropertiesForContextParameter(param, contextParameterType)) {
|
||||
unsameMap.add(contextItem, paramName);
|
||||
}
|
||||
builtin = false;
|
||||
} else {
|
||||
// delete context variable
|
||||
if (ContextUtils.isPropagateContextVariable()) {
|
||||
deleteParams.add(contextItem, paramName);
|
||||
builtin = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return builtin && isDefaultContext;
|
||||
}
|
||||
|
||||
public static String getParamId(IContextParameter param, ContextParamLink paramLink) {
|
||||
if (paramLink != null) {
|
||||
return paramLink.getId();
|
||||
}
|
||||
if (param != null) {
|
||||
return param.getInternalId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Item findContextItem(List<ContextItem> allContextItem, String source) {
|
||||
if (allContextItem != null) {
|
||||
for (ContextItem contextItem : allContextItem) {
|
||||
if (StringUtils.equals(contextItem.getProperty().getId(), source)) {
|
||||
return contextItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
return getRepositoryContextItemById(source);
|
||||
}
|
||||
|
||||
public static String getNewNameFromRenameMap(Map<String, String> renameMap, String oldName) {
|
||||
if (renameMap != null) {
|
||||
for (String key : renameMap.keySet()) {
|
||||
String value = renameMap.get(key);
|
||||
if (StringUtils.equals(value, oldName)) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isBuildInParameter(ContextParameterType paramType) {
|
||||
if (paramType.getRepositoryContextId() == null || IContextParameter.BUILT_IN.equals(paramType.getRepositoryContextId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,10 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.emf.common.util.BasicEList;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.ecore.util.EcoreUtil;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.types.ContextParameterJavaTypeManager;
|
||||
import org.talend.core.model.process.IContext;
|
||||
@@ -30,6 +32,7 @@ import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
@@ -74,7 +77,7 @@ public class JobContextManager implements IContextManager {
|
||||
*/
|
||||
private Set<String> originalParamerters = new HashSet<String>();
|
||||
|
||||
private Map<ContextItem, Set<String>> newParametersMap = new HashMap<ContextItem, Set<String>>();
|
||||
private Map<Item, Set<String>> newParametersMap = new HashMap<Item, Set<String>>();
|
||||
|
||||
/*
|
||||
* for context group
|
||||
@@ -251,73 +254,7 @@ public class JobContextManager implements IContextManager {
|
||||
*/
|
||||
@Override
|
||||
public void saveToEmf(EList contextTypeList) {
|
||||
if (contextTypeList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (listContext.isEmpty()) {
|
||||
retrieveDefaultContext();
|
||||
}
|
||||
|
||||
EList newcontextTypeList = new BasicEList();
|
||||
for (int i = 0; i < listContext.size(); i++) {
|
||||
IContext context = listContext.get(i);
|
||||
String contextGroupName = renameGroupContext.get(context);
|
||||
if (contextGroupName == null) {
|
||||
contextGroupName = context.getName();
|
||||
}
|
||||
ContextType contextType = findContextType(contextTypeList, contextGroupName);
|
||||
if (contextType == null) {
|
||||
contextType = TalendFileFactory.eINSTANCE.createContextType();
|
||||
}
|
||||
contextType.setName(context.getName());
|
||||
contextType.setConfirmationNeeded(context.isConfirmationNeeded());
|
||||
newcontextTypeList.add(contextType);
|
||||
|
||||
EList contextTypeParamList = contextType.getContextParameter();
|
||||
List<IContextParameter> contextParameterList = context.getContextParameterList();
|
||||
|
||||
EList newContextTypeParamList = new BasicEList();
|
||||
if (contextParameterList != null) {
|
||||
for (int j = 0; j < contextParameterList.size(); j++) {
|
||||
IContextParameter contextParam = contextParameterList.get(j);
|
||||
String contexParameterName = nameMap.get(contextParam.getName());
|
||||
if (contexParameterName == null) {
|
||||
contexParameterName = contextParam.getName();
|
||||
}
|
||||
ContextParameterType contextParamType = findContextParameterType(contextTypeParamList, contexParameterName);
|
||||
if (contextParamType == null) {
|
||||
contextParamType = TalendFileFactory.eINSTANCE.createContextParameterType();
|
||||
}
|
||||
newContextTypeParamList.add(contextParamType);
|
||||
|
||||
contextParamType.setName(contextParam.getName());
|
||||
contextParamType.setPrompt(contextParam.getPrompt());
|
||||
contextParamType.setType(contextParam.getType());
|
||||
contextParamType.setRawValue(contextParam.getValue());
|
||||
contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
|
||||
contextParamType.setComment(contextParam.getComment());
|
||||
if (!contextParam.isBuiltIn()) {
|
||||
Item item = ContextUtils.getRepositoryContextItemById(contextParam.getSource());
|
||||
if (item != null) {
|
||||
contextParamType.setRepositoryContextId(item.getProperty().getId());
|
||||
} else {
|
||||
String contextId = contextParam.getSource();
|
||||
if (!IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
contextParamType.setRepositoryContextId(contextId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contextTypeParamList.clear(); // remove old
|
||||
contextTypeParamList.addAll(newContextTypeParamList);
|
||||
}
|
||||
}
|
||||
|
||||
contextTypeList.clear(); // clear old
|
||||
contextTypeList.addAll(newcontextTypeList);
|
||||
|
||||
saveToEmf(contextTypeList, false);
|
||||
}
|
||||
|
||||
private ContextType findContextType(EList contextTypeList, String contextName) {
|
||||
@@ -384,6 +321,7 @@ public class JobContextManager implements IContextManager {
|
||||
contextParam.setContext(context);
|
||||
contextParam.setName(contextParamType.getName());
|
||||
contextParam.setPrompt(contextParamType.getPrompt());
|
||||
contextParam.setInternalId(contextParamType.getInternalId());
|
||||
originalParamerters.add(contextParam.getName());
|
||||
boolean exists = true;
|
||||
try {
|
||||
@@ -403,7 +341,8 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
String repositoryContextId = contextParamType.getRepositoryContextId();
|
||||
String source = IContextParameter.BUILT_IN;
|
||||
if (repositoryContextId != null && !"".equals(repositoryContextId)) { //$NON-NLS-1$
|
||||
if (repositoryContextId != null && !"".equals(repositoryContextId) //$NON-NLS-1$
|
||||
&& !IContextParameter.BUILT_IN.equals(repositoryContextId)) {
|
||||
Item item = ContextUtils.getContextItemById(contextItemList, repositoryContextId);
|
||||
if (item == null) {
|
||||
item = ContextUtils.getRepositoryContextItemById(repositoryContextId);
|
||||
@@ -486,16 +425,6 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* ggu Comment method "getLostParameters".
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Set<String> getLostParameters() {
|
||||
return this.lostParameters;
|
||||
}
|
||||
|
||||
public Map<ContextItem, Map<String, String>> getRepositoryRenamedMap() {
|
||||
return this.repositoryRenamedMap;
|
||||
}
|
||||
@@ -516,6 +445,16 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* ggu Comment method "getLostParameters".
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Set<String> getLostParameters() {
|
||||
return this.lostParameters;
|
||||
}
|
||||
|
||||
public void addNewParameters(String param) {
|
||||
newParameters.add(param);
|
||||
}
|
||||
@@ -540,11 +479,11 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
}
|
||||
|
||||
public Map<ContextItem, Set<String>> getNewParametersMap() {
|
||||
public Map<Item, Set<String>> getNewParametersMap() {
|
||||
return newParametersMap;
|
||||
}
|
||||
|
||||
public void setNewParametersMap(Map<ContextItem, Set<String>> newParametersMap) {
|
||||
public void setNewParametersMap(Map<Item, Set<String>> newParametersMap) {
|
||||
this.newParametersMap = newParametersMap;
|
||||
}
|
||||
|
||||
@@ -573,4 +512,99 @@ public class JobContextManager implements IContextManager {
|
||||
public void setConfigContextGroup(boolean isConfigContextGroup) {
|
||||
this.isConfigContextGroup = isConfigContextGroup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveToEmf(EList contextTypeList, boolean useInternalId) {
|
||||
if (contextTypeList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (listContext.isEmpty()) {
|
||||
retrieveDefaultContext();
|
||||
}
|
||||
|
||||
EList newcontextTypeList = new BasicEList();
|
||||
Map<String, Item> idToItemMap = new HashMap<String, Item>();
|
||||
for (int i = 0; i < listContext.size(); i++) {
|
||||
IContext context = listContext.get(i);
|
||||
String contextGroupName = renameGroupContext.get(context);
|
||||
if (contextGroupName == null) {
|
||||
contextGroupName = context.getName();
|
||||
}
|
||||
ContextType contextType = findContextType(contextTypeList, contextGroupName);
|
||||
if (contextType == null) {
|
||||
contextType = TalendFileFactory.eINSTANCE.createContextType();
|
||||
}
|
||||
contextType.setName(context.getName());
|
||||
contextType.setConfirmationNeeded(context.isConfirmationNeeded());
|
||||
newcontextTypeList.add(contextType);
|
||||
|
||||
EList contextTypeParamList = contextType.getContextParameter();
|
||||
List<IContextParameter> contextParameterList = context.getContextParameterList();
|
||||
|
||||
EList newContextTypeParamList = new BasicEList();
|
||||
if (contextParameterList != null) {
|
||||
for (int j = 0; j < contextParameterList.size(); j++) {
|
||||
IContextParameter contextParam = contextParameterList.get(j);
|
||||
String contexParameterName = nameMap.get(contextParam.getName());
|
||||
if (contexParameterName == null) {
|
||||
contexParameterName = contextParam.getName();
|
||||
}
|
||||
ContextParameterType contextParamType = findContextParameterType(contextTypeParamList, contexParameterName);
|
||||
if (contextParamType == null) {
|
||||
contextParamType = TalendFileFactory.eINSTANCE.createContextParameterType();
|
||||
}
|
||||
newContextTypeParamList.add(contextParamType);
|
||||
|
||||
contextParamType.setName(contextParam.getName());
|
||||
contextParamType.setPrompt(contextParam.getPrompt());
|
||||
contextParamType.setType(contextParam.getType());
|
||||
contextParamType.setRawValue(contextParam.getValue());
|
||||
contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
|
||||
contextParamType.setComment(contextParam.getComment());
|
||||
if (!contextParam.isBuiltIn()) {
|
||||
Item item = idToItemMap.get(contextParam.getSource());
|
||||
if (item == null) {
|
||||
item = ContextUtils.getRepositoryContextItemById(contextParam.getSource());
|
||||
idToItemMap.put(contextParam.getSource(), item);
|
||||
}
|
||||
if (item != null) {
|
||||
contextParamType.setRepositoryContextId(item.getProperty().getId());
|
||||
if (item instanceof ContextItem) {
|
||||
ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
|
||||
if (repoContextType != null) {
|
||||
ContextParameterType repoContextParam = ContextUtils
|
||||
.getContextParameterTypeByName(repoContextType, contextParam.getName());
|
||||
if (repoContextParam != null) {
|
||||
ResourceHelper.setUUid(contextParamType, ResourceHelper.getUUID(repoContextParam));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String contextId = contextParam.getSource();
|
||||
if (!IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
contextParamType.setRepositoryContextId(contextId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
contextParamType.setRepositoryContextId(contextParam.getSource());
|
||||
}
|
||||
if (useInternalId) {
|
||||
String internalId = contextParam.getInternalId();
|
||||
if (StringUtils.isEmpty(internalId)) {
|
||||
internalId = EcoreUtil.generateUUID();
|
||||
contextParam.setInternalId(internalId);
|
||||
}
|
||||
contextParamType.setInternalId(internalId);
|
||||
}
|
||||
}
|
||||
contextTypeParamList.clear(); // remove old
|
||||
contextTypeParamList.addAll(newContextTypeParamList);
|
||||
}
|
||||
}
|
||||
|
||||
contextTypeList.clear(); // clear old
|
||||
contextTypeList.addAll(newcontextTypeList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,13 +45,14 @@ public class JobContextParameter implements IContextParameter, Cloneable {
|
||||
|
||||
String[] valueList;
|
||||
|
||||
String internalId;
|
||||
|
||||
/**
|
||||
* change to save id always for bug 13184.
|
||||
*/
|
||||
String source = ""; //$NON-NLS-1$
|
||||
|
||||
public JobContextParameter() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -310,6 +311,14 @@ public class JobContextParameter implements IContextParameter, Cloneable {
|
||||
this.promptNeeded = promptNeeded;
|
||||
}
|
||||
|
||||
public String getInternalId() {
|
||||
return internalId;
|
||||
}
|
||||
|
||||
public void setInternalId(String internalId) {
|
||||
this.internalId = internalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IContextParameter clone() {
|
||||
IContextParameter clonedContextParameter = null;
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
|
||||
public abstract class AbstractItemContextLinkService implements IItemContextLinkService {
|
||||
|
||||
@Override
|
||||
public boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFileInput) throws PersistenceException {
|
||||
ItemContextLink remoteContextLink = ContextLinkService.getInstance().doLoadContextLinkFromFile(remoteLinkFileInput);
|
||||
List<ContextType> contextTypeList = ContextUtils.getAllContextType(item);
|
||||
return saveContextLink(contextTypeList, item, backupContextLink, remoteContextLink);
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(List<ContextType> contextTypeList, Item item,
|
||||
ItemContextLink backupContextLink, ItemContextLink remoteContextLink)
|
||||
throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
String itemId = item.getProperty().getId();
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(itemId);
|
||||
Map<String, Item> tempCache = new HashMap<String, Item>();
|
||||
if (contextTypeList != null && contextTypeList.size() > 0) {
|
||||
for (Object object : contextTypeList) {
|
||||
if (object instanceof ContextType) {
|
||||
ContextType jobContextType = (ContextType) object;
|
||||
for (Object o : jobContextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
String repositoryContextId = contextParameterType.getRepositoryContextId();
|
||||
if (!ContextUtils.isBuildInParameter(contextParameterType)) {
|
||||
ContextLink contextLink = itemContextLink
|
||||
.findContextLink(contextParameterType.getRepositoryContextId(), jobContextType.getName());
|
||||
if (contextLink == null) {
|
||||
contextLink = new ContextLink();
|
||||
contextLink.setContextName(jobContextType.getName());
|
||||
contextLink.setRepoId(repositoryContextId);
|
||||
}
|
||||
ContextParamLink contextParamLink = createParamLink(repositoryContextId, jobContextType.getName(),
|
||||
contextParameterType.getName(), contextParameterType.getInternalId(), tempCache,
|
||||
backupContextLink, remoteContextLink);
|
||||
if (contextParamLink != null) {
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
|
||||
if (contextLink.getParameterList().size() > 0
|
||||
&& !itemContextLink.getContextList().contains(contextLink)) {
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
ContextLinkService.getInstance().saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
ContextLinkService.getInstance().deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(List<ContextType> contextTypeList, Item item) throws PersistenceException {
|
||||
ItemContextLink backupContextLink = ContextLinkService.getInstance().loadContextLinkFromJson(item);
|
||||
return saveContextLink(contextTypeList, item, backupContextLink, null);
|
||||
}
|
||||
|
||||
private ContextParamLink createParamLink(String repositoryContextId, String contextName, String paramName, String internalId,
|
||||
Map<String, Item> tempCache, ItemContextLink oldContextLink, ItemContextLink remoteContextLink) {
|
||||
ContextParamLink contextParamLink = null;
|
||||
|
||||
if (StringUtils.isNotBlank(internalId)) {
|
||||
contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(paramName);
|
||||
contextParamLink.setId(internalId);
|
||||
}
|
||||
|
||||
Item contextItem = tempCache.get(repositoryContextId);
|
||||
if (contextItem == null) {
|
||||
contextItem = ContextUtils.getRepositoryContextItemById(repositoryContextId);
|
||||
tempCache.put(repositoryContextId, contextItem);
|
||||
}
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem, contextName);
|
||||
ContextParameterType repoContextParameterType = ContextUtils.getContextParameterTypeByName(contextType, paramName);
|
||||
if (repoContextParameterType != null && repoContextParameterType.eResource() == null) {
|
||||
// processItem save before than contextItem, caused eResource null
|
||||
IRepositoryService repositoryService = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
try {
|
||||
repositoryService.getProxyRepositoryFactory().save(contextItem, false);
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
String uuID = null;
|
||||
boolean isFromContextItem = (contextItem instanceof ContextItem);
|
||||
if (repoContextParameterType != null) {
|
||||
if (isFromContextItem) {
|
||||
uuID = ResourceHelper.getUUID(repoContextParameterType);
|
||||
} else if (repoContextParameterType.getInternalId() != null) {
|
||||
uuID = repoContextParameterType.getInternalId();
|
||||
}
|
||||
}
|
||||
if (repoContextParameterType == null && remoteContextLink != null) {
|
||||
ContextParamLink remoteParamLink = remoteContextLink.findContextParamLinkByName(repositoryContextId, contextName,
|
||||
paramName);
|
||||
if (remoteParamLink != null && remoteParamLink.getId() != null) {
|
||||
repoContextParameterType = findContextParamTypeById(contextType, isFromContextItem, remoteParamLink.getId());
|
||||
uuID = remoteParamLink.getId();
|
||||
}
|
||||
}
|
||||
if (repoContextParameterType == null && oldContextLink != null) {
|
||||
ContextParamLink oldParamLink = oldContextLink.findContextParamLinkByName(repositoryContextId, contextName,
|
||||
paramName);
|
||||
if (oldParamLink != null) {
|
||||
uuID = oldParamLink.getId();
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(uuID)) {
|
||||
contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(paramName);
|
||||
contextParamLink.setId(uuID);
|
||||
}
|
||||
}
|
||||
return contextParamLink;
|
||||
}
|
||||
|
||||
protected ContextParameterType findContextParamTypeById(ContextType contextType, boolean isFromContextItem, String id) {
|
||||
for (Object obj : contextType.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType repoParam = (ContextParameterType) obj;
|
||||
if (isFromContextItem && StringUtils.equals(id, ResourceHelper.getUUID(repoParam))) {
|
||||
return repoParam;
|
||||
}
|
||||
if (!isFromContextItem && StringUtils.equals(id, repoParam.getInternalId())) {
|
||||
return repoParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
|
||||
|
||||
public class ConnectionItemContextLinkService extends AbstractItemContextLinkService {
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item) {
|
||||
if (item instanceof ConnectionItem) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveItemLink(Item item) throws PersistenceException {
|
||||
if (item instanceof ConnectionItem) {
|
||||
ConnectionItem connectionItem = (ConnectionItem) item;
|
||||
return saveContextLink(connectionItem.getConnection(), item, null, null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private synchronized boolean saveContextLink(Connection connection, Item item, ItemContextLink backupContextLink,
|
||||
ItemContextLink remoteContextLink) throws PersistenceException {
|
||||
boolean hasLinkFile = false;
|
||||
ItemContextLink itemContextLink = new ItemContextLink();
|
||||
itemContextLink.setItemId(item.getProperty().getId());
|
||||
if (connection.isContextMode()) {
|
||||
String contextId = connection.getContextId();
|
||||
if (StringUtils.isEmpty(contextId) || IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
return hasLinkFile;
|
||||
}
|
||||
ContextLink contextLink = new ContextLink();
|
||||
contextLink.setContextName(connection.getContextName());
|
||||
contextLink.setRepoId(contextId);
|
||||
itemContextLink.getContextList().add(contextLink);
|
||||
|
||||
ContextItem contextItem = ContextUtils.getContextItemById2(contextId);
|
||||
if (contextItem != null) {
|
||||
ContextType contextType = ContextUtils.getContextTypeByName(contextItem.getContext(),
|
||||
connection.getContextName());
|
||||
if (contextType != null) {
|
||||
for (Object o : contextType.getContextParameter()) {
|
||||
if (o instanceof ContextParameterType) {
|
||||
ContextParameterType contextParameterType = (ContextParameterType) o;
|
||||
ContextParamLink contextParamLink = new ContextParamLink();
|
||||
contextParamLink.setName(contextParameterType.getName());
|
||||
contextParamLink.setId(ResourceHelper.getUUID(contextParameterType));
|
||||
contextLink.getParameterList().add(contextParamLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Because we don't know db connection using which values, we save all for merge operation
|
||||
if (backupContextLink != null) {
|
||||
for (ContextLink cl : backupContextLink.getContextList()) {
|
||||
if (StringUtils.equals(cl.getRepoId(), contextId)
|
||||
&& StringUtils.equals(cl.getContextName(), connection.getContextName())) {
|
||||
for (ContextParamLink cpl : cl.getParameterList()) {
|
||||
if (contextLink.getParamLinkByName(cpl.getName()) == null) {
|
||||
contextLink.getParameterList().add(cpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (remoteContextLink != null) {
|
||||
for (ContextLink cl : remoteContextLink.getContextList()) {
|
||||
if (StringUtils.equals(cl.getRepoId(), contextId)
|
||||
&& StringUtils.equals(cl.getContextName(), connection.getContextName())) {
|
||||
for (ContextParamLink cpl : cl.getParameterList()) {
|
||||
if (contextLink.getParamLinkByName(cpl.getName()) == null) {
|
||||
contextLink.getParameterList().add(cpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemContextLink.getContextList().size() > 0) {
|
||||
ContextLinkService.getInstance().saveContextLinkToJson(item, itemContextLink);
|
||||
hasLinkFile = true;
|
||||
} else {
|
||||
ContextLinkService.getInstance().deleteContextLinkJsonFile(item);
|
||||
}
|
||||
return hasLinkFile;
|
||||
}
|
||||
|
||||
public ItemContextLink loadItemLink(Item item) throws PersistenceException {
|
||||
return ContextLinkService.getInstance().doLoadContextLinkFromJson(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFileInput)
|
||||
throws PersistenceException {
|
||||
if (item instanceof ConnectionItem) {
|
||||
ConnectionItem connectionItem = (ConnectionItem) item;
|
||||
ItemContextLink remoteContextLink = ContextLinkService.getInstance().doLoadContextLinkFromFile(remoteLinkFileInput);
|
||||
return saveContextLink(connectionItem.getConnection(), item, backupContextLink, remoteContextLink);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ContextLink {
|
||||
|
||||
@JsonProperty("contextName")
|
||||
private String contextName;
|
||||
|
||||
@JsonProperty("repoId")
|
||||
private String repoId;
|
||||
|
||||
@JsonProperty("parameterList")
|
||||
private List<ContextParamLink> parameterList = new ArrayList<ContextParamLink>();
|
||||
|
||||
public String getRepoId() {
|
||||
return repoId;
|
||||
}
|
||||
|
||||
public void setRepoId(String repoId) {
|
||||
this.repoId = repoId;
|
||||
}
|
||||
|
||||
public List<ContextParamLink> getParameterList() {
|
||||
return parameterList;
|
||||
}
|
||||
|
||||
public void setParameterList(List<ContextParamLink> parameterList) {
|
||||
this.parameterList = parameterList;
|
||||
}
|
||||
|
||||
public String getContextName() {
|
||||
return contextName;
|
||||
}
|
||||
|
||||
public void setContextName(String contextName) {
|
||||
this.contextName = contextName;
|
||||
}
|
||||
|
||||
public ContextParamLink getParamLinkByName(String paramName) {
|
||||
for (ContextParamLink paramLink : parameterList) {
|
||||
if (StringUtils.equals(paramLink.getName(), paramName)) {
|
||||
return paramLink;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextParamLink getParamLinkById(String id) {
|
||||
for (ContextParamLink paramLink : parameterList) {
|
||||
if (StringUtils.equals(paramLink.getId(), id)) {
|
||||
return paramLink;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextLink cloneObj() {
|
||||
ContextLink obj = new ContextLink();
|
||||
obj.setContextName(contextName);
|
||||
obj.setRepoId(repoId);
|
||||
for (ContextParamLink p : parameterList) {
|
||||
obj.getParameterList().add(p.cloneObj());
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Project;
|
||||
import org.talend.core.model.relationship.Relation;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class ContextLinkService {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ContextLinkService.class);
|
||||
|
||||
private static final String CREATOR_EXT_ID = "org.talend.core.runtime.saveItemContextLinkService"; //$NON-NLS-1$
|
||||
|
||||
public static final String LINKS_FOLDER_NAME = "links";
|
||||
|
||||
public static final String LINK_FILE_POSTFIX = ".link";
|
||||
|
||||
private static final List<IItemContextLinkService> registeredService = new ArrayList<IItemContextLinkService>();
|
||||
|
||||
private static ContextLinkService instance = new ContextLinkService();
|
||||
|
||||
private static final String CURRENT_PROJECT_LABEL = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
|
||||
|
||||
private ContextLinkService() {
|
||||
initService();
|
||||
}
|
||||
|
||||
public static ContextLinkService getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public synchronized boolean saveContextLink(Item item) throws PersistenceException {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return service.saveItemLink(item);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public synchronized boolean mergeContextLink(Item item, ItemContextLink backupContextLink, InputStream remoteLinkFile)
|
||||
throws PersistenceException {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return service.mergeItemLink(item, backupContextLink, remoteLinkFile);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSupportContextLink(Item item) {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public synchronized void saveContextLinkToJson(Item item, ItemContextLink itemContextLink) throws PersistenceException {
|
||||
IFolder linksFolder = getLinksFolder(getItemProjectLabel(item));
|
||||
if (!linksFolder.exists()) {
|
||||
ResourceUtils.createFolder(linksFolder);
|
||||
}
|
||||
IFile linkFile = calContextLinkFile(item);
|
||||
saveContextLinkToJson(linkFile, itemContextLink);
|
||||
}
|
||||
|
||||
public synchronized void saveContextLinkToJson(IFile linkFile, ItemContextLink itemContextLink) throws PersistenceException {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
String content = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(itemContextLink);
|
||||
if (!linkFile.exists()) {
|
||||
ResourceUtils.createFile(new ByteArrayInputStream(content.getBytes()), linkFile);
|
||||
} else {
|
||||
ResourceUtils.setFileContent(new ByteArrayInputStream(content.getBytes()), linkFile);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized boolean changeRepositoryId(Item item, Map<String, String> old2NewMap) throws PersistenceException {
|
||||
boolean isModofied = false;
|
||||
ItemContextLink itemContextLink = loadContextLinkFromJson(item);
|
||||
if (itemContextLink != null) {
|
||||
for (ContextLink contextLink : itemContextLink.getContextList()) {
|
||||
if (old2NewMap.containsKey(contextLink.getRepoId())) {
|
||||
contextLink.setRepoId(old2NewMap.get(contextLink.getRepoId()));
|
||||
isModofied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isModofied) {
|
||||
this.saveContextLinkToJson(item, itemContextLink);
|
||||
}
|
||||
return isModofied;
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink loadContextLinkFromJson(Item item) throws PersistenceException {
|
||||
for (IItemContextLinkService service : registeredService) {
|
||||
if (service.accept(item)) {
|
||||
return service.loadItemLink(item);
|
||||
}
|
||||
}
|
||||
return doLoadContextLinkFromJson(item);
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink doLoadContextLinkFromJson(Item item) throws PersistenceException {
|
||||
IFile linkFile = calContextLinkFile(item);
|
||||
return doLoadContextLinkFromFile(linkFile);
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink doLoadContextLinkFromJson(String projectLabel, String id) throws PersistenceException {
|
||||
IFile linkFile = calContextLinkFile(projectLabel, id);
|
||||
return doLoadContextLinkFromFile(linkFile);
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink doLoadContextLinkFromFile(IFile linkFile) throws PersistenceException {
|
||||
if (linkFile == null || !linkFile.exists()) {
|
||||
return null;
|
||||
}
|
||||
ItemContextLink contextLink = null;
|
||||
try {
|
||||
contextLink = new ObjectMapper().readValue(linkFile.getLocation().toFile(), ItemContextLink.class);
|
||||
} catch (IOException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
return contextLink;
|
||||
}
|
||||
|
||||
public synchronized ItemContextLink doLoadContextLinkFromFile(InputStream inputStream) throws PersistenceException {
|
||||
if (inputStream == null) {
|
||||
return null;
|
||||
}
|
||||
ItemContextLink contextLink = null;
|
||||
try {
|
||||
contextLink = new ObjectMapper().readValue(inputStream, ItemContextLink.class);
|
||||
} catch (IOException e) {
|
||||
throw new PersistenceException(e);
|
||||
} finally {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
LOGGER.info("Close input stream failed.");
|
||||
}
|
||||
}
|
||||
return contextLink;
|
||||
}
|
||||
|
||||
public synchronized void deleteContextLinkJsonFile(Item item) throws PersistenceException {
|
||||
IFile linkFile = calContextLinkFile(item);
|
||||
if (linkFile != null && linkFile.exists()) {
|
||||
try {
|
||||
linkFile.delete(true, null);
|
||||
} catch (CoreException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void updateRelatedContextParameterId(String sourceId, Map<String, String> repositoryIdChangedMap,
|
||||
Map<String, Map<String, String>> changedContextParameterId) throws PersistenceException {
|
||||
List<Relation> relationList = RelationshipItemBuilder.getInstance()
|
||||
.getItemsHaveRelationWith(sourceId, RelationshipItemBuilder.LATEST_VERSION, false);
|
||||
for (Relation relation : relationList) {
|
||||
String id = relation.getId();
|
||||
IFile linkFile = calContextLinkFile(ProjectManager.getInstance().getCurrentProject().getTechnicalLabel(), id);
|
||||
ItemContextLink itemContextLink = doLoadContextLinkFromFile(linkFile);
|
||||
String newRepoId = null;
|
||||
boolean isModified = false;
|
||||
if (repositoryIdChangedMap != null && repositoryIdChangedMap.containsKey(sourceId)) {
|
||||
newRepoId = repositoryIdChangedMap.get(sourceId);
|
||||
}
|
||||
if (itemContextLink != null) {
|
||||
for (ContextLink contextLink : itemContextLink.getContextList()) {
|
||||
for (String repoId : changedContextParameterId.keySet()) {
|
||||
if (StringUtils.equals(repoId, contextLink.getRepoId())) {
|
||||
Map<String, String> oldToNewId = changedContextParameterId.get(repoId);
|
||||
for (String oldId : oldToNewId.keySet()) {
|
||||
ContextParamLink paramLink = contextLink.getParamLinkById(oldId);
|
||||
if (paramLink != null) {
|
||||
paramLink.setId(oldToNewId.get(oldId));
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sourceId.equals(repoId) && newRepoId != null) {
|
||||
isModified = true;
|
||||
contextLink.setRepoId(newRepoId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isModified) {
|
||||
saveContextLinkToJson(linkFile, itemContextLink);
|
||||
}
|
||||
}
|
||||
isModified = false;
|
||||
if (newRepoId != null) {
|
||||
Item relatedItem = ContextUtils.getRepositoryContextItemById(id);
|
||||
if (relatedItem != null) {
|
||||
List contextTypes = ContextUtils.getAllContextType(relatedItem);
|
||||
if (contextTypes != null) {
|
||||
for (Object object : contextTypes) {
|
||||
if (object instanceof ContextType) {
|
||||
ContextType context = (ContextType) object;
|
||||
for (Object obj : context.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
ContextParameterType parameterType = (ContextParameterType) obj;
|
||||
if (!ContextUtils.isBuildInParameter(parameterType)
|
||||
&& sourceId.equals(parameterType.getRepositoryContextId())) {
|
||||
parameterType.setRepositoryContextId(newRepoId);
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isModified) {
|
||||
IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
|
||||
factory.save(relatedItem, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static IFile calContextLinkFile(Item item) throws PersistenceException {
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
IFolder linksFolder = getLinksFolder(getItemProjectLabel(item));
|
||||
return linksFolder.getFile(calLinkFileName(item.getProperty().getId()));
|
||||
}
|
||||
|
||||
public static IFile calContextLinkFile(String projectLabel, String itemId) throws PersistenceException {
|
||||
if (projectLabel == null || itemId == null) {
|
||||
return null;
|
||||
}
|
||||
IFolder linksFolder = getLinksFolder(projectLabel);
|
||||
return linksFolder.getFile(calLinkFileName(itemId));
|
||||
}
|
||||
|
||||
public static String getItemProjectLabel(Item item) {
|
||||
Project project = ProjectManager.getInstance().getProject(item);
|
||||
if (project != null) {
|
||||
return project.getTechnicalLabel();
|
||||
}
|
||||
return CURRENT_PROJECT_LABEL;
|
||||
}
|
||||
|
||||
private static String calLinkFileName(String id) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(id).append(LINK_FILE_POSTFIX);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static IFile calLinksFile(IFolder projectFolder, String id) {
|
||||
IFolder settingFolder = projectFolder.getFolder(RepositoryConstants.SETTING_DIRECTORY);
|
||||
IFolder linksFolder = settingFolder.getFolder(LINKS_FOLDER_NAME);
|
||||
return linksFolder.getFile(getLinkFileName(id));
|
||||
}
|
||||
|
||||
public static String calLinksFilePath(String projectPath, String id) {
|
||||
StringBuilder sb = new StringBuilder(projectPath);
|
||||
sb.append(File.separator).append(RepositoryConstants.SETTING_DIRECTORY);
|
||||
sb.append(File.separator).append(LINKS_FOLDER_NAME);
|
||||
sb.append(File.separator).append(getLinkFileName(id));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static IFile calLinksFile(IProject project, String id) {
|
||||
IFolder settingFolder = project.getFolder(RepositoryConstants.SETTING_DIRECTORY);
|
||||
IFolder linksFolder = settingFolder.getFolder(LINKS_FOLDER_NAME);
|
||||
return linksFolder.getFile(getLinkFileName(id));
|
||||
}
|
||||
|
||||
public static String getLinkFileName(String id) {
|
||||
return id + LINK_FILE_POSTFIX;
|
||||
}
|
||||
|
||||
private static IFolder getLinksFolder(String projectLabel) throws PersistenceException {
|
||||
IProject iProject = ResourceUtils.getProject(projectLabel);
|
||||
IFolder settingFolder = iProject.getFolder(RepositoryConstants.SETTING_DIRECTORY);
|
||||
IFolder linksFolder = settingFolder.getFolder(LINKS_FOLDER_NAME);
|
||||
return linksFolder;
|
||||
}
|
||||
|
||||
private static void initService() {
|
||||
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
|
||||
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(CREATOR_EXT_ID);
|
||||
if (extensionPoint != null) {
|
||||
IExtension[] extensions = extensionPoint.getExtensions();
|
||||
for (IExtension extension : extensions) {
|
||||
IConfigurationElement[] configurationElements = extension.getConfigurationElements();
|
||||
for (IConfigurationElement configurationElement : configurationElements) {
|
||||
try {
|
||||
Object creator = configurationElement.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
if (creator instanceof IItemContextLinkService) {
|
||||
IItemContextLinkService service = (IItemContextLinkService) creator;
|
||||
registeredService.add(service);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ContextParamLink {
|
||||
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ContextParamLink cloneObj() {
|
||||
ContextParamLink obj = new ContextParamLink();
|
||||
obj.setId(id);
|
||||
obj.setName(name);
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.properties.Item;
|
||||
|
||||
public interface IItemContextLinkService {
|
||||
|
||||
boolean accept(Item item);
|
||||
|
||||
boolean saveItemLink(Item item) throws PersistenceException;
|
||||
|
||||
ItemContextLink loadItemLink(Item item) throws PersistenceException;
|
||||
|
||||
boolean mergeItemLink(Item item, ItemContextLink backupContextLink, InputStream otherVersionLinkFile)
|
||||
throws PersistenceException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.context.link;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ItemContextLink {
|
||||
|
||||
@JsonProperty("itemId")
|
||||
private String itemId;
|
||||
|
||||
@JsonProperty("contextList")
|
||||
private List<ContextLink> contextList = new ArrayList<ContextLink>();
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public List<ContextLink> getContextList() {
|
||||
return contextList;
|
||||
}
|
||||
|
||||
public void setContextList(List<ContextLink> contextList) {
|
||||
this.contextList = contextList;
|
||||
}
|
||||
|
||||
public ContextParamLink findContextParamLinkByName(String repoContextId, String contextName, String paramName) {
|
||||
ContextLink contextLink = findContextLink(repoContextId, contextName);
|
||||
if (contextLink != null) {
|
||||
return contextLink.getParamLinkByName(paramName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextParamLink findContextParamLinkById(String repoContextId, String contextName, String paramId) {
|
||||
ContextLink contextLink = findContextLink(repoContextId, contextName);
|
||||
if (contextLink != null) {
|
||||
return contextLink.getParamLinkById(paramId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextParamLink findContextParamLinkByIdIgnoreContextName(String repoContextId, String paramId) {
|
||||
for (ContextLink contextLink : contextList) {
|
||||
if (StringUtils.equals(repoContextId, contextLink.getRepoId())) {
|
||||
ContextParamLink paramLink = contextLink.getParamLinkById(paramId);
|
||||
if (paramLink != null) {
|
||||
return paramLink;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContextLink findContextLink(String repoContextId, String contextName) {
|
||||
for (ContextLink contextLink : contextList) {
|
||||
if ((repoContextId == null || StringUtils.equals(repoContextId, contextLink.getRepoId()))
|
||||
&& StringUtils.equals(contextName, contextLink.getContextName())) {
|
||||
return contextLink;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemContextLink cloneObj() {
|
||||
ItemContextLink obj = new ItemContextLink();
|
||||
obj.setItemId(itemId);
|
||||
for (ContextLink c : contextList) {
|
||||
obj.getContextList().add(c.cloneObj());
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user