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 [1/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/...
Author: adrianc
Date: Fri Apr 20 06:53:41 2012
New Revision: 1328222
URL: http://svn.apache.org/viewvc?rev=1328222&view=rev
Log:
Added exception handling to the mini-language API. No functional change.
Modified:
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/AddError.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CreateObject.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Assert.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowDateToEnv.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowTimestampToEnv.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionRollback.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ClearField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToEnv.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToEnv.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FirstFromList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/IterateMap.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ListToList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/OrderMapList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ToString.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/FieldToRequest.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/FieldToSession.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestParametersToList.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/RequestToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckId.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompare.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfCompareField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfEmpty.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfHasPermission.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfInstanceOf.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfNotEmpty.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfRegexp.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/IfValidateMethod.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/serviceops/FieldToResult.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java Fri Apr 20 06:53:41 2012
@@ -112,7 +112,7 @@ public class SimpleMethod {
}
}
- protected static SimpleMethod compileSimpleMethod(Element simpleMethodElement, Map<String, SimpleMethod> simpleMethods, String location) {
+ protected static SimpleMethod compileSimpleMethod(Element simpleMethodElement, Map<String, SimpleMethod> simpleMethods, String location) throws MiniLangException {
return new SimpleMethod(simpleMethodElement, simpleMethods, location);
}
@@ -392,7 +392,7 @@ public class SimpleMethod {
return simpleMethods;
}
- public static void readOperations(Element simpleMethodElement, List<MethodOperation> methodOperations, SimpleMethod simpleMethod) {
+ public static void readOperations(Element simpleMethodElement, List<MethodOperation> methodOperations, SimpleMethod simpleMethod) throws MiniLangException {
List<? extends Element> operationElements = UtilXml.childElementList(simpleMethodElement);
if (UtilValidate.isNotEmpty(operationElements)) {
for (Element curOperElem : operationElements) {
@@ -512,7 +512,7 @@ public class SimpleMethod {
protected String userLoginName;
protected boolean useTransaction = true;
- public SimpleMethod(Element simpleMethodElement, Map<String, SimpleMethod> parentSimpleMethodsMap, String fromLocation) {
+ public SimpleMethod(Element simpleMethodElement, Map<String, SimpleMethod> parentSimpleMethodsMap, String fromLocation) throws MiniLangException {
this.parentSimpleMethodsMap = parentSimpleMethodsMap;
this.fromLocation = fromLocation;
this.methodName = simpleMethodElement.getAttribute("method-name");
@@ -545,7 +545,7 @@ public class SimpleMethod {
}
/** Execute the Simple Method operations */
- public String exec(MethodContext methodContext) {
+ public String exec(MethodContext methodContext) throws MiniLangException {
// always put the null field object in as "null"
methodContext.putEnv("null", GenericEntity.NULL_FIELD);
methodContext.putEnv("nullField", GenericEntity.NULL_FIELD);
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java Fri Apr 20 06:53:41 2012
@@ -89,8 +89,11 @@ public class SimpleMethodBsfEngine exten
Debug.logWarning("Found more than one simple-method in the file, running the [" + methodName + "] method, you should remove all but one method from this file", module);
SimpleMethod simpleMethod = simpleMethods.get(methodName);
MethodContext methodContext = new MethodContext(context, null, MethodContext.EVENT);
- return simpleMethod.exec(methodContext);
- // methodContext.getResults();
+ try {
+ return simpleMethod.exec(methodContext);
+ } catch (MiniLangException e) {
+ throw new BSFException(e.getMessage());
+ }
}
@Override
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java Fri Apr 20 06:53:41 2012
@@ -23,6 +23,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.w3c.dom.Element;
@@ -31,14 +32,15 @@ import org.w3c.dom.Element;
*/
public abstract class MethodOperation {
- protected SimpleMethod simpleMethod;
+ protected final SimpleMethod simpleMethod;
- public MethodOperation(Element element, SimpleMethod simpleMethod) {
+ protected MethodOperation(Element element, SimpleMethod simpleMethod) {
this.simpleMethod = simpleMethod;
}
- /** Execute the operation; if false is returned then no further operations will be executed */
- public abstract boolean exec(MethodContext methodContext);
+ /** Execute the operation. Returns false if no further operations should be executed.
+ * @throws MiniLangException */
+ public abstract boolean exec(MethodContext methodContext) throws MiniLangException;
/** Create an expanded string representation of the operation, is for the current context */
public abstract String expandedString(MethodContext methodContext);
@@ -58,7 +60,7 @@ public abstract class MethodOperation {
public interface Factory<M extends MethodOperation> {
- M createMethodOperation(Element element, SimpleMethod simpleMethod);
+ M createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException;
String getName();
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/AddError.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/AddError.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/AddError.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/AddError.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastList;
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;
@@ -41,7 +42,7 @@ public class AddError extends MethodOper
String message = null;
String propertyResource = null;
- public AddError(Element element, SimpleMethod simpleMethod) {
+ public AddError(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
errorListAcsr = new ContextAccessor<List<Object>>(element.getAttribute("error-list-name"), "error_list");
Element failMessage = UtilXml.firstChildElement(element, "fail-message");
@@ -74,7 +75,7 @@ public class AddError extends MethodOper
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -97,7 +98,7 @@ public class AddError extends MethodOper
}
public static final class AddErrorFactory implements Factory<AddError> {
- public AddError createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public AddError createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new AddError(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java Fri Apr 20 06:53:41 2012
@@ -31,6 +31,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilGenerics;
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;
@@ -52,7 +53,7 @@ public class CallBsh extends MethodOpera
String inline = null;
String resource = null;
- public CallBsh(Element element, SimpleMethod simpleMethod) {
+ public CallBsh(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
inline = UtilXml.elementValue(element);
resource = element.getAttribute("resource");
@@ -63,7 +64,7 @@ public class CallBsh extends MethodOpera
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -142,7 +143,7 @@ public class CallBsh extends MethodOpera
}
public static final class CallBshFactory implements Factory<CallBsh> {
- public CallBsh createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallBsh createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallBsh(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java Fri Apr 20 06:53:41 2012
@@ -27,6 +27,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.FieldObject;
@@ -50,7 +51,7 @@ public class CallClassMethod extends Met
ContextAccessor<Object> retFieldAcsr;
ContextAccessor<Map<String, Object>> retMapAcsr;
- public CallClassMethod(Element element, SimpleMethod simpleMethod) {
+ public CallClassMethod(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
className = element.getAttribute("class-name");
methodName = element.getAttribute("method-name");
@@ -79,7 +80,7 @@ public class CallClassMethod extends Met
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String className = methodContext.expandString(this.className);
String methodName = methodContext.expandString(this.methodName);
Class<?> methodClass = null;
@@ -108,7 +109,7 @@ public class CallClassMethod extends Met
}
public static final class CallClassMethodFactory implements Factory<CallClassMethod> {
- public CallClassMethod createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallClassMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallClassMethod(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.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.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.ContextAccessor;
import org.ofbiz.minilang.method.FieldObject;
@@ -120,7 +121,7 @@ public class CallObjectMethod extends Me
ContextAccessor<Object> retFieldAcsr;
ContextAccessor<Map<String, Object>> retMapAcsr;
- public CallObjectMethod(Element element, SimpleMethod simpleMethod) {
+ public CallObjectMethod(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
// the schema for this element now just has the "obj-field" attribute, though the
// old "obj-field-name" and "obj-map-name" pair is still supported
@@ -152,7 +153,7 @@ public class CallObjectMethod extends Me
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String methodName = methodContext.expandString(this.methodName);
Object methodObject = null;
if (!objMapAcsr.isEmpty()) {
@@ -192,7 +193,7 @@ public class CallObjectMethod extends Me
}
public static final class CallObjectMethodFactory implements Factory<CallObjectMethod> {
- public CallObjectMethod createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallObjectMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallObjectMethod(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java Fri Apr 20 06:53:41 2012
@@ -55,7 +55,7 @@ public class CallScript extends MethodOp
private String location;
private String method;
- public CallScript(Element element, SimpleMethod simpleMethod) {
+ public CallScript(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
String scriptLocation = element.getAttribute("location");
this.location = getScriptLocation(scriptLocation);
@@ -64,7 +64,7 @@ public class CallScript extends MethodOp
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String location = methodContext.expandString(this.location);
String method = methodContext.expandString(this.method);
List<Object> messages = errorListAcsr.get(methodContext);
@@ -99,7 +99,7 @@ public class CallScript extends MethodOp
}
public static final class CallScriptFactory implements Factory<CallScript> {
- public CallScript createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallScript createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallScript(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java Fri Apr 20 06:53:41 2012
@@ -33,6 +33,7 @@ import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.collections.FlexibleServletAccessor;
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;
@@ -78,7 +79,7 @@ public class CallService extends MethodO
/** Override the default transaction timeout, only works if we start the transaction */
protected int transactionTimeout;
- public CallService(Element element, SimpleMethod simpleMethod) {
+ public CallService(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
serviceName = element.getAttribute("service-name");
inMapAcsr = new ContextAccessor<Map<String, Object>>(element.getAttribute("in-map-name"));
@@ -158,7 +159,7 @@ public class CallService extends MethodO
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
boolean includeUserLogin = !"false".equals(methodContext.expandString(includeUserLoginStr));
boolean breakOnError = !"false".equals(methodContext.expandString(breakOnErrorStr));
String serviceName = methodContext.expandString(this.serviceName);
@@ -367,7 +368,7 @@ public class CallService extends MethodO
}
public static final class CallServiceFactory implements Factory<CallService> {
- public CallService createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallService createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallService(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastMap;
import org.ofbiz.base.util.Debug;
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;
@@ -43,7 +44,7 @@ public class CallServiceAsynch extends M
protected ContextAccessor<Map<String, Object>> inMapAcsr;
protected String serviceName;
- public CallServiceAsynch(Element element, SimpleMethod simpleMethod) {
+ public CallServiceAsynch(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
serviceName = element.getAttribute("service-name");
inMapAcsr = new ContextAccessor<Map<String, Object>>(element.getAttribute("in-map-name"));
@@ -51,7 +52,7 @@ public class CallServiceAsynch extends M
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String serviceName = methodContext.expandString(this.serviceName);
boolean includeUserLogin = !"false".equals(methodContext.expandString(includeUserLoginStr));
Map<String, Object> inMap = null;
@@ -112,7 +113,7 @@ public class CallServiceAsynch extends M
}
public static final class CallServiceAsynchFactory implements Factory<CallServiceAsynch> {
- public CallServiceAsynch createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallServiceAsynch createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallServiceAsynch(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java Fri Apr 20 06:53:41 2012
@@ -46,7 +46,7 @@ public class CallSimpleMapProcessor exte
String processorName;
String xmlResource;
- public CallSimpleMapProcessor(Element element, SimpleMethod simpleMethod) {
+ public CallSimpleMapProcessor(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
xmlResource = element.getAttribute("xml-resource");
processorName = element.getAttribute("processor-name");
@@ -60,7 +60,7 @@ public class CallSimpleMapProcessor exte
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -106,7 +106,7 @@ public class CallSimpleMapProcessor exte
}
public static final class CallSimpleMapProcessorFactory implements Factory<CallSimpleMapProcessor> {
- public CallSimpleMapProcessor createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallSimpleMapProcessor createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallSimpleMapProcessor(element, simpleMethod);
}
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=1328222&r1=1328221&r2=1328222&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 20 06:53:41 2012
@@ -38,14 +38,14 @@ public class CallSimpleMethod extends Me
String methodName;
String xmlResource;
- public CallSimpleMethod(Element element, SimpleMethod simpleMethod) {
+ public CallSimpleMethod(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
this.methodName = element.getAttribute("method-name");
this.xmlResource = element.getAttribute("xml-resource");
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
if (UtilValidate.isNotEmpty(this.methodName)) {
String methodName = methodContext.expandString(this.methodName);
String xmlResource = methodContext.expandString(this.xmlResource);
@@ -132,7 +132,7 @@ public class CallSimpleMethod extends Me
}
public static final class CallSimpleMethodFactory implements Factory<CallSimpleMethod> {
- public CallSimpleMethod createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CallSimpleMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallSimpleMethod(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java Fri Apr 20 06:53:41 2012
@@ -22,6 +22,7 @@ import java.util.List;
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;
@@ -40,7 +41,7 @@ public class CheckErrors extends MethodO
FlexibleMessage messagePrefix;
FlexibleMessage messageSuffix;
- public CheckErrors(Element element, SimpleMethod simpleMethod) {
+ public CheckErrors(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
errorCode = element.getAttribute("error-code");
if (UtilValidate.isEmpty(errorCode))
@@ -53,7 +54,7 @@ public class CheckErrors extends MethodO
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (UtilValidate.isNotEmpty(messages)) {
String errorCode = methodContext.expandString(this.errorCode);
@@ -90,7 +91,7 @@ public class CheckErrors extends MethodO
}
public static final class CheckErrorsFactory implements Factory<CheckErrors> {
- public CheckErrors createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CheckErrors createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CheckErrors(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CreateObject.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CreateObject.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CreateObject.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CreateObject.java Fri Apr 20 06:53:41 2012
@@ -29,6 +29,7 @@ import javolution.util.FastMap;
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.FieldObject;
@@ -51,7 +52,7 @@ public class CreateObject extends Method
/** A list of MethodObject objects to use as the method call parameters */
List<MethodObject<?>> parameters;
- public CreateObject(Element element, SimpleMethod simpleMethod) {
+ public CreateObject(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
className = element.getAttribute("class-name");
// the schema for this element now just has the "field" attribute, though the old
@@ -79,7 +80,7 @@ public class CreateObject extends Method
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String className = methodContext.expandString(this.className);
Class<?> methodClass = null;
try {
@@ -175,7 +176,7 @@ public class CreateObject extends Method
}
public static final class CreateObjectFactory implements Factory<CreateObject> {
- public CreateObject createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CreateObject createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CreateObject(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java Fri Apr 20 06:53:41 2012
@@ -19,6 +19,7 @@
package org.ofbiz.minilang.method.callops;
import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -31,7 +32,7 @@ public class Return extends MethodOperat
String responseCode;
- public Return(Element element, SimpleMethod simpleMethod) {
+ public Return(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
responseCode = element.getAttribute("response-code");
if (UtilValidate.isEmpty(responseCode))
@@ -39,7 +40,7 @@ public class Return extends MethodOperat
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String responseCode = methodContext.expandString(this.responseCode);
if (methodContext.getMethodType() == MethodContext.EVENT) {
methodContext.putEnv(simpleMethod.getEventResponseCodeName(), responseCode);
@@ -65,7 +66,7 @@ public class Return extends MethodOperat
}
public static final class ReturnFactory implements Factory<Return> {
- public Return createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public Return createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new Return(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastList;
import javolution.util.FastMap;
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;
@@ -46,7 +47,7 @@ public class SetServiceFields extends Me
String serviceName;
ContextAccessor<Map<String, Object>> toMapAcsr;
- public SetServiceFields(Element element, SimpleMethod simpleMethod) {
+ public SetServiceFields(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
serviceName = element.getAttribute("service-name");
mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map"), element.getAttribute("map-name"));
@@ -55,7 +56,7 @@ public class SetServiceFields extends Me
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -103,7 +104,7 @@ public class SetServiceFields extends Me
}
public static final class SetServiceFieldsFactory implements Factory<SetServiceFields> {
- public SetServiceFields createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public SetServiceFields createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new SetServiceFields(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Assert.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Assert.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Assert.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Assert.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import javolution.util.FastList;
import org.ofbiz.base.util.UtilValidate;
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;
@@ -43,7 +44,7 @@ public class Assert extends MethodOperat
protected ContextAccessor<List<Object>> errorListAcsr;
protected FlexibleStringExpander titleExdr;
- public Assert(Element element, SimpleMethod simpleMethod) {
+ public Assert(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
errorListAcsr = new ContextAccessor<List<Object>>(element.getAttribute("error-list-name"), "error_list");
titleExdr = FlexibleStringExpander.getInstance(element.getAttribute("title"));
@@ -53,7 +54,7 @@ public class Assert extends MethodOperat
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -104,7 +105,7 @@ public class Assert extends MethodOperat
}
public static final class AssertFactory implements Factory<Assert> {
- public Assert createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public Assert createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new Assert(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java Fri Apr 20 06:53:41 2012
@@ -23,6 +23,7 @@ import java.util.List;
import javolution.util.FastList;
import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -36,7 +37,7 @@ public class ElseIf {
protected Conditional condition;
protected List<MethodOperation> thenSubOps = FastList.newInstance();
- public ElseIf(Element element, SimpleMethod simpleMethod) {
+ public ElseIf(Element element, SimpleMethod simpleMethod) throws MiniLangException {
Element conditionElement = UtilXml.firstChildElement(element, "condition");
Element conditionChildElement = UtilXml.firstChildElement(conditionElement);
this.condition = ConditionalFactory.makeConditional(conditionChildElement, simpleMethod);
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java Fri Apr 20 06:53:41 2012
@@ -24,6 +24,7 @@ import javolution.util.FastList;
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.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -39,7 +40,7 @@ public class MasterIf extends MethodOper
List<MethodOperation> elseSubOps = null;
List<MethodOperation> thenSubOps = FastList.newInstance();
- public MasterIf(Element element, SimpleMethod simpleMethod) {
+ public MasterIf(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
Element conditionElement = UtilXml.firstChildElement(element, "condition");
Element conditionChildElement = UtilXml.firstChildElement(conditionElement);
@@ -61,7 +62,7 @@ public class MasterIf 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
// return true;
@@ -113,7 +114,7 @@ public class MasterIf extends MethodOper
}
public static final class MasterIfFactory implements Factory<MasterIf> {
- public MasterIf createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public MasterIf createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new MasterIf(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/While.java Fri Apr 20 06:53:41 2012
@@ -23,6 +23,7 @@ import java.util.List;
import javolution.util.FastList;
import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -36,7 +37,7 @@ public class While extends MethodOperati
Conditional condition;
List<MethodOperation> thenSubOps = FastList.newInstance();
- public While(Element element, SimpleMethod simpleMethod) {
+ public While(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
Element conditionElement = UtilXml.firstChildElement(element, "condition");
Element conditionChildElement = UtilXml.firstChildElement(conditionElement);
@@ -46,7 +47,7 @@ public class While extends MethodOperati
}
@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 drop though loop and
// return true
@@ -77,7 +78,7 @@ public class While extends MethodOperati
}
public static final class WhileFactory implements Factory<While> {
- public While createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public While createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new While(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.entity
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;
@@ -37,14 +38,14 @@ public class ClearCacheLine extends Meth
String entityName;
ContextAccessor<Map<String, ? extends Object>> mapAcsr;
- public ClearCacheLine(Element element, SimpleMethod simpleMethod) {
+ public ClearCacheLine(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
entityName = element.getAttribute("entity-name");
mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map"), element.getAttribute("map-name"));
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String entityName = methodContext.expandString(this.entityName);
if (mapAcsr.isEmpty()) {
@@ -73,7 +74,7 @@ public class ClearCacheLine extends Meth
}
public static final class ClearCacheLineFactory implements Factory<ClearCacheLine> {
- public ClearCacheLine createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public ClearCacheLine createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new ClearCacheLine(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java Fri Apr 20 06:53:41 2012
@@ -18,6 +18,7 @@
*******************************************************************************/
package org.ofbiz.minilang.method.entityops;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -28,12 +29,12 @@ import org.w3c.dom.Element;
*/
public class ClearEntityCaches extends MethodOperation {
- public ClearEntityCaches(Element element, SimpleMethod simpleMethod) {
+ public ClearEntityCaches(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
methodContext.getDelegator().clearAllCaches();
return true;
}
@@ -51,7 +52,7 @@ public class ClearEntityCaches extends M
}
public static final class ClearEntityCachesFactory implements Factory<ClearEntityCaches> {
- public ClearEntityCaches createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public ClearEntityCaches createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new ClearEntityCaches(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java Fri Apr 20 06:53:41 2012
@@ -20,6 +20,7 @@ package org.ofbiz.minilang.method.entity
import org.ofbiz.base.util.Debug;
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;
@@ -36,14 +37,14 @@ public class CloneValue extends MethodOp
ContextAccessor<GenericValue> newValueAcsr;
ContextAccessor<GenericValue> valueAcsr;
- public CloneValue(Element element, SimpleMethod simpleMethod) {
+ public CloneValue(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
newValueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("new-value-field"), element.getAttribute("new-value-name"));
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
GenericValue value = valueAcsr.get(methodContext);
if (value == null) {
Debug.logWarning("In clone-value a value was not found with the specified valueAcsr: " + valueAcsr + ", not copying", module);
@@ -66,7 +67,7 @@ public class CloneValue extends MethodOp
}
public static final class CloneValueFactory implements Factory<CloneValue> {
- public CloneValue createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CloneValue createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CloneValue(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.entity
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.GenericEntityException;
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;
@@ -39,7 +40,7 @@ public class CreateValue extends MethodO
boolean testDuplicate;
ContextAccessor<GenericValue> valueAcsr;
- public CreateValue(Element element, SimpleMethod simpleMethod) {
+ public CreateValue(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
doCacheClearStr = element.getAttribute("do-cache-clear");
@@ -47,7 +48,7 @@ public class CreateValue extends MethodO
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr));
GenericValue value = valueAcsr.get(methodContext);
if (value == null) {
@@ -97,7 +98,7 @@ public class CreateValue extends MethodO
}
public static final class CreateValueFactory implements Factory<CreateValue> {
- public CreateValue createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public CreateValue createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CreateValue(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java Fri Apr 20 06:53:41 2012
@@ -22,6 +22,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.finder.ByAndFinder;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -36,13 +37,13 @@ public class EntityAnd extends MethodOpe
protected ByAndFinder finder;
- public EntityAnd(Element element, SimpleMethod simpleMethod) {
+ public EntityAnd(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
this.finder = new ByAndFinder(element);
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
try {
Delegator delegator = methodContext.getDelegator();
this.finder.runFind(methodContext.getEnvMap(), delegator);
@@ -78,7 +79,7 @@ public class EntityAnd extends MethodOpe
}
public static final class EntityAndFactory implements Factory<EntityAnd> {
- public EntityAnd createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public EntityAnd createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityAnd(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java Fri Apr 20 06:53:41 2012
@@ -22,6 +22,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.finder.ByConditionFinder;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -36,13 +37,13 @@ public class EntityCondition extends Met
protected ByConditionFinder finder;
- public EntityCondition(Element element, SimpleMethod simpleMethod) {
+ public EntityCondition(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
this.finder = new ByConditionFinder(element);
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
try {
Delegator delegator = methodContext.getDelegator();
this.finder.runFind(methodContext.getEnvMap(), delegator);
@@ -78,7 +79,7 @@ public class EntityCondition extends Met
}
public static final class EntityConditionFactory implements Factory<EntityCondition> {
- public EntityCondition createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public EntityCondition createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityCondition(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java Fri Apr 20 06:53:41 2012
@@ -34,6 +34,7 @@ import org.ofbiz.entity.finder.EntityFin
import org.ofbiz.entity.finder.EntityFinderUtil.ConditionList;
import org.ofbiz.entity.finder.EntityFinderUtil.ConditionObject;
import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -52,7 +53,7 @@ public class EntityCount extends MethodO
protected Condition havingCondition;
protected Condition whereCondition;
- public EntityCount(Element element, SimpleMethod simpleMethod) {
+ public EntityCount(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
this.entityNameExdr = FlexibleStringExpander.getInstance(element.getAttribute("entity-name"));
this.delegatorNameExdr = FlexibleStringExpander.getInstance(element.getAttribute("delegator-name"));
@@ -83,7 +84,7 @@ public class EntityCount extends MethodO
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
try {
Map<String, Object> context = methodContext.getEnvMap();
Delegator delegator = methodContext.getDelegator();
@@ -141,7 +142,7 @@ public class EntityCount extends MethodO
}
public static final class EntityCountFactory implements Factory<EntityCount> {
- public EntityCount createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public EntityCount createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityCount(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java Fri Apr 20 06:53:41 2012
@@ -32,6 +32,7 @@ import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.DelegatorFactory;
import org.ofbiz.entity.util.EntityDataAssert;
import org.ofbiz.entity.util.EntitySaxReader;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.ContextAccessor;
import org.ofbiz.minilang.method.MethodContext;
@@ -51,7 +52,7 @@ public class EntityData extends MethodOp
protected String mode;
protected FlexibleStringExpander timeoutExdr;
- public EntityData(Element element, SimpleMethod simpleMethod) {
+ public EntityData(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
locationExdr = FlexibleStringExpander.getInstance(element.getAttribute("location"));
delegatorNameExdr = FlexibleStringExpander.getInstance(element.getAttribute("delegator-name"));
@@ -64,7 +65,7 @@ public class EntityData extends MethodOp
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
@@ -136,7 +137,7 @@ public class EntityData extends MethodOp
}
public static final class EntityDataFactory implements Factory<EntityData> {
- public EntityData createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public EntityData createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityData(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java Fri Apr 20 06:53:41 2012
@@ -22,6 +22,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.finder.PrimaryKeyFinder;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
@@ -36,13 +37,13 @@ public class EntityOne extends MethodOpe
protected PrimaryKeyFinder finder;
- public EntityOne(Element element, SimpleMethod simpleMethod) {
+ public EntityOne(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
this.finder = new PrimaryKeyFinder(element);
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
try {
Delegator delegator = methodContext.getDelegator();
this.finder.runFind(methodContext.getEnvMap(), delegator);
@@ -78,7 +79,7 @@ public class EntityOne extends MethodOpe
}
public static final class EntityOneFactory implements Factory<EntityOne> {
- public EntityOne createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public EntityOne createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityOne(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java Fri Apr 20 06:53:41 2012
@@ -23,6 +23,7 @@ import java.util.Map;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.util.EntityUtil;
+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 FilterListByAnd extends Met
ContextAccessor<Map<String, ? extends Object>> mapAcsr;
ContextAccessor<List<GenericEntity>> toListAcsr;
- public FilterListByAnd(Element element, SimpleMethod simpleMethod) {
+ public FilterListByAnd(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
listAcsr = new ContextAccessor<List<GenericEntity>>(element.getAttribute("list"), element.getAttribute("list-name"));
toListAcsr = new ContextAccessor<List<GenericEntity>>(element.getAttribute("to-list"), element.getAttribute("to-list-name"));
@@ -49,7 +50,7 @@ public class FilterListByAnd extends Met
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
Map<String, ? extends Object> theMap = null;
if (!mapAcsr.isEmpty()) {
theMap = mapAcsr.get(methodContext);
@@ -71,7 +72,7 @@ public class FilterListByAnd extends Met
}
public static final class FilterListByAndFactory implements Factory<FilterListByAnd> {
- public FilterListByAnd createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public FilterListByAnd createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new FilterListByAnd(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java Fri Apr 20 06:53:41 2012
@@ -25,6 +25,7 @@ import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.ContextAccessor;
import org.ofbiz.minilang.method.MethodContext;
@@ -43,7 +44,7 @@ public class FilterListByDate extends Me
ContextAccessor<List<GenericEntity>> toListAcsr;
ContextAccessor<Timestamp> validDateAcsr;
- public FilterListByDate(Element element, SimpleMethod simpleMethod) {
+ public FilterListByDate(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
listAcsr = new ContextAccessor<List<GenericEntity>>(element.getAttribute("list"), element.getAttribute("list-name"));
toListAcsr = new ContextAccessor<List<GenericEntity>>(element.getAttribute("to-list"), element.getAttribute("to-list-name"));
@@ -61,7 +62,7 @@ public class FilterListByDate extends Me
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
if (!validDateAcsr.isEmpty()) {
toListAcsr.put(methodContext, EntityUtil.filterByDate(listAcsr.get(methodContext), validDateAcsr.get(methodContext), fromFieldName, thruFieldName, true));
} else {
@@ -83,7 +84,7 @@ public class FilterListByDate extends Me
}
public static final class FilterListByDateFactory implements Factory<FilterListByDate> {
- public FilterListByDate createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public FilterListByDate createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new FilterListByDate(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java Fri Apr 20 06:53:41 2012
@@ -27,6 +27,7 @@ import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.DelegatorFactory;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.condition.EntityCondition;
+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 FindByAnd extends MethodOpe
String useCacheStr;
String useIteratorStr;
- public FindByAnd(Element element, SimpleMethod simpleMethod) {
+ public FindByAnd(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
listAcsr = new ContextAccessor<Object>(element.getAttribute("list"), element.getAttribute("list-name"));
entityName = element.getAttribute("entity-name");
@@ -60,7 +61,7 @@ public class FindByAnd extends MethodOpe
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String entityName = methodContext.expandString(this.entityName);
String delegatorName = methodContext.expandString(this.delegatorName);
String useCacheStr = methodContext.expandString(this.useCacheStr);
@@ -121,7 +122,7 @@ public class FindByAnd extends MethodOpe
}
public static final class FindByAndFactory implements Factory<FindByAnd> {
- public FindByAnd createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public FindByAnd createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new FindByAnd(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java Fri Apr 20 06:53:41 2012
@@ -29,6 +29,7 @@ import org.ofbiz.entity.DelegatorFactory
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
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 FindByPrimaryKey extends Me
String useCacheStr;
ContextAccessor<GenericValue> valueAcsr;
- public FindByPrimaryKey(Element element, SimpleMethod simpleMethod) {
+ public FindByPrimaryKey(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
entityName = element.getAttribute("entity-name");
@@ -60,7 +61,7 @@ public class FindByPrimaryKey extends Me
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String entityName = methodContext.expandString(this.entityName);
String delegatorName = methodContext.expandString(this.delegatorName);
String useCacheStr = methodContext.expandString(this.useCacheStr);
@@ -110,7 +111,7 @@ public class FindByPrimaryKey extends Me
}
public static final class FindByPrimaryKeyFactory implements Factory<FindByPrimaryKey> {
- public FindByPrimaryKey createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public FindByPrimaryKey createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new FindByPrimaryKey(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java Fri Apr 20 06:53:41 2012
@@ -24,6 +24,7 @@ import java.util.Map;
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.GenericEntityException;
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;
@@ -44,7 +45,7 @@ public class GetRelated extends MethodOp
String useCacheStr;
ContextAccessor<GenericValue> valueAcsr;
- public GetRelated(Element element, SimpleMethod simpleMethod) {
+ public GetRelated(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
relationName = element.getAttribute("relation-name");
@@ -55,7 +56,7 @@ public class GetRelated extends MethodOp
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String relationName = methodContext.expandString(this.relationName);
String useCacheStr = methodContext.expandString(this.useCacheStr);
boolean useCache = "true".equals(useCacheStr);
@@ -104,7 +105,7 @@ public class GetRelated extends MethodOp
}
public static final class GetRelatedFactory implements Factory<GetRelated> {
- public GetRelated createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public GetRelated createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new GetRelated(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.entity
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.GenericEntityException;
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;
@@ -39,7 +40,7 @@ public class GetRelatedOne extends Metho
String useCacheStr;
ContextAccessor<Object> valueAcsr;
- public GetRelatedOne(Element element, SimpleMethod simpleMethod) {
+ public GetRelatedOne(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<Object>(element.getAttribute("value-field"), element.getAttribute("value-name"));
toValueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("to-value-field"), element.getAttribute("to-value-name"));
@@ -48,7 +49,7 @@ public class GetRelatedOne extends Metho
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String relationName = methodContext.expandString(this.relationName);
String useCacheStr = methodContext.expandString(this.useCacheStr);
boolean useCache = "true".equals(useCacheStr);
@@ -96,7 +97,7 @@ public class GetRelatedOne extends Metho
}
public static final class GetRelatedOneFactory implements Factory<GetRelatedOne> {
- public GetRelatedOne createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public GetRelatedOne createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new GetRelatedOne(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.entity
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilValidate;
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;
@@ -39,7 +40,7 @@ public class MakeNextSeqId extends Metho
String seqFieldName;
ContextAccessor<GenericValue> valueAcsr;
- public MakeNextSeqId(Element element, SimpleMethod simpleMethod) {
+ public MakeNextSeqId(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
seqFieldName = element.getAttribute("seq-field-name");
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
@@ -48,7 +49,7 @@ public class MakeNextSeqId extends Metho
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String seqFieldName = methodContext.expandString(this.seqFieldName);
String numericPaddingStr = methodContext.expandString(this.numericPaddingStr);
String incrementByStr = methodContext.expandString(this.incrementByStr);
@@ -86,7 +87,7 @@ public class MakeNextSeqId extends Metho
}
public static final class MakeNextSeqIdFactory implements Factory<MakeNextSeqId> {
- public MakeNextSeqId createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public MakeNextSeqId createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new MakeNextSeqId(element, simpleMethod);
}
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java?rev=1328222&r1=1328221&r2=1328222&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java Fri Apr 20 06:53:41 2012
@@ -21,6 +21,7 @@ package org.ofbiz.minilang.method.entity
import java.util.Map;
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;
@@ -36,7 +37,7 @@ public class MakeValue extends MethodOpe
ContextAccessor<Map<String, ? extends Object>> mapAcsr;
ContextAccessor<GenericValue> valueAcsr;
- public MakeValue(Element element, SimpleMethod simpleMethod) {
+ public MakeValue(Element element, SimpleMethod simpleMethod) throws MiniLangException {
super(element, simpleMethod);
valueAcsr = new ContextAccessor<GenericValue>(element.getAttribute("value-field"), element.getAttribute("value-name"));
entityName = element.getAttribute("entity-name");
@@ -44,7 +45,7 @@ public class MakeValue extends MethodOpe
}
@Override
- public boolean exec(MethodContext methodContext) {
+ public boolean exec(MethodContext methodContext) throws MiniLangException {
String entityName = methodContext.expandString(this.entityName);
Map<String, ? extends Object> ctxMap = (mapAcsr.isEmpty() ? null : mapAcsr.get(methodContext));
valueAcsr.put(methodContext, methodContext.getDelegator().makeValidValue(entityName, ctxMap));
@@ -68,7 +69,7 @@ public class MakeValue extends MethodOpe
}
public static final class MakeValueFactory implements Factory<MakeValue> {
- public MakeValue createMethodOperation(Element element, SimpleMethod simpleMethod) {
+ public MakeValue createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new MakeValue(element, simpleMethod);
}