You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/04/27 08:55:10 UTC

svn commit: r1331247 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java

Author: adrianc
Date: Fri Apr 27 06:55:10 2012
New Revision: 1331247

URL: http://svn.apache.org/viewvc?rev=1331247&view=rev
Log:
Fixed a bug in my previous commit.

Modified:
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java?rev=1331247&r1=1331246&r2=1331247&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java Fri Apr 27 06:55:10 2012
@@ -144,6 +144,25 @@ public final class CallSimpleMethod exte
         return FlexibleStringExpander.expandString(toString(), methodContext.getEnvMap());
     }
 
+    public String getMethodName() {
+        return this.methodName;
+    }
+
+    public SimpleMethod getSimpleMethodToCall(ClassLoader loader) throws MiniLangException {
+        SimpleMethod simpleMethodToCall = null;
+        if (UtilValidate.isEmpty(xmlResource)) {
+            simpleMethodToCall = this.simpleMethod.getSimpleMethodInSameFile(methodName);
+        } else {
+            Map<String, SimpleMethod> simpleMethods = SimpleMethod.getSimpleMethods(xmlResource, loader);
+            simpleMethodToCall = simpleMethods.get(methodName);
+        }
+        return simpleMethodToCall;
+    }
+
+    public String getXmlResource() {
+        return this.xmlResource;
+    }
+
     @Override
     public String rawString() {
         return toString();