Compare commits

...

2 Commits

Author SHA1 Message Date
Abdulhamid Rashankar
2faedea14c APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage (#8725) (#8729)
* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage

* APPINT-35490:App & API Integration - Studio Metrics gathering: build types & APIs usage
2023-05-02 16:03:12 +02:00
jiezhang-tlnd
7582eb54e1 Revert "fix(TUP-38314)Guess schema fails with the warning (#8583)" (#8721) (#8722)
This reverts commit 6e720df1cc.
2023-04-27 17:37:17 +08:00
4 changed files with 182 additions and 183 deletions

View File

@@ -46,8 +46,6 @@ public abstract class AbstractGuessSchemaProcess {
protected static final String DEFAULT_JOB_NAME = "Mock_job_for_Guess_schema"; //$NON-NLS-1$
protected static String TEMPFILE_APPEND_NAME = "GuessSchemaDelimitedFile"; //$NON-NLS-1$
protected static final String ENABLE_LOG4J_FOR_GUESSSCHEMA = "enableLog4jForGuessSchema";
protected static final int maximumRowsToPreview = CorePlugin.getDefault().getPreferenceStore()
.getInt(ITalendCorePrefConstants.PREVIEW_LIMIT);
@@ -176,14 +174,6 @@ public abstract class AbstractGuessSchemaProcess {
return mockProperty;
}
public static Boolean isEnableLog4jForGuessSchema() {
String isEnableLog4jForGuessSchema = System.getProperty(AbstractGuessSchemaProcess.ENABLE_LOG4J_FOR_GUESSSCHEMA, "false");//$NON-NLS-1$
Boolean isEnableLog4j = Boolean.valueOf(isEnableLog4jForGuessSchema);
return isEnableLog4j;
}
// write content to a temp .csv file
protected IPath buildTempCSVFilename() {

View File

@@ -32,7 +32,6 @@ import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.properties.Property;
import org.talend.core.ui.component.ComponentsFactoryProvider;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.ui.editor.nodecontainer.NodeContainer;
import org.talend.designer.core.ui.editor.nodes.Node;
import org.talend.designer.core.ui.editor.process.EDatabaseComponentName;
@@ -79,12 +78,6 @@ public class GuessSchemaProcess extends AbstractGuessSchemaProcess {
Property property = getProperty();
Process process = null;
process = new Process(property);
IElementParameter log4jElemParam = process.getElementParameter(EParameterName.LOG4J_ACTIVATE.getName());
if (log4jElemParam != null) {
Boolean isEnableLog4j = AbstractGuessSchemaProcess.isEnableLog4jForGuessSchema();
log4jElemParam.setValue(isEnableLog4j);
}
setProcess(process);
INode node = getNode();
configContext(process, node);

View File

@@ -72,43 +72,43 @@ public class TosTokenCollector extends AbstractTokenCollector {
private static final String NB_ROUTE_MS = "nb.route.ms";
private static final String NB_ROUTE_OSGI = "nb.route.osgi";
private static final String NB_ROUTE_OSGI = "nb.route.osgi";
private static final String NB_ROUTERESTDS_APIFILE_MS = "nb.routerestds.apifile.ms";
private static final String NB_ROUTERESTDS_APIFILE_MS = "nb.routerestds.apifile.ms";
private static final String NB_ROUTERESTDS_APIDESIGNER_MS = "nb.routerestds.apidesigner.ms";
private static final String NB_ROUTERESTDS_APIDESIGNER_MS = "nb.routerestds.apidesigner.ms";
private static final String NB_ROUTERESTDS_APIFILE_OSGI = "nb.routerestds.apifile.osgi";
private static final String NB_ROUTERESTDS_APIFILE_OSGI = "nb.routerestds.apifile.osgi";
private static final String NB_ROUTERESTDS_APIDESIGNER_OSGI = "nb.routerestds.apidesigner.osgi";
private static final String NB_ROUTERESTDS_APIDESIGNER_OSGI = "nb.routerestds.apidesigner.osgi";
private static final String NB_ROUTERESTDS_BUILTIN_MS = "nb.routerestds.builtin.ms";
private static final String NB_ROUTERESTDS_BUILTIN_MS = "nb.routerestds.builtin.ms";
private static final String NB_ROUTERESTDS_BUILTIN_OSGI = "nb.routerestds.builtin.osgi";
private static final String NB_ROUTERESTDS_BUILTIN_OSGI = "nb.routerestds.builtin.osgi";
private static final String NB_ROUTESOAPDS_MS = "nb.routesoapds.ms";
private static final String NB_ROUTESOAPDS_MS = "nb.routesoapds.ms";
private static final String NB_ROUTESOAPDS_OSGI = "nb.routesoapds.osgi";
private static final String NB_ROUTESOAPDS_OSGI = "nb.routesoapds.osgi";
private static final String ROUTE_MICROSERVICE = "ROUTE_MICROSERVICE";
private static final String ROUTE_MICROSERVICE = "ROUTE_MICROSERVICE";
private static final String ROUTE = "ROUTE";
private static final String ROUTE = "ROUTE";
private static final String REST_MS = "REST_MS";
private static final String REST_MS = "REST_MS";
private static final String OSGI = "OSGI";
private static final String OSGI = "OSGI";
private static final String NB_DSREST_APIFILE_MS = "nb.dsrest.apifile.ms";
private static final String NB_DSREST_APIFILE_MS = "nb.dsrest.apifile.ms";
private static final String NB_DSREST_APIDESIGNER_MS = "nb.dsrest.apidesigner.ms";
private static final String NB_DSREST_APIDESIGNER_MS = "nb.dsrest.apidesigner.ms";
private static final String NB_DSREST_APIFILE_OSGI = "nb.dsrest.apifile.osgi";
private static final String NB_DSREST_APIFILE_OSGI = "nb.dsrest.apifile.osgi";
private static final String NB_DSREST_APIDESIGNER_OSGI = "nb.dsrest.apidesigner.osgi";
private static final String NB_DSREST_APIDESIGNER_OSGI = "nb.dsrest.apidesigner.osgi";
private static final String NB_DSREST_BUILTIN_MS = "nb.dsrest.builtin.ms";
private static final String NB_DSREST_BUILTIN_MS = "nb.dsrest.builtin.ms";
private static final String NB_DSREST_BUILTIN_OSGI = "nb.dsrest.builtin.osgi";
private static final String NB_DSREST_BUILTIN_OSGI = "nb.dsrest.builtin.osgi";
private static final String PREF_TOS_JOBS_RECORDS = "TOS_Jobs_Records"; //$NON-NLS-1$
@@ -235,7 +235,7 @@ public class TosTokenCollector extends AbstractTokenCollector {
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIDESIGNER_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_DSREST_APIFILE_MS);
}else if (ERepositoryObjectType.PROCESS_ROUTE.equals(type)) {
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTESOAPDS_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTESOAPDS_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTESOAPDS_MS);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_BUILTIN_OSGI);
removeUnwantedNodeFromjobDetails(typeStats, jobDetails, NB_ROUTERESTDS_BUILTIN_MS);
@@ -287,8 +287,8 @@ public class TosTokenCollector extends AbstractTokenCollector {
}
}
if(repoStats.has("SERVICES")) {
JSONObject serviceJson = (JSONObject)repoStats.get("SERVICES");
serviceJson.put("nbdssoap", nbdssoap);
JSONObject serviceJson = (JSONObject)repoStats.get("SERVICES");
serviceJson.put("nbdssoap", nbdssoap);
}
jObject.put(PROJECTS.getKey(), repoStats); //$NON-NLS-1$
jObject.put(TYPE.getKey(), ProjectManager.getInstance().getProjectType(currentProject));
@@ -310,145 +310,164 @@ public class TosTokenCollector extends AbstractTokenCollector {
}
private void removeUnwantedNodeFromjobDetails(JSONObject typeStats, JSONObject jobDetails, String key) throws JSONException {
if(jobDetails.has(key)) {
typeStats.put(key, jobDetails.get(key)); //$NON-NLS-1$
jobDetails.remove(key); //$NON-NLS-1$
}
}
if(jobDetails.has(key)) {
typeStats.put(key, jobDetails.get(key)); //$NON-NLS-1$
jobDetails.remove(key); //$NON-NLS-1$
}
}
@SuppressWarnings("unchecked")
private void extractBuildTypeData(List<IRepositoryViewObject> allRvo, Map<String, Integer> buildTypeDetails) {
Set<String> checkedItemSet = new HashSet<String>();
for (IRepositoryViewObject rvo : allRvo) {
Item item = rvo.getProperty().getItem();
if (item instanceof ProcessItem) {
ProcessType processType = ((ProcessItem) item).getProcess();
String itemID = ((ProcessItem) item).getProperty().getId();
List<NodeType> nodeList = (List<NodeType>) processType.getNode();
private void extractBuildTypeData(NodeType node, Item item, String itemID, String componentName,
Set<String> checkedItemSet, Map<String, Integer> buildTypeDetails) {
for (NodeType node : nodeList) {
String componentName = node.getComponentName();
List<AdditionalInfoMapImpl> properties = item.getProperty().getAdditionalProperties();
for (AdditionalInfoMapImpl property : properties) {
List<AdditionalInfoMapImpl> properties = item.getProperty().getAdditionalProperties();
boolean isItemChecked = false;
boolean buildTypeIsPresent = false;
String buildType = null;
String buildType = property.getValue().toString();
String nodeType = ComponentUtilities.getNodePropertyValue(node, "PROPERTY:PROPERTY_TYPE"); //$NON-NLS-1$
String apiID = ComponentUtilities.getNodePropertyValue(node, "API_ID"); //$NON-NLS-1$
for (AdditionalInfoMapImpl property : properties) {
if("BUILD_TYPE".equals(property.getKey().toString()) && null != buildType) {
if ("tRESTRequest".equals(componentName)) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
// when API Definition = built-in
if(buildType.equals(OSGI)) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = Built-in
String key = NB_DSREST_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else if(buildType.equals(REST_MS)) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = Built-in
String key = NB_DSREST_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(OSGI)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from local file
String key = NB_DSREST_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}else if(buildType.equals(REST_MS)) {
if(null!=apiID && !apiID.isEmpty()) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else {
// nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from local file
String key = NB_DSREST_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}
}
} else if("cSOAP".equals(componentName)) {
if(buildType.equals(ROUTE)) {
// nb routes with cSOAP as producer where build type = OSGI
String key = NB_ROUTESOAPDS_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cSOAP as producer where build type = Microservice
String key = NB_ROUTESOAPDS_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}else if("cREST".equals(componentName)) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
if(buildType.equals(ROUTE)) {
// nb routes with cREST as producer where build type = OSGI and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cREST as producer where build build type = Microservice and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(ROUTE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}
}
}else if(!"cSOAP".equals(componentName) && !"cREST".equals(componentName) && !checkedItemSet.contains(itemID)) {
// nb of jobs which doesn't contains cSOAP or cREST components
if(buildType.equals(ROUTE)) {
// nb routes without cSOAP or cREST as producer where build type = OSGI
String key = NB_ROUTE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes without cSOAP or cREST as producer where build type = Microservice
String key = NB_ROUTE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
break;
}
}
}
}
checkedItemSet.add(itemID);
break;
String buildTypeKey = property.getKey().toString();
String buildTypeValue = property.getValue().toString();
if("BUILD_TYPE".equals(buildTypeKey) && null != buildTypeValue) {
buildType = buildTypeValue;
buildTypeIsPresent = true;
break;
}
}
String nodeType = ComponentUtilities.getNodePropertyValue(node, "PROPERTY:PROPERTY_TYPE"); //$NON-NLS-1$
String apiID = ComponentUtilities.getNodePropertyValue(node, "API_ID"); //$NON-NLS-1$
// decide build type for Job/Route
if(!buildTypeIsPresent || null==buildType) {
if ("tRESTRequest".equals(componentName)) {
// if Build type is not present then treat this job as OSGI
buildType = OSGI;
}else {
// if Build type is not present then treat this Route as OSGI
buildType = ROUTE;
}
}
if ("tRESTRequest".equals(componentName)) {
extractDataWhenItemHastRESTRequest(buildTypeDetails, buildType, nodeType, apiID);
isItemChecked =true;
} else if("cSOAP".equals(componentName)) {
extractDataWhenItemHascSOAP(buildTypeDetails, buildType);
isItemChecked =true;
}else if("cREST".equals(componentName)) {
extractDataWhenItemHascREST(buildTypeDetails, buildType, nodeType, apiID);
isItemChecked =true;
}else if(!"cSOAP".equals(componentName) && !"cREST".equals(componentName) && !checkedItemSet.contains(itemID)) {
extractDataForRouteWithoutcRESTorcSOAP(buildTypeDetails, buildType);
isItemChecked =true;
}
if(isItemChecked) {
checkedItemSet.add(itemID);
}
}
private void extractDataForRouteWithoutcRESTorcSOAP(Map<String, Integer> buildTypeDetails, String buildType) {
// nb of jobs which doesn't contains cSOAP or cREST components
if(buildType.equals(ROUTE)) {
// nb routes without cSOAP or cREST as producer where build type = OSGI
String key = NB_ROUTE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes without cSOAP or cREST as producer where build type = Microservice
String key = NB_ROUTE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
private void extractDataWhenItemHascREST(Map<String, Integer> buildTypeDetails, String buildType, String nodeType, String apiID) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
if(buildType.equals(ROUTE)) {
// nb routes with cREST as producer where build type = OSGI and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cREST as producer where build build type = Microservice and API definition = Built-in
String key = NB_ROUTERESTDS_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(ROUTE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb routes with cREST as producer where build type is = OSGI and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from API Designer
String key = NB_ROUTERESTDS_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb routes with cREST as producer where build type is = Microservice and API definition is = imported from local file
String key = NB_ROUTERESTDS_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
}
}
private void extractDataWhenItemHascSOAP(Map<String, Integer> buildTypeDetails, String buildType) {
if(buildType.equals(ROUTE)) {
// nb routes with cSOAP as producer where build type = OSGI
String key = NB_ROUTESOAPDS_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
//break;
}else if(buildType.equals(ROUTE_MICROSERVICE)) {
// nb routes with cSOAP as producer where build type = Microservice
String key = NB_ROUTESOAPDS_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
//break;
}
}
private void extractDataWhenItemHastRESTRequest(Map<String, Integer> buildTypeDetails, String buildType,
String nodeType, String apiID) {
if(null == nodeType || !nodeType.equals("REPOSITORY")) {
// when API Definition = built-in
if(buildType.equals(OSGI)) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = Built-in
String key = NB_DSREST_BUILTIN_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else if(buildType.equals(REST_MS)) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = Built-in
String key = NB_DSREST_BUILTIN_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(null != nodeType && nodeType.equals("REPOSITORY")){
// when API Definition = Repository
if(buildType.equals(OSGI)) {
if(null!=apiID && !apiID.isEmpty()) {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb jobs with tRESTRequest where build type is = OSGI and API definition is = imported from local file
String key = NB_DSREST_APIFILE_OSGI;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}else if(buildType.equals(REST_MS)) {
if(null!=apiID && !apiID.isEmpty()) {
//nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from API Designer
String key = NB_DSREST_APIDESIGNER_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}else {
// nb jobs with tRESTRequest where build type is = Microservice and API definition is = imported from local file
String key = NB_DSREST_APIFILE_MS;
buildTypeDetails.put(key, null!=buildTypeDetails.get(key) ? buildTypeDetails.get(key)+1 : 1);
}
}
}
@@ -488,9 +507,10 @@ public class TosTokenCollector extends AbstractTokenCollector {
Map<String, JSONObject> camelComponentMap = new HashMap<>();
Map<String, JSONObject> customCamelComponentMap = new HashMap<>();
Map<String,Integer> buildTypeDetails = new HashMap<String,Integer>();
extractBuildTypeData(allRvo, buildTypeDetails);
Set<String> checkedIteSetForBuildTypes = new HashSet<String>();
for (IRepositoryViewObject rvo : allRvo) {
Item item = rvo.getProperty().getItem();
String itemID = ((ProcessItem) item).getProperty().getId();
if (item instanceof ProcessItem) {
boolean has_tRestRequest = false;
boolean has_tESBProviderRequest = false;
@@ -516,6 +536,9 @@ public class TosTokenCollector extends AbstractTokenCollector {
component_names.put("count", nbComp + 1);
extractRuntimeFeature(node, component_names, componentName);
if(!checkedIteSetForBuildTypes.contains(itemID)) {
extractBuildTypeData(node, item, itemID, componentName, checkedIteSetForBuildTypes, buildTypeDetails);
}
if (dsComponentsInDIJobs.contains(componentName)) {
has_tESBProviderRequest_Or_tRESTRequest = true;
@@ -631,9 +654,9 @@ public class TosTokenCollector extends AbstractTokenCollector {
// nb Services (SOAP WSDL) with at least one operation implemented as job with tESBProviderRequest
jobDetails.put("nbdssoap", soapWsdlWithImpl.size());
}
// put build type data
// put build type data
for(Map.Entry<String,Integer> entry : buildTypeDetails.entrySet()){
jobDetails.put(entry.getKey(), entry.getValue());
jobDetails.put(entry.getKey(), entry.getValue());
}
}

View File

@@ -35,11 +35,9 @@ import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.properties.Property;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.model.components.ElementParameter;
import org.talend.designer.core.model.process.DataProcess;
import org.talend.designer.core.ui.editor.process.Process;
import org.talend.designer.core.ui.editor.properties.controllers.AbstractGuessSchemaProcess;
import org.talend.designer.runprocess.IProcessor;
import org.talend.designer.runprocess.ProcessorUtilities;
import org.talend.sdk.component.server.front.model.ActionReference;
@@ -196,11 +194,6 @@ public class TaCoKitGuessSchemaProcess {
DataProcess dataProcess = new DataProcess(originalProcess);
dataProcess.buildFromGraphicalProcess(nodes);
process = dataProcess.getDuplicatedProcess();
IElementParameter log4jElemParam = process.getElementParameter(EParameterName.LOG4J_ACTIVATE.getName());
if (log4jElemParam != null) {
Boolean isEnableLog4j = AbstractGuessSchemaProcess.isEnableLog4jForGuessSchema();
log4jElemParam.setValue(isEnableLog4j);
}
process.getContextManager()
.getListContext()
.addAll(originalProcess.getContextManager().getListContext());