Compare commits

...

65 Commits

Author SHA1 Message Date
Svitlana Ponomarova
b62a697ec8 Merge branch 'maintenance/8.0' into feat/TBD-14909 2024-01-29 12:53:30 +02:00
Jane Ding
7fe2e8be48 fix(TUP-41534):Remove dependency on pendo related API during logon (#6730)
process
https://jira.talendforge.org/browse/TUP-41534
2024-01-29 16:14:50 +08:00
jiezhang-tlnd
5b80d8dc36 80 loc fr fr 2024 01 25 04 02 (#6756)
* Add localized files (#6753)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

* Add localized files (#6754)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-29 10:14:05 +08:00
Zhiwei Xue
97efd263bf fix(TUP-41688):Talend Studio 8.0.1 / Java 17 / Memory Run : Searching (#6751)
the active JVM of current job / there is no job running
2024-01-29 10:09:37 +08:00
Svitlana Ponomarova
6748c0c1cc Merge branch 'maintenance/8.0' into feat/TBD-14909 2024-01-25 09:29:05 +02:00
bhe-talendbj
7ed11666dd fix(TUP-41122): fix aether proxy selector (#6603) 2024-01-23 15:54:31 +08:00
sbliu
441a27dbbd fix(TUP-41099) Author path not updated for all items when moved as group (#6634)
* fix(TUP-41099) Author path not updated for all items when moved as group

* add junit to check if relation ship is keep correct after move multi object as group

* adjust test
2024-01-22 18:13:34 +08:00
bhe-talendbj
24c7e20234 fix(TUP-41640): correct token url for custom cloud (#6732) 2024-01-22 18:04:39 +08:00
jiezhang-tlnd
394d74ff56 Jzhang/80/tup 41557 (#6726)
* chore(TUP-41557)sqlite-jdbc:3.40.0.0 | CVE-2023-32697

* chore(TUP-41557)sqlite-jdbc:3.40.0.0 | CVE-2023-32697

* add slf4j api
2024-01-22 17:06:25 +08:00
Zhiwei Xue
1bc51409c4 fix(TUP-41397):Issue when set a reference project (#6721) 2024-01-22 09:34:20 +08:00
jiezhang-tlnd
c319fa2b6e Add localized files (#6734) (#6741)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-19 19:38:31 +08:00
kjwang
0075eeedb1 Fix TUP-40846 Error shows after import items if workspace path contains (#6697)
Fix TUP-40846 Error shows after import items if workspace path contains Special char "!% "
https://jira.talendforge.org/browse/TUP-40846
2024-01-19 09:41:30 +08:00
Svitlana Ponomarova
b0ae475896 fix 2024-01-17 20:24:54 +02:00
Svitlana Ponomarova
1d95cf9c2a fix 2024-01-17 18:28:42 +02:00
Svitlana Ponomarova
f0ea26c203 fix 2024-01-17 16:25:08 +02:00
Svitlana Ponomarova
3c3de64bf4 fix 2024-01-17 14:43:16 +02:00
Svitlana Ponomarova
41881608bf Merge branch 'maintenance/8.0' into feat/TBD-14909 2024-01-15 14:30:20 +02:00
Zhiwei Xue
21955ee445 feat(TUP-41073):Block the update if studio is not compatible (#6710)
* feat(TUP-41073):Block the update if studio is not compatible

* feat(TUP-41073):fix feature adapt and block commandline
2024-01-15 16:36:32 +08:00
Zhiwei Xue
fe81245083 Revert "feat(TUP-41073):Block the update if studio is not compatible (#6710)"
This reverts commit 94bfffa01d.
2024-01-15 16:35:12 +08:00
Zhiwei Xue
94bfffa01d feat(TUP-41073):Block the update if studio is not compatible (#6710)
* feat(TUP-41073):Block the update if studio is not compatible

* feat(TUP-41073):fix feature adapt and block commandline
2024-01-15 16:17:05 +08:00
jiezhang-tlnd
0162ddf86f Add localized files (#6720) (#6725)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-12 17:48:54 +08:00
bhe-talendbj
4be615ad4c fix(TUP-41511): throw exception (#6719) 2024-01-12 15:06:00 +08:00
msjian
77ee619152 chore(TDQ-21713): improve code to fix NPE (#6717) 2024-01-10 18:29:04 +08:00
Jane Ding
feb8e81628 feat(TUP-36992):Set max-width for Context column in Studio (#6601)
* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992
2024-01-10 17:20:31 +08:00
bhe-talendbj
472b999612 fix(TUP-40092): Uncommitted changes available on all branches (#6594)
* fix(TUP-40092): add new field to ExceptionMessageDialog

* fix(TUP-40092): add new method
2024-01-10 16:31:35 +08:00
Emmanuel GALLOIS
f924a19f7d feat(TDI-50675): bump component-runtime to 1.63.0 (#6660) 2024-01-09 11:22:25 +01:00
wang wei
8ca4df75ea fix(TDI-50707): Still missing java options with JDK 17 for tRESTClient (#6699) 2024-01-08 18:14:05 +08:00
sbliu
9e04aa1fd4 chore(TUP-40453) upgrade avro in tck (#6708) 2024-01-08 15:25:52 +08:00
kjwang
ed7375ea82 Fix TUP-41299 Cannot connect to Oracle with patch R2023-11 (#6648)
* Fix TUP-41299 Cannot connect to Oracle with patch R2023-11
https://jira.talendforge.org/browse/TUP-41299
2024-01-08 11:50:00 +08:00
msjian
5ce7b0d702 fix(TDQ-21713): fix failed junit (#6705) 2024-01-07 14:19:57 +08:00
msjian
127573adc5 fix fail junit (#6703) 2024-01-06 11:11:52 +08:00
msjian
96abfedf4c fix(TDQ-21713): fix one failed junit (#6701) 2024-01-05 14:58:51 +08:00
hzhao
b19d7c550d fix(TUP-41404): dummy change to update the plugin timestamp # (#6698) 2024-01-04 16:15:03 +08:00
bhe-talendbj
6eec1e24d1 fix(TUP-41391): Always pop up workspace has been changed when start studio (#6689)
* fix(TUP-41391): initialized workspace too early

* fix(TUP-41391): initialized workspace too early
2024-01-03 16:46:07 +08:00
zyuan-talend
7a5fb399ec fix(TUP-41242):Clean up the call of studio registration service. (#6638) 2024-01-03 10:07:20 +08:00
msjian
f7bebc1efe fix(TDQ-21668): fix generate ThresholdViolationAlert job failed when jdk17 (#6676) 2023-12-29 18:10:00 +08:00
msjian
4e50edcff1 fix(TDQ-21713): ignore ".gitkeep" file under the git remote project's folders(#6687) 2023-12-29 15:29:38 +08:00
hcyi
4cf6b6277f fix(TUP-41106):Track shared mode with data collector. (#6672)
* fix(TUP-41106):Track shared mode with data collector.

* fix(TUP-41106):Track Enable Java 17 compatibility with data collector.
2023-12-29 15:09:22 +08:00
hcyi
f964d20a63 fix(TUP-41082):Track projects with Java 17 enabled. (#6651) 2023-12-28 18:06:18 +08:00
jiezhang-tlnd
8225e6fa05 chore(TUP-39612)bcprov-jdk15on:1.70 | CVE-2023-33201 (#6559) 2023-12-28 11:16:12 +08:00
Dmytro Sylaiev
9e918597a3 fix(TDI-50700): Fix httpclient for java 17 (#6662) 2023-12-26 13:07:08 +02:00
zyuan-talend
825a4634d5 fix(TUP-41256):Update jars linked to EDI component. (#6670) 2023-12-26 18:45:48 +08:00
msjian
e0b36d539d Revert "fix(TDQ-21668): fix generate job ThresholdViolationAlert fail when jdk17 (#6622)" (#6678)
This reverts commit afc3c0c57e.
2023-12-26 18:44:16 +08:00
sbliu
2f7fcb839c fix(TUP-41009) data view failed for tacokit data connection (#6654) 2023-12-26 14:19:11 +08:00
bhe-talendbj
4810bd8cda fix(TUP-41249): update manifest timestamp (#6665) (#6666)
* fix(TUP-41249): update manifest timestamp

* fix(TUP-41249): update type of time
2023-12-22 19:55:32 +08:00
Jane Ding
b2173b2707 Add localized files (#6656) (#6659)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-12-21 17:38:45 +08:00
hzhao
30643242a4 fix(TUP-40887): Mac Sonoma issue with image flipped (#6639)
* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887):  try remove listener

* fix(TUP-40887): add back resourceDisposeListener

* fix(TUP-40887): Mac Sonoma issue with image flipped
2023-12-21 10:42:03 +08:00
sbliu
eea308c852 chore(TUP-40457) Errors in CommandLine log file (#6585) 2023-12-21 10:03:52 +08:00
hzhao
482dab62dc fix(TUP-41133): Display row number displayed as 0 after click some (#6637)
* fix(TUP-41133): Display row number displayed as 0 after click some
buttons in schema of tDBOutput

* fix(TUP-41133): refresh for paste action
2023-12-19 18:52:28 +08:00
bhe-talendbj
e9fb0a7d70 chore(TUP-40916): Studio issues if Java version is > Java 17 (#6572)
* chore(TUP-40916): update error message

* chore(TUP-40916): update error message

* chore(TUP-40916): exit studio if validate java version error

* chore(TUP-40916): exit studio if validate java version error

* chore(TUP-40916): update error messages

* chore(TUP-40916): update error messages

* chore(TUP-40916): validate java complier's compliance level

* chore(TUP-40916): update message

* chore(TUP-40916): update message
2023-12-18 14:55:27 +08:00
bhe-talendbj
962800e16b fix(TUP-41020): LDAP Metadata : Check Authentication fails when Encryption method = LDAPS(SSL) even with correct credentials. (#6590)
* fix(TUP-41020): init default trust manager if can not find cacert path

* fix(TUP-41020): add junit test
2023-12-18 10:09:48 +08:00
Jane Ding
c605b5cf6e fix(TUP-40871):Import dependencies will not calculate the context (#6587)
* fix(TUP-40871):Import dependencies will not calculate the context
dependent for db connection
https://jira.talendforge.org/browse/TUP-40871

* fix(TUP-40871):Import dependencies will not calculate the context
dependent for db connection
https://jira.talendforge.org/browse/TUP-40871
2023-12-18 09:59:47 +08:00
bhe-talendbj
50facdd03d fix(TUP-41249): correct allowed seconds for pat (#6631) 2023-12-13 17:41:12 +08:00
kjwang
0d3ad601ab TUP-41174 old version of Teradata related jars download fail (#6629)
* TUP-41174 old version of Teradata related jars download fail (Add junit)
https://jira.talendforge.org/browse/TUP-41174
2023-12-12 17:50:08 +08:00
apoltavtsev
4851f670d6 APPINT-36161: Correct build type for child Route job (#6619) 2023-12-11 09:23:59 +01:00
msjian
afc3c0c57e fix(TDQ-21668): fix generate job ThresholdViolationAlert fail when jdk17 (#6622) 2023-12-11 16:07:24 +08:00
kjwang
5cc4ddbcf2 Fix TUP-41174 old version of Teradata related jars download fail (#6620) (#6626)
* Fix TUP-41174 old version of Teradata related jars download fail
https://jira.talendforge.org/browse/TUP-41174
2023-12-11 15:54:37 +08:00
bhe-talendbj
646c80fec6 chore(TUP-41184): correct maven repository id (#6624) 2023-12-11 15:43:27 +08:00
Zhiwei Xue
7f5e7c70b3 fix(TUP-41154):TcompV0 metadata refresh issue when only parts feature (#6609)
installed
2023-12-08 18:21:04 +08:00
sbliu
3a196a0095 Revert "fix(TUP-41057) add dnd support for dynamic setting's tableviewer (#6592)" (#6614)
This reverts commit 2019954122.
2023-12-08 17:02:05 +08:00
Jane Ding
b571bef976 Add localized files (#6606) (#6616)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-12-08 16:03:18 +08:00
Svitlana Ponomarova
55b69f481c fix 2023-11-09 16:54:56 +02:00
Svitlana Ponomarova
8aa6483763 Merge branch 'maintenance/8.0' into feat/TBD-14909 2023-11-09 13:24:56 +02:00
Svitlana Ponomarova
6dc252bead fix 2023-11-09 13:01:16 +02:00
Svitlana Ponomarova
e43081efbd feat(TBD-14909): Configuring ADLS Gen2 Storage to use service principal when connecting to HD Insight 2023-10-13 16:16:03 +03:00
103 changed files with 1753 additions and 1922 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

View File

@@ -40,6 +40,8 @@ public class ExceptionMessageDialog extends MessageDialog {
private String exceptionString = null;
private int[] diabledButtonIndex = new int[] {};
private boolean expandedOnOpen = false;
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
@@ -85,6 +87,8 @@ public class ExceptionMessageDialog extends MessageDialog {
text.setText(exceptionString);
text.setEditable(false);
errorComposite.setClient(text);
errorComposite.setExpanded(expandedOnOpen);
return errorComposite;
}
@@ -150,6 +154,22 @@ public class ExceptionMessageDialog extends MessageDialog {
this.exceptionString = exceptionString;
}
/**
* @return the expandedOnOpen
*/
public boolean isExpandedOnOpen() {
return expandedOnOpen;
}
/**
* @param expandedOnOpen the expandedOnOpen to set
*/
public void setExpandedOnOpen(boolean expandedOnOpen) {
this.expandedOnOpen = expandedOnOpen;
}
public void setDisabledButtons(int[] index) {
this.diabledButtonIndex = index;
}

View File

@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\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\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\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\u6642\u3092\u9078\u629E

View File

@@ -39,6 +39,7 @@ public enum EImage implements IImage {
EDIT_ICON("/icons/write_obj.gif"), //$NON-NLS-1$
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
WRAP_ICON("/icons/wrap.png"), //$NON-NLS-1$
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$

View File

@@ -23,10 +23,19 @@ public class FatalException extends RuntimeException {
@SuppressWarnings("unused")//$NON-NLS-1$
private static final long serialVersionUID = 1L;
public static final int CODE_INCOMPATIBLE_UPDATE = 10;
private int code;
public FatalException(String message, Throwable cause) {
super(message, cause);
}
public FatalException(int code, String message) {
super(message);
this.code = code;
}
public FatalException(String message) {
super(message);
}
@@ -34,4 +43,9 @@ public class FatalException extends RuntimeException {
public FatalException(Throwable cause) {
super(cause);
}
public int getCode() {
return code;
}
}

View File

@@ -31,7 +31,9 @@ import javax.xml.transform.stream.StreamResult;
import org.talend.utils.xml.XmlUtils;
import org.w3c.dom.Document;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
/**
*
@@ -50,6 +52,23 @@ public final class XMLFileUtil {
public static Document loadDoc(InputStream stream) throws ParserConfigurationException, SAXException, IOException {
try {
DocumentBuilder db = DOCBUILDER_FACTORY.newDocumentBuilder();
db.setErrorHandler(new ErrorHandler() {
@Override
public void warning(SAXParseException exception) throws SAXException {
throw exception;
}
@Override
public void fatalError(SAXParseException exception) throws SAXException {
throw exception;
}
@Override
public void error(SAXParseException exception) throws SAXException {
throw exception;
}
});
return db.parse(stream);
} finally {
try {

View File

@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\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\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E

View File

@@ -52,7 +52,7 @@ public abstract class ExtendedTableCaseCommand extends Command implements IExten
@Override
public void execute() {
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
extendedTable.getTableViewer().refresh();
}
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);

View File

@@ -17,6 +17,7 @@ import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
import org.talend.commons.ui.utils.SimpleClipboard;
import org.talend.commons.utils.data.list.UniqueStringGenerator;
@@ -65,6 +66,11 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
List list = new ArrayList((List) data);
list = createPastableBeansList(extendedTable, list);
extendedTable.addAll(indexStart, list);
// when not lazy load need to do refresh to refresh the row number
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
extendedTable.getTableViewer().refresh();
}
}
}

View File

@@ -14,6 +14,7 @@ package org.talend.commons.ui.swt.advanced.dataeditor.commands;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
@@ -54,7 +55,7 @@ public abstract class ExtendedTableQuoteCommand extends Command implements IExte
@Override
public void execute() {
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
extendedTable.getTableViewer().refresh();
}
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);

View File

@@ -1,101 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2023 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.ui.swt.dnd;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTarget;
import org.eclipse.swt.dnd.DropTargetAdapter;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
public class DNDTableViewerHelper {
public static void addDndSupport(final TableViewer tableViewer) {
if(tableViewer == null) {
return;
}
DropTarget dropTarget = new DropTarget(tableViewer.getTable(), DND.DROP_DEFAULT | DND.DROP_COPY);
dropTarget.setTransfer(new Transfer[] { TextTransfer.getInstance()});
dropTarget.addDropListener(new DropTargetAdapter() {
@Override
public void dragOver(DropTargetEvent event) {
if(!isColumnDroptable(tableViewer, getTargetColumn(event))) {
event.detail = DND.DROP_NONE;
} else {
event.detail = DND.DROP_COPY;
}
}
@Override
public void dragEnter(DropTargetEvent event) {
// Allow dropping text only
for (int i = 0, n = event.dataTypes.length; i < n; i++) {
if (TextTransfer.getInstance().isSupportedType(event.dataTypes[i])) {
event.currentDataType = event.dataTypes[i];
}
}
}
@Override
public void drop(DropTargetEvent event) {
if (ifAnyTextDropped(event)) {
pasteToTable(event);
}
}
private boolean ifAnyTextDropped(DropTargetEvent event) {
return TextTransfer.getInstance().isSupportedType(event.currentDataType);
}
private void pasteToTable(DropTargetEvent event) {
int columnIndex = getTargetColumn(event);
if(isColumnDroptable(tableViewer, columnIndex)) {
TableItem item = (TableItem) event.item;
String originContext = item.getText(columnIndex);
String idColmn = (String) tableViewer.getColumnProperties()[columnIndex];
ICellModifier cellModifier = tableViewer.getCellModifier();
cellModifier.modify(event.item, idColmn, originContext + (String)event.data);
}
}
private boolean isColumnDroptable(final TableViewer tableViewer, int columnIndex) {
CellEditor[] cellEditors = tableViewer.getCellEditors();
boolean isTextCellEditor = cellEditors[columnIndex] != null
&& cellEditors[columnIndex].getControl() instanceof Text;
return isTextCellEditor;
}
private int getTargetColumn(DropTargetEvent event) {
Point posInTable = tableViewer.getTable().toControl(event.x, event.y);
ViewerCell cell = tableViewer.getCell(posInTable);
int columnIndex = 0;
if(cell != null) {
columnIndex = cell.getColumnIndex();
}
return columnIndex;
}
});
}
}

View File

@@ -24,7 +24,6 @@ import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorColumnNot
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
import org.talend.commons.ui.runtime.swt.tableviewer.behavior.ITableCellValueModifiedListener;
import org.talend.commons.ui.runtime.swt.tableviewer.data.AccessorUtils;
import org.talend.commons.ui.swt.dnd.DNDTableViewerHelper;
import org.talend.commons.ui.swt.extended.table.ModifyBeanValueCommand;
import org.talend.commons.ui.swt.proposal.ExtendedTextCellEditorWithProposal;
import org.talend.commons.ui.swt.tableviewer.behavior.DefaultCellModifier;
@@ -149,9 +148,6 @@ public class TableViewerCreator<B> extends TableViewerCreatorNotModifiable<B> im
@Override
public Table createTable() {
Table table = super.createTable();
DNDTableViewerHelper.addDndSupport(getTableViewer());
initCellModifier();
return table;

View File

@@ -1,178 +1,178 @@
// ============================================================================
//
// Copyright (C) 2006-2021 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.ui.utils.loader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.log4j.Logger;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
/**
* ggu class global comment. Detailled comment
*/
public class MyURLClassLoader extends URLClassLoader {
public static interface IAssignableClassFilter {
public boolean filter(URL[] urls);
public boolean filter(Class clazz);
public boolean filter(String clazzName);
}
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
private Map pclasses = new HashMap();
public MyURLClassLoader(String fileName) throws IOException {
this(new File(fileName).toURL());
}
public MyURLClassLoader(URL url) {
this(new URL[] { url });
}
public MyURLClassLoader(URL[] urls) {
super(urls, Class.class.getClassLoader());
}
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
super(urls, parentLoader);
}
public Class[] getAssignableClasses(Class type) throws IOException {
return getAssignableClasses(type, null);
}
@SuppressWarnings("unchecked")
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
List classes = new ArrayList();
URL[] urls = getURLs();
for (URL url : urls) {
if (filter != null && filter.filter(new URL[] { url })) {
continue;
}
File file = new File(url.getFile());
if (!file.isDirectory() && file.exists() && file.canRead()) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (IOException ex) {
ExceptionHandler.process(ex);
}
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
Class cls = null;
String entryName = entries.nextElement().getName();
String className = changeFileNameToClassName(entryName);
if (className != null) {
if (filter != null && filter.filter(className)) {
continue;
}
try {
cls = loadClass(className);
} catch (Throwable th) {
log.warn(th);
}
if (cls != null) {
if (filter != null && filter.filter(cls)) {
continue;
}
if (isAssignableType(type, cls)) {
classes.add(cls);
}
}
}
}
}
}
return (Class[]) classes.toArray(new Class[classes.size()]);
}
@SuppressWarnings("unchecked")
private boolean isAssignableType(Class type, Class current) {
if (type == null || current == null || current.equals(Object.class)) {
return false;
}
if (type.isAssignableFrom(current)) {
return true;
} else
// sometimes can not assign the java generic, use the class url
if (type.getName() != null && type.getName().equals(current.getName())) {
return true;
} else {
//
if (type.isInterface()) {//
for (Class interfaceClazz : current.getInterfaces()) {
if (interfaceClazz.equals(type)) {
return true;
} else {
if (isAssignableType(type, interfaceClazz)) {
return true;
}
}
}
if (isAssignableType(type, current.getSuperclass())) {
return true;
}
} else {
return isAssignableType(type, current.getSuperclass());
}
}
return false;
}
/*
* (non-Javadoc)
*
* @see java.net.URLClassLoader#findClass(java.lang.String)
*/
@SuppressWarnings("unchecked")
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
Class cls = (Class) pclasses.get(className);
if (cls == null) {
cls = super.findClass(className);
pclasses.put(className, cls);
}
return cls;
}
public static String changeFileNameToClassName(String name) {
if (name == null) {
throw new IllegalArgumentException("File Name == null");
}
String className = null;
if (name.toLowerCase().endsWith(".class")) {
className = name.replace('/', '.');
className = className.replace('\\', '.');
className = className.substring(0, className.length() - 6);
}
return className;
}
protected void classHasBeenLoaded(Class cls) {
}
}
// ============================================================================
//
// Copyright (C) 2006-2021 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.ui.utils.loader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.log4j.Logger;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
/**
* ggu class global comment. Detailled comment
*/
public class MyURLClassLoader extends URLClassLoader {
public static interface IAssignableClassFilter {
public boolean filter(URL[] urls);
public boolean filter(Class clazz);
public boolean filter(String clazzName);
}
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
private Map pclasses = new HashMap();
public MyURLClassLoader(String fileName) throws IOException {
this(new File(fileName).toURI().toURL());
}
public MyURLClassLoader(URL url) {
this(new URL[] { url });
}
public MyURLClassLoader(URL[] urls) {
super(urls, Class.class.getClassLoader());
}
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
super(urls, parentLoader);
}
public Class[] getAssignableClasses(Class type) throws IOException {
return getAssignableClasses(type, null);
}
@SuppressWarnings("unchecked")
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
List classes = new ArrayList();
URL[] urls = getURLs();
for (URL url : urls) {
if (filter != null && filter.filter(new URL[] { url })) {
continue;
}
File file = new File(url.getFile());
if (!file.isDirectory() && file.exists() && file.canRead()) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (IOException ex) {
ExceptionHandler.process(ex);
}
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
Class cls = null;
String entryName = entries.nextElement().getName();
String className = changeFileNameToClassName(entryName);
if (className != null) {
if (filter != null && filter.filter(className)) {
continue;
}
try {
cls = loadClass(className);
} catch (Throwable th) {
log.warn(th);
}
if (cls != null) {
if (filter != null && filter.filter(cls)) {
continue;
}
if (isAssignableType(type, cls)) {
classes.add(cls);
}
}
}
}
}
}
return (Class[]) classes.toArray(new Class[classes.size()]);
}
@SuppressWarnings("unchecked")
private boolean isAssignableType(Class type, Class current) {
if (type == null || current == null || current.equals(Object.class)) {
return false;
}
if (type.isAssignableFrom(current)) {
return true;
} else
// sometimes can not assign the java generic, use the class url
if (type.getName() != null && type.getName().equals(current.getName())) {
return true;
} else {
//
if (type.isInterface()) {//
for (Class interfaceClazz : current.getInterfaces()) {
if (interfaceClazz.equals(type)) {
return true;
} else {
if (isAssignableType(type, interfaceClazz)) {
return true;
}
}
}
if (isAssignableType(type, current.getSuperclass())) {
return true;
}
} else {
return isAssignableType(type, current.getSuperclass());
}
}
return false;
}
/*
* (non-Javadoc)
*
* @see java.net.URLClassLoader#findClass(java.lang.String)
*/
@SuppressWarnings("unchecked")
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
Class cls = (Class) pclasses.get(className);
if (cls == null) {
cls = super.findClass(className);
pclasses.put(className, cls);
}
return cls;
}
public static String changeFileNameToClassName(String name) {
if (name == null) {
throw new IllegalArgumentException("File Name == null");
}
String className = null;
if (name.toLowerCase().endsWith(".class")) {
className = name.replace('/', '.');
className = className.replace('\\', '.');
className = className.substring(0, className.length() - 6);
}
return className;
}
protected void classHasBeenLoaded(Class cls) {
}
}

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=\u00C9l\u00E9ment invalide
ProjectRepositoryNode.columns=Colonnes
ProjectRepositoryNode.validationRules=R\u00E8gles de validation
ProjectRepositoryNode.cdcFoundation=Fondation CDC
ProjectRepositoryNode.cdcFoundation.deprecated=Fondation CDC (d\u00E9pr\u00E9ci\u00E9)
ProjectRepositoryNode.genericSchema=Sch\u00E9mas g\u00E9n\u00E9riques
ProjectRepositoryNode.queries=Requ\u00EAtes
ProjectRepositoryNode.synonymSchemas=Sch\u00E9mas synonymes

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0
ProjectRepositoryNode.columns=\u30AB\u30E9\u30E0
ProjectRepositoryNode.validationRules=\u691C\u8A3C\u30EB\u30FC\u30EB
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u975E\u63A8\u5968)
ProjectRepositoryNode.genericSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE
ProjectRepositoryNode.queries=\u30AF\u30A8\u30EA\u30FC
ProjectRepositoryNode.synonymSchemas=\u30B7\u30CE\u30CB\u30E0\u30B9\u30AD\u30FC\u30DE

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=\u65E0\u6548\u9879\u76EE
ProjectRepositoryNode.columns=\u5217
ProjectRepositoryNode.validationRules=\u9A8C\u8BC1\u89C4\u5219
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u5DF2\u5F03\u7528)
ProjectRepositoryNode.genericSchema=\u901A\u7528 schema
ProjectRepositoryNode.queries=\u67E5\u8BE2
ProjectRepositoryNode.synonymSchemas=\u540C\u4E49\u5B57 schema

View File

@@ -147,7 +147,11 @@ public class LDAPCATruster implements X509TrustManager {
} catch (IOException ex) {
}
try {
ks.load(in, certStorePwd);
if (in != null) {
ks.load(in, certStorePwd);
} else {
ks = null;
}
} catch (Exception e) {
log.error(Messages.getString("LDAPCATruster.failedLoadCert") + e.getMessage()); //$NON-NLS-1$
return;

View File

@@ -856,13 +856,13 @@ public class XmiResourceManager {
URI orgPropertyResourceURI = EcoreUtil.getURI(originalItem.getProperty());
URI orgRelativePlateformDestUri = orgPropertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.SCREENSHOT_EXTENSION);
URL orgFileURL = FileLocator.toFileURL(new java.net.URL(
URL orgFileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + orgRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
URI newPropertyResourceURI = EcoreUtil.getURI(newItem.getProperty());
URI newRelativePlateformDestUri = newPropertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.SCREENSHOT_EXTENSION);
URL newFileURL = FileLocator.toFileURL(new java.net.URL(
URL newFileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + newRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
os = new FileOutputStream(newFileURL.getFile());

View File

@@ -49,8 +49,10 @@ tDqReportRun=java.base/java.lang,java.base/java.nio
tWebService=java.base/java.lang
tWebServiceInput=java.base/java.lang
tRESTClient=java.base/sun.net.www.protocol.https,java.base/java.net
# TCK framework
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch,java.base/sun.net.www.protocol.https
# BigData distribution
SPARK_3_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar

View File

@@ -39,6 +39,9 @@ import org.talend.core.GlobalServiceRegister;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.utils.JavaVersion;
import org.talend.utils.StudioKeysFileCheck;
import org.talend.utils.VersionException;
/**
* Utilities around perl stuff. <br/>
@@ -248,7 +251,7 @@ public final class JavaUtils {
setProjectJavaVserion(javaVersion);
applyCompilerCompliance(javaVersion);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
IRunProcessService service = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
service.updateProjectPomWithTemplate();
}
}
@@ -284,6 +287,10 @@ public final class JavaUtils {
if (version == null) {
return defaultCompliance;
}
JavaVersion ver = new JavaVersion(version);
if (ver.getMajor() > 8) {
return String.valueOf(ver.getMajor());
}
if (version.startsWith(JavaCore.VERSION_1_8)) {
return JavaCore.VERSION_1_8;
}
@@ -364,5 +371,39 @@ public final class JavaUtils {
monitor.worked(1);
}
}
public static void validateJavaVersion() {
try {
// validate jvm which is used to start studio
StudioKeysFileCheck.validateJavaVersion();
// validate default complier's compliance level
IVMInstall install = JavaRuntime.getDefaultVMInstall();
String ver = getCompilerCompliance((IVMInstall2) install, JavaCore.VERSION_1_8);
if (new JavaVersion(ver).compareTo(new JavaVersion(StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING)) > 0) {
VersionException e = new VersionException(VersionException.ERR_JAVA_VERSION_NOT_SUPPORTED,
"The maximum Java version supported by Studio is " + StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING + ". Your compiler's compliance level is " + ver);
throw e;
}
} catch (Exception e1) {
if (e1 instanceof VersionException) {
throw e1;
}
ExceptionHandler.process(e1);
}
}
public static boolean isJava17() {
boolean isJava17 = false;
String javaVersion = System.getProperty("java.version");
String[] arr = javaVersion.split("[^\\d]+");
try {
isJava17 = Integer.parseInt(arr[0]) >= 17;
} catch (NumberFormatException e) {
ExceptionHandler.process(e);
isJava17 = false;
}
return isJava17;
}
}

View File

@@ -194,9 +194,21 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER = "CONN_PARA_KEY_WEB_HCAT_JOB_RESULT_FOLDER"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_AUTH_MODE = "CONN_PARA_KEY_HDI_AUTH_MODE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_USERNAME = "CONN_PARA_KEY_HDI_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_PASSWORD = "CONN_PARA_KEY_HDI_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_DIRECTORY_ID = "CONN_PARA_KEY_HDI_DIRECTORY_ID"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_APPLICATION_ID = "CONN_PARA_KEY_HDI_APPLICATION_ID"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_CLIENT_KEY = "CONN_PARA_KEY_HDI_CLIENT_KEY"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_USE_HDI_CLIENT_CERTIFICATE = "CONN_PARA_KEY_USE_HDI_CLIENT_CERTIFICATE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_HDI_CLIENT_CERTIFICATE = "CONN_PARA_KEY_HDI_CLIENT_CERTIFICATE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE = "CONN_PARA_KEY_AZURE_HDINSIGHT_STORAGE"; //$NON-NLS-1$
@@ -209,7 +221,13 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_AZURE_USERNAME = "CONN_PARA_KEY_AZURE_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_PASSWORD = "CONN_PARA_KEY_AZURE_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_AUTH_MODE = "CONN_PARA_KEY_AZURE_AUTH_MODE"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_FS_USERNAME = "CONN_PARA_KEY_AZURE_FS_USERNAME"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_FS_PASSWORD = "CONN_PARA_KEY_AZURE_FS_PASSWORD"; //$NON-NLS-1$
public static final String CONN_PARA_KEY_AZURE_DEPLOY_BLOB = "CONN_PARA_KEY_AZURE_DEPLOY_BLOB"; //$NON-NLS-1$
/******************************************/

View File

@@ -55,7 +55,7 @@ public enum EDatabaseVersion4Drivers {
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby-10.14.2.0.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, new String[] { "slf4j-api-1.7.34.jar", "sqlite-jdbc-3.44.1.0.jar" })), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$

View File

@@ -101,8 +101,18 @@ public enum EHadoopProperties {
HD_AZURE_HOSTNAME,
HD_AZURE_CONTAINER,
HD_ADLSGEN2AUTH,
HD_AZURE_USERNAME,
HD_APPLICATION_ID,
HD_DIRECTORY_ID,
HD_CLIENT_KEY,
HD_CLIENT_CERTIFICATE,
HD_AZURE_DEPLOYBOLB,

View File

@@ -45,6 +45,8 @@ import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
*/
public class JobContextManager implements IContextManager {
private boolean isWrapContextText;
private IContext defaultContext = new JobContext(IContext.DEFAULT);
private List<IContext> listContext = new ArrayList<IContext>();
@@ -102,6 +104,14 @@ public class JobContextManager implements IContextManager {
private Map<ContextItem, List<IContext>> renameContextGroupMap = new HashMap<ContextItem, List<IContext>>();
public boolean isWrapContextText() {
return isWrapContextText;
}
public void setWrapContextText(boolean isWrapContextText) {
this.isWrapContextText = isWrapContextText;
}
public Map<ContextItem, List<IContext>> getAddContextGroupMap() {
return this.addContextGroupMap;
}

View File

@@ -20,7 +20,6 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.pendo.PendoDataTrackFactory;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.service.ICloudSignOnService;
import org.talend.repository.model.RepositoryConstants;
@@ -254,7 +253,13 @@ public class ConnectionBean implements Cloneable {
String user = conDetails.getString(USER);
if (isToken()) {
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
if (ICloudSignOnService.get() != null) {
try {
user = ICloudSignOnService.get().getTokenUser(url, getPassword());
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
if (StringUtils.isNotBlank(user)) {
setUser(user);
}

View File

@@ -42,15 +42,25 @@ public enum EParameterNameForComponent {
PARA_NAME_WEBHCAT_USERNAME("WEBHCAT_USERNAME"), //$NON-NLS-1$
PARA_NAME_STATUSDIR("STATUSDIR"), //$NON-NLS-1$
PARA_NAME_ADLSGEN2AUTH("HDI_ADLSGEN2AUTH"), //$NON-NLS-1$
PARA_NAME_HDINSIGHT_USERNAME("HDINSIGHT_USERNAME"), //$NON-NLS-1$
PARA_NAME_HDINSIGHT_PASSWORD("HDINSIGHT_PASSWORD"), //$NON-NLS-1$
PARA_NAME_HDI_DIRECTORY_ID("HDI_DIRECTORY_ID"), //$NON-NLS-1$
PARA_NAME_HDI_APPLICATION_ID("HDI_APPLICATION_ID"), //$NON-NLS-1$
PARA_NAME_HDI_CLIENT_KEY("HDI_CLIENT_KEY"), //$NON-NLS-1$
PARA_NAME_HDI_USE_CERTIFICATE("HDI_USE_CERTIFICATE"), //$NON-NLS-1$
PARA_NAME_HDI_CLIENT_CERTIFICATE("HDI_CLIENT_CERTIFICATE"), //$NON-NLS-1$
PARA_NAME_HDINSIGHT_STORAGE("HDINSIGHT_STORAGE"), //$NON-NLS-1$
PARA_NAME_HDINSIGHT_STORAGE_USE_TLS("HDINSIGHT_STORAGE_USE_TLS"), //$NON-NLS-1$
PARA_NAME_WASB_HOST("WASB_HOST"), //$NON-NLS-1$
PARA_NAME_WASB_CONTAINER("WASB_CONTAINER"), //$NON-NLS-1$

View File

@@ -63,11 +63,4 @@ public class PendoDataTrackFactory {
}
}
public String getTmcUser(String url, String token) {
if (coreRuntimeService != null) {
return coreRuntimeService.getTmcUser(url, token);
}
return "";
}
}

View File

@@ -246,6 +246,11 @@ public class ModuleAccessHelper {
if ("ID".equals(property.getId()) && "Mock_job_for_Guess_schema".equals(property.getLabel())) {
return true;
}
// TDQ-21668: only for fix generate ThresholdViolationAlert job failed
if (property.getLabel().startsWith("ThresholdViolationAlert")) { //$NON-NLS-1$
return true;
}
// TDQ-21668~
Class<?> clazz = process.getClass();
// preview process
if (CLASS_PREVIEW_PROCESS.equals(clazz.getName()) || CLASS_PREVIEW_PROCESS.equals(clazz.getSuperclass().getName())) {

View File

@@ -28,7 +28,7 @@ public interface ICloudSignOnService extends IService {
boolean hasValidToken() throws Exception;
String getTokenUser(String url, TokenMode token) throws Exception;
String getTokenUser(String url, String token) throws Exception;
void signonCloud(LoginEventListener listener) throws Exception;
@@ -61,7 +61,7 @@ public interface ICloudSignOnService extends IService {
* @param dataCenter data center of TMC
* @return Introspected PAT
*/
PAT introspectPAT(String pat, String dataCenter);
PAT introspectPAT(String pat, String dataCenter) throws Exception;
/**
* Introspect pat and check whether pat is allowed
@@ -70,5 +70,5 @@ public interface ICloudSignOnService extends IService {
* @param tmcUrl tmc url
* @return valid or not
*/
boolean validatePAT(String pat, String tmcUrl);
boolean validatePAT(String pat, String tmcUrl) throws Exception;
}

View File

@@ -23,8 +23,6 @@ import org.talend.core.pendo.properties.IPendoDataProperties;
*/
public interface ICoreTisRuntimeService extends IService {
String getTmcUser(String url, String token);
AbstractPendoTrackManager getPendoProjectLoginManager();
AbstractPendoTrackManager getPendoGenericManager(TrackEvent event, IPendoDataProperties peoperties);

View File

@@ -149,6 +149,10 @@ public interface IStudioLiteP2Service extends IService {
void cleanM2(IProgressMonitor monitor);
boolean isCompatibleUpdate() throws Exception;
String getCompatibleMessage() throws Exception;
public static IStudioLiteP2Service get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);

View File

@@ -36,4 +36,7 @@ public interface IReferenceProjectProvider {
public void initSettings() throws BusinessException, PersistenceException;
public boolean isHasConfigurationFile();
void resetReferenceProjectList();
}

View File

@@ -251,6 +251,12 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
public static void removeTacReferenceList(String projectLabel) {
tacReferenceMap.remove(projectLabel);
}
@Override
public void resetReferenceProjectList() {
referenceProjectList = null;
}
}
class ReferenceProjectConfiguration {

View File

@@ -22,6 +22,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.CoreException;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
@@ -41,6 +42,7 @@ import org.talend.repository.model.IRepositoryNode;
*
*/
public class ExportFileResource {
private static Logger LOGGER = Logger.getLogger(ExportFileResource.class);
private Item item;
@@ -101,7 +103,7 @@ public class ExportFileResource {
String decodeStr = URLDecoder.decode(url.toString(), "UTF-8"); //$NON-NLS-1$
url = new URL(decodeStr);
} catch (Exception e) {
e.printStackTrace(); // only for debug.
LOGGER.warn(e);
}
return url;

View File

@@ -499,6 +499,7 @@ public class RepositoryNodeUtilities {
|| curType == ERepositoryObjectType.METADATA_CON_SYNONYM
|| curType == ERepositoryObjectType.METADATA_CON_QUERY
|| curType == ERepositoryObjectType.METADATA_CONNECTIONS
|| curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC
|| curType == ERepositoryObjectType.METADATA_FILE_DELIMITED
|| curType == ERepositoryObjectType.METADATA_FILE_POSITIONAL
|| curType == ERepositoryObjectType.METADATA_FILE_REGEXP
@@ -525,12 +526,13 @@ public class RepositoryNodeUtilities {
tmpType = ERepositoryObjectType.DOCUMENTATION;
}
if (tmpType != null && tmpType == rootContextType) {
if (tmpType != null && (tmpType == rootContextType || rootContextType.isChildTypeOf(tmpType))) {
expandParentNode(view, rootNode);
}
// expand the parent node
if (curType == rootContextType && isRepositoryFolder(rootNode)) {
if ((curType == rootContextType || curType.isChildTypeOf(rootContextType))
&& isRepositoryFolder(rootNode)) {
if (rootContextType == ERepositoryObjectType.SQLPATTERNS
&& !(rootNode.getParent() instanceof IProjectRepositoryNode)) {
// sql pattern

View File

@@ -108,6 +108,8 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
private Button manageEnvironmentsButton;
private Button wrapButton;
private ContextManagerHelper helper;
private List<Button> buttonList;
@@ -229,8 +231,11 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
}
private void createButtonsGroup(Composite parentComposite) {
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
&& ((ContextComposite) modelManager).isRepositoryContext();
int columnNum = isRepositoryContext ? 5 : 7;
buttonsComp = new Composite(parentComposite, SWT.NULL);
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(5, 0).margins(5, 0).numColumns(7).create());
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(10, 0).margins(5, 0).numColumns(columnNum).create());
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.DOWN).grab(true, false).applyTo(buttonsComp);
buttonList.clear();
addButton = createAddPushButton(buttonsComp);
@@ -238,8 +243,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
removeButton = createRemovePushButton(buttonsComp);
buttonList.add(removeButton);
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
&& ((ContextComposite) modelManager).isRepositoryContext();
if (!isRepositoryContext) {// for bug 7393
moveUpButton = createMoveUpPushButton(buttonsComp);
buttonList.add(moveUpButton);
@@ -253,14 +256,16 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
}
createEnvironmentsGroup(buttonsComp);
wrapButton = createWrapButton(buttonsComp);
}
private void createEnvironmentsGroup(Composite parentComposite) {
Composite environmentsComp = new Composite(parentComposite, SWT.NULL);
environmentsComp.setLayout(new GridLayout(2, false));
GridLayout gridLayout = new GridLayout(2, false);
gridLayout.horizontalSpacing = 10;
environmentsComp.setLayout(gridLayout);
GridData contextComboData = new GridData();
contextComboData.grabExcessHorizontalSpace = true;
contextComboData.horizontalAlignment = GridData.END;
environmentsComp.setLayoutData(contextComboData);
viewEnvironmentsCombo = new CCombo(environmentsComp, SWT.BORDER);
@@ -547,6 +552,35 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
return selectContextVariablesPushButton;
}
private Button createWrapButton(final Composite parent) {
Button wrapToggleButton = new Button(parent, SWT.TOGGLE);
wrapToggleButton.setBackground(parent.getBackground());
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = GridData.END;
Image image = ImageProvider.getImage(EImage.WRAP_ICON);
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
wrapToggleButton.setSelection(jobContextManager.isWrapContextText());
}
wrapToggleButton.setImage(image);
wrapToggleButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
jobContextManager.setWrapContextText(wrapToggleButton.getSelection());
}
refresh();
}
});
return wrapToggleButton;
}
private void setButtonEnableState() {
boolean enableState = !modelManager.isReadOnly();
if (this.addButton != null) {
@@ -570,6 +604,13 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
if (contextsCombo != null) {
this.contextsCombo.setEnabled(enableState);
}
if (wrapButton != null) {
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
wrapButton.setSelection(jobContextManager.isWrapContextText());
}
}
}
public Object createNewEntry() {

View File

@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -34,6 +35,7 @@ import org.eclipse.nebula.widgets.nattable.config.DefaultComparator;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.nebula.widgets.nattable.data.IColumnPropertyAccessor;
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.nebula.widgets.nattable.edit.event.DataUpdateEvent;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.DetailGlazedListsEventLayer;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsSortModel;
@@ -56,10 +58,18 @@ import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup;
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupReorderLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
import org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform;
import org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform;
import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
import org.eclipse.nebula.widgets.nattable.layer.config.DefaultColumnHeaderStyleConfiguration;
import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowDeleteEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowInsertEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowStructuralChangeEvent;
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
import org.eclipse.nebula.widgets.nattable.painter.layer.NatGridLayerPainter;
import org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer;
@@ -92,7 +102,9 @@ import org.eclipse.swt.widgets.Event;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.ColorConstants;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.context.JobContextManager;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IContextManager;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
@@ -149,6 +161,10 @@ public class ContextTreeTable {
private final static int fixedTypeWidth = 100;
private final static int minDefultHeight = 20;
private final static int maxDefaultWidth = 400;
public ContextTreeTable(IContextModelManager manager) {
this.manager = manager;
}
@@ -421,6 +437,101 @@ public class ContextTreeTable {
currentNatTabSel = (IStructuredSelection) event.getSelection();
}
});
this.natTable.addLayerListener(new ILayerListener() {
@Override
public void handleLayerEvent(ILayerEvent event) {
// DataUpdateEvent->Data change, RowInsertEvent->node expand, RowDeleteEvent->node collapse
if (event instanceof DataUpdateEvent) {
// data changed then execute here no need compare value
DataUpdateEvent dataEvent = (DataUpdateEvent) event;
ILayer layer = dataEvent.getLayer();
DataLayer dataLayer = getDataLayer(layer);
if (dataLayer == null) {
return;
}
int rowPosition = dataEvent.getRowPosition();
int columnPosition = dataEvent.getColumnPosition();
if (layer instanceof GridLayer) {
GridLayer gridLayer = (GridLayer) layer;
rowPosition = rowPosition - gridLayer.getColumnHeaderLayer().getRowCount();
columnPosition = columnPosition - gridLayer.getRowHeaderLayer().getColumnCount();
}
String text = dataEvent.getNewValue() == null ? "" : dataEvent.getNewValue().toString();
GC gc = new GCFactory(natTable).createGC();
Point point = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int textLength = point.x;
int currentColumnWidth = layer.getColumnWidthByPosition(columnPosition);
if (textLength > layer.getColumnWidthByPosition(columnPosition)) {
if (textLength > maxDefaultWidth) {
int columnWidth = Math.max(currentColumnWidth, maxDefaultWidth);
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
} else {
int columnWidth = getColumWidth(gc, dataLayer, columnPosition);
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
}
}
int promptColPos = dataLayer.getColumnPositionByIndex(3);
IContextManager contextManager = manager.getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
if (jobContextManager.isWrapContextText()) {
int rowHeight = getRowHeight(gc, dataLayer, rowPosition, promptColPos);
dataLayer.setRowHeightByPosition(rowPosition, rowHeight);
}
}
gc.dispose();
} else if (event instanceof RowInsertEvent || event instanceof RowDeleteEvent) {
RowStructuralChangeEvent changeEvent = (RowStructuralChangeEvent) event;
ILayer layer = changeEvent.getLayer();
DataLayer dataLayer = getDataLayer(layer);
List<Integer> checkPos = new ArrayList<Integer>();
checkPos.add(3);
adjustCellWidthHeight(dataLayer, checkPos);
}
}
});
}
private DataLayer getDataLayer(ILayer layer) {
DataLayer dataLayer = null;
if (layer instanceof GridLayer) {
GridLayer gridLayer = (GridLayer) layer;
ILayer bodyLayer = gridLayer.getBodyLayer();
if (bodyLayer instanceof AbstractLayerTransform) {
AbstractLayerTransform childLayer = (AbstractLayerTransform) bodyLayer;
dataLayer = findDataLayerByUnderlyingLayer(childLayer);
}
} else if (layer instanceof DataLayer) {
dataLayer = (DataLayer) layer;
} else if (layer instanceof AbstractLayerTransform || layer instanceof AbstractIndexLayerTransform) {
dataLayer = findDataLayerByUnderlyingLayer(layer);
}
return dataLayer;
}
private DataLayer findDataLayerByUnderlyingLayer(ILayer layer) {
// only 1 underlyingLayer set on AbstractLayerTransform / AbstractIndexLayerTransform
ILayer underlyingLayer = null;
if (layer instanceof AbstractLayerTransform) {
AbstractLayerTransform layerTransform = (AbstractLayerTransform) layer;
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
} else if (layer instanceof AbstractIndexLayerTransform) {
AbstractIndexLayerTransform layerTransform = (AbstractIndexLayerTransform) layer;
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
}
if (underlyingLayer instanceof DataLayer) {
return (DataLayer) underlyingLayer;
} else if (underlyingLayer instanceof AbstractLayerTransform) {
AbstractLayerTransform childLayer = (AbstractLayerTransform) underlyingLayer;
return findDataLayerByUnderlyingLayer(childLayer);
} else if (underlyingLayer instanceof AbstractIndexLayerTransform) {
AbstractIndexLayerTransform childLayer = (AbstractIndexLayerTransform) underlyingLayer;
return findDataLayerByUnderlyingLayer(childLayer);
}
return null;
}
private List<Integer> getAllCheckPosBehaviour(IContextModelManager manager, ColumnGroupModel contextGroupModel) {
@@ -448,58 +559,108 @@ public class ContextTreeTable {
dataLayer.setColumnWidthByPosition(i, averageWidth);
}
} else {
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2;
int currentColumnsCount = dataColumnsCount - checkColumnsPos.size() - 1;
int averageWidth = leftWidth / currentColumnsCount;
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
boolean findHide = false;
boolean findCheck = false;
boolean findType = false;
if (typeColumnPos == i) {
findType = true;
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
}
for (int checkPos : checkColumnsPos) {
if (checkPos == i) {
findCheck = true;
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
}
}
if (!findHide && !findCheck && !findType) {
int colW = getColumWidth(dataLayer, i, averageWidth);
dataLayer.setColumnWidthByPosition(i, colW);
}
}
adjustCellWidthHeight(dataLayer, checkColumnsPos);
}
}
private int getColumWidth(DataLayer dataLayer, int colPos, int avgWidth) {
int colWidth = fixedTypeWidth;
private void adjustCellWidthHeight(DataLayer dataLayer, List<Integer> checkColumnsPos) {
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
GC gc = new GCFactory(natTable).createGC();
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
boolean findCheck = false;
boolean findType = false;
if (typeColumnPos == i) {
findType = true;
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
}
for (int checkPos : checkColumnsPos) {
if (checkPos == i) {
findCheck = true;
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
}
}
if (!findCheck && !findType) {
int colW = getColumWidth(gc, dataLayer, i);
dataLayer.setColumnWidthByPosition(i, colW);
}
}
// setColumnWidthByPosition final scaled by DPI, set height according final width
int promptColPos = dataLayer.getColumnPositionByIndex(3);
IContextManager contextManager = manager.getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
if (jobContextManager.isWrapContextText()) {
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
int rowHeight = getRowHeight(gc, dataLayer, i, promptColPos);
dataLayer.setRowHeightByPosition(i, rowHeight);
}
}
}
gc.dispose();
}
private int getColumWidth(GC gc, DataLayer dataLayer, int colPos) {
int colWidth = fixedTypeWidth;
int max = 0;
String text = "";
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
Object dataValueByPosition = dataLayer.getDataValueByPosition(colPos, i);
if (dataValueByPosition == null) {
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
continue;
}
text = dataValueByPosition.toString();
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int temp = size.x;
if (temp > max) {
max = temp;
int textWidth = size.x;
if (textWidth > max) {
max = textWidth;
}
}
gc.dispose();
if (max > colWidth) {
max = (int) (max - text.getBytes().length * 1.5);
if (max > maxDefaultWidth) {
max = maxDefaultWidth;
}
}
return colWidth > max ? colWidth : max;
}
private int getRowHeight(GC gc, DataLayer dataLayer, int rowPos, int promptColPos) {
int maxHeight = minDefultHeight;
for (int j = 0; j < dataLayer.getColumnCount(); j++) {
// only check value column height
if (j <= promptColPos) {
continue;
}
Object dataValueByPosition = dataLayer.getDataValueByPosition(j, rowPos);
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
continue;
}
String text = dataValueByPosition.toString();
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int textWidth = size.x;
int textHeight = size.y;
String[] lines = text.split(TextPainter.NEW_LINE_REGEX);
int columnWidth = dataLayer.getColumnWidthByPosition(j);
if (textWidth >= columnWidth || lines.length > 1) {
int heightCount = 0;
for (String line : lines) {
int lineWidth = gc.textExtent(line).x;
if (lineWidth < columnWidth) {
heightCount++;
} else {
heightCount += lineWidth / columnWidth;
heightCount += lineWidth % columnWidth == 0 ? 0 : 1;
}
}
int cellheight = textHeight * heightCount;
maxHeight = Math.max(maxHeight, dataLayer.downScaleRowHeight(cellheight));
} else {
maxHeight = Math.max(maxHeight, textHeight);
}
}
return maxHeight;
}
private void addCustomSelectionBehaviour(SelectionLayer layer) {
// need control the selection style when select the rows.
DefaultSelectionStyleConfiguration selectStyleConfig = new DefaultSelectionStyleConfiguration();

View File

@@ -0,0 +1,84 @@
// ============================================================================
//
// Copyright (C) 2006-2023 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.ui.context;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.swt.colorstyledtext.ColorStyledText;
/**
* DOC jding class global comment. Detailled comment
*/
public class StringTextDialog extends Dialog {
private String content;
private Text text;
public StringTextDialog(Shell parentShell) {
super(parentShell);
}
public StringTextDialog(Shell parentShell, String content) {
super(parentShell);
this.content = content;
}
@Override
protected boolean isResizable() {
return true;
}
@Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText("Enter the value");
}
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 640;
gd.heightHint = 260;
composite.setLayoutData(gd);
composite.setLayout(new GridLayout());
text = new Text(composite, SWT.WRAP | SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.LEFT);
text.setForeground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_FOREGROUND).orElse(null));
text.setBackground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_BACKGROUND).orElse(null));
text.setLayoutData(new GridData(GridData.FILL_BOTH));
text.setText(content);
text.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
content = text.getText();
}
});
return composite;
}
public String getTextContent() {
return content;
}
}

View File

@@ -37,7 +37,9 @@ import org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter;
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
import org.eclipse.nebula.widgets.nattable.style.CellStyleUtil;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.style.Style;
import org.eclipse.nebula.widgets.nattable.style.VerticalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum;
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
import org.eclipse.swt.graphics.Color;
@@ -128,7 +130,11 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CHECK_PROPERTY);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
Style valueCellStyleDefault = new Style();
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, ColorConstants.getTableBackgroundColor());
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignmentEnum.TOP);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, valueCellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
Style cellStyleSelect = new Style();
@@ -146,6 +152,10 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CHECK_PROPERTY);
Style valueCellStyleSelect = new Style();
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.COLOR_TITLE_INACTIVE_BACKGROUND);
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.FONT, GUIHelper.DEFAULT_FONT);
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
}
@@ -317,6 +327,13 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
ProxyDynamicCellEditor cutomCellEditor = new ProxyDynamicCellEditor(dataProvider, manager, modelManager);
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, cutomCellEditor, DisplayMode.EDIT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
ContextAutoResizeTextPainter customPainter = new ContextAutoResizeTextPainter(true, false, false);
customPainter.setWordWrapping(true);
ContextNatTableBackGroudPainter backGroudPainter = new ContextNatTableBackGroudPainter(customPainter, dataProvider);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
}
private void registerColumnFiveTextEditor(IConfigRegistry configRegistry) {

View File

@@ -15,6 +15,7 @@ package org.talend.core.ui.context.nattableTree;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.style.IStyle;
@@ -109,9 +110,12 @@ public class ContextValuesNatText extends Composite {
if (NatTableCellEditorFactory.isPassword(realPara.getType())) {
widgetStyle = SWT.PASSWORD | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
}
if (NatTableCellEditorFactory.isResource(realPara.getType())) {
if (NatTableCellEditorFactory.isResource(realPara.getType()) || NatTableCellEditorFactory.isList(realPara.getType())) {
widgetStyle = SWT.READ_ONLY | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
}
if (NatTableCellEditorFactory.isString(realPara.getType())) {
widgetStyle = widgetStyle | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL;
}
text = new Text(this, widgetStyle);
text.setBackground(cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
text.setForeground(cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));
@@ -235,6 +239,7 @@ public class ContextValuesNatText extends Composite {
*/
protected String getTransformedSelection(boolean focusOnText) {
Object result = null;
validateValue();
result = cellFactory.openCustomCellEditor(realPara, getShell());
String finalResult = "";
if (result == null || result.equals("")) {
@@ -251,6 +256,14 @@ public class ContextValuesNatText extends Composite {
return finalResult;
}
private void validateValue() {
// possible value modified manually
// notify focuslost to commit value might execute after dialog open in some os
if (NatTableCellEditorFactory.isString(realPara.getType()) && !StringUtils.equals(realPara.getValue(), text.getText())) {
realPara.setValue(text.getText());
}
}
protected String getTransformedTextForDialog(boolean focusOnText) {
String result = "";
result = getTransformedSelection(focusOnText);

View File

@@ -25,6 +25,8 @@ import org.eclipse.nebula.widgets.nattable.style.Style;
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
@@ -78,6 +80,33 @@ public class CustomTextCellEditor extends AbstractCellEditor {
this.cellStyle = cellStyle;
this.commitOnUpDown = commitOnUpDown;
this.moveSelectionOnEnter = moveSelectionOnEnter;
this.focusListener = new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
// overwrite org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor.InlineFocusListener
// set closeAfterCommit to false
if (!commit(MoveDirectionEnum.NONE, false)) {
if (!e.widget.isDisposed() && e.widget instanceof Control) {
((Control) e.widget).forceFocus();
}
} else {
if (!CustomTextCellEditor.this.parent.isDisposed()) {
CustomTextCellEditor.this.parent.forceFocus();
}
}
}
};
}
@Override
public void addEditorControlListeners() {
Control editorControl = getEditorControl();
if (editorControl != null && !editorControl.isDisposed() && this.editMode == EditModeEnum.INLINE) {
editorControl.addFocusListener(this.focusListener);
editorControl.addTraverseListener(this.traverseListener);
}
}
/*

View File

@@ -27,6 +27,7 @@ import org.talend.core.model.metadata.types.JavaTypesManager;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.service.IResourcesDependenciesService;
import org.talend.core.ui.context.MultiStringSelectionDialog;
import org.talend.core.ui.context.StringTextDialog;
import org.talend.core.utils.TalendQuoteUtils;
/**
@@ -44,7 +45,7 @@ public class NatTableCellEditorFactory {
String currentType = para.getType();
if (currentType != null) {
if (isFile(currentType) || isDate(currentType) || isDirectory(currentType) || isList(currentType)
|| isResource(currentType)) {
|| isResource(currentType) || isString(currentType)) {
return true;
}
}
@@ -67,6 +68,8 @@ public class NatTableCellEditorFactory {
defalutDataValue = para.getDisplayValue();
} else if (isResource(currentType)) {
transformResult = openResourcesDialogForCellEditor(parentShell, para);
} else if (isString(currentType)) {
transformResult = openStringDialogFoeCellEditor(parentShell, para);
}
}
return transformResult;
@@ -140,6 +143,15 @@ public class NatTableCellEditorFactory {
return ContextNatTableUtils.getSpecialTypeDisplayValue(JavaTypesManager.RESOURCE.getId(), value);
}
private String openStringDialogFoeCellEditor(Shell parentShell, IContextParameter para) {
StringTextDialog stringTextDialog = new StringTextDialog(parentShell, para.getValue());
int open = stringTextDialog.open();
if (open == Dialog.OK) {
return stringTextDialog.getTextContent();
}
return "";
}
public static String getAddQuoteString(String path) {
ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();
if (codeLanguage == ECodeLanguage.PERL) {
@@ -184,6 +196,10 @@ public class NatTableCellEditorFactory {
return MetadataToolHelper.isResource(value);
}
public static boolean isString(final String value) {
return JavaTypesManager.STRING.getId().equals(value);
}
/**
* For the different value between display value and real value, due to nattable model comes from context, if set
* new context parameter value in this factory, then the UpdateDataCommandHandler of nattable will treat this as no

View File

@@ -146,4 +146,13 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
return super.commit(direction, closeAfterCommit, skipValidation);
}
@Override
public void addEditorControlListeners() {
if (dynamicEditor != null) {
dynamicEditor.addEditorControlListeners();
} else {
super.addEditorControlListeners();
}
}
}

View File

@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -341,7 +342,11 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
column.setBeanPropertyAccessors(getRowNumAccessor());
column.setWeight(5);
column.setModifiable(false);
column.setMinimumWidth(10);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
column.setMinimumWidth(10);
} else {
column.setMinimumWidth(30);
}
column.setSortable(true);
}

View File

@@ -30,6 +30,7 @@ import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.nofitication.ArrangedNotificationPopup;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.core.CorePlugin;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
@@ -79,7 +80,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
}
public static boolean show() {
return !showOnce() && isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
return !showOnce() && JavaUtils.isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
}
private static boolean showOnce() {
@@ -132,17 +133,4 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
return false;
}
private static boolean isJava17() {
boolean isJava17 = false;
String javaVersion = System.getProperty("java.version");
String[] arr = javaVersion.split("[^\\d]+");
try {
isJava17 = Integer.parseInt(arr[0]) >= 17;
} catch (NumberFormatException e) {
ExceptionHandler.process(e);
isJava17 = false;
}
return isJava17;
}
}

View File

@@ -30,6 +30,8 @@ public interface IGitUIProviderService extends IService {
public String[] changeCredentials(Shell parent, Serializable uriIsh, String initUser, boolean canStoreCredentials);
boolean checkPendingChanges();
boolean checkUncommittedFiles();
public void openPushFailedDialog(Object pushResult);

View File

@@ -15,8 +15,11 @@ package org.talend.core.ui.token;
import org.apache.commons.codec.digest.DigestUtils;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.commons.utils.VersionUtils;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.util.SharedStudioUtils;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.daikon.token.TokenGenerator;
@@ -41,6 +44,10 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
private static final TokenKey OS = new TokenKey("os"); //$NON-NLS-1$
private static final TokenKey SHARE_MODE = new TokenKey("share.mode"); //$NON-NLS-1$
private static final TokenKey ENABLED_JAVA17_COMPATIBILITY = new TokenKey("enabled.java17.compatibility"); //$NON-NLS-1$
public static final String COLLECTOR_SYNC_NB = "COLLECTOR_SYNC_NB"; //$NON-NLS-1$
public DefaultTokenCollector() {
@@ -70,7 +77,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
// typeStudio
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService brandingService = GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getAcronym());
// tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getShortProductName());
@@ -92,6 +99,11 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
tokenStudioObject.put(STOP_COLLECTOR.getKey(), "0"); //$NON-NLS-1$
}
// Share mode
tokenStudioObject.put(SHARE_MODE.getKey(), SharedStudioUtils.isSharedStudioMode());
// Enable Java 17 compatibility
tokenStudioObject.put(ENABLED_JAVA17_COMPATIBILITY.getKey(), CoreRuntimePlugin.getInstance().getProjectPreferenceManager()
.getPreferenceStore().getBoolean(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS));
return tokenStudioObject;
}
}

View File

@@ -50,7 +50,6 @@ public class DisableLanguageActions implements IStartup {
}
ECodeLanguage lan = LanguageManager.getCurrentLanguage();
switch (lan) {
case JAVA:
ids = Arrays.asList(new String[] { "org.talend.help.perl.OpenPerlHelpAction" }); //$NON-NLS-1$

View File

@@ -1085,7 +1085,7 @@ public class ProcessorUtilities {
if (childBuildType == null) {
Property parentProperty = parentJobInfo.getProcessor().getProperty();
String parentBuildType = (String)parentProperty.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
if ("ROUTE".equalsIgnoreCase(parentBuildType)) {
if (parentBuildType!= null && parentBuildType.contains("ROUTE")) {
childProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "OSGI");
}
}

View File

@@ -333,7 +333,7 @@ _UI_InformationsetModelWizard_description = Cr\u00E9er un mod\u00E8le Informatio
_UI_InformationsetEditor_label = \u00C9diteur de mod\u00E8le Informationset
_UI_InformationsetEditorFilenameDefaultBase = INVISIBLE dans l'interface
_UI_InformationsetEditorFilenameDefaultBase = Mon
_UI_InformationsetEditorFilenameExtension = informationset
_UI_InformationreportingModelWizard_label = Mod\u00E8le Informationreporting

View File

@@ -12,6 +12,12 @@
// ============================================================================
package org.talend.designer.maven.aether.util;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import org.eclipse.aether.repository.Authentication;
import org.eclipse.aether.repository.Proxy;
import org.eclipse.aether.repository.ProxySelector;
@@ -35,6 +41,7 @@ public class TalendAetherProxySelector implements ProxySelector {
@Override
public Proxy getProxy(RemoteRepository repository) {
/**
* Update each time in case the settings are changed
*/
@@ -53,6 +60,37 @@ public class TalendAetherProxySelector implements ProxySelector {
ExceptionHandler.process(e);
}
}
if (proxy == null) {
java.net.ProxySelector jreSelector = java.net.ProxySelector.getDefault();
try {
URI uri = new URI(repository.getUrl());
List<java.net.Proxy> proxies = jreSelector.select(uri);
if (proxies != null && !proxies.isEmpty() && proxies.get(0).type() == java.net.Proxy.Type.HTTP) {
SocketAddress addr = proxies.get(0).address();
if (addr instanceof InetSocketAddress) {
InetSocketAddress iaddr = (InetSocketAddress) addr;
proxy = new org.eclipse.aether.repository.Proxy(proxies.get(0).type().name().toLowerCase(), iaddr.getHostName(), iaddr.getPort(), null);
}
}
} catch (URISyntaxException e) {
ExceptionHandler.process(e);
}
}
if (isTalendDebug) {
try {
if (repository != null) {
String proxyStr = "";
if (proxy != null) {
proxyStr = proxy.getType() + " " + proxy.toString() + ", proxy user: "
+ (proxy.getAuthentication() != null ? "..." : "<empty>");
}
ExceptionHandler.log("Aether system proxy> host: " + repository.getHost() + ", proxy: " + proxyStr);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return proxy;
}

View File

@@ -93,7 +93,7 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@@ -146,8 +146,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -97,8 +97,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -37,8 +37,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
</dependencies>
<build>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.62.1</tcomp.version>
<tcomp.version>1.63.0</tcomp.version>
<slf4j.version>1.7.34</slf4j.version>
<reload4j.version>1.2.22</reload4j.version>
</properties>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<repositories>
<repository>
<id>Talend OpenSource Release</id>
<id>talend_open</id>
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
</repository>
</repositories>

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=Projet
ProjectSettingPage_ProjectPomDesc=Param\u00E8tres des POM du projet
ProjectSettingPage_MavenCustomSetup=Configurer les scripts personnalis\u00E9s par dossier
ProjectSettingPage_MavenCustomSetupDesc=Configurer les scripts Maven personnalis\u00E9s par dossier
TalendMavenPreferencePage=Maven

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
ProjectSettingPage_ProjectPomDesc=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8POM\u8A2D\u5B9A
ProjectSettingPage_MavenCustomSetup=\u30AB\u30B9\u30BF\u30E0\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
ProjectSettingPage_MavenCustomSetupDesc=\u30AB\u30B9\u30BF\u30E0Maven\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
TalendMavenPreferencePage=Maven

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=\u5DE5\u7A0B
ProjectSettingPage_ProjectPomDesc=\u5DE5\u7A0B POM \u8BBE\u7F6E
ProjectSettingPage_MavenCustomSetup=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u811A\u672C
ProjectSettingPage_MavenCustomSetupDesc=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49 Maven \u811A\u672C
TalendMavenPreferencePage=Maven

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=Cliquez sur Forcer la nouvelle synchr
MavenProjectSettingPage.skipFolders=Ignorer les dossiers
BuildProjectSettingPage.allowRecursiveJobsJoblets=Autorise les Jobs et Joblets r\u00E9cursifs (non support\u00E9 - pour des raisons de compatibilit\u00E9)
BuildProjectSettingPage.allowRecursiveJobs=Autoriser les Jobs r\u00E9cursifs (non recommand\u00E9)
TalendMavenPreferencePage.maven.offline=Hors ligne
TalendMavenPreferencePage.maven.warn=Le mode en ligne n'est pas recommand\u00E9 dans le Studio.

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=[\u5B8C\u5168\u306A\u518D\u540C\u671F
MavenProjectSettingPage.skipFolders=\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u30B9\u30AD\u30C3\u30D7
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3068\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u3092\u8A31\u53EF(\u30B5\u30DD\u30FC\u30C8\u306A\u3057 - \u4E92\u63DB\u6027\u306E\u76EE\u7684\u306E\u307F)
BuildProjectSettingPage.allowRecursiveJobs=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3092\u8A31\u53EF(\u975E\u63A8\u5968)
TalendMavenPreferencePage.maven.offline=\u30AA\u30D5\u30E9\u30A4\u30F3
TalendMavenPreferencePage.maven.warn=Studio\u5185\u90E8\u3067\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30E2\u30FC\u30C9\u306F\u304A\u52E7\u3081\u3067\u304D\u307E\u305B\u3093\u3002

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=\u5355\u51FB \u201C\u5F3A\u5236\u5B8C
MavenProjectSettingPage.skipFolders=\u8DF3\u8FC7\u6587\u4EF6\u5939
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A\u548C\u5C0F\u4F5C\u4E1A (\u4E0D\u652F\u6301 - \u4EC5\u7528\u4E8E\u517C\u5BB9\u6027)
BuildProjectSettingPage.allowRecursiveJobs=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A (\u4E0D\u63A8\u8350)
TalendMavenPreferencePage.maven.offline=\u79BB\u7EBF
TalendMavenPreferencePage.maven.warn=Studio \u5185\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u5728\u7EBF\u6A21\u5F0F\u3002

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour le d\u00E9bogage\u00A0:
ExecutePomAction_dialog_run_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour l'ex\u00E9cution\u00A0:
ExecutePomAction_dialog_title=S\u00E9lectionner une configuration
ExecutePomAction_executing=Ex\u00E9cution de {0} dans {1}
MavenLaunchDelegate_error_cannot_create_conf=Impossible de cr\u00E9er m2.conf
MavenLaunchDelegate_job_name=Actualisation des ressources...
MavenLaunchDelegate_error_cannot_read_jvmConfig=Impossible de lire la configuration de la JVM depuis {0}
MavenLaunchExtensionsTab_lblExtensions=D\u00E9marrer les extensions Maven
MavenLaunchExtensionsTab_name=D\u00E9marrer les extensions
MavenLaunchMainTab_btnAfterClean=S\u00E9lec&tionner...
MavenLaunchMainTab_btnAutoBuild=&S\u00E9lectionner...
MavenLaunchMainTab_btnCleanBuild=S\u00E9&lectionner...
MavenLaunchMainTab_btnConfigure=Configurer...
MavenLaunchMainTab_btnDebugOutput=D\u00E9bo&guer la sortie
MavenLaunchMainTab_btnManualBuild=S&\u00E9lectionner...
MavenLaunchMainTab_btnNotRecursive=Non r\u00E9cursif
MavenLaunchMainTab_btnOffline=Hors ligne (&O)
MavenLaunchMainTab_btnResolveWorkspace=R\u00E9soudre les artefacts de l'espace de travail
MavenLaunchMainTab_btnSkipTests=Ignorer les tests (&k)
MavenLaunchMainTab_btnUpdateSnapshots=Mettre \u00E0 jour les Snapshots (&U)
MavenLaunchMainTab_lblAfterClean=Goals apr\u00E8s Clean (&f)\u00A0:
MavenLaunchMainTab_lblAutoBuildGoals=Goals &Build Auto\u00A0:
MavenLaunchMainTab_lblCleanBuild=Goals au cours d'un Clean (&D)\u00A0:
MavenLaunchMainTab_lblManualGoals=Goals du Build ma&nuel\u00A0:
MavenLaunchMainTab_lblRuntime=Runt&ime Maven\u00A0:
MavenLaunchMainTab_lblThreads=&Threads\u00A0:
MavenLaunchMainTab_lblEnableColorOutput=&Colorer la sortie\u00A0:
MavenLaunchMainTab_lblEnableColorOutput_Auto=Auto
MavenLaunchMainTab_lblEnableColorOutput_Always=Toujours
MavenLaunchMainTab_lblEnableColorOutput_Never=Jamais
MavenLaunchMainTab_lblUserSettings_text=Param\u00E8tres utilisateur\u00A0:
MavenLaunchMainTab_property_dialog_edit_title=Modifier le param\u00E8tre
MavenLaunchMainTab_property_dialog_title=Ajouter un param\u00E8tre
MavenJRETab_lblDefault=JRE d'ex\u00E9cution Maven par d\u00E9faut\u00A0: {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (s\u00E9lection auto dans l'intervalle de versions Java requis {1})
MavenLaunchUtils_error_no_maven_install=L'installation de Maven est introuvable {0}
MavenLaynchDelegate_unsupported_source_locator=Locator de source inconnu on non support\u00E9 {0}
launchBrowseFs=Syst\u00E8&me de fichiers...
launchBrowseVariables=&Variables...
launchBrowseWorkspace=Espace de travail... (&W)
launchChoosePomDir=S\u00E9lectionner le r\u00E9pertoire de &Base
launchChooseSettingsFile=S\u00E9lectionner le fichier des param\u00E8tre&S
launchGoals=&S\u00E9lectionner...
launchGoalsLabel=&Goals\u00A0:
launchMainTabName=Main
launchPomDirectoryDoesntExist=Le r\u00E9pertoire de base n'existe pas ou ne peut \u00EAtre lu
launchErrorEvaluatingBaseDirectory=Le nom du r\u00E9pertoire de base ne peut \u00EAtre \u00E9valu\u00E9
launchPomDirectoryEmpty=Le r\u00E9pertoire de base doit \u00EAtre sp\u00E9cifi\u00E9
launchPomGroup=R\u00E9pertoire de base\u00A0:
launchProfilesLabel=&Profils\u00A0:
launchPropAddButton=&Ajouter...
launchPropEditButton=Mo&difier...
launchPropName=Nom du param\u00E8tre
launchPropRemoveButton=Supp&rimer
launchPropValue=Valeur
launchPropertyDialogBrowseVariables=Varia&bles...

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
ExecutePomAction_dialog_run_message=\u5B9F\u884C\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
ExecutePomAction_dialog_title=\u8A2D\u5B9A\u3092\u9078\u629E
ExecutePomAction_executing={1}\u3067{0}\u3092\u5B9F\u884C
MavenLaunchDelegate_error_cannot_create_conf=m2.conf\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
MavenLaunchDelegate_job_name=\u30EA\u30BD\u30FC\u30B9\u3092\u66F4\u65B0...
MavenLaunchDelegate_error_cannot_read_jvmConfig={0}\u304B\u3089JVM\u8A2D\u5B9A\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
MavenLaunchExtensionsTab_lblExtensions=Maven\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
MavenLaunchExtensionsTab_name=\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
MavenLaunchMainTab_btnAfterClean=\u9078\u629E(&T)...
MavenLaunchMainTab_btnAutoBuild=\u9078\u629E(&S)...
MavenLaunchMainTab_btnCleanBuild=\u9078\u629E(&L)...
MavenLaunchMainTab_btnConfigure=\u8A2D\u5B9A...
MavenLaunchMainTab_btnDebugOutput=\u51FA\u529B\u3092\u30C7\u30D0\u30C3\u30B0(&G)
MavenLaunchMainTab_btnManualBuild=\u9078\u629E(&E)...
MavenLaunchMainTab_btnNotRecursive=\u975E\u518D\u5E30\u7684
MavenLaunchMainTab_btnOffline=\u30AA\u30D5\u30E9\u30A4\u30F3(&O)
MavenLaunchMainTab_btnResolveWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u89E3\u6C7A
MavenLaunchMainTab_btnSkipTests=\u30C6\u30B9\u30C8\u3092\u30B9\u30AD\u30C3\u30D7(&K)
MavenLaunchMainTab_btnUpdateSnapshots=\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8(&U)
MavenLaunchMainTab_lblAfterClean=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u5F8C(&F):
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&B):
MavenLaunchMainTab_lblCleanBuild=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u4E2D(&D):
MavenLaunchMainTab_lblManualGoals=\u624B\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&N):
MavenLaunchMainTab_lblRuntime=Maven\u30E9\u30F3\u30BF\u30A4\u30E0(&I):
MavenLaunchMainTab_lblThreads=\u30B9\u30EC\u30C3\u30C9(&T):
MavenLaunchMainTab_lblEnableColorOutput=\u8272\u306E\u51FA\u529B(&C):
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52D5
MavenLaunchMainTab_lblEnableColorOutput_Always=\u5E38\u6642
MavenLaunchMainTab_lblEnableColorOutput_Never=\u3057\u306A\u3044
MavenLaunchMainTab_lblUserSettings_text=\u30E6\u30FC\u30B6\u30FC\u8A2D\u5B9A:
MavenLaunchMainTab_property_dialog_edit_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u7DE8\u96C6
MavenLaunchMainTab_property_dialog_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0
MavenJRETab_lblDefault=\u30C7\u30D5\u30A9\u30EB\u30C8\u306EMaven\u5B9F\u884CJRE: {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (\u5FC5\u8981\u306AJava\u30D0\u30FC\u30B8\u30E7\u30F3\u7BC4\u56F2{1}\u304B\u3089\u81EA\u52D5\u9078\u629E)
MavenLaunchUtils_error_no_maven_install=Maven\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
MavenLaynchDelegate_unsupported_source_locator=\u4E0D\u660E\u307E\u305F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30BD\u30FC\u30B9\u30ED\u30B1\u30FC\u30BF\u30FC{0}
launchBrowseFs=\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0(&M)...
launchBrowseVariables=\u5909\u6570(&V)...
launchBrowseWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9(&W)...
launchChoosePomDir=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u9078\u629E(&B)
launchChooseSettingsFile=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E(&S)
launchGoals=\u9078\u629E(&S)...
launchGoalsLabel=\u76EE\u6A19(&G):
launchMainTabName=\u30E1\u30A4\u30F3
launchPomDirectoryDoesntExist=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
launchErrorEvaluatingBaseDirectory=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u540D\u3092\u8A55\u4FA1\u3067\u304D\u307E\u305B\u3093
launchPomDirectoryEmpty=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
launchPomGroup=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC
launchProfilesLabel=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB(&P):
launchPropAddButton=\u8FFD\u52A0(&A)...
launchPropEditButton=\u7DE8\u96C6(&D)...
launchPropName=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u540D
launchPropRemoveButton=\u524A\u9664(&R)
launchPropValue=\u5024
launchPropertyDialogBrowseVariables=\u5909\u6570(&B)...

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=\u9009\u62E9\u8981\u8C03\u8BD5\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
ExecutePomAction_dialog_run_message=\u9009\u62E9\u8981\u8FD0\u884C\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
ExecutePomAction_dialog_title=\u9009\u62E9\u914D\u7F6E
ExecutePomAction_executing=\u5728 {1} \u4E2D\u6267\u884C {0}
MavenLaunchDelegate_error_cannot_create_conf=\u65E0\u6CD5\u521B\u5EFA m2.conf
MavenLaunchDelegate_job_name=\u6B63\u5728\u5237\u65B0\u8D44\u6E90...
MavenLaunchDelegate_error_cannot_read_jvmConfig=\u65E0\u6CD5\u4ECE {0} \u8BFB\u53D6 JVM \u914D\u7F6E
MavenLaunchExtensionsTab_lblExtensions=Maven \u542F\u52A8\u6269\u5C55
MavenLaunchExtensionsTab_name=\u542F\u52A8\u6269\u5C55
MavenLaunchMainTab_btnAfterClean=\u9009\u62E9(&T)...
MavenLaunchMainTab_btnAutoBuild=\u9009\u62E9(&S)...
MavenLaunchMainTab_btnCleanBuild=\u9009\u62E9(&L)...
MavenLaunchMainTab_btnConfigure=\u914D\u7F6E...
MavenLaunchMainTab_btnDebugOutput=\u8C03\u8BD5\u8F93\u51FA(&G)
MavenLaunchMainTab_btnManualBuild=\u9009\u62E9(&E)...
MavenLaunchMainTab_btnNotRecursive=\u975E\u9012\u5F52
MavenLaunchMainTab_btnOffline=\u79BB\u7EBF(&O)
MavenLaunchMainTab_btnResolveWorkspace=\u89E3\u51B3\u5DE5\u4F5C\u533A\u4F5C\u54C1
MavenLaunchMainTab_btnSkipTests=\u8DF3\u8FC7\u6D4B\u8BD5(&K)
MavenLaunchMainTab_btnUpdateSnapshots=\u66F4\u65B0\u5FEB\u7167(&U)
MavenLaunchMainTab_lblAfterClean=\u5728\u6E05\u7406\u76EE\u6807\u4E4B\u540E(&F)\uFF1A
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52A8\u6784\u5EFA\u76EE\u6807(&B)\uFF1A
MavenLaunchMainTab_lblCleanBuild=\u5728\u6E05\u7406\u76EE\u6807\u671F\u95F4(&D)\uFF1A
MavenLaunchMainTab_lblManualGoals=\u624B\u52A8\u6784\u5EFA\u76EE\u6807(&N)\uFF1A
MavenLaunchMainTab_lblRuntime=Maven \u8FD0\u884C\u65F6(&I)\uFF1A
MavenLaunchMainTab_lblThreads=\u7EBF\u7A0B(&T)\uFF1A
MavenLaunchMainTab_lblEnableColorOutput=\u989C\u8272\u8F93\u51FA(&C)\uFF1A
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52A8
MavenLaunchMainTab_lblEnableColorOutput_Always=\u603B\u662F
MavenLaunchMainTab_lblEnableColorOutput_Never=\u4ECE\u4E0D
MavenLaunchMainTab_lblUserSettings_text=\u7528\u6237\u8BBE\u7F6E\uFF1A
MavenLaunchMainTab_property_dialog_edit_title=\u7F16\u8F91\u53C2\u6570
MavenLaunchMainTab_property_dialog_title=\u6DFB\u52A0\u53C2\u6570
MavenJRETab_lblDefault=\u9ED8\u8BA4 Maven Execution JRE\uFF1A {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} \uFF08\u4ECE\u6240\u9700\u7684 Java \u7248\u672C\u8303\u56F4 {1} \u4E2D\u81EA\u52A8\u9009\u62E9\uFF09
MavenLaunchUtils_error_no_maven_install=\u65E0\u6CD5\u627E\u5230 Maven \u5B89\u88C5 {0}
MavenLaynchDelegate_unsupported_source_locator=\u672A\u77E5\u6216\u4E0D\u652F\u6301\u7684\u6E90\u5B9A\u4F4D\u5668 {0}
launchBrowseFs=\u6587\u4EF6\u7CFB\u7EDF(&M)...
launchBrowseVariables=\u53D8\u91CF(&V)...
launchBrowseWorkspace=\u5DE5\u4F5C\u533A(&W)...
launchChoosePomDir=\u9009\u62E9\u57FA\u672C\u76EE\u5F55(&B)
launchChooseSettingsFile=\u9009\u62E9\u8BBE\u7F6E\u6587\u4EF6(&S)
launchGoals=\u9009\u62E9(&S)...
launchGoalsLabel=\u76EE\u6807(&G)\uFF1A
launchMainTabName=\u4E3B
launchPomDirectoryDoesntExist=\u57FA\u672C\u76EE\u5F55\u4E0D\u5B58\u5728\u6216\u65E0\u6CD5\u8BFB\u53D6
launchErrorEvaluatingBaseDirectory=\u65E0\u6CD5\u8BA1\u7B97\u57FA\u672C\u76EE\u5F55\u540D
launchPomDirectoryEmpty=\u5E94\u6307\u5B9A\u57FA\u672C\u76EE\u5F55
launchPomGroup=\u57FA\u672C\u76EE\u5F55\uFF1A
launchProfilesLabel=\u914D\u7F6E\u6587\u4EF6(&P)\uFF1A
launchPropAddButton=\u6DFB\u52A0(&A)...
launchPropEditButton=\u7F16\u8F91(&D)...
launchPropName=\u53C2\u6570\u540D\u79F0
launchPropRemoveButton=\u79FB\u9664(&R)
launchPropValue=\u503C
launchPropertyDialogBrowseVariables=\u53D8\u91CF(&B)...

View File

@@ -243,12 +243,7 @@ public class LibraryDataService {
}
Map<String, Object> properties = resolveDescProperties(artifact, false);
if (properties != null && properties.size() > 0) {
//if the type is provided in mvnUrl, will not be replaced with the descriptor one.
boolean usePomPackingType = true;
if (!StringUtils.isBlank(MavenUrlHelper.parseMvnUrl(mvnUrl, false).getType())) {
usePomPackingType = false;
}
parseDescriptorResult(libraryObj, properties, false, usePomPackingType);
parseDescriptorResult(libraryObj, properties, false);
if (libraryObj.getLicenses().size() == 0) {
libraryObj.setLicenseMissing(true);
libraryObj.getLicenses().add(unknownLicense);
@@ -358,15 +353,10 @@ public class LibraryDataService {
}
private void parseDescriptorResult(Library libraryObj, Map<String, Object> properties, boolean is4Parent) throws Exception {
parseDescriptorResult(libraryObj, properties, is4Parent, true);
}
private void parseDescriptorResult(Library libraryObj, Map<String, Object> properties, boolean is4Parent, boolean usePomPackagingType) throws Exception {
if (properties.size() == 0) {
libraryObj.setPomMissing(true);
}
//If packaging type is provided in mvnUrl, not use the <packaging> setting in pom.xml.
if (!is4Parent && usePomPackagingType) {
if (!is4Parent) {
String type = String.valueOf(properties.get("type"));
libraryObj.setType(MavenConstants.PACKAGING_BUNDLE.equalsIgnoreCase(type) ? MavenConstants.PACKAGING_JAR : type); //$NON-NLS-1$
}

View File

@@ -92,8 +92,14 @@ public class ExtendedNodeConnectionContextUtils {
HDIPassword,
KeyAzureHost,
KeyAzureContainer,
HDIAuthType,
KeyAzuresUser,
KeyAzurePassword,
HDIClientId,
HDIDirectoryId,
HDISecretKey,
UseHDICertificate,
HDIClientCertificate,
KeyAzureDeployBlob,
// Azure Synapse param

View File

@@ -190,8 +190,16 @@
context="plugin:org.talend.metadata.managment"
language="java"
message="Needed for create sqlite connection"
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.40.0.0"
name="sqlite-jdbc-3.40.0.0.jar"
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.44.1.0"
name="sqlite-jdbc-3.44.1.0.jar"
required="true">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.metadata.managment"
language="java"
message="Needed for create sqlite connection"
mvn_uri="mvn:org.slf4j/slf4j-api/1.7.34"
name="slf4j-api-1.7.34.jar"
required="true">
</libraryNeeded>
<libraryNeeded

View File

@@ -1085,8 +1085,8 @@ public class ExtractMetaDataUtils {
} else if (driverJarPathArg.contains("/")) {
if (driverJarPathArg.contains(";")) {
String jars[] = driverJarPathArg.split(";");
List<String> jarNames = new ArrayList<>();
for (String jar : jars) {
jar = TalendQuoteUtils.removeQuotesIfExist(jar);
if (jar.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
setDriverPath(librairesManagerService, jarPathList, jar);
} else {

View File

@@ -1,111 +1,111 @@
// ============================================================================
//
// Copyright (C) 2006-2021 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.metadata.builder.database;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import org.talend.commons.exception.ExceptionHandler;
/**
*
* DOC YeXiaowei class global comment. Detailled comment <br/>
*
*/
public class HotClassLoader extends URLClassLoader {
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
// // qli modified to fix the bug 6281.
// private static HotClassLoader instance;
//
// public static HotClassLoader getInstance() {
// // bug 17800 fixed
// // if (instance == null) {
// instance = new HotClassLoader();
// // }
// return instance;
// }
public HotClassLoader() {
super(new URL[0], ClassLoader.getSystemClassLoader());
}
public void addPath(String paths) {
if (paths == null || paths.length() <= 0) {
return;
}
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
String[] pathToAdds = paths.split(separator);
for (String pathToAdd2 : pathToAdds) {
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
try {
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
addURL(pathToAdd.toURL());
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
}
// public static String getClassFile(String name){
// if(name != null && !"".equals(name))
// return name.replace(".", "/").concat(".class");
// return null;
// }
//
// /**
// * "hive driver"
// */
// public Class findClass(String name) throws ClassNotFoundException{
// Class clazz = null;
// byte[] data = loadClassData(name);
//
// clazz = defineClass(name, data, 0, data.length);
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
// return clazz;
// }
//
//
// public byte[] loadClassData(String name) throws ClassNotFoundException{
// InputStream input = null;
// ByteArrayOutputStream output = null;
// byte[] data = null;
// URL[] urls = this.getURLs();
// if(urls != null){
// boolean isFind = false;
// for(URL url : urls){
// try {
// String newDriverName = HotClassLoader.getClassFile(name);
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
// input = newURL.openStream();
// output = new ByteArrayOutputStream();
// int ch = 0;
// while((ch = input.read()) != -1){
// output.write(ch);
// }
// data = output.toByteArray();
// isFind = true;
// break;
// } catch (IOException e) {
// }
// }
// if(!isFind)
// throw new ClassNotFoundException("Can not find " + name + "!");
// }
// return data;
// }
}
// ============================================================================
//
// Copyright (C) 2006-2021 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.metadata.builder.database;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import org.talend.commons.exception.ExceptionHandler;
/**
*
* DOC YeXiaowei class global comment. Detailled comment <br/>
*
*/
public class HotClassLoader extends URLClassLoader {
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
// // qli modified to fix the bug 6281.
// private static HotClassLoader instance;
//
// public static HotClassLoader getInstance() {
// // bug 17800 fixed
// // if (instance == null) {
// instance = new HotClassLoader();
// // }
// return instance;
// }
public HotClassLoader() {
super(new URL[0], ClassLoader.getSystemClassLoader());
}
public void addPath(String paths) {
if (paths == null || paths.length() <= 0) {
return;
}
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
String[] pathToAdds = paths.split(separator);
for (String pathToAdd2 : pathToAdds) {
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
try {
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
addURL(pathToAdd.toURI().toURL());
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
}
// public static String getClassFile(String name){
// if(name != null && !"".equals(name))
// return name.replace(".", "/").concat(".class");
// return null;
// }
//
// /**
// * "hive driver"
// */
// public Class findClass(String name) throws ClassNotFoundException{
// Class clazz = null;
// byte[] data = loadClassData(name);
//
// clazz = defineClass(name, data, 0, data.length);
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
// return clazz;
// }
//
//
// public byte[] loadClassData(String name) throws ClassNotFoundException{
// InputStream input = null;
// ByteArrayOutputStream output = null;
// byte[] data = null;
// URL[] urls = this.getURLs();
// if(urls != null){
// boolean isFind = false;
// for(URL url : urls){
// try {
// String newDriverName = HotClassLoader.getClassFile(name);
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
// input = newURL.openStream();
// output = new ByteArrayOutputStream();
// int ch = 0;
// while((ch = input.read()) != -1){
// output.write(ch);
// }
// data = output.toByteArray();
// isFind = true;
// break;
// } catch (IOException e) {
// }
// }
// if(!isFind)
// throw new ClassNotFoundException("Can not find " + name + "!");
// }
// return data;
// }
}

View File

@@ -114,4 +114,5 @@ DataTransferMessages.ArchiveExport_selectDestinationTitle=Export to Archive File
WorkbenchMessages.ShowView_errorTitle=Problems Showing View
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}.
JavaVersion.CheckError=Java upgrade required, minimal required java version is {0}, current version is {1}.
JavaVersion.CheckError.notSupported=The maximum Java version supported by Studio is {0}. Your current version is {1}.

View File

@@ -115,3 +115,4 @@ WorkbenchMessages.ShowView_errorTitle=Probl\u00E8me lors de l'affichage de la vu
ComponentsManager.form.install.dialog.restart.title=Red\u00E9marrer le Studio
ComponentsManager.form.install.dialog.restart.message=Vous devez red\u00E9marrer le Studio pour terminer l'installation.\n\nSouhaitez-vous le red\u00E9marrer maintenant ?
JavaVersion.CheckError=Une mise \u00E0 niveau de Java est requise. La version minimale de Java est {0}, la version actuelle est {1}.
JavaVersion.CheckError.notSupported=La version Java maximale support\u00E9e par le Studio est {0}. Votre version actuelle est {1}.

View File

@@ -115,3 +115,4 @@ WorkbenchMessages.ShowView_errorTitle=\u30D3\u30E5\u30FC\u8868\u793A\u306E\u554F
ComponentsManager.form.install.dialog.restart.title=Studio\u3092\u518D\u8D77\u52D5\u4E2D
ComponentsManager.form.install.dialog.restart.message=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3092\u5B8C\u4E86\u3059\u308B\u306B\u306FStudio\u306E\u518D\u8D77\u52D5\u304C\u5FC5\u8981\u3067\u3059\u3002\n\n\u4ECA\u3059\u3050Studio\u3092\u518D\u8D77\u52D5\u3057\u307E\u3059\u304B?
JavaVersion.CheckError=Java\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059\u3002\u5FC5\u8981\u6700\u5C0F\u9650\u306Ejava\u30D0\u30FC\u30B8\u30E7\u30F3\u306F{0}\u3067\u3001\u73FE\u5728\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F{1}\u3067\u3059\u3002
JavaVersion.CheckError.notSupported=Studio\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308BJava\u306E\u6700\u5927\u30D0\u30FC\u30B8\u30E7\u30F3\u306F{0}\u3067\u3059\u3002\u73FE\u5728\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F{1}\u3067\u3059\u3002

View File

@@ -115,3 +115,4 @@ WorkbenchMessages.ShowView_errorTitle=\u95EE\u9898\u5217\u8868\u89C6\u56FE
ComponentsManager.form.install.dialog.restart.title=\u91CD\u65B0\u542F\u52A8 Studio
ComponentsManager.form.install.dialog.restart.message=\u6211\u4EEC\u9700\u8981\u91CD\u65B0\u542F\u52A8 Studio \u4EE5\u5B8C\u6210\u5B89\u88C5\u3002\n\n\u662F\u5426\u8981\u7ACB\u5373\u91CD\u65B0\u542F\u52A8 Studio\uFF1F
JavaVersion.CheckError=\u9700\u8981\u5347\u7EA7 Java\uFF0C\u8981\u6C42\u7684\u6700\u4F4E Java \u7248\u672C\u4E3A {0}\uFF0C\u5F53\u524D\u7248\u672C\u4E3A {1}\u3002
JavaVersion.CheckError.notSupported=Studio\u652F\u6301\u7684\u6700\u9AD8Java\u7248\u672C\u4E3A{0}\u3002\u60A8\u5F53\u4E0B\u7684\u7248\u672C\u662F{1}\u3002

View File

@@ -12,7 +12,12 @@
// ============================================================================
package org.talend.rcp;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.wizard.ProgressMonitorPart;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.internal.splash.EclipseSplashHandler;
import org.talend.repository.ui.image.ImageUtils;
/**
* this class is justmade so that we can get the handler instance (no other way to get the instance). this instance is
@@ -30,4 +35,30 @@ public class TalendSplashHandler extends EclipseSplashHandler {
instance = this;
}
}
@Override
public IProgressMonitor getBundleProgressMonitor() {
IProgressMonitor bundleProgressMonitor = super.getBundleProgressMonitor();
if (!ImageUtils.isSonoma()) {
return bundleProgressMonitor;
}
if (bundleProgressMonitor != null && bundleProgressMonitor instanceof ProgressMonitorPart) {
ProgressMonitorPart pmp = (ProgressMonitorPart) bundleProgressMonitor;
Shell splash = getSplash();
if (splash != null) {
Shell shell = splash.getShell();
if (shell != null) {
Image backgroundImage = shell.getBackgroundImage();
if (backgroundImage != null) {
backgroundImage = ImageUtils.flipImage(shell.getDisplay(), backgroundImage);
pmp.setBackgroundImage(backgroundImage);
ImageUtils.addResourceDisposeListener(pmp, backgroundImage);
return pmp;
}
}
}
}
return bundleProgressMonitor;
}
}

View File

@@ -83,6 +83,7 @@ import org.talend.repository.ProjectManager;
import org.talend.repository.model.IRepositoryService;
import org.talend.repository.ui.login.LoginHelper;
import org.talend.utils.StudioKeysFileCheck;
import org.talend.utils.VersionException;
/**
* This class controls all aspects of the application's execution.
@@ -146,10 +147,14 @@ public class Application implements IApplication {
StudioKeysFileCheck.validateJavaVersion();
} catch (Exception e) {
Shell shell = new Shell(display, SWT.NONE);
MessageDialog.openError(shell, null, // $NON-NLS-1$
Messages.getString("JavaVersion.CheckError", StudioKeysFileCheck.JAVA_VERSION_MINIMAL_STRING,
StudioKeysFileCheck.getJavaVersion()));
return IApplication.EXIT_RELAUNCH;
if (e instanceof VersionException) {
String msg = Messages.getString("JavaVersion.CheckError", StudioKeysFileCheck.JAVA_VERSION_MINIMAL_STRING, StudioKeysFileCheck.getJavaVersion());
if (!((VersionException) e).requireUpgrade()) {
msg = Messages.getString("JavaVersion.CheckError.notSupported", StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING, StudioKeysFileCheck.getJavaVersion());
}
MessageDialog.openError(shell, null, msg);
}
return IApplication.EXIT_OK;
}
try {

View File

@@ -25,7 +25,8 @@ addJvmArgs(jvmArgs:\
--add-opens=java.base/sun.security.pkcs=ALL-UNNAMED|\
--add-opens=java.base/sun.security.x509=ALL-UNNAMED|\
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED|\
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED);
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED|\
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED);
instructions.configure.import=\
org.talend.studiolite.p2.touchpoint.removeJvmArgs,\
org.talend.studiolite.p2.touchpoint.addJvmArgs

View File

@@ -14,13 +14,9 @@ package org.talend.registration.register;
import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
@@ -31,20 +27,14 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
import org.talend.commons.exception.BusinessException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.commons.utils.network.NetworkUtil;
import org.talend.commons.utils.platform.PluginChecker;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.general.ConnectionBean;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.prefs.PreferenceManipulator;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.core.ui.token.DefaultTokenCollector;
import org.talend.registration.i18n.Messages;
import org.talend.registration.register.proxy.HttpProxyUtil;
import org.talend.registration.register.proxy.RegisterUserPortTypeProxy;
import org.talend.repository.ui.login.connections.ConnectionUserPerReader;
/**
@@ -83,284 +73,6 @@ public class RegisterManagement {
return instance;
}
@Deprecated
public boolean register(String email, String country, boolean isProxyEnabled, String proxyHost, String proxyPort,
String designerVersion, String projectLanguage, String osName, String osVersion, String javaVersion,
long totalMemory, Long memRAM, int nbProc) throws BusinessException {
registNumber = null;
BigInteger result = BigInteger.valueOf(-1);
// if proxy is enabled
if (isProxyEnabled) {
// get parameter and put them in System.properties.
System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
System.setProperty("http.proxyPort", proxyPort); //$NON-NLS-1$
// override automatic update parameters
if (proxyPort != null && proxyPort.trim().equals("")) { //$NON-NLS-1$
proxyPort = null;
}
HttpProxyUtil.setHttpProxyInfo(true, proxyHost, proxyPort);
}
RegisterUserPortTypeProxy proxy = new RegisterUserPortTypeProxy();
proxy.setEndpoint("https://www.talend.com/TalendRegisterWS/registerws.php"); //$NON-NLS-1$
try {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
result = proxy.registerUserWithAllUserInformationsAndReturnId(email, country, designerVersion,
brandingService.getShortProductName(), projectLanguage, osName, osVersion, javaVersion,
totalMemory + "", memRAM //$NON-NLS-1$
+ "", nbProc + ""); //$NON-NLS-1$ //$NON-NLS-2$
if (result.signum() > 0) {
PlatformUI.getPreferenceStore().setValue("REGISTRATION_DONE", 1); //$NON-NLS-1$
registNumber = result.longValue();
// validateRegistration(brandingService.getAcronym(), result.longValue());
PreferenceManipulator prefManipulator = new PreferenceManipulator();
// prefManipulator.addUser(email);
// prefManipulator.setLastUser(email);
// Create a default connection:
if (prefManipulator.readConnections().isEmpty()) {
ConnectionBean recup = ConnectionBean.getDefaultConnectionBean();
recup.setUser(email);
recup.setComplete(true);
prefManipulator.addConnection(recup);
}
}
} catch (RemoteException e) {
decrementTry();
throw new BusinessException(e);
}
return result.signum() > 0;
}
public boolean updateUser(String email, String pseudo, String oldPassword, String password, String firstname,
String lastname, String country, boolean isProxyEnabled, String proxyHost, String proxyPort) throws BusinessException {
BigInteger result = BigInteger.valueOf(-1);
registNumber = null;
// if proxy is enabled
if (isProxyEnabled) {
// get parameter and put them in System.properties.
System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
System.setProperty("http.proxyPort", proxyPort); //$NON-NLS-1$
// override automatic update parameters
if (proxyPort != null && proxyPort.trim().equals("")) { //$NON-NLS-1$
proxyPort = null;
}
HttpProxyUtil.setHttpProxyInfo(true, proxyHost, proxyPort);
}
// OS
String osName = System.getProperty("os.name"); //$NON-NLS-1$
String osVersion = System.getProperty("os.version"); //$NON-NLS-1$
// Java version
String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$
// Java Memory
long totalMemory = Runtime.getRuntime().totalMemory();
// RAM
com.sun.management.OperatingSystemMXBean composantSystem = (com.sun.management.OperatingSystemMXBean) ManagementFactory
.getOperatingSystemMXBean();
Long memRAM = new Long(composantSystem.getTotalPhysicalMemorySize() / 1024);
// CPU
int nbProc = Runtime.getRuntime().availableProcessors();
// VERSION
String version = VersionUtils.getVersion();
RegisterUserPortTypeProxy proxy = new RegisterUserPortTypeProxy();
proxy.setEndpoint("https://www.talend.com/TalendRegisterWS/registerws.php"); //$NON-NLS-1$
try {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
result = proxy.updateUser(email, pseudo, oldPassword, password, firstname, lastname, country, version,
brandingService.getAcronym(), osName, osVersion, javaVersion, totalMemory + "", memRAM //$NON-NLS-1$
+ "", nbProc + ""); //$NON-NLS-1$ //$NON-NLS-2$
if (result != null && result.signum() > 0) {
PlatformUI.getPreferenceStore().setValue("REGISTRATION_DONE", 1); //$NON-NLS-1$
saveRegistoryBean();
registNumber = result.longValue();
// validateRegistration(brandingService.getAcronym(), result.longValue());
PreferenceManipulator prefManipulator = new PreferenceManipulator();
// prefManipulator.addUser(email);
// prefManipulator.setLastUser(email);
// Create a default connection:
if (prefManipulator.readConnections().isEmpty()) {
ConnectionBean recup = ConnectionBean.getDefaultConnectionBean();
recup.setUser(email);
recup.setComplete(true);
prefManipulator.addConnection(recup);
}
} else {
checkErrors(result.intValue());
}
} catch (RemoteException e) {
decrementTry();
increaseFailRegisterTimes();
MessageDialog.openError(null, Messages.getString("RegisterManagement.errors"), e.getMessage()); //$NON-NLS-1$
throw new BusinessException(e);
}
if (result != null) {
return result.signum() > 0;
} else {
return false;
}
}
public boolean createUser(String email, String pseudo, String password, String firstname, String lastname, String country,
boolean isProxyEnabled, String proxyHost, String proxyPort, String proxyUser, String proxyPassword)
throws BusinessException {
BigInteger result = BigInteger.valueOf(-1);
registNumber = null;
// if proxy is enabled
if (isProxyEnabled) {
Properties properties = System.getProperties();
properties.put("http.proxySet", "true"); //$NON-NLS-1$
properties.put("http.proxyHost", proxyHost);
properties.put("http.proxyPort", proxyPort);
properties.put("http.proxyUser", proxyUser); //$NON-NLS-1$
properties.put("http.proxyPassword", proxyPassword); //$NON-NLS-1$
}
// OS
String osName = System.getProperty("os.name"); //$NON-NLS-1$
String osVersion = System.getProperty("os.version"); //$NON-NLS-1$
// Java version
String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$
// Java Memory
long totalMemory = Runtime.getRuntime().totalMemory();
// RAM
com.sun.management.OperatingSystemMXBean composantSystem = (com.sun.management.OperatingSystemMXBean) ManagementFactory
.getOperatingSystemMXBean();
Long memRAM = new Long(composantSystem.getTotalPhysicalMemorySize() / 1024);
// CPU
int nbProc = Runtime.getRuntime().availableProcessors();
// VERSION
String version = VersionUtils.getVersion();
// UNIQUE_ID
String uniqueId = DefaultTokenCollector.hashUniqueId();
RegisterUserPortTypeProxy proxy = new RegisterUserPortTypeProxy();
proxy.setEndpoint("https://www.talend.com/TalendRegisterWS/registerws.php"); //$NON-NLS-1$
try {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
if (country == null) {
country = Locale.getDefault().getCountry();
if (country == null) {
country = "unknown";
}
}
result = proxy.createUser53(email, pseudo, password, firstname, lastname, country, version,
brandingService.getAcronym(), osName, osVersion, javaVersion, totalMemory + "", memRAM //$NON-NLS-1$
+ "", nbProc + "", uniqueId); //$NON-NLS-1$ //$NON-NLS-2$
if (result.signum() > 0) {
PlatformUI.getPreferenceStore().setValue("REGISTRATION_DONE", 1); //$NON-NLS-1$
saveRegistoryBean();
registNumber = result.longValue();
// validateRegistration(brandingService.getAcronym(), result.longValue());
PreferenceManipulator prefManipulator = new PreferenceManipulator();
// prefManipulator.addUser(email);
// prefManipulator.setLastUser(email);
// Create a default connection:
if (prefManipulator.readConnections().isEmpty()) {
ConnectionBean recup = ConnectionBean.getDefaultConnectionBean();
recup.setUser(email);
recup.setComplete(true);
prefManipulator.addConnection(recup);
}
} else {
checkErrors(result.intValue());
}
} catch (RemoteException e) {
decrementTry();
increaseFailRegisterTimes();
MessageDialog.openError(null, Messages.getString("RegisterManagement.errors"), e.getMessage()); //$NON-NLS-1$
throw new BusinessException(e);
}
return result.signum() > 0;
}
public boolean createUser(String pseudo, String password, String firstname, String lastname, String country,
boolean isProxyEnabled, String proxyHost, String proxyPort, String proxyUser, String proxyPassword)
throws BusinessException {
BigInteger result = BigInteger.valueOf(-1);
registNumber = null;
// if proxy is enabled
if (isProxyEnabled) {
Properties properties = System.getProperties();
properties.put("http.proxySet", "true"); //$NON-NLS-1$
properties.put("http.proxyHost", proxyHost);
properties.put("http.proxyPort", proxyPort);
properties.put("http.proxyUser", proxyUser); //$NON-NLS-1$
properties.put("http.proxyPassword", proxyPassword); //$NON-NLS-1$
}
// OS
String osName = System.getProperty("os.name"); //$NON-NLS-1$
String osVersion = System.getProperty("os.version"); //$NON-NLS-1$
// Java version
String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$
// Java Memory
long totalMemory = Runtime.getRuntime().totalMemory();
// RAM
com.sun.management.OperatingSystemMXBean composantSystem = (com.sun.management.OperatingSystemMXBean) ManagementFactory
.getOperatingSystemMXBean();
Long memRAM = new Long(composantSystem.getTotalPhysicalMemorySize() / 1024);
// CPU
int nbProc = Runtime.getRuntime().availableProcessors();
// VERSION
String version = VersionUtils.getVersion();
// UNIQUE_ID
String uniqueId = DefaultTokenCollector.calcUniqueId();
RegisterUserPortTypeProxy proxy = new RegisterUserPortTypeProxy();
proxy.setEndpoint("https://www.talend.com/TalendRegisterWS/registerws.php"); //$NON-NLS-1$
try {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
if (country == null) {
country = Locale.getDefault().getCountry();
if (country == null) {
country = "unknown";
}
}
result = proxy.updateUser53(pseudo, password, firstname, lastname, country, version, brandingService.getAcronym(),
osName, osVersion, javaVersion, totalMemory + "", memRAM //$NON-NLS-1$
+ "", nbProc + "", uniqueId); //$NON-NLS-1$ //$NON-NLS-2$
if (result.intValue() != -110 && result.signum() < 0) {
checkErrors(result.intValue());
}
} catch (RemoteException e) {
MessageDialog.openError(null, Messages.getString("RegisterManagement.errors"), e.getMessage()); //$NON-NLS-1$
throw new BusinessException(e);
}
return result.intValue() == -110;
}
private void checkErrors(int signum) {
String message = ""; //$NON-NLS-1$
switch (signum) {
@@ -421,33 +133,6 @@ public class RegisterManagement {
MessageDialog.openError(null, Messages.getString("RegisterManagement.errors"), message); //$NON-NLS-1$
}
public String checkUser(String email, boolean isProxyEnabled, String proxyHost, String proxyPort, String proxyUser,
String proxyPassword) throws BusinessException {
// if proxy is enabled
if (isProxyEnabled) {
// get parameter and put them in System.properties.
System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
System.setProperty("http.proxyPort", proxyPort); //$NON-NLS-1$
System.setProperty("http.proxyUser", proxyUser); //$NON-NLS-1$
System.setProperty("http.proxyPassword", proxyPassword); //$NON-NLS-1$
// override automatic update parameters
if (proxyPort != null && proxyPort.trim().equals("")) { //$NON-NLS-1$
proxyPort = null;
}
HttpProxyUtil.setHttpProxyInfo(true, proxyHost, proxyPort);
}
RegisterUserPortTypeProxy proxy = new RegisterUserPortTypeProxy();
proxy.setEndpoint("https://www.talend.com/TalendRegisterWS/registerws.php"); //$NON-NLS-1$
try {
return proxy.checkUser(email);
} catch (RemoteException e) {
throw new BusinessException(e);
}
}
public void validateRegistration() {
if (!NetworkUtil.isNetworkValidByStatus()) {
return;

View File

@@ -1,16 +0,0 @@
/**
* RegisterUser.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.talend.registration.register.proxy;
public interface RegisterUser {
public java.lang.String getRegisterUserPortAddress();
public org.talend.registration.register.proxy.RegisterUserPortType getRegisterUserPort() throws javax.xml.rpc.ServiceException;
public org.talend.registration.register.proxy.RegisterUserPortType getRegisterUserPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
}

View File

@@ -1,386 +0,0 @@
/**
* RegisterUserBindingStub.java
*
* This file was auto-generated from WSDL by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.talend.registration.register.proxy;
import java.math.BigInteger;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;
public class RegisterUserBindingStub extends org.apache.axis2.client.Stub implements
org.talend.registration.register.proxy.RegisterUserPortType {
private String cachedEndpoint;
private String cachedUsername;
private String cachedPassword;
private boolean manageSession;
public RegisterUserBindingStub(String endpointURL) throws org.apache.axis2.AxisFault {
cachedEndpoint = endpointURL;
}
protected org.apache.axis2.rpc.client.RPCServiceClient createCall() throws java.rmi.RemoteException {
try {
Options options = new Options();
RPCServiceClient client = new RPCServiceClient();
client.setOptions(options);
if (manageSession) {
options.setManageSession(manageSession);
}
if (cachedUsername != null) {
options.setUserName(cachedUsername);
}
if (cachedPassword != null) {
options.setPassword(cachedPassword);
}
if (cachedEndpoint != null) {
options.setTo(new EndpointReference(cachedEndpoint));
}
return client;
} catch (java.lang.Throwable _t) {
throw new org.apache.axis2.AxisFault("Failure trying to get the client object", _t);
}
}
public boolean registerUser(java.lang.String email, java.lang.String country, java.lang.String designerversion)
throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/RegisterUser");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUser");
Object[] parameters = { email, country, designerversion };
Class[] returnTypes = new Class[] { boolean.class };
// Invoking the method
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return ((Boolean) response[0]).booleanValue();
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return false;
}
public boolean registerUserWithProductName(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/RegisterUserWithProductName");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUserWithProductName");
Object[] parameters = { email, country, designerversion, productname };
Class[] returnTypes = new Class[] { boolean.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return ((Boolean) response[0]).booleanValue();
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return false;
}
public boolean registerUserWithAllUserInformations(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/RegisterUserWithAllUserInformations");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUserWithAllUserInformations");
Object[] parameters = { email, country, designerversion, productname, projectLanguage, osName, osVersion, javaVersion,
totalMemory, memRAM, nbProc };
Class[] returnTypes = new Class[] { boolean.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return ((Boolean) response[0]).booleanValue();
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return false;
}
public java.math.BigInteger registerUserWithAllUserInformationsAndReturnId(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction(
"https://www.talend.com/TalendRegisterWS/registerws.php/RegisterUserWithAllUserInformationsAndReturnId");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUserWithAllUserInformationsAndReturnId");
Object[] parameters = { email, country, designerversion, productname, projectLanguage, osName, osVersion, javaVersion,
totalMemory, memRAM, nbProc };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
/*
* (non-Javadoc)
*
* @see org.talend.repository.registeruser.proxy.RegisterUserPortType#
* registerUserWithAllUserInformationsUniqueIdAndReturnId(java.lang.String, java.lang.String, java.lang.String,
* java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
* java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public BigInteger registerUserWithAllUserInformationsUniqueIdAndReturnId(String email, String country,
String designerversion, String productname, String projectLanguage, String osName, String osVersion,
String javaVersion, String totalMemory, String memRAM, String nbProc, String uniqueId)
throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction(
"https://www.talend.com/TalendRegisterWS/registerws.php/RegisterUserWithAllUserInformationsUniqueIdAndReturnId");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl",
"RegisterUserWithAllUserInformationsUniqueIdAndReturnId");
Object[] parameters = { email, country, designerversion, productname, projectLanguage, osName, osVersion, javaVersion,
totalMemory, memRAM, nbProc, uniqueId };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
public org.talend.registration.register.proxy.UserRegistration[] listUsers() throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/ListUsers");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "ListUsers");
Object[] parameters = {};
Class[] returnTypes = new Class[] { UserRegistration.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (UserRegistration[]) response;
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new UserRegistration[0];
}
public java.lang.String checkUser(java.lang.String email) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction(
"https://www.talend.com/TalendRegisterWS/registerws.php/CheckUser");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "CheckUser");
Object[] parameters = { email };
Class[] returnTypes = new Class[] { String.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (String) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return "";
}
public java.math.BigInteger createUser(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/CreateUser");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "CreateUser");
Object[] parameters = { email, pseudo, password, firstname, lastname, country, designerversion, productname, osName,
osVersion, javaVersion, totalMemory, memRAM, nbProc };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
public java.math.BigInteger updateUser(java.lang.String email, java.lang.String pseudo, java.lang.String passwordOld,
java.lang.String passwordNew, java.lang.String firstname, java.lang.String lastname, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String osName, java.lang.String osVersion,
java.lang.String javaVersion, java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc)
throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/UpdateUser");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "UpdateUser");
Object[] parameters = { email, pseudo, passwordOld, passwordNew, firstname, lastname, country, designerversion,
productname, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
public java.math.BigInteger createUser50(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/CreateUser50");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "CreateUser50");
Object[] parameters = { pseudo, password, firstname, lastname, country, designerversion, productname, osName, osVersion,
javaVersion, totalMemory, memRAM, nbProc };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
public java.math.BigInteger createUser53(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId)
throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/CreateUser53");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "CreateUser53");
Object[] parameters = { email, pseudo, password, firstname, lastname, country, designerversion, productname, osName,
osVersion, javaVersion, totalMemory, memRAM, nbProc, uniqueId };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
public java.math.BigInteger updateUser53(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId) throws java.rmi.RemoteException {
if (cachedEndpoint == null) {
throw new AxisFault("No endpoints found in the WSDL");
}
RPCServiceClient client = createCall();
Options options = client.getOptions();
options.setAction("https://www.talend.com/TalendRegisterWS/registerws.php/UpdateUser53");
QName method = new QName("http://www.talend.com/TalendRegisterWS/wsdl", "UpdateUser53");
Object[] parameters = { pseudo, password, firstname, lastname, country, designerversion, productname, osName, osVersion,
javaVersion, totalMemory, memRAM, nbProc, uniqueId };
Class[] returnTypes = new Class[] { BigInteger.class };
try {
Object[] response = client.invokeBlocking(method, parameters, returnTypes);
if (response.length > 0) {
return (BigInteger) response[0];
}
} catch (org.apache.axis2.AxisFault axisFaultException) {
throw axisFaultException;
}
return new BigInteger("-1");
}
}

View File

@@ -1,129 +0,0 @@
/**
* RegisterUserLocator.java
*
* This file was auto-generated from WSDL by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.talend.registration.register.proxy;
public class RegisterUserLocator implements
org.talend.registration.register.proxy.RegisterUser {
public RegisterUserLocator() {
}
// Use to get a proxy class for RegisterUserPort
private java.lang.String RegisterUserPort_address = "https://www.talend.com/TalendRegisterWS/registerws.php";
public java.lang.String getRegisterUserPortAddress() {
return RegisterUserPort_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String RegisterUserPortWSDDServiceName = "RegisterUserPort";
public java.lang.String getRegisterUserPortWSDDServiceName() {
return RegisterUserPortWSDDServiceName;
}
public void setRegisterUserPortWSDDServiceName(java.lang.String name) {
RegisterUserPortWSDDServiceName = name;
}
public org.talend.registration.register.proxy.RegisterUserPortType getRegisterUserPort()
throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(RegisterUserPort_address);
} catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getRegisterUserPort(endpoint);
}
public org.talend.registration.register.proxy.RegisterUserPortType getRegisterUserPort(java.net.URL portAddress)
throws javax.xml.rpc.ServiceException {
try {
org.talend.registration.register.proxy.RegisterUserBindingStub _stub = new org.talend.registration.register.proxy.RegisterUserBindingStub(
portAddress.toString());
return _stub;
} catch (org.apache.axis2.AxisFault e) {
return null;
}
}
public void setRegisterUserPortEndpointAddress(java.lang.String address) {
RegisterUserPort_address = address;
}
/**
* For the given interface, get the stub implementation. If this service has no port for the given interface, then
* ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (org.talend.registration.register.proxy.RegisterUserPortType.class.isAssignableFrom(serviceEndpointInterface)) {
org.talend.registration.register.proxy.RegisterUserBindingStub _stub = new org.talend.registration.register.proxy.RegisterUserBindingStub(
RegisterUserPort_address);
return _stub;
}
} catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: "
+ (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation. If this service has no port for the given interface, then
* ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface)
throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("RegisterUserPort".equals(inputPortName)) {
return getRegisterUserPort();
} else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUser");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("http://www.talend.com/TalendRegisterWS/wsdl", "RegisterUserPort"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("RegisterUserPort".equals(portName)) {
setRegisterUserPortEndpointAddress(address);
} else { // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address)
throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}

View File

@@ -1,63 +0,0 @@
/**
* RegisterUserPortType.java
*
* This file was auto-generated from WSDL by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.talend.registration.register.proxy;
public interface RegisterUserPortType extends java.rmi.Remote {
public boolean registerUser(java.lang.String email, java.lang.String country, java.lang.String designerversion)
throws java.rmi.RemoteException;
public boolean registerUserWithProductName(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname) throws java.rmi.RemoteException;
public boolean registerUserWithAllUserInformations(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException;
public java.math.BigInteger registerUserWithAllUserInformationsAndReturnId(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException;
public java.math.BigInteger registerUserWithAllUserInformationsUniqueIdAndReturnId(java.lang.String email,
java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String projectLanguage, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId)
throws java.rmi.RemoteException;
public org.talend.registration.register.proxy.UserRegistration[] listUsers() throws java.rmi.RemoteException;
public java.lang.String checkUser(java.lang.String email) throws java.rmi.RemoteException;
public java.math.BigInteger createUser(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException;
public java.math.BigInteger updateUser(java.lang.String email, java.lang.String pseudo, java.lang.String passwordOld,
java.lang.String passwordNew, java.lang.String firstname, java.lang.String lastname, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String osName, java.lang.String osVersion,
java.lang.String javaVersion, java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc)
throws java.rmi.RemoteException;
public java.math.BigInteger createUser50(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException;
public java.math.BigInteger createUser53(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId)
throws java.rmi.RemoteException;
public java.math.BigInteger updateUser53(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId) throws java.rmi.RemoteException;
}

View File

@@ -1,147 +0,0 @@
package org.talend.registration.register.proxy;
public class RegisterUserPortTypeProxy implements org.talend.registration.register.proxy.RegisterUserPortType {
private String _endpoint = null;
private org.talend.registration.register.proxy.RegisterUserPortType registerUserPortType = null;
public RegisterUserPortTypeProxy() {
_initRegisterUserPortTypeProxy();
}
public RegisterUserPortTypeProxy(String endpoint) {
_endpoint = endpoint;
_initRegisterUserPortTypeProxy();
}
private void _initRegisterUserPortTypeProxy() {
try {
registerUserPortType = (new org.talend.registration.register.proxy.RegisterUserLocator()).getRegisterUserPort();
} catch (javax.xml.rpc.ServiceException serviceException) {
}
}
public String getEndpoint() {
return _endpoint;
}
public void setEndpoint(String endpoint) {
_endpoint = endpoint;
}
public org.talend.registration.register.proxy.RegisterUserPortType getRegisterUserPortType() {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType;
}
public boolean registerUser(java.lang.String email, java.lang.String country, java.lang.String designerversion)
throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.registerUser(email, country, designerversion);
}
public boolean registerUserWithProductName(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.registerUserWithProductName(email, country, designerversion, productname);
}
public boolean registerUserWithAllUserInformations(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.registerUserWithAllUserInformations(email, country, designerversion, productname,
projectLanguage, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc);
}
public java.math.BigInteger registerUserWithAllUserInformationsAndReturnId(java.lang.String email, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String projectLanguage,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.registerUserWithAllUserInformationsAndReturnId(email, country, designerversion, productname,
projectLanguage, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc);
}
public java.math.BigInteger registerUserWithAllUserInformationsUniqueIdAndReturnId(java.lang.String email,
java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String projectLanguage, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId)
throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.registerUserWithAllUserInformationsUniqueIdAndReturnId(email, country, designerversion,
productname, projectLanguage, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc, uniqueId);
}
public org.talend.registration.register.proxy.UserRegistration[] listUsers() throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.listUsers();
}
public java.lang.String checkUser(java.lang.String email) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.checkUser(email);
}
public java.math.BigInteger createUser(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.createUser(email, pseudo, password, firstname, lastname, country, designerversion,
productname, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc);
}
public java.math.BigInteger updateUser(java.lang.String email, java.lang.String pseudo, java.lang.String passwordOld,
java.lang.String passwordNew, java.lang.String firstname, java.lang.String lastname, java.lang.String country,
java.lang.String designerversion, java.lang.String productname, java.lang.String osName, java.lang.String osVersion,
java.lang.String javaVersion, java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc)
throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.updateUser(email, pseudo, passwordOld, passwordNew, firstname, lastname, country,
designerversion, productname, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc);
}
public java.math.BigInteger createUser50(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.createUser50(pseudo, password, firstname, lastname, country, designerversion, productname,
osName, osVersion, javaVersion, totalMemory, memRAM, nbProc);
}
public java.math.BigInteger createUser53(java.lang.String email, java.lang.String pseudo, java.lang.String password,
java.lang.String firstname, java.lang.String lastname, java.lang.String country, java.lang.String designerversion,
java.lang.String productname, java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion,
java.lang.String totalMemory, java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId)
throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.createUser53(email, pseudo, password, firstname, lastname, country, designerversion,
productname, osName, osVersion, javaVersion, totalMemory, memRAM, nbProc, uniqueId);
}
public java.math.BigInteger updateUser53(java.lang.String pseudo, java.lang.String password, java.lang.String firstname,
java.lang.String lastname, java.lang.String country, java.lang.String designerversion, java.lang.String productname,
java.lang.String osName, java.lang.String osVersion, java.lang.String javaVersion, java.lang.String totalMemory,
java.lang.String memRAM, java.lang.String nbProc, java.lang.String uniqueId) throws java.rmi.RemoteException {
if (registerUserPortType == null)
_initRegisterUserPortTypeProxy();
return registerUserPortType.updateUser53(pseudo, password, firstname, lastname, country, designerversion, productname,
osName, osVersion, javaVersion, totalMemory, memRAM, nbProc, uniqueId);
}
}

View File

@@ -1,220 +0,0 @@
/**
* UserRegistration.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.talend.registration.register.proxy;
public class UserRegistration implements java.io.Serializable {
private int id;
private java.lang.String email;
private java.lang.String country;
private java.lang.String designer_version;
private java.lang.String productname;
private java.lang.String registration_date;
public UserRegistration() {
}
public UserRegistration(
int id,
java.lang.String email,
java.lang.String country,
java.lang.String designer_version,
java.lang.String productname,
java.lang.String registration_date) {
this.id = id;
this.email = email;
this.country = country;
this.designer_version = designer_version;
this.productname = productname;
this.registration_date = registration_date;
}
/**
* Gets the id value for this UserRegistration.
*
* @return id
*/
public int getId() {
return id;
}
/**
* Sets the id value for this UserRegistration.
*
* @param id
*/
public void setId(int id) {
this.id = id;
}
/**
* Gets the email value for this UserRegistration.
*
* @return email
*/
public java.lang.String getEmail() {
return email;
}
/**
* Sets the email value for this UserRegistration.
*
* @param email
*/
public void setEmail(java.lang.String email) {
this.email = email;
}
/**
* Gets the country value for this UserRegistration.
*
* @return country
*/
public java.lang.String getCountry() {
return country;
}
/**
* Sets the country value for this UserRegistration.
*
* @param country
*/
public void setCountry(java.lang.String country) {
this.country = country;
}
/**
* Gets the designer_version value for this UserRegistration.
*
* @return designer_version
*/
public java.lang.String getDesigner_version() {
return designer_version;
}
/**
* Sets the designer_version value for this UserRegistration.
*
* @param designer_version
*/
public void setDesigner_version(java.lang.String designer_version) {
this.designer_version = designer_version;
}
/**
* Gets the productname value for this UserRegistration.
*
* @return productname
*/
public java.lang.String getProductname() {
return productname;
}
/**
* Sets the productname value for this UserRegistration.
*
* @param productname
*/
public void setProductname(java.lang.String productname) {
this.productname = productname;
}
/**
* Gets the registration_date value for this UserRegistration.
*
* @return registration_date
*/
public java.lang.String getRegistration_date() {
return registration_date;
}
/**
* Sets the registration_date value for this UserRegistration.
*
* @param registration_date
*/
public void setRegistration_date(java.lang.String registration_date) {
this.registration_date = registration_date;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof UserRegistration)) return false;
UserRegistration other = (UserRegistration) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
this.id == other.getId() &&
((this.email==null && other.getEmail()==null) ||
(this.email!=null &&
this.email.equals(other.getEmail()))) &&
((this.country==null && other.getCountry()==null) ||
(this.country!=null &&
this.country.equals(other.getCountry()))) &&
((this.designer_version==null && other.getDesigner_version()==null) ||
(this.designer_version!=null &&
this.designer_version.equals(other.getDesigner_version()))) &&
((this.productname==null && other.getProductname()==null) ||
(this.productname!=null &&
this.productname.equals(other.getProductname()))) &&
((this.registration_date==null && other.getRegistration_date()==null) ||
(this.registration_date!=null &&
this.registration_date.equals(other.getRegistration_date())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
_hashCode += getId();
if (getEmail() != null) {
_hashCode += getEmail().hashCode();
}
if (getCountry() != null) {
_hashCode += getCountry().hashCode();
}
if (getDesigner_version() != null) {
_hashCode += getDesigner_version().hashCode();
}
if (getProductname() != null) {
_hashCode += getProductname().hashCode();
}
if (getRegistration_date() != null) {
_hashCode += getRegistration_date().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
}

View File

@@ -112,6 +112,10 @@ public class ProviderManager extends AbstractImportResourcesManager {
if (provider instanceof TarLeveledStructureProvider) {
return ((TarLeveledStructureProvider) provider).getRoot();
}
if (provider instanceof TalendZipLeveledStructureProvider) {
return ((TalendZipLeveledStructureProvider) provider).getRoot();
}
return null;
}
}

View File

@@ -97,7 +97,7 @@ public final class HandlerUtil {
URI propertyResourceURI = EcoreUtil.getURI(itemRecord.getItem().getProperty());
URI relativePlateformDestUri = propertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.SCREENSHOT_EXTENSION);
URL fileURL = FileLocator.toFileURL(new java.net.URL(
URL fileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + relativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
// for migration task ,there is not .screeenshot file in preceding version - begin
boolean hasScreenshotFile = false;

View File

@@ -283,7 +283,13 @@ public class ImportBasicHandler extends AbstractImportExecutableHandler {
.getImportErrors()
.add(Messages.getString("ImportBasicHandler_LoadEMFResourceError", importItem.getPath().lastSegment(),
HandlerUtil.getValidItemRelativePath(manager, importItem.getPath())));
log.error(Messages.getString("ImportBasicHandler_ErrorCreateEmfResource") + " - " + HandlerUtil.getValidItemRelativePath(manager, importItem.getPath())); //$NON-NLS-1$
// TDQ-21713: ignore ".gitkeep" file under the git remote project's folders
if (importItem.getPath() != null
&& (!".gitkeep.properties".equalsIgnoreCase(importItem.getPath().lastSegment()))) { //$NON-NLS-1$
log.error(Messages.getString("ImportBasicHandler_ErrorCreateEmfResource") + " - " //$NON-NLS-1$ //$NON-NLS-2$
+ HandlerUtil.getValidItemRelativePath(manager, importItem.getPath()));
}
}
}
@@ -1111,7 +1117,7 @@ public class ImportBasicHandler extends AbstractImportExecutableHandler {
haveRef = true;
URI relativePlateformDestUri = getReferenceFileURI(propertyResourceURI, refItem);
try {
URL fileURL = FileLocator.toFileURL(new java.net.URL(
URL fileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + relativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
os = new FileOutputStream(fileURL.getFile());
is = manager.getStream(getReferenceItemPath(selectedImportItem.getPath(), refItem), selectedImportItem);

View File

@@ -12,6 +12,10 @@
// ============================================================================
package org.talend.repository.items.importexport.handlers.imports;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -24,13 +28,24 @@ import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ItemRelation;
import org.talend.core.model.properties.ItemRelations;
import org.talend.core.model.properties.Project;
import org.talend.core.model.properties.Property;
import org.talend.core.model.relationship.Relation;
import org.talend.core.model.relationship.RelationshipItemBuilder;
import org.talend.repository.items.importexport.handlers.HandlerUtil;
import org.talend.repository.items.importexport.handlers.ImportHandlerHelper;
import org.talend.repository.items.importexport.handlers.model.ImportItem;
import org.talend.repository.items.importexport.wizard.models.ItemImportNode;
/**
@@ -91,6 +106,7 @@ public class ImportDependencyRelationsHelper {
checkedNodeList.forEach(checkedNode -> {
List<ItemImportNode> relatedImportNodes = findOutRelationsItemImportNodes(checkedNode, toSelectSet,
allImportItemNodesList);
findOutConnectionContextRelationItemImportNodes(checkedNode, toSelectSet, relatedImportNodes, allImportItemNodesList);
checkImportRelationDependency(relatedImportNodes, toSelectSet, allImportItemNodesList);
});
}
@@ -148,6 +164,61 @@ public class ImportDependencyRelationsHelper {
return relatedImportNodesList;
}
private void findOutConnectionContextRelationItemImportNodes(ItemImportNode checkedNode, Set<ItemImportNode> toSelectSet,
List<ItemImportNode> relatedImportNodes, List<ItemImportNode> allImportItemNodesList) {
ImportItem importItem = checkedNode.getItemRecord();
if (!(importItem.getProperty().getItem() instanceof ConnectionItem)) {
return;
}
BufferedInputStream stream = null;
try {
ResourceSet resourceSet = importItem.getResourceSet();
IPath itemPath = HandlerUtil.getItemPath(importItem.getPath(), importItem.getItem());
URI itemUri = HandlerUtil.getURI(itemPath);
Resource itemResource = resourceSet.getResource(itemUri, false);
if (itemResource == null) {
itemResource = resourceSet.createResource(itemUri);
}
File itemFile = new File(itemPath.toPortableString());
stream = new BufferedInputStream(new FileInputStream(itemFile));
itemResource.load(stream, null);
URI propertyUri = HandlerUtil.getURI(importItem.getPath());
Resource resource = resourceSet.getResource(propertyUri, false);
File propertyFile = new File(importItem.getPath().toPortableString());
stream = new BufferedInputStream(new FileInputStream(propertyFile));
resource.load(stream, null);
Property property = new ImportHandlerHelper().generateProperty(resource);
Item item = property.getItem();
if (item instanceof ConnectionItem) {
ConnectionItem connItem = (ConnectionItem) item;
Connection connection = connItem.getConnection();
if (connection.isContextMode() && StringUtils.isNotBlank(connection.getContextId())) {
String technicalLabel = checkedNode.getProjectNode().getProject().getTechnicalLabel();
ItemImportNode contextImportNode = getLatestVersionItemImportNode(connection.getContextId(), technicalLabel,
allImportItemNodesList, false);
if (contextImportNode != null && !toSelectSet.contains(contextImportNode)) {
toSelectSet.add(contextImportNode);
relatedImportNodes.add(contextImportNode);
}
}
}
} catch (Exception e) {
if (Platform.inDebugMode()) {
ExceptionHandler.process(e);
}
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException e) {
if (Platform.inDebugMode()) {
ExceptionHandler.process(e);
}
}
}
}
}
public ItemImportNode getLatestVersionItemImportNode(String id, String projectTecLabel,
List<ItemImportNode> allImportItemNodesList, boolean isGlobalRoutine) {
List<ItemImportNode> allItemImportNodesById = getItemImportNode(allImportItemNodesList, node -> {

View File

@@ -90,7 +90,7 @@ public class MetadataConnectionImportHandler extends ImportRepTypeHandler {
URI propertyResourceURI = EcoreUtil.getURI(((ConnectionItem) tmpItem).getProperty());
URI relativePlateformDestUri = propertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.ITEM_EXTENSION);
URL fileURL = FileLocator.toFileURL(new java.net.URL(
URL fileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + relativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
OutputStream os = new FileOutputStream(fileURL.getFile());
try {

View File

@@ -34,6 +34,7 @@ import org.talend.core.model.properties.Project;
import org.talend.core.model.properties.RoutinesJarItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.routines.RoutinesUtil;
import org.talend.core.repository.utils.RepositoryNodeManager;
import org.talend.core.ui.ITestContainerProviderService;
import org.talend.repository.items.importexport.handlers.model.EmptyFolderImportItem;
import org.talend.repository.items.importexport.handlers.model.ImportItem;
@@ -282,7 +283,7 @@ public class ImportNodesBuilder {
}
private TypeImportNode findAndCreateParentTypeNode(ProjectImportNode projectNode, ERepositoryObjectType curType) {
if (curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC || curType == ERepositoryObjectType.SNOWFLAKE) {
if (curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC || RepositoryNodeManager.isSnowflake(curType)) {
curType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
ERepositoryObjectType parentParentType = ERepositoryObjectType.findParentType(curType);

View File

@@ -1913,6 +1913,7 @@ public class LocalRepositoryFactory extends AbstractEMFRepositoryFactory impleme
IPath parentPath = null;
Project project = getRepositoryContext().getProject();
IProject fsProject = ResourceUtils.getProject(project);
List<Resource> crossReferences = new ArrayList<Resource>();
List<IRepositoryViewObject> allRepositoryViewObject = new ArrayList<IRepositoryViewObject>();
for (IRepositoryViewObject objToMove : objToMoves) {
ERepositoryObjectType type = null;
@@ -1977,18 +1978,19 @@ public class LocalRepositoryFactory extends AbstractEMFRepositoryFactory impleme
resourceFolderMap.put(resource, folder);
}
}
Map<Resource, IPath> resourceAndPathMap = new HashMap<Resource, IPath>();
for (Resource resource : allResource) {
IFolder resfolder = resourceFolderMap.get(resource);
IPath path = resfolder.getFullPath().append(resource.getURI().lastSegment());
resourceAndPathMap.put(resource, path);
// Find cross references.
crossReferences.addAll(findCrossReference(resource));
moveResource(resource, path);
}
allResource.clear();
}
Map<Resource, IPath> resourceAndPathMap = new HashMap<Resource, IPath>();
List<Resource> crossReferences = new ArrayList<Resource>();
for (Resource resource : allResource) {
IFolder folder = resourceFolderMap.get(resource);
IPath path = folder.getFullPath().append(resource.getURI().lastSegment());
resourceAndPathMap.put(resource, path);
// Find cross references.
crossReferences.addAll(findCrossReference(resource));
moveResource(resource, path);
}
// Save cross references.
saveCrossReference(crossReferences);

View File

@@ -2862,7 +2862,7 @@ public class DatabaseForm extends AbstractForm {
File file = new File(stringToFile);
if (file != null) {
try {
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.toURL()},this.getClass().getClassLoader());
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.toURI().toURL()},this.getClass().getClassLoader());
Class[] classes = cl.getAssignableClasses(Driver.class);
for (Class classe : classes) {
driverClassTxt.add(classe.getName());
@@ -6371,7 +6371,7 @@ public class DatabaseForm extends AbstractForm {
File file = new File(stringToFile);
if (file != null) {
try {
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.toURL()},this.getClass().getClassLoader());
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.toURI().toURL()},this.getClass().getClassLoader());
Class[] classes = cl.getAssignableClasses(Driver.class);
for (Class classe : classes) {
generalJdbcClassNameText.add(classe.getName());

View File

@@ -52,4 +52,5 @@ public class EnvironmentUtils {
public static boolean isAarch64() {
return StringUtils.equals(Platform.ARCH_AARCH64, Platform.getOSArch());
}
}

View File

@@ -13,6 +13,7 @@
package org.talend.signon.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
@@ -64,10 +65,11 @@ public class TMCRepositoryUtil {
public static final int ALLOWED_PAT_MAX_DAYS = 60;
public static final long ALLOWED_PAT_MAX_MILLI_SECONDS = ALLOWED_PAT_MAX_DAYS * 24 * 60 * 1000;
public static final long ALLOWED_PAT_MAX_MILLI_SECONDS = 1000L * ALLOWED_PAT_MAX_DAYS * 24 * 60 * 60;
public static final Pattern DATA_CENTER_PATTERN = Pattern.compile("^http[s?]://tmc\\.(.*)(\\.cloud\\.talend\\.com.*)", Pattern.CASE_INSENSITIVE);
public static final String DEFAULT_DATA_CENTER = "us";
public static String getBaseLoginURL(String dataCenter) {
if (dataCenter == null) {
@@ -77,7 +79,7 @@ public class TMCRepositoryUtil {
}
public static String getDefaultDataCenter() {
String defaultDataCenter = "us";
String defaultDataCenter = DEFAULT_DATA_CENTER;
if (getRecentDataCenter() != null) {
defaultDataCenter = getRecentDataCenter();
}
@@ -163,4 +165,16 @@ public class TMCRepositoryUtil {
public static String getTokenIntrospectURL(String dataCenter) {
return String.format(TOKEN_INTROSPECT_URL, dataCenter);
}
public static String getDataCenterFromTmcUrl(String tmcUrl) {
String dataCenter = TMCRepositoryUtil.DEFAULT_DATA_CENTER;
Matcher m = DATA_CENTER_PATTERN.matcher(tmcUrl);
if (!m.matches()) {
// custom cloud
LOGGER.info("Use default data center, can not find data center area from tmcUrl: " + tmcUrl);
} else {
dataCenter = m.group(1);
}
return dataCenter;
}
}

View File

@@ -0,0 +1,34 @@
// ============================================================================
//
// Copyright (C) 2006-2023 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.model.ldap;
import java.security.cert.X509Certificate;
import org.junit.Assert;
import org.junit.Test;
/**
* @author PCW created on Nov 28, 2023
*
*/
public class LDAPCATrusterTest {
@Test
public void testGetAcceptedIssuers() {
LDAPCATruster truster = new LDAPCATruster(null);
X509Certificate[] certs = truster.getAcceptedIssuers();
Assert.assertTrue(certs.length > 1);
}
}

View File

@@ -1,96 +1,128 @@
// ============================================================================
//
// Copyright (C) 2006-2021 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.librariesmanager.utils;
import static org.junit.Assert.*;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.junit.Assert;
import org.junit.Test;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.ModuleToInstall;
/**
* created by wchen on 2016年2月18日 Detailled comment
*
*/
public class RemoteModulesHelperTest {
/**
* Test method for
* {@link org.talend.librariesmanager.utils.RemoteModulesHelper#getNotInstalledModulesRunnable(java.util.List, java.util.List, boolean)}
* .
*
* @throws InterruptedException
* @throws InvocationTargetException
*/
@Test
public void testGetNotInstalledModulesRunnableListOfModuleNeededListOfModuleToInstallBoolean()
throws InvocationTargetException, InterruptedException {
List<ModuleNeeded> neededModules = new ArrayList<ModuleNeeded>();
ModuleNeeded m1 = new ModuleNeeded("tMysqlInput", "mysql.jar", "", true, null, null,
"mvn:org.talend.libraries/mysql/6.0.0");
ModuleNeeded m2 = new ModuleNeeded("tMysqlInput", "mysql.jar", "", true, null, null,
"mvn:org.talend.libraries/mysql/6.1.0");
ModuleNeeded m3 = new ModuleNeeded("tMyComponent1", "test.jar", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
ModuleNeeded m4 = new ModuleNeeded("tMyComponent2", "test.jar", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
ModuleNeeded m5 = new ModuleNeeded("tMyComponent3", "test.exe", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
neededModules.add(m1);
neededModules.add(m2);
neededModules.add(m3);
neededModules.add(m4);
neededModules.add(m5);
List<ModuleToInstall> toInstall1 = new ArrayList<ModuleToInstall>();
IRunnableWithProgress notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall1, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(4, toInstall1.size());
}
@Test
public void testGetNotInstalledModulesRunnableListForModuleNameURL() throws InvocationTargetException, InterruptedException {
List<ModuleNeeded> neededModules = new ArrayList<ModuleNeeded>();
ModuleNeeded m1 = new ModuleNeeded("test", "protobuf-java-2.6.1.jar", "", true, null, null,
"mvn:com.google.protobuf/protobuf-java/2.6.1");
neededModules.add(m1);
List<ModuleToInstall> toInstall1 = new ArrayList<ModuleToInstall>();
IRunnableWithProgress notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall1, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(1, toInstall1.size());
Assert.assertEquals("protobuf-java-2.6.1.jar", toInstall1.get(0).getName());
Assert.assertEquals("mvn:com.google.protobuf/protobuf-java/2.6.1/jar", toInstall1.get(0).getMavenUri());
neededModules.clear();
ModuleNeeded m2 = new ModuleNeeded("test", "protobuf-java.jar", "", true, null, null,
"mvn:org.talend.libraries/protobuf-java/6.0.0");
neededModules.add(m2);
toInstall1 = new ArrayList<ModuleToInstall>();
notInstalledModulesRunnable = RemoteModulesHelper.getInstance().getNotInstalledModulesRunnable(neededModules, toInstall1,
false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(1, toInstall1.size());
Assert.assertEquals("protobuf-java.jar", toInstall1.get(0).getName());
Assert.assertEquals("mvn:org.talend.libraries/protobuf-java/6.0.0/jar", toInstall1.get(0).getMavenUri());
}
}
// ============================================================================
//
// Copyright (C) 2006-2021 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.librariesmanager.utils;
import static org.junit.Assert.*;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.junit.Assert;
import org.junit.Test;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.ModuleToInstall;
import org.talend.core.runtime.maven.MavenConstants;
/**
* created by wchen on 2016骞<36>2鏈<32>18鏃<38> Detailled comment
*
*/
public class RemoteModulesHelperTest {
/**
* Test method for
* {@link org.talend.librariesmanager.utils.RemoteModulesHelper#getNotInstalledModulesRunnable(java.util.List, java.util.List, boolean)}
* .
*
* @throws InterruptedException
* @throws InvocationTargetException
*/
@Test
public void testGetNotInstalledModulesRunnableListOfModuleNeededListOfModuleToInstallBoolean()
throws InvocationTargetException, InterruptedException {
List<ModuleNeeded> neededModules = new ArrayList<ModuleNeeded>();
ModuleNeeded m1 = new ModuleNeeded("tMysqlInput", "mysql.jar", "", true, null, null,
"mvn:org.talend.libraries/mysql/6.0.0");
ModuleNeeded m2 = new ModuleNeeded("tMysqlInput", "mysql.jar", "", true, null, null,
"mvn:org.talend.libraries/mysql/6.1.0");
ModuleNeeded m3 = new ModuleNeeded("tMyComponent1", "test.jar", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
ModuleNeeded m4 = new ModuleNeeded("tMyComponent2", "test.jar", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
ModuleNeeded m5 = new ModuleNeeded("tMyComponent3", "test.exe", "", true, null, null,
"mvn:org.talend.libraries/test/6.0.0");
neededModules.add(m1);
neededModules.add(m2);
neededModules.add(m3);
neededModules.add(m4);
neededModules.add(m5);
List<ModuleToInstall> toInstall1 = new ArrayList<ModuleToInstall>();
IRunnableWithProgress notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall1, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(4, toInstall1.size());
}
@Test
public void testGetNotInstalledModulesRunnableListForModuleNameURL() throws InvocationTargetException, InterruptedException {
List<ModuleNeeded> neededModules = new ArrayList<ModuleNeeded>();
ModuleNeeded m1 = new ModuleNeeded("test", "protobuf-java-2.6.1.jar", "", true, null, null,
"mvn:com.google.protobuf/protobuf-java/2.6.1");
neededModules.add(m1);
List<ModuleToInstall> toInstall1 = new ArrayList<ModuleToInstall>();
IRunnableWithProgress notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall1, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(1, toInstall1.size());
Assert.assertEquals("protobuf-java-2.6.1.jar", toInstall1.get(0).getName());
Assert.assertEquals("mvn:com.google.protobuf/protobuf-java/2.6.1/jar", toInstall1.get(0).getMavenUri());
neededModules.clear();
ModuleNeeded m2 = new ModuleNeeded("test", "protobuf-java.jar", "", true, null, null,
"mvn:org.talend.libraries/protobuf-java/6.0.0");
neededModules.add(m2);
toInstall1 = new ArrayList<ModuleToInstall>();
notInstalledModulesRunnable = RemoteModulesHelper.getInstance().getNotInstalledModulesRunnable(neededModules, toInstall1,
false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(1, toInstall1.size());
Assert.assertEquals("protobuf-java.jar", toInstall1.get(0).getName());
Assert.assertEquals("mvn:org.talend.libraries/protobuf-java/6.0.0/jar", toInstall1.get(0).getMavenUri());
}
@Test
public void testGetManualInstallModulesRunnableListForModuleNameURL() throws InvocationTargetException, InterruptedException {
List<ModuleNeeded> neededModules = new ArrayList<ModuleNeeded>();
ModuleNeeded m1 = new ModuleNeeded("test", "tdgssconfig-16.20.00.02.jar", "", true, null, null,
"mvn:com.teradata/tdgssconfig/16.20.00.02/jar");
neededModules.add(m1);
List<ModuleToInstall> toInstall1 = new ArrayList<ModuleToInstall>();
IRunnableWithProgress notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall1, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(1, toInstall1.size());
Assert.assertEquals(MavenConstants.DOWNLOAD_MANUAL, toInstall1.get(0).getDistribution());
neededModules = new ArrayList<ModuleNeeded>();
m1 = new ModuleNeeded("test", "tdgssconfig-16.20.00.02.jar", "", true, null, null,
"mvn:com.teradata/tdgssconfig/16.20.00.02/jar");
neededModules.add(m1);
m1 = new ModuleNeeded("test", "terajdbc4-16.20.00.02.jar", "", true, null, null,
"mvn:com.teradata/terajdbc4/16.20.00.02/jar");
neededModules.add(m1);
List<ModuleToInstall> toInstall2 = new ArrayList<ModuleToInstall>();
notInstalledModulesRunnable = RemoteModulesHelper.getInstance()
.getNotInstalledModulesRunnable(neededModules, toInstall2, false, false, false);
notInstalledModulesRunnable.run(new NullProgressMonitor());
assertEquals(2, toInstall2.size());
Assert.assertEquals(MavenConstants.DOWNLOAD_MANUAL, toInstall2.get(0).getDistribution());
Assert.assertEquals(MavenConstants.DOWNLOAD_MANUAL, toInstall2.get(1).getDistribution());
}
}

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