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/20 08:53:44 UTC

svn commit: r1328222 [3/3] - in /ofbiz/trunk/framework: minilang/src/org/ofbiz/minilang/ minilang/src/org/ofbiz/minilang/method/ minilang/src/org/ofbiz/minilang/method/callops/ minilang/src/org/ofbiz/minilang/method/conditional/ minilang/src/org/ofbiz/...

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestToField.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestToField.java Fri Apr 20 06:53:41 2012
@@ -24,6 +24,7 @@ import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.collections.FlexibleServletAccessor;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -42,7 +43,7 @@ public class RequestToField extends Meth
     ContextAccessor<Map<String, Object>> mapAcsr;
     FlexibleServletAccessor<Object> requestAcsr;
 
-    public RequestToField(Element element, SimpleMethod simpleMethod) {
+    public RequestToField(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         mapAcsr = new ContextAccessor<Map<String, Object>>(element.getAttribute("map-name"));
@@ -52,7 +53,7 @@ public class RequestToField extends Meth
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String defaultVal = methodContext.expandString(this.defaultVal);
         Object fieldVal = null;
         // only run this if it is in an EVENT context
@@ -99,7 +100,7 @@ public class RequestToField extends Meth
     }
 
     public static final class RequestToFieldFactory implements Factory<RequestToField> {
-        public RequestToField createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public RequestToField createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new RequestToField(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java Fri Apr 20 06:53:41 2012
@@ -24,6 +24,7 @@ import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.collections.FlexibleServletAccessor;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -42,7 +43,7 @@ public class SessionToField extends Meth
     ContextAccessor<Map<String, Object>> mapAcsr;
     FlexibleServletAccessor<Object> sessionAcsr;
 
-    public SessionToField(Element element, SimpleMethod simpleMethod) {
+    public SessionToField(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         mapAcsr = new ContextAccessor<Map<String, Object>>(element.getAttribute("map-name"));
@@ -52,7 +53,7 @@ public class SessionToField extends Meth
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String defaultVal = methodContext.expandString(this.defaultVal);
         Object fieldVal = null;
         // only run this if it is in an EVENT context
@@ -98,7 +99,7 @@ public class SessionToField extends Meth
     }
 
     public static final class SessionToFieldFactory implements Factory<SessionToField> {
-        public SessionToField createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public SessionToField createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new SessionToField(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java Fri Apr 20 06:53:41 2012
@@ -28,6 +28,7 @@ import javolution.util.FastMap;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -47,7 +48,7 @@ public class WebappPropertyToField exten
     String property;
     String resource;
 
-    public WebappPropertyToField(Element element, SimpleMethod simpleMethod) {
+    public WebappPropertyToField(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         resource = element.getAttribute("resource");
         property = element.getAttribute("property");
@@ -58,7 +59,7 @@ public class WebappPropertyToField exten
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String resource = methodContext.expandString(this.resource);
         String property = methodContext.expandString(this.property);
         String defaultVal = methodContext.expandString(this.defaultVal);
@@ -111,7 +112,7 @@ public class WebappPropertyToField exten
     }
 
     public static final class WebappPropertyToFieldFactory implements Factory<WebappPropertyToField> {
-        public WebappPropertyToField createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public WebappPropertyToField createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new WebappPropertyToField(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckId.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckId.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckId.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckId.java Fri Apr 20 06:53:41 2012
@@ -27,6 +27,7 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -47,7 +48,7 @@ public class CheckId extends MethodOpera
     String message = null;
     String propertyResource = null;
 
-    public CheckId(Element element, SimpleMethod simpleMethod) {
+    public CheckId(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field"), element.getAttribute("field-name"));
@@ -85,7 +86,7 @@ public class CheckId extends MethodOpera
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         boolean isValid = true;
         List<Object> messages = errorListAcsr.get(methodContext);
         if (messages == null) {
@@ -128,7 +129,7 @@ public class CheckId extends MethodOpera
     }
 
     public static final class CheckIdFactory implements Factory<CheckId> {
-        public CheckId createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public CheckId createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new CheckId(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java Fri Apr 20 06:53:41 2012
@@ -27,6 +27,7 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -49,7 +50,7 @@ public class CheckPermission extends Met
     PermissionInfo permissionInfo;
     String propertyResource = null;
 
-    public CheckPermission(Element element, SimpleMethod simpleMethod) {
+    public CheckPermission(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         permissionInfo = new PermissionInfo(element);
         this.errorListAcsr = new ContextAccessor<List<Object>>(element.getAttribute("error-list-name"), "error_list");
@@ -98,7 +99,7 @@ public class CheckPermission extends Met
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         boolean hasPermission = false;
         List<Object> messages = errorListAcsr.get(methodContext);
         if (messages == null) {
@@ -155,7 +156,7 @@ public class CheckPermission extends Met
     }
 
     public static final class CheckPermissionFactory implements Factory<CheckPermission> {
-        public CheckPermission createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public CheckPermission createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new CheckPermission(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastList;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -48,7 +49,7 @@ public class IfCompare extends MethodOpe
     protected String type;
     protected String value;
 
-    public IfCompare(Element element, SimpleMethod simpleMethod) {
+    public IfCompare(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // NOTE: this is still supported, but is deprecated
         this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name"));
@@ -70,7 +71,7 @@ public class IfCompare extends MethodOpe
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         String value = methodContext.expandString(this.value);
@@ -144,7 +145,7 @@ public class IfCompare extends MethodOpe
     }
 
     public static final class IfCompareFactory implements Factory<IfCompare> {
-        public IfCompare createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfCompare createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfCompare(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastList;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -49,7 +50,7 @@ public class IfCompareField extends Meth
     protected ContextAccessor<Map<String, ? extends Object>> toMapAcsr;
     protected String type;
 
-    public IfCompareField(Element element, SimpleMethod simpleMethod) {
+    public IfCompareField(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // NOTE: this is still supported, but is deprecated
         this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name"));
@@ -81,7 +82,7 @@ public class IfCompareField extends Meth
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         String operator = methodContext.expandString(this.operator);
@@ -164,7 +165,7 @@ public class IfCompareField extends Meth
     }
 
     public static final class IfCompareFieldFactory implements Factory<IfCompareField> {
-        public IfCompareField createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfCompareField createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfCompareField(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfEmpty.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfEmpty.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfEmpty.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfEmpty.java Fri Apr 20 06:53:41 2012
@@ -26,6 +26,7 @@ import javolution.util.FastList;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -44,7 +45,7 @@ public class IfEmpty extends MethodOpera
     ContextAccessor<Map<String, ? extends Object>> mapAcsr;
     List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfEmpty(Element element, SimpleMethod simpleMethod) {
+    public IfEmpty(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // NOTE: this is still supported, but is deprecated
         this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name"));
@@ -62,7 +63,7 @@ public class IfEmpty extends MethodOpera
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         // return true;
@@ -113,7 +114,7 @@ public class IfEmpty extends MethodOpera
     }
 
     public static final class IfEmptyFactory implements Factory<IfEmpty> {
-        public IfEmpty createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfEmpty createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfEmpty(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfHasPermission.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfHasPermission.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfHasPermission.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfHasPermission.java Fri Apr 20 06:53:41 2012
@@ -26,6 +26,7 @@ import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.MethodContext;
 import org.ofbiz.minilang.method.MethodOperation;
@@ -43,7 +44,7 @@ public class IfHasPermission extends Met
     protected FlexibleStringExpander permissionExdr;
     protected List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfHasPermission(Element element, SimpleMethod simpleMethod) {
+    public IfHasPermission(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         this.permissionExdr = FlexibleStringExpander.getInstance(element.getAttribute("permission"));
         this.actionExdr = FlexibleStringExpander.getInstance(element.getAttribute("action"));
@@ -56,7 +57,7 @@ public class IfHasPermission extends Met
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         // return true;
@@ -112,7 +113,7 @@ public class IfHasPermission extends Met
     }
 
     public static final class IfHasPermissionFactory implements Factory<IfHasPermission> {
-        public IfHasPermission createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfHasPermission createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfHasPermission(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfInstanceOf.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfInstanceOf.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfInstanceOf.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfInstanceOf.java Fri Apr 20 06:53:41 2012
@@ -26,6 +26,7 @@ import javolution.util.FastList;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -42,7 +43,7 @@ public class IfInstanceOf extends Method
     protected ContextAccessor<Map<String, ? extends Object>> mapAcsr = null;
     protected List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfInstanceOf(Element element, SimpleMethod simpleMethod) {
+    public IfInstanceOf(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field"), element.getAttribute("field-name"));
@@ -57,7 +58,7 @@ public class IfInstanceOf extends Method
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // only run subOps if element is instanceOf
         boolean runSubOps = false;
         Object fieldVal = null;
@@ -106,7 +107,7 @@ public class IfInstanceOf extends Method
     }
 
     public static final class IfInstanceOfFactory implements Factory<IfInstanceOf> {
-        public IfInstanceOf createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfInstanceOf createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfInstanceOf(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfNotEmpty.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfNotEmpty.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfNotEmpty.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfNotEmpty.java Fri Apr 20 06:53:41 2012
@@ -26,6 +26,7 @@ import javolution.util.FastList;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -44,7 +45,7 @@ public class IfNotEmpty extends MethodOp
     protected ContextAccessor<Map<String, ? extends Object>> mapAcsr;
     protected List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfNotEmpty(Element element, SimpleMethod simpleMethod) {
+    public IfNotEmpty(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // NOTE: this is still supported, but is deprecated
         this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name"));
@@ -62,7 +63,7 @@ public class IfNotEmpty extends MethodOp
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         // return true;
@@ -120,7 +121,7 @@ public class IfNotEmpty extends MethodOp
     }
 
     public static final class IfNotEmptyFactory implements Factory<IfNotEmpty> {
-        public IfNotEmpty createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfNotEmpty createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfNotEmpty(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfRegexp.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfRegexp.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfRegexp.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfRegexp.java Fri Apr 20 06:53:41 2012
@@ -30,6 +30,7 @@ import org.ofbiz.base.util.GeneralExcept
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -50,7 +51,7 @@ public class IfRegexp extends MethodOper
     ContextAccessor<Map<String, ? extends Object>> mapAcsr;
     List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfRegexp(Element element, SimpleMethod simpleMethod) {
+    public IfRegexp(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field"), element.getAttribute("field-name"));
@@ -65,7 +66,7 @@ public class IfRegexp extends MethodOper
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         String fieldString = null;
@@ -130,7 +131,7 @@ public class IfRegexp extends MethodOper
     }
 
     public static final class IfRegexpFactory implements Factory<IfRegexp> {
-        public IfRegexp createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfRegexp createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfRegexp(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfValidateMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfValidateMethod.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfValidateMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfValidateMethod.java Fri Apr 20 06:53:41 2012
@@ -28,6 +28,7 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -48,7 +49,7 @@ public class IfValidateMethod extends Me
     String methodName;
     List<MethodOperation> subOps = FastList.newInstance();
 
-    public IfValidateMethod(Element element, SimpleMethod simpleMethod) {
+    public IfValidateMethod(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field"), element.getAttribute("field-name"));
@@ -64,7 +65,7 @@ public class IfValidateMethod extends Me
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // if conditions fails, always return true; if a sub-op returns false
         // return false and stop, otherwise return true
         String methodName = methodContext.expandString(this.methodName);
@@ -147,7 +148,7 @@ public class IfValidateMethod extends Me
     }
 
     public static final class IfValidateMethodFactory implements Factory<IfValidateMethod> {
-        public IfValidateMethod createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public IfValidateMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new IfValidateMethod(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java Fri Apr 20 06:53:41 2012
@@ -30,6 +30,7 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -59,7 +60,7 @@ public class Calculate extends MethodOpe
     String roundingModeString;
     String typeString;
 
-    public Calculate(Element element, SimpleMethod simpleMethod) {
+    public Calculate(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field"), element.getAttribute("field-name"));
@@ -85,7 +86,7 @@ public class Calculate extends MethodOpe
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String typeString = methodContext.expandString(this.typeString);
         int type;
         if ("Double".equals(typeString)) {
@@ -324,7 +325,7 @@ public class Calculate extends MethodOpe
     }
 
     public static final class CalculateFactory implements Factory<Calculate> {
-        public Calculate createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public Calculate createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new Calculate(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java Fri Apr 20 06:53:41 2012
@@ -24,6 +24,7 @@ import javolution.util.FastList;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.FieldString;
 import org.ofbiz.minilang.method.MethodContext;
@@ -44,7 +45,7 @@ public class Log extends MethodOperation
     List<MethodString> methodStrings = null;
     Object startLine;
 
-    public Log(Element element, SimpleMethod simpleMethod) {
+    public Log(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         this.message = element.getAttribute("message");
         this.levelStr = element.getAttribute("level");
@@ -66,7 +67,7 @@ public class Log extends MethodOperation
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String levelStr = methodContext.expandString(this.levelStr);
         String message = methodContext.expandString(this.message);
         int level;
@@ -122,7 +123,7 @@ public class Log extends MethodOperation
     }
 
     public static final class LogFactory implements Factory<Log> {
-        public Log createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public Log createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new Log(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java Fri Apr 20 06:53:41 2012
@@ -27,6 +27,7 @@ import javolution.util.FastMap;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.util.EntityUtilProperties;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -48,7 +49,7 @@ public class PropertyToField extends Met
     String property;
     String resource;
 
-    public PropertyToField(Element element, SimpleMethod simpleMethod) {
+    public PropertyToField(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         resource = element.getAttribute("resource");
         property = element.getAttribute("property");
@@ -62,7 +63,7 @@ public class PropertyToField extends Met
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         String resource = methodContext.expandString(this.resource);
         String property = methodContext.expandString(this.property);
         String value = null;
@@ -112,7 +113,7 @@ public class PropertyToField extends Met
     }
 
     public static final class PropertyToFieldFactory implements Factory<PropertyToField> {
-        public PropertyToField createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public PropertyToField createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new PropertyToField(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/serviceops/FieldToResult.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/serviceops/FieldToResult.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/serviceops/FieldToResult.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/serviceops/FieldToResult.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.servic
 import java.util.Map;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
@@ -38,7 +39,7 @@ public class FieldToResult extends Metho
     ContextAccessor<Map<String, ? extends Object>> mapAcsr;
     ContextAccessor<Object> resultAcsr;
 
-    public FieldToResult(Element element, SimpleMethod simpleMethod) {
+    public FieldToResult(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         // the schema for this element now just has the "field" attribute, though the old "field-name" and "map-name" pair is still supported
         mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name"));
@@ -47,7 +48,7 @@ public class FieldToResult extends Metho
     }
 
     @Override
-    public boolean exec(MethodContext methodContext) {
+    public boolean exec(MethodContext methodContext) throws MiniLangException {
         // only run this if it is in an SERVICE context
         if (methodContext.getMethodType() == MethodContext.SERVICE) {
             Object fieldVal = null;
@@ -84,7 +85,7 @@ public class FieldToResult extends Metho
     }
 
     public static final class FieldToResultFactory implements Factory<FieldToResult> {
-        public FieldToResult createMethodOperation(Element element, SimpleMethod simpleMethod) {
+        public FieldToResult createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new FieldToResult(element, simpleMethod);
         }
 

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java Fri Apr 20 06:53:41 2012
@@ -43,6 +43,7 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.MethodContext;
 import org.ofbiz.webapp.control.ConfigXMLReader.Event;
@@ -132,6 +133,9 @@ public class WfsEventHandler implements 
         } catch (IOException ioe) {
             sendError(response, "Problem handling event");
             throw new EventHandlerException("Cannot read the input stream", ioe);
+        } catch (MiniLangException e) {
+            sendError(response, "Problem handling event");
+            throw new EventHandlerException("Error encountered while running simple method", e);
         }