Compare commits
1 Commits
cmeng/stig
...
cmeng/stig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c1d87c57b |
@@ -5,7 +5,7 @@
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<requires>
|
||||
<import plugin="org.bouncycastle.bcprov" version="1.70.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.bouncycastle.bcprov" version="1.69.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>
|
||||
|
||||
@@ -52,10 +52,6 @@ public final class CommonExceptionHandler {
|
||||
log.log(Level.WARN, message);
|
||||
}
|
||||
|
||||
public static void error(String message) {
|
||||
log.log(Level.ERROR, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return priority corresponding to the exception implementation.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.utils.network;
|
||||
|
||||
public interface ITalendNexusPrefConstants {
|
||||
|
||||
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
|
||||
}
|
||||
@@ -55,11 +55,6 @@ public class NetworkUtil {
|
||||
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
|
||||
|
||||
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
* see ITalendCorePrefConstants.PERFORMANCE_TAC_READ_TIMEOUT
|
||||
*/
|
||||
private static final String PERFORMANCE_TAC_READ_TIMEOUT = "PERFORMANCE_TAC_READ_TIMEOUT"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROP_DISABLEDSCHEMES_USE_DEFAULT = "talend.studio.jdk.http.auth.tunneling.disabledSchemes.useDefault";
|
||||
|
||||
@@ -154,10 +149,10 @@ public class NetworkUtil {
|
||||
}
|
||||
|
||||
public static int getNexusTimeout() {
|
||||
int timeout = Integer.getInteger("nexus.timeout.min", DEFAULT_NEXUS_TIMEOUT);
|
||||
int timeout = DEFAULT_NEXUS_TIMEOUT;
|
||||
try {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
|
||||
timeout = Math.max(timeout, node.getInt(PERFORMANCE_TAC_READ_TIMEOUT, 0) * 1000);
|
||||
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
@@ -88,8 +88,6 @@ public class EclipseCommandLine {
|
||||
static public final String TALEND_CONTINUE_LOGON = "-talendContinueLogon";
|
||||
|
||||
static public final String TALEND_CONTINUE_UPDATE = "-talendContinueUpdate";
|
||||
|
||||
static public final String TALEND_CLEAN_M2 = "-talendCleanM2";
|
||||
|
||||
static public final String TALEND_CLEAN_UNINSTALLED_BUNDLES = "-talendCleanUninstalledBundles";
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.talend.libraries.apache,
|
||||
org.eclipse.osgi.services,
|
||||
org.eclipse.ui.navigator,
|
||||
org.eclipse.e4.ui.css.swt.theme,
|
||||
org.talend.libraries.jackson
|
||||
Export-Package: org.talend.core.repository,
|
||||
org.talend.core.repository.constants,
|
||||
|
||||
@@ -39,18 +39,6 @@ public final class Constant {
|
||||
*/
|
||||
public static final String ITEM_EVENT_PROPERTY_KEY = "item"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
|
||||
* cloudVersion string.
|
||||
*/
|
||||
public static final String VERSION_EVENT_CLOUD_KEY = "cloudVersion"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to an item (REPOSITORY_ITEM_EVENT_PREFIX). The value is the
|
||||
* cloudName string.
|
||||
*/
|
||||
public static final String VERSION_EVENT_CLOUD_NAME = "cloudName"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
@@ -74,9 +62,4 @@ public final class Constant {
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_PROPERTY_KEY = "project"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* suffix used when issuing an event on the OSGI event bus when published to cloud.
|
||||
*/
|
||||
public static final String CLOUD_PUBLISH_EVENT_SUFFIX = "cloud"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -1,280 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.repository.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Level;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SQLPatternItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.SignatureStatus;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.TOSProdNameEnum;
|
||||
import org.talend.core.pendo.PendoItemSignatureUtil.ValueEnum;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.properties.PendoSignLogonProperties;
|
||||
import org.talend.utils.migration.MigrationTokenUtil;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoItemSignatureManager {
|
||||
|
||||
private PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
|
||||
|
||||
private static PendoItemSignatureManager manager;
|
||||
|
||||
private static boolean isTrackAvailable;
|
||||
|
||||
static {
|
||||
manager = new PendoItemSignatureManager();
|
||||
try {
|
||||
isTrackAvailable = PluginChecker.isTIS() && PendoTrackSender.getInstance().isTrackSendAvailable();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
}
|
||||
|
||||
private PendoItemSignatureManager() {
|
||||
}
|
||||
|
||||
public static PendoItemSignatureManager getInstance() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
private Set<String> signByLoginMigrationItems = new HashSet<String>();
|
||||
|
||||
public void countItemSignByMigration(String file) {
|
||||
if (!isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
|
||||
signByLoginMigrationItems.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
public void collectProperties() {
|
||||
ICoreService coreService = ICoreService.get();
|
||||
if (coreService == null || !isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
|
||||
|
||||
String seperator = "@";
|
||||
Map<String, Integer> tosUnsignItemMap = new HashMap<String, Integer>();
|
||||
Map<String, Integer> invalidItemVersionMap = new HashMap<String, Integer>();
|
||||
Set<String> checkedItem = new HashSet<String>();
|
||||
ProxyRepositoryFactory proxyRepositoryFactory = ProxyRepositoryFactory.getInstance();
|
||||
ERepositoryObjectType[] types = (ERepositoryObjectType[]) ERepositoryObjectType.values();
|
||||
for (ERepositoryObjectType type : types) {
|
||||
List<IRepositoryViewObject> allObjectList = proxyRepositoryFactory.getAll(type);
|
||||
for (IRepositoryViewObject repositoryObject : allObjectList) {
|
||||
Property property = repositoryObject.getProperty();
|
||||
if (property == null || property.eResource() == null) {
|
||||
continue;
|
||||
}
|
||||
String itemKey = repositoryObject.getRepositoryObjectType() + seperator + property.getId() + seperator
|
||||
+ property.getVersion();
|
||||
if (isBuiltInItem(repositoryObject) || checkedItem.contains(itemKey)) {
|
||||
continue;
|
||||
}
|
||||
checkedItem.add(itemKey);
|
||||
Integer verifyResult = null;
|
||||
try {
|
||||
verifyResult = coreService.getSignatureVerifyResult(property, null, false);
|
||||
if (verifyResult != null) {
|
||||
switch (verifyResult) {
|
||||
case SignatureStatus.V_VALID:
|
||||
itemSignProperties.setValidItems(itemSignProperties.getValidItems() + 1);
|
||||
break;
|
||||
case SignatureStatus.V_UNSIGNED:
|
||||
String itemProductName = PendoItemSignatureUtil
|
||||
.getItemProductName(property);
|
||||
if (StringUtils.isNotBlank(itemProductName)) {
|
||||
String tosCategory = TOSProdNameEnum.getTOSCategoryByProdName(itemProductName);
|
||||
if (StringUtils.isBlank(tosCategory)) {
|
||||
itemSignProperties.setUnsignEEItems(itemSignProperties.getUnsignEEItems() + 1);
|
||||
} else {
|
||||
if (tosUnsignItemMap.get(tosCategory) == null) {
|
||||
tosUnsignItemMap.put(tosCategory, 0);
|
||||
}
|
||||
tosUnsignItemMap.put(tosCategory, tosUnsignItemMap.get(tosCategory) + 1);
|
||||
}
|
||||
}
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
break;
|
||||
default:
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
if (verifyResult == null) {
|
||||
// exception during verify
|
||||
addInvalidItemVersion(property, invalidItemVersionMap);
|
||||
itemSignProperties.setInvalidSignItems(itemSignProperties.getInvalidSignItems() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
itemSignProperties.setInvalidItemSourceVersion(getSortInvalidItems(invalidItemVersionMap));
|
||||
itemSignProperties.setUnsignSEItems(getSortTOSUnsignItems(tosUnsignItemMap));
|
||||
|
||||
itemSignProperties.setStudioVersion(PendoItemSignatureUtil.getStudioVersion());
|
||||
if (coreService.isInValidGP()) {
|
||||
itemSignProperties.setGracePeriod(ValueEnum.YES.getDisplayValue());
|
||||
} else {
|
||||
itemSignProperties.setGracePeriod(ValueEnum.NO.getDisplayValue());
|
||||
}
|
||||
String prodDate = PendoItemSignatureUtil.formatDate(System.getProperty(PendoItemSignatureUtil.PROD_DATE_ID),
|
||||
"yyyy-MM-dd");
|
||||
itemSignProperties.setInstallDate(prodDate);
|
||||
String projectCreateDate = PendoItemSignatureUtil.getCurrentProjectCreateDate();
|
||||
itemSignProperties.setProjectCreateDate(PendoItemSignatureUtil.formatDate(projectCreateDate, "yyyy-MM-dd"));
|
||||
|
||||
String value = System.getProperty(PendoItemSignatureUtil.MIGRATION_TOKEN_KEY);
|
||||
Map<String, Date> tokenTime = MigrationTokenUtil.getMigrationTokenTime(value);
|
||||
if (tokenTime == null || tokenTime.isEmpty()) {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.NOT_APPLICATE.getDisplayValue());
|
||||
} else {
|
||||
String customer = coreService.getLicenseCustomer();
|
||||
Date tokenDate = tokenTime.get(customer);
|
||||
Date currentDate = new Date();
|
||||
if (tokenDate != null && tokenDate.after(currentDate)) {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.YES.getDisplayValue());
|
||||
} else {
|
||||
itemSignProperties.setValidMigrationToken(ValueEnum.NO.getDisplayValue());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void addInvalidItemVersion(Property property, Map<String, Integer> invalidItemVersionMap) {
|
||||
String itemProductVersion = PendoItemSignatureUtil.getItemProductVersion(property);
|
||||
if (StringUtils.isNotBlank(itemProductVersion)) {
|
||||
if (invalidItemVersionMap.get(itemProductVersion) == null) {
|
||||
invalidItemVersionMap.put(itemProductVersion, 0);
|
||||
}
|
||||
invalidItemVersionMap.put(itemProductVersion, invalidItemVersionMap.get(itemProductVersion) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isBuiltInItem(IRepositoryViewObject repositoryObject) {
|
||||
if (repositoryObject.getProperty().getItem() instanceof SQLPatternItem) {
|
||||
SQLPatternItem sqlPatternItem = (SQLPatternItem) repositoryObject.getProperty().getItem();
|
||||
if (sqlPatternItem.isSystem()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (repositoryObject.getProperty().getItem() instanceof RoutineItem) {
|
||||
RoutineItem routineItem = (RoutineItem) repositoryObject.getProperty().getItem();
|
||||
if (routineItem.isBuiltIn()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String getSortTOSUnsignItems(Map<String, Integer> tosUnsignItemMap) {
|
||||
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(tosUnsignItemMap.entrySet());
|
||||
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>() {
|
||||
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
|
||||
List<TOSProdNameEnum> categoryList = Arrays.asList(TOSProdNameEnum.values());
|
||||
TOSProdNameEnum category1 = TOSProdNameEnum.valueOf(o1.getKey());
|
||||
TOSProdNameEnum category2 = TOSProdNameEnum.valueOf(o2.getKey());
|
||||
return categoryList.indexOf(category1) - categoryList.indexOf(category2);
|
||||
}
|
||||
});
|
||||
Map<String, Integer> tosUnsignMap = new LinkedHashMap<String, Integer>();
|
||||
resultMapList.forEach(entry -> {
|
||||
tosUnsignMap.put(entry.getKey(), entry.getValue());
|
||||
});
|
||||
return PendoTrackDataUtil.convertEntityJsonString(tosUnsignMap);
|
||||
}
|
||||
|
||||
private String getSortInvalidItems(Map<String, Integer> invalidItemVersionMap) {
|
||||
List<Map.Entry<String, Integer>> resultMapList = new ArrayList<Map.Entry<String, Integer>>(
|
||||
invalidItemVersionMap.entrySet());
|
||||
Collections.sort(resultMapList, new Comparator<Map.Entry<String, Integer>>(){
|
||||
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
|
||||
return o1.getKey().compareTo(o2.getKey());
|
||||
}
|
||||
|
||||
});
|
||||
Map<String, Integer> invalidMap = new LinkedHashMap<String, Integer>();
|
||||
resultMapList.forEach(entry -> {
|
||||
invalidMap.put(entry.getKey(), entry.getValue());
|
||||
});
|
||||
return PendoTrackDataUtil.convertEntityJsonString(invalidMap);
|
||||
}
|
||||
|
||||
public void sendTrackToPendo() {
|
||||
if (!isTrackAvailable) {
|
||||
return;
|
||||
}
|
||||
Job job = new Job("send pendo track") {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
collectProperties();
|
||||
PendoTrackSender.getInstance().sendTrackData(TrackEvent.ITEM_SIGNATURE, itemSignProperties);
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
job.setUser(false);
|
||||
job.setPriority(Job.INTERACTIVE);
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
@@ -93,12 +94,12 @@ import org.talend.core.context.CommandLineContext;
|
||||
import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
import org.talend.core.exception.TalendInternalPersistenceException;
|
||||
import org.talend.core.hadoop.BigDataBasicUtil;
|
||||
import org.talend.core.hadoop.IHadoopDistributionService;
|
||||
import org.talend.core.model.components.IComponentsService;
|
||||
import org.talend.core.model.general.ILibrariesService;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.migration.IMigrationToolService;
|
||||
@@ -2210,9 +2211,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
// need to set m2
|
||||
LoginTaskRegistryReader loginTaskRegistryReader = new LoginTaskRegistryReader();
|
||||
ILoginTask[] allLoginTasks = loginTaskRegistryReader.getAllCommandlineTaskListInstance();
|
||||
@@ -2280,6 +2278,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
// for new added mapping file, sync to project mapping folder
|
||||
MetadataTalendType.syncNewMappingFileToProject();
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
@@ -2319,7 +2325,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (monitor != null && monitor.isCanceled()) {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
}
|
||||
PendoItemSignatureManager.getInstance().sendTrackToPendo();
|
||||
|
||||
boolean isCommandLineLocalRefProject = false;
|
||||
CommandLineContext commandLineContext = (CommandLineContext) CoreRuntimePlugin.getInstance().getContext()
|
||||
@@ -2358,6 +2363,17 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
TimeMeasurePerformance.step("logOnProject", "sync log4j"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
try {
|
||||
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
|
||||
if (url != null) {
|
||||
// set the project mappings url
|
||||
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
|
||||
}
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
ITDQRepositoryService tdqRepositoryService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITDQRepositoryService.class);
|
||||
@@ -2409,18 +2425,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void initDynamicDistribution(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (BigDataBasicUtil.isDynamicDistributionLoaded(monitor)) {
|
||||
BigDataBasicUtil.reloadAllDynamicDistributions(monitor);
|
||||
} else {
|
||||
BigDataBasicUtil.loadDynamicDistribution(monitor);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
// to fix the ops4j and m2e.core maven handler conflict issue TUP-31484
|
||||
private void unregisterM2EServiceBeforeLogon() {
|
||||
|
||||
@@ -15,10 +15,6 @@ package org.talend.core.repository.ui.view;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.e4.ui.css.swt.theme.ITheme;
|
||||
import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
|
||||
import org.eclipse.e4.ui.css.swt.theme.IThemeManager;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.viewers.IColorProvider;
|
||||
@@ -27,11 +23,6 @@ import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.runtime.model.repository.ECDCStatus;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
@@ -58,7 +49,6 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.RepositoryContentManager;
|
||||
import org.talend.core.model.repository.RepositoryNodeProviderRegistryReader;
|
||||
import org.talend.core.model.repository.RepositoryViewObject;
|
||||
import org.talend.core.repository.CoreRepositoryPlugin;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -97,8 +87,6 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
|
||||
private static final Color MERGED_REFERENCED_ITEMS_COLOR = new Color(null, 120, 120, 120);
|
||||
|
||||
private static final Color WHITE = new Color(null, 255, 255, 255);
|
||||
|
||||
private IRepositoryView view;
|
||||
|
||||
private static boolean refreshProperty = true;
|
||||
@@ -492,21 +480,6 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
@Override
|
||||
public Color getForeground(Object element) {
|
||||
RepositoryNode node = (RepositoryNode) element;
|
||||
try {
|
||||
Bundle bundle = Platform.getBundle(CoreRepositoryPlugin.PLUGIN_ID);
|
||||
BundleContext context = bundle.getBundleContext();
|
||||
ServiceReference ref = context.getServiceReference(IThemeManager.class.getName());
|
||||
IThemeManager manager = (IThemeManager) context.getService(ref);
|
||||
IThemeEngine engine = manager
|
||||
.getEngineForDisplay(PlatformUI.getWorkbench().getActiveWorkbenchWindow() == null ? Display.getCurrent()
|
||||
: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getDisplay());
|
||||
ITheme curTheme = engine.getActiveTheme();
|
||||
if (curTheme.getId().contains("dark")) {
|
||||
return null;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
switch (node.getType()) {
|
||||
case REFERENCED_PROJECT:
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.RoutinesJarItem;
|
||||
import org.talend.core.model.repository.AbstractRepositoryContentHandler;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class AbstractResourceRepositoryContentHandler extends AbstractRepositoryContentHandler {
|
||||
|
||||
@@ -84,10 +83,6 @@ public abstract class AbstractResourceRepositoryContentHandler extends AbstractR
|
||||
}
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
protected void copyScreenshotFile(Item originalItem, Item newItem) throws IOException {
|
||||
getXmiResourceManager().copyScreenshotFile(originalItem, newItem);
|
||||
}
|
||||
|
||||
protected XmiResourceManager getXmiResourceManager() {
|
||||
if (null == xmiResourceManager) {
|
||||
|
||||
@@ -147,23 +147,27 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public Property loadProperty(IResource iResource) {
|
||||
URI propertyUri = URIHelper.convert(iResource.getFullPath());
|
||||
return loadProperty(propertyUri);
|
||||
}
|
||||
|
||||
public Property loadProperty(URI propertyUri) {
|
||||
final Map<Object, Object> oldLoadOptions = new HashMap<Object, Object>(resourceSet.getLoadOptions());
|
||||
try {
|
||||
return doLoadProperty(iResource);
|
||||
return doLoadProperty(propertyUri);
|
||||
} finally {
|
||||
resourceSet.getLoadOptions().clear();
|
||||
resourceSet.getLoadOptions().putAll(oldLoadOptions);
|
||||
}
|
||||
}
|
||||
|
||||
private Property doLoadProperty(IResource iResource) {
|
||||
private Property doLoadProperty(URI propertyUri) {
|
||||
|
||||
Property property = null;
|
||||
// force unload old version, or the UI won't be synchronized all the time to the current file.
|
||||
// this is only if a user update itself a .item or .properties, or for SVN repository.
|
||||
//
|
||||
URIConverter theURIConverter = resourceSet.getURIConverter();
|
||||
URI propertyUri = URIHelper.convert(iResource.getFullPath());
|
||||
URI itemResourceURI = theURIConverter.normalize(getItemResourceURI(propertyUri));
|
||||
URI screenshotResourceURI = theURIConverter.normalize(getScreenshotResourceURI(itemResourceURI));
|
||||
List<Resource> resources = resourceSet.getResources();
|
||||
@@ -349,7 +353,7 @@ public class XmiResourceManager {
|
||||
return itemResource;
|
||||
}
|
||||
|
||||
public Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
|
||||
private Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
|
||||
Resource itemResource;
|
||||
itemResource = getResourceSet().getResource(itemResourceURI, false);
|
||||
if (itemResource != null) {
|
||||
@@ -655,6 +659,10 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public void saveResource(Resource resource) throws PersistenceException {
|
||||
saveResource(resource, null);
|
||||
}
|
||||
|
||||
public void saveResource(Resource resource, OutputStream out) throws PersistenceException {
|
||||
try {
|
||||
if (resource != null) {
|
||||
Object objectByType = EcoreUtil.getObjectByType(resource.getContents(), PropertiesPackage.eINSTANCE.getProject());
|
||||
@@ -672,7 +680,7 @@ public class XmiResourceManager {
|
||||
} catch (Throwable e) {
|
||||
org.talend.commons.exception.ExceptionHandler.process(e);
|
||||
}
|
||||
EmfHelper.saveResource(resource);
|
||||
EmfHelper.saveResource(resource, out);
|
||||
}
|
||||
|
||||
// MOD mzhao 2010-11-22, suppport TDQ item file extensions.(.ana, .rep, etc), this function do not work items that
|
||||
|
||||
@@ -52,7 +52,6 @@ Export-Package: org.talend.analysistask,
|
||||
org.talend.core.model.xml,
|
||||
org.talend.core.nexus,
|
||||
org.talend.core.pendo,
|
||||
org.talend.core.pendo.mapper,
|
||||
org.talend.core.pendo.properties,
|
||||
org.talend.core.prefs,
|
||||
org.talend.core.repository,
|
||||
|
||||
@@ -1,238 +0,0 @@
|
||||
{
|
||||
"mapping_AS400.xml": {
|
||||
"28fe6b6c94e4e486d431873ba556c1c18ae09140": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"3d4845af057220e02773029683a0fd99dee489e5": "a9861e98b581dfdafa7839238710bd930989960a",
|
||||
"458d597928478f43c94098dfe47d9bb8d07e89e2": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"76a4aa354d986ed5682797337817a8ddbb80ae89": "d568bf814d7b27fc7c63cbd07ea6b4a3b0ad3ff8"
|
||||
},
|
||||
"mapping_Access.xml": {
|
||||
"55d314ed9708263bfcec193abb57a1e25806626e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"718db25f8e86d6b61284a4ffdc1fd19faffb98a9": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_AmazonAurora.xml": {
|
||||
"a93c809bdf8e5df8095580e3f23b29658e044302": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"ba16c203a8a993e13ebab0da5cccb7a5e1c01e56": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_BigQuery.xml": {
|
||||
"db723e5b4a38bbc8316593be33ab9d74f57776e6": "e1770847f656589810753c19d420228326462f34",
|
||||
"e12df204d9f5081971d03c64b43de2456557e02e": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e9c02d3e9bc3a3649fd33803353e61db6fcd2ea8": "01749151dcc171ebb6457ba872ee352d58a1dfd4"
|
||||
},
|
||||
"mapping_Cassandra.xml": {
|
||||
"20ed188f8824c14852304920cf82ca7119eb1be0": "ab7b23e6c94946ca2358cc0cfd82c4d77a4c5839",
|
||||
"692353c474569bafd44854b7f7343929beddee83": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e42bdadd0009e7595773edcc1652f181a8fdf151": "76ed27054255165c23d8c0c8db081a41a50430c9",
|
||||
"ff005c2bfc47789e5715e949f98bd6d72c934b54": "ebe76b0edd0eda3488527b95f2a6d925d091a408"
|
||||
},
|
||||
"mapping_Cassandra22_datastax.xml": {
|
||||
"2ddd561eac2a04a7b08949c0764c5e76f80c89f5": "b0378fb45ae238b884417db468872341e156f138",
|
||||
"33b483680a44a8229b09698df3803f5834987f18": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra40.xml": {
|
||||
"e92b373950021eb425db9e3eba8391f98ce7e4a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Cassandra_datastax.xml": {
|
||||
"3cb6b5cf167fb5ba82b3ebdc602f22ecdacdafb5": "56fad9370b27d03a9636d8368350274480fc2bce",
|
||||
"ca09b169eee6e6dcfa81f976bd98ef4aae81cdf2": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1620c54d6793c6d1885e3e2fcdf242c0e3a4059": "df28e2b92f57ba0486215f334edb649a58788712"
|
||||
},
|
||||
"mapping_Databricks_Delta_Lake.xml": {
|
||||
"d48793d7173ea7d07090f5e683045c3f60cc12c8": "21f5ac777158fc55288af7337737aa675e20bdf3",
|
||||
"dcbe4533fe16fee70f24702edddec78b81e26463": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Exasol.xml": {
|
||||
"21ff2b1a69b7242fa48a1218b0d5f8a6b0ba607e": "a0d36282ff5d6825b206ab6f794d13e048ac2192",
|
||||
"3768b1e7a941e66f8a70ad7e1a65aa7d2b598daa": "7ef9ede0f988f10489c1f5ffe16ea24d2d14ecdd",
|
||||
"6babf3080a3baa05bcd8a2815d2f31a0b15e1550": "02a98e53d3b6457272768ce0ae5c82992b403465",
|
||||
"7de8a81bc2eb7c4da639af148c2c67b5c6de4bc0": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"a728306274b817e8afa0101d3b7621398addc2f3": "b5b116b3758f58e7500058e1805bf93bf5a2f0c1",
|
||||
"dc2eba14e50ce7c413fb7696355e67d26fe5fb9b": "57bacf1f97951fcf6f650f1afdec35b5ea22638c",
|
||||
"f670268dfd5a8f80fbdbe6fe4ad668cb6c8f25d6": "ead0fb11f124cf05ad0f7fde21cdedbb3cf2160b"
|
||||
},
|
||||
"mapping_Firebird.xml": {
|
||||
"51a041d0b43678433f6303aebac5f92bfdb7b8a6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"d504ece6ca9e10e23f5e0f05660e5f49e7d999ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Greenplum.xml": {
|
||||
"16418522006e4505c7fb7d44c4d06928de20eaf8": "ec04f46618ef0586081fd3b17ad7b85239958194",
|
||||
"4f3e1b53baca729eef796979e97592c8724a2d91": "caf54e3d2b6c6d685cdcf2a243c28c408a9cd652",
|
||||
"525a7ca1a48599a840b1feca641ef6a413d7384b": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"c4ed635e67d7d82c24008677f313e17df98f5d08": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_H2.xml": {
|
||||
"4e3ed630d3133326a0cf4728865b3efa4cbecc63": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"84b0b863c0532f93bffc0ab54d98a449f331e319": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"cb093084dc1dc3f999707a1b9d1474f87bbf6d17": "341b1220b6bc6bf59eef81e97c694d06134bd8a2"
|
||||
},
|
||||
"mapping_HSQLDB.xml": {
|
||||
"0a37e2aec423d0c401aff092e4fda9e01c5dd4ff": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"73af8e3e8646ea58f4cfe60fe4905e90340b3e12": "890a391388725c112ffbbd2dd8b8d267305df4a7",
|
||||
"98819a80cd8994a02579ea1d9b0992a0b68a5403": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Hive.xml": {
|
||||
"0265c6f16ab2c9eea7da660e4e1c8a3ec7bc0ab3": "37ef13c438cda4cd1c3e091d99a00036b328e57f",
|
||||
"1f5811f41b2836cd7baeb23daef91d2ea313f2c6": "3646a1bcd980a3209501a5c846338823f55d74b2",
|
||||
"21a44cd9d32a5478a4de61a86b398a9ef80401ac": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"5444fa9a484704d774259430623e0db1495a867f": "ef872732cde37c6c7684dc773641be0b78f5c57c",
|
||||
"e7f128915578dd29538a7debeb5f47528b5a6e59": "86ba7c19d9300a02dbcb0801852e728acd261132"
|
||||
},
|
||||
"mapping_IBMDB2.xml": {
|
||||
"dc42cf143f3a0f10ad8c280f16ef44ae1f907123": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"f8aea23cc5b48ebb3cdd229be3f66b28890ff4f8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Impala.xml": {
|
||||
"55ed99aa28c989bd5777f41b7c87ed4eb9f245a8": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Informix.xml": {
|
||||
"40da9213cf85b1712f38474dea4f2ec3447dfe3c": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"938e41f3719c29248d4f58c303464bbfb50e343a": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Ingres.xml": {
|
||||
"811e8bf4e7bc2e6b9c3fcb5f074601a873f15e1d": "15afc1b074c8a6e4aee39c1d5a3347555dbe36a0",
|
||||
"95873faa81ee3de2eea02efab5c127e6188df796": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"9c5682f564e861e1db3b5184fd40e718e0912a4a": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Interbase.xml": {
|
||||
"4d37474d07991154aa0148e7a030c4725d45ef0d": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"71e8386c3e21f726550234c52d3ca50dcfa655de": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_JavaDB.xml": {
|
||||
"652fd7f2f11fc27903d333e1699cc419804caa66": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"66dbe13a0043798498f37b6e5495bc3aaa8fb90b": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_MSSQL.xml": {
|
||||
"305eeb294ae8bb07bee7d1e182e431e2e7f6273d": "d7761630e63b399f89eaaeb9e19e775bf1579dde",
|
||||
"b93c0825ffd799d89608239385d7e4b60de96209": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MaxDB.xml": {
|
||||
"586fc7ac94a9abec8a76a587dc6aa0fae0079bf3": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm.xml": {
|
||||
"e1c5e77e19adea1406e5bb511a1c6adb8b610bfe": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MicrosoftCrm_odata.xml": {
|
||||
"1166b9ce6ce163d11a57046db5ee2dc9d5e496df": "e86fd3fd5c3b4ba9ff613155fba014a80c40cf01",
|
||||
"3f25ced1039b99d1c07b23e3d27cac1562e52a6f": "c1190dfa35e839496745516dbcfeb8a309fa49d0",
|
||||
"750541f00f3c5da6007623f3514add6dc3417a5f": "54331fa4ec501557eb9c32d434c332cf3d121349",
|
||||
"9612a2611bd29461dd46fc70f0e2841892f3f096": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_MsOdbc.xml": {
|
||||
"01561cb7b5630a4a6aed576215ccdb3991d2db52": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"a9c94a6255061e8100b15590da35196464b77d46": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Mysql.xml": {
|
||||
"128d7d66eb994a032128949fcbe0c953c158beaa": "956802047d6623ba61e2da68aba2db8f38bca48a",
|
||||
"522654fad6fa3d008ef386fc9360ae51df910729": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5dfc7b71e1f6a9fad6ebf47a1d748893c85bbe5e": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"894b0d1d2c23c98f2e14920013b82524334dd255": "74b3640e2923d4c60c92042ff03d15b4ac4e9341",
|
||||
"8cb3d2b06d8a2b12e8673e6e9519f85ec08b35ec": "f22d442cbde13623a1b96c15ea2df8dd1a7d755e",
|
||||
"a94341e5bd6c4ba0eef57f9d6d3cc6c0006c785b": "ebc9394c2728a3f3850fcbafac4156ef15aab37f",
|
||||
"d7e74c8e9f8a47ab258472ec43236d2933c70838": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"edc9d1453c8f9ac8548822ff2f90a4defcd02094": "fd4d974c755ced1969b27126844b3f462bca1a52"
|
||||
},
|
||||
"mapping_Netezza.xml": {
|
||||
"0c769aa277190990fb33a918cc57189b9ba6306f": "c8ca64da55ceb677fd97169f6a924ec80f01b2fc",
|
||||
"0f5e9677f936a5414ce6593229aa47ea5b757276": "3074a57eee1407a413e460ed27e31d48d21d609b",
|
||||
"b3e25e55f8281cb616b3f549e6a2e5a83d4ad62a": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Oracle.xml": {
|
||||
"0407cea7e87144cb601bc9a3f039121feca79b65": "cb6b87dabdc71be0f1db4bdca694bcb61b679c05",
|
||||
"064d2a5940379346638412dd7f4cb7dbcc30e672": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"26a2295f6401de6e17feb61b261f7fbdfc4d609d": "e7604a488f339028a3cf14ae4031b0fb3fd50bcc",
|
||||
"9b0306aacec772d9d82be49ab702254ce1e08bea": "912702dc8ea921a34ea0522235db65f8655bf8e9",
|
||||
"df2537b329d0b09828c281e62208daf379f7b60a": "544faa63bbe63dd070a94c84139c705ac6432314"
|
||||
},
|
||||
"mapping_ParAccel.xml": {
|
||||
"1ba71027d3a60773c7c008143c2146e4db2ef112": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"5085a1e922f77895a2f7c85e2347acfe03034493": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb"
|
||||
},
|
||||
"mapping_Postgres.xml": {
|
||||
"ce8b7f58644b8f7814a5522d172b4192ff89bd4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e1c1f04f95222bcadda336d6a4f0ea07c6ebb08e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_PostgresPlus.xml": {
|
||||
"69b7d7f722538a322fb0bf867177d1ce5a0d7ad6": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f576a7bb0327eeff1fd63a9a09106ae33f3ec90e": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Redshift.xml": {
|
||||
"0cc6e153fe35041a009cb222e0276e35ddbc92f1": "2023289b9965fc14b959463ba5050be6aead361a",
|
||||
"3b941be88a5f13bd8fd905fb1fa5f2a241e89ed9": "915a307b629c7a75bcbedc86267db1e8995b77f3",
|
||||
"85ba89fdadfca4a2d755856a75e904f6015926a9": "de08533f6561319fc2914181a2705ccd75e29c40",
|
||||
"8f3eda24c1f413b17b2b8c48695dbd786fa29b6b": "93112768d7eea6df44d92a3efbd4f1dfa20e06b6",
|
||||
"ab86d7fda94e0b368f739f73994ce2a2147be12d": "0fd3f58b7aa78aaae6fb40d042780bec64da75e6",
|
||||
"ad0eecc7e9f25c3b904cc11b062a8185456478ee": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Redshift_new.xml": {
|
||||
"43085952e178e2c570ab7d2a262278dd2896dd96": "699efe42a33aab3ca0bbaa7a1abee23368e61606"
|
||||
},
|
||||
"mapping_SAPHana.xml": {
|
||||
"1a07a8174468a5a1d55378dd0e21d7c1f9e531bc": "48ea42be6b348a3c993760e7f2c94c58ac08fdae",
|
||||
"331ae8a035e6b1f2cd722be6411df4ae4a95bb33": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_SQLite.xml": {
|
||||
"0a97b6e8acf8bd16aa34a3c01707f1e2a9eeff1f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"b7b7b7c690efacc208316c911571a8513b5ea713": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_SingleStore.xml": {
|
||||
"9da7d92af5e9b0697436f74fffd190e8af061567": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Snowflake.xml": {
|
||||
"d459c6be3786f9358615eaf692a1c7920b4c6e74": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_Sybase.xml": {
|
||||
"081038547cac8342cf5cadf8bfd02fe4d2929323": "1ff9877dce90e2ef39b267ea60de534796035a95",
|
||||
"09a0f4dc71ff9a844e1162600409317e92e1ff18": "28534ffb4ae599adec53853776856e82c23c815a",
|
||||
"4ee2c12f372953e77404481a962b3aca14abadb0": "f02b1b6902098b2da90cde6b22a9a49ec328970a",
|
||||
"5752dcfa409e903af77587f151d580c68c9e4ac7": "3db0fa1fbed8ae378d52aa8c36b6fed55d184e5b",
|
||||
"6f4e7913b4b31e8fb4e097690c8b903a58842283": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"7676e2d94473564322ce37cad92b7f8b09751b1b": "1cc6237de63892e097c77637ac8457cf8fefbf6f",
|
||||
"8bbad7895713f3a399ddb195c40353e18d3e83b9": "984ca27e4ee0177793b2111797700390424cb746",
|
||||
"bbc091c50a7bd8a8fe630d99a9c2e3f2f878ac88": "67a9b521c9d698b3411fb49410ac61a15f4bc7db",
|
||||
"d841719dcf79a12d0189301e40c0e9e973a45c4f": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"e103a9671d9bcf360fd2e61ee97f4547d0d52241": "e19031add3dc54bf9d0e731f3a05738af48ebb6d",
|
||||
"e1c42d74cc0dc3681b5bd45a901a3bedeb53ec68": "75df15acaa5c8d1dcd4a8e855e0df969fdea25d5",
|
||||
"e30d1f01e88bdaf926855e00d1aef3a37a7eb6e4": "c91dd79086a42dce5417de77bb7ce61c0bd6cbbf",
|
||||
"ee5d7f5f9510f63c340f87862327b869bf4cb743": "607764748cdbff669d2ccfcbaafdaa0d83598f32"
|
||||
},
|
||||
"mapping_Teradata.xml": {
|
||||
"10ed107c1d66b38d51739ffdd0820db676c42cef": "45dbf10541f6dd32283038bcc5b04b10e305770a",
|
||||
"55e6a511c2cb39aca11de302a3850eb2d1f6e3a5": "fc652f1cc70f6caa05d5c65e57115f86653f7841",
|
||||
"ac9ffae887ab4d20d4eca0eddc83163e99507ec8": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"f9b0367424f721cd8029d3540c9a82f39d74a6b4": "c002b50a69b8a0193780e7c0d1788bbd9a5145c3"
|
||||
},
|
||||
"mapping_VectorWise.xml": {
|
||||
"06f86121a9492b3104047691b19718a5d9d49be9": "d51edc7e08871897572c9b1f1cd2d2d2df347dfb",
|
||||
"edf255202bcfad77ff6f3fac11714891934225c4": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8"
|
||||
},
|
||||
"mapping_Vertica.xml": {
|
||||
"28153eaab1c47b8718ca3c49553ec40b047d2878": "d4655e28a5da3e6a2cc03a1305cc1c2970d8e9b8",
|
||||
"2ee78d7679d4201ad29adba4cc0a48084f161e25": "eecc481d671d330bfb46406ab2533830c668bf22",
|
||||
"819be4680c04a7f77c51fc65ebd1d964a714aa78": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9218d5e7b682513ddf1b891f5f0467ab9938fec3": "341b1220b6bc6bf59eef81e97c694d06134bd8a2",
|
||||
"d9745a57d9f1b6c638ebd57cd5281be020e0614c": "e8f788c5c260f9b82eaaa88d0402423d86a5680d",
|
||||
"dec55a19094d1bcc20f12a8888b27460e83c2e67": "3b582b21fc5ac7ccfb05321c7923591433ced716"
|
||||
},
|
||||
"mapping_XSD.xml": {
|
||||
"1ef837521e274c5b93f5f228955204285b3dd28a": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"9c454252343dfe1400d356cbf41bf88e842b4e1e": "c615b3a622e2f6ba8577e812e71977d9f1b1930d"
|
||||
},
|
||||
"mapping_dynamodb.xml": {
|
||||
"891099e88d8074570dc029f9b7d8b04bbc241383": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_ebcdic.xml": {
|
||||
"b47b25edc9e40d312b548270dbb3f978475be4e7": "7007071c9cf718d34da7d61208ceea7f05de94d0"
|
||||
},
|
||||
"mapping_sap.xml": {
|
||||
"0339bc60ae47e3796c343eee7e2fb1cb1869cefa": "ee49a27e5c3ba3217ab497b1cd4467c088e59f5e",
|
||||
"1f41a55f6f7f1d6d2118e766daf7e3dbfd77551d": "7007071c9cf718d34da7d61208ceea7f05de94d0",
|
||||
"64c23be0c363ab703528677c999e4ef707d54497": "27908d5685066221f02cd3890a5319838215eb8b",
|
||||
"83688cf3134e60d9f5a08b316643a41246717e92": "740c431e0b623cc7d41166588961028ad3efab80",
|
||||
"9df72b6a1f1a72d9be1a4a7fd428873ad9b75bff": "94804b5e96a71d63a294eb9bcfbbb5290824009f",
|
||||
"a300fcd290aa65c254c44d683d30a9fa6ae14a2f": "45e5d88e9c49cb87b47413468073c571f60c0117",
|
||||
"b74c01dff88a52afca5f8c84fbe41d71a34eb6b5": "32832fe0edfbd10d50ed85528481e5c9ca2ec8e0",
|
||||
"c814f616005e1637ec107dd8c0f269bd69661d2e": "7d07608dceb06f7364b5bb8babc0f6e921fc443a"
|
||||
},
|
||||
"mapping_sas.xml": {
|
||||
"4aeb0deb41f61dbe69e85e780fb1e985c9f3d758": "fd44bfb0ee3fc8288465507b937c53619f43c0ec"
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,6 @@ import org.talend.core.model.metadata.ColumnNameChanged;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
@@ -117,7 +116,6 @@ public interface ICoreService extends IService {
|
||||
|
||||
public String validateValueForDBType(String columnName);
|
||||
|
||||
@Deprecated
|
||||
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject);
|
||||
|
||||
public IPreferenceStore getPreferenceStore();
|
||||
@@ -126,7 +124,6 @@ public interface ICoreService extends IService {
|
||||
|
||||
public IMetadataTable convert(MetadataTable originalTable);
|
||||
|
||||
@Deprecated
|
||||
public void syncMappingsFileFromSystemToProject();
|
||||
|
||||
/**
|
||||
@@ -135,17 +132,4 @@ public interface ICoreService extends IService {
|
||||
*/
|
||||
void installComponents(IProgressMonitor monitor);
|
||||
|
||||
Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception;
|
||||
|
||||
String getLicenseCustomer();
|
||||
|
||||
boolean isInValidGP();
|
||||
|
||||
public static ICoreService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -154,10 +154,6 @@ public interface ILibraryManagerService extends IService {
|
||||
public boolean contains(String jarName);
|
||||
|
||||
public void clearCache();
|
||||
|
||||
public void clearCache(boolean cleanIndex);
|
||||
|
||||
public void deployLibsFromCustomComponents();
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import org.talend.core.model.process.IExternalNode;
|
||||
import org.talend.core.model.process.AbstractExternalNode;
|
||||
import org.talend.core.model.process.INode;
|
||||
|
||||
public interface ITDQComponentService extends IService {
|
||||
|
||||
public boolean isTDQExternalComponent(String componentName);
|
||||
|
||||
public IExternalNode createExternalComponent(INode node);
|
||||
public AbstractExternalNode createExternalComponent(INode node);
|
||||
}
|
||||
|
||||
@@ -238,10 +238,6 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_KEY = "CONN_PARA_KEY_SYNAPSE_CLIENT_KEY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_USE_SYNAPSE_CLIENT_CERTIFICATE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE = "CONN_PARA_KEY_SYNAPSE_CLIENT_CERTIFICATE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
|
||||
@@ -351,19 +347,11 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE = "CONN_PARA_KEY_DATABRICKS_CLUSTER_TYPE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_TOKEN="CONN_PARA_KEY_DATABRICKS_TOKEN";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_NODE_TYPE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE="CONN_PARA_KEY_DATABRICKS_DRIVER_NODE_TYPE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION="CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER="CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER";
|
||||
|
||||
|
||||
@@ -207,13 +207,7 @@ public enum EDatabaseConnTemplate {
|
||||
"2181")), //$NON-NLS-1$
|
||||
|
||||
MAPRDB(new DbConnStr(EDatabaseTypeName.MAPRDB, "127.0.0.1", //$NON-NLS-1$
|
||||
"5181")), //$NON-NLS-1$
|
||||
|
||||
SNOWFLAKE(
|
||||
new DbConnStr(EDatabaseTypeName.SNOWFLAKE, //
|
||||
"jdbc:snowflake://<host>:<port>/?<property>",
|
||||
"3306" //$NON-NLS-1$
|
||||
)); // $NON-NLS-1$
|
||||
"5181")); //$NON-NLS-1$
|
||||
|
||||
private DbConnStr connStr;
|
||||
|
||||
|
||||
@@ -56,14 +56,14 @@ public enum EDatabaseVersion4Drivers {
|
||||
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.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$
|
||||
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
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$
|
||||
@@ -83,11 +83,10 @@ public enum EDatabaseVersion4Drivers {
|
||||
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc-actual.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", //$NON-NLS-1$
|
||||
"msal4j-1.11.0.jar",
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.19.jar", "jackson-core-2.13.2.jar",
|
||||
"jackson-databind-2.13.2.2.jar", "jackson-annotations-2.13.2.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.9.3.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -96,12 +95,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
@@ -130,10 +130,6 @@ public enum EHadoopProperties {
|
||||
|
||||
SYNAPSE_CLIENT_KEY,
|
||||
|
||||
SYNAPSE_USE_CERTIFICATE,
|
||||
|
||||
SYNAPSE_CLIENT_CERTIFICATE,
|
||||
|
||||
DEPLOY_FOLDER,
|
||||
|
||||
SPARK_DRIVER_MEM,
|
||||
@@ -154,14 +150,6 @@ public enum EHadoopProperties {
|
||||
|
||||
DATABRICKS_DBFS_DEP_FOLDER,
|
||||
|
||||
DATABRICKS_NODE_TYPE,
|
||||
|
||||
DATABRICKS_DRIVER_NODE_TYPE,
|
||||
|
||||
DATABRICKS_RUNTIME_VERSION,
|
||||
|
||||
DATABRICKS_CLUSTER_TYPE,
|
||||
|
||||
UNIV_STANDALONE_MASTER,
|
||||
|
||||
UNIV_STANDALONE_EXEC_MEMORY,
|
||||
|
||||
@@ -13,16 +13,17 @@
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.osgi.framework.Version;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
@@ -107,7 +108,7 @@ public class ModuleNeeded {
|
||||
|
||||
private Map<String, String> attributes;
|
||||
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
|
||||
|
||||
@@ -368,7 +369,7 @@ public class ModuleNeeded {
|
||||
}
|
||||
|
||||
public ELibraryInstallStatus getStatus() {
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
libManagerService.checkModuleStatus(this);
|
||||
String mvnUriStatusKey = getMavenUri();
|
||||
@@ -377,7 +378,7 @@ public class ModuleNeeded {
|
||||
}
|
||||
|
||||
public ELibraryInstallStatus getDeployStatus() {
|
||||
ILibraryManagerService libManagerService = GlobalServiceRegister.getDefault()
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
libManagerService.checkModuleStatus(this);
|
||||
String mvnUriStatusKey = getMavenUri();
|
||||
@@ -714,21 +715,6 @@ public class ModuleNeeded {
|
||||
if (!StringUtils.isEmpty(mavenUriFromConfiguration)) {
|
||||
this.mavenUri = mavenUriFromConfiguration;
|
||||
}
|
||||
String generateModuleName = MavenUrlHelper.generateModuleNameByMavenURI(this.mavenUri);
|
||||
if (StringUtils.isNotBlank(generateModuleName)) {
|
||||
|
||||
if (!StringUtils.equals(getModuleName(), generateModuleName)) {
|
||||
|
||||
if (CommonsPlugin.isDebugMode() && StringUtils.isNotBlank(this.context)) {
|
||||
|
||||
CommonExceptionHandler
|
||||
.warn("module name definition should be " + generateModuleName + ", not " + getModuleName()
|
||||
+ " :" + this.context);
|
||||
}
|
||||
|
||||
setModuleName(generateModuleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usedByDynamicDistribution() {
|
||||
|
||||
@@ -194,10 +194,6 @@ public interface IMetadataConnection extends IMetadata {
|
||||
public String getContextName();
|
||||
|
||||
public void setContextName(String contextName);
|
||||
|
||||
public boolean isSupportNLS();
|
||||
|
||||
public void setSupportNLS(boolean newSupportNLS);
|
||||
|
||||
/**
|
||||
* Returns the value that you stored in the data collection by the key. Normally, it is like this key-value. For
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -25,20 +24,18 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ProjectScope;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@@ -49,9 +46,9 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
@@ -62,8 +59,6 @@ import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
@@ -80,13 +75,14 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public final class MetadataTalendType {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String INTERNAL_MAPPINGS_FOLDER = "mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROJECT_MAPPING_FOLDER = ".settings/mappings"; //$NON-NLS-1$
|
||||
|
||||
public static final String FILE_MAPPING_REVISION = "mapping_revision.json"; //$NON-NLS-1$
|
||||
|
||||
public static final String MAPPING_FILE_PATTERN = "^mapping_.*\\.xml$"; //$NON-NLS-1$
|
||||
public static final String UPDATED_MAPPING_FILES = "updated.mapping.files"; //$NON-NLS-1$
|
||||
|
||||
private static ECodeLanguage codeLanguage;
|
||||
|
||||
@@ -463,14 +459,13 @@ public final class MetadataTalendType {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static URL getSystemFolderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getSystemForderURLOfMappingsFile() throws SystemException {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
URL url = null;
|
||||
Path filePath = new Path(dirPath);
|
||||
Bundle b = Platform.getBundle(CoreRuntimePlugin.PLUGIN_ID);
|
||||
if (b != null) {
|
||||
try {
|
||||
// Enumeration<URL> entries = b.findEntries(dirPath, "mapping_*.xml", false);
|
||||
url = FileLocator.toFileURL(FileLocator.find(b, filePath, null));
|
||||
} catch (IOException e) {
|
||||
throw new SystemException(e);
|
||||
@@ -479,169 +474,46 @@ public final class MetadataTalendType {
|
||||
return url;
|
||||
}
|
||||
|
||||
public static URL getProjectFolderURLOfMappingsFile() throws SystemException {
|
||||
public static URL getProjectForderURLOfMappingsFile() throws SystemException {
|
||||
try {
|
||||
String dirPath = "/" + INTERNAL_MAPPINGS_FOLDER; //$NON-NLS-1$
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IPath settingPath = new ProjectScope(project).getLocation();
|
||||
File mappingFolder = settingPath.append(dirPath).toFile();
|
||||
return mappingFolder.toURI().toURL();
|
||||
IPath mappingPath = settingPath.append(dirPath);
|
||||
File mappingFolder = mappingPath.toFile();
|
||||
if (!mappingFolder.exists() || mappingFolder.listFiles().length < 1) {
|
||||
ICoreService service = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
service = GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
service.syncMappingsFileFromSystemToProject();
|
||||
}
|
||||
}
|
||||
return mappingFolder.toURL();
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static URL getProjectTempMappingFolder() {
|
||||
private static String getSha1OfFile(File file) {
|
||||
String sha1 = null;
|
||||
FileInputStream fileInputStream = null;
|
||||
try {
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
File folder = ResourceUtils
|
||||
.getFolder(project, RepositoryConstants.TEMP_DIRECTORY + "/" + INTERNAL_MAPPINGS_FOLDER, false).getLocation()
|
||||
.toFile();
|
||||
syncMappingFiles(folder, false);
|
||||
return folder.toURI().toURL();
|
||||
fileInputStream = new FileInputStream(file);
|
||||
sha1 = DigestUtils.shaHex(fileInputStream);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void syncMappingFiles(File target, boolean rename) {
|
||||
if (!target.exists()) {
|
||||
target.mkdir();
|
||||
}
|
||||
File[] arr = target.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (arr == null) {
|
||||
arr = new File[0];
|
||||
}
|
||||
try {
|
||||
Map<String, File> targetFileMap = Stream.of(arr).collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
Map<String, File> workingFileMap = getWorkingMappingFiles().stream()
|
||||
.collect(Collectors.toMap(f -> getTargetName(f, rename), Function.identity(), (f1, f2) -> f1));
|
||||
|
||||
targetFileMap.entrySet().stream().filter(entry -> !workingFileMap.containsKey(entry.getKey()))
|
||||
.forEach(entry -> entry.getValue().delete());
|
||||
|
||||
for (Entry<String, File> entry : workingFileMap.entrySet()) {
|
||||
String targetName = entry.getKey();
|
||||
File workingMappingFile = entry.getValue();
|
||||
boolean needUpdate = false;
|
||||
File targetMappingFile = targetFileMap.get(targetName);
|
||||
if (targetMappingFile == null) {
|
||||
targetMappingFile = new File(target, targetName);
|
||||
needUpdate = true;
|
||||
} else if (!getSha1OfFile(workingMappingFile).equals(getSha1OfFile(targetMappingFile))) {
|
||||
needUpdate = true;
|
||||
}
|
||||
if (needUpdate) {
|
||||
if (targetMappingFile.exists()) {
|
||||
targetMappingFile.delete();
|
||||
}
|
||||
FilesUtils.copyFile(workingMappingFile, targetMappingFile);
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace(); // Just print the exception for debug.
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getTargetName(File file, boolean rename) {
|
||||
String targetName = file.getName();
|
||||
if (!rename) {
|
||||
return targetName;
|
||||
}
|
||||
try {
|
||||
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
|
||||
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
|
||||
Document document = analyser.parse(file);
|
||||
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
|
||||
String dbmsIdValue = "";
|
||||
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
|
||||
Node dbmsNode = dbmsNodes.item(iDbms);
|
||||
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
|
||||
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
|
||||
|
||||
}
|
||||
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
|
||||
final String[] fileNameSplit = targetName.split("_");
|
||||
String idA = "_id";
|
||||
String idB = "id_";
|
||||
final int indexA = dbmsIdValue.indexOf(idA);
|
||||
final int indexB = dbmsIdValue.indexOf(idB);
|
||||
String secondeName = "";
|
||||
if (indexA > 0) {
|
||||
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
|
||||
} else if (indexB == 0) {
|
||||
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
|
||||
} else if (indexA == -1 && indexB == -1) {
|
||||
secondeName = dbmsIdValue;
|
||||
}
|
||||
if (secondeName != null && !"".equals(secondeName)) {
|
||||
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
|
||||
}
|
||||
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return targetName;
|
||||
}
|
||||
|
||||
public static JSONObject getRevisionObject() {
|
||||
try {
|
||||
File revisonFile = new File(MetadataTalendType.getSystemFolderURLOfMappingsFile().getFile(),
|
||||
MetadataTalendType.FILE_MAPPING_REVISION);
|
||||
String jsonStr = new String(Files.readAllBytes(revisonFile.toPath()));
|
||||
return new JSONObject(jsonStr);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
|
||||
public static boolean restoreMappingFiles() throws Exception {
|
||||
List<File> toDelete = new ArrayList<>();
|
||||
JSONObject revision = getRevisionObject();
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
if (projectMappingFolder.exists()) {
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles != null) {
|
||||
for (File file : projectMappingFiles) {
|
||||
if (revision.has(file.getName())) {
|
||||
String sha1 = MetadataTalendType.getSha1OfFile(file);
|
||||
if (revision.getJSONObject(file.getName()).has(sha1)) {
|
||||
toDelete.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File xsd = new File(projectMappingFolder, "mapping_validate.xsd"); //$NON-NLS-1$
|
||||
if (xsd.exists()) {
|
||||
xsd.delete();
|
||||
}
|
||||
}
|
||||
toDelete.forEach(File::delete);
|
||||
return !toDelete.isEmpty();
|
||||
}
|
||||
|
||||
public static String getSha1OfFile(File file) {
|
||||
try {
|
||||
String text = new String(Files.readAllBytes(file.toPath()));
|
||||
return getSha1OfText(text);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
return sha1;
|
||||
}
|
||||
|
||||
public static String getSha1OfText(String text) {
|
||||
text = text.replace("\r\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return DigestUtils.sha1Hex(text);
|
||||
}
|
||||
|
||||
public static void copyFile(File in, IFile out) throws CoreException, IOException {
|
||||
FileInputStream fis = new FileInputStream(in);
|
||||
if (out.exists()) {
|
||||
@@ -652,6 +524,49 @@ public final class MetadataTalendType {
|
||||
fis.close();
|
||||
}
|
||||
|
||||
public static void syncNewMappingFileToProject() throws SystemException {
|
||||
try {
|
||||
File sysMappingFiles = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
|
||||
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject())
|
||||
.getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
|
||||
File projectMappingFiles = new File(projectMappingFolder.getLocationURI());
|
||||
if (!sysMappingFiles.exists() || !projectMappingFiles.exists()) {
|
||||
return;
|
||||
}
|
||||
for (File sysMapping : sysMappingFiles.listFiles()) {
|
||||
IFile projectMapping = projectMappingFolder.getFile(sysMapping.getName());
|
||||
if (projectMapping.exists() && StringUtils.equals(sysMapping.getName(), "mapping_Greenplum.xml")) {
|
||||
|
||||
String sha1OfFile = DigestUtils.shaHex(projectMapping.getContents());
|
||||
String shalOfOldSystem = "8431f19215dacb3caa126778ae695954552cce2a";
|
||||
if (StringUtils.equals(sha1OfFile, shalOfOldSystem)) {
|
||||
copyFile(sysMapping, projectMapping);
|
||||
}
|
||||
}
|
||||
if (!projectMapping.exists()) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(sysMapping);
|
||||
projectMapping.create(fis, true, null);
|
||||
} catch (CoreException coreExc) {
|
||||
throw new SystemException(coreExc);
|
||||
} finally {
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException ioExc) {
|
||||
throw new SystemException(ioExc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Load db types and mapping with the current activated language (Java, Perl, ...).
|
||||
@@ -659,38 +574,20 @@ public final class MetadataTalendType {
|
||||
* @throws SystemException
|
||||
*/
|
||||
public static void loadCommonMappings() throws SystemException {
|
||||
URL url = getProjectForderURLOfMappingsFile();
|
||||
File dir = new File(url.getPath());
|
||||
metadataMappingFiles = new ArrayList<File>();
|
||||
dbmsSet.clear();
|
||||
for (File file : getWorkingMappingFiles()) {
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
if (dir.isDirectory()) {
|
||||
File[] files = dir.listFiles();
|
||||
for (File file : files) {
|
||||
if (file.getName().matches("^mapping_.*\\.xml$")) { //$NON-NLS-1$
|
||||
loadMapping(file);
|
||||
metadataMappingFiles.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static List<File> getWorkingMappingFiles() throws SystemException {
|
||||
File projectMappingFolder = new File(getProjectFolderURLOfMappingsFile().getFile());
|
||||
File[] projectMappingFiles = projectMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
File systemMappingFolder = new File(getSystemFolderURLOfMappingsFile().getFile());
|
||||
File[] systemMappingFiles = systemMappingFolder.listFiles(f -> f.getName().matches(MAPPING_FILE_PATTERN));
|
||||
if (projectMappingFiles == null || projectMappingFiles.length == 0) {
|
||||
return Arrays.asList(systemMappingFiles);
|
||||
}
|
||||
List<File> workingMappingFiles = new ArrayList<>();
|
||||
Map<String, File> projectMappingFilesMap = Stream.of(projectMappingFiles)
|
||||
.collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
workingMappingFiles.addAll(projectMappingFilesMap.values());
|
||||
Stream.of(systemMappingFiles).filter(f -> !projectMappingFilesMap.containsKey(f.getName()))
|
||||
.forEach(f -> workingMappingFiles.add(f));
|
||||
return workingMappingFiles;
|
||||
}
|
||||
|
||||
public static String getSha1OfSystemMappingFile(String fileName) {
|
||||
try {
|
||||
return getSha1OfFile(new File(getSystemFolderURLOfMappingsFile().getFile(), fileName));
|
||||
} catch (SystemException e) {
|
||||
ExceptionHandler.process(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMapping(File file) throws SystemException {
|
||||
|
||||
@@ -260,7 +260,6 @@ public final class ConvertionHelper {
|
||||
result.setContentModel(connection.isContextMode());
|
||||
result.setContextId(sourceConnection.getContextId());
|
||||
result.setContextName(sourceConnection.getContextName());
|
||||
result.setSupportNLS(sourceConnection.isSupportNLS());
|
||||
// handle oracle database connnection of general_jdbc.
|
||||
result.setSchema(getMeataConnectionSchema(result));
|
||||
convertOtherParameters(result, connection);
|
||||
|
||||
@@ -113,7 +113,6 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
|
||||
private String contextName;
|
||||
|
||||
private boolean supportNLS = false;
|
||||
// ~
|
||||
|
||||
private String comment;
|
||||
@@ -730,14 +729,6 @@ public class MetadataConnection implements IMetadataConnection {
|
||||
public void setContextName(String contextName) {
|
||||
this.contextName = contextName;
|
||||
}
|
||||
|
||||
public boolean isSupportNLS() {
|
||||
return supportNLS;
|
||||
}
|
||||
|
||||
public void setSupportNLS(boolean supportNLS) {
|
||||
this.supportNLS = supportNLS;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -1250,11 +1250,6 @@ public class RepositoryToComponentProperty {
|
||||
return value2;
|
||||
|
||||
}
|
||||
|
||||
if(value.equals("SUPPORT_NLS")) {
|
||||
return connection.isSupportNLS();
|
||||
}
|
||||
|
||||
if (value.equals("CDC_TYPE_MODE")) { //$NON-NLS-1$
|
||||
return new Boolean(CDCTypeMode.LOG_MODE.getName().equals(connection.getCdcTypeMode()));
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
import org.talend.commons.utils.generation.CodeGenerationUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
import org.talend.core.model.metadata.types.JavaType;
|
||||
@@ -38,7 +37,6 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.utils.JavaResourcesHelper;
|
||||
import org.talend.core.model.utils.SQLPatternUtils;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IDesignerXMLMapperService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
@@ -295,7 +293,8 @@ public final class ElementParameterParser {
|
||||
|
||||
List<IElementParameter> params = (List<IElementParameter>) element.getElementParametersWithChildrens();
|
||||
if (params != null && !params.isEmpty()) {
|
||||
for (IElementParameter param : params) {
|
||||
for (int i = 0; i < params.size(); i++) {
|
||||
IElementParameter param = params.get(i);
|
||||
if (text.indexOf(param.getVariableName()) != -1
|
||||
|| (param.getVariableName() != null && param.getVariableName().contains(text))) {
|
||||
if (param.getFieldType() == EParameterFieldType.TABLE) {
|
||||
@@ -423,8 +422,8 @@ public final class ElementParameterParser {
|
||||
}
|
||||
IElementParameter param;
|
||||
|
||||
for (IElementParameter element2 : element.getElementParameters()) {
|
||||
param = element2;
|
||||
for (int i = 0; i < element.getElementParameters().size(); i++) {
|
||||
param = element.getElementParameters().get(i);
|
||||
if (text.indexOf(param.getVariableName()) != -1) {
|
||||
if (param.getFieldType() == EParameterFieldType.TABLE) {
|
||||
return createTableValuesXML((List<Map<String, Object>>) param.getValue(), param);
|
||||
@@ -484,21 +483,7 @@ public final class ElementParameterParser {
|
||||
if (element instanceof INode) {
|
||||
INode node = (INode) element;
|
||||
if (node.getExternalNode() != null) {
|
||||
Object obj = null;
|
||||
if (node.isVirtualGenerateNode()) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerXMLMapperService.class)) {
|
||||
final IDesignerXMLMapperService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IDesignerXMLMapperService.class);
|
||||
if (service != null) {
|
||||
obj = service.rebuildXmlMapData(node.getExternalNode());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj != null) {
|
||||
return obj;
|
||||
} else {
|
||||
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
|
||||
}
|
||||
return EcoreUtil.copy(node.getExternalNode().getExternalEmfData());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -511,8 +496,8 @@ public final class ElementParameterParser {
|
||||
}
|
||||
IElementParameter param;
|
||||
newText = text;
|
||||
for (IElementParameter element2 : element.getElementParameters()) {
|
||||
param = element2;
|
||||
for (int i = 0; i < element.getElementParameters().size(); i++) {
|
||||
param = element.getElementParameters().get(i);
|
||||
if (newText.contains(param.getVariableName())) {
|
||||
String value = getDisplayValue(param);
|
||||
newText = newText.replace(param.getVariableName(), value);
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class AbstractJobParameterInRepositoryRelationshipHandler extend
|
||||
Set<Relation> relationSet = new HashSet<Relation>();
|
||||
|
||||
for (ElementParameterType paramType : parametersMap.values()) {
|
||||
if (paramType.getName() != null && paramType.getName().endsWith(":" + getRepositoryTypeName())) { //$NON-NLS-1$
|
||||
if (paramType.getName().endsWith(":" + getRepositoryTypeName())) { //$NON-NLS-1$
|
||||
String name = paramType.getName().split(":")[0]; //$NON-NLS-1$
|
||||
ElementParameterType repositoryTypeParam = parametersMap.get(name + ":" //$NON-NLS-1$
|
||||
+ getRepositoryTypeName());
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* created by wchen on 2015年6月16日 Detailled comment
|
||||
@@ -256,7 +255,7 @@ public class TalendLibsServerManager {
|
||||
if (enableProxyFlag) {
|
||||
serverBean.setServer(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_URL));
|
||||
serverBean.setUserName(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_USERNAME));
|
||||
serverBean.setPassword(StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.SYSTEM).decrypt(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD)));
|
||||
serverBean.setPassword(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_PASSWORD));
|
||||
serverBean.setRepositoryId(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_REPOSITORY_ID));
|
||||
serverBean.setType(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_TYPE));
|
||||
}
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.emf.common.util.EMap;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.runtime.util.EmfResourceUtil;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.security.CryptoMigrationUtil;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoItemSignatureUtil {
|
||||
|
||||
public static final String MIGRATION_TOKEN_KEY = "force_import_unsupported_job";
|
||||
|
||||
public static final String REPOSITORY_PLUGIN_ID = "org.talend.repository";
|
||||
|
||||
public static final String PROJ_DATE_ID = "repository.project.id";
|
||||
|
||||
public static final String PROD_DATE_ID = "product.date.id";
|
||||
|
||||
public static String getCurrentProjectCreateDate() {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject != null) {
|
||||
ProjectPreferenceManager projectPrefManager = new ProjectPreferenceManager(
|
||||
PendoItemSignatureUtil.REPOSITORY_PLUGIN_ID, false);
|
||||
String projDate = projectPrefManager.getValue(PendoItemSignatureUtil.PROJ_DATE_ID);
|
||||
if (StringUtils.isNotBlank(projDate)) {
|
||||
String decrypt = null;
|
||||
if (StudioEncryption.hasEncryptionSymbol(projDate)) {
|
||||
decrypt = StudioEncryption.getStudioEncryption(StudioEncryption.EncryptionKeyName.MIGRATION_TOKEN)
|
||||
.decrypt(projDate);
|
||||
} else {
|
||||
decrypt = CryptoMigrationUtil.decrypt(projDate);
|
||||
}
|
||||
return decrypt;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getStudioVersion() {
|
||||
String studioVersion = VersionUtils.getDisplayVersion();
|
||||
String patchInstalledVersion = PendoTrackDataUtil.getLatestPatchInstalledVersion();
|
||||
if (StringUtils.isNotBlank(patchInstalledVersion)) {
|
||||
studioVersion = patchInstalledVersion;
|
||||
}
|
||||
return studioVersion;
|
||||
}
|
||||
|
||||
public static String getItemProductVersion(Property property) {
|
||||
String productVersion = null;
|
||||
EMap additionalProperties = property.getAdditionalProperties();
|
||||
if (additionalProperties.get("modified_product_version") != null) {
|
||||
productVersion = additionalProperties.get("modified_product_version").toString();
|
||||
} else if (additionalProperties.get("created_product_version") != null) {
|
||||
productVersion = additionalProperties.get("created_product_version").toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(productVersion)) {
|
||||
productVersion = VersionUtils.getTalendPureVersion(productVersion);
|
||||
}
|
||||
return productVersion;
|
||||
}
|
||||
|
||||
public static String getItemProductName(Property property) {
|
||||
String productName = null;
|
||||
EMap additionalProperties = property.getAdditionalProperties();
|
||||
if (additionalProperties.get("modified_product_fullname") != null) {
|
||||
productName = additionalProperties.get("modified_product_fullname").toString();
|
||||
} else if (additionalProperties.get("created_product_fullname") != null) {
|
||||
productName = additionalProperties.get("created_product_fullname").toString();
|
||||
}
|
||||
return productName;
|
||||
}
|
||||
|
||||
public static String formatDate(String dateString, String pattern) {
|
||||
String formattedDate = "";
|
||||
if (StringUtils.isNotBlank(dateString)) {
|
||||
Date date = new Date(Long.parseLong(dateString));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
||||
formattedDate = sdf.format(date);
|
||||
}
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
public interface SignatureStatus {
|
||||
|
||||
public static final int V_VALID = 0;
|
||||
|
||||
public static final int V_INVALID = EmfResourceUtil.V_INVALID << 0;
|
||||
|
||||
public static final int V_UNSIGNED = V_INVALID << 1;
|
||||
}
|
||||
|
||||
public enum TOSProdNameEnum {
|
||||
|
||||
TOS_DI("Talend Open Studio for Data Integration"),
|
||||
TOS_BD("Talend Open Studio for Big Data"),
|
||||
TOS_ESB("Talend Open Studio for ESB"),
|
||||
TOS_TOP("Talend Open Studio for Data Quality");
|
||||
|
||||
private String prodName;
|
||||
|
||||
TOSProdNameEnum(String prodName) {
|
||||
this.prodName = prodName;
|
||||
}
|
||||
|
||||
public String getProdName() {
|
||||
return prodName;
|
||||
}
|
||||
|
||||
public static String getTOSCategoryByProdName(String prodName) {
|
||||
String category = null;
|
||||
for (TOSProdNameEnum tosProdNameEnum : TOSProdNameEnum.values()) {
|
||||
if (tosProdNameEnum.getProdName().equals(prodName)) {
|
||||
category = tosProdNameEnum.name();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return category;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ValueEnum {
|
||||
|
||||
YES("Y"),
|
||||
NO("N"),
|
||||
NOT_APPLICATE("N/A");
|
||||
|
||||
private String displayValue;
|
||||
|
||||
ValueEnum(String displayValue) {
|
||||
this.displayValue = displayValue;
|
||||
}
|
||||
|
||||
public String getDisplayValue() {
|
||||
return displayValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ import org.talend.core.ui.IInstalledPatchService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
/**
|
||||
@@ -61,7 +60,11 @@ public class PendoTrackDataUtil {
|
||||
}
|
||||
|
||||
public static IPendoDataProperties getLoginEventProperties() {
|
||||
String studioPatch = getLatestPatchInstalledVersion();
|
||||
String studioPatch = null;
|
||||
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
|
||||
if (installedPatchService != null) {
|
||||
studioPatch = installedPatchService.getLatestInstalledPatchVersion();
|
||||
}
|
||||
PendoLoginProperties loginEvent = new PendoLoginProperties();
|
||||
IStudioLiteP2Service studioLiteP2Service = IStudioLiteP2Service.get();
|
||||
try {
|
||||
@@ -89,15 +92,6 @@ public class PendoTrackDataUtil {
|
||||
return loginEvent;
|
||||
}
|
||||
|
||||
public static String getLatestPatchInstalledVersion() {
|
||||
String studioPatch = "";
|
||||
IInstalledPatchService installedPatchService = IInstalledPatchService.get();
|
||||
if (installedPatchService != null) {
|
||||
studioPatch = installedPatchService.getLatestInstalledVersion(true);
|
||||
}
|
||||
return studioPatch;
|
||||
}
|
||||
|
||||
private static void setUpRefProjectsStructure(PendoLoginProperties loginEvent) {
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
Project currentProject = projectManager.getCurrentProject();
|
||||
@@ -144,19 +138,6 @@ public class PendoTrackDataUtil {
|
||||
|
||||
}
|
||||
|
||||
public static String convertEntityJsonString(Object entity) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
String content = mapper.writeValueAsString(entity);
|
||||
if (StringUtils.isNotBlank(content)) {
|
||||
return content;
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public enum TrackEvent {
|
||||
|
||||
PROJECT_LOGIN("Project Login"),
|
||||
@@ -165,11 +146,7 @@ public class PendoTrackDataUtil {
|
||||
USE_API_DEF("Use API Definition"),
|
||||
OPEN_IN_APIDesigner("Open in API Designer"),
|
||||
OPEN_IN_APITester("Open in API Tester"),
|
||||
OPEN_API_DOCUMENTATION("Open API Documentation"),
|
||||
AUTOMAP("tMap Automap"),
|
||||
TMAP("tMap"),
|
||||
ITEM_IMPORT("Import items"),
|
||||
ITEM_SIGNATURE("Item Signature");
|
||||
OPEN_API_DOCUMENTATION("Open API Documentation");
|
||||
|
||||
private String event;
|
||||
|
||||
|
||||
@@ -55,10 +55,6 @@ import org.talend.utils.json.JSONObject;
|
||||
*/
|
||||
public class PendoTrackSender {
|
||||
|
||||
public static final String PROP_PENDO_LOCAL_CHECK = "talend.pendo.localDebug";
|
||||
|
||||
public static final String PROP_PENDO_LOG_DATA = "talend.pendo.logRuntimeData";
|
||||
|
||||
private static final String PREFIX_API = "api";
|
||||
|
||||
private static final String PENDO_INFO = "/monitoring/pendo/info";
|
||||
@@ -79,18 +75,10 @@ public class PendoTrackSender {
|
||||
|
||||
private static String pendoInfo;
|
||||
|
||||
private PendoTrackSender() {
|
||||
}
|
||||
|
||||
static {
|
||||
instance = new PendoTrackSender();
|
||||
RepositoryContext repositoryContext = getRepositoryContext();
|
||||
if (repositoryContext != null) {
|
||||
adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
}
|
||||
}
|
||||
|
||||
public static PendoTrackSender getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new PendoTrackSender();
|
||||
}
|
||||
if (StringUtils.isBlank(adminUrl)) {
|
||||
RepositoryContext repositoryContext = getRepositoryContext();
|
||||
if (repositoryContext != null) {
|
||||
@@ -106,9 +94,7 @@ public class PendoTrackSender {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (isTrackSendAvailable()) {
|
||||
sendTrackData(event, properties);
|
||||
}
|
||||
sendTrackData(event, properties);
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
@@ -122,10 +108,10 @@ public class PendoTrackSender {
|
||||
}
|
||||
|
||||
public void sendTrackData(TrackEvent event, IPendoDataProperties properties) throws Exception {
|
||||
if (isPendoLocalDebug()) {
|
||||
ExceptionHandler.log(event.getEvent() + ":" + PendoTrackDataUtil.convertEntityJsonString(properties));
|
||||
if (!checkTokenUsed(adminUrl) || !NetworkUtil.isNetworkValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
DefaultHttpClient client = null;
|
||||
CloseableHttpResponse response = null;
|
||||
IProxySelectorProvider proxySelectorProvider = null;
|
||||
@@ -155,9 +141,6 @@ public class PendoTrackSender {
|
||||
response = client.execute(httpPost, HttpClientContext.create());
|
||||
StatusLine statusLine = response.getStatusLine();
|
||||
String responseStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
|
||||
if (isLogPendoData()) {
|
||||
ExceptionHandler.log(trackData);
|
||||
}
|
||||
if (HttpURLConnection.HTTP_OK != statusLine.getStatusCode()) {
|
||||
throw new Exception(statusLine.toString() + ", server message: [" + responseStr + "]");
|
||||
}
|
||||
@@ -181,21 +164,6 @@ public class PendoTrackSender {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isTrackSendAvailable() throws Exception {
|
||||
if (isPendoLocalDebug() || checkTokenUsed(adminUrl) && NetworkUtil.isNetworkValid()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPendoLocalDebug() {
|
||||
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOCAL_CHECK));
|
||||
}
|
||||
|
||||
public boolean isLogPendoData() {
|
||||
return Boolean.TRUE.toString().equals(System.getProperty(PROP_PENDO_LOG_DATA));
|
||||
}
|
||||
|
||||
private String getPendoInfo() throws Exception {
|
||||
if (StringUtils.isBlank(pendoInfo)) {
|
||||
pendoInfo = getPendoInfo(getBaseUrl(), getToken());
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.mapper;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.properties.PendoTMapProperties;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbstractPendoTMapManager {
|
||||
|
||||
protected abstract PendoTMapProperties calculateProperties();
|
||||
|
||||
public void sendTrackToPendo() {
|
||||
Job job = new Job("send pendo track") {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
if (PendoTrackSender.getInstance().isTrackSendAvailable()) {
|
||||
PendoTMapProperties properties = calculateProperties();
|
||||
PendoTrackSender.getInstance().sendTrackData(TrackEvent.TMAP, properties);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// warning only
|
||||
ExceptionHandler.process(e, Level.WARN);
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
job.setUser(false);
|
||||
job.setPriority(Job.INTERACTIVE);
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.mapper;
|
||||
|
||||
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
|
||||
import org.talend.core.pendo.PendoTrackSender;
|
||||
import org.talend.core.pendo.properties.PendoAutoMapProperties;
|
||||
|
||||
/**
|
||||
* Assume no multiple thread, one AutoMapper one PendoAutoMapManager
|
||||
*
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoAutoMapManager {
|
||||
|
||||
private int mappingChangeCount = 0;
|
||||
|
||||
public void setMappingChangeCount(int mappingChangeCount) {
|
||||
this.mappingChangeCount = mappingChangeCount;
|
||||
}
|
||||
|
||||
public void incrementMappingChangeCount() {
|
||||
this.mappingChangeCount++;
|
||||
}
|
||||
|
||||
public void resetMappingChangeCount() {
|
||||
this.mappingChangeCount = 0;
|
||||
}
|
||||
|
||||
public int getMappingChangeCount() {
|
||||
return mappingChangeCount;
|
||||
}
|
||||
|
||||
public void sendTrackToPendo() {
|
||||
if (mappingChangeCount < 1) {
|
||||
return;
|
||||
}
|
||||
PendoAutoMapProperties properties = new PendoAutoMapProperties();
|
||||
properties.setAutoMappings(mappingChangeCount);
|
||||
PendoTrackSender.getInstance().sendToPendo(TrackEvent.AUTOMAP, properties);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.properties;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoAutoMapProperties implements IPendoDataProperties {
|
||||
|
||||
@JsonProperty("auto_mapping")
|
||||
private int autoMappings;
|
||||
|
||||
/**
|
||||
* Getter for autoMappings.
|
||||
*
|
||||
* @return the autoMappings
|
||||
*/
|
||||
public int getAutoMappings() {
|
||||
return autoMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the autoMappings.
|
||||
*
|
||||
* @param autoMappings the autoMappings to set
|
||||
*/
|
||||
public void setAutoMappings(int autoMappings) {
|
||||
this.autoMappings = autoMappings;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.properties;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoSignImportProperties implements IPendoDataProperties {
|
||||
|
||||
@JsonProperty("source_version")
|
||||
private List<String> sourceVersion;
|
||||
|
||||
@JsonProperty("studio_version")
|
||||
private String studioVersion;
|
||||
|
||||
@JsonProperty("valid_items")
|
||||
private int validItems;
|
||||
|
||||
@JsonProperty("unsigned_items_from_SE")
|
||||
private String unsignSEItems;
|
||||
|
||||
@JsonProperty("unsigned_items_from_EE")
|
||||
private int unsignEEItems;
|
||||
|
||||
@JsonProperty("grace_period")
|
||||
private String gracePeriod;
|
||||
|
||||
@JsonProperty("installed_date")
|
||||
private String installDate;
|
||||
|
||||
@JsonProperty("project_creation_date")
|
||||
private String projectCreateDate;
|
||||
|
||||
@JsonProperty("valid_migration_token")
|
||||
private String validMigrationToken;
|
||||
|
||||
|
||||
/**
|
||||
* Getter for sourceVersion.
|
||||
* @return the sourceVersion
|
||||
*/
|
||||
public List<String> getSourceVersion() {
|
||||
return sourceVersion;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the sourceVersion.
|
||||
* @param sourceVersion the sourceVersion to set
|
||||
*/
|
||||
public void setSourceVersion(List<String> sourceVersion) {
|
||||
this.sourceVersion = sourceVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for studioVersion.
|
||||
*
|
||||
* @return the studioVersion
|
||||
*/
|
||||
public String getStudioVersion() {
|
||||
return studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the studioVersion.
|
||||
*
|
||||
* @param studioVersion the studioVersion to set
|
||||
*/
|
||||
public void setStudioVersion(String studioVersion) {
|
||||
this.studioVersion = studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for validItems.
|
||||
*
|
||||
* @return the validItems
|
||||
*/
|
||||
public int getValidItems() {
|
||||
return validItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the validItems.
|
||||
*
|
||||
* @param validItems the validItems to set
|
||||
*/
|
||||
public void setValidItems(int validItems) {
|
||||
this.validItems = validItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for unsignSEItems.
|
||||
* @return the unsignSEItems
|
||||
*/
|
||||
public String getUnsignSEItems() {
|
||||
return unsignSEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unsignSEItems.
|
||||
* @param unsignSEItems the unsignSEItems to set
|
||||
*/
|
||||
public void setUnsignSEItems(String unsignSEItems) {
|
||||
this.unsignSEItems = unsignSEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for unsignEEItems.
|
||||
*
|
||||
* @return the unsignEEItems
|
||||
*/
|
||||
public int getUnsignEEItems() {
|
||||
return unsignEEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unsignEEItems.
|
||||
*
|
||||
* @param unsignEEItems the unsignEEItems to set
|
||||
*/
|
||||
public void setUnsignEEItems(int unsignEEItems) {
|
||||
this.unsignEEItems = unsignEEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for gracePeriod.
|
||||
*
|
||||
* @return the gracePeriod
|
||||
*/
|
||||
public String getGracePeriod() {
|
||||
return gracePeriod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gracePeriod.
|
||||
*
|
||||
* @param gracePeriod the gracePeriod to set
|
||||
*/
|
||||
public void setGracePeriod(String gracePeriod) {
|
||||
this.gracePeriod = gracePeriod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for installDate.
|
||||
*
|
||||
* @return the installDate
|
||||
*/
|
||||
public String getInstallDate() {
|
||||
return installDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the installDate.
|
||||
*
|
||||
* @param installDate the installDate to set
|
||||
*/
|
||||
public void setInstallDate(String installDate) {
|
||||
this.installDate = installDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for projectCreateDate.
|
||||
*
|
||||
* @return the projectCreateDate
|
||||
*/
|
||||
public String getProjectCreateDate() {
|
||||
return projectCreateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the projectCreateDate.
|
||||
*
|
||||
* @param projectCreateDate the projectCreateDate to set
|
||||
*/
|
||||
public void setProjectCreateDate(String projectCreateDate) {
|
||||
this.projectCreateDate = projectCreateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for validMigrationToken.
|
||||
*
|
||||
* @return the validMigrationToken
|
||||
*/
|
||||
public String getValidMigrationToken() {
|
||||
return validMigrationToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the validMigrationToken.
|
||||
*
|
||||
* @param validMigrationToken the validMigrationToken to set
|
||||
*/
|
||||
public void setValidMigrationToken(String validMigrationToken) {
|
||||
this.validMigrationToken = validMigrationToken;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.properties;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoSignLogonProperties implements IPendoDataProperties {
|
||||
|
||||
@JsonProperty("studio_version")
|
||||
private String studioVersion;
|
||||
|
||||
@JsonProperty("valid_items")
|
||||
private int validItems;
|
||||
|
||||
@JsonProperty("signature_invalid_items")
|
||||
private int invalidSignItems;
|
||||
|
||||
@JsonProperty("unsigned_items_from_SE")
|
||||
private String unsignSEItems;
|
||||
|
||||
@JsonProperty("unsigned_items_from_EE")
|
||||
private int unsignEEItems;
|
||||
|
||||
@JsonProperty("invalid_item_source_version")
|
||||
private String invalidItemSourceVersion;
|
||||
|
||||
@JsonProperty("signed_by_migration")
|
||||
private int signByMigration;
|
||||
|
||||
@JsonProperty("grace_period")
|
||||
private String gracePeriod;
|
||||
|
||||
@JsonProperty("installed_date")
|
||||
private String installDate;
|
||||
|
||||
@JsonProperty("project_creation_date")
|
||||
private String projectCreateDate;
|
||||
|
||||
@JsonProperty("valid_migration_token")
|
||||
private String validMigrationToken;
|
||||
|
||||
/**
|
||||
* Getter for studioVersion.
|
||||
*
|
||||
* @return the studioVersion
|
||||
*/
|
||||
public String getStudioVersion() {
|
||||
return studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the studioVersion.
|
||||
*
|
||||
* @param studioVersion the studioVersion to set
|
||||
*/
|
||||
public void setStudioVersion(String studioVersion) {
|
||||
this.studioVersion = studioVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for validItems.
|
||||
*
|
||||
* @return the validItems
|
||||
*/
|
||||
public int getValidItems() {
|
||||
return validItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the validItems.
|
||||
*
|
||||
* @param validItems the validItems to set
|
||||
*/
|
||||
public void setValidItems(int validItems) {
|
||||
this.validItems = validItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for invalidSignItems.
|
||||
*
|
||||
* @return the invalidSignItems
|
||||
*/
|
||||
public int getInvalidSignItems() {
|
||||
return invalidSignItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the invalidSignItems.
|
||||
*
|
||||
* @param invalidSignItems the invalidSignItems to set
|
||||
*/
|
||||
public void setInvalidSignItems(int invalidSignItems) {
|
||||
this.invalidSignItems = invalidSignItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for unsignSEItems.
|
||||
* @return the unsignSEItems
|
||||
*/
|
||||
public String getUnsignSEItems() {
|
||||
return unsignSEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unsignSEItems.
|
||||
* @param unsignSEItems the unsignSEItems to set
|
||||
*/
|
||||
public void setUnsignSEItems(String unsignSEItems) {
|
||||
this.unsignSEItems = unsignSEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for unsignEEItems.
|
||||
*
|
||||
* @return the unsignEEItems
|
||||
*/
|
||||
public int getUnsignEEItems() {
|
||||
return unsignEEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unsignEEItems.
|
||||
*
|
||||
* @param unsignEEItems the unsignEEItems to set
|
||||
*/
|
||||
public void setUnsignEEItems(int unsignEEItems) {
|
||||
this.unsignEEItems = unsignEEItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for invalidItemSourceVersion.
|
||||
*
|
||||
* @return the invalidItemSourceVersion
|
||||
*/
|
||||
public String getInvalidItemSourceVersion() {
|
||||
return invalidItemSourceVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the invalidItemSourceVersion.
|
||||
*
|
||||
* @param invalidItemSourceVersion the invalidItemSourceVersion to set
|
||||
*/
|
||||
public void setInvalidItemSourceVersion(String invalidItemSourceVersion) {
|
||||
this.invalidItemSourceVersion = invalidItemSourceVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for signByMigration.
|
||||
*
|
||||
* @return the signByMigration
|
||||
*/
|
||||
public int getSignByMigration() {
|
||||
return signByMigration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the signByMigration.
|
||||
*
|
||||
* @param signByMigration the signByMigration to set
|
||||
*/
|
||||
public void setSignByMigration(int signByMigration) {
|
||||
this.signByMigration = signByMigration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for gracePeriod.
|
||||
*
|
||||
* @return the gracePeriod
|
||||
*/
|
||||
public String getGracePeriod() {
|
||||
return gracePeriod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gracePeriod.
|
||||
*
|
||||
* @param gracePeriod the gracePeriod to set
|
||||
*/
|
||||
public void setGracePeriod(String gracePeriod) {
|
||||
this.gracePeriod = gracePeriod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for installDate.
|
||||
*
|
||||
* @return the installDate
|
||||
*/
|
||||
public String getInstallDate() {
|
||||
return installDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the installDate.
|
||||
*
|
||||
* @param installDate the installDate to set
|
||||
*/
|
||||
public void setInstallDate(String installDate) {
|
||||
this.installDate = installDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for projectCreateDate.
|
||||
*
|
||||
* @return the projectCreateDate
|
||||
*/
|
||||
public String getProjectCreateDate() {
|
||||
return projectCreateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the projectCreateDate.
|
||||
*
|
||||
* @param projectCreateDate the projectCreateDate to set
|
||||
*/
|
||||
public void setProjectCreateDate(String projectCreateDate) {
|
||||
this.projectCreateDate = projectCreateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for validMigrationToken.
|
||||
*
|
||||
* @return the validMigrationToken
|
||||
*/
|
||||
public String getValidMigrationToken() {
|
||||
return validMigrationToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the validMigrationToken.
|
||||
*
|
||||
* @param validMigrationToken the validMigrationToken to set
|
||||
*/
|
||||
public void setValidMigrationToken(String validMigrationToken) {
|
||||
this.validMigrationToken = validMigrationToken;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,462 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.pendo.properties;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class PendoTMapProperties implements IPendoDataProperties {
|
||||
|
||||
/**
|
||||
* Number of input columns
|
||||
*/
|
||||
@JsonProperty("input_columns")
|
||||
private int inputColumns;
|
||||
|
||||
/**
|
||||
* Number of output columns
|
||||
*/
|
||||
@JsonProperty("output_columns")
|
||||
private int outputColumns;
|
||||
|
||||
/**
|
||||
* Number of var columns
|
||||
*/
|
||||
@JsonProperty("var_columns")
|
||||
private int varColumns;
|
||||
|
||||
/**
|
||||
* Number of input tables which have at least 1 mapping to an output table
|
||||
*/
|
||||
@JsonProperty("number_of_sources")
|
||||
private int sourceNumber;
|
||||
|
||||
/**
|
||||
* Number of output tables have mapping from the main input table
|
||||
*/
|
||||
@JsonProperty("number_of_destinations")
|
||||
private int destinationNumber;
|
||||
|
||||
/**
|
||||
* Number of output tables
|
||||
*/
|
||||
@JsonProperty("number_of_outputs")
|
||||
private int outputNumber;
|
||||
|
||||
/**
|
||||
* Number of expressions without java transformation(expressions in input_columns/var_columns/output_columns but not
|
||||
* include filter expressions)
|
||||
*/
|
||||
@JsonProperty("simple_expressions")
|
||||
private int simpleExpressions;
|
||||
|
||||
/**
|
||||
* Number of expressions with java transformation(expressions in input_columns/var_columns/output_columns but not
|
||||
* include filter expressions)
|
||||
*/
|
||||
@JsonProperty("transformed_expressions")
|
||||
private int transformExpressions;
|
||||
|
||||
/**
|
||||
* Number of mappings(links) between input and var
|
||||
*/
|
||||
@JsonProperty("input_var_mapping")
|
||||
private int inputVarMappings;
|
||||
|
||||
/**
|
||||
* Number of mappings(links) between var and output
|
||||
*/
|
||||
@JsonProperty("var_output_mapping")
|
||||
private int varOutputMappings;
|
||||
|
||||
/**
|
||||
* Number of mappings(links) between input and output
|
||||
*/
|
||||
@JsonProperty("input_output_mapping")
|
||||
private int inputOutputMappings;
|
||||
|
||||
/**
|
||||
* Number of input columns which are mapped to multiple output columns, either mapped directly or mapped through the
|
||||
* Var column
|
||||
*/
|
||||
@JsonProperty("1-to-n mapping")
|
||||
private int oneToNMappings;
|
||||
|
||||
/**
|
||||
* Number of output columns which have multiple source columns, either input columns or var columns
|
||||
*/
|
||||
@JsonProperty("n-to-1 mapping")
|
||||
private int nToOneMappings;
|
||||
|
||||
/**
|
||||
* Number of mappings(links) between main input table and join tables
|
||||
*/
|
||||
@JsonProperty("join_mappings")
|
||||
private int joinMappingCounts;
|
||||
|
||||
/**
|
||||
* Number of left out join used in join table
|
||||
*/
|
||||
@JsonProperty("left_joins")
|
||||
private int leftJoinCounts;
|
||||
|
||||
/**
|
||||
* Number of inner join used in join table
|
||||
*/
|
||||
@JsonProperty("inner_joins")
|
||||
private int innerJoinCounts;
|
||||
|
||||
/**
|
||||
* Number of filter activated on input/output tables
|
||||
*/
|
||||
@JsonProperty("filters")
|
||||
private int filterCounts;
|
||||
|
||||
/**
|
||||
* Number of field types for each type in OUTPUT tables
|
||||
*/
|
||||
@JsonProperty("field_types")
|
||||
private String outputFieldTypes;
|
||||
|
||||
|
||||
/**
|
||||
* Getter for inputColumns.
|
||||
* @return the inputColumns
|
||||
*/
|
||||
public int getInputColumns() {
|
||||
return inputColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the inputColumns.
|
||||
* @param inputColumns the inputColumns to set
|
||||
*/
|
||||
public void setInputColumns(int inputColumns) {
|
||||
this.inputColumns = inputColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for outputColumns.
|
||||
* @return the outputColumns
|
||||
*/
|
||||
public int getOutputColumns() {
|
||||
return outputColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the outputColumns.
|
||||
* @param outputColumns the outputColumns to set
|
||||
*/
|
||||
public void setOutputColumns(int outputColumns) {
|
||||
this.outputColumns = outputColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for varColumns.
|
||||
* @return the varColumns
|
||||
*/
|
||||
public int getVarColumns() {
|
||||
return varColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the varColumns.
|
||||
* @param varColumns the varColumns to set
|
||||
*/
|
||||
public void setVarColumns(int varColumns) {
|
||||
this.varColumns = varColumns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for sourceNumber.
|
||||
* @return the sourceNumber
|
||||
*/
|
||||
public int getSourceNumber() {
|
||||
return sourceNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the sourceNumber.
|
||||
* @param sourceNumber the sourceNumber to set
|
||||
*/
|
||||
public void setSourceNumber(int sourceNumber) {
|
||||
this.sourceNumber = sourceNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for destinationNumber.
|
||||
* @return the destinationNumber
|
||||
*/
|
||||
public int getDestinationNumber() {
|
||||
return destinationNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the destinationNumber.
|
||||
* @param destinationNumber the destinationNumber to set
|
||||
*/
|
||||
public void setDestinationNumber(int destinationNumber) {
|
||||
this.destinationNumber = destinationNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for outputNumber.
|
||||
* @return the outputNumber
|
||||
*/
|
||||
public int getOutputNumber() {
|
||||
return outputNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the outputNumber.
|
||||
* @param outputNumber the outputNumber to set
|
||||
*/
|
||||
public void setOutputNumber(int outputNumber) {
|
||||
this.outputNumber = outputNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for simpleExpressions.
|
||||
*
|
||||
* @return the simpleExpressions
|
||||
*/
|
||||
public int getSimpleExpressions() {
|
||||
return simpleExpressions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the simpleExpressions.
|
||||
*
|
||||
* @param simpleExpressions the simpleExpressions to set
|
||||
*/
|
||||
public void setSimpleExpressions(int simpleExpressions) {
|
||||
this.simpleExpressions = simpleExpressions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for transformExpressions.
|
||||
*
|
||||
* @return the transformExpressions
|
||||
*/
|
||||
public int getTransformExpressions() {
|
||||
return transformExpressions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the transformExpressions.
|
||||
*
|
||||
* @param transformExpressions the transformExpressions to set
|
||||
*/
|
||||
public void setTransformExpressions(int transformExpressions) {
|
||||
this.transformExpressions = transformExpressions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for inputVarMappings.
|
||||
* @return the inputVarMappings
|
||||
*/
|
||||
public int getInputVarMappings() {
|
||||
return inputVarMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the inputVarMappings.
|
||||
* @param inputVarMappings the inputVarMappings to set
|
||||
*/
|
||||
public void setInputVarMappings(int inputVarMappings) {
|
||||
this.inputVarMappings = inputVarMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for varOutputMappings.
|
||||
* @return the varOutputMappings
|
||||
*/
|
||||
public int getVarOutputMappings() {
|
||||
return varOutputMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the varOutputMappings.
|
||||
* @param varOutputMappings the varOutputMappings to set
|
||||
*/
|
||||
public void setVarOutputMappings(int varOutputMappings) {
|
||||
this.varOutputMappings = varOutputMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for inputOutputMappings.
|
||||
* @return the inputOutputMappings
|
||||
*/
|
||||
public int getInputOutputMappings() {
|
||||
return inputOutputMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the inputOutputMappings.
|
||||
* @param inputOutputMappings the inputOutputMappings to set
|
||||
*/
|
||||
public void setInputOutputMappings(int inputOutputMappings) {
|
||||
this.inputOutputMappings = inputOutputMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for oneToNMappings.
|
||||
* @return the oneToNMappings
|
||||
*/
|
||||
public int getOneToNMappings() {
|
||||
return oneToNMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the oneToNMappings.
|
||||
* @param oneToNMappings the oneToNMappings to set
|
||||
*/
|
||||
public void setOneToNMappings(int oneToNMappings) {
|
||||
this.oneToNMappings = oneToNMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for nToOneMappings.
|
||||
* @return the nToOneMappings
|
||||
*/
|
||||
public int getnToOneMappings() {
|
||||
return nToOneMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the nToOneMappings.
|
||||
* @param nToOneMappings the nToOneMappings to set
|
||||
*/
|
||||
public void setnToOneMappings(int nToOneMappings) {
|
||||
this.nToOneMappings = nToOneMappings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for joinMappingCounts.
|
||||
* @return the joinMappingCounts
|
||||
*/
|
||||
public int getJoinMappingCounts() {
|
||||
return joinMappingCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the joinMappingCounts.
|
||||
* @param joinMappingCounts the joinMappingCounts to set
|
||||
*/
|
||||
public void setJoinMappingCounts(int joinMappingCounts) {
|
||||
this.joinMappingCounts = joinMappingCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for leftJoinCounts.
|
||||
* @return the leftJoinCounts
|
||||
*/
|
||||
public int getLeftJoinCounts() {
|
||||
return leftJoinCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the leftJoinCounts.
|
||||
* @param leftJoinCounts the leftJoinCounts to set
|
||||
*/
|
||||
public void setLeftJoinCounts(int leftJoinCounts) {
|
||||
this.leftJoinCounts = leftJoinCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for innerJoinCounts.
|
||||
* @return the innerJoinCounts
|
||||
*/
|
||||
public int getInnerJoinCounts() {
|
||||
return innerJoinCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the innerJoinCounts.
|
||||
* @param innerJoinCounts the innerJoinCounts to set
|
||||
*/
|
||||
public void setInnerJoinCounts(int innerJoinCounts) {
|
||||
this.innerJoinCounts = innerJoinCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for filterCounts.
|
||||
* @return the filterCounts
|
||||
*/
|
||||
public int getFilterCounts() {
|
||||
return filterCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the filterCounts.
|
||||
* @param filterCounts the filterCounts to set
|
||||
*/
|
||||
public void setFilterCounts(int filterCounts) {
|
||||
this.filterCounts = filterCounts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter for outputFieldTypes.
|
||||
* @return the outputFieldTypes
|
||||
*/
|
||||
public String getOutputFieldTypes() {
|
||||
return outputFieldTypes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the outputFieldTypes.
|
||||
* @param outputFieldTypes the outputFieldTypes to set
|
||||
*/
|
||||
public void setOutputFieldTypes(String outputFieldTypes) {
|
||||
this.outputFieldTypes = outputFieldTypes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.prefs;
|
||||
|
||||
import org.talend.commons.utils.network.ITalendNexusPrefConstants;
|
||||
|
||||
/**
|
||||
* Core preferences. Detailled comment <br/>
|
||||
*
|
||||
@@ -185,6 +187,8 @@ public interface ITalendCorePrefConstants {
|
||||
|
||||
public static final String PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT = "PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT"; //$NON-NLS-1$
|
||||
|
||||
public static final String NEXUS_TIMEOUT = ITalendNexusPrefConstants.NEXUS_TIMEOUT;
|
||||
|
||||
public static final String NEXUS_REFRESH_FREQUENCY = "NEXUS_REFRESH_FREQUENCY"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
|
||||
@@ -449,7 +449,7 @@ repository.rulesSql=SQL
|
||||
repository.rulesParser=Parser
|
||||
repository.rulesMatcher=Match
|
||||
repository.systemIndicators=System Indicators
|
||||
repository.userDefineIndicators=User-defined Indicators
|
||||
repository.userDefineIndicators=User Defined Indicators
|
||||
repository.userDefineIndicators.lib=lib
|
||||
repository.systemIndicators.advancedStatistics=Advanced Statistics
|
||||
repository.systemIndicators.businessRules=Business Rules
|
||||
|
||||
@@ -402,7 +402,7 @@ repository.SAPIDoc=SAP iDoc
|
||||
repository.SAPTable=SAP\u30C6\u30FC\u30D6\u30EB
|
||||
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
|
||||
repository.metadataSQLPatterns.alias=SQLTemplates
|
||||
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
|
||||
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
|
||||
repository.metadataFileDelimited.alias=DELIM
|
||||
repository.metadataTable=\u30E1\u30BF\u30C7\u30FC\u30BF\u30B9\u30AD\u30FC\u30DE
|
||||
repository.metadataColumn=\u30E1\u30BF\u30C7\u30FC\u30BF\u30AB\u30E9\u30E0
|
||||
@@ -449,7 +449,7 @@ repository.rulesSql=SQL
|
||||
repository.rulesParser=\u30D1\u30FC\u30B5\u30FC
|
||||
repository.rulesMatcher=\u4E00\u81F4
|
||||
repository.systemIndicators=\u30B7\u30B9\u30C6\u30E0\u30A4\u30F3\u30C7\u30A3\u30B1\u30FC\u30BF\u30FC
|
||||
repository.userDefineIndicators=\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u306E\u30A4\u30F3\u30B8\u30B1\u30FC\u30BF\u30FC
|
||||
repository.userDefineIndicators=\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30A4\u30F3\u30B8\u30B1\u30FC\u30BF\u30FC
|
||||
repository.userDefineIndicators.lib=lib
|
||||
repository.systemIndicators.advancedStatistics=\u8A73\u7D30\u7D71\u8A08
|
||||
repository.systemIndicators.businessRules=\u30D3\u30B8\u30CD\u30B9\u30EB\u30FC\u30EB
|
||||
|
||||
@@ -19,9 +19,7 @@ package org.talend.core.runtime.maven;
|
||||
public interface MavenConstants {
|
||||
|
||||
static final String NAME_GROUP_ID = "GROUP_ID";
|
||||
|
||||
static final String CLOUD_VERSION = "CLOUD_VERSION";
|
||||
|
||||
|
||||
static final String NAME_USER_VERSION = "USER_VERSION";
|
||||
|
||||
static final String NAME_PUBLISH_AS_SNAPSHOT = "PUBLISH_AS_SNAPSHOT";
|
||||
|
||||
@@ -48,10 +48,6 @@ public interface TalendProcessOptionConstants {
|
||||
|
||||
public static final int GENERATE_POM_NOT_CLEAR_CACHE = 1 << 11;
|
||||
|
||||
/**
|
||||
* for DQ clean item
|
||||
*/
|
||||
public static final int GENERATE_NO_RESET_DQ = 1 << 12;
|
||||
/**
|
||||
* clean options
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,4 @@ public interface IDesignerXMLMapperService extends IService {
|
||||
*/
|
||||
public boolean isVirtualComponent(final INode node);
|
||||
|
||||
public Object rebuildXmlMapData(final INode node);
|
||||
|
||||
}
|
||||
|
||||
@@ -94,11 +94,7 @@ public interface IDetectCVEService extends IService {
|
||||
if (art == null) {
|
||||
return null;
|
||||
}
|
||||
String gavc = String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
|
||||
if (!StringUtils.isEmpty(art.getClassifier())) {
|
||||
gavc += ":" + art.getClassifier();
|
||||
}
|
||||
return gavc;
|
||||
return String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -116,8 +112,6 @@ public interface IDetectCVEService extends IService {
|
||||
private String a;
|
||||
|
||||
private String v;
|
||||
|
||||
private String c;
|
||||
|
||||
/**
|
||||
* @return the g
|
||||
@@ -161,28 +155,8 @@ public interface IDetectCVEService extends IService {
|
||||
this.v = v;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the c
|
||||
*/
|
||||
public String getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param c the c to set
|
||||
*/
|
||||
public void setC(String c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public String getGAVString() {
|
||||
String gav = String.format("%s:%s:%s", g, a, v);
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
gav += ":" + c;
|
||||
}
|
||||
return gav;
|
||||
return String.format("%s:%s:%s", g, a, v);
|
||||
}
|
||||
|
||||
public String getGA() {
|
||||
@@ -194,16 +168,13 @@ public interface IDetectCVEService extends IService {
|
||||
return null;
|
||||
}
|
||||
String[] gavs = gav.split(":");
|
||||
if (gavs.length < 3) {
|
||||
if (gavs.length != 3) {
|
||||
return null;
|
||||
}
|
||||
GAV ret = new GAV();
|
||||
ret.setG(gavs[0]);
|
||||
ret.setA(gavs[1]);
|
||||
ret.setV(gavs[2]);
|
||||
if (gavs.length > 3) {
|
||||
ret.setC(gavs[3]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -213,7 +184,19 @@ public interface IDetectCVEService extends IService {
|
||||
}
|
||||
|
||||
String gav = mavenUri2GAV(mavenURI);
|
||||
return parseFromGAV(gav);
|
||||
if (StringUtils.isEmpty(gav)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String[] gavs = gav.split(":");
|
||||
if (gavs.length != 3) {
|
||||
return null;
|
||||
}
|
||||
GAV ret = new GAV();
|
||||
ret.setG(gavs[0]);
|
||||
ret.setA(gavs[1]);
|
||||
ret.setV(gavs[2]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public GAV clone() throws CloneNotSupportedException {
|
||||
@@ -241,12 +224,6 @@ public interface IDetectCVEService extends IService {
|
||||
sb.append(v);
|
||||
sb.append(",");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
sb.append("c:");
|
||||
sb.append(c);
|
||||
sb.append(",");
|
||||
}
|
||||
|
||||
if (sb.lastIndexOf(",") > 0) {
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
@@ -268,9 +245,6 @@ public interface IDetectCVEService extends IService {
|
||||
if (!StringUtils.isEmpty(v)) {
|
||||
hash += hash * 31 + v.hashCode();
|
||||
}
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
hash += hash * 31 + c.hashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -293,12 +267,8 @@ public interface IDetectCVEService extends IService {
|
||||
if (!StringUtils.equals(a, gav.getA())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!StringUtils.equals(v, gav.getV())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return StringUtils.equals(c, gav.getC());
|
||||
return StringUtils.equals(v, gav.getV());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ package org.talend.core.service;
|
||||
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.utils.json.JSONException;
|
||||
@@ -39,15 +38,4 @@ public interface IRemoteService extends IService {
|
||||
boolean isTokenUsed(String adminUrl) throws Exception;
|
||||
|
||||
String getPendoKeyFromLicense() throws Exception;
|
||||
|
||||
public boolean isCloudConnection();
|
||||
|
||||
public static IRemoteService get() {
|
||||
GlobalServiceRegister gsr = GlobalServiceRegister.getDefault();
|
||||
if (gsr.isServiceRegistered(IRemoteService.class)) {
|
||||
return gsr.getService(IRemoteService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,12 +128,6 @@ public interface IStudioLiteP2Service extends IService {
|
||||
|
||||
void setupTmcUpdate(IProgressMonitor monitor, IStudioUpdateConfig updateConfig) throws Exception;
|
||||
|
||||
boolean removeM2() throws Exception;
|
||||
|
||||
void saveRemoveM2(boolean remove) throws Exception;
|
||||
|
||||
void cleanM2(IProgressMonitor monitor);
|
||||
|
||||
public static IStudioLiteP2Service get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);
|
||||
|
||||
@@ -50,10 +50,6 @@ public interface IBrandingService extends IService {
|
||||
|
||||
public boolean isPoweredOnlyCamel();
|
||||
|
||||
/**
|
||||
* TP_All license also has the flag 'isCloud'
|
||||
* @return
|
||||
*/
|
||||
public default boolean isCloudLicense() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ repository.metadataSAPConnections.alias=SAP
|
||||
repository.SAPFunction=SAP\u30D5\u30A1\u30F3\u30AF\u30B7\u30E7\u30F3
|
||||
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
|
||||
repository.metadataSQLPatterns.alias=SQLTemplates
|
||||
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
|
||||
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
|
||||
repository.metadataFileDelimited.alias=DELIM
|
||||
repository.metadataFileLdif=LDIF\u30D5\u30A1\u30A4\u30EB
|
||||
repository.metadataFileLdif.alias=LDIF
|
||||
|
||||
@@ -144,7 +144,7 @@ public class ContextTreeTable {
|
||||
|
||||
private IContextModelManager manager;
|
||||
|
||||
private final static int fixedCheckBoxWidth = 90;
|
||||
private final static int fixedCheckBoxWidth = 30;
|
||||
|
||||
private final static int fixedTypeWidth = 90;
|
||||
|
||||
@@ -594,7 +594,7 @@ public class ContextTreeTable {
|
||||
// the columns after "type" will caculated by the contexts
|
||||
// 0=Name,1=Type,2=Comment.
|
||||
int j = 3;
|
||||
for (IContext context : contexts) {
|
||||
for (int i = 0; i < contexts.size(); i++) {
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CONTEXT_VALUE });
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CHECK_PROPERTY });
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_PROMPT_PROPERTY });
|
||||
|
||||
@@ -23,9 +23,9 @@ public class ContextTableConstants {
|
||||
|
||||
public static final String COLUMN_COMMENT_PROPERTY = "Comment"; //$NON-NLS-1$
|
||||
|
||||
public static final String COLUMN_CHECK_PROPERTY = "Enable prompt"; //$NON-NLS-1$
|
||||
public static final String COLUMN_CHECK_PROPERTY = ""; //$NON-NLS-1$
|
||||
|
||||
public static final String COLUMN_PROMPT_PROPERTY = "Prompt label"; //$NON-NLS-1$
|
||||
public static final String COLUMN_PROMPT_PROPERTY = "Prompt"; //$NON-NLS-1$
|
||||
|
||||
public static final String COLUMN_CONTEXT_VALUE = "Value"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ package org.talend.core.ui.preference.collector;
|
||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
@@ -33,7 +33,7 @@ public class TalendDataCollectorPreferenceInitializer extends AbstractPreference
|
||||
IPreferenceStore preferenceStore = CoreUIPlugin.getDefault().getPreferenceStore();
|
||||
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
|
||||
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_UPLOAD_PERIOD, 5);
|
||||
if(IRemoteService.get() != null && IRemoteService.get().isCloudConnection()) {
|
||||
if(IBrandingService.get().isCloudLicense()) {
|
||||
preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
import org.talend.core.ui.i18n.Messages;
|
||||
import org.talend.core.ui.token.TokenCollectorFactory;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class TalendDataCollectorPreferencePage extends FieldEditorPreferencePage
|
||||
|
||||
@Override
|
||||
protected void createFieldEditors() {
|
||||
if(!(IRemoteService.get() != null && IRemoteService.get().isCloudConnection())) {
|
||||
if(!IBrandingService.get().isCloudLicense()) {
|
||||
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED,
|
||||
Messages.getString("TalendDataCollectorPreferencePage_EnableCapture"), getFieldEditorParent())); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -12,10 +12,21 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@@ -30,19 +41,21 @@ import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.ui.runtime.image.OverlayImageProvider;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.model.general.LibraryInfo;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.ColumnNameChanged;
|
||||
import org.talend.core.model.metadata.IMetadataTable;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.MetadataToolHelper;
|
||||
import org.talend.core.model.metadata.QueryUtil;
|
||||
import org.talend.core.model.metadata.builder.ConvertionHelper;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.process.ElementParameterParser;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.RepositoryManager;
|
||||
@@ -57,7 +70,6 @@ import org.talend.core.model.utils.TalendTextUtils;
|
||||
import org.talend.core.prefs.PreferenceManipulator;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.services.ICoreTisService;
|
||||
import org.talend.core.services.IJobCheckService;
|
||||
import org.talend.core.utils.KeywordsValidator;
|
||||
import org.talend.designer.codegen.ICodeGeneratorService;
|
||||
@@ -65,9 +77,16 @@ import org.talend.designer.codegen.ITalendSynchronizer;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* DOC Administrator class global comment. Detailled comment
|
||||
@@ -331,15 +350,120 @@ public class CoreService implements ICoreService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void synchronizeMapptingXML(ITalendProcessJavaProject talendJavaProject) {
|
||||
//
|
||||
try {
|
||||
if (talendJavaProject == null) {
|
||||
return;
|
||||
}
|
||||
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
|
||||
if (url != null) {
|
||||
// set the project mappings url
|
||||
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
|
||||
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
|
||||
|
||||
File mappingSource = new File(url.getPath());
|
||||
FilenameFilter filter = new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
if (XmlUtil.isXMLFile(name)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
for (File file : mappingSource.listFiles(filter)) {
|
||||
String targetName = getTargetName(file);
|
||||
IFile targetFile = xmlMappingFolder.getFile(targetName);
|
||||
copyFile(file, targetFile);
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SystemException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void syncMappingsFileFromSystemToProject() {
|
||||
//
|
||||
RepositoryWorkUnit workUnit = new RepositoryWorkUnit("Sync mapping files from system to project") { //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
try {
|
||||
File sysMappingfolder = new File(MetadataTalendType.getSystemForderURLOfMappingsFile().getPath());
|
||||
IFolder projectMappingFolder = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject()).getFolder(MetadataTalendType.PROJECT_MAPPING_FOLDER);
|
||||
if (!projectMappingFolder.exists()) {
|
||||
projectMappingFolder.create(true, true, null);
|
||||
}
|
||||
for (File in : sysMappingfolder.listFiles()) {
|
||||
IFile out = projectMappingFolder.getFile(in.getName());
|
||||
copyFile(in, out);
|
||||
}
|
||||
} catch (SystemException | CoreException | IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
workUnit.setAvoidUnloadResources(true);
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
|
||||
}
|
||||
|
||||
public String getTargetName(File file) {
|
||||
String targetName = file.getName();
|
||||
try {
|
||||
DocumentBuilderFactory documentBuilderFactory = XmlUtils.getSecureDocumentBuilderFactory();
|
||||
DocumentBuilder analyser = documentBuilderFactory.newDocumentBuilder();
|
||||
Document document = analyser.parse(file);
|
||||
NodeList dbmsNodes = document.getElementsByTagName("dbms"); //$NON-NLS-1$
|
||||
String dbmsIdValue = "";
|
||||
for (int iDbms = 0; iDbms < dbmsNodes.getLength(); iDbms++) {
|
||||
Node dbmsNode = dbmsNodes.item(iDbms);
|
||||
NamedNodeMap dbmsAttributes = dbmsNode.getAttributes();
|
||||
dbmsIdValue = dbmsAttributes.getNamedItem("id").getNodeValue(); //$NON-NLS-1$
|
||||
|
||||
}
|
||||
if (dbmsIdValue != null && !"".equals(dbmsIdValue)) {
|
||||
final String[] fileNameSplit = targetName.split("_");
|
||||
String idA = "_id";
|
||||
String idB = "id_";
|
||||
final int indexA = dbmsIdValue.indexOf(idA);
|
||||
final int indexB = dbmsIdValue.indexOf(idB);
|
||||
String secondeName = "";
|
||||
if (indexA > 0) {
|
||||
secondeName = dbmsIdValue.substring(0, dbmsIdValue.length() - idA.length());
|
||||
} else if (indexB == 0) {
|
||||
secondeName = dbmsIdValue.substring(idB.length(), dbmsIdValue.length());
|
||||
} else if (indexA == -1 && indexB == -1) {
|
||||
secondeName = dbmsIdValue;
|
||||
}
|
||||
if (secondeName != null && !"".equals(secondeName)) {
|
||||
targetName = fileNameSplit[0] + "_" + secondeName.toLowerCase() + XmlUtil.FILE_XML_SUFFIX;
|
||||
}
|
||||
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return targetName;
|
||||
}
|
||||
|
||||
public void copyFile(File in, IFile out) throws CoreException, IOException {
|
||||
FileInputStream fis = new FileInputStream(in);
|
||||
if (out.exists()) {
|
||||
out.setContents(fis, true, false, null);
|
||||
} else {
|
||||
out.create(fis, true, null);
|
||||
}
|
||||
fis.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -402,31 +526,4 @@ public class CoreService implements ICoreService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception {
|
||||
ICoreTisService coreTisService = ICoreTisService.get();
|
||||
if (coreTisService != null) {
|
||||
return coreTisService.getSignatureVerifyResult(property, resourcePath, considerGP);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLicenseCustomer() {
|
||||
ICoreTisService coreTisService = ICoreTisService.get();
|
||||
if (coreTisService != null) {
|
||||
return coreTisService.getLicenseCustomer();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInValidGP() {
|
||||
ICoreTisService coreTisService = ICoreTisService.get();
|
||||
if (coreTisService != null) {
|
||||
return coreTisService.isInValidGP();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.conversions.IComponentConversion;
|
||||
import org.talend.core.model.components.conversions.RenameComponentConversion;
|
||||
import org.talend.core.model.components.conversions.DefaultRenameComponentConversion;
|
||||
import org.talend.core.model.components.filters.IComponentFilter;
|
||||
import org.talend.core.model.components.filters.NameComponentFilter;
|
||||
import org.talend.core.model.properties.Item;
|
||||
@@ -57,20 +56,6 @@ public class ModifyComponentsAction {
|
||||
throws PersistenceException {
|
||||
searchAndModify(item, item.getProcess(), filter, conversions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename component name
|
||||
* @param item job item
|
||||
* @param processType Process type
|
||||
* @param oldName old base name, for tck component, name does not include prefix "t", while for non tck components, name includes prefix "t".
|
||||
* @param newName new base name, for tck component, name does not include prefix "t", while for non tck components, name includes prefix "t".
|
||||
* @return
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public static boolean searchAndRenameComponent(Item item, ProcessType processType, String oldName, String newName) throws PersistenceException {
|
||||
return searchAndModify(item, processType, new NameComponentFilter(oldName), Arrays.<IComponentConversion> asList(new DefaultRenameComponentConversion(oldName, newName)));
|
||||
|
||||
}
|
||||
|
||||
public static boolean searchAndModify(Item item, ProcessType processType, IComponentFilter filter,
|
||||
List<IComponentConversion> conversions) throws PersistenceException {
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.components.conversions;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.talend.commons.runtime.model.components.IComponentConstants;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ConnectionType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.SubjobType;
|
||||
|
||||
/**
|
||||
* @author bhe created on Jul 6, 2022
|
||||
*
|
||||
*/
|
||||
public class DefaultRenameComponentConversion implements IComponentConversion {
|
||||
|
||||
private String newName;
|
||||
|
||||
private String oldName;
|
||||
|
||||
/**
|
||||
* Rename component name
|
||||
*
|
||||
* @param oldName old base name of the component, e.g. NetSuiteV2019Input
|
||||
* @param newName new base name of the component, e.g. NetSuiteNewInput
|
||||
*/
|
||||
public DefaultRenameComponentConversion(String oldName, String newName) {
|
||||
super();
|
||||
this.newName = newName;
|
||||
this.oldName = oldName;
|
||||
}
|
||||
|
||||
public void transform(NodeType node) {
|
||||
node.setComponentName(newName);
|
||||
ProcessType item = (ProcessType) node.eContainer();
|
||||
String oldNodeUniqueName = ComponentUtilities.getNodeUniqueName(node);
|
||||
ComponentUtilities.setNodeUniqueName(node, oldNodeUniqueName.replaceAll(oldName, newName));
|
||||
replaceAllInAllNodesParameterValue(item, this.oldName, this.newName);
|
||||
}
|
||||
|
||||
protected static void replaceAllInAllNodesParameterValue(ProcessType item, String oldName, String newName) {
|
||||
for (Object o : item.getNode()) {
|
||||
NodeType nt = (NodeType) o;
|
||||
ComponentUtilities.replaceInNodeParameterValue(nt, oldName, newName);
|
||||
EList metaList = nt.getMetadata();
|
||||
if (metaList != null) {
|
||||
if (!metaList.isEmpty()) {
|
||||
for (Object obj : metaList) {
|
||||
MetadataType meta = (MetadataType) obj;
|
||||
if (meta.getName().contains(oldName)) {
|
||||
meta.setName(meta.getName().replaceAll(oldName, newName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Object o : item.getConnection()) {
|
||||
ConnectionType currentConnection = (ConnectionType) o;
|
||||
if (currentConnection.getSource().contains(oldName)) {
|
||||
currentConnection.setSource(currentConnection.getSource().replaceAll(oldName, newName));
|
||||
}
|
||||
if (currentConnection.getTarget().contains(oldName)) {
|
||||
currentConnection.setTarget(currentConnection.getTarget().replaceAll(oldName, newName));
|
||||
}
|
||||
if (currentConnection.getMetaname().contains(oldName)) {
|
||||
currentConnection.setMetaname(currentConnection.getMetaname().replaceAll(oldName, newName));
|
||||
}
|
||||
|
||||
if ("RUN_IF".equals(currentConnection.getConnectorName())) {
|
||||
for (Object obj : currentConnection.getElementParameter()) {
|
||||
ElementParameterType type = (ElementParameterType) obj;
|
||||
if ("CONDITION".equals(type.getName())) {
|
||||
if (type.getValue() != null && type.getValue().contains(oldName)) {
|
||||
String replaceAll = type.getValue().replaceAll(oldName, newName);
|
||||
type.setValue(replaceAll);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Object o : item.getSubjob()) {
|
||||
SubjobType sj = (SubjobType) o;
|
||||
for (Object obj : sj.getElementParameter()) {
|
||||
ElementParameterType p = (ElementParameterType) obj;
|
||||
if (p.getName().equals(IComponentConstants.UNIQUE_NAME)) {
|
||||
if (p.getValue() != null && p.getValue().contains(oldName)) {
|
||||
String replaceAll = p.getValue().replaceAll(oldName, newName);
|
||||
p.setValue(replaceAll);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getNewName() {
|
||||
return this.newName;
|
||||
}
|
||||
|
||||
public void setNewName(String newName) {
|
||||
this.newName = newName;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.osgi.service.prefs.BackingStoreException;
|
||||
@@ -85,12 +84,6 @@ public interface ICoreTisService extends IService {
|
||||
|
||||
public void afterImport (Property property) throws PersistenceException;
|
||||
|
||||
Integer getSignatureVerifyResult(Property property, IPath resourcePath, boolean considerGP) throws Exception;
|
||||
|
||||
String getLicenseCustomer();
|
||||
|
||||
boolean isInValidGP();
|
||||
|
||||
boolean hasNewPatchInPatchesFolder();
|
||||
|
||||
boolean isDefaultLicenseAndProjectType();
|
||||
|
||||
@@ -59,6 +59,7 @@ import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.commons.utils.time.TimeMeasure;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ICoreService;
|
||||
import org.talend.core.ITDQItemService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.context.Context;
|
||||
@@ -101,11 +102,13 @@ import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.model.routines.RoutinesUtil;
|
||||
import org.talend.core.model.utils.JavaResourcesHelper;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.process.LastGenerationInfo;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.process.TalendProcessOptionConstants;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.runtime.repository.build.BuildExportManager;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
import org.talend.core.service.IResourcesDependenciesService;
|
||||
@@ -136,6 +139,8 @@ public class ProcessorUtilities {
|
||||
|
||||
private static Logger log = Logger.getLogger(ProcessorUtilities.class);
|
||||
|
||||
public static final String PROP_MAPPINGS_URL = "talend.mappings.url"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* For generating code in CI without param -pl
|
||||
*/
|
||||
@@ -278,19 +283,6 @@ public class ProcessorUtilities {
|
||||
needExportItemsForDQ = false;
|
||||
}
|
||||
|
||||
public static void resetExportConfig(boolean noResetDq) {
|
||||
interpreter = null;
|
||||
codeLocation = null;
|
||||
libraryPath = null;
|
||||
exportConfig = false;
|
||||
exportAsOSGI = false;
|
||||
exportTimeStamp = null;
|
||||
exportJobAsMicroService = false;
|
||||
if (!noResetDq) {
|
||||
needExportItemsForDQ = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getInterpreter() {
|
||||
return interpreter;
|
||||
}
|
||||
@@ -742,10 +734,30 @@ public class ProcessorUtilities {
|
||||
boolean hasDynamicMetadata = hasMetadataDynamic(currentProcess, jobInfo);
|
||||
LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), hasDynamicMetadata);
|
||||
if (hasDynamicMetadata) {
|
||||
ITalendProcessJavaProject talendJavaProject = jobInfo.getProcessor().getTalendJavaProject();
|
||||
if (talendJavaProject != null) {
|
||||
IFolder xmlMappingFolder = talendJavaProject.getResourceSubFolder(null, JavaUtils.JAVA_XML_MAPPING);
|
||||
MetadataTalendType.syncMappingFiles(xmlMappingFolder.getLocation().toFile(), true);
|
||||
try {
|
||||
URL url = MetadataTalendType.getProjectForderURLOfMappingsFile();
|
||||
if (url != null) {
|
||||
// set the project mappings url
|
||||
System.setProperty(ProcessorUtilities.PROP_MAPPINGS_URL, url.toString()); // $NON-NLS-1$
|
||||
|
||||
IFolder xmlMappingFolder = jobInfo.getProcessor().getTalendJavaProject().getResourceSubFolder(null,
|
||||
JavaUtils.JAVA_XML_MAPPING);
|
||||
ProjectPreferenceManager manager = CoreRuntimePlugin.getInstance().getProjectPreferenceManager();
|
||||
boolean updated = manager.getBoolean(MetadataTalendType.UPDATED_MAPPING_FILES);
|
||||
if ((xmlMappingFolder.members().length == 0 || updated)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
ICoreService coreService =
|
||||
GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
coreService.synchronizeMapptingXML(jobInfo.getProcessor().getTalendJavaProject());
|
||||
// reset
|
||||
if (updated) {
|
||||
manager.setValue(MetadataTalendType.UPDATED_MAPPING_FILES, false);
|
||||
manager.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1941,6 +1953,12 @@ public class ProcessorUtilities {
|
||||
|
||||
private static void updateCodeSources() throws ProcessorException {
|
||||
if (isRemoteProject()) {
|
||||
// TESB-29071
|
||||
try {
|
||||
ProxyRepositoryFactory.getInstance().initialize();
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.ROUTINES);
|
||||
RepositoryManager.syncRoutineAndJoblet(ERepositoryObjectType.BEANS);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
<version>1.68</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
<version>1.68</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
<version>1.68</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-io</groupId>
|
||||
@@ -123,7 +123,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
@@ -155,11 +155,6 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache-extras.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
<version>2.0b6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -38,58 +38,8 @@
|
||||
<dependency>
|
||||
<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>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>30.0-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -98,7 +48,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
</parent>
|
||||
<artifactId>studio-tcompv1-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.47.1</tcomp.version>
|
||||
<tcomp.version>1.45.2</tcomp.version>
|
||||
<slf4j.version>1.7.32</slf4j.version>
|
||||
<reload4j.version>1.2.19</reload4j.version>
|
||||
</properties>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
@@ -58,7 +58,7 @@
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -70,7 +70,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
@@ -119,7 +119,7 @@
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
@@ -25,22 +25,8 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson</groupId>
|
||||
<artifactId>jackson-bom</artifactId>
|
||||
@@ -101,12 +87,7 @@
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo message="Unzip old repository..." />
|
||||
<unzip src="${basedir}/../repository/maven_repository.zip" dest="${basedir}/../tmp/">
|
||||
<patternset>
|
||||
<exclude name="repository/org/apache/maven/maven-artifact-manager/2.0.9/"/>
|
||||
<exclude name="repository/org/apache/maven/maven-artifact-manager/2.0.6/"/>
|
||||
</patternset>
|
||||
</unzip>
|
||||
<unzip src="${basedir}/../repository/maven_repository.zip" dest="${basedir}/../tmp/" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@@ -68,7 +68,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -100,7 +100,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -147,7 +147,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -199,12 +199,12 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -228,11 +228,6 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-settings</artifactId>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -259,29 +254,19 @@
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-settings</artifactId>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<version>2.7</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-settings</artifactId>
|
||||
<version>3.8.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -61,7 +61,6 @@ import org.eclipse.osgi.util.NLS;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.core.prefs.SecurityPreferenceConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IRemoteService;
|
||||
import org.talend.utils.security.StudioEncryption;
|
||||
|
||||
/**
|
||||
@@ -122,7 +121,7 @@ public class TalendMavenLaunchDelegate extends JavaLaunchDelegate implements Mav
|
||||
this.extensionsSupport = MavenLaunchExtensionsSupport.create(configuration, launch);
|
||||
|
||||
log.info("" + getWorkingDirectory(configuration)); //$NON-NLS-1$
|
||||
log.info(" mvn" + getProgramArguments(configuration, IRemoteService.get() == null ? false: IRemoteService.get().isCloudConnection())); //$NON-NLS-1$
|
||||
log.info(" mvn" + getProgramArguments(configuration, true)); //$NON-NLS-1$
|
||||
this.programArguments = null;
|
||||
|
||||
extensionsSupport.configureSourceLookup(configuration, launch, monitor);
|
||||
|
||||
@@ -241,8 +241,7 @@ public class BuildCacheManager {
|
||||
property.getVersion(), true);
|
||||
if (obj != null) {
|
||||
IRunProcessService.get().generatePom(obj.getProperty().getItem(),
|
||||
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE
|
||||
| TalendProcessOptionConstants.GENERATE_NO_RESET_DQ);
|
||||
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,7 +331,7 @@ public class BuildCacheManager {
|
||||
|
||||
private ITalendProcessJavaProject getTalendJobJavaProject(Property property) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
return service.getTalendJobJavaProject(property);
|
||||
}
|
||||
@@ -348,7 +347,7 @@ public class BuildCacheManager {
|
||||
|
||||
private boolean isBuildJob() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
return service.isExportConfig();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
|
||||
/**
|
||||
@@ -124,7 +123,6 @@ public class MavenPomSynchronizer {
|
||||
if (!jProject.isOpen()) {
|
||||
jProject.open(monitor);
|
||||
}
|
||||
|
||||
// empty the src/main/java...
|
||||
IFolder srcFolder = codeProject.getSrcFolder();
|
||||
codeProject.cleanFolder(monitor, srcFolder);
|
||||
@@ -133,12 +131,10 @@ public class MavenPomSynchronizer {
|
||||
IFolder resourcesFolder = codeProject.getExternalResourcesFolder();
|
||||
codeProject.cleanFolder(monitor, resourcesFolder);
|
||||
|
||||
// CI mode, need to depend on maven to clean target folder or not.
|
||||
if (!ProcessorUtilities.isCIMode()) {
|
||||
// empty the outputs, target
|
||||
IFolder targetFolder = codeProject.getTargetFolder();
|
||||
codeProject.cleanFolder(monitor, targetFolder);
|
||||
}
|
||||
// empty the outputs, target
|
||||
IFolder targetFolder = codeProject.getTargetFolder();
|
||||
codeProject.cleanFolder(monitor, targetFolder);
|
||||
|
||||
// empty the src/test/java
|
||||
IFolder testSrcFolder = codeProject.getTestSrcFolder();
|
||||
codeProject.cleanFolder(monitor, testSrcFolder);
|
||||
|
||||
@@ -140,12 +140,8 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
|
||||
Exclusion jacksonExclusion = new Exclusion();
|
||||
jacksonExclusion.setGroupId("com.fasterxml.jackson.core"); //$NON-NLS-1$
|
||||
jacksonExclusion.setArtifactId("jackson-databind "); //$NON-NLS-1$
|
||||
Exclusion configuration2Exclusion = new Exclusion();
|
||||
configuration2Exclusion.setGroupId("org.apache.commons"); //$NON-NLS-1$
|
||||
configuration2Exclusion.setArtifactId("commons-configuration2"); //$NON-NLS-1$
|
||||
dependency.addExclusion(exclusion);
|
||||
dependency.addExclusion(jacksonExclusion);
|
||||
dependency.addExclusion(configuration2Exclusion);
|
||||
}
|
||||
existedDependencies.add(dependency);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
|
||||
if (ProcessUtils.isTestContainer(process)) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
|
||||
ITestContainerProviderService testService = GlobalServiceRegister.getDefault()
|
||||
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
|
||||
.getService(ITestContainerProviderService.class);
|
||||
try {
|
||||
property = testService.getParentJobItem(property.getItem()).getProperty();
|
||||
@@ -231,7 +231,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
Dependency mavenCoreDep = new Dependency();
|
||||
mavenCoreDep.setGroupId("org.apache.maven");
|
||||
mavenCoreDep.setArtifactId("maven-core");
|
||||
mavenCoreDep.setVersion("3.8.6");
|
||||
mavenCoreDep.setVersion("3.8.3");
|
||||
|
||||
shade.getDependencies().add(guavaDep);
|
||||
shade.getDependencies().add(codecDep);
|
||||
@@ -454,7 +454,6 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
*
|
||||
* @param hasLoopDependency the hasLoopDependency to set
|
||||
*/
|
||||
@Override
|
||||
public void setHasLoopDependency(boolean hasLoopDependency) {
|
||||
this.hasLoopDependency = hasLoopDependency;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ public class PomIdsHelper {
|
||||
|
||||
private static Map<String, ProjectPreferenceManager> preferenceManagers = new HashMap<>();
|
||||
|
||||
private static final String ARTIFACT_ID = "artifactId";
|
||||
|
||||
/**
|
||||
* get current project groupId.
|
||||
*/
|
||||
@@ -163,27 +161,6 @@ public class PomIdsHelper {
|
||||
return getCodesVersion(projectTechName);
|
||||
}
|
||||
|
||||
public static String getGroupId(Property property) {
|
||||
if (null == getOldId(property)) {
|
||||
final String path = property.getItem().getState().getPath();
|
||||
if (null != path) {
|
||||
return path.replace('/', '.');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getOldId(Property property) {
|
||||
final String oldId = (String) property.getAdditionalProperties().get(ARTIFACT_ID);
|
||||
if (null != oldId) {
|
||||
final String name = property.getLabel();
|
||||
if (oldId.startsWith(name + '_')) {
|
||||
return oldId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String getJobGroupId(String name) {
|
||||
if (name != null && !name.trim().isEmpty()) {
|
||||
@@ -306,36 +283,6 @@ public class PomIdsHelper {
|
||||
return version;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return "<jobVersion>-<projectName>".
|
||||
*/
|
||||
public static String getJobFeatureVersion(Property property, String bundleVersion) {
|
||||
String version = null;
|
||||
if (property != null) {
|
||||
boolean useSnapshot = false;
|
||||
if (property.getAdditionalProperties() != null) {
|
||||
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
|
||||
// APPINT-34581 - try to take cloud version if custom does not persist
|
||||
|
||||
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
|
||||
}
|
||||
if(version == null) {
|
||||
version = (String) property.getAdditionalProperties().get(MavenConstants.CLOUD_VERSION);
|
||||
}
|
||||
if(version == null) {
|
||||
version = bundleVersion;
|
||||
}
|
||||
if (version == null) {
|
||||
version = VersionUtils.getPublishVersion(property.getVersion());
|
||||
}
|
||||
if (useSnapshot) {
|
||||
version += MavenConstants.SNAPSHOT;
|
||||
}
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
public static String getJobVersion(JobInfo jobInfo) {
|
||||
if (jobInfo != null) {
|
||||
return jobInfo.getJobVersion();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/stax2-api-4.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-asl-4.4.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/woden-api-1.0M9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axiom-api-1.2.13.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axiom-impl-1.2.13.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/neethi-3.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/wstx-asl-3.2.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlschema-core-2.2.1.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
|
||||
@@ -20,13 +20,12 @@ Bundle-ClassPath: lib/axiom-api-1.3.0.jar,
|
||||
lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
|
||||
lib/mail-1.4.jar,
|
||||
lib/neethi-3.0.1.jar,
|
||||
lib/wstx-asl-3.2.9.jar,
|
||||
lib/xmlschema-core-2.2.1.jar,
|
||||
lib/woden-api-1.0M9.jar,
|
||||
lib/axis2-codegen-1.8.0.jar,
|
||||
lib/axis2-java2wsdl-1.8.0.jar,
|
||||
lib/axis2-metadata-1.8.0.jar,
|
||||
lib/woodstox-core-asl-4.4.1.jar,
|
||||
lib/stax2-api-4.2.1.jar,
|
||||
.
|
||||
Export-Package: com.ctc.wstx.api,
|
||||
com.ctc.wstx.cfg,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -80,16 +80,6 @@
|
||||
<groupId>org.apache.ws.commons.axiom</groupId>
|
||||
<artifactId>axiom-impl</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>woodstox-core-asl</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>stax2-api</artifactId>
|
||||
<version>4.2.1</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-core-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-core-3.0.3.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="class"/>
|
||||
|
||||
@@ -4,38 +4,22 @@ Bundle-Name: Lucene plug-in
|
||||
Bundle-SymbolicName: org.talend.libraries.apache.lucene
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Bundle-ClassPath: lib/lucene-core-8.11.2.jar,
|
||||
Bundle-ClassPath: lib/lucene-core-3.0.3.jar,
|
||||
.
|
||||
Export-Package: org.apache.lucene,
|
||||
org.apache.lucene.analysis,
|
||||
org.apache.lucene.analysis.standard,
|
||||
org.apache.lucene.analysis.tokenattributes,
|
||||
org.apache.lucene.codecs,
|
||||
org.apache.lucene.codecs.blocktree,
|
||||
org.apache.lucene.codecs.compressing,
|
||||
org.apache.lucene.codecs.lucene50,
|
||||
org.apache.lucene.codecs.lucene60,
|
||||
org.apache.lucene.codecs.lucene80,
|
||||
org.apache.lucene.codecs.lucene84,
|
||||
org.apache.lucene.codecs.lucene86,
|
||||
org.apache.lucene.codecs.lucene87,
|
||||
org.apache.lucene.codecs.perfield,
|
||||
org.apache.lucene.document,
|
||||
org.apache.lucene.geo,
|
||||
org.apache.lucene.index,
|
||||
org.apache.lucene.messages,
|
||||
org.apache.lucene.queryParser,
|
||||
org.apache.lucene.search,
|
||||
org.apache.lucene.search.comparators,
|
||||
org.apache.lucene.search.similarities,
|
||||
org.apache.lucene.search.function,
|
||||
org.apache.lucene.search.payloads,
|
||||
org.apache.lucene.search.spans,
|
||||
org.apache.lucene.store,
|
||||
org.apache.lucene.util,
|
||||
org.apache.lucene.util.automaton,
|
||||
org.apache.lucene.util.bkd,
|
||||
org.apache.lucene.util.compress,
|
||||
org.apache.lucene.util.fst,
|
||||
org.apache.lucene.util.graph,
|
||||
org.apache.lucene.util.hppc,
|
||||
org.apache.lucene.util.mutable,
|
||||
org.apache.lucene.util.packed
|
||||
org.apache.lucene.util.cache
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-BundleShape: dir
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
output.. = class/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/lucene-core-8.11.2.jar
|
||||
lib/lucene-core-2.9.3.jar,\
|
||||
lib/lucene-core-3.0.3.jar
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,36 +9,4 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.apache.lucene</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<properties>
|
||||
<lucene.version>8.11.2</lucene.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-backward-codecs-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-core-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-queries-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-8.11.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-8.3.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-core-8.3.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-queries-8.3.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-8.3.1.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
|
||||
@@ -5,11 +5,10 @@ Bundle-SymbolicName: org.talend.libraries.apache.lucene8
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: lib/lucene-analyzers-common-8.11.2.jar,
|
||||
lib/lucene-backward-codecs-8.11.2.jar,
|
||||
lib/lucene-core-8.11.2.jar,
|
||||
lib/lucene-queries-8.11.2.jar,
|
||||
lib/lucene-queryparser-8.11.2.jar
|
||||
Bundle-ClassPath: lib/lucene-analyzers-common-8.3.1.jar,
|
||||
lib/lucene-core-8.3.1.jar,
|
||||
lib/lucene-queries-8.3.1.jar,
|
||||
lib/lucene-queryparser-8.3.1.jar
|
||||
Export-Package: org.apache.lucene,
|
||||
org.apache.lucene.analysis,
|
||||
org.apache.lucene.analysis.ar,
|
||||
@@ -79,8 +78,6 @@ Export-Package: org.apache.lucene,
|
||||
org.apache.lucene.codecs.lucene60,
|
||||
org.apache.lucene.codecs.lucene70,
|
||||
org.apache.lucene.codecs.lucene80,
|
||||
org.apache.lucene.codecs.lucene84,
|
||||
org.apache.lucene.codecs.lucene86,
|
||||
org.apache.lucene.codecs.perfield,
|
||||
org.apache.lucene.collation,
|
||||
org.apache.lucene.collation.tokenattributes,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/lucene-analyzers-common-8.11.2.jar,\
|
||||
lib/lucene-backward-codecs-8.11.2.jar,\
|
||||
lib/lucene-core-8.11.2.jar,\
|
||||
lib/lucene-queries-8.11.2.jar,\
|
||||
lib/lucene-queryparser-8.11.2.jar
|
||||
lib/lucene-analyzers-common-8.3.1.jar,\
|
||||
lib/lucene-core-8.3.1.jar,\
|
||||
lib/lucene-queries-8.3.1.jar,\
|
||||
lib/lucene-queryparser-8.3.1.jar
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,57 +9,4 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.apache.lucene8</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<properties>
|
||||
<lucene.version>8.11.2</lucene.version>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-analyzers-common</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-backward-codecs</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-queries</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-queryparser</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="lib" path="lib/h2-2.1.214.jar"/>
|
||||
<classpathentry kind="lib" path="lib/h2-2.1.210.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: H2
|
||||
Bundle-SymbolicName: org.talend.libraries.jdbc.h2
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/h2-2.1.214.jar
|
||||
lib/h2-2.1.210.jar
|
||||
Export-Package: org.h2,
|
||||
org.h2.api;uses:="org.h2.command.ddl,org.h2.table",
|
||||
org.h2.bnf;uses:="org.h2.server.web",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/h2-2.1.214.jar
|
||||
lib/h2-2.1.210.jar
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<artifactItem>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>2.1.214</version>
|
||||
<version>2.1.210</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
|
||||
@@ -243,39 +243,10 @@ public class JSONObject {
|
||||
*
|
||||
* @param bean An object that has getter methods that should be used to make a JSONObject.
|
||||
*/
|
||||
@Deprecated
|
||||
public JSONObject(Object bean) {
|
||||
this();
|
||||
populateMap(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONObject from an Object using bean getters. It reflects on all of the public methods of the object.
|
||||
* For each of the methods with no parameters and a name starting with <code>"get"</code> or <code>"is"</code>
|
||||
* followed by an uppercase letter, the method is invoked, and a key and the value returned from the getter method
|
||||
* are put into the new JSONObject.
|
||||
*
|
||||
* The key is formed by removing the <code>"get"</code> or <code>"is"</code> prefix. If the second remaining
|
||||
* character is not upper case, then the first character is converted to lower case.
|
||||
*
|
||||
* For example, if an object has a method named <code>"getName"</code>, and if the result of calling
|
||||
* <code>object.getName()</code> is <code>"Larry Fine"</code>, then the JSONObject will contain
|
||||
* <code>"name": "Larry Fine"</code>.
|
||||
*
|
||||
* @param bean An object that has getter methods that should be used to make a JSONObject.
|
||||
* @param expectedClass Bean must be the instance of this class, for safe to avoid evil script inject
|
||||
*/
|
||||
public JSONObject(Object bean, Class<?> expectedClass) {
|
||||
this();
|
||||
|
||||
Class<?> clazz = bean.getClass();
|
||||
if((clazz == expectedClass) || (expectedClass!=null && expectedClass.isAssignableFrom(clazz))) {
|
||||
populateMap(bean);
|
||||
return;
|
||||
}
|
||||
|
||||
throw new JSONException("expectedClass doesn't match the bean or is null");
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONObject from an Object, using reflection to find the public members. The resulting JSONObject's
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user