Compare commits

..

4 Commits

Author SHA1 Message Date
kjwang
1730e58442 Fix TUP-40878 Add validation rule for jdbc db
Fix TUP-40878 Add validation rule for jdbc db schema throw NPE when try to select a
reference table.
https://jira.talendforge.org/browse/TUP-40878
2023-11-15 15:26:01 +08:00
kjwang-talend
8861b88828 Revert "Fix TUP-40878 Add validation rule for jdbc db schema throw NPE when try to select a reference table. https://jira.talendforge.org/browse/TUP-40878"
This reverts commit 92674ad9e4.
2023-11-15 15:03:43 +08:00
kjwang-talend
92674ad9e4 Fix TUP-40878
Add validation rule for jdbc db schema throw NPE when try to select a
reference table.
https://jira.talendforge.org/browse/TUP-40878
2023-11-15 15:01:30 +08:00
kjwang
c845b98228 TUP-40710 TCK-JDBC Dynamic setting view (#6557)
TUP-40710 TCK-JDBC Dynamic setting view
https://jira.talendforge.org/browse/TUP-40710
2023-11-13 17:16:15 +08:00
110 changed files with 1976 additions and 1729 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

View File

@@ -40,8 +40,6 @@ 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) {
@@ -87,8 +85,6 @@ public class ExceptionMessageDialog extends MessageDialog {
text.setText(exceptionString);
text.setEditable(false);
errorComposite.setClient(text);
errorComposite.setExpanded(expandedOnOpen);
return errorComposite;
}
@@ -154,22 +150,6 @@ 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

@@ -39,7 +39,6 @@ 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,19 +23,10 @@ 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);
}
@@ -43,9 +34,4 @@ public class FatalException extends RuntimeException {
public FatalException(Throwable cause) {
super(cause);
}
public int getCode() {
return code;
}
}

View File

