diff --git a/framework/base/src/base/org/ofbiz/base/util/UtilJavaParse.java b/framework/base/src/base/org/ofbiz/base/util/UtilJavaParse.java index c208ccee36..d700cb7c70 100644 --- a/framework/base/src/base/org/ofbiz/base/util/UtilJavaParse.java +++ b/framework/base/src/base/org/ofbiz/base/util/UtilJavaParse.java @@ -138,14 +138,12 @@ public class UtilJavaParse { // find the service name int openQuoteIndex = javaFile.indexOf("\"", openParenIndex); int closeQuoteIndex = javaFile.indexOf("\"", openQuoteIndex+1); - if (openQuoteIndex - openParenIndex > 3 || openQuoteIndex < 0 || closeQuoteIndex < 0) { + if (openQuoteIndex - openParenIndex <= 3 && openQuoteIndex >= 0 && closeQuoteIndex >= 0) { //more than two spaces/chars between quote and open paren... consider it something other than what we are looking for - continue; + String serviceName = javaFile.substring(openQuoteIndex+1, closeQuoteIndex).trim(); + //Debug.logInfo("In findServiceCallsInBlock found serviceName [" + serviceName + "]", module); + serviceNameSet.add(serviceName); } - String serviceName = javaFile.substring(openQuoteIndex+1, closeQuoteIndex).trim(); - //Debug.logInfo("In findServiceCallsInBlock found serviceName [" + serviceName + "]", module); - - serviceNameSet.add(serviceName); } dispatcherIndex = javaFile.indexOf("dispatcher.", openParenIndex); @@ -212,14 +210,12 @@ public class UtilJavaParse { // find the entity name int openQuoteIndex = javaFile.indexOf("\"", openParenIndex); int closeQuoteIndex = javaFile.indexOf("\"", openQuoteIndex+1); - if (openQuoteIndex - openParenIndex > 3 || openQuoteIndex < 0 || closeQuoteIndex < 0) { + if (openQuoteIndex - openParenIndex <= 3 && openQuoteIndex >= 0 && closeQuoteIndex >= 0) { //more than two spaces/chars between quote and open paren... consider it something other than what we are looking for - continue; + String entityName = javaFile.substring(openQuoteIndex+1, closeQuoteIndex).trim(); + //Debug.logInfo("In findServiceCallsInBlock found valid entityName [" + entityName + "]", module); + entityNameSet.add(entityName); } - String entityName = javaFile.substring(openQuoteIndex+1, closeQuoteIndex).trim(); - //Debug.logInfo("In findServiceCallsInBlock found valid entityName [" + entityName + "]", module); - - entityNameSet.add(entityName); } delegatorIndex = javaFile.indexOf("delegator.", openParenIndex); diff --git a/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java b/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java index 1de050aeb3..d241e4a7ef 100644 --- a/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java +++ b/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java @@ -96,8 +96,14 @@ public class ServiceEcaCondition implements java.io.Serializable { buf.append(rhsValueName); if (moreDetail) { - if (UtilValidate.isNotEmpty(compareType)) buf.append(compareType); - if (UtilValidate.isNotEmpty(format)) buf.append(format); + if (UtilValidate.isNotEmpty(compareType)) { + buf.append("-"); + buf.append(compareType); + } + if (UtilValidate.isNotEmpty(format)) { + buf.append(";"); + buf.append(format); + } } buf.append("]"); diff --git a/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java b/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java index e7232089e6..c29dfd5a15 100644 --- a/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java +++ b/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java @@ -1041,7 +1041,7 @@ public class WebToolsServices { } try { - ArtifactInfoFactory aif = ArtifactInfoFactory.makeArtifactInfoFactory("default"); + ArtifactInfoFactory aif = ArtifactInfoFactory.getArtifactInfoFactory("default"); ServiceArtifactInfo serviceInfo = aif.getServiceArtifactInfo(serviceName); serviceInfo.writeServiceCallGraphEoModel(eomodeldFullPath); } catch (GeneralException e) { diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java index 2d2f0039bd..15879652c5 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java @@ -77,7 +77,7 @@ public class ArtifactInfoFactory { public Map> allServiceInfosReferringToServiceEcaRule = FastMap.newInstance(); - public static ArtifactInfoFactory makeArtifactInfoFactory(String delegatorName) throws GeneralException { + public static ArtifactInfoFactory getArtifactInfoFactory(String delegatorName) throws GeneralException { if (UtilValidate.isEmpty(delegatorName)) { delegatorName = "default"; } @@ -85,6 +85,7 @@ public class ArtifactInfoFactory { ArtifactInfoFactory aif = artifactInfoFactoryCache.get(delegatorName); if (aif == null) { aif = new ArtifactInfoFactory(delegatorName); + artifactInfoFactoryCache.put(delegatorName, aif); } return aif; } diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java index 27054f00d7..a9bbba8339 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java @@ -304,7 +304,7 @@ public class ServiceArtifactInfo { if (callingServiceSet != null) { // set the prefix and add to the all list for (ServiceArtifactInfo callingService: callingServiceSet) { - callingService.setDisplayPrefix("Calling_"); + callingService.setDisplayPrefix("Calling:"); allDiagramEntitiesWithPrefixes.add(callingService.getDisplayPrefixedName()); allServiceList.add(callingService); } @@ -314,7 +314,7 @@ public class ServiceArtifactInfo { Set calledServiceSet = this.getServicesCalledByService(); for (ServiceArtifactInfo calledService: calledServiceSet) { - calledService.setDisplayPrefix("Called_"); + calledService.setDisplayPrefix("Called:"); allDiagramEntitiesWithPrefixes.add(calledService.getDisplayPrefixedName()); allServiceList.add(calledService); } @@ -323,7 +323,7 @@ public class ServiceArtifactInfo { Set callingServiceEcaSet = this.getServiceEcaRulesCallingService(); if (callingServiceEcaSet != null) { for (ServiceEcaArtifactInfo callingServiceEca: callingServiceEcaSet) { - callingServiceEca.setDisplayPrefix("Triggering_"); + callingServiceEca.setDisplayPrefix("Triggering:"); allDiagramEntitiesWithPrefixes.add(callingServiceEca.getDisplayPrefixedName()); allServiceEcaList.add(callingServiceEca); } @@ -333,7 +333,7 @@ public class ServiceArtifactInfo { Set calledServiceEcaSet = this.getServiceEcaRulesTriggeredByService(); for (ServiceEcaArtifactInfo calledServiceEca: calledServiceEcaSet) { - calledServiceEca.setDisplayPrefix("Called_"); + calledServiceEca.setDisplayPrefix("Called:"); allDiagramEntitiesWithPrefixes.add(calledServiceEca.getDisplayPrefixedName()); allServiceEcaList.add(calledServiceEca); }