Compare commits
14 Commits
vdrokov_fi
...
temp/di-up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
307b7191e9 | ||
|
|
e1f6aad699 | ||
|
|
681dd59eb2 | ||
|
|
7a3c23cdb5 | ||
|
|
a6f4581b0a | ||
|
|
40e63f3c01 | ||
|
|
d54cddaedf | ||
|
|
41e2ef2d2d | ||
|
|
bccc406937 | ||
|
|
a9b3d20e06 | ||
|
|
47b5a7e251 | ||
|
|
e9b5fa3ba7 | ||
|
|
39a730cae4 | ||
|
|
d88d513e4e |
@@ -106,4 +106,6 @@ public interface ISAPConstant {
|
||||
public static final String PROP_DB_USERNAME = "db.username";//$NON-NLS-1$
|
||||
|
||||
public static final String PROP_DB_PASSWORD = "db.password";//$NON-NLS-1$
|
||||
|
||||
public static final String PROP_DB_ADDITIONAL_PROPERTIES = "db.additionalProperties";//$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -281,9 +281,7 @@ public final class MetadataToolHelper {
|
||||
}
|
||||
|
||||
public static boolean isAllowSpecificCharacters() {
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
return coreUIPluginNode
|
||||
.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
return CoreRuntimePlugin.getInstance().getProjectPreferenceManager().isAllowSpecificCharacters();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -443,6 +443,13 @@ public class RepositoryToComponentProperty {
|
||||
} else {
|
||||
return TalendQuoteUtils.addQuotes(connection.getValue(dbPassword, false));
|
||||
}
|
||||
} else if ("SAPHANA_PROPERTIES_STRING".equals(value)) { //$NON-NLS-1$
|
||||
String dbParameters = TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, connection);
|
||||
if (isContextMode(connection, dbParameters)) {
|
||||
return dbParameters;
|
||||
} else {
|
||||
return TalendQuoteUtils.addQuotes(dbParameters);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,6 @@ import org.apache.oro.text.regex.Perl5Compiler;
|
||||
import org.apache.oro.text.regex.Perl5Matcher;
|
||||
import org.apache.oro.text.regex.Perl5Substitution;
|
||||
import org.apache.oro.text.regex.Util;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
@@ -50,8 +48,7 @@ import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
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.IRepositoryPrefConstants;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.services.IGenericDBService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
@@ -617,8 +614,7 @@ public final class ContextParameterUtils {
|
||||
}
|
||||
|
||||
private static boolean isAllowSpecificCharacters() {
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
return coreUIPluginNode.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
return CoreRuntimePlugin.getInstance().getProjectPreferenceManager().isAllowSpecificCharacters();
|
||||
}
|
||||
|
||||
public static boolean isEmptyParameter(String source) {
|
||||
|
||||
@@ -418,6 +418,52 @@ public class NodeUtil {
|
||||
return conns;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC
|
||||
* <p>
|
||||
* The method searches for the incoming node connections of type
|
||||
* on a processing path and returns the first ones only
|
||||
* </p>
|
||||
*
|
||||
* @param node
|
||||
* @param type - node type to look for
|
||||
* @return
|
||||
*/
|
||||
public static List<? extends IConnection> getFirstIncomingLineConnectionsOfType(INode node, String type) {
|
||||
if (type == null)
|
||||
return new ArrayList<IConnection>();
|
||||
|
||||
Set<String> uniqueNamesDone = new HashSet<String>();
|
||||
List<? extends IConnection> allIncomingConnections = getFirstIncomingLineConnectionsOfType(node, uniqueNamesDone, type);
|
||||
|
||||
return allIncomingConnections;
|
||||
}
|
||||
|
||||
private static List<? extends IConnection> getFirstIncomingLineConnectionsOfType(INode node, Set<String> uniqueNamesDone, String type) {
|
||||
List<IConnection> conns = new ArrayList<IConnection>();
|
||||
|
||||
List<? extends IConnection> incomingConnections = node.getIncomingConnections();
|
||||
if (incomingConnections != null) {
|
||||
|
||||
for (int i = 0; i < incomingConnections.size(); i++) {
|
||||
|
||||
IConnection connection = incomingConnections.get(i);
|
||||
INode nextNode = connection.getSource();
|
||||
|
||||
if (!uniqueNamesDone.contains(nextNode.getUniqueName())) {
|
||||
uniqueNamesDone.add(nextNode.getUniqueName());
|
||||
|
||||
if (type.equals((String)nextNode.getElementParameter("COMPONENT_NAME").getValue())) {
|
||||
conns.add(connection);
|
||||
} else {
|
||||
conns.addAll(getFirstIncomingLineConnectionsOfType(nextNode, uniqueNamesDone, type)); // follow this way
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return conns;
|
||||
}
|
||||
|
||||
public static INode getFirstMergeNode(INode node) {
|
||||
INode mergeNode = null;
|
||||
for (IConnection connection : node.getOutgoingConnections()) {
|
||||
|
||||
@@ -126,6 +126,9 @@ public abstract class AbstractPropertyValueEvaluator implements PropertyValueEva
|
||||
}
|
||||
|
||||
if (GenericTypeUtils.isStringType(property)) {
|
||||
if (property.isFlag(Property.Flags.ENCRYPT)) {
|
||||
return TalendQuoteUtils.removeQuotes(stringValue);
|
||||
}
|
||||
return TalendQuoteUtils.removeQuotes(StringEscapeUtils.unescapeJava(stringValue));
|
||||
}
|
||||
return rawValue;
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.core.runtime.projectsetting;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ProjectScope;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
@@ -27,6 +28,7 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.repository.IRepositoryPrefConstants;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.documentation.ERepositoryActionName;
|
||||
@@ -195,7 +197,19 @@ public class ProjectPreferenceManager {
|
||||
// return qulifierPreference.getBoolean(key, false);
|
||||
return getPreferenceStore().getBoolean(key);
|
||||
}
|
||||
|
||||
|
||||
public boolean isAllowSpecificCharacters() {
|
||||
String value = getValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS);
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
return Boolean.valueOf(value);
|
||||
}
|
||||
return false; // Default value
|
||||
}
|
||||
|
||||
public void setAllowSpecificCharacters(boolean isAllow) {
|
||||
setValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, isAllow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the configurations.
|
||||
*/
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.preference;
|
||||
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.talend.core.model.repository.IRepositoryPrefConstants;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
|
||||
public class SpecificSettingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
||||
|
||||
public SpecificSettingPreferencePage() {
|
||||
setPreferenceStore(CoreUIPlugin.getDefault().getPreferenceStore());
|
||||
setDescription("Specific settings");
|
||||
noDefaultAndApplyButton();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -32,8 +32,6 @@ public class SpecificSettingPreferencePage extends FieldEditorPreferencePage imp
|
||||
*/
|
||||
@Override
|
||||
protected void createFieldEditors() {
|
||||
addField(new BooleanFieldEditor(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS,
|
||||
"Allow specific characters (UTF8,...) for columns of schemas", getFieldEditorParent()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ package org.talend.core.ui.preference.metadata;
|
||||
|
||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.talend.core.model.repository.IRepositoryPrefConstants;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
|
||||
@@ -27,8 +26,6 @@ public class MetadataPreferenceInitializer extends AbstractPreferenceInitializer
|
||||
public void initializeDefaultPreferences() {
|
||||
IPreferenceStore store = CoreUIPlugin.getDefault().getPreferenceStore();
|
||||
store.setDefault(ITalendCorePrefConstants.MAXIMUM_AMOUNT_OF_COLUMNS_FOR_XML, 500);
|
||||
store.setDefault(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-log4j-dependencies-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-build</artifactId>
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -50,6 +50,17 @@
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -66,6 +72,10 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-log4j-dependencies-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<!--add log4j dependency https://jira.talendforge.org/browse/TUP-31403 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -16,6 +16,7 @@
|
||||
<module>tacokit/pom.xml</module>
|
||||
<module>tcompv1/pom.xml</module>
|
||||
<module>surefire/pom.xml</module>
|
||||
<module>log4j/pom.xml</module>
|
||||
<module>zip/pom.xml</module>
|
||||
</modules>
|
||||
<properties>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<artifactId>studio-tacokit-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<tacokit.components.version>1.20.0</tacokit.components.version>
|
||||
<tacokit.components.version>1.21.0</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.activation-1.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-wsdl-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-wsdl-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.activation-api-1.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-6.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.annotation-api-1.3.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/stax2-api-4.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/neethi-3.1.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.ws.rs-api-2.1.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-core-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-xml-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxrs-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-rs-client-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-transports-http-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-soap-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-databinding-jaxb-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-features-clustering-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxws-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-simple-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-saml-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-addr-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-policy-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-security-3.3.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-core-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-xml-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxrs-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-rs-client-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-transports-http-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-soap-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-databinding-jaxb-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-features-clustering-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxws-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-simple-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-saml-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-addr-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-policy-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-security-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/javax.ws.rs-api-2.0-m10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.xml.bind-api-2.3.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlschema-core-2.2.5.jar"/>
|
||||
|
||||
@@ -8,22 +8,22 @@ Bundle-ClassPath: .,
|
||||
lib/neethi-3.1.1.jar,
|
||||
lib/stax2-api-4.2.1.jar,
|
||||
lib/javax.activation-1.2.0.jar,
|
||||
lib/cxf-core-3.3.7.jar,
|
||||
lib/cxf-rt-bindings-xml-3.3.7.jar,
|
||||
lib/cxf-rt-frontend-jaxrs-3.3.7.jar,
|
||||
lib/cxf-rt-rs-client-3.3.7.jar,
|
||||
lib/cxf-rt-transports-http-3.3.7.jar,
|
||||
lib/cxf-rt-wsdl-3.3.7.jar,
|
||||
lib/cxf-rt-bindings-soap-3.3.7.jar,
|
||||
lib/cxf-rt-databinding-jaxb-3.3.7.jar,
|
||||
lib/cxf-rt-features-clustering-3.3.7.jar,
|
||||
lib/cxf-rt-frontend-jaxws-3.3.7.jar,
|
||||
lib/cxf-rt-frontend-simple-3.3.7.jar,
|
||||
lib/cxf-rt-security-3.3.7.jar,
|
||||
lib/cxf-rt-security-saml-3.3.7.jar,
|
||||
lib/cxf-rt-ws-addr-3.3.7.jar,
|
||||
lib/cxf-rt-ws-policy-3.3.7.jar,
|
||||
lib/cxf-rt-ws-security-3.3.7.jar,
|
||||
lib/cxf-core-3.3.10.jar,
|
||||
lib/cxf-rt-bindings-xml-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-jaxrs-3.3.10.jar,
|
||||
lib/cxf-rt-rs-client-3.3.10.jar,
|
||||
lib/cxf-rt-transports-http-3.3.10.jar,
|
||||
lib/cxf-rt-wsdl-3.3.10.jar,
|
||||
lib/cxf-rt-bindings-soap-3.3.10.jar,
|
||||
lib/cxf-rt-databinding-jaxb-3.3.10.jar,
|
||||
lib/cxf-rt-features-clustering-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-jaxws-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-simple-3.3.10.jar,
|
||||
lib/cxf-rt-security-3.3.10.jar,
|
||||
lib/cxf-rt-security-saml-3.3.10.jar,
|
||||
lib/cxf-rt-ws-addr-3.3.10.jar,
|
||||
lib/cxf-rt-ws-policy-3.3.10.jar,
|
||||
lib/cxf-rt-ws-security-3.3.10.jar,
|
||||
lib/jakarta.ws.rs-api-2.1.6.jar,
|
||||
lib/jakarta.annotation-api-1.3.5.jar,
|
||||
lib/woodstox-core-6.2.1.jar,
|
||||
|
||||
@@ -21,82 +21,82 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-core</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-xml</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-client</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-wsdl</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-soap</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-features-clustering</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-simple</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-security</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-security-saml</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-addr</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-policy</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-security</artifactId>
|
||||
<version>3.3.7</version>
|
||||
<version>3.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
|
||||
@@ -540,9 +540,9 @@ public class ModulesNeededProvider {
|
||||
Property property = findRoutinesPropery(infor.getId(), infor.getName(), routines, type);
|
||||
if (property != null) {
|
||||
if (((RoutineItem) property.getItem()).isBuiltIn()) {
|
||||
systemRoutines.add(infor.getId());
|
||||
systemRoutines.add(property.getId());
|
||||
} else {
|
||||
userRoutines.add(infor.getId());
|
||||
userRoutines.add(property.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ public final class OtherConnectionContextUtils {
|
||||
DbSchema,
|
||||
DbUsername,
|
||||
DbPassword,
|
||||
DbParameters,
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -611,6 +612,10 @@ public final class OtherConnectionContextUtils {
|
||||
conn.getValue(TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_PASSWORD, conn), false),
|
||||
JavaTypesManager.PASSWORD);
|
||||
break;
|
||||
case DbParameters:
|
||||
ConnectionContextHelper.createParameters(varList, paramName,
|
||||
TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, conn));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@@ -722,6 +727,10 @@ public final class OtherConnectionContextUtils {
|
||||
TaggedValueHelper.setTaggedValue(sapConn, ISAPConstant.PROP_DB_PASSWORD,
|
||||
ContextParameterUtils.getNewScriptCode(sapBasicVarName, LANGUAGE));
|
||||
break;
|
||||
case DbParameters:
|
||||
TaggedValueHelper.setTaggedValue(sapConn, ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES,
|
||||
ContextParameterUtils.getNewScriptCode(sapBasicVarName, LANGUAGE));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@@ -768,11 +777,14 @@ public final class OtherConnectionContextUtils {
|
||||
TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_USERNAME, conn)));
|
||||
String dbPassword = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,
|
||||
conn.getValue(TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_PASSWORD, conn), false)));
|
||||
String dbParameters = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,
|
||||
TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, conn)));
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_HOST, dbHost);
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_PORT, dbPort);
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_SCHEMA, dbSchema);
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_USERNAME, dbUsername);
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_PASSWORD, conn.getValue(dbPassword, true));
|
||||
TaggedValueHelper.setTaggedValue(conn, ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, dbParameters);
|
||||
}
|
||||
|
||||
public static SAPConnection cloneOriginalValueSAPConnection(SAPConnection fileConn, ContextType contextType) {
|
||||
@@ -813,11 +825,14 @@ public final class OtherConnectionContextUtils {
|
||||
TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_USERNAME, fileConn));
|
||||
String dbPassword = ConnectionContextHelper.getOriginalValue(contextType,
|
||||
fileConn.getValue(TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_PASSWORD, fileConn), false));
|
||||
String dbParameters = ConnectionContextHelper.getOriginalValue(contextType,
|
||||
TaggedValueHelper.getValueString(ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, fileConn));
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_HOST, dbHost);
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_PORT, dbPort);
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_SCHEMA, dbSchema);
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_USERNAME, dbUsername);
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_PASSWORD, dbPassword);
|
||||
TaggedValueHelper.setTaggedValue(cloneConn, ISAPConstant.PROP_DB_ADDITIONAL_PROPERTIES, dbParameters);
|
||||
|
||||
ConnectionContextHelper.cloneConnectionProperties(fileConn, cloneConn);
|
||||
|
||||
|
||||
@@ -198,6 +198,9 @@ public final class TaggedValueHelper {
|
||||
|
||||
public static final String IS_SQL_ENGIN_BEFORE_CHECK = "false"; //$NON-NLS-1$
|
||||
|
||||
// TDQ-19030 compare null values in Redundancy Analysis
|
||||
public static final String IS_IGNORE_NULL = "Ignore Null"; //$NON-NLS-1$
|
||||
|
||||
private TaggedValueHelper() {
|
||||
}
|
||||
|
||||
|
||||
@@ -422,9 +422,8 @@ public class DatabaseTableForm extends AbstractForm {
|
||||
|
||||
metadataEditor.setMetadataTable(metadataTable);
|
||||
|
||||
Boolean flag = CoreUIPlugin.getDefault().getPreferenceStore()
|
||||
.getBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS);
|
||||
if (!flag.booleanValue()) {
|
||||
boolean flag = CoreRuntimePlugin.getInstance().getProjectPreferenceManager().isAllowSpecificCharacters();
|
||||
if (!flag) {
|
||||
List<MetadataColumn> list = metadataEditor.getMetadataColumnList();
|
||||
for (MetadataColumn column : list) {
|
||||
if (!isCnorEn(column.getLabel())) {
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
import org.talend.core.model.repository.IRepositoryPrefConstants;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.cwm.helper.TaggedValueHelper;
|
||||
import org.talend.daikon.avro.AvroUtils;
|
||||
import org.talend.daikon.avro.SchemaConstants;
|
||||
@@ -237,8 +238,7 @@ public class MetadataToolAvroHelperTest {
|
||||
metadataTable.setSourceName("table1");
|
||||
Schema avroSchema = new Schema.Parser().parse((String) schemaObj);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
for (Schema.Field field : avroSchema.getFields()) {
|
||||
MetadataColumn metadataColumn = MetadataToolAvroHelper.convertFromAvro(field, metadataTable);
|
||||
metadataTable.getColumns().add(metadataColumn);
|
||||
@@ -321,7 +321,7 @@ public class MetadataToolAvroHelperTest {
|
||||
}
|
||||
}
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();
|
||||
metadataTable.setId("123456789");
|
||||
metadataTable.setName("table1");
|
||||
@@ -356,8 +356,7 @@ public class MetadataToolAvroHelperTest {
|
||||
metadataTable.setSourceName("table1");
|
||||
Schema avroSchema = new Schema.Parser().parse((String) schemaObj);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
for (Schema.Field field : avroSchema.getFields()) {
|
||||
MetadataColumn metadataColumn = MetadataToolAvroHelper.convertFromAvro(field, metadataTable);
|
||||
metadataTable.getColumns().add(metadataColumn);
|
||||
@@ -366,7 +365,7 @@ public class MetadataToolAvroHelperTest {
|
||||
assertTrue(metadataTable.getColumns().get(0).getLabel().equals("主鍵"));
|
||||
assertTrue(metadataTable.getColumns().get(1).getLabel().equals("名前"));
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();
|
||||
metadataTable.setId("123456789");
|
||||
metadataTable.setName("table1");
|
||||
@@ -453,8 +452,7 @@ public class MetadataToolAvroHelperTest {
|
||||
creatMetadataColumn.setTalendType("id_String");
|
||||
metadataTable.getColumns().add(creatMetadataColumn);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
org.apache.avro.Schema schema =MetadataToolAvroHelper.convertToAvro(metadataTable);
|
||||
String s = "{\"type\":\"record\",\"name\":\"table1\",\"fields\":["
|
||||
+ "{\"name\":\"_long\",\"type\":[\"string\",\"null\"],\"AVRO_TECHNICAL_KEY\":\"long\",\"di.column.talendType\":\"id_String\",\"talend.field.pattern\":\"\",\"di.table.label\":\"_long\",\"talend.field.precision\":\"0\",\"di.table.comment\":\"\",\"di.column.id\":\"111111\",\"talend.field.dbColumnName\":\"long\",\"di.column.isNullable\":\"true\",\"talend.field.length\":\"0\",\"di.column.relationshipType\":\"\",\"di.column.originalLength\":\"0\",\"di.column.relatedEntity\":\"\"},"
|
||||
@@ -467,7 +465,7 @@ public class MetadataToolAvroHelperTest {
|
||||
+ "\"di.table.comment\":\"\",\"di.table.name\":\"table1\",\"di.table.label\":\"table1\"}";
|
||||
assertTrue(schema.toString().equals(s));
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
schema =MetadataToolAvroHelper.convertToAvro(metadataTable);
|
||||
s = "{\"type\":\"record\",\"name\":\"table1\",\"fields\":["
|
||||
+ "{\"name\":\"_long\",\"type\":[\"string\",\"null\"],\"AVRO_TECHNICAL_KEY\":\"long\",\"di.column.talendType\":\"id_String\",\"talend.field.pattern\":\"\",\"di.table.label\":\"_long\",\"talend.field.precision\":\"0\",\"di.table.comment\":\"\",\"di.column.id\":\"111111\",\"talend.field.dbColumnName\":\"long\",\"di.column.isNullable\":\"true\",\"talend.field.length\":\"0\",\"di.column.relationshipType\":\"\",\"di.column.originalLength\":\"0\",\"di.column.relatedEntity\":\"\"},"
|
||||
|
||||
@@ -241,8 +241,7 @@ public class MetadataToolHelperTest {
|
||||
*/
|
||||
@Test
|
||||
public void testValidateColumnName() {
|
||||
IEclipsePreferences preferences = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
preferences.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
|
||||
String columnName = MetadataToolHelper.validateColumnName("public", 0);
|
||||
assertEquals(columnName, "Column0");
|
||||
@@ -274,7 +273,7 @@ public class MetadataToolHelperTest {
|
||||
columnName = MetadataToolHelper.validateColumnName("你好", 0);
|
||||
assertEquals("Column0", columnName);
|
||||
|
||||
preferences.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
|
||||
columnName = MetadataToolHelper.validateColumnName("你好", 0);
|
||||
assertEquals("你好", columnName);
|
||||
@@ -288,8 +287,7 @@ public class MetadataToolHelperTest {
|
||||
*/
|
||||
@Test
|
||||
public void testValidateTableName() {
|
||||
IEclipsePreferences preferences = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
preferences.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
|
||||
String tableName = "public";
|
||||
tableName = MetadataToolHelper.validateTableName(tableName);
|
||||
@@ -323,7 +321,7 @@ public class MetadataToolHelperTest {
|
||||
tableName = MetadataToolHelper.validateTableName(tableName);
|
||||
assertEquals(tableName, "t_ht01______2017");
|
||||
|
||||
preferences.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
|
||||
tableName = "t_ht01_处理日期_2017";
|
||||
tableName = MetadataToolHelper.validateTableName(tableName);
|
||||
@@ -647,8 +645,7 @@ public class MetadataToolHelperTest {
|
||||
creatMetadataColumn.getTaggedValue().add(tv);
|
||||
inputTable.getColumns().add(creatMetadataColumn);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
IMetadataTable targetTable = MetadataToolHelper.convert(inputTable);
|
||||
assertTrue(targetTable.getListColumns().get(0).getLabel().equals("_long"));
|
||||
assertTrue(targetTable.getListColumns().get(0).getOriginalDbColumnName().equals("long"));
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.repository.IRepositoryPrefConstants;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
@@ -104,8 +105,7 @@ public class ContextParameterUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testGetVariableFromCode4String() {
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode(""));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("abc"));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("123"));
|
||||
@@ -126,7 +126,7 @@ public class ContextParameterUtilsTest {
|
||||
Assert.assertEquals("Română", ContextParameterUtils.getVariableFromCode("context.Română"));
|
||||
Assert.assertEquals("русский", ContextParameterUtils.getVariableFromCode("context.русский"));
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.汉语"));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.日本語"));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.Ελληνική"));
|
||||
@@ -138,8 +138,7 @@ public class ContextParameterUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testGetVariableFromCode4Context() {
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
String var = ContextParameterUtils.getVariableFromCode("context.abc");
|
||||
Assert.assertEquals("abc", var);
|
||||
|
||||
@@ -275,7 +274,7 @@ public class ContextParameterUtilsTest {
|
||||
var = ContextParameterUtils.getVariableFromCode("context.русский-123");
|
||||
Assert.assertEquals("русский", var);
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.マイSQL"));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.汉语"));
|
||||
Assert.assertNull(ContextParameterUtils.getVariableFromCode("context.Ελληνική"));
|
||||
@@ -311,8 +310,7 @@ public class ContextParameterUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testIsValidParameterName() {
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
assertTrue(ContextParameterUtils.isValidParameterName("abc"));
|
||||
assertTrue(ContextParameterUtils.isValidParameterName("abc123"));
|
||||
assertTrue(ContextParameterUtils.isValidParameterName("abc_123"));
|
||||
@@ -330,7 +328,7 @@ public class ContextParameterUtilsTest {
|
||||
assertTrue(ContextParameterUtils.isValidParameterName("Română"));
|
||||
assertTrue(ContextParameterUtils.isValidParameterName("русский"));
|
||||
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(false);
|
||||
assertFalse(ContextParameterUtils.isValidParameterName("中文"));
|
||||
assertFalse(ContextParameterUtils.isValidParameterName("日本語"));
|
||||
assertFalse(ContextParameterUtils.isValidParameterName("Ελληνική"));
|
||||
|
||||
@@ -317,8 +317,7 @@ public class ConvertionHelperTest {
|
||||
newColumn.getAdditionalField().put("AVRO_TECHNICAL_KEY", "TEST1");
|
||||
source.getListColumns().add(newColumn);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
org.talend.core.model.metadata.builder.connection.MetadataTable metadataTable = ConvertionHelper.convert(source);
|
||||
assertTrue(metadataTable.getColumns().get(0).getLabel().equals("_long"));
|
||||
assertTrue(metadataTable.getColumns().get(0).getName().equals("long"));
|
||||
@@ -466,8 +465,7 @@ public class ConvertionHelperTest {
|
||||
creatMetadataColumn.getTaggedValue().add(tv);
|
||||
inputTable.getColumns().add(creatMetadataColumn);
|
||||
|
||||
IEclipsePreferences coreUIPluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
|
||||
coreUIPluginNode.putBoolean(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);
|
||||
CoreRuntimePlugin.getInstance().getProjectPreferenceManager().setAllowSpecificCharacters(true);
|
||||
IMetadataTable targetTable = MetadataToolHelper.convert(inputTable);
|
||||
assertTrue(targetTable.getListColumns().get(0).getLabel().equals("_long"));
|
||||
assertTrue(targetTable.getListColumns().get(0).getOriginalDbColumnName().equals("long"));
|
||||
|
||||
Reference in New Issue
Block a user