@@ -31,9 +31,7 @@ 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;
/**
*
@@ -52,23 +50,6 @@ 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

@@ -24,7 +24,6 @@ import java.net.URI;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.List;
@@ -32,10 +31,6 @@ import java.util.Set;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.core.internal.net.ProxyManager;
import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.CommonExceptionHandler;
@@ -47,8 +42,6 @@ import org.talend.commons.runtime.utils.io.FileCopyUtils;
*/
public class NetworkUtil {
private static final Logger LOGGER = Logger.getLogger(NetworkUtil.class);
private static final String[] windowsCommand = { "ipconfig", "/all" }; //$NON-NLS-1$ //$NON-NLS-2$
private static final String[] linuxCommand = { "/sbin/ifconfig", "-a" }; //$NON-NLS-1$ //$NON-NLS-2$
@@ -79,136 +72,6 @@ public class NetworkUtil {
private static final String PROP_NETWORK_STATUS = "network.status"; //$NON-NLS-1$
private static final String SYSTEM_PROXY_ENABLED = "talend.studio.proxy.enableSystemProxyByDefault";
public static void applyProxyFromSystemProperties() throws Exception {
if (!Boolean.valueOf(System.getProperty("talend.studio.proxy.applySystemProps", Boolean.FALSE.toString()))) {
return;
}
final String passwordMask = "***";
String httpProxyHost = System.getProperty("http.proxyHost");
String httpProxyPort = System.getProperty("http.proxyPort");
String httpUser = System.getProperty("http.proxyUser");
String httpPassword = System.getProperty("http.proxyPassword");
if (StringUtils.isNotBlank(httpPassword)) {
System.setProperty("http.proxyPassword", passwordMask);
}
String httpNonProxyHosts = System.getProperty("http.nonProxyHosts");
String httpsProxyHost = System.getProperty("https.proxyHost");
String httpsProxyPort = System.getProperty("https.proxyPort");
String httpsUser = System.getProperty("https.proxyUser");
String httpsPassword = System.getProperty("https.proxyPassword");
if (StringUtils.isNotBlank(httpsPassword)) {
System.setProperty("https.proxyPassword", passwordMask);
}
String httpsNonProxyHosts = System.getProperty("https.nonProxyHosts");
String socksProxyHost = System.getProperty("socksProxyHost");
String socksProxyPort = System.getProperty("socksProxyPort");
String socksProxyUser = System.getProperty("socksProxyUser");
if (socksProxyUser == null) {
socksProxyUser = System.getProperty("java.net.socks.username");
}
String socksProxyPassword = System.getProperty("socksProxyPassword");
if (StringUtils.isNotBlank(socksProxyPassword)) {
System.setProperty("socksProxyPassword", passwordMask);
}
if (socksProxyPassword == null) {
socksProxyPassword = System.getProperty("java.net.socks.password");
}
IProxyService proxyService = ProxyManager.getProxyManager();
boolean isHttpProxyEnabled = StringUtils.isNotBlank(httpProxyHost) && StringUtils.isNotBlank(httpProxyPort);
boolean isHttpsProxyEnabled = StringUtils.isNotBlank(httpsProxyHost) && StringUtils.isNotBlank(httpsProxyPort);
boolean isSocksProxyEnabled = StringUtils.isNotBlank(socksProxyHost) && StringUtils.isNotBlank(socksProxyPort);
if (!isHttpProxyEnabled && !isHttpsProxyEnabled && !isSocksProxyEnabled) {
proxyService
.setSystemProxiesEnabled(Boolean.valueOf(System.getProperty(SYSTEM_PROXY_ENABLED, Boolean.TRUE.toString())));
proxyService.setProxiesEnabled(false);
LOGGER.info("No proxy specified, disabled.");
} else {
proxyService.setSystemProxiesEnabled(false);
proxyService.setProxiesEnabled(true);
List<IProxyData> proxies = new ArrayList<>();
String initedProxyTypes = "";
if (isHttpProxyEnabled) {
try {
IProxyData httpProxy = proxyService.getProxyData(IProxyData.HTTP_PROXY_TYPE);
httpProxy.setHost(httpProxyHost);
httpProxy.setPort(Integer.valueOf(httpProxyPort));
if (StringUtils.isNotBlank(httpUser)) {
httpProxy.setUserid(httpUser);
if (httpPassword == null) {
httpPassword = "";
}
httpProxy.setPassword(httpPassword);
}
proxies.add(httpProxy);
initedProxyTypes += IProxyData.HTTP_PROXY_TYPE + " ";
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
if (isHttpsProxyEnabled) {
try {
IProxyData httpsProxy = proxyService.getProxyData(IProxyData.HTTPS_PROXY_TYPE);
httpsProxy.setHost(httpsProxyHost);
httpsProxy.setPort(Integer.valueOf(httpsProxyPort));
if (StringUtils.isNotBlank(httpsUser)) {
httpsProxy.setUserid(httpsUser);
if (httpsPassword == null) {
httpsPassword = "";
}
httpsProxy.setPassword(httpsPassword);
}
proxies.add(httpsProxy);
initedProxyTypes += IProxyData.HTTPS_PROXY_TYPE + " ";
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
if (isSocksProxyEnabled) {
try {
IProxyData socksProxy = proxyService.getProxyData(IProxyData.SOCKS_PROXY_TYPE);
socksProxy.setHost(socksProxyHost);
socksProxy.setPort(Integer.valueOf(socksProxyPort));
if (StringUtils.isNotBlank(socksProxyUser)) {
socksProxy.setUserid(socksProxyUser);
if (socksProxyPassword == null) {
socksProxyPassword = "";
}
socksProxy.setPassword(socksProxyPassword);
}
proxies.add(socksProxy);
initedProxyTypes += IProxyData.SOCKS_PROXY_TYPE;
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
proxyService.setProxyData(proxies.toArray(new IProxyData[0]));
List<String> nonProxyHosts = new ArrayList<>();
if (StringUtils.isNotBlank(httpNonProxyHosts)) {
String[] split = httpNonProxyHosts.split("|");
nonProxyHosts.addAll(Arrays.asList(split));
}
if (StringUtils.isNotBlank(httpsNonProxyHosts)) {
String[] split = httpsNonProxyHosts.split("|");
nonProxyHosts.addAll(Arrays.asList(split));
}
proxyService.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
if (passwordMask.equals(System.getProperty("http.proxyPassword"))) {
System.setProperty("http.proxyPassword", httpPassword);
}
if (passwordMask.equals(System.getProperty("https.proxyPassword"))) {
System.setProperty("https.proxyPassword", httpsPassword);
}
if (passwordMask.equals(System.getProperty("socksProxyPassword"))) {
System.setProperty("socksProxyPassword", socksProxyPassword);
}
LOGGER.info("Succeed to init proxy: " + initedProxyTypes);
}
}
public static boolean isNetworkValid() {
return isNetworkValid(DEFAULT_TIMEOUT);
}

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,7 +17,6 @@ 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;
@@ -66,11 +65,6 @@ 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,7 +14,6 @@ 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;
@@ -55,7 +54,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,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).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) {
}
}
// ============================================================================
//
// 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) {
}
}

View File

@@ -155,6 +155,7 @@ ProjectRepositoryNode.invalidItem=Invalid item
ProjectRepositoryNode.columns=Columns
ProjectRepositoryNode.validationRules=Validation Rules
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (deprecated)
ProjectRepositoryNode.genericSchema=Generic schemas
ProjectRepositoryNode.queries=Queries
ProjectRepositoryNode.synonymSchemas=Synonym schemas

View File

@@ -155,6 +155,7 @@ 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

@@ -35,7 +35,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.commons.runtime.service.ITaCoKitService;
import org.talend.commons.ui.runtime.exception.RuntimeExceptionHandler;
import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.repository.IExtendRepositoryNode;
@@ -824,8 +823,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
* @return
*/
private RepositoryNode getFolder(ERepositoryObjectType currentType, String path, List<IRepositoryNode> rootNodes) {
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)
|| (ITaCoKitService.getInstance() != null && ITaCoKitService.getInstance().isTaCoKitType(currentType))) {
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)) {
currentType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
if (path == null || path.isEmpty()) {
@@ -1723,11 +1721,11 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
DatabaseConnectionItem connectionItem = (DatabaseConnectionItem) item;
DatabaseConnection connection = (DatabaseConnection) connectionItem.getConnection();
if (PluginChecker.isCDCPluginLoaded()) {
ICDCProviderService service = GlobalServiceRegister.getDefault()
.getService(ICDCProviderService.class);
ICDCProviderService service = GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
if (service != null && service.canCreateCDCConnection(connection)) {
RepositoryNode cdcNode = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.cdcFoundation"), //$NON-NLS-1$
Messages.getString("ProjectRepositoryNode.cdcFoundation.deprecated"), //$NON-NLS-1$
ECoreImage.FOLDER_CLOSE_ICON);
node.getChildren().add(cdcNode);
service.createCDCTypes(recBinNode, cdcNode, connection.getCdcConns());

View File

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

View File

@@ -144,7 +144,7 @@ Require-Bundle: org.eclipse.jdt.core,
com.fasterxml.jackson.core.jackson-annotations,
com.fasterxml.jackson.core.jackson-databind,
com.fasterxml.jackson.core.jackson-core,
avro
avro;bundle-version="1.11.2"
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,

View File

@@ -49,10 +49,8 @@ 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,java.base/sun.net.www.protocol.https
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
# 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,9 +39,6 @@ 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/>
@@ -251,7 +248,7 @@ public final class JavaUtils {
setProjectJavaVserion(javaVersion);
applyCompilerCompliance(javaVersion);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
service.updateProjectPomWithTemplate();
}
}
@@ -287,10 +284,6 @@ 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;
}
@@ -371,39 +364,5 @@ 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

@@ -54,6 +54,4 @@ public interface ILibraryManagerUIService extends IService {
public boolean confirmDialog(String originalJarFileName);
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
public String getLicenseUrlByName(String licenceName);
}

View File

@@ -60,6 +60,8 @@ public interface ITDQRepositoryService extends IService {
*/
public void notifySQLExplorer(Item... items);
public void fillMetadata(ConnectionItem connItem);
public void refresh();
// Added 20120503 yyin

View File

@@ -22,7 +22,7 @@ import org.talend.core.database.EDatabaseTypeName;
*/
public class DbVersion4DriversForOracle11 extends DbVersion4Drivers {
public static final String DRIVER_1_6 = "ojdbc6-11.2.0.4.jar"; //$NON-NLS-1$
public static final String DRIVER_1_6 = "ojdbc6.jar"; //$NON-NLS-1$
public static final String DRIVER_1_5 = "ojdbc5.jar"; //$NON-NLS-1$

View File

@@ -54,12 +54,12 @@ public enum EDatabaseVersion4Drivers {
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby-10.14.2.0.jar")), //$NON-NLS-1$
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-2.1.1.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient-10.14.2.0.jar")), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$

View File

@@ -45,8 +45,6 @@ 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>();
@@ -104,14 +102,6 @@ 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

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=Impossible d'obtenir le serve
MigrationReportAccessDialog.title=Migration des \u00E9l\u00E9ments du projet
MigrationReportAccessDialog.migrateSuccess=Les \u00E9l\u00E9ments du projet ont bien \u00E9t\u00E9 migr\u00E9s.
MigrationReportAccessDialog.completeReportAvailable=Consulter le rapport
MigrationReportAccessDialog.accessBrowse=Parcourir...
MigrationReportAccessDialog.accessReport=ici
MigrationReportAccessDialog.provideAnalysisTool=Vous pouvez ex\u00E9cuter une analyse de projet pour analyser votre projet migr\u00E9. Cet outil exp\u00E9rimental va g\u00E9n\u00E9rer un rapport contenant\u00A0:
MigrationReportAccessDialog.listOfProblems=- la liste des \u00E9l\u00E9ments \u00E0 corriger manuellement,
MigrationReportAccessDialog.listItems=- la liste des \u00E9l\u00E9ments \u00E0 v\u00E9rifier.
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=Impossible d'ex\u00E9cuter une analyse
AnalysisReportAccessDialog.shellTitle=Analyse du projet
AnalysisReportAccessDialog.generateSuccess=Analyse du projet termin\u00E9e.
AnalysisReportAccessDialog.completeReportAvailable=Consulter le rapport
AnalysisReportAccessDialog.accessBrowse=Parcourir...
AnalysisReportAccessDialog.accessReport=ici
AbstractPomTemplateProjectSettingPage.defaultTabLabel=Par d\u00E9faut
AbstractPomTemplateProjectSettingPage.customTabLabel=Personnalis\u00E9
AbstractPomTemplateProjectSettingPage.previewButton=Aper\u00E7u

View File

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u30EA\u30E2\u30FC\u30C8\u7BA
MigrationReportAccessDialog.title=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u3092\u79FB\u884C
MigrationReportAccessDialog.migrateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u304C\u6B63\u3057\u304F\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002
MigrationReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
MigrationReportAccessDialog.accessBrowse=\u53C2\u7167...
MigrationReportAccessDialog.accessReport=\u3053\u3061\u3089
MigrationReportAccessDialog.provideAnalysisTool=\u4ECA\u3059\u3050\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u3092\u5B9F\u884C\u3057\u3066\u3001\u79FB\u884C\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u5206\u6790\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u8A66\u9A13\u7684\u306A\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u3001\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u308B\u30EC\u30DD\u30FC\u30C8\u304C\u751F\u6210\u3055\u308C\u307E\u3059:
MigrationReportAccessDialog.listOfProblems=- \u624B\u52D5\u3067\u4FEE\u6B63\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
MigrationReportAccessDialog.listItems=- \u30C1\u30A7\u30C3\u30AF\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u65B0\u3057\u3044\u5206\u6790\u3092\u
AnalysisReportAccessDialog.shellTitle=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790
AnalysisReportAccessDialog.generateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u304C\u6B63\u3057\u304F\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
AnalysisReportAccessDialog.accessBrowse=\u53C2\u7167...
AnalysisReportAccessDialog.accessReport=\u3053\u3061\u3089
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u30C7\u30D5\u30A9\u30EB\u30C8
AbstractPomTemplateProjectSettingPage.customTabLabel=\u30AB\u30B9\u30BF\u30E0
AbstractPomTemplateProjectSettingPage.previewButton=\u30D7\u30EC\u30D3\u30E5\u30FC

View File

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u65E0\u6CD5\u4ECE\u8FDC\u7A0
MigrationReportAccessDialog.title=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB
MigrationReportAccessDialog.migrateSuccess=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB\u6210\u529F\u3002
MigrationReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
MigrationReportAccessDialog.accessBrowse=\u6D4F\u89C8...
MigrationReportAccessDialog.accessReport=\u6B64\u5904
MigrationReportAccessDialog.provideAnalysisTool=\u60A8\u73B0\u5728\u53EF\u4EE5\u8FD0\u884C\u5DE5\u7A0B\u5206\u6790\u4EE5\u5206\u6790\u8FC1\u79FB\u7684\u5DE5\u7A0B\u3002\u6B64\u5B9E\u9A8C\u6027\u5DE5\u5177\u5C06\u751F\u6210\u4E00\u4EFD\u5206\u6790\u62A5\u544A\uFF0C\u5176\u4E2D\u5305\u542B:
MigrationReportAccessDialog.listOfProblems=- \u9700\u8981\u624B\u52A8\u4FEE\u590D\u7684\u9879\u76EE\u6E05\u5355\u3002
MigrationReportAccessDialog.listItems=- \u9700\u8981\u68C0\u67E5\u7684\u9879\u76EE\u6E05\u5355\u3002
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u73B0\u5728\u65E0\u6CD5\u8FD0\u884C\u
AnalysisReportAccessDialog.shellTitle=\u5DE5\u7A0B\u5206\u6790
AnalysisReportAccessDialog.generateSuccess=\u5DE5\u7A0B\u5206\u6790\u6210\u529F\u5B8C\u6210\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
AnalysisReportAccessDialog.accessBrowse=\u6D4F\u89C8...
AnalysisReportAccessDialog.accessReport=\u6B64\u5904
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u9ED8\u8BA4
AbstractPomTemplateProjectSettingPage.customTabLabel=\u81EA\u5B9A\u4E49
AbstractPomTemplateProjectSettingPage.previewButton=\u9884\u89C8

View File

@@ -211,9 +211,6 @@ public class ModuleAccessHelper {
}
private static boolean hasExtraSettings(EList<ElementParameterType> parameters) {
if (parameters == null) {
return false;
}
Map<String, String> paramMap = parameters.stream().filter(p -> p.getName() != null && p.getValue() != null)
.collect(Collectors.toMap(ElementParameterType::getName, ElementParameterType::getValue, (a1, a2) -> a1));
// Implicit context
@@ -246,11 +243,6 @@ 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

@@ -14,7 +14,6 @@ package org.talend.core.service;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.signon.util.PAT;
import org.talend.signon.util.TokenMode;
import org.talend.signon.util.listener.LoginEventListener;
@@ -54,21 +53,4 @@ public interface ICloudSignOnService extends IService {
}
return null;
}
/**
* Introspect PAT to retrieve the pat_created date and user info
* @param pat Personal access token of TMC
* @param dataCenter data center of TMC
* @return Introspected PAT
*/
PAT introspectPAT(String pat, String dataCenter) throws Exception;
/**
* Introspect pat and check whether pat is allowed
*
* @param pat Personal access token
* @param tmcUrl tmc url
* @return valid or not
*/
boolean validatePAT(String pat, String tmcUrl) throws Exception;
}

View File

@@ -149,10 +149,6 @@ 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

@@ -499,7 +499,6 @@ 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
@@ -526,13 +525,12 @@ public class RepositoryNodeUtilities {
tmpType = ERepositoryObjectType.DOCUMENTATION;
}
if (tmpType != null && (tmpType == rootContextType || rootContextType.isChildTypeOf(tmpType))) {
if (tmpType != null && tmpType == rootContextType) {
expandParentNode(view, rootNode);
}
// expand the parent node
if ((curType == rootContextType || curType.isChildTypeOf(rootContextType))
&& isRepositoryFolder(rootNode)) {
if (curType == rootContextType && isRepositoryFolder(rootNode)) {
if (rootContextType == ERepositoryObjectType.SQLPATTERNS
&& !(rootNode.getParent() instanceof IProjectRepositoryNode)) {
// sql pattern

View File

@@ -108,8 +108,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
private Button manageEnvironmentsButton;
private Button wrapButton;
private ContextManagerHelper helper;
private List<Button> buttonList;
@@ -231,11 +229,8 @@ 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(10, 0).margins(5, 0).numColumns(columnNum).create());
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(5, 0).margins(5, 0).numColumns(7).create());
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.DOWN).grab(true, false).applyTo(buttonsComp);
buttonList.clear();
addButton = createAddPushButton(buttonsComp);
@@ -243,6 +238,8 @@ 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);
@@ -256,16 +253,14 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
}
createEnvironmentsGroup(buttonsComp);
wrapButton = createWrapButton(buttonsComp);
}
private void createEnvironmentsGroup(Composite parentComposite) {
Composite environmentsComp = new Composite(parentComposite, SWT.NULL);
GridLayout gridLayout = new GridLayout(2, false);
gridLayout.horizontalSpacing = 10;
environmentsComp.setLayout(gridLayout);
environmentsComp.setLayout(new GridLayout(2, false));
GridData contextComboData = new GridData();
contextComboData.grabExcessHorizontalSpace = true;
contextComboData.horizontalAlignment = GridData.END;
environmentsComp.setLayoutData(contextComboData);
viewEnvironmentsCombo = new CCombo(environmentsComp, SWT.BORDER);
@@ -552,35 +547,6 @@ 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) {
@@ -604,13 +570,6 @@ 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,7 +20,6 @@ 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;
@@ -35,7 +34,6 @@ 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;
@@ -58,18 +56,10 @@ 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;
@@ -102,9 +92,7 @@ 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;
@@ -161,10 +149,6 @@ 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;
}
@@ -437,101 +421,6 @@ 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) {
@@ -559,108 +448,58 @@ public class ContextTreeTable {
dataLayer.setColumnWidthByPosition(i, averageWidth);
}
} else {
adjustCellWidthHeight(dataLayer, checkColumnsPos);
}
}
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
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);
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);
}
}
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);
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);
}
}
}
gc.dispose();
}
private int getColumWidth(GC gc, DataLayer dataLayer, int colPos) {
private int getColumWidth(DataLayer dataLayer, int colPos, int avgWidth) {
int colWidth = fixedTypeWidth;
GC gc = new GCFactory(natTable).createGC();
int max = 0;
String text = "";
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
Object dataValueByPosition = dataLayer.getDataValueByPosition(colPos, i);
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
if (dataValueByPosition == null) {
continue;
}
text = dataValueByPosition.toString();
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int textWidth = size.x;
if (textWidth > max) {
max = textWidth;
int temp = size.x;
if (temp > max) {
max = temp;
}
}
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

@@ -1,84 +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.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,9 +37,7 @@ 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;
@@ -130,11 +128,7 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CHECK_PROPERTY);
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,
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
Style cellStyleSelect = new Style();
@@ -152,10 +146,6 @@ 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);
}
@@ -327,13 +317,6 @@ 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,7 +15,6 @@ 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;
@@ -110,12 +109,9 @@ public class ContextValuesNatText extends Composite {
if (NatTableCellEditorFactory.isPassword(realPara.getType())) {
widgetStyle = SWT.PASSWORD | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
}
if (NatTableCellEditorFactory.isResource(realPara.getType()) || NatTableCellEditorFactory.isList(realPara.getType())) {
if (NatTableCellEditorFactory.isResource(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));
@@ -239,7 +235,6 @@ 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("")) {
@@ -256,14 +251,6 @@ 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,8 +25,6 @@ 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;
@@ -80,33 +78,6 @@ 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,7 +27,6 @@ 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;
/**
@@ -45,7 +44,7 @@ public class NatTableCellEditorFactory {
String currentType = para.getType();
if (currentType != null) {
if (isFile(currentType) || isDate(currentType) || isDirectory(currentType) || isList(currentType)
|| isResource(currentType) || isString(currentType)) {
|| isResource(currentType)) {
return true;
}
}
@@ -68,8 +67,6 @@ public class NatTableCellEditorFactory {
defalutDataValue = para.getDisplayValue();
} else if (isResource(currentType)) {
transformResult = openResourcesDialogForCellEditor(parentShell, para);
} else if (isString(currentType)) {
transformResult = openStringDialogFoeCellEditor(parentShell, para);
}
}
return transformResult;
@@ -143,15 +140,6 @@ 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) {
@@ -196,10 +184,6 @@ 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,13 +146,4 @@ 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,7 +16,6 @@ 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;
@@ -342,11 +341,7 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
column.setBeanPropertyAccessors(getRowNumAccessor());
column.setWeight(5);
column.setModifiable(false);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
column.setMinimumWidth(10);
} else {
column.setMinimumWidth(30);
}
column.setMinimumWidth(10);
column.setSortable(true);
}

View File

@@ -30,7 +30,6 @@ 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;
@@ -80,7 +79,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
}
public static boolean show() {
return !showOnce() && JavaUtils.isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
return !showOnce() && isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
}
private static boolean showOnce() {
@@ -133,4 +132,17 @@ 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,8 +30,6 @@ 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,11 +15,8 @@ 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;
@@ -44,10 +41,6 @@ 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() {
@@ -77,7 +70,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
// typeStudio
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
IBrandingService brandingService = GlobalServiceRegister.getDefault().getService(
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getAcronym());
// tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getShortProductName());
@@ -99,11 +92,6 @@ 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,6 +50,7 @@ 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 (parentBuildType!= null && parentBuildType.contains("ROUTE")) {
if ("ROUTE".equalsIgnoreCase(parentBuildType)) {
childProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "OSGI");
}
}

View File

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

View File

@@ -72,7 +72,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>

View File

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

View File

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

View File

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

View File

@@ -42,7 +42,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.63.0</tcomp.version>
<tcomp.version>1.62.1</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_open</id>
<id>Talend OpenSource Release</id>
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
</repository>
</repositories>

View File

@@ -26,9 +26,7 @@ import java.util.List;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
import org.apache.maven.settings.Profile;
import org.apache.maven.settings.Proxy;
@@ -68,8 +66,6 @@ import org.w3c.dom.Node;
@SuppressWarnings({ "rawtypes", "unchecked" })
public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
private static final Logger LOGGER = Logger.getLogger(M2eUserSettingForTalendLoginTask.class);
public static final String MAVEN_REPO_CONFIG = "maven.repository"; //$NON-NLS-1$
public static final String VERSION_KEY = "version"; //$NON-NLS-1$
@@ -448,8 +444,6 @@ public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
proxyService.setNonProxiedHosts(bypassHosts.toArray(new String[bypassHosts.size()]));
}
}
LOGGER.info("Updated studio proxy settings from maven settings.");
}
private boolean updateProfileSettings(IProgressMonitor monitor, IMaven maven, Settings settings, Path configPath,

View File

@@ -135,31 +135,6 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
}
return null;
}
protected Model createFeatureModel() {
InputStream inputStream = null;
try {
Model model = null;
inputStream = getFeatureTemplateStream();
if (inputStream != null) {
model = MODEL_MANAGER.readMavenModel(inputStream);
}
return model;
} catch (IOException e) {
ExceptionHandler.process(e);
} catch (CoreException e) {
ExceptionHandler.process(e);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
//
}
}
}
return null;
}
protected InputStream getTemplateStream() throws IOException {
try {
@@ -168,16 +143,6 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
throw new IOException(e);
}
}
protected InputStream getFeatureTemplateStream() throws IOException {
try {
return MavenTemplateManager.getBundleTemplateStream(JOB_TEMPLATE_BUNDLE, getBundleTemplatePath());
} catch (Exception e) {
throw new IOException(e);
}
}
/*
* (non-Javadoc)

View File

@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.talend.libraries.javacsv;singleton:=true
Bundle-Version: 8.0.1.qualifier
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/javacsv-2.0.jar;mvn:net.sourceforge.javacsv/javacsv/2.0
lib/javacsv.jar
Export-Package: com.csvreader
Eclipse-BundleShape: dir

View File

@@ -6,7 +6,7 @@
context="plugin:org.talend.libraries.javacsv"
language="java"
message="Needed for Java CVS Reader and Writer"
name="javacsv-2.0.jar" mvn_uri="mvn:net.sourceforge.javacsv/javacsv/2.0"
name="javacsv.jar" mvn_uri="mvn:org.talend.libraries/javacsv/6.0.0"
required="true">
</libraryNeeded>
</extension>

View File

@@ -5,7 +5,7 @@ Bundle-Name: Jboss
Bundle-SymbolicName: org.talend.libraries.jboss;singleton:=true
Bundle-Version: 8.0.1.qualifier
Bundle-ClassPath: .,
lib/trove-1.0.2.jar;mvn:trove/trove/1.0.2,
lib/trove.jar,
lib/jboss-serialization.jar
Eclipse-BuddyPolicy: registered
Export-Package: org.jboss.serial,

View File

@@ -6,14 +6,14 @@
context="plugin:org.talend.libraries.jboss"
language="java"
message="Needed for JBoss"
name="jboss-serialization-1.0.3.GA.jar" mvn_uri="mvn:jboss/jboss-serialization/1.0.3.GA"
name="jboss-serialization.jar" mvn_uri="mvn:org.talend.libraries/jboss-serialization/6.0.0"
required="true">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.libraries.jboss"
language="java"
message="Needed for JBoss"
name="trove-1.0.2.jar" mvn_uri="mvn:trove/trove/1.0.2"
name="trove.jar" mvn_uri="mvn:org.talend.libraries/trove/6.0.0"
required="true">
</libraryNeeded>
</extension>

View File

@@ -13,7 +13,7 @@
context="plugin:org.talend.libraries.jdbc.mysql"
language="java"
message="Needed for Mysql jdbc plugin"
name="mysql-connector-java-5.1.30.jar" mvn_uri="mvn:mysql/mysql-connector-java/5.1.30"
name="mysql-connector-java-5.1.30-bin.jar" mvn_uri="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0"
required="true">
</libraryNeeded>
<libraryNeeded
@@ -29,8 +29,8 @@
context="plugin:org.talend.libraries.jdbc.mysql"
language="java"
message="Needed for Mysql jdbc plugin"
mvn_uri="mvn:mysql/mysql-connector-java/3.1.14"
name="mysql-connector-java-3.1.14.jar"
mvn_uri="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0"
name="mysql-connector-java-3.1.14-bin.jar"
required="true">
</libraryNeeded>
</extension>

View File

@@ -6,7 +6,7 @@
context="plugin:org.talend.libraries.jexcel"
language="java"
message="Needed for jexcel component"
name="jxl-2.6.12.jar" mvn_uri="mvn:net.sourceforge.jexcelapi/jxl/2.6.12"
name="jxl.jar" mvn_uri="mvn:org.talend.libraries/jxl/6.0.0"
required="true">
</libraryNeeded>
<libraryNeeded

View File

@@ -1,61 +0,0 @@
<!-- saved from url=(0042)http://www.apache.org/licenses/LICENSE-1.1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* &lt;http://www.apache.org/&gt;.
*
* Portions of this software are based upon public domain software
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign.
*/
</pre></body></html>

View File

@@ -1,7 +1,6 @@
[
{"licenseUrl":"http://www.talendforge.org/modules/licenses/PUBLIC_DOMAIN.txt","licenseName":"PUBLIC_DOMAIN"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v2.txt","licenseName":"Apache-2.0"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v1.1.txt","licenseName":"Apache-1.1"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/Oracle-Binary.txt","licenseName":"Oracle-Binary"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v2.txt","licenseName":"BSD-2-Clause"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v3.txt","licenseName":"BSD-3-Clause"},

View File

@@ -40,7 +40,6 @@ import org.talend.librariesmanager.prefs.LibrariesManagerUtils;
import org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog;
import org.talend.librariesmanager.ui.i18n.Messages;
import org.talend.librariesmanager.ui.service.RoutineProviderManager;
import org.talend.librariesmanager.utils.LicenseTextUtil;
import org.talend.librariesmanager.utils.ModulesInstaller;
/**
@@ -189,8 +188,4 @@ public class LibraryManagerUIService implements ILibraryManagerUIService {
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies) {
return new ConfigModuleDialog(parentShell, initValue, allowDetectDependencies);
}
public String getLicenseUrlByName(String licenceName) {
return LicenseTextUtil.getLicenseUrlByName(licenceName);
}
}

View File

@@ -102,15 +102,6 @@ public class LicenseTextUtil {
return null;
}
public static String getLicenseUrlByName(String name) {
for (String url : licenseMap.keySet()) {
if (name != null && name.equalsIgnoreCase(licenseMap.get(url))) {
return url;
}
}
return "";
}
private static String getStringFromText(File file) throws Exception {
StringBuilder sb = new StringBuilder();
List<String> lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8);

View File

@@ -622,17 +622,15 @@ public class RemoteModulesHelper {
message.put("module", child);//$NON-NLS-1$
String url = serviceUrl + "?data=" + message;
JSONObject resultStr = readJsonFromUrl(url);
if (resultStr != null) {
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
if (jsonArray != null) {
JSONObject object = jsonArray.getJSONObject(0);
if (object != null) {
String licenseText = object.getString("licenseText");//$NON-NLS-1$
if (licenseText != null) {
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
}
return licenseText;
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
if (jsonArray != null) {
JSONObject object = jsonArray.getJSONObject(0);
if (object != null) {
String licenseText = object.getString("licenseText");//$NON-NLS-1$
if (licenseText != null) {
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
}
return licenseText;
}
}
} catch (JSONException e) {

View File

@@ -153,14 +153,8 @@ public class LibraryDataService {
}
public void buildLibraryLicenseData(Set<String> mvnUrlList) {
buildLibraryLicenseData(mvnUrlList, null);
}
public void buildLibraryLicenseData(Set<String> mvnUrlList, Map<String, List<String[]>> licenseMap) {
for (String mvnUrl : mvnUrlList) {
Library libraryObj = getLicenseDataFromMap(mvnUrl, licenseMap);
if (libraryObj == null)
libraryObj = resolve(mvnUrl);
Library libraryObj = resolve(mvnUrl);
if (!libraryObj.isLicenseMissing() || !libraryObj.isPomMissing()) {
mvnToLibraryMap.put(getShortMvnUrl(mvnUrl), libraryObj);
}
@@ -177,10 +171,10 @@ public class LibraryDataService {
isRemoved = true;
}
}
if (lib.isPomMissing()) {
if(lib.isPomMissing()) {
lib.getLicenses().clear();
lib.getLicenses().add(unknownLicense);
} else {
}else {
if ((isRemoved && licenses.size() == 0)) {
licenses.add(unknownLicense);
lib.setLicenseMissing(true);
@@ -189,38 +183,6 @@ public class LibraryDataService {
}
dataProvider.saveLicenseData(mvnToLibraryMap);
}
private Library getLicenseDataFromMap(String mvnUrl, Map<String, List<String[]>> licenseMap) {
if (licenseMap == null)
return null;
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);
String shourtMvnUrl = getShortMvnUrl(mvnUrl);
String gav = String.format("%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
List<String[]> licenses = licenseMap.get(gav);
Library libraryObj = null;
if (licenses != null && licenses.size() > 0) {
libraryObj = new Library();
libraryObj.setGroupId(artifact.getGroupId());
libraryObj.setArtifactId(artifact.getArtifactId());
libraryObj.setVersion(artifact.getVersion());
libraryObj.setMvnUrl(shourtMvnUrl);
libraryObj.setType(artifact.getType());
libraryObj.setClassifier(artifact.getClassifier());
libraryObj.setPomMissing(false);
for (String[] licenseContent : licenses) {
LibraryLicense license = new LibraryLicense();
if (licenseContent != null && licenseContent.length == 2) {
license.setName(licenseContent[0]);
license.setUrl(licenseContent[1]);
}
libraryObj.getLicenses().add(license);
}
} else {
return null;
}
return libraryObj;
}
private Library resolve(String mvnUrl) {
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);

View File

@@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.ui,
org.talend.daikon,
org.talend.libraries.apache,
org.talend.studio.studio-utils,
avro
avro;bundle-version="1.11.2"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: .Talend SA.
Bundle-Localization: plugin

View File

@@ -48,6 +48,7 @@ import org.talend.core.model.context.JobContext;
import org.talend.core.model.context.JobContextParameter;
import org.talend.core.model.metadata.IMetadataConnection;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.builder.connection.AdditionalConnectionProperty;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.metadata.builder.connection.FTPConnection;
@@ -381,7 +382,12 @@ public final class ConnectionContextHelper {
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
} else if (currentConnection instanceof SAPConnection) {
SAPConnection sapConn = (SAPConnection) currentConnection;
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
varList.add(sapProperty.getPropertyName());
}
} else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
DatabaseConnection dbConn = (DatabaseConnection) currentConnection;
List<Map<String, Object>> hadoopPropertiesList = DBConnectionContextUtils.getHiveOrHbaseHadoopProperties(dbConn);
if (!hadoopPropertiesList.isEmpty()) {

View File

@@ -620,6 +620,11 @@ public final class OtherConnectionContextUtils {
}
}
}
// Create sap context parameters for additional properties
for (AdditionalConnectionProperty sapProperty : conn.getAdditionalProperties()) {
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
ConnectionContextHelper.createParameters(varList, sapPropertyContextName, sapProperty.getValue());
}
return varList;
}
@@ -647,6 +652,7 @@ public final class OtherConnectionContextUtils {
setSAPConnnectionBasicPropertiesForContextMode(sapCon, sapParam, sapVariableName);
}
}
setSAPConnectionAdditionPropertiesForContextMode(sapCon);
}
static void setSAPConnectionPropertiesForExistContextMode(SAPConnection sapConn, Set<IConnParamName> paramSet,
@@ -676,6 +682,7 @@ public final class OtherConnectionContextUtils {
setSAPConnnectionBasicPropertiesForContextMode(sapConn, sapParam, sapVariableName);
}
}
setSAPConnectionAdditionPropertiesForContextMode(sapConn);
}
static void setSAPConnnectionBasicPropertiesForContextMode(SAPConnection sapConn, EParamName sapParam,
@@ -728,6 +735,12 @@ public final class OtherConnectionContextUtils {
}
}
static void setSAPConnectionAdditionPropertiesForContextMode(SAPConnection sapConn) {
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
sapProperty.setValue(ContextParameterUtils.getNewScriptCode(sapPropertyContextName, LANGUAGE));
}
}
static void revertSAPPropertiesForContextMode(SAPConnection conn, ContextType contextType) {
String client = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, conn.getClient()));

View File

@@ -28,7 +28,6 @@ import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ITDQRepositoryService;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
@@ -177,34 +176,11 @@ public abstract class CheckLastVersionRepositoryWizard extends RepositoryWizard
workspace.run(operation, schedulingRule, IWorkspace.AVOID_UPDATE, new NullProgressMonitor());
}
protected void updateDQDependency(boolean isModified, String originaleObjectLabel) {
if (isModified) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepService != null) {
// TDQ-6395, save all dependency of the connection when the name is changed.
tdqRepService.saveConnectionWithDependency(connectionItem);
// TDQ-7438, If the analysis editor is opened, popup the dialog which ask user refresh
// the editor or not once should enough(use hasReloaded to control,because the reload will refresh)
tdqRepService.refreshCurrentAnalysisEditor(connectionItem);
tdqRepService.updateAliasInSQLExplorer(connectionItem, originaleObjectLabel);
}
}
}
}
protected void notifyDQSQLExplorer() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepService != null) {
tdqRepService.notifySQLExplorer(connectionItem);
}
}
@Override
public boolean performCancel() {
// connectionCopy = null;
// metadataTableCopy = null;
return super.performCancel();
}
protected void refreshInFinish(boolean isModified) {

View File

@@ -82,8 +82,8 @@
context="plugin:org.talend.libraries.jdbc.oracle"
language="java"
message="Needed for Oracle jdbc plugin"
mvn_uri="mvn:com.oracle.database.jdbc/ojdbc6/11.2.0.4"
name="ojdbc6-11.2.0.4.jar"
mvn_uri="mvn:org.talend.libraries/ojdbc6/6.0.0"
name="ojdbc6.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.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;
// }
}
// ============================================================================
//
// 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;
// }
}

View File

@@ -223,6 +223,10 @@ public final class JavaSqlFactory {
} // else we are ok
return driverClassName;
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return ""; //$NON-NLS-1$
}
DelimitedFileConnection dfConn = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConn != null) {
return ""; //$NON-NLS-1$
@@ -242,6 +246,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setURL(url);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPathname(url);
}
// MOD qiongli 2011-1-9 feature 16796
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConnection != null) {
@@ -260,6 +268,11 @@ public final class JavaSqlFactory {
DatabaseConnection dbConn = SwitchHelpers.DATABASECONNECTION_SWITCH.doSwitch(conn);
if (dbConn != null) {
userName = getOriginalValueConnection(dbConn).getUsername();// root
} else {
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
userName = mdmConn.getUsername();
}
}
if (userName == null) {
userName = "";//$NON-NLS-1$
@@ -283,6 +296,11 @@ public final class JavaSqlFactory {
} else {
psw = getOriginalValueConnection(dbConn).getRawPassword();// ""
}
} else {
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
psw = ConnectionHelper.getPassword(mdmConn);
}
}
if (psw == null) {
psw = "";//$NON-NLS-1$
@@ -535,6 +553,10 @@ public final class JavaSqlFactory {
}
return url;
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getPathname();
}
// MOD qiongli 2011-1-11 feature 16796.
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConnection != null) {
@@ -698,6 +720,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getServerName();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getServer();
}
return null;
}
@@ -725,6 +751,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setServerName(serverName);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setServer(serverName);
}
}
/**
@@ -738,6 +768,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getPort();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getPort();
}
return null;
}
@@ -752,6 +786,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setPort(port);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPort(port);
}
}
/**
@@ -765,6 +803,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getSID();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getContext();
}
return null;
}
@@ -779,6 +821,10 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setSID(sid);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setContext(sid);
}
}
/**

View File

@@ -120,10 +120,7 @@ public class TacokitDatabaseConnectionImpl extends DatabaseConnectionImpl implem
HashMap<String, Object> map = new HashMap<String, Object>();
map.put(KEY_DRIVER_PATH, driverJar);
map.put(KEY_DRIVER_NAME, null);
// TDQ-21562: fix add twice when import the project from login
if (!drivers.contains(map)) {
drivers.add(map);
}
drivers.add(map);
}
this.getProperties().put(KEY_DRIVER, drivers.toString());
}
@@ -257,11 +254,7 @@ public class TacokitDatabaseConnectionImpl extends DatabaseConnectionImpl implem
*/
@Override
public String getDbmsId() {
String mappingFile = getDatabaseMappingFile();
if ("null".equals(mappingFile)) {
return null;
}
return mappingFile;
return getDatabaseMappingFile();
}
/**

View File

@@ -606,9 +606,27 @@ public class ConnectionHelper {
* @return
*/
public static String getUniverse(Connection element) {
MDMConnection mdmConnection = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(element);
if (mdmConnection != null) {
return getUniverse(mdmConnection);
}
return "";
}
/**
* DOC xqliu Comment method "setUniverse".
*
* @param universe
* @param element
*/
public static void setUniverse(String universe, Connection element) {
MDMConnection mdmConnection = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(element);
if (mdmConnection != null) {
setUniverse(universe, mdmConnection);
}
}
// MOD klliu 2010-10-09 feature 15821
/**
*
* DOC klliu Comment method "getOtherParameter".
@@ -1292,6 +1310,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setServerName(serverName);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setServer(serverName);
}
}
/**
@@ -1305,6 +1327,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setPort(port);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPort(port);
}
}
/**
@@ -1318,6 +1344,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setSID(sid);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setContext(sid);
}
}
/**
@@ -1331,6 +1361,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setURL(url);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPathname(url);
}
}
/**
@@ -1344,6 +1378,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setUsername(username);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setUsername(username);
}
}
/**
@@ -1357,6 +1395,10 @@ public class ConnectionHelper {
if (dbConn != null) {
dbConn.setRawPassword(password);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPassword(mdmConn.getValue(password, true));
}
}
/**
@@ -1370,6 +1412,10 @@ public class ConnectionHelper {
if (dbConn != null) {
return dbConn.getRawPassword();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getValue(mdmConn.getPassword(), false);
}
return null;
}

View File

@@ -241,6 +241,15 @@ public final class SwitchHelpers {
}
};
public static final ConnectionSwitch<MDMConnection> MDMCONNECTION_SWITCH = new ConnectionSwitch<MDMConnection>() {
@Override
public MDMConnection caseMDMConnection(MDMConnection object) {
return object;
}
};
public static final ConnectionSwitch<MetadataColumn> METADATA_COLUMN_SWITCH = new ConnectionSwitch<MetadataColumn>() {
@Override

View File

@@ -114,5 +114,4 @@ 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.notSupported=The maximum Java version supported by Studio is {0}. Your current version is {1}.
JavaVersion.CheckError=Java upgrade required, minimal required java version is {0}, current version is {1}.

View File

@@ -115,4 +115,3 @@ 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

@@ -12,12 +12,7 @@
// ============================================================================
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
@@ -35,30 +30,4 @@ 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,7 +83,6 @@ 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.
@@ -147,14 +146,10 @@ public class Application implements IApplication {
StudioKeysFileCheck.validateJavaVersion();
} catch (Exception e) {
Shell shell = new Shell(display, SWT.NONE);
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;
MessageDialog.openError(shell, null, // $NON-NLS-1$
Messages.getString("JavaVersion.CheckError", StudioKeysFileCheck.JAVA_VERSION_MINIMAL_STRING,
StudioKeysFileCheck.getJavaVersion()));
return IApplication.EXIT_RELAUNCH;
}
try {
@@ -176,12 +171,6 @@ public class Application implements IApplication {
EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.CLEAN, null, false);
return IApplication.EXIT_RELAUNCH;
}
try {
NetworkUtil.applyProxyFromSystemProperties();
} catch (Throwable e) {
LOGGER.error("Failed to init proxy.", e);
}
StudioSSLContextProvider.setSSLSystemProperty();
HttpProxyUtil.initializeHttpProxy();
TalendProxySelector.getInstance();

View File

@@ -93,10 +93,10 @@ TalendForgeDialog.notValid=\u7121\u52B9
TalendForgeDialog.loginLabel=\u30ED\u30B0\u30A4\u30F3
TalendForgeDialog.linkToCreate=(\u307E\u305F\u306F\u65B0\u898F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210):
TalendForgeDialog.connectButton.v1=\u30DE\u30A4\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u63A5\u7D9A
TalendForgeDialog.MessageTitle=TalendForge
TalendForgeDialog.Message=TalendForge\u306B\u767B\u9332\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectSuccessMessage=TalendForge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectFailureMessage=TalendForge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093!
TalendForgeDialog.MessageTitle=Talend Forge
TalendForgeDialog.Message=Talend Forge\u306B\u767B\u9332\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectSuccessMessage=Talend Forge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectFailureMessage=Talend Forge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093!
TalendForgeDialog.ConnectExistingButton=\u65E2\u5B58\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u63A5\u7D9A
TalendForgeDialog.CreateNewButton=\u65B0\u898F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210
TalendForgeDialog.form.userName.hint=\u30E6\u30FC\u30B6\u30FC\u540D

View File

@@ -14,9 +14,13 @@ 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;
@@ -27,14 +31,20 @@ 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;
/**
@@ -73,6 +83,284 @@ 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) {
@@ -133,6 +421,33 @@ 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

@@ -0,0 +1,16 @@
/**
* 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

@@ -0,0 +1,386 @@
/**
* 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

@@ -0,0 +1,129 @@
/**
* 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

@@ -0,0 +1,63 @@
/**
* 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

@@ -0,0 +1,147 @@
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

@@ -0,0 +1,220 @@
/**
* 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,10 +112,6 @@ 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

@@ -23,7 +23,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -283,13 +282,7 @@ public class ImportBasicHandler extends AbstractImportExecutableHandler {
.getImportErrors()
.add(Messages.getString("ImportBasicHandler_LoadEMFResourceError", importItem.getPath().lastSegment(),
HandlerUtil.getValidItemRelativePath(manager, importItem.getPath())));
// 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()));
}
log.error(Messages.getString("ImportBasicHandler_ErrorCreateEmfResource") + " - " + HandlerUtil.getValidItemRelativePath(manager, importItem.getPath())); //$NON-NLS-1$
}
}
@@ -395,9 +388,6 @@ public class ImportBasicHandler extends AbstractImportExecutableHandler {
repObjectcache.initialize(curProcessType);
}
} else {
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(itemType)) {
itemType = ERepositoryObjectType.METADATA_TACOKIT_JDBC;
}
repObjectcache.initialize(itemType);
}
@@ -568,11 +558,6 @@ public class ImportBasicHandler extends AbstractImportExecutableHandler {
if (type1 == type2) {
return true;
}
List<ERepositoryObjectType> jdbcTacokitList = Arrays.asList(ERepositoryObjectType.METADATA_TACOKIT_JDBC,
ERepositoryObjectType.JDBC);
if (jdbcTacokitList.contains(type1) && jdbcTacokitList.contains(type2)) {
return true;
}
IGenericWizardService wizardService = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);

View File

@@ -12,10 +12,6 @@
// ============================================================================
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;
@@ -28,24 +24,13 @@ 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;
/**
@@ -106,7 +91,6 @@ public class ImportDependencyRelationsHelper {
checkedNodeList.forEach(checkedNode -> {
List<ItemImportNode> relatedImportNodes = findOutRelationsItemImportNodes(checkedNode, toSelectSet,
allImportItemNodesList);
findOutConnectionContextRelationItemImportNodes(checkedNode, toSelectSet, relatedImportNodes, allImportItemNodesList);
checkImportRelationDependency(relatedImportNodes, toSelectSet, allImportItemNodesList);
});
}
@@ -164,61 +148,6 @@ 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

@@ -34,7 +34,6 @@ 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;
@@ -283,7 +282,7 @@ public class ImportNodesBuilder {
}
private TypeImportNode findAndCreateParentTypeNode(ProjectImportNode projectNode, ERepositoryObjectType curType) {
if (curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC || RepositoryNodeManager.isSnowflake(curType)) {
if (curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC || curType == ERepositoryObjectType.SNOWFLAKE) {
curType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
ERepositoryObjectType parentParentType = ERepositoryObjectType.findParentType(curType);

View File

@@ -229,6 +229,10 @@ public class MDMWizard extends RepositoryWizard implements INewWizard {
connectionProperty.setId(nextId);
factory.create(connectionItem, propertiesWizardPage.getDestinationPath());
// feature 17159
if (tdqRepService != null) {
tdqRepService.fillMetadata(connectionItem);
}
} else {
connectionItem.getConnection().setLabel(connectionProperty.getDisplayName());
connectionItem.getConnection().setName(connectionProperty.getDisplayName());

View File

@@ -492,7 +492,7 @@ TalendForgeDialog.countryLabel=\u56FD:
TalendForgeDialog.link=(\u307E\u305F\u306F\u65E2\u5B58\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u63A5\u7D9A):
TalendForgeDialog.passwordLabel=\u30D1\u30B9\u30EF\u30FC\u30C9:
TalendForgeDialog.passwordAgainLabel=\u30D1\u30B9\u30EF\u30FC\u30C9(\u518D\u5165\u529B):
TalendForgeDialog.agreeButton=TalendForge\u306E\u5229\u7528\u898F\u7D04\u306B\u540C\u610F\u3059\u308B
TalendForgeDialog.agreeButton=Talend Forge\u306E\u5229\u7528\u898F\u7D04\u306B\u540C\u610F\u3059\u308B
TalendForgeDialog.improveButton=Talend\u306E\u6539\u5584\u306E\u305F\u3081\u306B\u533F\u540D\u3067\u4F7F\u7528\u72B6\u6CC1\u3092\u5171\u6709\u3059\u308B
TalendForgeDialog.readMore=(\u8A73\u7D30...)
TalendForgeDialog.createAccountButton=\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210
@@ -507,10 +507,10 @@ TalendForgeDialog.notValid=\u7121\u52B9
TalendForgeDialog.loginLabel=\u30ED\u30B0\u30A4\u30F3
TalendForgeDialog.linkToCreate=(\u307E\u305F\u306F\u65B0\u898F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210):
TalendForgeDialog.connectButton=\u63A5\u7D9A
TalendForgeDialog.MessageTitle=TalendForge
TalendForgeDialog.Message=TalendForge\u306B\u767B\u9332\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectSuccessMessage=TalendForge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectFailureMessage=TalendForge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093!
TalendForgeDialog.MessageTitle=Talend Forge
TalendForgeDialog.Message=Talend Forge\u306B\u767B\u9332\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectSuccessMessage=Talend Forge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u3057\u305F!
TalendForgeDialog.ConnectFailureMessage=Talend Forge\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093!
NewImportProjectWizard.windowTitle=\u30C7\u30E2\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u30A4\u30F3\u30DD\u30FC\u30C8...
LoginDialog.newProjectTitle=\u65B0\u898F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
LoginDialog.title={0}

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.toURI().toURL()},this.getClass().getClassLoader());
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.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.toURI().toURL()},this.getClass().getClassLoader());
MyURLClassLoader cl = new MyURLClassLoader(new URL[] {file.toURL()},this.getClass().getClassLoader());
Class[] classes = cl.getAssignableClasses(Driver.class);
for (Class classe : classes) {
generalJdbcClassNameText.add(classe.getName());

View File

@@ -389,7 +389,16 @@ public class DatabaseWizard extends CheckLastVersionRepositoryWizard implements
try {
dbService.dbWizardPerformFinish(connectionItem, databaseWizardPage.getForm(), isCreation(), pathToSave, new ArrayList<IMetadataTable>(),contextName);
boolean isNameModified = propertiesWizardPage.isNameModifiedByUser();
refreshInFinish(isNameModified);
if (isNameModified) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService service = GlobalServiceRegister.getDefault()
.getService(IDesignerCoreService.class);
if (service != null) {
service.refreshComponentView(connectionItem);
}
}
}
closeLockStrategy();
} catch (CoreException e) {
new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString("CommonWizard.persistenceException"), //$NON-NLS-1$
@@ -659,7 +668,16 @@ public class DatabaseWizard extends CheckLastVersionRepositoryWizard implements
}
// ~
refreshInFinish(isNameModified);
if (isNameModified) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService service = GlobalServiceRegister.getDefault().getService(
IDesignerCoreService.class);
if (service != null) {
service.refreshComponentView(connectionItem);
}
}
}
}
/**

View File

@@ -404,7 +404,9 @@ public class GenericSchemaWizard extends CheckLastVersionRepositoryWizard implem
updateConnectionItem();
// 0005170: Schema renamed - new name not pushed out to dependant jobs
boolean isModified = genericSchemaWizardPage0.isNameModifiedByUser();
refreshInFinish(isModified);
if (isModified) {
CoreRuntimePlugin.getInstance().getDesignerCoreService().refreshComponentView(connectionItem);
}
}
} catch (Exception e) {
String detailError = e.toString();

View File

@@ -1 +1 @@
demo.description=\u30C7\u30FC\u30BF\u7D71\u5408\u30C7\u30E2
demo.description=\u30C7\u30FC\u30BF\u30A4\u30F3\u30C6\u30B0\u30EC\u30FC\u30B7\u30E7\u30F3\u30C7\u30E2

View File

@@ -8,8 +8,7 @@ Eclipse-LazyStart: true
Bundle-ClassPath: .,
lib/commons-exec.jar
Bundle-Vendor: .Talend SA.
Import-Package: com.fasterxml.jackson.annotation,
org.osgi.framework;version="1.10.0",
Import-Package: org.osgi.framework;version="1.10.0",
org.talend.utils.json
Export-Package: org.talend.signon.util,
org.talend.signon.util.i18n,

View File

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

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