Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -68,16 +68,16 @@ return "not"; } } - + public static final int OR = 1; public static final int XOR = 2; public static final int AND = 3; public static final int NOT = 4; - SimpleMethod simpleMethod; + SimpleMethod simpleMethod; int conditionType; List<Conditional> subConditions = FastList.newInstance(); - + public CombinedCondition(Element element, int conditionType, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; this.conditionType = conditionType; @@ -88,7 +88,7 @@ public boolean checkCondition(MethodContext methodContext) { if (subConditions.size() == 0) return true; - + Iterator<Conditional> subCondIter = subConditions.iterator(); switch (this.conditionType) { case OR: Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,11 +41,11 @@ } } - + public static final String module = CompareCondition.class.getName(); - + SimpleMethod simpleMethod; - + ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; String value; @@ -53,10 +53,10 @@ String operator; String type; String format; - + public CompareCondition(Element element, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; - + // NOTE: this is still supported, but is deprecated this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name")); this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field")); @@ -76,7 +76,7 @@ String operator = methodContext.expandString(this.operator); String type = methodContext.expandString(this.type); String format = methodContext.expandString(this.format); - + Object fieldVal = getFieldVal(methodContext); List<Object> messages = FastList.newInstance(); @@ -85,7 +85,7 @@ messages.add(0, "Error with comparison in if-compare between field [" + mapAcsr.toString() + "." + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: "); if (methodContext.getMethodType() == MethodContext.EVENT) { StringBuilder fullString = new StringBuilder(); - + for (Object message: messages) { fullString.append(message); } @@ -99,12 +99,12 @@ } return false; } - + if (resultBool != null) return resultBool.booleanValue(); - + return false; } - + protected Object getFieldVal(MethodContext methodContext) { Object fieldVal = null; if (!mapAcsr.isEmpty()) { @@ -132,7 +132,7 @@ String type = methodContext.expandString(this.type); String format = methodContext.expandString(this.format); Object fieldVal = getFieldVal(methodContext); - + messageBuffer.append("["); if (!this.mapAcsr.isEmpty()) { messageBuffer.append(this.mapAcsr); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,11 +40,11 @@ } } - + public static final String module = CompareFieldCondition.class.getName(); - + SimpleMethod simpleMethod; - + ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; ContextAccessor<Map<String, ? extends Object>> toMapAcsr; @@ -53,10 +53,10 @@ String operator; String type; String format; - + public CompareFieldCondition(Element element, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; - + // NOTE: this is still supported, but is deprecated this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name")); this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field")); @@ -64,7 +64,7 @@ // NOTE: this is still supported, but is deprecated this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field-name")); } - + // NOTE: this is still supported, but is deprecated this.toMapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("to-map-name")); // set fieldAcsr to their default value of fieldAcsr if empty @@ -75,7 +75,7 @@ } // do NOT default the to-map-name to the map-name because that - //would make it impossible to compare from a map field to an + //would make it impossible to compare from a map field to an //environment field this.operator = element.getAttribute("operator"); @@ -112,12 +112,12 @@ } return false; } - + if (resultBool != null) return resultBool.booleanValue(); - + return false; } - + protected Object getFieldVal1(MethodContext methodContext) { Object fieldVal1 = null; if (!mapAcsr.isEmpty()) { @@ -149,7 +149,7 @@ } return fieldVal2; } - + public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { String operator = methodContext.expandString(this.operator); String type = methodContext.expandString(this.type); @@ -157,7 +157,7 @@ Object fieldVal1 = getFieldVal1(methodContext); Object fieldVal2 = getFieldVal2(methodContext); - + messageBuffer.append("["); if (!this.mapAcsr.isEmpty()) { messageBuffer.append(this.mapAcsr); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Conditional.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Conditional.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Conditional.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Conditional.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ConditionalFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ConditionalFactory.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ConditionalFactory.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ConditionalFactory.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -43,12 +43,12 @@ } conditionalFactories = Collections.unmodifiableMap(factories); } - + public static final String module = ConditionalFactory.class.getName(); - + public static Conditional makeConditional(Element element, SimpleMethod simpleMethod) { String tagName = element.getTagName(); - + ConditionalFactory factory = conditionalFactories.get(tagName); if (factory != null) { return factory.createCondition(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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,11 +39,11 @@ Element conditionElement = UtilXml.firstChildElement(element, "condition"); Element conditionChildElement = UtilXml.firstChildElement(conditionElement); this.condition = ConditionalFactory.makeConditional(conditionChildElement, simpleMethod); - + Element thenElement = UtilXml.firstChildElement(element, "then"); SimpleMethod.readOperations(thenElement, thenSubOps, simpleMethod); } - + public List<MethodOperation> getThenSubOps() { return this.thenSubOps; } @@ -51,7 +51,7 @@ public boolean checkCondition(MethodContext methodContext) { return condition.checkCondition(methodContext); } - + public boolean runSubOps(MethodContext methodContext) { return SimpleMethod.runSubOps(thenSubOps, methodContext); } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,17 +38,17 @@ } } - + public static final String module = EmptyCondition.class.getName(); - + SimpleMethod simpleMethod; - + ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; - + public EmptyCondition(Element element, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; - + // NOTE: this is still supported, but is deprecated this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name")); this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field")); @@ -86,10 +86,10 @@ } } } - + return runSubOps; } - + protected Object getFieldVal(MethodContext methodContext) { Object fieldVal = null; if (!mapAcsr.isEmpty()) { Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,15 +39,15 @@ } } - + SimpleMethod simpleMethod; - + String permission; String action; - + public HasPermissionCondition(Element element, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; - + this.permission = element.getAttribute("permission"); this.action = element.getAttribute("action"); } @@ -61,7 +61,7 @@ if (userLogin != null) { String permission = methodContext.expandString(this.permission); String action = methodContext.expandString(this.action); - + Security security = methodContext.getSecurity(); if (action != null && action.length() > 0) { // run hasEntityPermission @@ -75,7 +75,7 @@ } } } - + return runSubOps; } 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -50,14 +50,14 @@ public MasterIf(Element element, SimpleMethod simpleMethod) { super(element, simpleMethod); - + Element conditionElement = UtilXml.firstChildElement(element, "condition"); Element conditionChildElement = UtilXml.firstChildElement(conditionElement); this.condition = ConditionalFactory.makeConditional(conditionChildElement, simpleMethod); - + Element thenElement = UtilXml.firstChildElement(element, "then"); SimpleMethod.readOperations(thenElement, thenSubOps, simpleMethod); - + List<? extends Element> elseIfElements = UtilXml.childElementList(element, "else-if"); if (UtilValidate.isNotEmpty(elseIfElements)) { elseIfs = FastList.newInstance(); @@ -65,7 +65,7 @@ elseIfs.add(new ElseIf(elseIfElement, simpleMethod)); } } - + Element elseElement = UtilXml.firstChildElement(element, "else"); if (elseElement != null) { elseSubOps = FastList.newInstance(); @@ -74,7 +74,7 @@ } public boolean exec(MethodContext methodContext) { - // if conditions fails, always return true; if a sub-op returns false + // if conditions fails, always return true; if a sub-op returns false // return false and stop, otherwise return true // return true; @@ -92,7 +92,7 @@ } } } - + if (elseSubOps != null) { return SimpleMethod.runSubOps(elseSubOps, methodContext); } else { @@ -110,7 +110,7 @@ allSubOps.addAll(elseIf.getThenSubOps()); } } - + return allSubOps; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -53,11 +53,11 @@ } } - + public static final String module = RegexpCondition.class.getName(); - + SimpleMethod simpleMethod; - + static PatternMatcher matcher = new Perl5Matcher(); static PatternCompiler compiler = new Perl5Compiler(); @@ -68,10 +68,10 @@ ContextAccessor<Object> fieldAcsr; FlexibleStringExpander exprExdr; - + public RegexpCondition(Element element, SimpleMethod simpleMethod) { this.simpleMethod = simpleMethod; - + // NOTE: this is still supported, but is deprecated this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name")); this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field")); @@ -101,7 +101,7 @@ return false; } } - + protected String getFieldString(MethodContext methodContext) { String fieldString = null; Object fieldVal = null; @@ -127,7 +127,7 @@ } // always use an empty string by default if (fieldString == null) fieldString = ""; - + return fieldString; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,14 +39,14 @@ } } - + public static final String module = ValidateMethodCondition.class.getName(); - + ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; String methodName; String className; - + public ValidateMethodCondition(Element element) { this.mapAcsr = new ContextAccessor<Map<String, ? extends Object>>(element.getAttribute("map-name")); this.fieldAcsr = new ContextAccessor<Object>(element.getAttribute("field-name")); @@ -85,12 +85,12 @@ } catch (Exception e) { Debug.logError(e, "Error in IfValidationMethod " + methodName + " of class " + className + ", not processing sub-ops ", module); } - + if (resultBool != null) return resultBool.booleanValue(); - + return false; } - + protected String getFieldString(MethodContext methodContext) { String fieldString = null; Object fieldVal = null; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -49,17 +49,17 @@ public While(Element element, SimpleMethod simpleMethod) { super(element, simpleMethod); - + Element conditionElement = UtilXml.firstChildElement(element, "condition"); Element conditionChildElement = UtilXml.firstChildElement(conditionElement); this.condition = ConditionalFactory.makeConditional(conditionChildElement, simpleMethod); - + Element thenElement = UtilXml.firstChildElement(element, "then"); SimpleMethod.readOperations(thenElement, thenSubOps, simpleMethod); } public boolean exec(MethodContext methodContext) { - // if conditions fails, always return true; + // if conditions fails, always return true; // if a sub-op returns false return false and stop, otherwise drop though loop and return true while (condition.checkCondition(methodContext)) { boolean runSubOpsResult = SimpleMethod.runSubOps(thenSubOps, methodContext); 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,9 +39,9 @@ return "clear-cache-line"; } } - + public static final String module = ClearCacheLine.class.getName(); - + String entityName; ContextAccessor<Map<String, ? extends Object>> mapAcsr; @@ -53,7 +53,7 @@ public boolean exec(MethodContext methodContext) { String entityName = methodContext.expandString(this.entityName); - + if (mapAcsr.isEmpty()) { methodContext.getDelegator().clearCacheLine(entityName); } else { 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,9 +39,9 @@ return "clone-value"; } } - - public static final String module = CloneValue.class.getName(); - + + public static final String module = CloneValue.class.getName(); + ContextAccessor<GenericValue> valueAcsr; ContextAccessor<GenericValue> newValueAcsr; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "create-value"; } } - + public static final String module = CreateValue.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String doCacheClearStr; boolean testDuplicate; @@ -57,7 +57,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In create-value a value was not found with the specified valueAcsr: " + valueAcsr + ", not creating"; @@ -78,7 +78,7 @@ methodContext.getDelegator().create(value, doCacheClear); } } catch (GenericEntityException e) { - + Debug.logError(e, module); String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process [problem creating the " + valueAcsr + " value: " + e.getMessage() + "]"; if (methodContext.getMethodType() == MethodContext.EVENT) { 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "entity-and"; } } - + public static final String module = EntityAnd.class.getName(); - + protected ByAndFinder finder; public EntityAnd(Element element, SimpleMethod 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "entity-condition"; } } - + public static final String module = EntityCondition.class.getName(); - + protected ByConditionFinder finder; public EntityCondition(Element element, SimpleMethod 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -50,9 +50,9 @@ return "entity-count"; } } - + public static final String module = EntityCount.class.getName(); - + protected FlexibleStringExpander entityNameExdr; protected FlexibleStringExpander delegatorNameExdr; protected Condition whereCondition; @@ -68,7 +68,7 @@ } else { this.countAcsr = FlexibleMapAccessor.getInstance(element.getAttribute("count-name")); } - + // process condition-expr | condition-list Element conditionExprElement = UtilXml.firstChildElement(element, "condition-expr"); Element conditionListElement = UtilXml.firstChildElement(element, "condition-list"); @@ -83,7 +83,7 @@ } else if (conditionObjectElement != null) { this.whereCondition = new ConditionObject(conditionObjectElement); } - + // process having-condition-list Element havingConditionListElement = UtilXml.firstChildElement(element, "having-condition-list"); if (havingConditionListElement != null) { @@ -97,7 +97,7 @@ GenericDelegator delegator = methodContext.getDelegator(); String entityName = this.entityNameExdr.expandString(context); String delegatorName = this.delegatorNameExdr.expandString(context); - + if (delegatorName != null && delegatorName.length() > 0) { delegator = GenericDelegator.getGenericDelegator(delegatorName); } @@ -113,9 +113,9 @@ if (this.havingCondition != null) { havingEntityCondition = this.havingCondition.createCondition(context, entityName, delegator); } - + long count = delegator.findCountByCondition(entityName, whereEntityCondition, havingEntityCondition, null); - + this.countAcsr.put(context, count); } catch (GeneralException e) { Debug.logError(e, module); @@ -139,7 +139,7 @@ if (entName.indexOf("${") >= 0) return null; return entName; } - + public String rawString() { // TODO: something more than the empty tag return "<entity-count/>"; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -51,9 +51,9 @@ return "entity-data"; } } - + public static final String module = EntityData.class.getName(); - + protected FlexibleStringExpander locationExdr; protected FlexibleStringExpander delegatorNameExdr; protected FlexibleStringExpander timeoutExdr; @@ -66,7 +66,7 @@ delegatorNameExdr = FlexibleStringExpander.getInstance(element.getAttribute("delegator-name")); timeoutExdr = FlexibleStringExpander.getInstance(element.getAttribute("timeout")); errorListAcsr = new ContextAccessor<List<Object>>(element.getAttribute("error-list-name"), "error_list"); - + mode = element.getAttribute("mode"); if (UtilValidate.isEmpty(mode)) { mode = "load"; @@ -97,7 +97,7 @@ if (dataUrl == null) { messages.add("Could not find Entity Data document in resource: " + location); } - + String timeout = this.timeoutExdr.expandString(methodContext.getEnvMap()); int txTimeout = -1; if (UtilValidate.isNotEmpty(timeout)) { 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "entity-one"; } } - + public static final String module = EntityOne.class.getName(); - + protected PrimaryKeyFinder finder; public EntityOne(Element element, SimpleMethod simpleMethod) { @@ -69,7 +69,7 @@ } return true; } - + public String getEntityName() { return this.finder.getEntityName(); } 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,7 +42,7 @@ return "filter-list-by-and"; } } - + ContextAccessor<List<GenericEntity>> listAcsr; ContextAccessor<List<GenericEntity>> toListAcsr; ContextAccessor<Map<String, ? extends Object>> mapAcsr; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -44,7 +44,7 @@ return "filter-list-by-date"; } } - + ContextAccessor<List<GenericEntity>> listAcsr; ContextAccessor<List<GenericEntity>> toListAcsr; ContextAccessor<Timestamp> validDateAcsr; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,9 +47,9 @@ return "find-by-and"; } } - - public static final String module = FindByAnd.class.getName(); - + + public static final String module = FindByAnd.class.getName(); + ContextAccessor<Object> listAcsr; String entityName; ContextAccessor<Map<String, ? extends Object>> mapAcsr; @@ -75,10 +75,10 @@ String delegatorName = methodContext.expandString(this.delegatorName); String useCacheStr = methodContext.expandString(this.useCacheStr); String useIteratorStr = methodContext.expandString(this.useIteratorStr); - + boolean useCache = "true".equals(useCacheStr); boolean useIterator = "true".equals(useIteratorStr); - + List<String> orderByNames = null; if (!orderByListAcsr.isEmpty()) { orderByNames = orderByListAcsr.get(methodContext); 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -48,9 +48,9 @@ return "find-by-primary-key"; } } - + public static final String module = FindByPrimaryKey.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String entityName; ContextAccessor<Map<String, ? extends Object>> mapAcsr; @@ -72,7 +72,7 @@ String entityName = methodContext.expandString(this.entityName); String delegatorName = methodContext.expandString(this.delegatorName); String useCacheStr = methodContext.expandString(this.useCacheStr); - + boolean useCache = "true".equals(useCacheStr); GenericDelegator delegator = methodContext.getDelegator(); @@ -85,12 +85,12 @@ GenericEntity inEntity = (GenericEntity) inMap; entityName = inEntity.getEntityName(); } - + Collection<String> fieldsToSelectList = null; if (!fieldsToSelectListAcsr.isEmpty()) { fieldsToSelectList = fieldsToSelectListAcsr.get(methodContext); } - + try { if (fieldsToSelectList != null) { valueAcsr.put(methodContext, delegator.findByPrimaryKeyPartial(delegator.makePK(entityName, inMap), UtilMisc.makeSetWritable(fieldsToSelectList))); @@ -105,7 +105,7 @@ } return true; } - + public String getEntityName() { return this.entityName; } 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -43,9 +43,9 @@ return "get-related"; } } - + public static final String module = GetRelated.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<List<String>> orderByListAcsr; @@ -68,7 +68,7 @@ String relationName = methodContext.expandString(this.relationName); String useCacheStr = methodContext.expandString(this.useCacheStr); boolean useCache = "true".equals(useCacheStr); - + List<String> orderByNames = null; if (!orderByListAcsr.isEmpty()) { orderByNames = orderByListAcsr.get(methodContext); 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "get-related-one"; } } - + public static final String module = GetRelatedOne.class.getName(); - + ContextAccessor<Object> valueAcsr; ContextAccessor<GenericValue> toValueAcsr; String relationName; 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -80,7 +80,7 @@ GenericValue value = valueAcsr.get(methodContext); methodContext.getDelegator().setNextSubSeqId(value, seqFieldName, numericPadding, incrementBy); - + return true; } 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=757074&r1=757073&r2=757074&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 Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,7 +38,7 @@ return "make-value"; } } - + ContextAccessor<GenericValue> valueAcsr; String entityName; ContextAccessor<Map<String, ? extends Object>> mapAcsr; @@ -56,7 +56,7 @@ valueAcsr.put(methodContext, methodContext.getDelegator().makeValidValue(entityName, ctxMap)); return true; } - + public String getEntityName() { return this.entityName; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowDateToEnv.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowDateToEnv.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowDateToEnv.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowDateToEnv.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -45,7 +45,7 @@ return "now-date"; } } - + ContextAccessor<java.sql.Date> envAcsr; public NowDateToEnv(Element element, SimpleMethod simpleMethod) { Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowTimestampToEnv.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowTimestampToEnv.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowTimestampToEnv.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/NowTimestampToEnv.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -45,7 +45,7 @@ return "now-timestamp"; } } - + ContextAccessor<java.sql.Timestamp> envAcsr; public NowTimestampToEnv(Element element, SimpleMethod simpleMethod) { Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,7 +41,7 @@ return "order-value-list"; } } - + ContextAccessor<List<? extends GenericEntity>> listAcsr; ContextAccessor<List<? extends GenericEntity>> toListAcsr; ContextAccessor<List<String>> orderByListAcsr; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "refresh-value"; } } - + public static final String module = RemoveValue.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String doCacheClearStr; @@ -54,7 +54,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In remove-value a value was not found with the specified valueAcsr: " + valueAcsr + ", not removing"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,9 +41,9 @@ return "remove-by-and"; } } - + public static final String module = RemoveByAnd.class.getName(); - + String entityName; ContextAccessor<Map<String, ? extends Object>> mapAcsr; String doCacheClearStr; @@ -58,7 +58,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(doCacheClearStr); String entityName = methodContext.expandString(this.entityName); - + try { methodContext.getDelegator().removeByAnd(entityName, mapAcsr.get(methodContext), doCacheClear); } catch (GenericEntityException e) { Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,7 +42,7 @@ return "remove-list"; } } - + public static final String module = RemoveList.class.getName(); ContextAccessor<List<GenericValue>> listAcsr; @@ -56,7 +56,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(doCacheClearStr); - + List<GenericValue> values = listAcsr.get(methodContext); if (values == null) { String errMsg = "In remove-list a value list was not found with the specified listAcsr: " + listAcsr + ", not removing"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "remove-related"; } } - + public static final String module = RemoveRelated.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String relationName; String doCacheClearStr; @@ -57,7 +57,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(doCacheClearStr); String relationName = methodContext.expandString(this.relationName); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In remove-related a value was not found with the specified valueAcsr: " + valueAcsr + ", not removing related"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "remove-value"; } } - + public static final String module = RemoveValue.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String doCacheClearStr; @@ -54,7 +54,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In remove-value a value was not found with the specified valueAcsr: " + valueAcsr + ", not removing"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,8 +47,8 @@ return "sequenced-id"; } } - - + + String seqName; ContextAccessor<Object> envAcsr; boolean getLongOnly; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,9 +39,9 @@ return "set-current-user-login"; } } - + public static final String module = SetCurrentUserLogin.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; public SetCurrentUserLogin(Element element, SimpleMethod simpleMethod) { Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,9 +41,9 @@ return "set-nonpk-fields"; } } - + public static final String module = SetNonpkFields.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; ContextAccessor<Map<String, ? extends Object>> mapAcsr; String setIfNullStr; @@ -58,7 +58,7 @@ public boolean exec(MethodContext methodContext) { // if anything but false it will be true boolean setIfNull = !"false".equals(methodContext.expandString(setIfNullStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In set-nonpk-fields a value was not found with the specified valueAcsr: " + valueAcsr + ", not setting fields"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,9 +41,9 @@ return "set-pk-fields"; } } - + public static final String module = SetPkFields.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; ContextAccessor<Map<String, ? extends Object>> mapAcsr; String setIfNullStr; @@ -58,7 +58,7 @@ public boolean exec(MethodContext methodContext) { // if anything but false it will be true boolean setIfNull = !"false".equals(methodContext.expandString(setIfNullStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In set-pk-fields a value was not found with the specified valueAcsr: " + valueAcsr + ", not setting fields"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,9 +42,9 @@ return "store-list"; } } - + public static final String module = StoreList.class.getName(); - + ContextAccessor<List<GenericValue>> listAcsr; String doCacheClearStr; @@ -56,7 +56,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr)); - + List<GenericValue> values = listAcsr.get(methodContext); if (values == null) { String errMsg = "In store-list a value list was not found with the specified listAcsr: " + listAcsr + ", not storing"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "store-value"; } } - + public static final String module = StoreValue.class.getName(); - + ContextAccessor<GenericValue> valueAcsr; String doCacheClearStr; @@ -54,7 +54,7 @@ public boolean exec(MethodContext methodContext) { boolean doCacheClear = !"false".equals(methodContext.expandString(doCacheClearStr)); - + GenericValue value = valueAcsr.get(methodContext); if (value == null) { String errMsg = "In store-value a value was not found with the specified valueAcsr: " + valueAcsr + ", not storing"; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "transaction-begin"; } } - + public static final String module = TransactionBegin.class.getName(); - + ContextAccessor<Boolean> beganTransactionAcsr; public TransactionBegin(Element element, SimpleMethod simpleMethod) { @@ -56,12 +56,12 @@ beganTransaction = TransactionUtil.begin(); } catch (GenericTransactionException e) { Debug.logError(e, "Could not begin transaction in simple-method, returning error.", module); - + String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process [error beginning a transaction: " + e.getMessage() + "]"; methodContext.setErrorReturn(errMsg, simpleMethod); return false; } - + beganTransactionAcsr.put(methodContext, beganTransaction); return true; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "transaction-commit"; } } - + public static final String module = TransactionCommit.class.getName(); - + ContextAccessor<Boolean> beganTransactionAcsr; public TransactionCommit(Element element, SimpleMethod simpleMethod) { @@ -52,22 +52,22 @@ public boolean exec(MethodContext methodContext) { boolean beganTransaction = false; - + Boolean beganTransactionBoolean = beganTransactionAcsr.get(methodContext); if (beganTransactionBoolean != null) { beganTransaction = beganTransactionBoolean.booleanValue(); } - + try { TransactionUtil.commit(beganTransaction); } catch (GenericTransactionException e) { Debug.logError(e, "Could not commit transaction in simple-method, returning error.", module); - + String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process [error committing a transaction: " + e.getMessage() + "]"; methodContext.setErrorReturn(errMsg, simpleMethod); return false; } - + beganTransactionAcsr.remove(methodContext); return true; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionRollback.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionRollback.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionRollback.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionRollback.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "transaction-rollback"; } } - + public static final String module = TransactionRollback.class.getName(); - + ContextAccessor<Boolean> beganTransactionAcsr; public TransactionRollback(Element element, SimpleMethod simpleMethod) { @@ -52,22 +52,22 @@ public boolean exec(MethodContext methodContext) { boolean beganTransaction = false; - + Boolean beganTransactionBoolean = beganTransactionAcsr.get(methodContext); if (beganTransactionBoolean != null) { beganTransaction = beganTransactionBoolean.booleanValue(); } - + try { TransactionUtil.rollback(beganTransaction, "Explicit rollback in simple-method [" + this.simpleMethod.getShortDescription() + "]", null); } catch (GenericTransactionException e) { Debug.logError(e, "Could not rollback transaction in simple-method, returning error.", module); - + String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process [error rolling back a transaction: " + e.getMessage() + "]"; methodContext.setErrorReturn(errMsg, simpleMethod); return false; } - + beganTransactionAcsr.remove(methodContext); return true; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ClearField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ClearField.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ClearField.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/ClearField.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,9 +41,9 @@ return "clear-field"; } } - + public static final String module = ClearField.class.getName(); - + ContextAccessor<Map<String, Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToEnv.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToEnv.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToEnv.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToEnv.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,7 +39,7 @@ return "env-to-env"; } } - + public static final String module = EnvToEnv.class.getName(); protected ContextAccessor<Object> envAcsr; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToField.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToField.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/EnvToField.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,9 +42,9 @@ return "env-to-field"; } } - + public static final String module = EnvToField.class.getName(); - + ContextAccessor<Object> envAcsr; ContextAccessor<Map<String, Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToEnv.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToEnv.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToEnv.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToEnv.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,9 +40,9 @@ return "field-to-env"; } } - + public static final String module = FieldToEnv.class.getName(); - + ContextAccessor<Object> envAcsr; ContextAccessor<Map<String, ? extends Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToField.java?rev=757074&r1=757073&r2=757074&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToField.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/FieldToField.java Sat Mar 21 23:24:13 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,9 +42,9 @@ return "field-to-field"; } } - + public static final String module = FieldToField.class.getName(); - + ContextAccessor<Map<String, Object>> mapAcsr; ContextAccessor<Object> fieldAcsr; ContextAccessor<Map<String, Object>> toMapAcsr; @@ -88,7 +88,7 @@ return true; } - // note that going to an env field will only work if it came from an env + // note that going to an env field will only work if it came from an env // field because if not specified the to-map-name will be set to the map-name // to go from a map field to an env field, use the field-to-env operation Map<String, Object> toMap = null; |
Free forum by Nabble | Edit this page |